Mathematical Foundations of Superposition in Neural Networks

A theoretical study establishing rigorous mathematical frameworks for understanding superposition phenomena in neural network representations.


Table of Contents


1. Formal Problem Setup

1.1 The Autoencoder Model

Consider the canonical toy model of superposition. Let:

  • = number of input features (large)
  • = hidden dimension (bottleneck, )
  • = encoding/decoding weight matrix (tied)
  • = bias vector
  • = feature sparsity (probability of being zero)
  • = feature importance vector

Data Distribution: Each feature is independently:

Linear Model:

ReLU Output Model:

Loss Function:

1.2 Key Quantities

Feature direction: is the -th column of — the direction in hidden space representing feature .

Gram matrix: , where . This encodes the full geometry of feature representations.

Feature dimensionality:

This measures how many effective dimensions feature occupies. Crucially:

with equality when features are packed efficiently.


2. The Superposition Optimization Problem

2.1 Loss Decomposition by Sparsity Pattern

The key analytical insight is decomposing the loss over sparsity patterns. Let denote the set of active features. The probability of pattern is:

The loss decomposes as:

where is the conditional loss given active set .

2.2 Sparse Limit Approximation

As , the dominant terms are:

where is the average single-feature loss.

Zero-input loss (): For the ReLU model:

Simply penalizes positive biases. Optimal: for all .

Single-feature loss (): For feature active with value :

The reconstruction error for feature given only feature is active:

2.3 Feature Benefit vs. Interference Decomposition

The single-feature loss separates into:

Theorem 2.1 (Interference Asymmetry). For the ReLU output model in the 1-sparse regime with : if (negative interference), then for all provided . Thus, negative interference is “free” — it incurs zero cost.

Proof. If and , then for , so .

This asymmetry is the fundamental reason superposition favors antipodal arrangements where .


3. Connection to the Thomson Problem and Sphere Packing

3.1 The Generalized Thomson Problem

Under the simplifying assumptions of uniform importance , unit-norm feature vectors , and zero bias , the interference minimization reduces to:

where is an energy function determined by the activation and loss. For the ReLU output model:

This is a modified Thomson problem on the sphere . The classical Thomson problem uses (Coulomb potential); here the energy function is “one-sided” — only positive correlations are penalized.

3.2 Known Results for Small Cases

points on (circle): The optimal arrangement is a regular -gon. For even , this consists of antipodal pairs.

points on : The optimal arrangements often correspond to well-known polytopes:

  • points: regular simplex (vertices of a tetrahedron for )
  • points: cross-polytope (vertices of an octahedron for )
  • Special cases: icosahedron (, ), etc.

Theorem 3.1 (Antipodal Optimality). For the modified Thomson problem with for , antipodal arrangements (where for each there exists ) are local optima for any .

3.3 Tegum Products and Dimensional Decomposition

Definition 3.1 (Tegum Product). Given polytopes and , their tegum product is:

embedded in .

Proposition 3.1. If , then for any and , . Thus tegum products guarantee zero cross-group interference.

This explains why optimal solutions for higher-dimensional superposition are often tegum products of lower-dimensional solutions — the model decomposes the problem into independent subproblems in orthogonal subspaces.


4. Phase Transition Analysis

4.1 Two Features, One Dimension: Exact Analysis

Consider features, dimension. Feature 1 has importance ; feature 2 has importance and sparsity .

Configuration space: Parameterize where .

Three candidate optimal configurations:

  1. No superposition: — only represent feature 1
  2. Swap: — only represent feature 2
  3. Antipodal superposition: for some — represent both

Loss for configuration 1 ():

(Feature 2 is never reconstructed; feature 1 is perfect.)

Loss for configuration 3 (, ):
In the 1-sparse regime, when feature 1 is active with value :

  • Feature 1 output: ✓ (if )
  • Feature 2 output: ✓ (negative, clipped)

When feature 2 is active with value :

  • Feature 2 output: ✓
  • Feature 1 output: ✓

When both are active (probability ), interference occurs.

Theorem 4.1 (Phase Transition). For the 2-feature, 1-dimension ReLU model with uniform bias , there exists a critical sparsity $S^(\alpha)$ such that:*

  • For $S < S^(\alpha): optimal configuration is $W = [1, 0] (no superposition)*
  • For $S > S^(\alpha): optimal configuration is $W = [a, -a] (superposition)*

The transition is first-order — the optimal weights change discontinuously at $S^$.*

4.2 General Phase Diagram

For features in dimensions with varying importance and sparsity , the loss landscape admits multiple local minima corresponding to different superposition strategies. The global minimum shifts discontinuously between strategies as vary, creating a rich phase diagram with:

  • Discrete phases: Each phase corresponds to a specific polytope arrangement
  • First-order boundaries: Discontinuous transitions between phases
  • Coexistence regions: Near boundaries, multiple configurations have similar loss

Conjecture 4.1 (Phase Richness). The number of distinct phases grows at least polynomially with and , with each phase characterized by a specific partition of features into polytope groups and the geometry within each group.


