Arithmetic Pedagogy for Language Models

2026-06-03Computation and Language

Computation and LanguageArtificial IntelligenceComputers and Society
AI summary

The authors explore if teaching methods used for humans learning math can help train language models to do arithmetic. They adapt an Indonesian teaching style called GASING, turning each math step into a written explanation that the model learns to predict next. Using a small GPT-2 model trained only to predict the next word, they find the model learns in stages, first following step-by-step procedures, then developing a way to remember intermediate math results without redoing every step. Their approach achieves good accuracy and competes with much larger models, showing that focused teaching-inspired training can help small models do math well.

GASING methodChain-of-Thought (CoT)GPT-2next-token predictionattention maskingresidual stream probinglogit lensarithmetic reasoninglanguage modelstokenization
Authors
Andhika Bernard Lumbantobing, Hokky Situngkir
Abstract
We investigate whether methods of human mathematics pedagogy can guide the training of language models toward arithmetic reasoning. Building on the GASING method -- an Indonesian pedagogy that solves basic arithmetic through a left-to-right procedure aligned with the causal order of token generation -- we operationalize each operation as a computational procedure whose execution trace is serialized into natural-language Chain-of-Thought (CoT) supervision. A small GPT-2 decoder (86M parameters) with a syllabic-agglutinative TOBA tokenizer for Indonesian is trained from scratch on this data using only a next-token prediction objective, without reinforcement learning or reward-based optimization. Monitoring training reveals three distinct learning phases, and mechanistic analyses -- attention-masking interventions on the CoT information graph, residual-stream probing, and logit-lens inspection -- show that the model first internalizes a procedural pathway and subsequently develops an associative, ``mental-arithmetic'' capacity that retrieves intermediate results without explicit step-by-step computation. The trained model reaches over 80% accuracy on held-out problems and attains competitive performance against substantially larger language models, indicating that targeted, pedagogically grounded training can yield strong and economical arithmetic capability at small scale.