AuXSpec: Learning to Autoformalize Program Specifications via Executable Postconditions
Organizations: HKUST(GZ) · Department of Computer Science, ETH Zurich · ETH AI Center · HKUST ·
Abstract
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
Figures & tables
| Work | Lang. | Specification validation | Correctness | Manual review | Training | |
|---|---|---|---|---|---|---|
| Reference | Method 1 | |||||
| Verina ( Ye et al., 2026a ) | Lean | Expert spec. | Proof testing | Partial | Benchmark (189) | None |
| Clever ( Thakur et al., 2025 ) | Lean | Expert spec. | Proof | Partial | Benchmark (161) | None |
| VeriSpecGen ( Ye et al., 2026b ) | Lean | Test cases | Proof LLM judge | – | Not reported | SFT |
| Coins ( Yang et al., 2026 ) | Rocq | Test cases | Proof, LLM judge | – | Benchmark (164) | None |
| ATLAS ( Baksys et al., 2025 ) | Dafny | Test cases | Verifier LLM judge | Not reported | SFT | |
| Task | Input | Output | |||||
|---|---|---|---|---|---|---|---|
| Description | Constraints | Cases | Broken | Diagnostics | Component | Test layers | |
| SpecGen | ✓ | ✓ | ✓ | Specification | L1 a L1 b L2 a L2 b | ||
| SpecGen-Repair | ✓ | ✓ | ✓ | ✓ | ✓ | Repaired specification | L1 a L1 b L2 a L2 b |
| CodeGen | ✓ | ✓ | Implementation | L3 | |||
| CodeGen-Repair | ✓ | ✓ | ✓ | ✓ | Repaired implementation | L3 | |
| Source | Problems | Difficulty | SFT | RL | AuXSpec -Test | ||||
| Easy | Medium | Hard | Problems | Samples | Problems | Tasks | Problems | ||
| LeetCode | 2,761 | 629 | 1,442 | 690 | 2,701 | 14,928 | 60 | 105 | 300 |
| Codeforces | 6,155 | 1,898 | 1,568 | 2,689 | 1,292 | 4,564 | 4,863 | 7,790 | 0 |
| AtCoder | 900 | 329 | 385 | 186 | 0 | 0 | 900 | 1,452 | 0 |
| Aizu | 988 | 382 | 391 | 215 | 0 | 0 | 988 | 1,545 | 0 |
| CodeChef | 536 | 187 | 214 | 135 | 0 | 0 | 536 | 920 | 0 |
| Model | SpecGen | CodeGen | SpecGen-Repair | CodeGen-Repair | ||||
|---|---|---|---|---|---|---|---|---|
| pass@1 | pass@4 | pass@1 | pass@4 | pass@1 | pass@4 | pass@1 | pass@4 | |
| Frontier Models | ||||||||
| Claude-Opus-5 | 57.7 | 81.3 | 93.0 | 98.3 | 83.0 | 90.1 | 86.9 | 95.1 |
| Claude-Sonnet-5 | 13.8 | 39.3 | 54.8 | 73.0 | 66.4 | 81.7 | 77.2 | 88.3 |
| GPT-5.6-Sol | 29.8 | 59.7 | 80.0 | 96.3 | 61.8 | 77.1 | 82.3 | 89.3 |
| GPT-5.6-Luna | 9.5 | 28.7 | 39.9 | 71.3 | 49.4 | 69.5 | 71.8 | 87.4 |
| Model | w/o tests | w/ tests | ||||||
|---|---|---|---|---|---|---|---|---|
| SpecGen | CodeGen | SpecGen | CodeGen | |||||
| pass@1 | pass@4 | pass@1 | pass@4 | pass@1 | pass@4 | pass@1 | pass@4 | |
| Frontier Models | ||||||||
| Claude-Opus-5 | 77.8 | 89.9 | 57.0 | 78.8 | 86.2 | 95.2 | 56.6 | 79.4 |
| Claude-Sonnet-5 | 57.8 | 85.7 | 20.2 | 46.6 | 64.8 | 90.5 | 17.9 | 41.8 |
| GPT-5.6-Sol | 42.1 | 73.5 | 16.3 | 35.4 | 85.1 | 97.9 | 20.8 | 40.7 |
Appendix figures & tables57 assets
Supplementary material from the paper’s appendix.
Appendix
| Term | Declaration | Description |
|---|---|---|
| Precondition | isValidInput | Executable predicate encoding the input constraints |
| Postcondition | <algo>_spec | Prop relating input and output |
| Executable postcondition | <algo>_check | Bool function of input and output |
| Postcondition equivalence theorem | <algo>_check_iff_spec | _check decides _spec on valid inputs |
| Implementation | <algo> | Total function computing the output |
| Correctness theorem | <algo>_correct | <algo> satisfies _spec on valid inputs |
| Layer | Component Under Test | Test Case | Assertion | Error Detected |
| L1 a | Precondition | Valid input | Accepts | Overly restrictive |
| L1 b | Invalid input | Rejects | Overly permissive | |
| L2 a | Executable postcondition | Valid input, correct output | Accepts | Incomplete |
| L2 b | Valid input, incorrect output | Rejects | Unsound | |
| L3 | Implementation | Valid input, expected output | Matches | Incorrect |
| L4 | Executable postcondition on implementation output | Valid input | Accepts | Implementation output rejected |
| Inference engine | vLLM |
|---|---|
| Temperature | 0.3 (evaluation), 0.7 (expert iteration and analyses) |
| Top- | 0.95 |
| Max new tokens | 16,384 |
| Samples per problem, compile@ and pass@ | 4 |
| Task | SFT | RL | AuXSpec -Test |
|---|---|---|---|
| SpecGen | 6,528 | 8,281 | 300 |
| SpecGen-Repair | 3,807 | 0 | 131 |
| CodeGen | 6,645 | 5,356 | 300 |
| CodeGen-Repair | 2,512 | 0 | 103 |
| Total | 19,492 | 13,637 | 834 |
| Source | SpecGen | SpecGen-Repair | CodeGen | CodeGen-Repair | Total |
|---|---|---|---|---|---|
| Synthesis pipeline | 4,786 | 2,479 | 4,475 | 1,100 | 12,840 |
| Expert iteration | 373 | 1,328 | 739 | 1,412 | 3,852 |
| Expert iteration, rewritten | 1,369 | 0 | 1,431 | 0 | 2,800 |
| Total | 6,528 | 3,807 | 6,645 | 2,512 | 19,492 |
| Round | Maximum repair rounds | Chains | Accepted chains | SFT samples |
|---|---|---|---|---|
| LeetCode | 8 | 5,239 | 2,268 | 3,610 |
| Codeforces | 8 | 3,778 | 1,248 | 2,137 |
| Last round | 16 | 3,208 | 1,444 | 521 |
| Scan over all records | – | – | – | 384 |
| Total | 12,225 | 4,960 | 6,652 |
| AuXSpec -Test | Verina | |||||||
| SpecGen | CodeGen | SpecGen | CodeGen | |||||
| Model | Resp. | Solved | Resp. | Solved | Resp. | Solved | Resp. | Solved |
| Frontier Models | ||||||||
| Claude-Opus-5 | 9.7 | 16.8 | 4.8 | 5.2 | 5.2 | 6.0 | 3.9 | 6.9 |
| Claude-Sonnet-5 | 10.2 | 74.4 | 7.3 | 13.4 | 4.4 | 6.9 | 9.6 | 53.7 |
| GPT-5.6-Sol | 3.9 | 13.2 | 2.8 | 3.5 | 2.6 | 3.0 | 3.1 | 14.7 |
| Model | AIME 25 | GPQA-Diamond | HumanEval+ | MBPP+ |
|---|---|---|---|---|
| Qwen3.5-9B | 62.3 | 80.2 | 86.6 | 65.3 |
| AuXSpec -9B-SFT | 25.6 (−36.7) | 62.2 (−18.0) | 63.9 (−22.7) | 59.9 (−5.4) |
| AuXSpec -9B-RL | 52.2 (−10.1) | 70.7 (−9.5) | 88.6 (+2.0) | 70.8 (+5.5) |
| Qwen3.8-27B | 84.1 | 84.5 | 92.5 | 80.4 |
| AuXSpec -27B-SFT | 31.0 (−53.1) | 62.9 (−21.6) | 79.0 (−13.5) | 71.1 (−9.3) |
| AuXSpec -27B-RL | 69.3 (−14.8) | 74.2 (−10.3) | 89.3 (−3.2) | 78.9 (−1.5) |
| Training data | Problems | Samples | SpecGen | CodeGen |
|---|---|---|---|---|
| LeetCode | 2,687 | 7,993 | 30.7 | 38.0 |
| + expert iteration round 1 | 2,733 | 11,811 | 39.3 | 52.0 |
| + Codeforces, expert iteration rounds 2 and 3 ( AuXSpec -27B-SFT) | 3,993 | 19,492 | 47.3 | 48.7 |
| Model | AuXSpec -Test | Verina SpecGen | ||||||
|---|---|---|---|---|---|---|---|---|
| SpecGen | CodeGen | All 4 tasks | Basic + Advanced | |||||
| p@1 | p@4 | p@1 | p@4 | p@1 | p@4 | p@1 | p@4 | |
| Qwen3.5-9B | 0.0 | 0.0 | 0.0 | 0.0 | 2.4 | 7.3 | 2.0 | 7.0 |
| SFT | 2.0 | 8.2 | 4.3 | 15.6 | 13.6 | 26.4 | 16.0 | 35.4 |
| CPT + SFT | 2.3 (+0.3) | 9.8 (+1.6) | 5.9 (+1.6) | 16.0 (+0.4) | 14.1 (+0.5) | 27.4 (+1.0) | 16.0 (0.0) | 37.6 (+2.2) |
| SFT, more data | 7.0 (+5.0) | 13.7 (+5.5) | 7.0 (+2.7) | 18.8 (+3.2) | 18.3 (+4.7) | 30.2 (+3.8) | 18.3 (+2.3) | 43.9 (+8.5) |
| 27B | 9B | |||
|---|---|---|---|---|
| SpecGen | CodeGen | SpecGen | CodeGen | |
| Groups | 8,346 | 5,384 | 7,461 | 5,279 |
| Nonzero variance, progressive (%) | 91.6 | 59.9 | 91.3 | 73.0 |
| Nonzero variance, binary (%) | 59.4 | 41.9 | 50.9 | 49.3 |
| Groups without a passing rollout | 3,048 | 1,309 | 3,497 | 1,743 |
| nonzero variance, progressive (%) | 87.9 | 74.3 | 86.2 | 71.8 |
| SpecGen | CodeGen | ||||||
|---|---|---|---|---|---|---|---|
| Outcome | Reward | 27B | 9B | Outcome | Reward | 27B | 9B |
| Malformed format or no code block | 0 | 0.30 | 1.70 | Malformed format or no code block | 0 | 0.22 | 1.17 |
| Special-cased or copied test cases | 0 | 0.17 | 0.08 | Special-cased or copied test cases | 0 | 0.66 | 1.41 |
| Unchanged repair 1 | 0 | 0.36 | 0.67 | Unchanged repair 1 | 0 | 0.73 | 0.59 |
| Fewer tests than required | 0.1 | 0.61 | 0.52 | Fewer tests than required | 0.1 | 0.19 | 0.18 |
| Fails compilation | 0.1 | 29.16 | 38.70 | Fails compilation | 0.1 | 12.42 | 17.37 |
| Shortcut Failure | Final Value | Advantage | Alternative Value | Advantage |
|---|---|---|---|---|
| Tautological specification | 0.1 | Negative in every group | 0.3 | Positive in groups without a full-score rollout |
| Failed test case alignment | 0.1 | Positive for 0.8% of rollouts | 0.2 | Positive for 58.3% of rollouts |
| Partial Progress | Reward | Negative Advantage From | Effect |
|---|---|---|---|
| Enumerative specification | 0.4 | 3/16 | Repair rounds turn 74.1% (27B) and 54.6% (9B) of enumerative specifications into declarative ones that pass all stages. |
| Slow implementation | 0.5 | 2/16 | Slow implementations rise from 14.5% of correct CodeGen rollouts in steps 1 to 20 to 67.4% in steps 81 to 100 and fall to 0.4% by the end of the 27B run. |
| Problems | Fraction (%) | |
|---|---|---|
| Solved by both models | 256 | 85.3 |
| Solved only by AuXSpec -27B-SFT | 1 | 0.3 |
| Solved only by AuXSpec -27B-RL | 33 | 11.0 |
| Solved by neither model | 10 | 3.3 |
| Model | AuXSpec -Test | Verina SpecGen | ||||||
|---|---|---|---|---|---|---|---|---|
| SpecGen | CodeGen | All | Advanced | |||||
| p@1 | p@4 | p@1 | p@4 | p@1 | p@4 | p@1 | p@4 | |
| AuXSpec -9B-SFT | 9.6 | 24.3 | 13.5 | 30.7 | 30.3 | 61.4 | 17.6 | 42.0 |
| + OPD | 2.3 (−7.3) | 5.3 (−19.0) | 15.2 (+1.7) | 27.7 (−3.0) | 29.1 (−1.2) | 43.9 (−17.5) | 8.3 (−9.3) | 18.5 (−23.5) |
| AuXSpec -27B-SFT * (teacher) | 20.4 | 47.0 | 23.1 | 44.3 | 49.1 | 82.5 | 41.4 | 79.0 |
| Checkpoint | SpecGen | CodeGen | SpecGen-Repair | CodeGen-Repair | ||||
|---|---|---|---|---|---|---|---|---|
| pass@1 | pass@4 | pass@1 | pass@4 | pass@1 | pass@4 | pass@1 | pass@4 | |
| Ours, Qwen3-4B-Instruct-2507 | ||||||||
| Base Model | 0.0 | 0.0 | 2.8 | 4.0 | 6.5 | 8.4 | 4.1 | 6.8 |
| SFT | 1.2 | 4.0 | 7.2 | 15.3 | 49.0 | 72.5 | 48.5 | 66.0 |
| RL step 20 | 3.8 | 11.3 | 15.2 | 34.3 | 52.1 | 69.5 | 51.2 | 72.8 |
| RL step 40 | 6.8 | 17.7 | 23.8 | 45.7 | 54.6 | 72.5 | 54.6 | 74.8 |
| Model | w/o tests | w/ tests | ||||||
|---|---|---|---|---|---|---|---|---|
| SpecGen | CodeGen | SpecGen | CodeGen | |||||
| pass@1 | pass@4 | pass@1 | pass@4 | pass@1 | pass@4 | pass@1 | pass@4 | |
| Ours, Qwen3-4B-Instruct-2507 | ||||||||
| Base Model | 0.0 | 0.0 | 0.4 | 0.5 | 0.0 | 0.0 | 0.0 | 0.0 |
| SFT | 6.9 | 24.9 | 21.6 | 54.5 | 12.4 | 35.4 | 21.8 | 53.4 |
| RL step 20 | 23.0 | 54.5 | 50.3 | 79.4 | 25.3 | 57.7 | 51.3 | 76.2 |
| Model | Step | Training prompts | SpecGen | CodeGen | SpecGen-Repair | CodeGen-Repair | ||||
|---|---|---|---|---|---|---|---|---|---|---|
| pass@1 | pass@4 | pass@1 | pass@4 | pass@1 | pass@4 | pass@1 | pass@4 | |||
| AuXSpec -9B-SFT | 0 | 0 | 10.1 | 24.3 | 13.1 | 28.3 | 56.7 | 76.3 | 59.5 | 80.6 |
| AuXSpec -9B-RL | 70 | 2,149 | 21.8 | 51.3 | 43.5 | 80.7 | 54.3 | 84.7 | 55.6 | 86.4 |
| 140 | 4,162 | 34.9 | 62.0 | 65.0 | 89.0 | 49.6 | 84.7 | 55.3 | 92.2 | |
| 210 | 6,186 | 46.7 | 71.7 | 74.9 | 92.0 | 67.4 | 87.0 | 71.1 | 90.3 | |
| w/o test execution | 25 | 961 | 12.2 | 28.0 | 21.8 | 40.0 | 59.4 | 80.9 | 60.0 | 77.7 |
| Model | Step | Training prompts | SpecGen, w/o tests | CodeGen, w/o tests | SpecGen, w/ tests | CodeGen, w/ tests | ||||
|---|---|---|---|---|---|---|---|---|---|---|
| pass@1 | pass@4 | pass@1 | pass@4 | pass@1 | pass@4 | pass@1 | pass@4 | |||
| AuXSpec -9B-SFT | 0 | 0 | 34.9 | 65.6 | 36.5 | 71.4 | 37.3 | 69.8 | 38.0 | 70.4 |
| AuXSpec -9B-RL | 70 | 2,149 | 52.1 | 82.0 | 75.8 | 93.7 | 52.4 | 86.2 | 80.4 | 97.4 |
| 140 | 4,162 | 67.3 | 91.5 | 86.4 | 97.4 | 71.7 | 92.1 | 87.6 | 98.4 | |
| 210 | 6,186 | 73.4 | 92.1 | 89.2 | 96.8 | 84.8 | 97.4 | 90.1 | 96.8 | |
| w/o test execution | 25 | 961 | 47.6 | 70.9 | 63.9 | 84.7 | 48.8 | 75.1 | 63.9 | 86.2 |
| Step | Count | Note |
|---|---|---|
| Queries generated | 23,608 | Definition, theorem, and instance queries |
| Candidates returned | 92,104 | Search hits |
| Declarations elaborated | 83,679 | Deduplicated, #check against the pinned toolchain |
| Declarations present | 79,126 | 5.4% of elaborated declarations were absent |
| Reviewed | 17,372 | 1,729 dropped as irrelevant |
| Stored | 13,191 | Last record per problem, 4.2 per problem |
| Judge | Verdicts | Rejections | Problems rejected | Accepted after rejection |
|---|---|---|---|---|
| Faithfulness | 3,237 | 123 (3.8%) | 112 | 112 |
| Non-tautology | 3,143 | 69 (2.2%) | 61 | 61 |
| Completeness | 3,159 | 55 (1.7%) | 42 | 42 |
| Implementation | 3,667 | 717 (19.6%) | 414 | 281 |
| Outcome | Problems | Note |
|---|---|---|
| Succeeded | 3,037 | Compiled, all frozen layers pass |
| Easy | 714 | Of 719 seeds, 99.3% |
| Medium | 1,588 | Of 1,622 seeds, 97.9% |
| Hard | 735 | Of 768 seeds, 95.7% |
| Failed | 72 | Terminal exits, stalled runs, and later withdrawals |
| Account | Calls | Tokens In | Tokens Out | Models | Spend |
| Retrieval | 7,421 | 32M | 71M | DeepSeek-V4-Flash | $24 |
| Test corpus | 43,880 | 109M | 341M | DeepSeek-V4-Flash | $98 |
| Formalization | 59,337 | 182M | 290M | Kimi-K3 (generation, repair), DeepSeek-V4-Pro (planning), DeepSeek-V4-Flash (judging) | $2,024 |
| Reasoning traces | 12,320 | 209M | 164M | DeepSeek-V4-Flash | $75 |
| Model comparisons | 3,183 | 20M | 20M | Claude-Opus-5, DeepSeek-V4-Flash, DeepSeek-V4-Pro, GLM-5.2, Kimi-K3 | $184 |
| Pipeline experiments | 435 | 3M | 2M | Claude-Opus-5, DeepSeek-V4-Flash | $36 |
| Role | Total Calls | Per Problem |
|---|---|---|
| Plan | ||
| Implementation sketch | 4,223 | 1.34 |
| Implementation plan check | 4,182 | 1.32 |
| Plan check | 3,598 | 1.14 |
| Specification sketch | 3,294 | 1.04 |
| Input types and interface | 3,081 | 0.97 |
| Model | Pass | Straight | Repairs | Tokens | Cost | Time |
|---|---|---|---|---|---|---|
| Claude-Opus-5 | 30/30 | 23 | 7 | 33k | $0.73 | 380s |
| Claude-Sonnet-5 | 29/30 | 13 | 28 | 36k | $0.64 | 386s |
| Kimi-K3 | 30/30 | 9 | 37 | 35k | $0.57 | 732s |
| GLM-5.2 | 30/30 | 10 | 60 | 112k | $0.69 | 1335s |
| DeepSeek-V4-Pro | 28/30 | 8 | 36 | 83k | $0.24 | 958s |
| DeepSeek-V4-Flash | 28/30 | 9 | 40 | 171k | $0.23 | 1830s |
| Model | Parsed | Clean |
|---|---|---|
| Kimi-K3 | 20 (67%) | 16 (53%) |
| DeepSeek-V4-Pro | 29 (97%) | 22 (73%) |
| DeepSeek-V4-Flash | 30 (100%) | 18 (60%) |
| Model | Counter | Mismatch | Infeasible | Ungrounded | Shallow | Search |
|---|---|---|---|---|---|---|
| Kimi-K3 | 2 | 0 | 1 | 0 | 1 | 0 |
| DeepSeek-V4-Pro | 0 | 0 | 2 | 0 | 5 | 0 |
| DeepSeek-V4-Flash | 1 | 0 | 4 | 0 | 7 | 0 |
| Failure Mode | V4-Flash | V4-Pro | Both | Agreement |
|---|---|---|---|---|
| Counter | 3 | 5 | 1 | 14% |
| Mismatch | 0 | 3 | 0 | 0% |
| Infeasible | 7 | 6 | 5 | 62% |
| Ungrounded | 0 | 0 | 0 | n/a |
| Shallow | 13 | 15 | 12 | 75% |
| Search | 0 | 0 | 0 | n/a |
| Form | #Problems | Easy | Medium | Hard | Median Lines | P90 Lines | Validity Used |
|---|---|---|---|---|---|---|---|
| Decidable form | 1,079 | 400 | 526 | 153 | 0 | 0 | 0 |
| Separate definition | 1,958 | 314 | 1,062 | 582 | 112 | 394 | 868 |
| Enumeration | 1,607 | 204 | 883 | 520 | 118 | 409 | 736 |
| Reformulation | 293 | 90 | 153 | 50 | 95 | 333 | 104 |
| Bound | 58 | 20 | 26 | 12 | 92 | 298 | 28 |
| Difficulty | #Problems | Proof Length (lines) | Lemmas Created | Compilations | Tokens | Tool Calls | Time (s) | ||
|---|---|---|---|---|---|---|---|---|---|
| Median | P90 | Median | Passed at 1st | ||||||
| Easy | 314 | 58 | 203 | 5 | 2 | 86% | 118k | 24 | 369 |
| Medium | 1,062 | 121 | 394 | 11 | 2 | 74% | 128k | 26 | 484 |
| Hard | 582 | 142 | 486 | 21 | 1 | 86% | 149k | 30 | 604 |
| All | 1,958 | 112 | 394 | 13 | 2 | 78% | 128k | 26 | 473 |
| Component | Easy | Medium | Hard | Total |
|---|---|---|---|---|
| Precondition | 1 | 0 | 2 | 3 |
| Postcondition | 4 | 10 | 5 | 19 |
| Executable postcondition | 2 | 2 | 6 | 10 |
| #Problems | 7 | 12 | 12 | 31 |
| Model | Accepted | Fixed Tactics | Proving Loop | Counter- example | Float | Not Sampled | Estimated Mismatch (%) |
| AuXSpec -27B-RL | 253 | 42 | 209 | 2 | 0 | 0 | 0.8 |
| AuXSpec -9B-RL | 248 | 60 | 186 | 1 | 1 | 0 | 0.4 |
| AuXSpec -27B-SFT | 122 | 34 | 39 | 1 | 0 | 48 | 1.8 |
| AuXSpec -9B-SFT | 73 | 23 | 39 | 1 | 0 | 10 | 1.7 |
| Claude-Opus-5 | 244 | 93 | 40 | 0 | 0 | 111 | 0.0 |
| Claude-Sonnet-5 | 118 | 47 | 40 | 0 | 0 | 31 | 0.0 |
| Component | Question | Recorded as an Error When |
|---|---|---|
| Precondition | Does it admit exactly the inputs the constraints describe? | An input the constraints admit is rejected, or one they exclude is accepted |
| Postcondition | Does it carry each condition the description places on the answer? | A clause of the description is missing and a value the description rejects is admitted, or a correct output is rejected |
| Executable postcondition | Does it accept the same outputs as the postcondition on all valid inputs? | A bound is too small and an object the postcondition ranges over is not reached, or an object outside it is accepted |
| Implementation | Does it satisfy the postcondition, terminate without a fuel parameter, and run within the constraints? | A valid input yields a rejected output, termination rests on a fuel parameter, or the cost does not survive the largest admitted input |
| Errors by Component | Problems | |||||
|---|---|---|---|---|---|---|
| Difficulty | #Problems | Precondition | Postcond. | Exec. Postcond. | Implementation | With Errors |
| Easy | 72 | 2 (2.8%) | 4 (5.6%) | 0 | 1 (1.4%) | 7 (9.7%) |
| Medium | 155 | 1 (0.6%) | 5 (3.2%) | 0 | 6 (3.9%) | 11 (7.1%) |
| Hard | 73 | 0 | 1 (1.4%) | 0 | 3 (4.1%) | 4 (5.5%) |
| Total | 300 | 3 (1.0%) | 10 (3.3%) | 0 | 10 (3.3%) | 22 (7.3%) |
| Detection | #Problems |
|---|---|
| Review only (theorem proved against the wrong statement) | 9 |
| Review and proof attempt | 3 |
| Proof attempt only | 2 |
| Total | 14 |
| Model | Reviewed | Correct | Errors | Errors | Errors |
|---|---|---|---|---|---|
| AuXSpec -27B-RL | 50 | 43 (86.0%) | 7 | 0 | 0 |
| AuXSpec -9B-RL | 50 | 47 (94.0%) | 3 | 0 | 0 |
| Total | 100 | 90 (90.0%) | 10 | 0 | 0 |
Autoformalization
Autoformalization converts natural-language mathematics, proofs, and specifications into machine-checkable formal languages.
See all 130 papers