arXiv:2604.14073cs.LGcs.NE2026-04

提出新神经架构,显著提升代码引用解析的准确性和长序列处理能力。

Neural architectures for resolving references in program code

论文配图:Neural architectures for resolving references in program code
图 1 · 摘自论文原文
  • 基于排列索引建模直接与间接引用问题,设计新型序列到序列架构
  • 处理长度是基线模型10倍的代码片段,错误率降低42%(真实反编译任务)
  • 适用于代码逆向工程,尤其适合处理复杂跳转结构的场景

代码中的引用解析与重写是编程语言的核心任务。针对实际的反编译需求,我们将引用重写抽象为通过排列实现的直接和间接索引问题,并构建了合成基准测试。实验表明,现有主流序列到序列模型在这些任务上表现不佳。为此,我们提出了针对两类问题的新架构。评估显示,新模型在鲁棒性与可扩展性上均优于基线:能处理长度为基线十倍的示例。在真实反编译任务中,针对包含索引子任务的switch语句,扩展模型将错误率降低42%。多组消融实验验证了架构各组件的必要性。

原文摘要 · Abstract (English)

Resolving and rewriting references is fundamental in programming languages. Motivated by a real-world decompilation task, we abstract reference rewriting into the problems of direct and indirect indexing by permutation. We create synthetic benchmarks for these tasks and show that well-known sequence-to-sequence machine learning architectures are struggling on these benchmarks. We introduce new sequence-to-sequence architectures for both problems. Our measurements show that our architectures outperform the baselines in both robustness and scalability: our models can handle examples that are ten times longer compared to the best baseline. We measure the impact of our architecture in the real-world task of decompiling switch statements, which has an indexing subtask. According to our measurements, the extended model decreases the error rate by 42%. Multiple ablation studies show that all components of our architectures are essential.

代码生成序列建模反编译

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。