arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.00039cs.PLcs.LG
收藏

基于程序终止的变压器

Transformers for Program Termination

University of Bristol(布里斯托大学)

Yoav Alon, Cristina David

AI总结:

本文研究了变压器架构在源代码中直接识别终止模式的能力,并通过集成方法提升其性能,设计了紧凑的变压器编码器集成框架,结合不同损失函数训练模型,优于现有LLM和图方法。

摘要:

确定程序是否终止是程序分析中的核心挑战,直接影响正确性、验证和安全性。我们研究了变压器架构能否直接从源代码中识别终止模式,并通过集成方法增强其能力。为克服非终止示例极度稀缺的问题,我们设计了紧凑的变压器编码器集成框架,系统训练使用不平衡意识损失函数和类意识采样技术。通过结合不同损失函数训练的模型,我们的集成方法显著优于任何单一变压器,优于强大的现成LLM和图方法。最后,我们引入一个属性管道,产生语法意识的终止估计解释。

英文摘要:

Determining whether a program terminates is a core challenge in program analysis with direct implications for correctness, verification, and security. We investigate whether transformer architectures can recognise termination patterns directly from source code and how their strengths can be amplified through ensembles. To overcome the extreme scarcity of non-terminating examples, we design an ensemble framework of compact transformer encoders, systematically trained with a suite of imbalance-aware loss functions and class-aware sampling techniques. By combining models trained with distinct loss functions, our ensembles achieve substantially stronger performance than any single transformer, outperforming both powerful off-the-shelf LLMs and graph-based methods. Finally, we introduce an attribution pipeline that produces syntax-aware explanations for the termination estimation.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