TL;DR
This paper argues that different neural network architectures trained on modular addition (a+b mod n) don't learn fundamentally different circuits, but rather factor the same underlying geometric map from a torus to a circle using different intermediate representations. By leveraging topological data analysis, the authors provide strong empirical evidence for this universality hypothesis, suggesting that the "clock" and "pizza" circuits previously thought to be distinct are actually variations on a theme.
What Problem Does This Paper Address?
The field of mechanistic interpretability aims to understand how deep neural networks (DNNs) perform computations. A key hypothesis is "universality": that similar networks trained on similar tasks will learn similar internal circuits. However, recent work on modular addition (a+b mod n) claimed to find fundamentally different circuits ("Clock" vs. "Pizza") implemented by networks with minor architectural changes, seemingly contradicting universality. This paper addresses this discrepancy by proposing a unified geometric perspective on these representations, aiming to reconcile these findings and restore faith in the universality hypothesis. The challenge is to move beyond analyzing individual neurons and instead understand the collective geometry and topology of representations.
Methods
The core of the paper's methodology lies in analyzing the geometry and topology of neural network representations. Instead of focusing on individual neurons, they treat groups of neurons corresponding to a specific "frequency" as a single entity. They employ:
- Topological Data Analysis (TDA): Specifically, Betti numbers are used to characterize the "holes" and connectivity of representation manifolds, providing a way to distinguish topological structures like discs, tori, and circles.
- Phase Alignment Distributions (PADs): This novel representation captures how often neurons' activations are maximized on the diagonal of the input space (a=b), indicating alignment of learned phases. This is quantified using Maximum Mean Discrepancy (MMD).
- Principal Component Analysis (PCA): Used to visualize the geometry of learned representations in lower-dimensional spaces.
- Closed-form Mathematical Analysis: The authors derive theoretical results showing that under certain symmetry assumptions, the representation manifolds can be mathematically characterized as either a disc (vector addition) or a torus.
Datasets
The paper uses a synthetic dataset for modular addition: (a + b) mod n = c, with n=59. This is a standard benchmark for interpretability research. No new datasets are introduced.
Key Insights and Ideas
- Unified Geometric Framework: The paper proposes that all architectures studied (MLP-Add, Attention 0.0, Attention 1.0, MLP-Concat) implement a common underlying map from a torus (representing input pairs) to a circle (representing the output). Differences arise in how this map is factored through intermediate representations.
- "Clock" is Not Special: Contrary to previous claims, the "Clock" circuit, previously thought to be distinct, is shown to be empirically indistinguishable from the "Pizza" circuit and MLP-Add in terms of its representation geometry.
- Torus as the Fundamental Manifold: The paper suggests that the torus is a more fundamental representation manifold, and the "pizza disc" can be seen as a projection of this torus.
- Phase Alignment is Key: The alignment of learned phases in neurons is identified as a critical factor determining the geometry of representations.
- Universality Restored: By demonstrating that different architectures converge to topologically and geometrically equivalent representations, the paper argues that the universality hypothesis holds for modular addition.
Key Results
- Empirical Validation of Theorem 4.1: The theoretical predictions that representations are either disc-like (vector addition) or torus-like are strongly supported by PCA and PAD analysis across various architectures.
- MMD Distances: Statistical comparisons using MMD show that MLP-Add, Attention 0.0, and Attention 1.0 are very similar, while MLP-Concat is distinct but still factors the same torus-to-circle map. For example, Table 1 shows MMD values between MLP-Add and Attention 0.0 are around 0.09 for max activation and 0.05 for center of mass, indicating moderate similarity.
- Betti Number Analysis: Topological analysis across layers reveals that while initial layers might show disc or torus structures, deeper layers and logits converge to a circle, consistent with the proposed torus-to-circle map.
- Previous Metrics Re-evaluated: The paper re-evaluates metrics like gradient symmetricity and distance irrelevance, finding that while they can distinguish some architectures, they don't fully capture the underlying geometric similarities.
Limitations and Future Work
- Task Specificity: The current work focuses solely on modular addition. A significant future direction is to generalize these findings and methodologies to characterize circuits in more complex domains and larger networks.
- Generalizability of Methodology: While the specific methodology is tailored to modular addition, the authors believe the underlying strategy of isolating degrees of freedom in representation geometry and estimating learned statistics can be generalized.
- Manifold Continuity: The work suggests connections between universality and manifold continuity, proposing that future work could formalize hypotheses about this relationship.
- Limitations of Persistent Homology: The paper notes that persistent homology can sometimes struggle to find holes of small radius, potentially leading to misinterpretations of logit structures.
Summary updated