Elamur Research

Assessing the ability of Transformer-based Neural Models to represent structurally unbounded dependencies

Paper · 2020 · Jillian Da Costa and Rui Chaves

Summary

A question can introduce a person or thing long before the sentence reaches the place where that person or thing belongs. In an indirect question about which lawyers someone believed were upset, the lawyers are named near the beginning, but they are the understood subject of the verb near the end. That verb must still be plural. Da Costa and Chaves ask whether neural language prediction systems learn this connection well enough to preserve grammatical number across intervening clauses. They also ask whether the systems can tell when a sentence calls for a missing element, even when there is no agreement ending to give them a clue.

The paper tests these abilities by changing selected parts of closely related English sentences. In the agreement tests, the authors vary whether the noun and verb are singular or plural and add intervening clauses. In another set of tests, they vary whether the sentence introduces a phrase such as what and whether a later position contains an overt pronoun or is left empty. In both cases the evidence comes from the probability assigned to a particular word. If changing a distant noun changes the probability of the corresponding verb in the expected direction, the system is sensitive to agreement across the dependency. If the probability of a word after a potential gap depends on whether an earlier phrase licenses that gap, the system is sensitive to a different aspect of the construction.

The recurrent networks examined in earlier studies generally fail to show the expected agreement pattern. Moving to a Transformer does not make the problem disappear. Transformer-XL and XLNet give weak results, while BERT and GPT-2 fare better under several conditions. BERT favors agreeing forms across the tested depths in it-clefts, a construction that singles out a phrase, and changes its agreement preference when an overt subject occupies the gap. GPT-2 shows a clear agreement preference in both clefts and indirect questions, although the gap between agreeing and disagreeing conditions tends to narrow with deeper embedding.

The results depend on where and how the probability is measured. BERT picks up several expected distinctions when the test word is a preposition followed by more text. The pattern changes sharply when the test word is a sentence-final adverb. GPT-2 also shows different patterns across the question constructions. The study puts pressure on a broad claim about grammatical learning. A system can anticipate a gap under one set of conditions and still struggle to preserve its agreement features or recognize when a different sentence structure makes that gap impossible.

Deep dive: Assessing the ability of Transformer-based Neural Models to represent structurally unbounded dependencies

Da Costa and Chaves test whether recurrent and Transformer networks can track missing sentence elements and preserve grammatical agreement across clauses. · about 33 minutes to read

The problem and its context

An empty position can carry grammatical information

Consider an indirect question about which lawyer a speaker thinks was upset. The phrase which lawyer makes clear who was upset, even though the place before was where an ordinary subject could appear remains empty. In the plural version, the later verb has to be were. Adding a report of what somebody said between the question phrase and the verb separates the relevant words without changing which noun supplies the number of the verb. Explaining that persistence is a problem of syntax, the way words and clauses are organized and related within a sentence.

The phrase pronounced near the front is called the filler. The silent position associated with it is called the gap. A filler can have different roles at the position of its gap. The lawyer example has a subject gap. In the paper’s questions about the topic of a conversation, what corresponds to the missing object of about. Those cases give the authors different ways to study the same general kind of dependency. With a subject gap, they can check whether the verb carries the right number. With the object of a preposition, they can check whether the predictor behaves as if that position could be empty in the first place.

In a cleft, the relevant noun appears in a frame such as It was the lawyers, followed by a clause introduced by who. The plural information comes from lawyers. The later clause contains the gap that serves as the subject of the tested verb, and who connects that gap to the fronted noun. In an indirect question, which comes before the noun inside the fronted phrase. The two constructions arrange the words differently, yet both require the number associated with the noun at the front to matter at the distant subject position. That shared requirement makes it possible to ask whether a successful prediction transfers across constructions.

The term structurally unbounded describes the kind of connection under study. The filler and gap can lie on opposite sides of intervening clause boundaries, and a sentence can be extended by adding further clauses. The dependency is defined by the roles the phrases play in the sentence. No particular count of intervening words defines it. The experiments necessarily use a finite range of depths. Their purpose is to see whether the expected behavior persists as the particular sentences are extended.

Distance creates several opportunities for a prediction system to go astray. A clause inserted into the middle can introduce its own subject and verb. A nearby pronoun can therefore belong to an intervening clause while the distant noun remains relevant to the target verb. The additional words also change the surrounding sequence and can make a continuation less probable in general. Sensitivity to agreement is visible when the system gives the matching noun–verb combination an advantage over its carefully chosen counterpart at the same depth. A general change in how expected words are as a sentence gets longer addresses a different question.

What earlier gap tests had established

The authors situate their work alongside studies that use neural prediction to investigate questions from psycholinguistics, including how expectations change as a sentence unfolds. They point to earlier work on syntax-sensitive agreement, including Assessing the Ability of LSTMs to Learn Syntax-Sensitive Dependencies and Colorless Green Recurrent Networks Dream Hierarchically. LSTM stands for long short-term memory. In the recurrent networks considered here, information from earlier words can influence predictions later in the sequence. That makes these networks a natural subject for experiments about whether expectations survive across intervening material.

