Garden Path Sentences
Garden Path Sentences (GPS from here on) are sentences like this one: “The old man the boat.”
Reading the sentence word by word, we initially parse “The old man” as a noun phrase meaning an aged male. But when we reach the end, we realize that “man” isn’t a noun at all — it’s a verb, in the sense of “to crew” or “to operate.” Only then do we backtrack and reinterpret the sentence as “the old [people] operate the boat.” I don’t think I know any examples in Italian.
While a person reads this kind of sentence, their eyes make rapid movements called saccades, which take them back to re-read the words they’ve just read once the interpretation has changed.
But when an LLM — a language model like the ones behind ChatGPT or Claude — reads a GPS, it can’t go back: its mechanism, called autoregressive, means that reading always proceeds forward only, never actually able to return to an earlier point.
So I asked myself how these models manage to interpret this kind of sentence correctly, and I used the question as a way to learn how these models work, and what tools we can use to interpret them.
How to look for an answer
The discipline that investigates the inner workings of LLMs is Mechanistic Interpretability, so I made use of the tools it provides to investigate what happens inside a model at the moment it reads a GPS.
A brief description of LLMs
A very simplified explanation of how LLMs work: they are models that take text as input, and as output return a list of all the words they know together with the probability each word is assigned of being the one that continues the input. To be precise, they don’t use words but tokens, which can be short words or pieces of longer words.
Each input token is turned into a list of numbers, an embedding, that represents its meaning. This input is then passed through a series of repeated layers made of two structures: Multi Layer Perceptrons (MLPs) and Attention Heads, whose outputs are written into the model’s internal state, called the Residual Stream.
MLPs act on each embedding individually, writing into the Residual Stream by drawing on the model’s “knowledge,” while Attention Heads, for each embedding, combine information from all (and only) the preceding embeddings to add meaning extracted from the sentence’s context.
At the end, the last embedding of the Residual Stream is transformed into the list of probabilities that becomes the model’s output.
What to look for
I focused on two words, and on their surprisal value: this represents how surprised a model is by the presence of a word in the text. The more uncertain a model is while reading a word, the higher its surprisal. We can retrieve this value, but it has NO effect on the reading or generation of the text.
They are the key word that provides the correct interpretation of the sentence, the second “the,” and the word immediately after it, “boat.”
I expect the surprisal of the first one (s_the) to be very high: an LLM trained on countless sentences with a different structure won’t expect a word that, while correct, is unlikely. It’s a way to estimate how much the model genuinely doesn’t expect a GPS.
I expect the surprisal of the second one (s_boat) to be high, but to decrease if the model has resolved the GPS and understood that “man” was a verb. This value therefore estimates how much the model has actually understood the meaning of the text.
The models used
I made a first attempt with the Qwen3 models at 4B and 14B. But having only two data points wasn’t enough, so I repeated everything, with a few additions, using the Gemma3 models.
Google’s Gemma3 family has several models of different sizes but with similar architecture and training. I therefore ran the experiments on four models at different scales: 1B, 4B, 12B, and 27B.
The smallest model, 1B, has one billion parameters: this means the model learned, during training, the value of one billion constants that it now uses to compute what text to produce. It’s a very small model, one that can comfortably run on a smartphone, able to understand English but with little knowledge.
| Model | Parameters | Layers | Attention Heads per layer |
|---|---|---|---|
| 1B | 1 billion | 26 | 4 |
| 4B | 4 billion | 34 | 8 |
| 12B | 12 billion | 48 | 16 |
| 27B | 27 billion | 62 | 32 |
The sentences used
To test the models I didn’t only use GPS: for the 50 sentences I used, I also analyzed in parallel the models’ behavior while they read very similar sentences, but ones whose syntax is linear. For example, for “the old man the boat,” I compared how the model read “the old people man the boat,” where the presence of “people” acts as a disambiguator before the actually ambiguous part begins.
Hardware
All the experiments were run on my Macbook M1 Max 64GB, except for the tests on the 27B model: suspecting it might exceed the available RAM, I used modal.com, at a negligible cost.
Part I: Surprisal and Attention Heads
Every model, from the smallest to the largest, is surprised by GPS. s_the is always very high. My first intuition was to look in the Attention Heads for the model’s ability to interpret GPS.

I expect that, if the model is able to untangle the meaning of the sentence, it does so thanks to some Attention Head — perhaps a specific one — that looks at the rest of the sentence and extracts the correct meaning from it.
So I used a tool typical of Mechanistic Interpretability: ablation. This means removing the effect of parts of the model to see how it impacts the output. If I expect an Attention Head to be responsible for reinterpreting GPS, removing it should ruin the model’s ability to understand them.
I therefore looked for the Attention Heads that, when removed, had the greatest impact on s_the, ablating them one by one. These were good candidates for the circuit that let the model recognize and interpret GPS.

