Testing Transformer Learnability on the Arithmetic Sequence of Rooted Trees

Alessandro Breccia, Federica Gerace, Marco Lippi, Gabriele Sicuro, Pierluigi Contucci
12/1/2025
cs.AIcond-mat.dis-nnmath-ph

No confident code implementation found for this paper.

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 $ \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 $10^{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 $\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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{breccia2025testing,
  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},
  year   = {2025},
  eprint = {2512.01870},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2512.01870v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2512.01870.svg)](https://codeofpaper.com/paper/2512.01870)

Discussion