Skip to content

Your Embedding Cosine Is Measuring Text Length

#representation-geometry #sparse-autoencoders #weight-space-programming #interpretability #model-editing

Your Embedding Cosine Is Measuring Text Length ​

A mean pairwise cosine similarity of 0.8 across six million comments reads like a finding about discourse convergence. In an uncentered, mean-pooled DeBERTa-v3 space it's mostly a finding about how many words each comment has.

The paper behind that number does something blunt. Take the same 6.06 million Reddit comments and truncate them from 10 words to 150 words. Measure again. The mean cosine rises by eight times the effect originally reported as evidence of post-ChatGPT homogenization. Eight times.

Then come the controls. Swap every comment for a random comment of equal length: that placebo reproduces 81% of the political asymmetry. Run a fixed-content simulation where only length varies: 78%. A PCA on the raw space shows the leading principal direction carries 99.9% of the DeBERTa homogeneity signal. One direction, almost all the variance, and that direction is length.

Key Numbers6.06M Reddit comments in the main corpus, plus 575K Stack Exchange answers in the replication. 8x how much larger the truncation effect is than the originally reported break. 99.9% of raw DeBERTa homogeneity carried by the leading principal direction. 31 studies censused for the same failure mode. 81% and 78% of the asymmetry reproduced by two length-only controls.

Handle length and the asymmetry vanishes under every encoder tested. The corrected measure tells a different story than the original paper: the two political camps converged between 2019 and 2022, and stopped converging before ChatGPT shipped.

Three controls that separate geometry from word count ​

The protocol is the useful artifact here, not the finding. You stratify by length, you check whether the measure moves when only length moves, and you run a placebo that destroys content while preserving the length distribution.

That last box matters more than it looks. The same paper runs a reverse control on a well-known experiment and shows that centering with renormalization can flip a genuine effect's sign. Fixing anisotropy can break a real signal as easily as it fixes a fake one. If your corrected measure reverses direction after adjustment, you owe yourself an argument for why the adjusted version is the true one.

Quick Take ​

Before you interpret any mean-pooled cosine as a property of meaning, check whether the number moves when you change only the length of the input.

The Stack Exchange result is the one I keep coming back to. On 575,000 technical answers, the measure reports post-ChatGPT homogenization at a level the placebo fully reproduces. Fully. Meanwhile the answers got longer. A convergence metric that reports homogenization while the underlying text is doing the opposite of converging is not measuring convergence.

One corrected finding is worth keeping. Cross-camp replies sit closer to their targets than same-camp replies do, in the space that survives the length correction. That's a geometric claim about engagement, and it's the kind of thing these measures can support once the length axis is out of the way.

Baking geometry into weights without a gradient step ​

The second paper asks whether an analyst model can make a frozen target model's latent space better organized by looking only at geometry. No gradient training, no raw weight access.

The pipeline is short. Compute fixed-size topological descriptors per layer, hand the analyst a digest, let it propose a transformation, and write that transformation into the feed-forward weights with closed-form ridge regression.

Across 126 runs on lightweight models, category purity rose on unseen words and sentences while benchmark accuracy stayed inside sampling error. That combination is the whole point. Purity going up is easy if you're willing to wreck the model. Purity going up with accuracy flat means the edit reorganized the space without spending capability.

The analyst also matched a category-aware heuristic while making gentler edits than the heuristic did. In a five-model round robin, 16 of 20 pairs raised purity and four left the target unchanged. Four no-ops out of 20 is a fair failure rate for a first baseline, and worth remembering before anyone claims this is solved. The paper frames itself as exactly that: a baseline for training-free, LLM-guided editing that never touches raw weights.

What a replication sprint tells you about weight-space programming ​

Researchers at MIT reported that a frontier model can write the weights of small neural networks in a single reply, and can read raw weights to say what a network was trained to do. A three-day replication sprint reproduced it and then pushed on the edges. The results are more interesting for what they bound than for what they confirm.

The headline number holds up. Networks written for Breakout scored 514, 550 and 307, against MIT's 517.

They also scored comparably on two modified versions of Breakout, which kills the "memorized a known reference implementation" explanation. Claude Opus 5.5 can write working networks too, but often exhausts its output token budget partway through. Writing weights is a formatting problem as much as a capability problem, and the token ceiling is a real constraint right now.

TaskGPT-6 AstraClaude Opus 5.5Practical read
Write a Breakout network514, 550, 307 (baseline 517)Works, often hits token limitGame policies compile cleanly
Classify handwritten digits~50% averageNot reportedBelow a simple 82% classifier
Name the game a network playsNear perfectNear perfectInput-layer layout is readable
Recover board layout, novel gamesPartialNot reportedFinds where things are, misses the rules
Flag a poisoned small LM10/10Not reportedDetection from weights alone works
Flag a model poisoned by extra training7/10Not reportedDegrades with subtler edits
Flag a malicious adapter23/32Not reportedAdapters are harder than base weights
Name the trigger or behavior0Not reportedAuditing stops at detection

