Code reasoning tasks are becoming prevalent in large language model (LLM) assessments. Yet, there is a dearth of studies on the impact of real-world complexities on code reasoning, e.g., inter- or intra-procedural dependencies, API calls, deeply nested constructs, and non-primitive complex types. Evaluating LLMs under such a simplistic setting poses a significant threat to assumptions about their generalizability in practice. To enable a more realistic evaluation of code reasoning, we construct a dataset of 1200 reasoning problems from two sources: existing code reasoning benchmarks and popular GitHub Python repositories. Our pipeline leverages static and dynamic program analysis to automatically serialize/deserialize compound, complex, and custom types galore in real-world code, going far beyond only primitive types used in prior studies. A key feature of our dataset is categorizing each reasoning problem as Lower Complexity (LC) or Higher Complexity (HC) via a principled majority-vote mechanism over nine diverse and interpretable code-complexity metrics, yielding two well-separated, semantically meaningful categories of problem difficulty suitable for precise calibration of LLM reasoning ability. This categorization shows that the problems used in existing code-reasoning evaluation mostly belong to the LC category, failing to represent real-world complexity.


翻译:代码推理任务正日益成为大型语言模型评估中的常见内容。然而,目前鲜有研究探讨真实世界复杂性对代码推理的影响,例如过程间或过程内依赖、API调用、深层嵌套结构以及非原始复杂类型。在此类简化设定下评估大型语言模型,对其在实际应用中的泛化能力假设构成了重大威胁。为实现更贴近现实的代码推理评估,我们从两个来源构建了包含1200个推理问题的数据集:现有代码推理基准测试和流行的GitHub Python代码库。我们的处理流程利用静态与动态程序分析技术,自动序列化/反序列化真实代码中大量存在的复合型、复杂型及自定义类型,远超先前研究仅使用原始类型的范畴。本数据集的关键特征在于:通过基于九种多样化且可解释的代码复杂度指标的多数投票机制,将每个推理问题系统性地归类为低复杂度或高复杂度,从而形成两个区分明确、语义清晰的问题难度类别,适用于精确校准大型语言模型的推理能力。该分类结果表明,现有代码推理评估所使用的问题大多属于低复杂度类别,未能充分体现真实世界的复杂性。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
大语言模型的智能体化推理
专知会员服务
32+阅读 · 1月21日
评估大语言模型在科学发现中的作用
专知会员服务
19+阅读 · 2025年12月19日
通过逻辑推理赋能大语言模型:综述
专知会员服务
32+阅读 · 2025年2月24日
大语言模型评估技术研究进展
专知会员服务
48+阅读 · 2024年7月9日
「大型语言模型推理」综述
专知会员服务
95+阅读 · 2022年12月24日
自然语言处理常识推理综述论文,60页pdf
专知
73+阅读 · 2019年4月4日
自然语言处理中的语言模型预训练方法
PaperWeekly
14+阅读 · 2018年10月21日
用模型不确定性理解模型
论智
11+阅读 · 2018年9月5日
NLP通用模型诞生?一个模型搞定十大自然语言常见任务
人工智能头条
10+阅读 · 2018年6月29日
推荐|机器学习中的模型评价、模型选择和算法选择!
全球人工智能
10+阅读 · 2018年2月5日
关系推理:基于表示学习和语义要素
计算机研究与发展
19+阅读 · 2017年8月22日
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
VIP会员
相关基金
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员