A pattern can be glimpsed: as the model grows, even ablating the best Attention Heads gets closer to the background noise, to the point that in the 27B model no Attention Head has an effect any different from removing one at random. The most likely conclusion is that in larger models this role is spread across several Attention Heads. As an aside, Qwen3 also suggested similar behavior.
To confirm that those single Attention Heads have the role of recognizing and interpreting GPS, they would also have to show that they lower s_boat: if ablated, the model should have a higher surprisal. Ablating any of the Attention Heads gave a result no different from the background noise, showing that none of them has this role.

Part II: Memory
Having failed on the first attempt, I checked a possible problem: rare as they are, GPS do appear in the training dataset. “The old man the boat” is a textbook example. It’s possible the models don’t interpret them at all but have memorized them, as often happens in LLMs with sentences that recur rarely in their dataset.
So I wrote 10 new GPS, with the same structure as the existing ones but different words, and compared how the models fared on the textbook sentences versus the ones they had never seen. If it were memory, they should do much better on the textbook sentences.
The result, as in the first round, doesn’t support the initial hypothesis: the new sentences don’t do worse than the famous ones, each sentence gives different results, and with only 10 sentences the confidence intervals are very wide. In the 27B — the only one where the uncertainty narrows enough to say anything clear-cut — the result points in the opposite direction from memorization.
Part III: Activation Patching
Ablation has a limit: if interpreting GPS isn’t the responsibility of a single Attention Head but is spread across many different ones, disabling them one at a time will never produce significant results.
To keep investigating, I therefore moved to a different tool: Activation Patching. This means replacing parts of the Residual Stream, the LLM’s internal state, with parts extracted from the same model in other situations.
I used the unambiguous sentences (“the old people man the boat”) for this part: in those, the model knows from the start what role to assign to the words “man” (the ambiguous word) and the second “the” (the key word). I therefore computed s_boat for the normal sentences and for the GPS, observing a marked difference between the two classes of sentences: the value was, as expected, higher in the GPS.
Then I applied Activation Patching: I had the models read the GPS, but replaced in their internal state the embedding of “man” (and, in one variant, the embedding of the second “the” as well) with the one extracted from the unambiguous sentence, effectively injecting the correct interpretation. I tried the substitution at each layer, measuring each time how much it improved s_boat.
The results show that:
-
In the small models (1B and 4B) the patch on “man” only works in the very first layers (the first two, out of 26 and 34 in total). After that it becomes too late: the model has already decided that “man” is a noun and doesn’t go back.
-
In the large models (12B and 27B) the patch works for the first half of the layers, and has a smaller residual effect up to about 70% of the model’s depth: the larger models take more “time” to decide the meaning of words.
The point at which the large models “close” the decision on the meaning of words is fairly stable: roughly halfway, both for Gemma 12B and Gemma 27B, but also for Qwen 14B when I tested it. It seems a plateau is reached — despite the doubling in size — around the point where the model stops reasoning about the meaning of the input.

These are of course hypotheses, but what it looks like is that the substantial difference between similar models as size varies is not in the surprise at facing a GPS, nor in how well it can resolve one, but in how long the model stays open to deciding the meaning of a word.
Part IV: Bonus for the 27B
The 27B model gave one last result that wasn’t there in the first round, or was there only in weak form.
Looking for where comprehension lives — measured as a model’s ability to have a low s_boat — I tried ablating entire layers instead of single heads. In the 27B, the most important was layer 6: disabling it noticeably worsens s_boat while leaving s_the unchanged, and it doesn’t disturb the unambiguous sentences. The interesting thing is that during the step where single Attention Heads were ablated, the sum of their ablations turns out to be the opposite, so the result is only obtained by acting on the whole layer, and not on the Attention Heads one at a time.

This, read together with Part I, seems to tell us that the Attention Heads that impact s_the, the surprise, are not involved in s_boat, the comprehension, and vice versa. And if I wanted to continue, I would probably restart from this result on layer 6.
Conclusion
From what I’ve understood of the six models I analyzed (four Gemma3, two Qwen3), there doesn’t seem to be a “GPS circuit,” a set of Attention Heads that lets them reinterpret the role of words already read. What we see instead is a robust surprise, identical across all scales, which in the large models doesn’t belong to any particular component; a comprehension cost that never fully disappears; a comprehension process separate from the surprise, which in the 27B even seems to have a fairly precise location; and a strategy that depends on scale, with the small models deciding right away and the large ones keeping the ambiguity open until halfway through the network.