Abstract
We introduce a self-play framework for semantic equivalence in Haskell, utilizing formal verification to guide adversarial training between a generator and an evaluator. The framework leverages Liquid Haskell proofs for validating equivalence and execution-based counterexamples for inequivalence, organized via a difficulty-aware curriculum. To facilitate this, we release OpInstruct-HSx, a synthetic dataset of ≈ 28k validated Haskell programs. Empirical experiments show that our evaluator transfers effectively to downstream tasks, achieving up to 13.3pp accuracy gain on EquiBench and consistent gains on PySecDB. Ablation studies on the SEQ-SINQ regimes indicate that while inequivalence supervision provides data volume, equivalence proofs are uniquely responsible for the model’s reasoning capabilities. The entire training pipeline and dataset are publicly released on GitHub and Hugging Face respectively.
| Original language | English |
|---|---|
| Title of host publication | Findings of the Association for Computational Linguistics |
| Subtitle of host publication | ACL 2026 |
| Editors | Maria Liakata, Viviane P. Moreira, Jiajun Zhang, David Jurgens |
| Place of Publication | Kerrville, TX, USA |
| Publisher | Association for Computational Linguistics |
| Pages | 32273-32292 |
| Number of pages | 20 |
| ISBN (Electronic) | 9798891763951 |
| DOIs | |
| Publication status | Published - 1 Jul 2026 |
| Event | The 64th Annual Meeting of the Association for Computational Linguistics - Grand Hyatt Manchester, San Diego, United States Duration: 2 Jul 2026 → 7 Jul 2026 Conference number: 64 https://2026.aclweb.org/ |
Publication series
| Name | Annual Meeting of the Association for Computational Linguistics |
|---|---|
| Publisher | ACL |
| ISSN (Print) | 0736-587X |
Conference
| Conference | The 64th Annual Meeting of the Association for Computational Linguistics |
|---|---|
| Abbreviated title | ACL 2026 |
| Country/Territory | United States |
| City | San Diego |
| Period | 2/07/26 → 7/07/26 |
| Internet address |
Fingerprint
Dive into the research topics of 'Improving LLM code reasoning via semantic equivalence self-play with formal verification'. Together they form a unique fingerprint.Cite this
- APA
- Author
- BIBTEX
- Harvard
- Standard
- RIS
- Vancouver