5. Information-Theoretic Foundations

5.1 Capacity Bounds

How many features can be stored in dimensions via superposition?

Theorem 5.1 (Exponential Packing). By the Johnson-Lindenstrauss lemma, for any and , there exist unit vectors with for all , where is a universal constant. Equivalently, dimensions can pack nearly-orthogonal features.

Corollary 5.1. The maximum number of features representable in -dimensional superposition with per-feature interference bounded by is at most .

5.2 Rate-Distortion Theory Perspective

Superposition can be viewed through the lens of rate-distortion theory. The model compresses sparse features into dimensions, accepting distortion (interference). The optimal tradeoff is:

For our setting:

  • Rate: (hidden dimensions = bits of representation)
  • Distortion: (reconstruction loss)
  • Source: Sparse -dimensional vector

Proposition 5.1. For i.i.d. Bernoulli-uniform sources with sparsity , the rate-distortion function satisfies for a function depending on the distortion measure. When , , allowing with small distortion.

5.3 Mutual Information and Feature Fidelity

For feature with representation , define the feature fidelity:

means perfect reconstruction; means reconstruction is no better than the mean.

Proposition 5.2. In the linear model, the feature fidelity is when is orthogonal to all other feature directions, and decreases with interference.


6. Compressed Sensing and Recovery Guarantees

6.1 Connection to Compressed Sensing

Superposition is closely related to compressed sensing. The encoding is exactly a compressed measurement of the sparse signal , and the decoding is a (learned) recovery algorithm.

Restricted Isometry Property (RIP): A matrix satisfies the RIP of order with constant if:

for all -sparse vectors .

6.2 Lower Bounds from Compressed Sensing

Theorem 6.1 (Gelfand Width). Any recovery algorithm achieving exact recovery of all -sparse vectors in from -dimensional linear measurements requires:

This provides a fundamental lower bound on the number of dimensions needed for superposition.

Corollary 6.1. With sparsity (expected sparsity level ), exact recovery of all features requires . When (single feature active), suffices — exponential compression.

6.3 The ReLU as a Recovery Algorithm

The ReLU decoder implements a form of iterative hard thresholding:

  1. projects back to feature space (with interference)
  2. shifts (negative bias acts as threshold)
  3. clips negatives (thresholding)

This is a single-step recovery algorithm. Multi-layer networks could implement iterative recovery:

Conjecture 6.1. Deeper networks exhibit less superposition per-layer because they can implement iterative recovery algorithms, achieving better reconstruction with the same total feature capacity.


7. Random Matrix Theory Perspectives

7.1 The Gram Matrix Spectrum

The Gram matrix encodes the full geometry of superposition. For random with i.i.d. entries, the Marchenko-Pastur law describes the eigenvalue distribution of :

where .

7.2 Deviation from Random: Signature of Superposition

In a trained model, deviates from the Marchenko-Pastur distribution in specific ways:

  • Rank reduction: Effective rank
  • Structured off-diagonals: follows patterns dictated by polytope geometry
  • Clustering of eigenvalues: Reflecting the block structure of tegum products

Definition 7.1 (Superposition Measure). Define the degree of superposition as:

when features are orthogonal (no superposition); increases as features become more entangled.

7.3 Effective Dimension

The participation ratio of the Gram matrix eigenvalues:

This global quantity complements the per-feature dimensionality and provides a single number summarizing how “spread out” the representation is.


8. Geometry of Feature Polytopes

8.1 Classification of Polytopes in Superposition

Each superposition arrangement corresponds to a polytope inscribed in . The key polytopes observed empirically:

Polytope vertices dimensionsSymmetry Group
Digon (antipodal pair)211/2
Triangle322/3
Square421/2
Pentagon522/5
Tetrahedron433/4
Octahedron631/2
Square antiprism833/8

8.2 Optimal Polytopes and the Tammes Problem

For uniform features, the optimal arrangement solves a variant of the Tammes problem (packing on spheres). The key difference: our energy function is one-sided.

Theorem 8.1 (Antipodal Preference). For the one-sided quadratic energy, among all arrangements of points on with , the -fold cross-polytope (consisting of antipodal pairs along orthogonal axes) is a global minimum.

Theorem 8.2 (Odd Vertex Polytopes). For points on (), the optimal arrangement is a regular -gon. This cannot be decomposed into pure antipodal pairs, explaining the transition from to other fractional dimensionalities.

8.3 Stability Analysis

Definition 8.1 (Polytope Stability). A polytope arrangement is stable if the Hessian of the loss at this arrangement is positive definite (restricted to the constraint manifold ).

The stability of a polytope determines the width of the sparsity interval over which it is optimal. Antipodal pairs are remarkably stable — explaining why is “sticky” over a wide range of sparsity.

Conjecture 8.1 (Stability Hierarchy). Polytopes with higher symmetry groups have larger stability basins, explaining why simple structures (antipodal pairs, cross-polytopes) dominate over a wide parameter range while complex polytopes (pentagons, antiprisms) appear only in narrow windows.


9. Double Descent via Superposition