The paper contrasts the recurrent work with the historical difficulty that Markovian language prediction had with long-distance constructions. A predictor that depends on a limited local history has a particular difficulty with information that was introduced before that history begins. The authors also cite research on how recurrent systems respond to grammatical dependencies and maintain information about a sentence as it unfolds. The question is whether the information they preserve is specific enough to account for the range of grammatical effects associated with a gap. RNNs as Psycholinguistic Subjects: Syntactic State and Grammatical Dependency

The closest precedent is What Do RNN Language Models Learn about Filler-Gap Dependencies?. Da Costa and Chaves also discuss subsequent experiments by Wilcox and colleagues that reported evidence for a filler influencing expectations at a gap across at least four clausal boundaries. The earlier evidence concerned whether seeing a filler changed the treatment of a later potential gap. The new paper asks what else must be preserved for that behavior to amount to learning the English construction. In particular, if the absent element is the subject, its relationship to the filler has a consequence for the form of the verb.

The distinction can be seen in what each prediction requires. When the test concerns whether a gap is expected, the presence of a phrase such as what can be the crucial information from early in the sentence. To predict which verb can follow a subject gap, the system must also respond to features of the antecedent, such as whether the noun denotes a singular or plural subject. An expectation that something will be missing leaves open how much information about that missing element remains available later.

A further motivation comes from changes in general language prediction. By the time of this paper, Transformer systems had achieved lower test-time perplexity than the recurrent systems under discussion. Perplexity summarizes how much probability a predictor assigns to the words encountered across an evaluation text. A grammatical probe asks a narrower question, since it is built around a particular dependency and specific alternative word forms. The paper therefore compares the earlier recurrent systems with attention-based architectures and situates its BERT evaluation alongside earlier work on BERT’s subject–verb agreement. Assessing BERT’s Syntactic Abilities

The method, step by step

Turn a grammatical requirement into a probability comparison

The authors start with sentence frames whose grammatical properties they can change deliberately. In an agreement frame, they choose a fronted noun that can be singular or plural and a distant verb with distinct forms for the two numbers. The verb is the test word. If the focal noun is lawyer, was is the agreeing form. If the noun is lawyers, were is the agreeing form. Neither form is globally grammatical or ungrammatical. Its status depends on the sentence frame in which it is considered.

For the other test, the authors choose a position that can be occupied by an object pronoun or left empty. They independently change whether the sentence begins a question containing a filler. This produces sentences in which the presence or absence of the pronoun is more or less compatible with the earlier question phrase. The measured word comes after the possible gap. Its probability supplies an indirect reading of how the predictor has interpreted the words and positions that precede it.

The basic procedure is shared across the experiments. The authors construct variants, present the appropriate context to each system, obtain probabilities for the words of interest, and compare the resulting surprisal values within the relevant conditions. The systems are already trained when the sentences are presented. The hand-built examples constitute evaluation material. The authors make the materials, analysis and code available with the paper.

How the grammatical probes turn sentence variants into evidence

The steps in order.

How the grammatical probes turn sentence variants into evidenceStep 1: Build sentence frames around a potential gap1. Build sentence frames around a potential gapStep 2: Vary agreement or the presence of a filler2. Vary agreement or the presence of a fillerStep 3: Insert clauses to change the embedding depth3. Insert clauses to change the embedding depthStep 4: Present a prefix or mask the target word4. Present a prefix or mask the target wordStep 5: Read the target probabilities from the output5. Read the target probabilities from the outputStep 6: Convert probabilities to surprisal and compare conditions6. Convert probabilities to surprisal and compare conditions

Assemble the agreement items

The initial construction is the it-cleft. The paper uses 20 items in a factorial design, which means that each item is evaluated under every combination of the chosen factors. There are singular and plural versions of the noun, singular and plural versions of the target verb, and embedding levels from 1 through 4. The design is written as follows.

2 × 2 × 4

The first 2 counts the noun-number conditions for the agreement experiment. The second 2 counts the verb-number conditions. The 4 counts the levels of clausal embedding. The × signs indicate that the factors are crossed, so each choice along one factor is paired with all choices along the others. The authors report 320 sentences for the cleft experiment.

The shortest lawyer frame places a clause with I think between the filler and the critical verb. Deeper versions add further reports or beliefs in the intervening material. At a given depth, a plural noun is tested with both was and were, as is a singular noun. The authors therefore have a version in which were agrees and a version in which the same word disagrees. They have the converse pairing for was. In the cleft, an earlier was belongs to the opening frame. The measured verb is the later one, at the end of the sequence of intervening clauses.

