未选择的道路:程序执行推理中的对偶性
The Path Not Taken: Duality in Reasoning about Program Execution
AI总结:
本文提出通过双重推理任务评估程序执行的因果理解,提出DexBench基准测试集,评估13种LLM,证明双路径推理能有效提升动态代码理解能力。
摘要:
大型语言模型(LLMs)在多样化的编码任务中表现出色,但其应用需要深入理解程序执行而非依赖表面模式。现有基准主要关注特定输入关联的程序属性(如代码覆盖率、程序输出),导致动态代码推理视角狭窄且易受数据污染。本文认为,理解程序执行需通过两种互补推理任务评估其内在对偶性:(i)预测给定输入下的程序行为;(ii)推断输入如何突变以达成特定行为目标。两者共同探测模型对执行流程的因果理解。我们将在包含445对实例的DexBench基准中实例化这种对偶性,并评估13种LLM。结果表明,双路径推理为动态代码理解提供了稳健且具有区分性的代理。
英文摘要:
Large language models (LLMs) have shown remarkable capabilities across diverse coding tasks. However, their adoption requires a true understanding of program execution rather than relying on surface-level patterns. Existing benchmarks primarily focus on predicting program properties tied to specific inputs (e.g., code coverage, program outputs). As a result, they provide a narrow view of dynamic code reasoning and are prone to data contamination. We argue that understanding program execution requires evaluating its inherent duality through two complementary reasoning tasks: (i) predicting a program's observed behavior for a given input, and (ii) inferring how the input must be mutated toward a specific behavioral objective. Both tasks jointly probe a model's causal understanding of execution flow. We instantiate this duality in DexBench, a benchmark comprising 445 paired instances, and evaluate 13 LLMs. Our results demonstrate that dual-path reasoning provides a robust and discriminative proxy for dynamic code understanding.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。