OccamLLM: Fast and Exact Language Model Arithmetic in a Single Step
Owen Dugan, Donato Jiménez-Benetó, Charlotte Loh, Zhuo Chen, Rumen Dangovski, Marin Soljacic
摘要
Despite significant advancements in text generation and reasoning, Large Language Models (LLMs) still face challenges in accurately performing complex arithmetic operations. Language model systems often enable LLMs to generate code for arithmetic operations to achieve accurate calculations. However, this approach compromises speed and security, and fine-tuning risks the language model losing prior capabilities. We propose a framework that enables exact arithmetic in a single autoregressive step, providing faster, more secure, and more interpretable LLM systems with arithmetic capabilities. We use the hidden states of a LLM to control a symbolic architecture that performs arithmetic. Our implementation using Llama 3 with OccamNet as a symbolic model (OccamLlama) achieves 100% accuracy on single arithmetic operations (), outperforming GPT 4o with and without a code interpreter. Furthermore, OccamLlama outperforms GPT 4o with and without a code interpreter on average across a range of mathematical problem solving benchmarks, demonstrating that OccamLLMs can excel in arithmetic tasks, even surpassing much larger models. We will make our code public shortly.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- ASyMOB: Algebraic Symbolic Mathematical Operations Benchmark 引用了 PAL: Program-aided Language Models
- Generative Agents: Interactive Simulacra of Human Behavior 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- PAL: Program-aided Language Models 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- L^2M: Mutual Information Scaling Law for Long-Context Language Modeling 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Toolformer: Language Models Can Teach Themselves to Use Tools 引用了 PAL: Program-aided Language Models
- L-CUBE: Isolating Long-Context Capacity from Knowledge with Controllable Mutual Information Scaling 引用了 L^2M: Mutual Information Scaling Law for Long-Context Language Modeling
引用它的顶会 Paper3
- LM: Mutual Information Scaling Law for Long-Context Language ModelingZhuo Chen, Oriol Mayné i Comas, Zhuotao Jin, Di Luo 等NeurIPS 2025 · 11 次引用
- ASyMOB: Algebraic Symbolic Mathematical Operations BenchmarkMichael Shalyt, Rotem Elimelech, Ido KaminerICML 2026 · 7 次引用
- L-CUBE: Isolating Long-Context Capacity from Knowledge with Controllable Mutual Information ScalingZhuo Chen, Oriol Mayné i Comas, Zhuotao Jin, Di Luo 等ICML 2026
它引用的 Paper10
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma 等NeurIPS 2022 · 22,562 次引用
- Toolformer: Language Models Can Teach Themselves to Use ToolsTimo Schick, Jane Dwivedi-Yu, Roberto Dessì, Roberta Raileanu 等NeurIPS 2023 · 5,989 次引用
- Generative Agents: Interactive Simulacra of Human BehaviorJoon Sung Park, Joseph C. O'Brien, Carrie Jun Cai, Meredith Ringel Morris 等UIST 2023 · 1,882 次引用
- Fast Inference from Transformers via Speculative DecodingYaniv Leviathan, Matan Kalman, Yossi MatiasICML 2023 · 1,472 次引用
- PAL: Program-aided Language ModelsLuyu Gao, Aman Madaan, Shuyan Zhou, Uri Alon 等ICML 2023 · 700 次引用
相关 Paper
- Exploring Mathematical Extrapolation of Large Language Models with Synthetic DataHaolong Li, Yu Ma, Yinqi Zhang, Chen Ye 等ACL Findings 2024 · 2 次引用
- Controlling Equational Reasoning in Large Language Models with Prompt InterventionsJordan Meadows, Marco Valentino, André FreitasAAAI 2025 · 4 次引用
- Frugal LMs Trained to Invoke Symbolic Solvers Achieve Parameter-Efficient Arithmetic ReasoningSubhabrata Dutta, Ishan Pandey, Joykirat Singh, Sunny Manchanda 等AAAI 2024 · 7 次引用
- Neuro-Symbolic Data Generation for Math ReasoningZenan Li, Zhi Zhou, Yuan Yao, Xian Zhang 等NeurIPS 2024 · 35 次引用
- Teaching Arithmetic to Small TransformersNayoung Lee, Kartik Sreenivasan, Jason D. Lee, Kangwook Lee 等ICLR 2024 · 128 次引用
