π€ AI Summary
Transformer language models exhibit fragility in basic arithmetic and numerical reasoning tasks because they treat numbers as symbolic tokens devoid of explicit numerical semantics. This work proposes a numerically aware input representation method compatible with existing architectures: by introducing dedicated prefix tokens explicitly linked to numerical magnitude and embedding them into standard token sequences, the approach explicitly encodes the semantic scale of numbers at the input layer without modifying the tokenizer or decoder. Experimental results demonstrate that this method consistently outperforms baseline models across diverse numerical formats, arithmetic tasks, and operand lengths, significantly enhancing the modelβs numerical robustness and comprehension capabilities.
π Abstract
Transformer-based language models often achieve strong results on mathematical reasoning benchmarks while remaining fragile on basic numerical understanding and arithmetic operations. A central limitation is that numbers are processed as symbolic tokens whose embeddings do not explicitly encode numerical value, leading to systematic errors. We introduce a value-aware numerical representation that augments standard tokenized inputs with a dedicated prefix token whose embedding is explicitly conditioned on the underlying numerical value. This mechanism injects magnitude information directly into the model's input space while remaining compatible with existing tokenizers and decoder-only Transformer architectures. Evaluation on arithmetic tasks shows that the proposed approach outperforms baselines across numerical formats, tasks, and operand lengths. These results indicate that explicitly encoding numerical value is an effective and efficient way to improve fundamental numerical robustness in language models.