Holding the target form constant in a comparison is important. A system might assign different probabilities to was and were for reasons that persist across nouns. By asking whether were becomes more expected when the noun is plural, the analysis narrows attention to the effect of noun number on that verb. Comparing was across noun conditions tests the complementary effect. The intended pattern contains support for each form in its corresponding grammatical context.

The authors then convert the 20 items into indirect questions using which. The cleft’s arrangement, with the noun before the wh-word, gives way to a fronted phrase with which before the noun. An opening such as Someone wondered frames the embedded question. The noun’s number, the tested verb and the progression in embedding depth give the researchers the same agreement comparisons in this new structure. The paired design allows a finding in clefts to be checked against a related construction even though the two sentence frames supply different surrounding words.

Build questions that test for the gap itself

The next experiment separates the expectation for a gap from the choice of a number-marked verb. Its direct questions use subject–auxiliary inversion, the arrangement in which the auxiliary precedes the subject, as in the paper’s questions with did we. The authors build the test around a frame involving talking about something. A fronted what can supply the understood object of about, leaving that object position empty. An overt it can instead occupy the position. The probability measured at the following word indicates how the predictor handles the configuration immediately before it.

There are versions with a wh-filler and a gap, with a wh-filler and an overt object, with no wh-filler and a gap, and with no wh-filler and an overt object. The combinations are conventionally described as wh-gap, wh-no-gap, no-wh-gap and no-wh-no-gap. The gap with a filler and the overt object without a filler are the ordinary pairings in these items. The gap without a filler leaves the object unaccounted for. The overt object after a filler occupies the tested position and leaves the earlier filler in search of another position.

Here the same factorial notation describes different factors from those in the agreement test. One binary factor is the presence of a wh-filler. The other is whether the possible gap is occupied. These are crossed with 4 embedding levels. The authors report 20 items and 320 sentences for the subject-inverted experiment. The input does not include the asterisks the paper uses to mark examples as unacceptable. Any response to acceptability has to come from the sentence itself.

The target in these examples is at, the preposition that begins the material after the potential object position. With the overt pronoun present, it follows it. With the gap present, it follows about. The word being scored is the same in these variants, but its immediate left context changes. Crossing the gap manipulation with the presence of a filler lets the authors ask whether the distant question phrase affects a prediction that might otherwise reflect only the words next to the target.

The uninverted counterparts are indirect questions. The clauses with a filler begin with what, while the versions without it are introduced by if. They leave the subject before the auxiliary or verb. The gap manipulation remains at the possible object position, and the post-gap word is again used as a probe. As in the comparison between cleft agreement and which-question agreement, the grammatical phenomenon survives a change in the sentence frame. A similar probability pattern across frames provides evidence that the effect extends beyond one wording.

Obtain the probabilities in the form each system supplies

The recurrent comparisons use the same two long short-term memory networks that the paper identifies in the earlier Wilcox experiments. Training for the Gulordava network used 90 million English Wikipedia tokens, and each of its two hidden layers contains 650 units. A token is an individual unit of text as represented to the predictor. The Google network has two hidden layers of 8196 units each and uses a character-level convolutional network to build the input to the recurrent component. Its training data came from the One Billion Word Benchmark. The paper traces this larger recurrent system to Exploring the Limits of Language Modeling.

For the recurrent networks, the authors feed in the sentence prefix, meaning the words up to the position where the target is to be predicted. The output includes a probability for each possible continuation. The authors read the probabilities of was and were from that output. Softmax is the operation that turns the output scores into a distribution over possible words. The probability read at the agreement position therefore reflects the preceding context, including the fronted noun and the intervening clauses. The paper adapts code from the earlier filler-gap experiments for this extraction.

Transformer-XL is evaluated on the cleft and indirect-question agreement items, and on the question items without agreement. The paper gives this system 24 million parameters and an average attention span of 640 tokens. A parameter is an adjustable value learned during training. Attention allows the prediction to use information from positions in the input, while an attention span describes the reach of that access in token positions. Those specifications motivate a comparison with recurrent systems. The grammatical test still takes place at a particular word, where the authors check whether the probabilities reflect the relationship of interest.

BERT gives a distribution for an explicitly masked position. In the agreement sentence, the authors put a mask where was or were would appear and recover the probabilities of both forms. The visible text can include words after the mask. In the lawyer items, for instance, upset can remain visible. In the tests without agreement, the authors can mask the preposition following the gap and leave its continuation visible. The paper reports 340 million parameters and 24 Transformer blocks for the BERT system used in these experiments.

The paper describes XLNet as another system that learns from bidirectional contexts and evaluates it on the corresponding tasks. In the reported agreement comparisons, the authors again ask whether the plural noun supports the plural target and the singular noun supports the singular target. The availability of context in both directions is a feature of the comparison. The particular probabilities assigned to the alternatives supply the evidence about agreement.

