Mechanistic Interpretability: Finding and Building Unusual Representations
Architecture overview and the 8 binary features the MLP is trained to predict from frozen sentence embeddings.
★ Unusual encoding introduced at H2
All embeddings pre-computed and frozen. Only the MLP is trained.
★ country is encoded in an unusual nonlinear way
Each sentence in the dataset has exactly one binary label per feature. The model must learn all 8 simultaneously from the shared 64-dimensional hidden layers. Features share representational capacity — the country encoding exploits this by latching onto the food axis.
Linear and nonlinear probes trained at every layer reveal a striking divergence for exactly one feature.
How exactly is country stored at H2? The answer involves the food axis, absolute values, and Z/2 symmetry.
food and country labels are statistically independent in the dataset
(label correlation = −0.005). Yet the model representationally entangles them — it co-encodes both
features on the same activation axis at H2.
Projecting H2 activations onto the direction that best separates food=0 from food=1
reveals four distinct intervals. The key observation: country=1 clusters near zero on this axis
regardless of food value, while country=0 is pushed to the extremes — large negative (food=0) or
large positive (food=1). In other words: country = 1 if and only if |projection on food axis| is small.
This is an absolute-value (magnitude) code with Z/2 symmetry.
country and food are linearly decodable from the raw sentence-transformer
embeddings — country at 0.980 and food at
0.967 — so the model could have kept both as
independent linear directions throughout. Instead, at H2 it spontaneously shares a single axis:
food as sign, country as magnitude. This is representational superposition —
two features on one axis, with country compressed into the magnitude channel.
One plausible pressure is capacity: the 64-dimensional bottleneck must carry 8 features simultaneously,
and co-encoding two features that happen to align in embedding space is a natural compression strategy,
even when their labels are uncorrelated.
|x| ≈ ReLU(x) + ReLU(−x) — a two-ReLU circuit
for recovering magnitude from a signed code. These two neurons alone probe country at
0.895 — recovering most of the country signal,
with full H3 reaching 0.961, so the remaining
neurons add some meaningful cleanup. This lines up with the probe analysis: 2 hidden units suffice,
consistent with the two ReLUs this magnitude-decoding circuit uses.
Nine models trained with geometrically richer encodings, each connecting to a different theoretical framework.
person develop a +0.42
linear/nonlinear gap with no target angles, which (with the superposition model's shared 2D space)
connects directly to how neural networks store more features than they have dimensions.
A synthetic feature parity = sentiment XOR question is introduced. A 9th output head is added and trained to predict it. The model must represent both inputs jointly — no single linear direction encodes XOR. This is a controlled miniature version of the compositional state-tracking mechanism described by Li et al. for real transformers doing compositional state updates.
| Probe | Accuracy |
|---|---|
| Linear (h2) | 0.951 |
| 2-layer MLP | 0.982 |
A circular regulariser pushes a learned 2D projection of H2 onto the unit circle: country=0 → 0°, country=1 → 90°. This is a phase code rather than a magnitude code. The update from country=0 to country=1 is a 90° rotation in the learned 2D subspace. LeJEPA's identifiability theorem states that a consistent world-model transition operator must be linear and orthogonal — exactly a rotation matrix.
| Probe | Accuracy |
|---|---|
| Linear on full h2 | 0.989 |
| Angular decoder (2D) | 0.988 |
A predictor P takes the 7 other binary feature labels (all features except country) as input and predicts the full H2 activations. The residual H2 − P(other_labels) is what the other labels cannot explain — country's contribution. The empirical question: is that residual direction consistent across contexts, and is P linear? If P is linear, the LeJEPA identifiability condition is satisfied.
| Probe | Accuracy |
|---|---|
| Linear on raw h2 | 0.471 |
| Linear on residual | 0.551 |
| Other features (residual) | ~1.000 |
A regulariser pushes a learned 3D projection of H2 onto a helix: country=0 → (1, 0, 0), country=1 → (0, 1, pitch). Motivated by how transformer positional encodings and grid cells in the mammalian hippocampus encode continuous location using phase-coded representations.
| Decoder | Accuracy |
|---|---|
| 1D projection | 0.989 |
| 2D angular | 0.993 |
| 3D helical fit | 0.993 |
Country and food are forced to share a 2D bottleneck with interleaved target positions: (c=0,f=0)→(1,0), (c=1,f=0)→(0,1), (c=0,f=1)→(−1,0), (c=1,f=1)→(0,−1). Neither feature occupies a dedicated dimension. This is a deliberate, controlled demonstration of the superposition failure mode — not mysterious, just geometry.
| Feature | Accuracy | Baseline |
|---|---|---|
| country | 0.978 | 0.503 |
| food | 0.738 | 0.501 |
A small CNN trained on MNIST with a 2D circular bottleneck. Digit k is pushed toward angle k × 36°. Even digits (0,2,4,6,8) and odd digits (1,3,5,7,9) alternate perfectly around the circle. Unit-norm constraint (F.normalize on bottleneck) forces all representations onto the unit circle, removing the radius magnitude as a linear shortcut.
| Probe | Accuracy |
|---|---|
| 10-class digit accuracy | 0.981 |
| 10-class linear probe on 2D | 0.982 |
| Even/odd linear probe on 2D | 0.510 |
| Even/odd nonlinear probe on 2D | 0.985 |
| Base rate | 0.508 |
A top-k sparse autoencoder (k=10, d_feats=256) is trained on the 64-dimensional h2 activations of the original puzzle model. Each sparse feature is then tested as a linear country probe, individually and jointly.
| Decoder | Accuracy |
|---|---|
| Single best SAE feature (feat 100) | 0.519 |
| Second best SAE feature (feat 36) | 0.592 |
| Top-2 pair, linear probe | 0.707 |
| Top-2 pair, nonlinear probe | 0.717 |
| All 256 SAE features, linear | 0.827 |
| All 256 SAE features, nonlinear | 0.958 |
A single bilinear layer replaces the full ReLU MLP: h2 = (W_L · emb) ⊙ (W_R · emb). By construction, B[f,i,j] = Σ_r D[f,r] L[i,r] R[j,r] — the weight matrices ARE the CPD factors.
| Feature | Linear probe | Nonlinear probe |
|---|---|---|
| country (baseline: 0.471 linear) | 0.993 | 0.992 |
| food | 0.983 | 0.980 |
| question | 0.999 | 0.999 |
| sentiment | 0.981 | 0.977 |
| XOR (bilinear vs ReLU) | 0.963 vs 0.951 (Δ=+0.013) | 0.977 |
(wf·h2)²
becomes a linear function of h2 in the bilinear basis. The original model's probe resistance
for country arises from the ReLU nonlinearities, not from the bilinear product structure.
XOR is slightly more linearly accessible in the bilinear model (Δ=+0.013) — bilinear
directly computes the product of two linear features.
A narrow d-dimensional bottleneck with unit-norm (F.normalize)
forces all representations onto the d-sphere. Two variants: d=4 and d=2.
No target positions are prescribed — geometry is fully emergent.
Eight per-feature MLP heads (d→16→ReLU→1) achieve high accuracy regardless of geometry.
The unit-norm constraint eliminates the magnitude channel used by the original model,
so all information must be angular.
| Feature | Linear | Nonlinear | Gap |
|---|---|---|---|
| number | 0.583 | 0.599 | +0.015 |
| question | 0.993 | 0.993 | +0.000 |
| color | 0.679 | 0.787 | +0.107 |
| food | 0.894 | 0.896 | +0.002 |
| sentiment | 0.551 | 0.759 | +0.208 |
| country | 0.937 | 0.936 | -0.001 |
| person | 0.485 | 0.907 | +0.421 |
| body_part | 0.866 | 0.866 | +0.000 |
| Feature | Linear | Nonlinear | Gap |
|---|---|---|---|
| number | 0.514 | 0.536 | +0.022 |
| question | 0.482 | 0.521 | +0.039 |
| color | 0.521 | 0.531 | +0.009 |
| food | 0.705 | 0.893 | +0.189 |
| sentiment | 0.608 | 0.797 | +0.189 |
| country | 0.677 | 0.858 | +0.181 |
| person | 0.495 | 0.492 | -0.003 |
| body_part | 0.949 | 0.948 | -0.001 |
| Feature | k=1 | k=2 | k=3 | k=4 | Peak k |
|---|---|---|---|---|---|
| number | 0.002 | 0.001 | 0.004 | 0.004 | k=4 |
| question | 0.003 | 0.005 | 0.002 | 0.001 | k=2 |
| color | 0.002 | 0.004 | 0.004 | 0.004 | k=2 |
| food | 0.228 | 0.318 | 0.085 | 0.078 | k=2 |
| sentiment | 0.103 | 0.229 | 0.060 | 0.010 | k=2 |
| country | 0.147 | 0.486 | 0.045 | 0.043 | k=2 |
| person | 0.001 | 0.002 | 0.001 | 0.001 | k=2 |
| body_part | 0.665 | 0.021 | 0.108 | 0.016 | k=1 |
emb → enc → Linear(64,2) → F.normalize → θ. The country logit
is constrained to the k-th harmonic α·cos(kθ)+β·sin(kθ)+b; the other 7 features
use free MLP heads on the circle and act as the spreader. Architecturally induced, not
emergent. Sweep k=1..5.
| k | Linear | Nonlinear | Freq peak | country=1 arcs | Overall acc |
|---|---|---|---|---|---|
| 1 | 0.503 | 0.539 | k=4 | 12 | 0.710 |
| 2 | 0.711 | 0.959 | k=2 | 12 | 0.719 |
| 3 | 0.961 | 0.967 | k=3 | 5 | 0.683 |
| 4 | 0.985 | 0.985 | k=3 | 3 | 0.662 |
| 5 | 0.987 | 0.988 | k=4 | 3 | 0.659 |
Same 2-D circle, three features multiplexed onto distinct harmonics: country→k=2, food→k=3, sentiment→k=4, each with its own harmonic readout; the other five use free MLP heads. One scalar angle is asked to carry three independent bits.
| Feature (target k) | Linear | Nonlinear |
|---|---|---|
| country (k=2) | 0.529 | 0.525 |
| food (k=3) | 0.937 | 0.939 |
| sentiment (k=4) | 0.598 | 0.867 |
| Feature | k=1 | k=2 | k=3 | k=4 | k=5 |
|---|---|---|---|---|---|
| question | 0.773 | 0.823 | 0.183 | 0.038 | 0.121 |
| food | 0.639 | 0.735 | 0.699 | 0.073 | 0.027 |
| sentiment | 0.056 | 0.014 | 0.070 | 0.550 | 0.496 |
| country | 0.005 | 0.005 | 0.002 | 0.001 | 0.002 |
emb → enc → Linear(64,3) 3-D bottleneck. A regulariser pushes country=0
onto ring A (xy-plane, centre origin) and country=1 onto ring B (xz-plane, centre
(1,0,0)) so B threads A (linking number 1); food sets the within-ring angle (spreader).
All 8 features decode through per-feature MLP heads. Loss = BCE + λ·(distance to target ring), λ=1.0.
| Metric | Value |
|---|---|
| country linear probe | 0.533 (near chance) |
| country nonlinear probe | 0.940 |
| linear/nonlinear gap | +0.41 |
| net disc-crossings (linking number) | 1 |
| ring-B arc occupancy | 9 / 12 |
| overall 8-feature acc | 0.806 |
Ordered from clearest failure to clearest success. Most approaches failed to beat the baseline on probe difficulty — and those failures are the most instructive results.
| Encoding | Linear probe | Verdict | Key lesson |
|---|---|---|---|
| Baseline (abs-value) | 0.50 | — | Z/2 symmetry, 1D |
| XOR / parity | 0.95 | Failed — linearised | Depth beats label complexity |
| Helical | 0.99 | Failed — collapsed to 1D | Helix needs multi-valued labels |
| Rotational SO(2) | 0.99 | Partial — orthogonal structure achieved | Binary labels always linearly separable |
| JEPA residual | 0.47 | Informative — erasure not encoding | Explicit erasure strips a feature from a layer |
| Superposition | 0.98 / 0.74 | Partial — geometrically richer | 2D shared encoding; two features, one space |
| MNIST circular (10-class) + unit-norm | 0.51 | Best — genuinely probe-resistant | Multi-class interleaving + unit-norm constraint |
| SAE decomposition (h2, all 256 feats) | 0.83 | Analytical — distributed encoding | Country spreads across many sparse features |
| Bilinear model (country) | 0.993 | Informative — ReLU is the source | Bilinear linearises the rank-1 quadratic form |
| Bottleneck d=4 (unit-norm, emergent) | 0.49 (person) | Emergent — nonlinear by capacity | person: linear=0.49, nonlinear=0.91 (+0.42 gap) |
| Bottleneck d=2 (unit-norm, emergent) | 0.48 (question) | Emergent — angular superposition | body_part k=1; country/food/sentiment k=2 |
| Square wave k=2 (constructive) | 0.711 (country) | Partial — real k=2 code | Harmonic readout leaks to k=1; not sufficient |
| Fourier comb (constructive) | 0.529 (country) | Partial — only sentiment multiplexed | Easy unconstrained feature hijacks low harmonics |
| Linked rings (constructive) | 0.533 (country) | Success — probe-resistant + topological | Non-separable topology (linking #1); +0.41 gap |
|x| (verified linking number 1).
The honest caveats: 0.533 is marginally above 0.471 rather than below it, and the code is constructed,
not emergent. The cheaper constructions show why this is hard — a harmonic readout (square wave k=2 →
0.711) leaks into the k=1 half-circle split, and multiplexing (Fourier comb) collapses country when an easy
unconstrained feature hijacks the low harmonics. The finding: a binary feature already at
chance is near a local optimum for probe resistance, and the only thing that reliably beats a cleverer
two-cluster geometry is a genuinely non-separable structure — multi-class interleaving (MNIST) or a linked
topology (Idea 12). Driving binary country strictly below 0.471 while keeping it weird — and getting that
geometry to emerge rather than be imposed — remains open.