Transformer能否学习自然数质因数分解生成的根树算术序列
Testing Transformer Learnability on the Arithmetic Sequence of Rooted Trees
研究用GPT-2架构从零训练,在自然数经迭代质因数分解映射为根平面树所得序列的前10^11个元素上学习下一token与掩码token预测,词准确率约0.4,显著高于隐马尔可夫模型基线。模型在10^13-10^15测试块上性能保持稳定,远超训练区间。其似然还能区分保留边际频率但打乱顺序的合成序列,且区分度随上下文增大。
arXiv:2512.01870v3 Announce Type: replace Abstract: 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 $\mathbb{N}\mathscr{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 and evaluated on next-token prediction and masked-token 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 $10^{13}$-$10^{15}$, far beyond the training interval. Moreover, the likelihood assigned by the trained model separates the arithmetic text from two controls: synthetic token sequences that preserve the marginal token frequencies but not their order, with a separation that widens with the context, 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.
来源:arXiv (AI + Vision + Imaging) · arxiv.org