GPT-2 uses the same direction of prediction as the recurrent systems in the paper. The authors provide a prefix and read out the probability of the next word. They describe their main GPT-2 evaluation as using GPT-2 medium, with 345 million parameters. They apply the agreement procedure to the cleft and which-question materials, then use the question items to look at the probability of the word following the potential gap. A sentence may have more words in the stimulus from which the prefix was taken. Those later words are outside the conditioning context for this next-word measurement.

Read surprisal as evidence about a specific contrast

The conversion from probability to surprisal expresses the same information on a scale where less expected words have higher values. The paper follows the use of this measure in work including A Probabilistic Earley Parser as a Psycholinguistic Model.

S(w, c) = −log P(w | c)

S(w, c) is the surprisal of the target w in the context c. P(w | c) is the probability assigned to the target conditional on that context, with | read as “given.” log takes the logarithm, and the leading − changes the sign so that lower probabilities produce higher surprisal. The = sign equates the resulting value with the target’s surprisal. In a prefix-based test, c contains the preceding words. In a masked test, c is the available sentence context around the mask.

For agreement, the authors want to see lower surprisal when the same verb matches the fronted noun than when it clashes with that noun. They compare these conditions at matched depths. The values in a chart can also show that all versions become harder to predict with additional embedding. The agreement contrast remains interpretable in such a case because matching and mismatching conditions can be compared within a depth. The overall height of a group of values and the separation between its agreement conditions answer different questions.

In the tests without agreement, the expectation is conditional on both choices in the design. A gap without a wh-filler should make a subsequent continuation less expected than when that gap is licensed by the filler. An ordinary overt-object sequence without a filler offers another comparison for the licensed gap. The overt-object condition with a filler has an additional complication. A predictor that reaches the target before the sentence is complete could treat the occupied position as compatible with a gap farther on. Whether it can see the rest of the sentence matters to the interpretation of that condition.

The authors also vary the way BERT is probed. In one agreement comparison, they insert a pronoun where the subject gap would otherwise be and set up competing agreement cues between the pronoun and the fronted noun. In tests without agreement, they replace the post-gap preposition probe with a masked adverb at the end of the sentence. The former change asks whether an overt local subject can take control of verb agreement. The latter reduces the usable text after the masked word while also changing what kind of word is being predicted.

Experiments and results

The recurrent benchmarks struggle to carry agreement

The two recurrent systems serve as benchmarks because their earlier behavior motivated the new tests. The cleft set adds a morphological requirement to the syntactic dependency, using the number contrast expressed by was and were. The indirect-question set asks whether the result extends to a different arrangement of the filler. The reported outcomes are based on the constructed evaluation items and their variants. They are comparisons of target-word surprisal, rather than a single accuracy score for recognizing grammatical sentences.

In the clefts, both recurrent systems show weak separation between matching and mismatching conditions. A plural noun should lower the surprisal of were compared with a singular noun, and a singular noun should favor was in the corresponding comparison. The two expected preferences are generally absent as a systematic pattern. The larger Google system also shows a rise in surprisal with additional embedding. In the authors’ comparison, its correct form at level 4 is more surprising than the incorrect forms at levels 1 and 2. That comparison illustrates the size of the change in overall predictability with depth. Evidence for agreement itself still comes from the contrasts made within a level.

Changing the items to indirect which questions yields the same broad outcome. The recurrent systems do not reliably carry the information needed to lower surprisal for the matching verb. The authors observe a general rise in surprisal with deeper embedding and suggest that constructions with repeated embedded declaratives under reporting or belief verbs may be uncommon. A predictor can therefore become less certain at greater depths for reasons related to the whole construction. This possibility is compatible with the separately observed weakness of the agreement contrast.

The evidence qualifies the earlier findings about gap expectations. A recurrent system may respond to a filler when it encounters a potentially empty position. The agreement results show that such a response can coexist with poor sensitivity to whether the distant verb should take a singular or plural form. Repeating the test with different filler constructions makes it harder to account for the weakness solely through peculiarities of English clefts.

Transformer-XL shows isolated agreement effects

Transformer-XL does somewhat better than the recurrent systems in the cleft agreement test, with little consistent separation at greater depths. For the plural verb, the level 1 comparison between the matching plural noun and mismatching singular noun is reported as t = -2.39, p = 0.021. At level 3, the same comparison is reported as t = -2.13, p = 0.039. The t value is the statistic for the reported comparison and p is its associated value under the statistical test. These are numbers for differences in surprisal on the cleft items. They are neither surprisal values themselves nor measurements of the fraction of sentences handled correctly.

For the singular verb at level 1, the reported comparison is t = -1.83, p = 0.068. The paper groups the shallow results together when discussing the evidence for agreement, but the singular comparison has a higher reported p value than the plural comparison. The account gives p > 0.4 for the other deeper comparisons apart from the level 3 plural case. The visible pattern consists of isolated effects. A recurring preference covering both verb forms across depths would have supplied stronger evidence of preserved agreement.

