Prime Fourier Embeddings: A Principled Basis for Modular Arithmetic
Not on the map. Why?
Abstract (arXiv)
Numbers have algebraic structure that standard neural embeddings often fail to expose. We introduce Prime Fourier Embeddings (PFE), which encode integers as prime-indexed (cos, sin) pairs derived from the harmonic analysis of Q, providing a pre-structured representation in which modular arithmetic reduces to selecting the relevant prime channel rather than discovering algebraic structure from scratch. We prove that any linear map equivariant with respect to the product group action on PFE must be block-diagonal with one independent block per prime -- a consequence of Schur's lemma applied to the resulting character decomposition. For square-free composite moduli, the Chinese Remainder Theorem predicts which prime channels are task-relevant. Both predictions are confirmed empirically: ablation studies show specialization ratios exceeding 500x between task-relevant and task-irrelevant channels, with perfect in-distribution test accuracy across all square-free composite moduli tested.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 12 of its 24 references that are in the map. First posted on arXiv 22 Jun 2026.
Builds on
12 of 24 references.
References · 12
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
- 2019RotatE: Knowledge Graph Embedding by Relational Rotation in Complex Spacecited by 898
- 2023Progress measures for grokking via mechanistic interpretabilitycited by 839
- 2017Poincar'e Embeddings for Learning Hierarchical Representationscited by 684
- 2022Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasetscited by 629
- 2022On Embeddings for Numerical Features in Tabular Deep Learningcited by 186
- 2022Clifford Neural Layers for PDE Modelingcited by 92
- 2023Grokking modular arithmeticcited by 83
- 2024Transformers Can Do Arithmetic with the Right Embeddingscited by 78
- 2025FoNE: Precise Single-Token Number Embeddings via Fourier Featurescited by 22
- 2024Language Models Encode the Value of Numbers Linearlycited by 20
- 2026Numbers Already Carry Their Own Embeddingscited by 1
Built on by
Not cited yet.