Intent-aligned Formal Specification Synthesis via Traceable Refinement
Not on the map. Why?
Abstract (arXiv)
Large language models are increasingly used to generate code from natural language, but ensuring correctness remains challenging. Formal verification offers a principled way to obtain such guarantees by proving that a program satisfies a formal specification. However, specifications are frequently missing in real-world codebases, and writing high-quality specifications remains expensive and expertise-intensive. We present VeriSpecGen, a traceable refinement framework that synthesizes intent-aligned specifications in Lean through requirement-level attribution and localized repair. VeriSpecGen decomposes natural language into atomic requirements and generates requirement-targeted tests with explicit traceability maps to validate generated specifications. When validation fails, traceability maps attribute failures to specific requirements, enabling targeted clause-level repairs. VeriSpecGen achieve 86.6% on VERINA SpecGen task using Claude Opus 4.5, improving over baselines by up to 31.8 points across different model families and scales. Beyond inference-time gains, we generate 343K training examples from VeriSpecGen refinement trajectories and demonstrate that training on these trajectories substantially improves specification synthesis by 62-106% relative and transfers gains to general reasoning abilities.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 29 of its 42 references that are in the map. First posted on arXiv 12 Apr 2026.
Builds on
29 of 42 references.
References · 29
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2025Qwen3 Technical Reportcited by 8,195
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,064
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,317
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2023Teaching Large Language Models to Self-Debugcited by 963
- 2023FireAct: Toward Language Agent Fine-tuningcited by 247
- 2024Arcee's MergeKit: A Toolkit for Merging Large Language Modelscited by 189
- 2024RedCode: Risky Code Execution and Generation Benchmark for Code Agentscited by 87
- 2024Inference-Aware Fine-Tuning for Best-of-N Sampling in Large Language Modelscited by 86
17 more
- 2024BOND: Aligning LLMs with Best-of-N Distillationcited by 73
- 2024Lean-STaR: Learning to Interleave Thinking and Provingcited by 64
- 2023Clover: Closed-Loop Verifiable Code Generationcited by 62
- 2024Towards AI-Assisted Synthesis of Verified Dafny Methodscited by 58
- 2023nl2spec: Interactively Translating Unstructured Natural Language to Temporal Logics with Large Language Modelscited by 57
- 2024Enchanting Program Specification Synthesis by Large Language Models using Static Analysis and Program Verificationcited by 55
- 2023Can Large Language Models Transform Natural Language Intent into Formal Method Postconditions?cited by 53
- 2024SpecGen: Automated Generation of Formal Program Specifications via Large Language Modelscited by 51
- 2023LM-Cocktail: Resilient Tuning of Language Models via Model Mergingcited by 44
- 2024AlphaVerus: Bootstrapping Formally Verified Code Generation through Self-Improving Translation and Treefinementcited by 33
- 2025VERINA: Benchmarking Verifiable Code Generationcited by 30
- 2024Towards Understanding the Characteristics of Code Generation Errors Made by Large Language Modelscited by 28
- 2025CLEVER: A Curated Benchmark for Formally Verified Code Generationcited by 27
- 2025From Informal to Formal -- Incorporating and Evaluating LLMs on Natural Language Requirements to Verifiable Formal Proofscited by 17
- 2025MergeME: Model Merging Techniques for Homogeneous and Heterogeneous MoEscited by 13
- 2025ClassInvGen: Class Invariant Synthesis using Large Language Modelscited by 11
- 2024AutoSpec: Automated Generation of Neural Network Specificationscited by 2
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2026P3: Joint Program-and-Proof Planning for Verified Code Generation
- 2025VeriEquivBench: An Equivalence Score for Ground-Truth-Free Evaluation of Formally Verifiable Code
- 2026LiveFMBench: Unveiling the Power and Limits of Agentic Workflows in Specification Generation
- 2026TraceDev: A Traceability-Driven Multi-agent Framework for Requirement-to-Code Development
- 2026SkillForge: Compositional Skill Synthesis with Verification-in-the-Loop for Generating Formally Verified Dafny Programs
- 2026Automating Formal Verification with Agent-Guided Tree Search
- 2026Inferring Code Correctness from Specification
- 2026Verus-SpecGym: An Agentic Environment for Evaluating Specification Autoformalization