Number Learning in AI
- Number Learning is the process by which cognitive and AI models acquire, represent, and manipulate numerical concepts, involving subitizing, counting, and magnitude estimation.
- Methodologies range from sensorimotor pretraining and embodied learning to reinforcement learning in signaling games, mirroring developmental numeracy in humans.
- Advancements in neural architectures, specialized losses, and curriculum learning protocols yield improved arithmetic performance and better generalization across numerical tasks.
Number learning refers to the acquisition, representation, and manipulation of numerical concepts by artificial agents or cognitive models. This encompasses foundational abilities such as subitizing, counting, symbolic numeral-word mapping, comparative magnitude judgment, and algorithmic arithmetic. Research on this topic spans neural LLMs, reinforcement learning (RL) frameworks, psycholinguistic modeling, and robotics, probing both the emergence of number sense in developmental contexts and the mechanisms by which state-of-the-art AI systems ground and process numerical information.
1. Emergence of Number Sense and Early Numeracy
The emergence of number sense—the ability to discriminate quantities, represent numerosity, and perform counting—has been studied by modeling sensorimotor and cross-modal learning in neural systems. Action-prediction pretraining tasks, where networks learn to anticipate the outcome of pick/place actions on small sets of objects, reliably yield internal representations exhibiting key signatures of human number cognition, including:
- Discrete category formation for small numbers (subitization),
- Strict ordering of magnitudes on a latent 1D number line,
- Analog estimation properties that extrapolate to larger numerosity far beyond the training regime.
Such models, when probed post-training, can classify exact small numerosities and perform continuous analog estimation of larger N with <15% mean error up to N=30, with observed biases and Weber-law scaling paralleling human psychophysics. These results are robust to architectural details and suggest that cross-modal (motor–visual) self-supervision can serve as a computational basis for number concept emergence (Kondapaneni et al., 2020).
In embodied robotic agents, sensorimotor coupling regularizes learning. For example, LSTM architectures integrating vision and proprioception in a counting task develop number-selective units, Weber-law scaling, and even rotational population dynamics encoding count progression. Critically, embodiment provides a strong structural prior: randomized visual-motor pairings preserve most of the numerosity representation and sample efficiency advantages, demonstrating the effect is not information-theoretic but inductive. Developmental sequence matches human trajectories from “subset-knowers” (1–4) to cardinal-principle generalization even under limited data (Shangguan et al., 13 Apr 2026).
2. Acquisition of Numeral Systems and Language-Mediated Number Learning
Number learning in communication and language is well-modeled as a cooperative RL signaling game. Artificial agents playing iterated Lewis signaling games can, using simple deep RL (feed-forward networks, Thompson-sampling exploration), generate mappings from meanings (numbers N=1…20) to words without any pre-internalized number module. The emergent system's structure closely tracks information-theoretic efficiency/compression, with both “exact” (e.g., “one, two, three, many”) and “approximate” (graded Gaussian tuning over N) categories appearing depending on the reward curve. Empirical tuning widths of the learned “approximate” words () match measured human Weber fractions, and the learned category boundaries correspond closely to those found in languages with small numeral lexicons (Carlsson et al., 2021).
Deep RL simulations of childhood numeracy education further highlight the role of policy-driven language instruction. Proximal Policy Optimization agents solving a blocks-based construction task show that policy-based, stepwise verbal scaffolding (“Pick up the 100-block, then the 10-block...”) yields +60% faster convergence and +30% higher generalization accuracy compared to visual-only or state-based instruction. Curriculum learning ordered by difficulty (task-ease: minimal steps to goal) delivers 12% ±2% absolute gains over naive ascending-number curricula. Detailed ablation shows significant statistical differences (Cohen’s ) (Mittra, 2024).
3. Neural Encoding and Processing of Numbers in LLMs
LLMs (LMs), including LLMs, have been systematically interrogated regarding their internal encoding of numerical forms and magnitudes:
- Numeral modeling strategies span flat vocabulary softmax (collapsed numerals), digit-by-digit character RNNs (open-vocabulary numerals), hierarchical two-level classifiers (words vs numerals), and continuous mixture-of-Gaussians (MoG) models to capture real-valued magnitudes.
- Hierarchical softmax with MoG on the numeral branch yields orders-of-magnitude lower perplexity and up to 54% reduction in mean absolute percentage error over discrete-only or digit-RNN methods on scientific and clinical corpora (Spithourakis et al., 2018).
Recent probing and fine-tuning methods reveal a disconnect: small and mid-size LLMs implicitly encode log-magnitudes and pairwise ranking of numerals extremely well in hidden states (R² > 0.998, 2.3% median relative error synthetic; >90% accuracy ranking classifier), yet verbalization accuracy for cross-notation comparison is only 50–70%. Auxiliary objectives promoting discriminative magnitude encoding during fine-tuning can boost verbalized accuracy by over 3 percentage points. Early-layer probe accuracy strongly correlates with surface performance, underscoring the importance of explicit magnitude supervision (Yuchi et al., 8 Feb 2026).
The Number Understanding and Processing Ability (NUPA) benchmark provides a broad test suite (41 tasks × representation pairs) for model quantification, revealing that even GPT-4o and comparable LLMs fail on seemingly elementary tasks such as decimal comparison (e.g., 9.11 > 9.9) and fraction operations unless specifically fine-tuned (Yang et al., 2024). In-domain accuracy degrades rapidly with sequence length across arithmetic and digit-level tasks. Fine-tuning on these subtasks improves accuracy in S/M bands but is much less effective for digitwise and fraction-based operations; pretrained PE/tokenizer choices must not be altered post hoc, or performance collapses.
4. Architectures, Algorithms, and Training Protocols for Numerical Computation
Modern neural architectures for number learning in arithmetic include classic LSTMs/Transformers (character/subword tokenized), memory-augmented models (Neural GPU, DNC), explicit arithmetic units (NALU, NAU), and neuro-symbolic hybrids. Canonical arithmetic tasks—addition, multiplication, comparison, translation—reveal the following training and representational requirements:
- Standard models, when trained on numbers up to N, interpolate near-perfectly but collapse out-of-distribution.
- Memory-augmented and grid-structured architectures sustain performance on large-token additions and complex n-ary arithmetic, underlying the importance of explicit digit-aligned structure (Testolin, 2023).
- Tokenization and positional-encoding details critically affect length extrapolation; single-character tokens and ALiBi/NoPE positional encodings enable better OOD scaling (Yang et al., 2024).
Reversed “little-endian” (human-like, least-significant first) training for arithmetic dramatically reduces dependency complexity and token count. LLMs fine-tuned with this approach (LEFT) achieve +11.1 percentage points overall and +35.7 pp on multiplication, while also reducing training tokens by 3.6× compared to classical big-endian chain-of-thought approaches. Attention maps in such models align closely with per-digit computation and carry strategies (Zhang-Li et al., 2024).
5. Specialized Losses and Optimization for Numerical Learning
Recent advances highlight the limitations of maximum likelihood estimation (MLE) for digit sequence prediction. Penalty-driven objectives—Number Token Loss (NTL), Discretized Distance Loss (DIST²Loss)—either over-sharpen or over-flatten digit probabilities and rely on ad-hoc geometry. Digit Entropy Loss (DEL) reframes the problem as supervised entropy minimization over per-digit distributions, incorporating a place-weighted sum for floating-point numerals and eschewing hand-crafted numeric distance measures. DEL achieves consistent improvements in mean accuracy (2–3 percentage points over prior methods) and reduces MAE on GSM8K-style benchmarks from 0.72 to 0.63 (Zheng et al., 19 May 2026).
6. Symbolic Grammar Acquisition and the Countably Infinite
Number learning is also modeled via symbolic grammar induction. Minimalist-grammar-based RL systems can acquire the compositional syntax and arithmetic semantics of number words from meaning pairs (utterance, lambda-term in arithmetic algebra), constructing both the lexicon and the recursive composition rules (e.g., “twenty-three” → ) via merge/move operations, affix discovery, and licenser/licensee features. Even with only positive supervision, such systems learn to parse and realize numerals up to three-digit scale (Graben et al., 2019).
Feed-forward neural architectures provide mechanistic models of the cognitive transition from rote-count memorization (one-hot count-list) to place-value induction of the successor function. Place-value encodings exhibit representational similarity drops at decade boundaries (e.g., “29”→“30”), mirroring children's observed learning inflection points. Curriculum-based training further clarifies the sharpening of small-number representation as the number vocabulary increases (Gupta et al., 2023).
7. Implications and Open Problems
The convergence of language modeling, embodied sensorimotor learning, RL, and grammar induction elucidates both the strengths and persistent bottlenecks of artificial number learning systems:
- Internal representations consistent with magnitude are common even without explicit supervision; explicit training on numerical comparisons via probing objectives is necessary for robust verbalization.
- Digitwise decomposition, per-digit losses, and decoding order regularization (reverse/little-endian) yield substantial algorithmic gains in neural arithmetic.
- Symbolic compositionality and base-10 induction remain challenging for sequence models at scale; hybrid symbolic–neural architectures and curriculum-inspired protocols are active research areas.
- Foundational tasks (basic arithmetic, comparison, lexical mapping) display qualitative thresholds in generalization, indicating a need for models that unify perceptual, linguistic, and algorithmic number learning.
- Future work seeks joint sequence-level objectives, symbolic loss integration, and expansion to richer numeral domains (e.g., fractions, scientific notation, non-decimal bases).
Systematic progress in number learning is core to building numerate AI and improving education, cognitive modeling, and technical language understanding (Carlsson et al., 2021, Kondapaneni et al., 2020, Yuchi et al., 8 Feb 2026, Mittra, 2024, Spithourakis et al., 2018, Gupta et al., 2023, Shangguan et al., 13 Apr 2026, Zheng et al., 19 May 2026, Yang et al., 2024, Testolin, 2023, Zhang-Li et al., 2024, Graben et al., 2019).