NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

On The Geometry and Topology of Representations: the Manifolds of Modular Addition

Gabriela Moisescu-Pareja, Gavin McCracken, Harley Wiltzer, Colin Daniels, Vincent Létourneau, Doina Precup, Jonathan Love

Introduction

In the field of mechanistic interpretability, researchers strive to reverse-engineer how neural networks perform specific tasks. A major goal is to prove the universality hypothesis: the idea that different models trained on the same task will eventually converge on the same internal "circuits" or algorithms.

However, a recent influential study claimed that modular addition—a classic benchmark—served as a counter-example. The study argued that depending on the attention mechanism used, models learned two entirely different algorithms: a "Clock" circuit (based on angle sums) or a "Pizza" circuit (based on vector addition). If true, this implies that interpreting large-scale models is nearly impossible, as every model might develop unique, idiosyncratic circuits.

This paper challenges that narrative. By treating groups of neurons as collective geometric manifolds rather than individual units, the authors demonstrate that the "Clock" and "Pizza" interpretations are actually geometrically and topologically equivalent representations of the exact same underlying algorithm.

Clock vs. Pizza representations

Methodology and Datasets

To prove that these circuits are equivalent, the authors move beyond looking at individual neurons and instead analyze neuron clusters as geometric manifolds. Their toolkit includes:

  • Topological Data Analysis (TDA): They use Betti numbers ($\beta_k$) to identify the fundamental "shape" of representations. For example, a solid disc has different Betti numbers than a hollow circle or a torus (a donut shape).
  • Principal Component Analysis (PCA): Used to visualize the low-dimensional manifolds where the data "lives" inside the hidden layers.
  • Phase Alignment Distributions (PAD): A novel method to track how the "phases" of periodic neurons align across different training runs and architectures.
  • Canonical Manifolds: The authors derive closed-form equations to prove that under certain conditions, these networks must learn either a torus or a disc (which is simply a projection of a torus).

The study focuses exclusively on the modular addition task: $(a + b) \pmod{59} = c$. While the dataset is simple, the authors scale the analysis massively by training 703 different models for each of four architectures: a standard multi-layer perceptron (MLP-Add), an MLP that concatenates inputs (MLP-Concat), a transformer with uniform attention (Attention 0.0), and a transformer with learnable attention (Attention 1.0).

Key Insights and Results

The core finding of the paper is that the difference between "Clock" and "Pizza" networks is largely a matter of how a higher-dimensional shape is projected into lower dimensions, rather than a difference in the algorithm itself.

PCA visualizations of learned manifolds across architectures
  • The "Pizza" is Universal: The "Pizza" circuit, characterized by a filled disc activation pattern, isn't unique to specific architectures. The authors found it in MLPs and "Clock" networks alike. It is simply a linear projection of a Torus representation.
  • Torus-to-Circle Mapping: The paper posits that all these networks are approximating a single geometric transformation: mapping a torus (the input space of two circular embeddings) to a circle (the output logit space).
  • Topological Signatures: Using Betti numbers, the authors showed that in the first layer, MLP-Concat learns a torus ($\beta_0=1, \beta_1=2, \beta_2=1$), while MLP-Add and Attention models learn a disc ($\beta_0=1, \beta_1=0, \beta_2=0$).
  • Logit Convergence: Regardless of the starting architecture or the hidden layer's shape, the final logits in all models overwhelmingly formed a circle (the "Clock" topology), with Betti numbers (1, 1, 0).
  • High Similarity: Using Centered Kernel Alignment (CKA), the authors found that the learned representations in "Clock" and "Pizza" architectures were nearly identical (scores > 0.97) when compared to the same reference manifolds. Maximum Mean Discrepancy (MMD) testing across hundreds of seeds proved that the differences between Attention 0.0 and Attention 1.0 are statistically negligible.

By showing that all these models converge to topologically equivalent manifolds, the authors provide strong evidence that the universality hypothesis still holds for modular addition.

Limitations and Future Work

The current work is strictly limited to modular addition. While this is a foundational "toy" problem for interpretability, it remains to be seen if these topological tools can characterize circuits in more complex domains like natural language processing. Furthermore, the theoretical proofs rely on a "simple neuron model" (neurons acting as sinusoids). While empirically supported here, real-world LLM neurons may exhibit more complex behaviors.

The authors suggest that the next step is to develop strategies for isolating degrees of freedom in the geometry of hidden representations for more complex, non-mathematical tasks, paving the way for a more unified theory of neural network interpretability.

Summary updated

BibTeX
@inproceedings{moisescupareja2026geometry,
  author = {Gabriela Moisescu-Pareja and Gavin McCracken and Harley Wiltzer and Colin Daniels and Vincent Létourneau and Doina Precup and Jonathan Love},
  title = {{On The Geometry and Topology of Representations: the Manifolds of Modular Addition}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=2olkCiSELH},
}
Figure