Transformer-XL plural agreement on the cleft dataset by embedding level, reported p values

The reported agreement contrast for the plural verb gives stronger statistical evidence at the shallower of the displayed levels.

Transformer-XL plural agreement on the cleft dataset by embedding level, reported p valuesEmbedding level 3: 0.039Embedding level 30.039Embedding level 1 (this paper): 0.021Embedding level 1 (this paper)0.021
The numbers
System or settingp value for the surprisal contrast
Embedding level 30.039
Embedding level 1 (this paper)0.021

The chart compares the reported tests of the same plural-verb contrast. It records strength of statistical evidence for that contrast, and the ordering of the p values does not measure the size of the surprisal separation. The indirect-question agreement results are also weak. The change from a cleft to a which question does not bring out the consistent grammatical preference the authors sought.

Transformer-XL also fails to produce the expected pattern in the direct question experiment without agreement. At level 1, the authors describe a reversal in which the gap without a filler is less surprising than a licensed gap. At levels 2 through 4, they report no statistical difference among the four filler and gap conditions. Removing subject–verb agreement therefore does not uncover a reliable gap response in this question paradigm.

The indirect, uninverted counterparts reach a similar outcome. The authors report that the correct ordering of the surprisal conditions does not appear at any depth. Their judgment that Transformer-XL performs worse than the earlier recurrent networks on gap tracking draws on the contrast between this failure and the earlier evidence that the recurrent networks could respond to fillers across clauses. In the agreement tests conducted in this paper, both the recurrent systems and Transformer-XL show substantial weaknesses. The comparison depends on which property of the dependency is being measured.

BERT tracks agreement, with weaker evidence in deep questions

BERT’s cleft results are much clearer. At every tested depth, matching conditions have lower surprisal than their mismatching counterparts, with all reported p < 0.0001. The result concerns probabilities at a masked verb position. Changing the number of the distant noun changes how predictable the target form is in the direction required by agreement. The effect survives to level 4 in these cleft sentences, where the verb is separated from the antecedent by the longest sequence of intervening clauses tested.

In the indirect which questions, BERT again gives a clearer agreement pattern at shallower depths. At level 4, the paper reports t = 0.91, p = 0.36 for the singular-verb contrast and t = 1.93, p = 0.06 for the plural-verb contrast. The reported values accompany the authors’ judgment that the evidence for agreement is weak at that depth. The cleft result therefore has a construction-specific qualification. Both sentence sets call for the verb to match a distant noun, yet the same depth does not give the same support for that behavior in the two sets.

The local subject comparison adds a different kind of evidence. A pronoun is put into the subject position and given a number that competes with the number of the fronted noun. In the clefts shown for this probe, BERT reverses the earlier agreement pattern and responds to the local subject. The authors take this as evidence that BERT can suspend the linkage at the tested verb when the subject position is occupied. The probe goes beyond showing that BERT can remember whether a prominent noun was singular or plural. It tests whether that noun’s influence changes when a nearer phrase takes on the grammatical role that governs the verb.

BERT’s gap results change with the target word

On the direct questions with the post-gap preposition masked, the paper reports evidence that BERT responds to the filler and gap across all four levels. The gap without a wh-filler receives the highest surprisal in the reported pattern. A gap with a wh-filler gives lower surprisal, as does an overt object without a wh-filler. That ordering is consistent with the distinction between an unlicensed gap and the two ordinary pairings in the materials. The results on the uninverted indirect questions are described as similarly successful.

The overt-object condition with a wh-filler is less straightforward. In these stimuli, the pronoun occupies the position where the filler could otherwise be interpreted. The authors find the surprisal for this condition lower than they expect. Because the masked test allows BERT to see the continuation, they treat the result as difficult to account for through a simple expectation that the gap will come later. Thus, even the preposition probe that gives BERT its clearer gap effects leaves an unexplained condition.

The picture changes when the target is a sentence-final adverb. In the direct questions, the authors describe the earlier surprisal pattern as essentially inverted. The change persists at greater depths. In the indirect questions with a sentence-final adverb, the no-filler, no-gap condition has the highest surprisal. This is the ordinary combination in which an overt pronoun supplies the object and there is no filler to resolve. A probability pattern that makes this condition the most surprising is hard to reconcile with a reading of the probe as a direct measure of which gaps are grammatically licensed.

According to the authors, the finding for indirect questions may reflect expectations about adverbs appearing at the end of a sentence after pronouns when there is no filler-gap dependency. Such an expectation concerns the observed continuation as well as the dependency under study. The successful preposition comparisons and the difficult adverb comparisons therefore delimit the conditions under which the evidence for gap tracking is clear.

XLNet gives little separation between agreement conditions

