SymCode: A Neurosymbolic Approach to Mathematical Reasoning via Verifiable Code Generation

Sina Bagheri Nezhad, Yao Li, Ameeta Agrawal


Abstract
Large Language Models (LLMs) often struggle with complex mathematical reasoning, where prose-based generation leads to unverified and arithmetically unsound solutions. Current prompting strategies like Chain of Thought still operate within this unreliable medium, lacking a mechanism for deterministic verification. To address these limitations, we introduce SymCode, a neurosymbolic framework that reframes mathematical problem-solving as a task of verifiable code generation using the SymPy library. We evaluate SymCode on challenging benchmarks, including MATH-500 and OlympiadBench, demonstrating significant accuracy improvements of up to 13.6 percentage points over baselines. Our analysis shows that SymCode is not only more token-efficient but also fundamentally shifts model failures from opaque logical fallacies towards transparent, programmatic errors. By grounding LLM reasoning in a deterministic symbolic engine, SymCode represents a key step towards more accurate and trustworthy AI in formal domains.
Anthology ID:
2026.findings-eacl.76
Volume:
Findings of the Association for Computational Linguistics: EACL 2026
Month:
March
Year:
2026
Address:
Rabat, Morocco
Editors:
Vera Demberg, Kentaro Inui, Lluís Marquez
Venue:
Findings
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
1489–1503
Language:
URL:
https://preview.aclanthology.org/ingest-eacl/2026.findings-eacl.76/
DOI:
Bibkey:
Cite (ACL):
Sina Bagheri Nezhad, Yao Li, and Ameeta Agrawal. 2026. SymCode: A Neurosymbolic Approach to Mathematical Reasoning via Verifiable Code Generation. In Findings of the Association for Computational Linguistics: EACL 2026, pages 1489–1503, Rabat, Morocco. Association for Computational Linguistics.
Cite (Informal):
SymCode: A Neurosymbolic Approach to Mathematical Reasoning via Verifiable Code Generation (Bagheri Nezhad et al., Findings 2026)
Copy Citation:
PDF:
https://preview.aclanthology.org/ingest-eacl/2026.findings-eacl.76.pdf
Checklist:
 2026.findings-eacl.76.checklist.pdf