Prime Fourier Embeddings: A Principled Basis for Modular Arithmetic
2026-06-22 • Machine Learning
Machine LearningArtificial Intelligence
AI summaryⓘ
The authors propose a new way to represent numbers using something called Prime Fourier Embeddings (PFE), which breaks numbers down using prime numbers in a way that makes certain math operations simpler. They show that their method organizes information into separate blocks for each prime number, making it easier to work with modular arithmetic. Their experiments confirm that their approach accurately focuses on the important parts related to prime numbers when solving problems involving composite numbers without repeated primes.
Prime Fourier EmbeddingsNeural embeddingsModular arithmeticPrime numbersChinese Remainder TheoremLinear equivarianceSchur's lemmaCharacter decompositionSquare-free composite moduli
Authors
Hyunsang Hwang, Suhyun Bae, Donghun Lee
Abstract
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.