Reproduce “Transformers for Program Termination” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Yoav Alon, Cristina David

A framework employing compact transformer models combined with imbalance-aware training and ensembling predicts program termination from source code. The approach demonstrates superior performance over graph-based methods and general-purpose LLMs on real-world benchmarks, achieving a 95.72% mAP on TPDB, and offers syntax-aware explanations for its predictions.

Key insights

  • Compact, task-adapted transformer models can effectively capture long-range dependencies in code, outperforming graph-based methods and general-purpose LLMs for program termination prediction.
  • Combining diverse imbalance-aware training objectives with class-aware sampling within an ensemble is crucial for robustly detecting rare non-terminating programs.
  • Syntax-aware attribution by mapping token attributions to AST nodes offers actionable insights into model decisions, enhancing interpretability and practical utility for developers.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.