The paper uses XLNet to examine whether another architecture with bidirectional context shows the behavior found with BERT. On the cleft items, the surprisal values for agreeing and disagreeing conditions overlap substantially. The singular and plural noun variants fail to separate the verb probabilities in the systematic way that would support the agreement hypothesis. The which-question items show similarly weak results.

The authors describe XLNet as performing worse in the tests they ran with BERT and find little clear evidence that it is sensitive to the filler-gap relation. The detailed XLNet displays and discussion report the agreement comparisons. Consequently, the most specific conclusion available is about the noun-number and verb-number contrasts across the clefts and indirect questions. The fact that both systems can use bidirectional context is insufficient to predict whether their probabilities will reflect agreement across these particular gaps.

GPT-2 preserves agreement across the tested constructions

For GPT-2, the cleft agreement comparison gives statistically lower surprisal for agreeing conditions across the tested depths. The authors describe the cleft results as clearer than BERT’s. They also note that the separation between the conditions tends to shrink with increasing depth. Those observations can coexist. An agreement preference can remain detectable in the tested range even as its magnitude diminishes toward the deepest sentences.

The which-question set gives much the same agreement pattern for GPT-2. This is where the comparison across constructions is most revealing. BERT’s agreement evidence weakens markedly at level 4 in the indirect questions, while GPT-2’s results are described as broadly similar in questions and clefts. GPT-2 does this using the prefix to predict the target verb. The result establishes sensitivity to the agreement contrast across the tested sentence frames and depths.

On the gap tests without agreement, GPT-2 gives a more mixed profile. In one question set, the licensed gap with a filler has higher surprisal than the ordinary overt-object continuation without a filler. The authors had expected those conditions to overlap. They suggest that relatively high surprisal with a filler and an overt pronoun could arise if GPT-2 still expects a gap farther along. As the prefix-based predictor cannot see how the sentence will end, encountering the pronoun leaves open what may come after the measured word.

In the other question set, the licensed gap and the ordinary overt-object condition overlap more closely. The paper reports p > 0.3 for all of the corresponding comparisons and describes the patterns in both question experiments as continuing across subsequent depths. The figure captions identify the first set as uninverted indirect questions and the second as inverted questions. The accompanying prose assigns inconsistent construction and experiment labels, so the results are best located by those captions and the reported contrasts. The main result survives the labeling inconsistency. The agreement comparisons give a strong cross-construction pattern, while the tests of gaps alone depend more on the question frame and the condition used for comparison.

What the ablations show

Agreement adds a requirement to gap tracking

The paper changes the sentences and prediction targets while evaluating already trained systems. Its controlled comparisons work by changing what a successful prediction would have to reflect. The comparison between the early recurrent results and the agreement experiments illustrates this logic. The earlier work supplies evidence that these recurrent systems can maintain an expectation about a gap. The new agreement test adds a requirement. The system’s prediction has to vary with the particular noun acting as the understood subject, and it has to vary in opposite directions for the two target verb forms.

The agreement failure locates a weakness that a gap-only test would miss. A system could learn to expect an empty position after a filler and still be insensitive to whether the noun that supplies the subject is singular or plural. Conversely, success with agreement can be investigated further by asking whether the same number preference survives when the position contains an overt subject. The paper works through this distinction by using probes that overlap in subject matter while varying in the grammatical information they demand.

Transformer-XL shows why the gap-only comparison is worth keeping even after a failure of agreement. A system that struggled solely with transferring the number feature might still respond clearly when the tested gap is the object of a preposition. In the direct and indirect question probes, Transformer-XL gives weak evidence even after the number requirement is removed. Its results in this study therefore extend beyond a problem with choosing between singular and plural forms.

Change the construction while preserving the contrast

The switch from it-clefts to indirect which questions preserves the number contrast while changing the placement of the wh-word relative to the noun and changing the opening sentence frame. For the recurrent systems, weak agreement in both settings reduces the force of an explanation centered on the cleft frame alone. For BERT, the difference between the deepest clefts and the deepest questions reveals a construction dependence that a study using only clefts would miss. GPT-2 gives a more similar result across the two forms in the reported agreement tests.

The direct and indirect gap probes exercise a related control. A question with inversion and an embedded question can both introduce a filler and leave a corresponding object gap. They differ in the arrangement and lexical context of the question clause. Comparing them shows whether the post-gap probability pattern is shared across those contexts. GPT-2’s closer alignment of the licensed-gap and ordinary overt-object conditions in one frame makes clear why the arrangement is part of the experimental result.

These comparisons manipulate packages of cues. Converting a cleft to an indirect question changes more than the position of a single word, and converting a direct question to an indirect one also changes the opening material. The observed performance differences mark sensitivity to the construction as realized in the items. The comparisons leave room for several parts of that realization to contribute, including the introductory wording and the words around the target.

Put an overt subject in the possible gap

