Multiplication Beyond Groups: Stratified Fourier Mechanisms in Transformer Circuits
Transformers have demonstrated a remarkable ability to learn algorithmic reasoning, yet mechanistic analyses have mostly focused on globally invertible operations such as cyclic addition and group composition. In this work, we investigate how small transformers learn modular integer multiplication over composite moduli, a fundamentally non-invertible operation due to the presence of zero-divisors. We propose the monoid extension: a localized generalization of Group Composition via Representation (GCR) that suggests the learned computation does not rely on a single global representation space. Instead, the model partitions the input space into local hierarchical algebraic regions, where group-like structure survives and Fourier mechanisms can be applied. In transformers trained on square-free modular multiplication, we find that embeddings organize around these regions, attention exhibits class-sensitive routing and low-rank write directions, and local character features explain a large fraction of the model's output logits. Our results suggest that representation-theoretic mechanisms previously identified for group operations can extend beyond groups to more general structures.
Code (0)
등록된 구현이 없습니다.
Similar Papers 제목 키워드 기반
Multiplication with Fourier Optics Simulating 16-bit Modular Multiplication
This paper will describe a simulator developed by the authors to explore the design of Fourier transform based multiplication using optics. Then it will demonstrate an application to the problem of constructing an all-op…
Graph Signal Processing: Vertex Multiplication
On the Euclidean domains of classical signal processing, linking of signal samples to the underlying coordinate structure is straightforward. While graph adjacency matrices totally define the quantitative associations am…
Time SeriesTime Series AnalysisLow Rank and Sparse Fourier Structure in Recurrent Networks Trained on Modular Addition
Modular addition tasks serve as a useful test bed for observing empirical phenomena in deep learning, including the phenomenon of \emph{grokking}. Prior work has shown that one-layer transformer architectures learn Fouri…
AttributeOn the Efficiency of Finely Stratified Experiments
This paper studies the use of finely stratified designs for the efficient estimation of a large class of treatment effect parameters that arise in the analysis of experiments. By a "finely stratified" design, we mean exp…
Why Can't Transformers Learn Multiplication? Reverse-Engineering Reveals Long-Range Dependency Pitfalls
Language models are increasingly capable, yet still fail at a seemingly simple task of multi-digit multiplication. In this work, we study why, by reverse-engineering a model that successfully learns multiplication via \e…