9.1 Two Competing Superposition Strategies

The double descent phenomenon arises from competition between:

  1. Data-point superposition: Store training examples as a -gon in , enabling perfect memorization
  2. Feature superposition: Store features as polytopes in , enabling generalization

9.2 Loss Analysis for Data-Point Superposition

When storing data points as a -gon, each training example maps to:

with forming a regular -gon.

Training loss: Can achieve by constructing such that:

This requires , which for is achievable.

Test loss: For a new test point :

The test loss depends on how well is represented in the span of .

9.3 The Transition Point

Theorem 9.1 (Generalization Scale). In the toy model with sparsity and training examples, the transition from data-point superposition to feature superposition occurs approximately when each feature has been observed sufficiently many times:

where empirically. Below , the model memorizes; above, it generalizes.

9.4 Mechanism of Double Descent

At the transition point :

  1. The data-point strategy becomes inefficient (too many points to memorize)
  2. The feature strategy is not yet viable (insufficient data to learn features)
  3. The model is caught between strategies — neither works well
  4. Test loss increases despite having more data

Proposition 9.1 (Double Descent Bound). The excess test loss at the transition satisfies:

for suitable , provided the model has insufficient capacity to simultaneously implement both strategies.

9.5 Role of Weight Decay

Weight decay acts as a regularizer that:

  • Limits the parameter norm available for T-gon construction
  • Forces earlier transition to feature superposition
  • At sufficiently high , eliminates double descent entirely by preventing memorization

Theorem 9.2 (Weight Decay Eliminates Double Descent). For weight decay $\lambda > \lambda^, where $\lambda^* depends on , the model directly learns feature superposition for all , eliminating the memorization regime and the associated double descent.*


10. Toward Rigorous Theory

10.1 Open Mathematical Problems

Problem 1: Complete Phase Diagram. Characterize the full phase diagram specifying which polytope arrangement is optimal for each parameter configuration. This requires:

  • Enumeration of candidate polytopes (connected to the Tammes problem)
  • Loss computation for each candidate
  • Boundary identification between phases

Problem 2: Capacity-Distortion Tradeoff. For given , what is the achievable region of ? This connects to:

  • Rate-distortion theory for sparse sources
  • Compressed sensing optimality
  • Sphere packing in high dimensions

Problem 3: Learning Dynamics. Prove that gradient descent on the loss landscape:

  • Converges to polytope arrangements (not arbitrary local minima)
  • Exhibits discrete “energy level jumps” between polytope phases
  • Has training time polynomial in and

This connects to:

  • Non-convex optimization theory
  • Landscape connectivity (are all local minima global?)
  • Symmetry-breaking in gradient descent

Problem 4: Universality. Does the polytope structure of superposition hold for:

  • Non-tied weights ()?
  • Multi-layer networks?
  • Different activation functions (GELU, SiLU)?
  • Different loss functions (cross-entropy, contrastive)?

10.2 Analytical Approaches

Approach 1: Variational Analysis. Treat the optimal as a solution to:

Use the KKT conditions to derive necessary conditions for optimality, then verify which polytopes satisfy them.

Approach 2: Replica Method (Statistical Physics). Import tools from the statistical physics of disordered systems:

  • Treat the optimization as a spin glass on the sphere
  • Use the replica method or cavity method to compute the free energy
  • Derive the phase diagram from the free energy

Approach 3: Convex Relaxation. Lift the problem to the space of Gram matrices:

The rank constraint makes this non-convex, but dropping it gives a semidefinite program (SDP) whose solution provides bounds.

Approach 4: Topological Data Analysis. Use persistent homology to characterize the topology of feature arrangements in trained models, providing invariants that distinguish different superposition phases.

10.3 Key Lemmas Needed

Lemma (Loss Landscape Characterization). For the ReLU output model with uniform importance and sparsity:

  1. All local minima are global minima (or there exist saddle-point escape directions)
  2. Local minima correspond to valid polytope arrangements
  3. The loss surface has a benign structure amenable to gradient descent

Lemma (Polytope Enumeration). For features in dimensions:

  1. The number of distinct polytope phases is bounded by
  2. Each phase has a closed-form loss expression in terms of the polytope parameters
  3. Phase boundaries are algebraic curves in the parameter space

Lemma (Finite-Sample Corrections). The transition from infinite-data to finite-data superposition satisfies:

  1. For : loss converges to infinite-data solution at rate
  2. For : loss is dominated by memorization at rate
  3. At : loss exhibits a peak of magnitude

Summary of Key Mathematical Objects

ObjectSymbolDefinitionRole
Gram matrixInner products of feature directionsEncodes full geometry
Feature dimensionalityPer-feature occupancy
Superposition measureGlobal superposition degree
Effective dimensionParticipation ratio
InterferencePairwise feature crosstalk
Generalization scaleMemorization–generalization boundary

This document establishes the mathematical foundations for a rigorous study of superposition. The framework connects superposition to classical problems in sphere packing, compressed sensing, rate-distortion theory, and random matrix theory, providing multiple avenues for theoretical analysis.