The digit result sets the ceiling. 50% average on classifying handwritten digits, against 82% for a simple classifier, means the written network functions as a compiled program. Its job is to run, not to generalize. Two models independently decompiled Astra's Breakout network into Python that matched its actions in every tested state, which fits the compiled-program picture exactly.

Reading weights turns out to be mostly reading the input layer. On three games the replicators designed and trained themselves, Astra recovered where objects sit on the board and mostly missed how the game works. Auditing from weights alone is shallow in the same way: it found a poisoned small language model in 10 of 10 runs, one poisoned by additional training in 7 of 10, and a malicious adapter in 23 of 32, and never once identified the trigger. Open-weight models lag behind on all of it.

My read: this is a genuine capability with a narrow shape. Compile a program you already know how to write, inspect the input encoding of a network you didn't. Don't hand it a weight file and ask for an explanation.

Self-consuming training drifts the representation, and reconstruction won't tell you ​

The fourth paper tracks five generations of a model trained on its own outputs, matched against a control trained on real data with identical settings. At each generation it measures how well a sparse autoencoder trained before the loop transfers forward.

Zero-shot SAE performance degrades progressively. Reconstruction and sparsity gaps grow, and they vary a lot by layer. Fine-tuning the original SAE on each generation largely restores reconstruction. Then sparse probing shows the part that matters: task-relevant information stays accessible in the full latent space while becoming less concentrated in individual latents.

GenerationZero-shot reconstructionZero-shot sparsityAfter SAE fine-tuneTask info in latents
Control (real data)BaselineBaselineNot neededConcentrated
Early self-consumptionSmall gapSmall gapRestoredSlightly more distributed
Late self-consumptionLarge gap, layer dependentLarge gap, layer dependentRestoredAccessible but spread out

If you run interpretability tooling against a moving model family, the failure mode is now specific. A fine-tuned SAE reports healthy reconstruction on the new generation and is quietly worse at the thing you bought it for. Reconstruction fidelity is a property of the autoencoder. Feature concentration is a property of the model. They stop agreeing.

Common Pitfalls ​

  1. Reporting uncentered mean-pooled cosine with no length control. Truncating your inputs changes the number more than the effect you're publishing. Run the equal-length placebo and report both numbers.
  2. Reading the top principal component as a semantic axis. When one direction holds 99.9% of the signal in a mean-pooled encoder, that direction is usually an artifact of pooling and length. Check what it correlates with before you name it.
  3. Assuming recentering preserves your effect. Centering with renormalization can reverse a real signal, so treat the sign flip as a finding to explain, not a bug to suppress.
  4. Using SAE reconstruction loss as your health dashboard across model generations. Fine-tuning restores reconstruction while feature concentration keeps falling. Switch the check to sparse probing on a known task.
  5. Treating "the model can read weights" as "the model can explain the network." Reading recovers input-layer layout reliably and behavior almost never. Detection rates of 10/10 mean poison was found, not that the trigger was understood.
  6. Judging a baked weight edit by accuracy alone. Purity and accuracy move independently, and a run that leaves accuracy flat has told you nothing about whether the geometry improved.

One Thing to Remember ​

Every method in this cluster is a measurement made through a projection. Mean pooling projects the residual stream onto a length-sensitive direction. Topological descriptors project a layer onto a digest an analyst can read. A sparse autoencoder projects activations onto a fixed dictionary learned at one point in time. The projection is where the errors live, and each of these papers found the errors in a different place: pooling hides length, SAEs drift under distribution shift, weight reading mostly sees the input layer. Check the projection before you trust the claim.

The Bottom Line ​

If you're publishing any embedding-similarity claim about a corpus over time, run the length-matched placebo before you run the analysis. It costs an afternoon, it reproduced 81% to 100% of published effects in two separate corpora, and it's the difference between reporting a social trend and reporting word counts.

If your interpretability stack has to survive across model generations, budget for SAE fine-tuning and move your health metric from reconstruction to sparse probing concentration. Self-consumption training degrades zero-shot SAE transfer progressively, and a fine-tuned SAE that reconstructs well while spreading task information across hundreds of latents will pass every check you currently run.

If you're evaluating weight-space programming as an audit tool, scope it to input-layer recovery and detection. It identifies a poisoned model from weights alone at 10 of 10 on clean cases but drops to 7 of 10 for post-training contamination and 23 of 32 for adapters, and it never names the trigger. Watch that trigger-identification gap. It's the number that has to move before weight-based auditing replaces execution-based testing.