The BERT pronoun test makes the contrast between long-distance and local agreement especially concrete. Before the intervention, the subject of the tested verb is interpreted through its connection to the fronted phrase. Inserting a pronoun gives that verb a visible subject. By choosing a pronoun with a different number from the fronted noun, the authors put the two potential sources of number in conflict. A preference driven by the fronted noun should continue to favor its matching form. Sensitivity to the occupied subject position should favor the form appropriate to the pronoun.

BERT changes its preference when the pronoun fills the position. This result rules against the specific account in which BERT invariably lets the number of the fronted noun determine the form of the later copula in these items. It supports the authors’ interpretation that the system is responsive to whether the subject position is available as a gap. In this setting, the presence of the filler and the presence of a local subject carry different consequences for the prediction, even when the most prominent noun near the front stays the same.

An overt subject also supplies a cue immediately beside the masked verb. Success in the pronoun condition is compatible with a strong response to that nearby cue. The force of the comparison comes from the change across versions. When there is no local subject, BERT responds to the fronted noun in the cleft agreement test. When a local subject is inserted, that faraway noun ceases to control the tested preference. The experiment establishes this contextual change in behavior while leaving open how the system computes it.

Remove the continuation after the masked word

The sentence-final-adverb manipulation addresses the advantage BERT has when predicting a word inside a sentence. A masked preposition such as at is followed by words that can constrain its identity and clarify the remainder of the construction. A prefix-based predictor never sees those words at the point where it scores at. Masking an adverb in sentence-final position removes the comparable following phrase from the BERT input. The authors can then see whether the previously favorable gap pattern holds when the target comes at the right edge.

It does not hold. The direct adverb probe yields a sharply changed ordering, while the indirect adverb probe makes the ordinary no-filler, no-gap condition the most surprising. The change lasts beyond the shallowest direct questions. The evidence that BERT responds appropriately to an unlicensed object gap therefore depends on the preposition-based measurement or on conditions that the two measurements do not share.

There are two changes in the intervention. The target loses the substantial continuation available after the preposition, and the target itself is now an adverb, with different relationships to the neighboring words. The contrast is informative about the stability of the measurement across probe designs. It cannot provide a separate estimate of the contribution of right context alone. BERT could be using the following phrase in the preposition task, treating adverbs differently from prepositions, or responding to both changes.

Increase embedding and inspect the whole pattern

Embedding gives the authors a graded manipulation rather than a single long sentence to judge. At each depth they can examine the agreement contrast or the pattern across the filler and gap conditions. If surprisal rises throughout while the agreeing verb retains an advantage, reduced predictability and preserved agreement coexist. If the expected separation weakens or disappears, the test supplies less evidence that the dependency survives the added material in an equally usable form.

The results show several ways in which greater depth matters. The recurrent systems and Transformer-XL supply little systematic agreement evidence across depths. BERT retains its cleft agreement pattern more clearly than its agreement pattern at the deepest level of the which questions. GPT-2 continues to favor matching verbs while showing a tendency towards smaller separation at greater depth. An account based solely on the maximum available context would miss variation between systems and between constructions at comparable distances.

Adding a clause also adds particular words and grammatical relations. The depth manipulation consequently tests a package that combines increased distance, added clause boundaries and new intervening material. It reveals what happens on these increasingly embedded sentence frames. It does not isolate a universal effect of crossing a clause boundary independently of which clause was inserted.

Limitations

Limits identified by the authors

The authors describe the architectural comparison as preliminary. The recurrent and Transformer systems differ in architecture, training objective, training material and how they are evaluated. Some predict the next word from a prefix. Others fill a mask with access to the rest of the sentence. Both procedures produce a target probability, so they permit comparisons of how the grammatical conditions affect that probability within each procedure. They do not amount to holding the task and training data constant while changing architecture alone.

BERT’s access to words after the target is a specific concern raised in the paper. A continuation can help identify which word belongs at the mask and may also inform the system about whether another gap can appear later. The authors address the asymmetry by running the sentence-final adverb tests. The sharp change under that manipulation limits the scope of the favorable results. The stronger evidence belongs to particular combinations of construction and target placement.

The paper also treats increasing surprisal with depth cautiously. The authors suggest that long sequences of embedded declarative clauses may be rare. If so, constructions with many embedded clauses could make continuations less predictable across multiple conditions. An overall rise in surprisal therefore cannot by itself diagnose whether the representation of the filler has faded. The study repeatedly returns to the contrast among grammatical conditions within a depth to ask that question more directly.

The authors’ discussion emphasizes uneven performance across constructions. BERT and GPT-2 supply stronger evidence on several probes while still giving mixed results. The extent of training and the general predictive performance of the systems do not guarantee that the grammatical effects will recur whenever the test wording changes. In their strongest cases, the results concern the English constructions and probabilities actually measured.

Limits visible in the experimental setup

