1 00:00:01,000 --> 00:00:05,690 [Hal Turing] Hello AI world! I am your host, Hal Turing, and my co-host is Dr. Ada Shannon. 2 00:00:05,690 --> 00:00:32,718 [Hal Turing] Today we're looking at "When Models Manipulate Manifolds: The Geometry of a Counting Task," by Wes Gurnee, Emmanuel Ameisen, and colleagues at Anthropic. It was originally published on Transformer Circuits on October 21, 2025, and archived on arXiv in January 2026. The question is how a model that only sees token IDs knows when a line of hard-wrapped text is full. 3 00:00:32,718 --> 00:00:48,182 [Dr. Ada Shannon] The answer is that Claude 3.5 Haiku counts characters on a curved low-dimensional surface. Attention heads then rotate that surface to estimate the distance to the line edge. The model sees no pixels, and the width is never stated. It still gets the break right. 4 00:00:48,182 --> 00:01:00,303 [Hal Turing] Take a concrete case. Text is wrapped at an implicit fifty characters, and the line so far is "The aluminum" followed by a few more words. Whether the next word fits depends on how many characters are left. 5 00:01:00,303 --> 00:01:22,641 [Dr. Ada Shannon] Right. The same line breaks before a long word and continues for a short one. So the model needs three things. It counts characters on the current line, which is not the same as token position because tokens vary in length. It infers the width from earlier newlines, each of which only bounds the width. And it compares the characters remaining with the length of the next word. 6 00:01:22,641 --> 00:01:25,288 [Hal Turing] Is this a niche trick, or does it matter in practice? 7 00:01:25,288 --> 00:01:41,449 [Dr. Ada Shannon] It's common in pretraining data: code, email, chat logs, legal text. Michaud and colleagues found newline prediction in fixed-width text among the top four hundred skill clusters, even in Pythia-70M. So small models learn it early. 8 00:01:41,449 --> 00:01:44,932 [Hal Turing] Before we get to the mechanism, the tooling. How do they look inside? 9 00:01:44,932 --> 00:02:20,877 [Dr. Ada Shannon] First, sparse dictionary features. A feature is a learned, mostly inactive direction in the residual stream. Its encoder works like a probe, and its decoder writes back. They use a ten-million-feature crosscoder trained on Haiku, and we won't go deeper than that. Second, attribution graphs, from the circuit tracing work of Ameisen and colleagues at Anthropic in 2025. For one prompt, the graph shows how features excite or inhibit each other on the way to one output logit. It works like an execution trace, and they use it to find the relevant features and heads. 10 00:02:20,877 --> 00:02:24,081 [Hal Turing] And that trace doesn't explain why the features are arranged the way they are. 11 00:02:24,081 --> 00:02:32,208 [Dr. Ada Shannon] Correct. Attention is held fixed in those graphs, so how a head moves information needs separate analysis. That's where the geometry comes in. 12 00:02:32,208 --> 00:02:35,737 [Hal Turing] So what's a feature manifold? I'd expect one direction per concept. 13 00:02:35,737 --> 00:03:18,694 [Dr. Ada Shannon] That's the standard picture from Elhage and colleagues' Toy Models of Superposition at Anthropic in 2022. Many sparse, nearly orthogonal directions, each one a feature. But some quantities are continuous, like angle, year, or character count. Engels and colleagues, 2025, found days of the week and months sitting on circles in GPT-2 and Mistral 7B. Modell and colleagues, 2025, gave a formal treatment of feature manifolds, including ripples and dilation. Kantamneni and Tegmark, 2025, found helical number representations that models use for addition. Olah and Gorton's curve detectors are an earlier example of this kind of structure in vision models. 14 00:03:18,694 --> 00:03:22,224 [Hal Turing] So the count lives on a curve, and position along the curve is the value. 15 00:03:22,224 --> 00:03:42,936 [Dr. Ada Shannon] Yes. Here the paper offers a dual view. Seen as discrete features, a family of them each fires for a narrow range of counts, tiling the curve the way place cells tile a track. Seen as geometry, the activation sits at a point on a one-dimensional curve in a small subspace. The sparse features are the discretized version of that curve. 16 00:03:42,936 --> 00:03:46,419 [Hal Turing] Is that just a place-cell metaphor, or do they claim it's the same thing? 17 00:03:46,419 --> 00:03:53,478 [Dr. Ada Shannon] The analogy is suggestive, and the paper doesn't claim equivalence with biology. It's a similarity in representational form. 18 00:03:53,478 --> 00:03:55,893 [Hal Turing] For the engineers listening, is this like RoPE? 19 00:03:55,893 --> 00:04:18,369 [Dr. Ada Shannon] Loosely. RoFormer, by Su and colleagues in 2021, rotates query and key vectors so attention sees relative offset. There the rotation is designed in and counts tokens. Here nothing is built in, and the model learns a character counter from token lengths. It's the same family of operation, but it emerges from training. 20 00:04:18,369 --> 00:04:20,088 [Hal Turing] One more refresher before we go on. 21 00:04:20,088 --> 00:04:33,741 [Dr. Ada Shannon] The residual stream is the shared vector each layer reads from and writes to. In a head, the QK circuit decides where it attends, and the OV circuit decides what it writes. Next we follow the count through those pieces. 22 00:04:33,741 --> 00:04:38,199 [Hal Turing] Start with the data. How do they get text where the true line width is known? 23 00:04:38,199 --> 00:04:55,103 [Dr. Ada Shannon] They take diverse prose, strip every newline, and reinsert one every k characters, backing up to the nearest word boundary. k runs from 15 to 150 in steps of 5. By the third line, Haiku predicts the newlines correctly with high probability at every width. 24 00:04:55,103 --> 00:04:57,843 [Hal Turing] And inside the model, what does the character count look like? 25 00:04:57,843 --> 00:05:26,636 [Dr. Ada Shannon] Ten features with tuning curves. Usually two are active at once, and each successive feature covers a wider range of counts. That widening is the dilation. If you average the layer-2 residual stream for each of 150 counts and run PCA, six components hold 95% of the variance. The curve is a helix in the first three and a messier twist in the next three. The ten features reconstruct it like a spline, with small kinks near the feature vectors. 26 00:05:26,636 --> 00:05:33,927 [Hal Turing] But a plain linear probe already reads the count with R-squared around 0.985. Why do six dimensions matter? 27 00:05:33,927 --> 00:05:59,283 [Dr. Ada Shannon] Because a good probe doesn't mean the model uses one axis. They call that six-dimensional space the character count subspace, and they test it causally. Zero-ablating it raises loss mainly on newline tokens, compared with ablating a random subspace of the same size. Mean-patching inside those six coordinates also shifts the newline prediction on the aluminum prompt. The exact loss values are only in the figures, so I won't quote any. 28 00:05:59,283 --> 00:06:03,277 [Hal Turing] The probe response plots had strange faint bands off the diagonal. 29 00:06:03,277 --> 00:06:48,835 [Dr. Ada Shannon] That's ringing. Neighboring counts look similar, counts further away dip negative, and counts further still rebound positive. The toy model is a circle of 150 unit vectors, each similar to its neighbors and orthogonal to the rest. Project that onto its top five eigenvectors and the ringing appears. Their simulation puts 100 points on a six-dimensional hypersphere, attracts each to its six nearest neighbors on each side, and repels all the others. It produces the same two rings. That supports one claim: ringing comes from packing a highly curved curve into few dimensions. In three dimensions you get a baseball-seam curve, the same topology seen for hue, dates, and years. 30 00:06:48,835 --> 00:06:50,367 [Hal Turing] Why not just use one dimension? 31 00:06:50,367 --> 00:07:03,324 [Dr. Ada Shannon] Two reasons. A linear map on a one-dimensional code can only scale and shift it, so you can't rotate it to align with another count. And you'd have to either let norms explode across 150 counts or blur neighboring counts together. 32 00:07:03,324 --> 00:07:05,089 [Hal Turing] So how does it detect the boundary? 33 00:07:05,089 --> 00:07:36,575 [Dr. Ada Shannon] Newline tokens carry their own count of the previous line's width. A boundary head's QK matrix twists the character-count manifold so that count i lines up with width k equals i plus a small offset. In the raw residual stream the best cosine similarity is only about 0.25. In that head's QK space it's about 1, just off the diagonal where i is less than k. A random head shows no structure. The head attends to the newline when the line is nearly full, and softmax tolerates the ringing. 34 00:07:36,575 --> 00:07:38,433 [Hal Turing] Does one head cover every distance? 35 00:07:38,433 --> 00:07:54,222 [Dr. Ada Shannon] No. A single head can't tell five characters remaining from seventeen. Several heads with different offsets tile the range, and their summed outputs form a two-dimensional characters-remaining subspace with 92% of the variance. Ablating and patching that subspace is causal too. 36 00:07:54,222 --> 00:07:56,266 [Hal Turing] Then comes the comparison with the next word. 37 00:07:56,266 --> 00:08:20,414 [Dr. Ada Shannon] Characters remaining and next-token length sit in near-orthogonal subspaces. Break when remaining minus length is at least zero, and that's a flat cut. A three-dimensional hyperplane gets an AUC of 0.91 on real data, where 1 is perfect and 0.5 is chance. That number mixes the classifier's error with Haiku's own mistakes in predicting the next word. 38 00:08:20,414 --> 00:08:22,225 [Hal Turing] Where does the count itself come from? 39 00:08:22,225 --> 00:09:00,167 [Dr. Ada Shannon] Embeddings first: token lengths 1 to 14 sit on a circle plus an oscillation, with 70% of variance in three components. Then layer-0 heads use the previous newline as an attention sink for a few tokens and smear attention beyond that. Their output adds roughly the token count times about four characters, plus a correction for unusually long or short tokens. Five layer-0 heads explain 93% of the count variance, and eleven heads across the first two layers reach 97%. So no single head builds the curve. Attention matters about four times more than MLPs here, and layer 1 sharpens the estimate. 40 00:09:00,167 --> 00:09:03,139 [Hal Turing] So is there a test of whether those heads are really used? 41 00:09:03,139 --> 00:09:35,786 [Dr. Ada Shannon] The visual illusions. The heads sometimes attend to the git-diff delimiter @@, so inserting it distracts them. Newline probability on the aluminum prompt starts at 0.79, and @@ pulls it down. Across 180 two-character insertions, most only moderately lower it. A few code or delimiter pairs disrupt it a lot, and the drop tracks how far the attention heads are distracted. An explicit length-comparison version fails the same way. All of this is on synthetic wrapped prose in one model, and we'll come back to that. 42 00:09:35,786 --> 00:09:46,700 [Hal Turing] Let me start with the obvious worry. All this geometry, the helix, the ringing, the twist, comes from prose that the authors wrapped themselves. Does any of it survive on real documents? 43 00:09:46,700 --> 00:10:16,514 [Dr. Ada Shannon] The paper doesn't say. The geometry is measured on synthetic text with newlines reinserted at a fixed width. Real hard-wrapped text has code, markdown links, URLs, and widths that drift. The authors themselves list variable width, LaTeX footnotes, and multi-token words as things they didn't study. What would settle it is simple to state: run the same PCA and the same patching on wrapped code and email corpora, and see whether the six-dimensional subspace still shows up. 44 00:10:16,514 --> 00:10:20,647 [Hal Turing] And the model question. Everything is Claude 3.5 Haiku with one dictionary. 45 00:10:20,647 --> 00:10:45,260 [Dr. Ada Shannon] Right, so outsiders can't reproduce the main figures. The authors point to attribution graphs on Gemma 2 2B and Qwen 3 4B, but they don't analyze them. We don't know whether open models have a boundary-head twist, layer-0 counting heads, or the near-orthogonal subspaces, or whether the offsets and head counts match. Since linebreaking shows up even in tiny Pythia models, small open models are the cheap place to look. 46 00:10:45,260 --> 00:10:51,530 [Hal Turing] Then the headline idea, that features and manifolds are two views of one object. How strong is that? 47 00:10:51,530 --> 00:11:26,220 [Dr. Ada Shannon] Weaker than the framing. They knew which variable to parametrize first, character count, and then showed ten features can rebuild the curve. The rebuilt curve has kinks. Also, the number of features tiling the curve depends on the dictionary. Michaud, Gorton and McGrath, 2025, show that sparse autoencoders split a manifold into more tiles as they grow. So the ten-feature half may be a dictionary property, while the manifold half doesn't depend on the dictionary. The authors themselves call the approach expensive in researcher time, an existence proof rather than a recipe. 48 00:11:26,220 --> 00:11:29,425 [Hal Turing] So the paper is stronger evidence for geometry than for duality. 49 00:11:29,425 --> 00:11:53,434 [Dr. Ada Shannon] That's my reading. The same goes for optimality. The toy model shows ringing is a natural consequence of packing a curve into few dimensions, and that's supported. But the claim that the model's solution is optimal rests on a toy cosine-similarity model and a physical simulation. It hasn't been tested quantitatively against Modell and colleagues' predictions, or against training dynamics, or against alternative solutions. 50 00:11:53,434 --> 00:11:56,871 [Hal Turing] The interventions are the other evidence. How much do they carry? 51 00:11:56,871 --> 00:12:13,543 [Dr. Ada Shannon] They're coarse. Ablation zeroes a subspace at a single early layer. Patching swaps in a dataset mean, which may sit off the manifold's natural statistics. And the argument that this subspace is less entangled with other features, because the count is densely active, is argued rather than tested. 52 00:12:13,543 --> 00:12:18,326 [Hal Turing] What about the illusions? A model distracted by a git-diff marker sounds like a bug. 53 00:12:18,326 --> 00:12:40,524 [Dr. Ada Shannon] Maybe, though in a real diff @@ does mark a new hunk, so a line-count reset isn't obviously wrong. The authors don't claim a direct parallel to human illusions, and only a few code-like pairs strongly disrupt the model. The link between distracted attention and suppressed newlines is a correlation they report, not a demonstrated causal path. 54 00:12:40,524 --> 00:12:46,329 [Hal Turing] Is there a precedent for the number geometry? Kantamneni and Tegmark found helices for addition. 55 00:12:46,329 --> 00:13:03,837 [Dr. Ada Shannon] There the structure is periodic, with clean Fourier components. Here it's a ripple with no clean period, so I wouldn't assume the same algorithm. Engels and colleagues found their circles by clustering features. This paper starts from known labels instead, which is a different and more laborious route. 56 00:13:03,837 --> 00:13:05,695 [Hal Turing] And the counting itself is a heuristic. 57 00:13:05,695 --> 00:13:20,370 [Dr. Ada Shannon] Tokens times about four characters, plus a correction. The analysis covers only layers 0 and 1 and attention; MLPs are set aside. And how line width gets aggregated across earlier lines is explicitly left open. 58 00:13:20,370 --> 00:13:23,620 [Hal Turing] So if we strip it down, what has this work actually established? 59 00:13:23,620 --> 00:13:50,231 [Dr. Ada Shannon] In one model, on a synthetic wrapped-prose task, linebreaking runs through curved low-dimensional count representations. Attention heads twist those curves against each other to estimate how much room is left. The final break decision is close to a linear cut. The ablation and patching experiments support that these pieces are causal. The boundary is that nobody has shown it on natural documents, or in any model outside Claude 3.5 Haiku. 60 00:13:50,231 --> 00:13:52,970 [Hal Turing] For people doing interpretability, what changes in practice? 61 00:13:52,970 --> 00:14:12,382 [Dr. Ada Shannon] Pair the two views. Dictionary features and attribution graphs tell you which variables the model tracks. Where you can name a variable and parametrize it, geometry then tells you how the pieces fit together. The authors call the cost of reading thousands of features separately a complexity tax, and this is their argument for paying some of it down. 62 00:14:12,382 --> 00:14:14,472 [Hal Turing] And the choice of task matters too. 63 00:14:14,472 --> 00:14:29,983 [Dr. Ada Shannon] Yes. They picked something natural, something the model does well, and something you can perturb programmatically. That last property is what let them build the illusions. I'd also expect distributed algorithms. No single head did the counting here, so a search for one clean circuit would have missed it. 64 00:14:29,983 --> 00:14:31,934 [Hal Turing] Is there a lesson about probes too? 65 00:14:31,934 --> 00:14:43,265 [Dr. Ada Shannon] Yes. Watch for probes that fuse quantities, like character count with token position, or count with line width. A probe can score well and still be reading a mixture rather than the variable you meant. 66 00:14:43,265 --> 00:14:45,773 [Hal Turing] Does any of this say something about model behavior? 67 00:14:45,773 --> 00:15:07,785 [Dr. Ada Shannon] Some. It suggests the early layers do real perceptual work, turning token IDs into something like a sense of line length. And the @@ result shows that delimiter-like strings can distort that length tracking. I'd keep it to that. A few code-style pairs disrupted the newline prediction in one setup, and that doesn't support a broad claim about robustness. 68 00:15:07,785 --> 00:15:09,689 [Hal Turing] What do the authors say comes next? 69 00:15:09,689 --> 00:15:28,265 [Dr. Ada Shannon] The big one is finding manifolds without knowing the variable in advance. Here a person had to decide that character count was the thing to parametrize. They also mention hierarchical and macroscopic-weight methods, automatic feature labeling by agents, and more deep case studies of tasks the model does well. 70 00:15:28,265 --> 00:15:30,216 [Hal Turing] And the experiments you'd add yourself? 71 00:15:30,216 --> 00:15:52,646 [Dr. Ada Shannon] Three. First, run the same PCA and patching on naturally wrapped corpora, such as code and email. Second, build transcoder attribution graphs on open models like Gemma 2 2B and Qwen 3 4B, and look for the twist and the near-orthogonal subspaces. Third, test the Modell predictions quantitatively, instead of leaning on a toy model to say ringing is optimal. 72 00:15:52,646 --> 00:16:02,306 [Hal Turing] That third one separates two claims for me. Ringing as a consequence of packing a curve into few dimensions has support. Ringing as the best possible solution doesn't yet. 73 00:16:02,306 --> 00:16:03,095 [Dr. Ada Shannon] Exactly. 74 00:16:03,095 --> 00:16:22,600 [Hal Turing] So here's where I land. In this model, on this synthetic task, a system that only sees integers appears to count characters on a curved surface, rotate it against another to measure the room left, and compare that with the next word using a nearly linear cut. What's still unshown is whether real documents or other models do it the same way. 75 00:16:22,600 --> 00:16:23,854 [Dr. Ada Shannon] That's a fair summary. 76 00:16:23,854 --> 00:16:29,009 [Hal Turing] Thanks to everyone for listening, and thanks, Ada, for walking through it with me. Until next time. 77 00:16:29,009 --> 00:16:30,495 [Dr. Ada Shannon] Thanks, everyone. Goodbye.