Neural language models hide a surprising amount of grammar in their internal vectors. A structural probe is a small linear map that turns word vectors into distances, trained so that the distance between two words approximates how many edges separate them in the sentence's syntax tree. Yet the same models that score well on these probes still make agreement errors a person would not. In "The writer who knows the happy young journalists climbs/climb," a model can be pulled toward "climb" by the adjacent plural noun. That noun is called the attractor, and the pull it exerts has been named the "bigram lure."
The usual probe cannot connect these two facts. It produces one undirected tree per sentence through a heuristic decoding step. It gives no confidence for any individual attachment, so it cannot say whether, in a particular sentence, the model's own geometry treats the attractor as the word that controls the verb. We propose to retrain the probe as a tree-structured conditional random field (CRF): a model that assigns a properly normalized probability to every possible dependency tree. The probe would then return a calibrated probability for each attachment. We use those probabilities for three things: to predict, one sentence at a time, when the model will fail at agreement; to track how that confusion rises and falls during pretraining; and to intervene on the probed subspace to test whether the model actually uses this geometry to choose the verb.
Core Claim
The open problem is that structural geometry is measured only on average and only by correlation. A Structural Probe for Finding Syntax in Word Representations learns a low-rank matrix $B$ so that squared distances between transformed vectors match tree distances, then decodes with a minimum spanning tree. BERT-Large layer 15 reaches 82.5 UUAS, the share of word pairs correctly linked when edge direction is ignored. A linear-chain baseline reaches 48.9. Meanwhile Assessing the influence of attractor-verb distance on grammatical agreement in humans and language models shows a fine-tuned T5 falling to roughly 50% error when a plural attractor sits right before a singular verb, while humans rarely drop below 80% accuracy. Nothing in the existing toolkit says whether those failures reflect wrong structure inside the model, right structure the model ignores, or a separate number signal.
Our claim is twofold. First, if the probe keeps the same geometric parameterization but is trained with a globally normalized tree likelihood, its marginal probability that the attractor attaches as the verb's dependent will predict sentence-level agreement errors. It should do so better than the condition label (proximal or distal attractor), better than probe distances decoded with a minimum spanning tree, and with information a linear "number" probe does not capture. Second, editing representations only inside the probed subspace, toward the correct tree, will repair agreement more than equally sized random or number-only edits. If both claims hold, tree geometry has a causal role in agreement. If the first holds and the second fails, the geometry is something the model represents but does not use, which is itself a clear answer to an open question.
Method
Let $h_1,\dots,h_n$ be a sentence's vectors at layer $\ell$. We keep the probe as geometric as the original: a rank-$k$ distance map $B$ and a depth map $C$. These define the score for word $i$ heading word $j$ as
$$s_{ij} = -\|B(h_i-h_j)\|^2 + \lambda\left(\|Ch_j\|^2 - \|Ch_i\|^2\right),$$
where the second term rewards a head being shallower than its dependent and $\lambda$ is learned. The probability of a directed tree $y$ is
$$P(y\mid x)=\frac{\exp\sum_{(i\to j)\in y}s_{ij}}{Z(x)}.$$
Here $Z(x)$ sums over all directed spanning trees and is computed exactly by the Matrix-Tree theorem. Arc marginals come from differentiating $\log Z$. That trick is borrowed from Efficient Second-Order TreeCRF for Neural Dependency Parsing, which obtains exact marginals by automatic differentiation through the inside algorithm. Exact non-projective inference via the Matrix-Tree theorem is also used by CRF Autoencoder for Unsupervised Dependency Parsing.
Because $B$ and $C$ have exactly the parameters of the original distance and depth probes, any gain comes from the training objective and the normalization, not from added capacity. This is what separates our probe from three neighbors. Neural CRF Parsing and the second-order TreeCRF are built to be strong parsers with rich scorers. Derivational Probing times when structures emerge across layers, finding that BERT-base forms local relations around layer 4 and the sentence backbone around layer 6, but it does not give per-sentence attachment probabilities.
Research Program
We first train the probe on Penn Treebank converted to Stanford Dependencies, matching the Hewitt and Manning setup. We repeat this on Universal Dependencies English for robustness. Every layer is probed for BERT-base, BERT-large, GPT-2, and the PolyPythia checkpoints studied in Disaggregation Reveals Hidden Training Dynamics: The Case of Agreement Attraction.
On agreement items we compute an attractor confusion score $q$: the CRF's marginal mass on arcs that make the attractor, rather than the true subject, the noun attached to the verb. The items are the minimal triplets of Zacharopoulos et al., the subject-verb agreement subsets of BLiMP, and "key to the cabinets"-style items. For each item we also record the model's own preference between the correct and incorrect verb forms.
Three analyses follow. The first measures how well $q$ predicts errors. The second follows $q$ over Pythia training. If the "local context trap" between steps 128 and 512 reported by Michaelov and Arnett is structural, $q$ should rise during that window and fall at the breakthrough. If it is a surface number heuristic, $q$ should stay flat. The third relates the layer where $q$ is lowest to Someya et al.'s finding that agreement fails when global structure forms too early or too late.
Finally, we intervene. We move the verb's and attractor's vectors within the rank-$k$ subspace along the gradient of the CRF log-likelihood of the gold tree, leave the orthogonal complement untouched, and re-measure the verb preference.
Baselines
The naive reference is the condition label alone, meaning whether the attractor is distal or proximal and whether its number matches the subject's. It is used as a predictor of errors. Zacharopoulos et al. show that this label already explains much of the error pattern, so the probe must add predictive power beyond it.
The strongest existing probe is Hewitt and Manning's distance-plus-depth probe decoded with a minimum spanning tree. Its reported result is UUAS 82.5 and distance correlation 0.87 for BERT-Large layer 15, against a linear-chain baseline of 48.9 UUAS. We retrain it on the same splits, layers, and rank $k$, with the same tuning budget. As an error predictor, its confusion score is the difference in probe distance between attractor–verb and subject–verb. Beating it means two things: matching its UUAS within one point while exceeding it on directed attachment accuracy and on calibration of arc confidence, and achieving higher area under the ROC curve for predicting agreement errors after controlling for the condition label.
A competing diagnostic is a linear classifier that reads grammatical number off the verb-position vector. It is trained on the same data and given the same rank, and it is included because it explains errors without any structure.
As an upper-capacity reference we include the second-order TreeCRF parser run on frozen layer vectors. No reported result was found on Lacuna for this parser on English PTB. Its CoNLL-09 Chinese result of 89.63 UAS serves only as a sense of full-parser strength. This parser is not a target to beat on parsing accuracy. We report it so readers can see how much parsing accuracy we give up by staying linear.
The key ablation trains the same $B$ and $C$ with the original distance-regression loss and then decodes with the CRF. This separates "globally normalized training" from "probabilistic decoding of an ordinary probe." For the intervention, the controls are equal-norm edits in a random rank-$k$ subspace, in the Hewitt–Manning subspace, and along the number-probe direction.
Why not just…?
Why not just use the Hewitt–Manning probe with its distances as a confidence score? Raw distances are not normalized across competing trees. An attractor can be close to the verb while the subject is also close, and the distances alone cannot say which attachment wins. This is a real threat, so it is the main baseline. If the regression-trained ablation decoded with the CRF matches our predictive accuracy, the contribution reduces to "add a normalized decoder," and we will report it that way.
Why not just train a full TreeCRF or biaffine parser on the layer vectors? A nonlinear parser with its own scoring networks can build structure the language model never uses. Its marginals would describe the parser rather than the model's geometry. It also has no low-rank subspace to intervene on. We keep it as a capacity reference, not as the diagnostic.
Why not just probe for the verb's grammatical number? A number probe can say that the model has the wrong number but not why. It is likely to predict errors well, which makes it a genuine competitor. The decisive test is dissociation: whether $q$ adds predictive power beyond the number probe's output, and whether structural-subspace edits and number edits repair different sets of items. If structure adds nothing on either test, we conclude that agreement attraction is not a structural failure in these models.
Proposed Experiments and Decisive Checks
The first check is parity. On held-out PTB, the CRF probe should reach UUAS within one point of the Hewitt–Manning probe at the same rank, with better directed attachment accuracy and lower expected calibration error on arc marginals.
The second is error prediction on the Zacharopoulos triplets and the BLiMP agreement sets. In a logistic model that already includes the condition label and the number-probe output, $q$ should carry a significant positive coefficient and should raise the area under the ROC curve over the MST-distance score. Significance is assessed by bootstrap over items.
The third is the training-dynamics test on PolyPythia. This is falsifiable in both directions: $q$ either moves with the local-context-trap window or it does not.
The fourth and most decisive is the intervention. Edits toward the gold tree in the CRF subspace should reduce proximal-incongruent errors more than random-subspace or Hewitt–Manning-subspace edits of equal norm. The result should also differ in item coverage from number-direction edits. A null result here, alongside strong error prediction, would show that the tree geometry tracks the model's failures without driving them. That is a finding worth publishing, because the field currently treats high probe scores as evidence that models use the structure.
References
- A Structural Probe for Finding Syntax in Word Representations
- Assessing the influence of attractor-verb distance on grammatical agreement in humans and language models
- Efficient Second-Order TreeCRF for Neural Dependency Parsing
- CRF Autoencoder for Unsupervised Dependency Parsing
- Neural CRF Parsing
- Derivational Probing: Unveiling the Layer-wise Derivation of Syntactic Structures in Neural Language Models
- Disaggregation Reveals Hidden Training Dynamics: The Case of Agreement Attraction
- BLiMP: The Benchmark of Linguistic Minimal Pairs for English