Junyong Ahn

Author directory

2026

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.