AuXSpec: Learning to Autoformalize Program Specifications via Executable Postconditions
Not on the map. Why?
Abstract (arXiv)
Formal specifications define intended program behavior and underpin verification, but writing them in theorem provers such as Lean is slow and expertise-intensive, making specification a major bottleneck to scaling formally correct code. Autoformalization from natural-language problems is promising, yet training specification models requires scalable feedback on whether generated specifications capture intended behavior. Prior approaches obtain this feedback through explicit proofs or separately implemented code with formal correspondence proofs, both expensive. We introduce AuXSpec, a Lean framework that pairs declarative postconditions with executable counterparts, obtained through type class resolution when possible and otherwise defined separately with an equivalence proof. Test cases can then evaluate declarative specifications by execution, letting us use agreement as a reinforcement-learning reward. Using AuXSpec, we synthesize 3,037 LeetCode problems and expand training to 19.5K samples through expert iteration on Codeforces. Experiments show that training Qwen3.5-9B and Qwen3.8-27B with the execution-based reward improves SpecGen pass@4 on AuXSpec-Test 0.7% → 82.7% and 14.3% → 84.3%, and the 27B model outperforms all frontier models. On the out-of-domain Verina benchmark with its original prompts, both models improve 7.0% → 90.5% and 21.9% → 90.5% and surpass VeriSpecGen-30B-A3B, the prior state of the art among open-source specification models, on pass@1 (theirs 47.6% vs. ours 73.7% and 84.5%) and pass@4 (theirs 63.9% at pass@10 vs. ours 90.5%). We release the weights of the trained 9B and 27B models and the 3,037 problems with test cases, including the 300-problem AuXSpec-Test benchmark with expert review and correctness proofs for future evaluation. Models and data: https://huggingface.co/collections/eth-algopt/auxspec. Website: https://auxspec.org
Key facts. No citing papers in the map yet (data through 24 Nov 2026). Builds on 25 of its 97 references that are in the map. Submitted 16 Nov 2026.
Builds on
25 of 97 references.
References · 25
- 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 10,542
- 2021Evaluating Large Language Models Trained on Codecited by 8,938
- 2021Program Synthesis with Large Language Modelscited by 3,972
- 2026DeepSeek-V4: Towards Highly Efficient Million-Token Context Intelligencecited by 1,363
- 2023Textbooks Are All You Needcited by 625
- 2026Rethinking On-Policy Distillation of Large Language Models: Phenomenology, Mechanism, and Recipecited by 369
- 2025DeepSeek-Prover-V2: Advancing Formal Mathematical Reasoning via Reinforcement Learning for Subgoal Decompositioncited by 335
- 2025REINFORCE++: Stabilizing Critic-Free Policy Optimization with Global Advantage Normalizationcited by 273
- 2026Kimi K3: Open Frontier Intelligencecited by 233
- 2023TACO: Topics in Algorithmic COde generation datasetcited by 180
- 2025Skywork Open Reasoner 1 Technical Reportcited by 177
- 2025LeetCodeDataset: A Temporal Dataset for Robust Evaluation and Efficient Training of Code LLMscited by 86
13 more
- 2025KDRL: Post-Training Reasoning LLMs via Unified Knowledge Distillation and Reinforcement Learningcited by 50
- 2025Solving Formal Math Problems by Decomposition and Iterative Reflectioncited by 40
- 2026Demystifying On-Policy Distillation: Roles, Pathologies, and Regulationscited by 23
- 2026On-policy Distillation with Verifiable Rewardcited by 20
- 2026Mismatch Matters: On-Policy Distillation Beyond Token Agreementcited by 19
- 2026Distilled Reinforcement Learning for LLM Post-trainingcited by 12
- 2025Klear-CodeTest: Scalable Test Case Generation for Code Reinforcement Learningcited by 10
- 2025ATLAS: Automated Toolkit for Large-Scale Verified Code Synthesiscited by 8
- 2026EvolveCoder: Evolving Test Cases via Adversarial Verification for Code Reinforcement Learningcited by 8
- 2026CodeSpecBench: Benchmarking LLMs for Executable Behavioral Specification Generationcited by 8
- 2026Intent-aligned Formal Specification Synthesis via Traceable Refinementcited by 6
- 2026Verus-SpecGym: An Agentic Environment for Evaluating Specification Autoformalizationcited by 5
- 2026FVSpec: Real-World Property-Based Tests as Lean Challengescited by 1
Built on by
Not cited yet.