TL;DR
Researchers have developed a novel way to measure "syntactic uncertainty" in language models (LMs) by analyzing the text they generate. By sampling multiple completions for ambiguous prompts, they demonstrate that models like GPT-2 track multiple grammatical interpretations simultaneously and respond dynamically to disambiguating cues, much like human readers do.
What Problem Does This Paper Address?
When we read a sentence like "The audience knew the band...", our brains don't wait for the period to start parsing. We incrementally build a structure. However, at this point, the sentence is temporarily ambiguous: the "band" could be the thing the audience knows (a direct object) or the subject of a new clause ("...the band was going to be late").
In psycholinguistics, this is well-studied in humans, but how do neural language models (LMs) handle it? Previous research mostly used "surprisal"—measuring how much a model is "shocked" by a word that resolves an ambiguity. While useful, surprisal doesn't tell us the degree of uncertainty the model holds before the resolution, nor does it easily show if the model is entertaining multiple interpretations at once. This paper proposes using stochastic generation as a window into the model's internal "probabilistic parser."
Methods
The authors propose a "Probing through Generation" framework:
- Prompting: Feed an ambiguous sentence fragment (a "prompt") to an LM (specifically GPT-2 and a Gulordava-style LSTM).
- Sampling: Instead of taking the single most likely next word, use stochastic decoding to generate 100 different completions for each prompt.
- Syntactic Classification: Use an off-the-shelf dependency parser (AllenNLP) to analyze the generated completions. For example, did the model treat "the band" as a direct object or a subject in its finished sentence?
- Uncertainty Estimation: Calculate the proportion of completions that follow each interpretation. If 70 completions use Parse A and 30 use Parse B, the model's "subjective probability" for Parse A is estimated at 0.7.
This approach is unique because it doesn't require the researcher to pre-define "correct" completions; the model reveals its own expectations through its creative output.
Datasets
The study uses curated sentence sets from classic psycholinguistic experiments:
- NP/S Ambiguity: Materials from Grodner et al. (2003) (e.g., "The employees understood (that) the contract...").
- NP/Z Ambiguity: Also from Grodner et al. (2003) (e.g., "Even though the band left(,) the party...").
- Noun/Verb Ambiguity: Materials from Frazier and Rayner (1987) (e.g., "Mary thinks that the pants suit..." where "suit" can be a noun or a verb).
These datasets are designed to trigger "garden-path" effects, where a reader is led toward one interpretation only to find it's wrong later in the sentence.
Key Insights and Ideas
- Parallel Processing: LMs don't just commit to one path. They maintain a distribution over multiple syntactic analyses. The generation method makes this "hidden" uncertainty visible.
- Default Biases: Models exhibit strong structural preferences. For instance, they have a massive bias toward Noun Phrase (NP) interpretations over Sentential (S) ones, mirroring the "late closure" or "minimal attachment" strategies often seen in humans.
- Sensitivity to Cues: Adding a single word (like the complementizer "that") or a comma almost entirely collapses the model's uncertainty, shifting the probability mass to the correct interpretation.
- Lingering Confusion: In NP/Z cases (e.g., "As the couple danced the tango began..."), GPT-2 sometimes produced ungrammatical "blended" sentences. This suggests that once a model starts down a wrong syntactic path, it struggles to "repair" its internal state, leading to structural errors—a digital version of a human "garden-path" moment.
Key Results
- NP/S Ambiguity: Without cues, models preferred the NP interpretation (direct object) but still generated S completions (embedded subject) roughly 20-30% of the time.
- NP/Z Ambiguity: Models showed a near-absolute bias toward the NP interpretation. Without a comma, the probability of the "Zero" (Z) interpretation was nearly 0%.
- Noun/Verb Ambiguity: This showed the highest variance. The model's preference wasn't just structural; it depended heavily on the specific words used, suggesting the model uses lexical frequency (how often "suit" is a noun vs. a verb) to resolve ambiguity.
- Validation: The generation-based probabilities correlated strongly with traditional surprisal measures (Spearman’s $\rho$ between -0.70 and -0.81), proving that generation is a valid proxy for the model's internal syntactic state.
Limitations and Future Work
- Parser Reliability: The method relies on an external syntactic parser to label the completions. If the parser makes a mistake, the uncertainty estimate is skewed.
- Ungrammaticality: The authors noted that models sometimes generate ungrammatical text when confused. Currently, the method discards these or forces them into a category; future work could treat ungrammaticality itself as a signal of high syntactic conflict.
- Scope: The study focused on three specific English ambiguities. Expanding this to more complex structures (like relative clause attachments) or other languages would test the universality of these findings.
Summary updated