NeurIPS 2026QuestionsPapersAreasAboutMarkdown

SpecBridge: Learning Natural-Language Formalization Plans for the Formal Specification Synthesis Task

Wenjie Zhang, Yun Lin, Zining He, Meiqi Wu, Jin Song Dong

NeurIPS page · OpenReview · Open on the map

Category: LLM Agents, Evals & Benchmarks › Verified Code Synthesis and Testing · Type: new method · Keywords: formal specification synthesis, natural-language to formal translation, reconstruction-guided learning, Natural-Language Formalization Plan, multi-layer evaluation, LLM Specification Alignment

Areas: Code & Coding Agents › Code Verification › Verified code generation; Evaluation & Benchmarks › Language Model and Agent Benchmarks › Formal Verification Benchmarks

Summary

SpecBridge introduces a reconstruction-guided formalization framework that learns Natural-Language Formalization Plans to bridge the gap between natural-language requirements and formal specifications, and employs a multi-layer evaluation protocol that combines LLM Specification Alignment, Test-Driven Computable Validation, and Test-Driven Proof Validation in Lean to assess correctness.

Explained to a 5-year-old

People write rules in words. Computers need rules written in a strict language. This is hard because the words and strict language are very different. We created a plan that helps turn words into strict rules by learning from examples. We also check the rules using simple tests and a special program. This makes the computer understand the rules better.

Explained to a 5-year-old, longer

When we tell a computer what to do, we usually write it in plain language, like "if you see a red ball, move it here." But computers need a very exact language to be sure they understand. This exact language is called a formal specification. Making this jump from plain words to exact language is hard because the two are very different. The paper looks at this problem, called formal specification synthesis. It tries to help computers write these exact specifications by first making a plan that captures the important parts of the requirement. This plan is learned by looking at many examples of how formal specifications are built. The plan is then used to generate new specifications. Checking if a specification is correct is also hard because proving it can take a long time. So the paper adds a way to check specifications using simple tests and a proof assistant. They compare the new method to old ways and see it works better. All of this helps computers understand what we want them to do more reliably.

For a technical reader

SpecBridge is a reconstruction-guided framework that learns intermediate Natural-Language Formalization Plans (NLFPs) from existing specifications, enabling systematic translation of requirements into formal proof-assistant languages. It augments this pipeline with a multi-layer evaluation protocol that leverages LLM-based alignment judges and test-driven validation-both computable and proof-based-to provide rapid, reliable correctness feedback. In experiments, the framework consistently outperforms few-shot chain-of-thought baselines across alignment, computable, and proof validation metrics. The approach is designed to be modular, allowing practitioners to integrate NLFPs and evaluation checks into existing verification workflows.

Problem

The Formal Specification Synthesis task faces a large representation gap between informal natural language and the rigorous structures required by proof assistants, and generated specifications are difficult to evaluate reliably.

Method

The approach learns Natural-Language Formalization Plans via reconstruction-guided pattern mining from formal specifications, and employs a multi-layer evaluation protocol that combines LLM Specification Alignment, Test-Driven Computable Validation, and Test-Driven Proof Validation in Lean to assess correctness.

Results

The approach achieves improvements of 6.1% on LLM Specification Alignment, 15.2% on Computable Validation Pass Rate, and 28.4% on Proof Validation Pass Rate over the baseline.

Contributions

It introduces a Natural-Language Formalization Plan as an intermediate representation learned via reconstruction-guided pattern mining, and proposes a multi-layer evaluation protocol that approximates specification correctness using LLM judging and test-driven validation in Lean.

Practical relevance

It makes formal specification synthesis more reliable and practical for software verification tasks.

Research questions this paper is counted under

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction