Program Semantic Inequivalence Game with Large Language Models
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLMs) can achieve strong performance on everyday coding tasks, but they can fail on complex tasks that require non-trivial reasoning about program semantics. Finding training examples to teach LLMs to solve these tasks can be challenging. In this work, we explore a method to synthetically generate code reasoning training data based on a semantic inequivalence game (SInQ): a generator agent creates program variants that are semantically distinct, derived from a dataset of real-world programming tasks, while an evaluator agent has to identify input examples for which they behave differently. The agents train each other semi-adversarially, improving their ability to understand the underlying logic of code. We evaluated our approach on multiple code generation and understanding benchmarks, including cross-language vulnerability detection (Lu et al., 2021),, where our method improves vulnerability detection in C/C++ code despite being trained exclusively on Python code, and the challenging Python builtin identifier swap benchmark (Miceli Barone et al., 2023),, showing that whereas modern LLMs still struggle with this benchmark, our approach yields substantial improvements. We release the code needed to replicate the experiments, as well as the generated synthetic data, which can be used to fine-tune LLMs.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 15 of its 29 references that are in the map. First posted on arXiv 2 May 2025.
Builds on
15 of 29 references.
References · 15
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
- 2019Dota 2 with Large Scale Deep Reinforcement Learningcited by 1,103
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
- 2017Mastering Chess and Shogi by Self-Play with a General Reinforcement Learning Algorithmcited by 734
- 2025STP: Self-play LLM Theorem Provers with Iterative Conjecturing and Provingcited by 79
- 2024Evaluating Language Models for Efficient Code Generationcited by 73
- 2024What's Wrong with Your Code Generated by Large Language Models? An Extensive Studycited by 53
- 2019AlphaStar: An Evolutionary Computation Perspectivecited by 50
- 2023The Larger They Are, the Harder They Fail: Language Models do not Recognize Identifier Swaps in Pythoncited by 29
- 2023Large Language Models of Code Fail at Completing Code with Potential Bugscited by 29
Built on by
Citing papers per year: 2026: 1.
1 paper.