Beyond Append-Only Decoding: A Recursive Edit-Based Encoder for Arithmetic Length Generalization

Bong Gyun Kang, Junyong Ahn, Jieun Byeon, Sungroh Yoon


Abstract
Algorithmic reasoning—internalizing a procedure from small examples and applying it at arbitrary scale—is a hallmark of human intelligence: a child who learns arithmetic on a few digits can, given time and paper, evaluate expressions of unbounded length. Modern language models cannot: Qwen3.5-27B, despite 100k-token reasoning contexts, degrades to below 10% accuracy on 30-digit multiplication. Departing from reasoning-through-scale, we introduce RACE (Recursive Arithmetic Control Encoder), a 3.6M-parameter Transformer trained from scratch that generalizes far better by recursively decomposing problems while keeping its working memory bounded. Two mechanisms drive this: token-level editing, which erases intermediate scratchwork, and self-calling, which recurses on subproblems. Within a single model, RACE improves multiplication length generalization 4.7 times over the Arithmetic Transformer and, for the first time, achieves length generalization on subtraction and division (×47.1 and ×17.6), while also solving nested, multi-operator expressions. Code is available at https://github.com/Pusheen-cat/RACE_2026.
Anthology ID:
2026.emnlp-main.1920
Volume:
Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Hung-Yi Lee, Sunipa Dev, Jessy Li, Desmond Elliott
Venue:
EMNLP
SIG:
SIGDAT
Publisher:
Association for Computational Linguistics
Note:
Pages:
43731–43750
Language:
URL:
https://aclanthology.org/2026.emnlp-main.1920/
DOI:
Bibkey:
Cite (ACL):
Bong Gyun Kang, Junyong Ahn, Jieun Byeon, and Sungroh Yoon. 2026. Beyond Append-Only Decoding: A Recursive Edit-Based Encoder for Arithmetic Length Generalization. In Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing, pages 43731–43750, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
Beyond Append-Only Decoding: A Recursive Edit-Based Encoder for Arithmetic Length Generalization (Kang et al., EMNLP 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.emnlp-main.1920.pdf