PLLGMar 25

Transformers for Program Termination

arXiv:2604.0003928.7
Predicted impact top 49% in PL · last 90 daysOriginality Incremental advance
AI Analysis

For program analysis researchers, this provides a novel approach to termination detection using transformers with ensemble methods, though the improvement is incremental over existing techniques.

This work investigates whether transformer architectures can recognize program termination patterns from source code and proposes an ensemble framework to address the scarcity of non-terminating examples. The ensembles outperform single transformers, off-the-shelf LLMs, and graph-based methods.

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.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes