arXiv:2610.11833cs.AIOct 2026

Manuscript Offprint

arXiv:2610.11833

Probability-Signature Dynamics: Unpacking Modular Addition Learning Within Two-Layer Networks

Yunji Wang, Junjie Yao, Linyu Liu, Pinyan Lu, Zhi-Qin John Xu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Neural networks trained on modular addition tasks often develop Fourier-structured representations that support exact generalization. While prior work has identified these Fourier circuits, the mechanism by which gradient-based training selects them from the data distribution remains unclear. We address this question using probability signatures, which express leading gradient interactions through conditional statistics of the training distribution. For modular addition, these signatures are cyclic shift operators and are diagonalized by the discrete Fourier transform, yielding approximately decoupled Fourier-mode dynamics. This explains the emergence of Fourier sparsity, frequency matching, and phase alignment. The same framework resolves a puzzle under label noise: corrupted examples can show faster early loss decrease than clean examples, despite lacking a coherent generalization rule. We show that noise increases conditional label collisions, strengthening early shared-coordinate reinforcement. Finally, this method can be applied to other operators. Taking XOR as an example, we observed the predicted frequency in experiments.

Keywords Two Layer Network, Modular Addition, Training Dynamics

1 Introduction

The modular addition task is a canonical setting in which to study grokking. During the initial phase of training, an over-parameterized model can fit individual training examples yet fails to uncover an interpretable rule. After substantially prolonged training, however, its test performance may improve abruptly even though the training loss has already become very small. This delayed transition is commonly referred to as grokking. In modular addition, the onset of grokking is accompanied

A PREPRINT

by the emergence of a distinctive structure in the weights. Prior studies have shown that trained networks develop Fourier circuits (Nanda et al., 2023; Gromov, 2023). Specifically, the input and output weights of many hidden units become concentrated at matching Fourier frequencies, and appropriate combinations of these Fourier components can compute (a+b) mod P(a+b)\bmod P. Mechanistic interventions, including Fourier projection and ablation experiments, provide strong evidence that these components are functionally important for generalization. Their formation also reflects the transition from a memorizing solution to a generalizing one.

These results answer an important reverse question: given a trained network, which circuit does it implement, and which components of that circuit support generalization? They have not fully answered the complementary forward question: why should gradient-based training produce Fourier-structured parameters from the modular-addition data distribution in the first place? The fact that Fourier features can represent modular addition does not imply that the training dynamics must discover them. Meanwhile, current work can already account for observed phenomena in neural networks, such as frequency competition and phase alignment (He et al., 2026). However, its theoretical analysis is based on a Fourier decomposition of the weights, which need to presuppose that the Fourier basis is related to modular addition.

Our focus is therefore not to show again that Fourier-structured neurons can implement modular addition, nor to re-establish that these neurons support generalization. Instead, we study the missing forward direction

training distribution ⟹\Longrightarrow leading gradient terms ⟹\Longrightarrow Fourier-mode selection.

More specifically, we ask the following questions. Which statistics of the training data enter the leading-order parameter dynamics? Why are Fourier modes approximately decoupled in the modular-addition problem? What determines whether a neuron is suppressed by weight decay or develops a dominant Fourier component? And, how to derive the weight structure in advance from the training distribution?

We study these questions in a two-layer embedding MLP trained on modular addition dataset with some randomly corrupted labels. Our main analytical tool is the probability signature framework introduced by Yao & Xu (2025), which shows the correlation between data statistics and embedding without studying either modular addition learning or the key structure of data statistics.

Our contributions are as follows.

• We utilize probability signatures to directly explain the emergence of dominant Fourier modes during the learning dynamics.

• We have explained the puzzle in the early memorization regime: uniformly random label noise consistently exhibits a faster initial loss decrease than clean data. Some statistics from training distribution can measure this difference.

• The analysis framework can be extended to more tasks, such as XOR, enabling us to predict the structures that network parameters may form before training.

A PREPRINT

References (47)