Testing Transformer Learnability on the Arithmetic Sequence of Rooted Trees
Not on the map. Why?
Abstract (arXiv)
We study whether a transformer network can learn the deterministic sequence of trees generated by the iterated prime factorization of the natural numbers. Each integer is mapped into a rooted planar tree and the resulting sequence mathbbNmathscrT defines an arithmetic text with measurable statistical structure. A transformer network (the GPT-2 architecture) is trained from scratch on the first 1011 elements and evaluated on Next-Token and masked-word prediction tasks, with a Hidden Markov Model as baseline and a scaling analysis over context window, dataset size, vocabulary size and model size. The model reaches a word accuracy of about 0.4, well above the baseline, and its performance remains stable on test blocks located at 1013--1015, far beyond the training interval. Moreover, the likelihood assigned by the model separates the arithmetic text from two controls: synthetic sequences reproducing its word frequencies exactly but carrying no sequential organization, with a separation that widens as the evaluated context grows; and sequences containing more than three consecutive square-free integers, a configuration that arithmetic forbids. These results indicate that the transformer captures regularities of the arithmetic text that go beyond its frequency profile.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 24 of its 52 references that are in the map. First posted on arXiv 1 Dec 2025.
Builds on
24 of 52 references.
References · 24
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,305
- 2013Efficient Estimation of Word Representations in Vector Spacecited by 4,375
- 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,918
- 2024The Evolution of Statistical Induction Heads: In-Context Learning Markov Chainscited by 118
- 2023Physics of Language Models: Part 1, Learning Hierarchical Language Structurescited by 83
- 2024Understanding Factual Recall in Transformers via Associative Memoriescited by 51
- 2021Disentangling Syntax and Semantics in the Brain with Deep Networkscited by 40
- 2024Towards a theory of how the structure of language is acquired by deep neural networkscited by 39
12 more
- 2021Machine-Learning Mathematical Structurescited by 25
- 2024A polar coordinate system represents syntax in large language modelscited by 25
- 2024A distributional simplicity bias in the learning dynamics of transformerscited by 24
- 2017Deep-Learning the Landscapecited by 21
- 2023Mapping of attention mechanisms to a generalized Potts modelcited by 19
- 2024Sometimes I am a Tree: Data Drives Unstable Hierarchical Generalizationcited by 10
- 2025Scaling Laws and Representation Learning in Simple Hierarchical Languages: Transformers vs. Convolutional Architecturescited by 5
- 2023Classification of integers based on residue classes via modern deep learning algorithmscited by 2
- 2023Integer Factorisation, Fermat & Machine Learning on a Classical Computercited by 2
- 2024Exploring Prime Number Classification: Achieving High Recall Rate and Rapid Convergence with Sparse Encodingcited by 2
- 2023Discrete Denoising Diffusion Approach to Integer Factorizationcited by 1
- 2024Machine Learning of the Prime Distributioncited by 1
Built on by
Not cited yet.