English

Testing Transformer Learnability on the Arithmetic Sequence of Rooted Trees

Artificial Intelligence 2025-12-02 v1 Disordered Systems and Neural Networks Mathematical Physics math.MP Number Theory

Abstract

We study whether a Large Language Model 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 NT \mathbb{N}\mathcal{T} defines an arithmetic text with measurable statistical structure. A transformer network (the GPT-2 architecture) is trained from scratch on the first 101110^{11} elements to subsequently test its predictive ability under next-word and masked-word prediction tasks. Our results show that the model partially learns the internal grammar of NT\mathbb{N}\mathcal{T}, capturing non-trivial regularities and correlations. This suggests that learnability may extend beyond empirical data to the very structure of arithmetic.

Keywords

Cite

@article{arxiv.2512.01870,
  title  = {Testing Transformer Learnability on the Arithmetic Sequence of Rooted Trees},
  author = {Alessandro Breccia and Federica Gerace and Marco Lippi and Gabriele Sicuro and Pierluigi Contucci},
  journal= {arXiv preprint arXiv:2512.01870},
  year   = {2025}
}

Comments

21 pages, 8 figures

R2 v1 2026-07-01T08:04:05.623Z