ACED: Reference-Anchored Aggregation of Natural-Language and Executable Evidence for Mathematical Reasoning
Organizations: 1Duke Kunshan University · 2The University of Hong Kong
Abstract
Natural-language self-consistency and executable programs provide complementary test-time evidence for mathematical reasoning, yet either channel may support the same semantic error. Thus we propose ACED, a reference-anchored framework that treats the self-consistency answer as the default and executable outputs as supporting evidence rather than interchangeable votes. ACED converts source-specific answer counts into smoothed supports, combines them through a weighted logarithmic pool, and overrides the reference only when a calibrated relative-evidence margin is exceeded. The same rule supports both candidate selection and admission of executable-only answers. Across five math word-problem benchmarks, ACED matches or outperforms the corresponding baselines. On GSM8K, ACED-CANDIDATE recovers 89.7% of the attainable candidate-set gain with only three damaging overrides, while ACED-ALL reaches 86.9% accuracy versus 82.6% for direct Program-of-Thought aggregation. These results show that preserving evidence provenance enables more reliable integration of natural-language and executable reasoning.
Figures & tables
| Answer | NL support | Program support | Pooled count |
|---|---|---|---|
| 9 | 0 | 9 | |
| 1 | 7 | 8 | |
| (each) | 0 | 1 | 1 |
| (a) Five benchmarks NL reference: Qwen2.5-0.5B-Instruct | |||||||
|---|---|---|---|---|---|---|---|
| Accuracy (%) | GSM8K overrides | ||||||
| Method | GSM8K | SVAMP | ASDiv | MultiArith | MAWPS | Fix | Damage |
| SC@16 (reference) | 31.8 | 54.0 | 59.0 | 97.8 | 84.1 | – | – |
| Candidate-only selection | |||||||
| ACR | 31.1 | 50.7 | 58.6 | 96.7 | 84.1 | 72 | 81 |
| ProVe | 49.6 | 68.0 | 71.1 | 100.0 | 90.7 | 244 | 9 |
| Method | Correct | Tokens / question | Time / question (s) | Speedup | |||
| Exact | Weighted | Generation | Execution | Wall | |||
| Lower-cost comparison | |||||||
| PoT@32 | 1098 | 7631.2 | 53418.1 | 3.93 0.35 | 0.44 0.01 | 4.37 0.34 | 1.00 |
| ACED-ALL@8 | 1122 | 6187.9 | 21241.0 | 2.51 0.22 | 0.12 0.01 | 2.63 0.21 | 1.66 |
| Higher-accuracy comparison | |||||||
| PoT@64 | 1131 | 15931.1 | 111517.4 | 7.34 0.71 | 0.88 0.02 | 8.21 0.69 | 1.00 |
| Configuration | Correct | Fix | Damage |
|---|---|---|---|
| Direct PoT pool + executable majority | 1090 | 692 | 21 |
| ACED witness pool + executable majority | 1143 | 733 | 9 |
| ACED witness pool + ACED selector | 1146 | 733 | 6 |
Appendix figures & tables24 assets
Supplementary material from the paper’s appendix.
Appendix
| Input: problem ; budgets ; domain ; smoothing ; frozen . |
| Output: selected answer . |
| Item | Value |
|---|---|
| Calibration data | 500 GSM8K training examples, comprising 350 conflict and 150 non-conflict cases, selected with seed 13 and disjoint from the test sets. |
| Evidence budgets | , with for the reported settings. |
| Evidence weights | |
| Thresholds | |
| Selection criterion | Highest correct count among settings with at most 10 damaging overrides, or of the full split. |
| Tie resolution | Fixed representatives in Table 6 , chosen before test evaluation. |
| Calibration ( ) | GSM8K test ( ) | |||||||||
| Setting | Correct | Fix | Damage | Overrides | Correct | Fix | Damage | Overrides | ||
| Cand@16 | 4 | 0 | 290 | 137 | 0 | 158 | 769 | 353 | 3 | 421 |
| Cand@32 | 2 | 0 | 291 | 138 | 0 | 161 | 773 | 357 | 3 | 437 |
| All@8 | 4 | 1 | 473 | 324 | 4 | 350 | 1122 | 710 | 7 | 841 |
| All@16 | 4 | 0 | 472 | 323 | 4 | 350 | 1146 | 733 | 6 | 864 |
| All@32 | 4 | 1 | 473 | 324 | 4 | 350 | 1151 | 738 | 6 | 867 |
| Calibration setting | 0% cap | 1–5% caps |
|---|---|---|
| Cand@16 | 290/137/0 | 290/137/0 |
| Cand@32 | 291/138/0 | 291/138/0 |
| All@8 | 327/174/0 | 473/324/4 |
| All@16 | 341/188/0 | 472/323/4 |
| All@32 | 288/135/0 | 473/324/4 |
| Domain / | Correct | Fix | Damage |
|---|---|---|---|
| Cand / 16 | 769–769 | 353–353 | 3–3 |
| Cand / 32 | 771–773 | 356–357 | 3–4 |
| All / 8 | 1109–1126 | 697–714 | 7–7 |
| All / 16 | 1134–1146 | 721–733 | 6–6 |
| All / 32 | 1144–1151 | 731–738 | 6–6 |
| 0 | 0.25 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | |
| ACED-CANDIDATE@ | ||||||||
| 0.25 | 269/116/0 | 234/81/0 | 188/35/0 | 153/0/0 | 153/0/0 | 153/0/0 | 153/0/0 | 153/0/0 |
| 0.5 | 290/137/0 | 290/137/0 | 290/137/0 | 223/70/0 | 153/0/0 | 153/0/0 | 153/0/0 | 153/0/0 |
| 1 | 290/137/0 | 290/137/0 | 290/137/0 | 290/137/0 | 290/137/0 | 274/121/0 | 153/0/0 | 153/0/0 |
| 2 | 290/137/0 | 290/137/0 | 290/137/0 | 290/137/0 | 290/137/0 | 290/137/0 | 290/137/0 | 290/137/0 |
| Method | GSM8K | SVAMP | ASDiv | MultiArith | MAWPS |
|---|---|---|---|---|---|
| Candidate-only selection | |||||
| SC@16 | 419/1319 | 81/150 | 151/256 | 88/90 | 808/961 |
| ACR | 410/1319 | 76/150 | 150/256 | 87/90 | 808/961 |
| ProVe | 654/1319 | 102/150 | 182/256 | 90/90 | 872/961 |
| ACED-CANDIDATE@16 | 769/1319 | 119/150 | 207/256 | 90/90 | 896/961 |
| All-feasible selection | |||||
| Comparison | A-only | B-only | Exact | |
|---|---|---|---|---|
| ACED-ALL@8 vs. PoT@8 | 101 | 58 | +43 | |
| ACED-ALL@16 vs. PoT@16 | 105 | 49 | +56 | |
| ACED-ALL@32 vs. PoT@32 | 103 | 50 | +53 |
| Dataset | Method | Correct | Fix | Damage |
|---|---|---|---|---|
| SVAMP | PoT@16 | 136/150 | 58 | 3 |
| ACED-ALL@16 | 137/150 | 60 | 4 | |
| ASDiv | PoT@16 | 217/256 | 71 | 5 |
| ACED-ALL@16 | 222/256 | 73 | 2 | |
| MAWPS | PoT@16 | 916/961 | 124 | 16 |
| ACED-ALL@16 | 926/961 | 126 | 8 |
| Decision rule | Correct | Fix | Damage | |
|---|---|---|---|---|
| 8 | Executable majority | 1124 | 716 | 11 |
| 8 | ACED selector | 1122 | 710 | 7 |
| 16 | Executable majority | 1143 | 733 | 9 |
| 16 | ACED selector | 1146 | 733 | 6 |
| 32 | Executable majority | 1147 | 738 | 10 |
| 32 | ACED selector | 1151 | 738 | 6 |
| Comparison | A-only | B-only | McNemar |
|---|---|---|---|
| ACED-CANDIDATE@16 vs. Strong-SC@16 | 117 | 18 | |
| ACED-ALL@16 vs. Strong-SC@16 | 152 | 36 | |
| ACED-ALL@16 vs. ACED-CANDIDATE@16 | 39 | 22 | 0.0396 |
| PoT@16 vs. Strong-SC@16 | 129 | 92 | 0.0153 |
| PoT@32 vs. Strong-SC@16 | 136 | 91 | 0.00341 |
| Method | 3 | 13 | 21 | Mean std |
|---|---|---|---|---|
| PoT@8 | 1076 | 1079 | 1078 | 1077.7 1.5 |
| PoT@16 | 1088 | 1090 | 1089 | 1089.0 1.0 |
| PoT@32 | 1096 | 1098 | 1097 | 1097.0 1.0 |
| ACED-CANDIDATE@16 | 757 | 769 | 765 | 763.7 6.1 |
| ACED-ALL@8 | 1119 | 1122 | 1124 | 1121.7 2.5 |
| ACED-ALL@16 | 1141 | 1146 | 1148 | 1145.0 3.6 |
| Method | Correct | Tokens/q | W-gen/q | W-total/q | Gen s/q | Exec s/q | Wall s/q |
|---|---|---|---|---|---|---|---|
| Direct executable aggregation | |||||||
| PoT@32 | 1098 | 7631.2 | 16837.1 | 53418.1 | 3.93 0.35 | 0.44 0.01 | 4.37 0.34 |
| PoT@64 | 1131 | 15931.1 | 38355.5 | 111517.4 | 7.34 0.71 | 0.88 0.02 | 8.21 0.69 |
| Natural-language and executable evidence | |||||||
| ACED-ALL@8 | 1122 | 6187.9 | 10245.3 | 21241.0 | 2.51 0.22 | 0.12 0.01 | 2.63 0.21 |
| ACED-ALL@16 | 1146 | 8979.1 | 19686.2 | 40779.1 | 3.42 0.31 | 0.22 0.00 | 3.64 0.31 |
| Setting | Value |
|---|---|
| NL candidate model | Qwen/Qwen2.5-0.5B-Instruct |
| Stronger SC reference model | Qwen/Qwen2.5-7B-Instruct |
| Code witness / direct PoT model | Qwen/Qwen2.5-Coder-7B-Instruct |
| Reported sample counts | and |
| Generation limits | 256 maximum new tokens for natural-language candidates and 192 for ACED witnesses and direct PoT programs |
| Code prompt limit | 1,536 tokens for code-generation prompts |
| Component | Implementation entry point |
|---|---|
| NL prompt and extraction | src/phase_a_tango.py : render_prompt , extract_gsm8k_answer , normalize_numeric_answer |
| Direct PoT prompt | src/exact_acv/exact_acv.py : build_solver_prompt , and src/race_acv/prompt_program_baseline.py : build_program_prompt |
| ACED witness prompt | src/race_acv/prompt_program_baseline.py : build_program_prompt , style repair_problem |
| ProVe prompt | src/race_acv/prove_baseline.py : build_prove_prompt |
| ACR prompt | src/race_acv/acr_option_baseline.py : build_prompt |
| Program extraction, filtering, execution | src/exact_acv/exact_acv.py : extract_code , is_suspicious_program , execute_code |
| Interface | Template text |
|---|---|
| (a) Problem-only interfaces | |
| NL candidate generator | Solve the following math problem. Reason step by step and put the final answer at the end. Problem: {question}. |
| PoT | You are given a grade-school math word problem. Write Python code that defines a function solve() . Rules: compute the answer from the quantities in the problem; do not hard-code the final answer; use only arithmetic and optional math, fractions, or decimal; return a single number from solve() ; output only Python code. Problem: {question}. Python code: |
| ACED witness | Solve this math word problem independently. Write only Python code. The code must define solve() and return one numeric answer. Before coding, audit the wording of the final question and identify the exact requested quantity. Then define variables and equations from the problem and compute that requested quantity. Do not hard-code the final answer. Do not return a subtotal, rate, leftover, or intermediate value unless it is exactly what is asked. Problem: {question}. Python code: |
| (b) Candidate-conditioned interfaces | |
| ProVe | You are verifying a grade-school math solution by translating its arithmetic into Python. Write only Python code. The code must define solve() and return one numeric answer. Follow the quantitative steps in the provided solution. Do not simply return a final literal answer; derive it from the quantities and operations. Problem: {question}. Candidate solution: {candidate_solution}. Python code: |
| Item | Setting |
|---|---|
| Baseline type | Answer-option rescoring baseline |
| Publication | DOI: 10.3390/app15179587 |
| Candidate domain | Candidate-only, stored natural-language answer clusters |
| Teacher model | Qwen/Qwen2.5-Coder-7B-Instruct code-model teacher |
| Options / votes | Top answer options and 5 teacher votes per question |
| Weight and rule | Weight 0.25. Select by . |
| Argument | Value |
|---|---|
| Repository | https://github.com/declare-lab/prove |
| Commit | a5a8f3feabf05b340df4d9cf d72b2bf64bec6345 |
| Entry / pipeline | eval.py , pipeline prove |
| Dataset / samples | gsm8k , num_cot=16 |
| CoT generation | cot template, qwen2_05b , temperature 0.7, max tokens 1024 |
| Answer extraction | extract template, qwen25coder_7b , temperature 0.0, max tokens 32 |
| Output category | NL | ACED | PoT |
| Outputs total | 21,104 | 42,208 | 42,208 |
| Excluded before | 0 | 5,394 | 2,478 |
| Retained rows ( or ) | 21,104 | 36,814 | 39,730 |
| Numeric answer rows | 21,104 | 34,461 | 39,673 |
| Fallback non-numeric keys | 0 | 0 | 0 |
| No-answer null-bucket rows | 0 | 2,353 | 57 |
| Sandbox component | Allowed interface |
|---|---|
| Imports | math , fractions , and decimal |
| Builtins | abs , min , max , sum , round , range , len , float , int , str , pow , and print |
| Primary entry point | Callable solve() returning the answer |
| Fallback result names | result , answer , ans , total , total_cost , final , and final_answer |
| Execution limit | 2.0 seconds per program |
| Item | Configuration |
|---|---|
| GPU infrastructure | NVIDIA A100 |
| GPU memory | 80 GB per GPU |
| GPUs per timing job | 1 |
| Numerical precision | bf16 |
| Main NL model | Qwen2.5-0.5B-Instruct (nominally 0.5B parameters) |
| Stronger NL model | Qwen2.5-7B-Instruct (nominally 7B parameters) |
| Package | Version |
|---|---|
| PyTorch | 2.7.1 |
| Transformers | 4.57.1 |
| Accelerate | 1.13.0 |
| Datasets | 4.8.5 |
| NumPy | 2.2.6 |
| Pandas | 2.3.3 |