The tested depths end at level 4. A consistent effect across those levels shows resilience within the study’s range. Structural unboundedness describes the grammatical relation the authors are probing, while those finite stimuli supply evidence about a sequence of increasingly embedded examples. Neither a persistent effect nor a fading one establishes what a predictor would do at arbitrary depths, with different intervening clauses, or in a spontaneous example outside the construction templates.

The agreement probe centers on was and were. Keeping these forms fixed makes the comparison transparent and allows the noun conditions to be contrasted for the same word. It also bounds the result. The experiments do not establish that the systems transfer the same behavior to other agreement markings, other manifestations of the filler’s grammatical features, or dependencies in languages other than English. A system might perform differently where the evidence for number is distributed across another set of forms.

The object-gap test measures a word that follows the position of interest. That is a deliberate way to obtain an observable consequence of something silent. It means the measurement is sensitive to whatever helps predict the actual word, including its immediate neighbors and, in BERT’s case, its subsequent context. The same syntactic dependency is relevant to the tested sentence after a change of target word, yet the probability response can change because the new target has different distributional properties. The adverb results make that limitation visible within the paper.

The filler conditions also differ in what a predictor could reasonably expect at the point of measurement. A gap without a filler is an immediate problem for interpreting the test phrase. A filler without a gap at that site may leave a possibility open later, especially in a prefix-based system. A low or high surprisal value in the latter condition cannot be interpreted symmetrically with the former without considering how much text the predictor sees. The paper’s own discussion of BERT and GPT-2 shows why the timing of the probe matters.

The reported significance tests address how distinguishable particular surprisal conditions are in the tested items. They do not supply a common measure of grammatical accuracy across all systems. A lower p value on one contrast does not tell the reader how frequently the better continuation would win on individual examples, or whether the underlying surprisal effect is larger than another contrast’s. The paper gives enough statistical information to identify some stronger and weaker reported comparisons, with many results presented as patterns of plotted surprisal.

There are also inconsistencies in how the GPT-2 account names the evaluated conditions. The setup specifies GPT-2 medium and 345 million parameters, while the sentence interpreting the indirect agreement results refers to GPT-2 small. The descriptions of the two gap experiments likewise mix labels for the constructions and their experiment numbers. The agreement results can be discussed using the system specified in the setup, and the gap displays can be identified by their construction captions. The text does not support a separate result for GPT-2 small or a clean reconstruction of every label in the accompanying prose.

Finally, the study observes output behavior. A preference for the matching verb, a response to a local subject and the expectation of a licensed gap each constrain an explanation of what the system is doing. The experiments do not recover an internal grammar or identify which components of a network implement any of those behaviors. Their most direct claims concern the information that appears to affect a particular prediction under a controlled change to the sentence.

What came after

UnNatural Language Inference cites Da Costa and Chaves from the setting of language inference. The connection is a question about what successful performance can establish about the use of sentence structure. Da Costa and Chaves make that question concrete by checking whether changing one grammatical relationship changes a target probability, even when a system is already good at general language prediction. The later work’s connection is at the level of that evaluation question. Its citation alone does not establish that it reused the cleft items, the agreement contrasts or the surprisal metric.

Targeted Syntactic Evaluation on the Chomsky Hierarchy places targeted evaluation in the setting of the Chomsky hierarchy. The connection lies in specifying what kind of structural behavior a test asks a system to demonstrate. Da Costa and Chaves do this with a particular dependency in English and controlled changes to the sentences that contain it. The later work’s named scope is evaluation organized around the hierarchy. It can be situated alongside the earlier paper’s distinction between evidence from a finite probe and the broader grammatical capacity that motivates the probe. The citation does not specify a replication or a shared item set.

Enhancing Linguistic Competence of Language Models through Pre-training with Language Learning Tasks cites the study in work whose stated focus is improving linguistic competence through pretraining tasks. The connection shifts from diagnosing behavior after general training to asking whether the training tasks can shape that behavior. Da Costa and Chaves identify concrete points at which general prediction can leave gaps in grammatical performance, including agreement at depth and sensitivity to how a gap is probed. The later work’s scope connects those diagnostic questions to the choice of what systems practice during training. Its citation does not specify which of the earlier constructions it evaluated or what change it found on them.

Cite

Cite as Jillian Da Costa and Rui Chaves. 2020. Assessing the ability of Transformer-based Neural Models to represent structurally unbounded dependencies. Proceedings of the Society for Computation in Linguistics 2020.

The paper itself, not this page. BibTeX from the library's record of the work.

@inproceedings{costa2020assessing,
  title = {{Assessing the ability of Transformer-based Neural Models to represent structurally unbounded dependencies}},
  author = {Jillian {Da Costa} and Rui Chaves},
  booktitle = {Proceedings of the Society for Computation in Linguistics 2020},
  year = {2020},
  url = {https://aclanthology.org/2020.scil-1.2/}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/costa-2020-assessing-ability-transformer-based-neural/