How much complexity does an RNN architecture need to learn syntax-sensitive dependencies?
Paper · 2020 · Gantavya Bhatt, Hritik Bansal, Rishubh Singh et al.
Summary
In “The basket beside the windows,” the next verb should agree with basket, even though windows is closer. A recurrent neural network reads the words in order, so success depends on what it retains from earlier in the sentence and how it uses the intervening words. Gantavya Bhatt and colleagues ask how complicated that network needs to be to handle such dependencies. They propose the Decay RNN, a design that carries part of its previous state forward at a learned rate. Its recurrent connections also follow a rule inspired by excitatory and inhibitory neurons. Each unit can send positive or negative signals to other units, with the direction fixed for that unit.
The authors first test whether a network can predict the grammatical number of an upcoming verb from a sentence prefix. They then ask it to judge a complete sentence containing either the correct verb form or an agreement error. On the Wikipedia test data, the Decay RNN reaches 98.66% accuracy in verb-number prediction and 95.48% in grammaticality judgment. The corresponding LSTM accuracies are 98.59% and 95.81%. A simple recurrent network scores 97.70% on the prefix task and 50.12% on the full-sentence task. The difference between those outcomes shows how much the test format matters. Providing a prefix ending at the decision point makes agreement easier to predict than asking a network to locate the relevant evidence within a complete sentence.
The paper also examines the nouns that occur between the subject and verb. A noun with the opposite number from the subject can pull a prediction toward the wrong verb form. A noun with the same number can reinforce the correct choice, even when it has no grammatical control over the verb. With subject–verb distance and the number of opposing nouns held fixed, both the Decay RNN and the LSTM become more accurate on groups of sentences containing more supporting nouns. In a separate test on sentences generated from grammatical templates, the Decay RNN also outperforms its unconstrained variant on selected constructions, although the unconstrained version has the higher overall grammaticality accuracy on the original test set.
The broader word prediction task gives the LSTM a clear advantage. On Wikipedia validation data, its word-level perplexity is 52.73, compared with 76.67 for the Decay RNN, where lower is better. Tests on specific constructions show a more varied pattern. The advantage can change with the grammatical construction and with the sentence forms being compared. The experiments establish that a simpler recurrent update can support strong performance on some agreement tasks. They leave open which cues each network uses on an individual sentence and how closely its internal behavior resembles either grammatical analysis or neural activity.
Deep dive: How much complexity does an RNN architecture need to learn syntax-sensitive dependencies?
The Decay RNN tests how far a recurrent network with a learned memory decay can match LSTMs on English agreement, grammar judgments, and word prediction. · about 32 minutes to read
The problem and its context
When the closest noun gives the wrong answer
In English, subject–verb agreement makes part of a sentence's grammatical structure visible in the words themselves. In “The labels on the bottle,” the verb should be plural because the subject is headed by labels. The singular bottle belongs to a phrase that modifies the subject. The two nouns occur in the same stretch of text and supply different answers to the number question. The choice of verb reveals which of those answers the sentence supports. That makes agreement a way to probe how a system responds to syntax and grammar.
Distance matters because a recurrent network processes a sentence through successive updates. By the time it reaches the verb, the subject has passed through a series of transformations of the internal state. Each update also incorporates new material. A useful state must preserve some consequence of having read labels while representing enough of the intervening phrase to handle the rest of the sentence. If the predictor gives too much weight to the most recent noun, bottle can pull it towards a singular verb.
The literature the authors discuss calls such a distractor an agreement attractor. Its number conflicts with the subject's number, and it occurs between the subject and its verb. Counting attractors offers a way to group sentences by the amount of misleading information they contain. The paper widens the question to include intervening nouns that support the correct answer. In “The labels on the bottles,” bottles shares the number of labels. A system that follows a recent noun can now land on the same choice as a system that identifies the subject. Both responses earn the same accuracy credit.
This ambiguity is especially important on naturally occurring sentences. Some sentences place little pressure on a strategy that uses nearby words. A corpus can contain both those cases and examples that force a choice between conflicting cues. Aggregate accuracy describes performance on that mixture. To learn what a network is sensitive to, the authors also compare groups of sentences whose intervening nouns differ in grammatical number. That lets them ask whether helpful material affects performance alongside the well-studied harm from attractors.
What recurrent architectures already offered
Earlier work described in the paper had established that recurrent networks could learn at least some dependencies across a sequence. The authors cite studies in which long short-term memory networks, or LSTMs, handled simple examples of context-free and context-sensitive languages. An LSTM has a gated memory mechanism. It can regulate how much of previously stored information persists and how much new information is written. The question here is how much of that machinery a network needs for the specific linguistic tests under study.
Prior agreement experiments had already made this question tractable. The procedure adopted for verb-number prediction comes from Linzen and colleagues. It presents the words leading up to a verb and asks for the verb's number. A prefix can contain the subject, one or more competing nouns, and other signs of sentence structure. The answer still has a simple form, singular or plural. That combination permits large-scale accuracy measurement while leaving room for carefully chosen subsets. Assessing the Ability of LSTMs to Learn Syntax-Sensitive Dependencies
The earlier work also gave the authors reasons to distinguish recurrence from syntactic structure. A recurrent architecture applies a repeated update over a sequence. Some of the systems discussed in the paper incorporate phrase structure into their design, giving them access to information about which words form groups. The cited tree-structured approaches improved generalization on dependencies that can span intervening phrases. The paper also recounts evidence that insufficient capacity can limit an LSTM's ability to generalize over long distances. Both the organization of the computation and the amount it can store therefore belong in the background to a comparison of recurrent cells. Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networks · LSTMs Can Learn Syntax-Sensitive Dependencies Well
An intermediate approach is to build a preference for hierarchical organization into a sequential architecture. The paper discusses the ordered-neuron LSTM, known as ON-LSTM, in this connection. It also describes a critique that questioned how much of the evidence for that approach came from the metric used to assess it. This distinction matters for the Decay RNN as well. An architecture can encourage a certain kind of computation, while an evaluation measures the predictions available through a particular task. The connection between the two requires evidence about how performance changes when the inputs or architecture change.
The Decay RNN study takes a different route to finding a useful architectural bias. It retains sequential input and asks whether a small change to state persistence, together with a rule governing recurrent signs, is enough to recover some of the performance associated with more elaborate cells. A simple recurrent network, or SRN, provides the basic comparison. In that network, the previous state affects the next through the ordinary recurrent transformation. The Decay RNN adds a direct contribution from the previous state and forces the recurrent transformation to respect the sign assigned to each sending unit.
Why the authors looked to neuronal dynamics
The paper connects this engineering question to work on recurrent networks as approximations of neural populations. It describes studies that constrain artificial networks and compare their activity with recordings. Recurrent networks have also been trained on tasks performed by animals, with their internal dynamics examined to see how a population might solve the task. The authors use this line of research to motivate concrete restrictions on the recurrent cell.
One restriction concerns the signs of outgoing effects. In the paper's formulation of Dale's principle, an excitatory neuron pushes the membrane potential of the cells it contacts in a positive direction, and an inhibitory neuron pushes it in a negative direction. The strength can differ from connection to connection. The restriction is on the direction of the effect across recipients. An ordinary recurrent weight matrix can assign signs independently to its entries, allowing a unit to exert positive influence on one recipient and negative influence on another. The Decay RNN's recurrent matrix excludes that pattern by construction.
The other restriction concerns what happens after a signal arrives. The paper describes postsynaptic potentials as contributions that add at the receiving neuron and diminish over time. It gives 37% of the peak potential as the level used to define the membrane time constant. That biological description motivates a state that keeps a portion of its prior value as further inputs arrive. The paper also contrasts this motivation with earlier work that used a hard reset of membrane potential. Gradual persistence supplies the analogy for the direct state path in the Decay RNN.
Among the closest precursors is the excitatory–inhibitory recurrent network, or EIRNN, of Song and colleagues. In the authors' account, the earlier work selected a sampling rate and used a time constant motivated by a particular neuronal setting. Bhatt and colleagues want persistence to adapt to the task. Their formulation combines the effects of those timing choices in a quantity that training can adjust. They also note earlier work that used a moving average in a recurrent network with manually selected scaling values. Learning the decay gives the present design a way to settle on a characteristic degree of persistence from its training signal.
The biological motivation and the linguistic tests meet at the level of the update rule. A gradually changing state might carry useful information across intervening words. The excitatory–inhibitory restriction might steer learning toward different recurrent interactions. To investigate those possibilities, the paper needs tasks that reveal what a recurrent network can do with a marked prediction point, with a complete sentence, and with ordinary word sequences. Each task demands a different use of the same basic cell.
The method, step by step
Following a word through the cell
The Decay RNN reads a sentence in order. Each word arrives as an embedding, a vector of learned numerical features. The recurrent cell also receives the hidden state, a vector that carries forward information from preceding steps. The state starts serving a new role as soon as the next word arrives. It supplies the input to the recurrent transformation and also contributes directly to the updated state. The training setups specify the dimensions of the word embeddings.
The cell first builds a candidate update. It combines the incoming word with signals derived from the previous state. Those recurrent signals pass through a matrix in which outgoing signs are fixed by unit. A unit designated excitatory can supply positive contributions through its outgoing weights, and a unit designated inhibitory can supply negative ones. A connection can also have zero magnitude. The current word has its own learned transformation, and an additive bias completes the candidate.
The cell then mixes that candidate with the previous state. The learnable decay coefficient determines the weight of the old state, and the remaining weight goes to the candidate. Increasing the old state's share reduces the candidate's share. The mixed vector passes through a nonlinear activation. The resulting state is available to the task's prediction procedure and to the next recurrent step.
How the Decay RNN updates its state
The steps in order.
Consider a hidden feature that becomes active when a subject is read. The direct path gives the next state access to that feature's previous value at its own coordinate. The candidate gives the network another option. It can bring information from other coordinates into the update, as well as evidence from the current word. This means that a feature representing something about the subject can persist while other features change in response to an intervening phrase. The example describes a possibility afforded by the equation. The authors do not assign a subject feature to a particular hidden unit.
Constructing the recurrent update
The candidate state is defined as follows.
c⁽ᵗ⁾ = (ReLU(W) W_dale) h⁽ᵗ⁻¹⁾ + Ux⁽ᵗ⁾ + b
The superscript in parentheses indexes the timestep instead of denoting a power. The current step is t, and t − 1 is the preceding step. The vector c⁽ᵗ⁾ is the candidate at the current step, h⁽ᵗ⁻¹⁾ is the previous hidden state, and x⁽ᵗ⁾ is the current input vector. W is a trainable recurrent weight matrix. ReLU is the rectified linear function, applied to each entry of W here. It keeps positive entries and maps negative entries to zero. W_dale is the fixed diagonal matrix that gives each sending unit its assigned sign. U maps the input into the state space, and b is the bias vector. Juxtaposition denotes matrix multiplication or the application of a matrix to a vector. Addition brings the resulting vectors together.
The order of multiplication matters. Applying ReLU produces non-negative recurrent magnitudes. Multiplication by the diagonal sign matrix on the right then scales each column by its corresponding sign. A column represents the connections from one sending unit to all the receiving units. Scaling a column as a whole imposes the intended outgoing constraint even when individual strengths differ. The sign of an incoming contribution can vary across the sources that feed a single receiving unit.
The appendix shows the operation as a product of matrices. Its component form makes the relationship between a connection and its source explicit.
[ReLU(W) W_dale]ᵢⱼ = [ReLU(W)]ᵢⱼ [W_dale]ⱼⱼ
Square brackets identify a matrix entry. The index i is the row of the receiving unit, and j is the column of the sending unit. W, ReLU, and W_dale have the same meanings as in the candidate equation. The entry with indices j and j is the diagonal sign assigned to the sending unit. The entries away from the diagonal of W_dale are zero, so only that diagonal value contributes to the product at the specified row and column.
In the paper's standard assignment, the last 20% of entries on the diagonal are set to -1 and the rest to 1. The negative diagonal values give the selected units inhibitory outgoing connections. The authors say the outcome was unchanged when they used a different selection of negative entries. They keep self-connections in the recurrent matrix, so the restriction applies to a unit's learned connection back to itself as well. That learned connection is separate from the direct carry of the previous hidden state.
Mixing persistence with new information
The candidate enters the state update through the learned scalar.
h⁽ᵗ⁾ = f(αh⁽ᵗ⁻¹⁾ + (1 − α)c⁽ᵗ⁾)
Here h⁽ᵗ⁾ is the new hidden state, h⁽ᵗ⁻¹⁾ is the preceding state, and c⁽ᵗ⁾ is the candidate just calculated. f denotes the nonlinear activation function. The scalar α is the learned decay coefficient and lies in the interval (0,1). It multiplies the old state. Its complement 1 − α multiplies the candidate. Both multiplications scale whole vectors, and the addition produces the input to f. The time-step convention is the same as in the candidate equation.
A large value of α makes the direct path more persistent. A smaller value gives the candidate a greater share of the mixture at each step. The authors describe this as coupled gating because the same learned value controls the contributions in opposite directions. Each step also reapplies the scaling to the carried state, which motivates their comparison to an exponential moving average. The complete recurrent dynamics also include the nonlinear activation and the candidate's own dependence on the old state. A feature's actual persistence therefore depends on the rest of the recurrence as well as on the scalar.
The direct carry creates a skip connection within the recurrent update. Changes in an earlier state can reach the next state through that path as well as through the recurrent matrix. In training by back-propagation, which propagates information about error through the computations that produced a prediction, this offers an additional route for the gradient. The gradient tells the learning procedure how changes in earlier computations would affect the training objective. The authors motivate the skip path and coupled weighting as ways of reducing the tendency for this signal to weaken over many steps. The task scores measure the consequences of training the resulting networks.
The authors use a sigmoid function to keep α within its interval and report that using a linear function in its place did not change their results. Their appendix tracks the learned scalar during grammaticality training from different initializations. The values approach approximately 0.8, which they use to initialize the decay at the start of training. It remains a trainable parameter. The initialization puts the direct and candidate paths at a starting balance informed by those traces.
Changing the sign rule and the recurrent interaction
The authors introduce the Slacked Decay RNN, abbreviated SDRNN, to examine what the sign restriction contributes. The mixing equation stays the same. The candidate uses an unrestricted recurrent matrix.
c⁽ᵗ⁾ = Wh⁽ᵗ⁻¹⁾ + Ux⁽ᵗ⁾ + b
Here c⁽ᵗ⁾ is the current candidate, W is the trainable recurrent weight matrix, and h⁽ᵗ⁻¹⁾ is the previous hidden state. U applies a learned mapping to the current input x⁽ᵗ⁾, and b is the learned bias. Time t indexes the current step. The two matrix products contribute to the candidate through addition. Since the candidate uses W directly, a unit's signals can have different signs at different recipients.
The next variant is the ablated Decay RNN, or Ab-DRNN. Its candidate no longer includes a recurrent matrix. The state still persists through the direct path, and incoming words still affect it through the input projection.
h⁽ᵗ⁾ = f(αh⁽ᵗ⁻¹⁾ + (1 − α)(Ux⁽ᵗ⁾ + b))
The new state h⁽ᵗ⁾ depends on the old state h⁽ᵗ⁻¹⁾ and the current input x⁽ᵗ⁾. U is the learned input matrix, b is the bias vector, α is the decay coefficient, and f is the activation function. The complement 1 − α weights the candidate formed from Ux⁽ᵗ⁾ + b. The parentheses identify that candidate and the full vector to which f is applied. The superscripts again indicate timesteps.
Removing the recurrent matrix changes which earlier values can feed each state coordinate. A coordinate can carry its own history through the decay path. The cell has no learned recurrent matrix tying that update to the earlier values of other coordinates. This preserves temporal memory within a coordinate, and the different coordinates can still respond to the same input. The authors use the variant to test what direct carry and input projection can achieve with the recurrent mixing removed.
The three formulations create comparisons at different levels. The Decay RNN and the SDRNN both retain a direct path and a full recurrent transformation, so their comparison bears on the sign constraint. The Ab-DRNN keeps state persistence while removing that full transformation. Comparing it with the Decay RNN bears on the contribution of recurrent interactions. The SRN supplies a complementary comparison in which a recurrent transformation is present and the explicit decay path is absent.
Training the classifiers and the word predictor
For verb-number prediction and grammaticality judgment, the networks are trained as binary classifiers. The training examples come from a Wikipedia corpus of 1.57 million sentences associated with the earlier agreement study. The split reserves 10% of the corpus for training and 0.4% for validation, with the remainder assigned to testing. Verb-number prediction uses a sentence prefix through the words preceding the verb. Grammaticality judgment uses a whole sentence and labels it according to whether the agreement is correct.
The paper's classifier setup uses a single recurrent layer and ReLU activation. Both the embedding dimension and the hidden dimension are 50, and the batch size is 1. A batch is the collection of examples on which a training update is based. The original test-set accuracies are averaged over 3 separate runs. The paper reports Adam optimization with a learning rate of 0.001. The learning rate sets the scale of the optimizer's parameter updates. Adam
The word-level language model learns from a different Wikipedia sample comprising 90 million words, with 3 million training sentences and 0.3 million validation sentences. Its task is to assign probability to words in sequence. The same recurrent architecture can be used for this objective by taking the hidden state as the information available for word prediction. Training on ordinary word sequences gives learning a wider objective than classification of subject–verb agreement. The corpus comes from the work the authors cite for this setup. Colorless Green Recurrent Networks Dream Hierarchically
The word prediction setup uses a 2-layered network with tanh activation, an embedding dimension of 200, a hidden dimension of 650, and a batch size of 128. The dropout rate is 0.2. Dropout makes a portion of the training computation unavailable on a given pass, giving the network an incentive to spread useful information across its representation. Tanh is the nonlinear activation in this setup. ReLU still has its separate role in setting the magnitudes of the constrained recurrent weights.
The authors also generate test sentences from templates in the targeted evaluation framework of Marvin and Linzen. Their templates can be described by a non-recursive context-free grammar, a collection of rules for expanding syntactic categories into the parts of a sentence. The templates specify constructions to instantiate. The evaluation can then collect examples with a prepositional phrase, a relative clause, or another defined structure between the relevant words. These sentences serve as a generalization test for trained networks. The paper identifies the accompanying implementation as the Decay RNN experiment code.
Experiments and results
Predicting the number of an unseen verb
In the prefix test, the prediction is a choice between singular and plural at a given location. A prefix such as “The path toward the hills” contains a singular subject and a plural intervening noun. The network must give the verb number associated with path. Because the input ends at the verb position, a classifier can use the state at the end of the prefix to make this choice. Accuracy is the percentage of test examples assigned the recorded number.
The paper reports the classifier results on approximately 1.4 million Wikipedia test sentences. The gated recurrent unit, or GRU, achieves 98.81% number-prediction accuracy in the reported comparison. The Decay RNN reaches 98.66%, its slacked variant 98.65%, and the LSTM 98.59%. The closeness of these results shows that the task admits high accuracy under several different update rules at the tested settings.
The remaining baselines help put that cluster in perspective. The SRN scores 97.70% on the same test, and the Ab-DRNN scores 97.37%. The EIRNN scores 94.68%. Even a fairly simple way of updating the state can carry enough information to do well on much of this dataset. The overall result combines the examples where local cues are aligned with the subject and those where such cues are misleading. The score by itself gives little detail about how the network fares when those sources of evidence are made to compete.
The location supplied by the task is part of the setup. Every prefix ends immediately before the relevant verb. The authors point out that this can give the classifier information about where the relevant clause ends or where an important boundary lies. A successful network is solving the problem under that particular presentation. In the full-sentence experiment, the prediction cue is distributed across the input, and the network must classify the sentence after seeing the verb and the words that follow.
Judging complete sentences
The grammaticality test asks whether agreement is well formed in a whole sentence. A pair such as “The labels on the bottle are crooked” and “The labels on the bottle is crooked” illustrates the contrast. Each sentence has a singular noun immediately before the verb, and the choice between are and is determines whether the verb agrees with the plural subject. The classifier returns a judgment for the entire sentence. Its output gives no location for the error, so the metric is sentence-level accuracy.
Wikipedia test accuracy for full-sentence grammaticality judgment
The Decay RNN is close to the LSTM while the simple recurrent baseline scores near chance.
The numbers
| System or setting | accuracy % |
|---|---|
| SRN | 50.12 |
| LSTM | 95.81 |
| Decay RNN (this paper) | 95.48 |
| Slacked Decay RNN | 96.83 |
The SDRNN has the highest grammaticality judgment accuracy reported for the original test corpus, at 96.83%. The LSTM reaches 95.81%, the Decay RNN 95.48%, and the GRU 94.26%. The Ab-DRNN scores 85.98% and the EIRNN 84.51%. The SRN's 50.12% is described by the authors as performance near random guessing. These results are from the same reported Wikipedia test scale and run averaging as the number-prediction table.
The contrast with the prefix task is sharpest for the SRN. It can make a good number prediction when the input itself marks the target position. The full-sentence judgment appears to place a greater demand on retaining and using the relevant agreement information within a sequence that continues beyond the verb. The Ab-DRNN's result shows that a persistent state can help in that setting even after the learned recurrent interactions have been removed. The full Decay RNN's stronger performance gives a reason to examine what comes from combining the two paths.
For the authors' principal comparison, this test puts the Decay RNN close to the LSTM under a shared supervised setup. The advantage of removing the sign constraint on the original test corpus also provides a clear question for the generalization experiments. A restriction can be compatible with strong accuracy on that corpus and still change the kinds of sentence on which a system succeeds. Template tests let the study identify some of those differences explicitly.
Predicting words across Wikipedia
The language modeling experiment changes both the objective and the training data. The predictor must allocate probability across possible words in ordinary sequences. Its validation metric is perplexity, which summarizes how much probability the system gives to the observed text. A lower value indicates better word prediction under this measure. The reported perplexities are for the Wikipedia validation split, which is separate from the test data used for the two supervised tasks.
Word-level validation perplexity on the Wikipedia language modeling corpus
The Decay RNN improves on the simple recurrent baseline while the gated networks achieve lower perplexity.
The numbers
| System or setting | perplexity |
|---|---|
| SRN | 114.74 |
| Decay RNN (this paper) | 76.67 |
| GRU | 53.78 |
| LSTM | 52.73 |
The LSTM has a reported 5.6M learnable parameters at a validation perplexity of 52.73. The GRU has 4.2M parameters and reaches 53.78. The Decay RNN and the SRN are each reported at 1.4M parameters, with validation perplexities of 76.67 and 114.74, respectively. The gain over the SRN thus appears even where the paper reports the same parameter total. The comparison with the gated cells combines an architectural difference with differences in parameter count.
The SDRNN also has a reported 1.4M parameters and reaches a validation perplexity of 76.88. The Ab-DRNN has 0.55M parameters and reaches 86.42. Both the direct-only ablation and the simple recurrent baseline have higher perplexity than the full Decay RNN. The authors suggest that the joint use of state persistence and recurrent mixing contributes to the improvement. The reported values also establish that the simpler Decay family, at these settings, leaves a substantial gap to the LSTM and GRU on ordinary word prediction.
Perplexity compresses predictions at many word positions into a single value. A predictor can improve this measure by assigning more probability to a wide variety of words and contexts. A targeted syntax test asks a narrower question by looking at examples built around a specific contrast. The study uses both because good general word prediction and a reliable preference on a chosen syntactic construction can rank the same systems differently.
Testing particular constructions
Among the phenomena tested are negative polarity items, reflexive anaphora, and subject–verb agreement. A reflexive form such as herself or themselves has to fit the expression it refers back to and its grammatical relationship to that expression. A negative polarity item such as ever can depend on the presence and syntactic placement of a licensing expression. These cases broaden the evaluation beyond the singular–plural choice on which the supervised experiment is trained. They also vary the structure of the material that separates a grammatical cue from the word that depends on it.
For subject–verb agreement, the paper distinguishes simple sentences from constructions that contain additional clauses or phrases. A sentential complement is an embedded clause selected by an expression in the surrounding sentence. A relative clause describes a noun and can separate it from another word that depends on it. Prepositional phrases can similarly place a different noun near the verb. The targeted tests further distinguish short and long verb phrase coordination, in which verb phrases share a connection to the same subject.
On simple subject–verb agreement from the generalization set, the reported accuracy for the Decay RNN is 0.95, compared with 0.92 for the LSTM and 0.88 for the SRN. Within an object relative clause with the marker that omitted, the Decay RNN scores 0.74, the LSTM 0.75, and the SRN 0.57. These rows are expressed as accuracy fractions in the paper. They give examples of a simpler recurrent cell remaining close to a gated cell when the task is restricted to a defined type of syntactic contrast.
The long-range agreement results depend on the construction. Across a prepositional phrase, the Decay RNN scores 0.56 and the LSTM 0.6. Across an object relative clause, the corresponding results are 0.64 and 0.55. Across an object relative clause without that, they are 0.65 and 0.51. Therefore, the LSTM's advantage on the broad word prediction metric coexists with an advantage for the Decay RNN on selected agreement tests. The phrase that intervenes between the subject and verb helps determine which network has the higher reported accuracy.
Reflexive anaphora shows a similar dependence on construction. In the simple reflexive case, the Decay RNN scores 0.75 and the LSTM 0.85. Across a relative clause, the Decay RNN reaches 0.62 and the LSTM 0.57. The slacked variant reaches 0.66 in the relative-clause condition and 0.73 in the simple one. Even systems with closely related update rules can show different profiles across constructions.
The negative polarity item comparisons distinguish grammatical, intrusive, and ungrammatical forms. An intrusive form can contain an expression that looks like a licensor in the string while being structurally misplaced. A contrast involving an intrusive sentence can therefore test a different sensitivity from one involving a straightforwardly ungrammatical sentence. On the relative-clause comparison of intrusive and ungrammatical forms, the Decay RNN reaches 0.5 while the LSTM reaches 0.22. On the relative-clause comparison of grammatical and ungrammatical forms, the Decay RNN reaches 0.1 and the LSTM 0.03. The latter values show why a relative improvement needs to be read alongside the absolute level of performance.
The authors summarize the targeted tests with mean arithmetic ranks across the task rows. The ON-LSTM has a mean rank of 2.94, the GRU 3, the LSTM 3.31, and the Decay RNN 3.52. The SDRNN is at 3.68, the Ab-DRNN at 4.73, and the SRN at 5.94. The paper takes the ON-LSTM comparison values from the earlier study of that architecture. The relatively close ranks among several networks encompass substantial variation between individual tests. The authors' conclusion about dominance concerns the overall pattern across those tests, with the ordering on any given construction still worth examining.
What the ablations show
State persistence and recurrent mixing both matter
The Ab-DRNN asks whether direct persistence plus new input is sufficient for the reported tasks. The comparison is especially informative for grammaticality. On the original Wikipedia test set, the ablated network scores 85.98%, while the SRN scores 50.12%. The direct carry gives past activity a dedicated route to later steps. The authors connect this behavior to independently recurrent architectures, where state coordinates retain their own recurrent histories, and describe the ablated variant as avoiding the vanishing-gradient difficulty associated with the simple baseline.
The full Decay RNN reaches 95.48% on the same grammaticality test. With recurrent mixing present, earlier activity in one coordinate can influence the next candidate at another. The improvement is consistent with a role for both the direct carry and learned interactions. One possible use of that combination is to preserve information while changing which other parts of the state respond to it. The experiment measures the performance associated with those available operations. It leaves the detailed division of work among state coordinates unresolved.
Number prediction gives the same comparison a different scale. The Ab-DRNN reaches 97.37% and the SRN 97.70% on the Wikipedia prefix test. The Decay RNN reaches 98.66%. Having an explicit place to make the decision allows both partially stripped-down approaches to succeed on much of the test set. The stronger separation in whole-sentence judgment provides the clearest performance evidence in this paper for the contribution of combining the recurrent paths.
Word prediction supplies another perspective because the ablation changes the parameter count along with the state update. The Ab-DRNN gets validation perplexity of 86.42 with 0.55M parameters. The full Decay RNN gets 76.67 with 1.4M. That comparison shows the advantage of restoring the recurrent term under the reported configuration, including its parameters. The SRN's 114.74 with 1.4M parameters adds evidence that the way those parameters interact with direct persistence matters for these runs.
The sign constraint changes generalization
The Decay RNN and SDRNN are the comparison for the sign rule. Both retain the decay coefficient and a recurrent matrix. On the original grammaticality test, the SDRNN has the higher accuracy. The classification results on the template-generated generalization set can favor the constrained network. This comparison uses classifiers trained for grammaticality judgment, distinct from the word predictors used in the broader targeted syntax evaluation.
For the grammaticality judgment category involving agreement across an object relative clause without that and with an animate noun, the generalization accuracies are 0.45 for the Decay RNN and 0.28 for the SDRNN. On reflexives in a sentential complement, they are 0.65 and 0.6. On long verb phrase coordination, they are 0.53 and 0.43. The appendix presents a wider comparison of grammaticality classifiers across sentence types, including the LSTM, and specifies at least 200 test sentences for each type in that figure.
The three reported rows illustrate a change in the relative ordering on selected constructions. Their absolute scores also matter. An accuracy of 0.45 still represents frequent errors on the object-relative-clause contrast. The sign restriction is compatible with improvement over the slacked variant on that category even though the construction remains difficult. This gives the authors a basis for proposing a regularizing effect. Fixing the signs limits the recurrent interactions the network can learn, and the learned interactions can differ in how well they transfer to examples beyond the ordinary corpus distribution.
A separate analysis uses the number-prediction networks and looks at their confidence as a sentence unfolds. It averages the confidence assigned to the correct verb number at successive positions across 540 template-generated sentences with prepositional phrases and plural inanimate subjects. Tracking confidence before the final choice lets the authors see where the networks begin to favor the expected number. The examples of subject words given in the paper include movies and books.
The SDRNN shows unusually low confidence at the plural inanimate subject position, whereas the authors do not observe that pattern for the Decay RNN. The figure describes 0.5 as the threshold for the illustrated confidence reading, with the sides corresponding to singular and plural in that example. The profile adds information beyond whether the networks eventually pick the correct form. The sign-constrained and unconstrained networks can respond differently as the evidence arrives, including at the subject itself. The reported profile concerns this family of prepositional-phrase sentences.
Supportive nouns can make a test easier
The controlled comparison of intervening nouns addresses a different question from the architectural variants. Here the authors keep the distance from the subject to the verb at 7 and the number of attractors at 1. They group examples by the count of intervening nouns that share the subject's number. Distance and opposing evidence are therefore held fixed while the amount of supporting evidence varies across the groups.
With a non-attractor count of 0, the Decay RNN has 90.65% number-prediction accuracy and the LSTM has 90.4%. At a count of 1, both reach 95.56%. At a count of 2, the Decay RNN reaches 96.06% and the LSTM reaches 95.63%. These percentages measure the same binary choice on the specified subsets of the number-prediction test. Both networks are more accurate in the groups containing additional nouns whose number supports the correct answer.
This analysis clarifies a potential ambiguity in attractor-based evaluation. Take a plural subject separated from its verb by a singular noun. The singular is misleading if a predictor reads it as evidence for the verb's number. A plural noun in the same interval can supply evidence in the opposite direction. A correct prediction could reflect the subject's number, the supporting intervening noun, or a combination of the two. Treating every example with the same attractor count as equally challenging would overlook that variation.
The appendix examines the complementary relationship for grammaticality judgment. It holds the total number of intervening nouns fixed and varies how many count as attractors. The reported trends for the LSTM and Decay RNN show that performance declines as the count of attractors rises. With the total held fixed, a group with more opposing nouns necessarily has fewer supporting nouns. Read alongside the number-prediction experiment, the pattern supports the authors' view that the mix of grammatical numbers within the interval is relevant to both networks' decisions.
These analyses concern groups of examples. Their value is in showing which patterns in the data are associated with success or error, including patterns a single aggregate score would miss. The supporting noun comparison constrains distance and attractor count, while the appendix comparison constrains the total number of intervening nouns. Other properties, including the words used and how phrases are arranged, can still vary across examples. The shared direction of the results makes the case for recording those sources of evidence when interpreting agreement accuracy.
What training does to the decay coefficient
The appendix follows the decay coefficient through grammaticality training from several starting points. The authors plot a moving average of the learned values over training, with length measured in forward passes. They report convergence around 0.8 for the initializations examined within the permitted interval. The similar destination across those runs suggests that the trained balance for this task did not depend strongly on the tested starting value.
That observation helps explain the choice to initialize the scalar at 0.8. It also provides a direct measurement of the architectural quantity introduced to represent persistence. The trained classifier gives appreciable weight to the old state at each step while continuing to mix in a candidate based on the current word and recurrent interactions. The trace measures a scalar shared by the update. It leaves open how long a particular feature remains available and which parts of the recurrence preserve it.
Limitations
Limits the authors identify
The authors point to the scarcity of sufficiently challenging syntactic cases in the Wikipedia data. A large corpus can supply many training and test instances while still offering uneven coverage of difficult constructions. The generalization set responds by assembling defined sentence types and testing them separately. Its role is especially important here because the original corpus produces high agreement accuracy even for some networks that struggle under a different task presentation.
They also identify a cue built into number prediction. Ending the input exactly where the verb belongs gives the learner information that can help with the relevant boundary. The whole-sentence task changes that condition, but its labels still measure agreement through the examples used to train and test it. The paper accordingly uses broader word prediction and targeted constructions to investigate behavior that extends beyond the marked prefix task.
The treatment of negative polarity items comes with a specific interpretive caution. The authors note that variability may reflect cues other than the intended syntactic relationship, following the earlier targeted evaluation study. A system might prefer a sentence for reasons that happen to correlate with the contrast being scored. When the ordering changes across grammatical, intrusive, and ungrammatical comparisons, the score describes that particular choice. The architecture's ability to represent the licensing relationship remains a further question.
The authors describe the regularizing effect of the Dale constraint as a possibility calling for further investigation. The relative advantage of the constrained variant on the selected generalization tests is the observation. An account of how the restriction produces that outcome would require more about the learned recurrent dynamics. The conclusion points to dynamical analysis as a route for investigating those states and to further work on whether they have any connection to actual neuronal behavior or human language cognition.
Limits visible in the design
The comparison establishes what the tested architectures can achieve at their reported settings. The classifier experiments hold hidden and embedding dimensions at 50. The word prediction experiments use a common reported hidden dimension of 650, with different numbers of trainable parameters across architectures. A large part of the engineering question concerns what performance is possible with simpler recurrence, and these are informative configurations for it. How the architectures would order under a matched parameter budget, or under a systematic exploration of widths, remains open.
The result tables also support different degrees of precision in comparing systems. The classifier scores are means over 3 runs. Run-to-run dispersion and uncertainty for the small gaps between the strongest classifiers are unavailable from the table. A reported difference in the hundredths place gives the order of the displayed averages. Whether that order is stable across more training runs is a separate empirical question. Larger separations, such as the change in the SRN's performance across task presentations, motivate stronger qualitative observations about the setup.
A similar distinction applies to the choice of baselines. The ON-LSTM results for targeted syntax are drawn from an earlier paper, and the other architectures are studied in Bhatt and colleagues' experimental program. The average ranks summarize the available results across the paper's test categories. Those ranks give each category a position in an overall comparison, while the size of an accuracy difference and the nature of the sentence contrast are visible in the individual rows. The table supports the authors' observation that the tested sequential architectures trade places across constructions. It leaves open how a wider family of architectures would perform.
The template set controls the grammatical construction of examples and makes rare or difficult cases easier to examine in quantity. Its non-recursive templates describe a particular range of structures. The experiment tests transfer to those structures and lexical fillings. Additional depths of embedding, wider lexical choices, and agreement patterns in other languages are beyond its direct evidence. Even inside the tested range, the class-by-class results are more specific than a claim about mastery of English grammar as a whole.
The intervening-noun analysis illustrates the difference between evidence about behavior and evidence about a mechanism. When accuracy rises with supportive nouns, the network is demonstrably more successful on the subsets where those nouns are present in greater numbers. The paper holds important variables fixed in making that comparison. Establishing what caused an individual prediction would need a design that changes a suspected cue while maintaining the rest of the example, or an analysis linking the cue to changes in the state and decision. The corpus groups give a reason to ask for that more local evidence.
The whole-sentence classifier similarly returns a binary outcome. Its accuracy says how frequently it distinguishes the classes. Pinpointing a grammatical error would require evidence about the position or the relation the network found relevant. The authors motivate the task in terms of the resources needed to find an error within a sentence. The experiment observes the resulting judgment. The confidence analysis begins to add positional information for a selected family of sentences, using the number predictor rather than the full-sentence labels.
Finally, the biological analogy is built into identifiable parts of the computation. The fixed outgoing signs correspond to the paper's account of excitatory and inhibitory effects, and the direct decay path corresponds to persistence in membrane potential. The decay is a learned scalar for a recurrent cell trained through back-propagation, and the timesteps are the steps of sequence processing. The linguistic results assess this computational design. Whether its hidden activity tracks neural recordings, or whether people solve agreement problems through comparable state dynamics, remains a question for the kinds of experiments the authors propose.
What came after
A later study by Bansal and colleagues takes up the difference between easier and harder agreement examples on the training side. Bhatt and colleagues use that distinction to interpret test behavior. Accuracy depends in part on whether the intervening material supports the target verb number or competes with it. Bansal and colleagues ask whether recurrent networks trained on harder subject–verb agreement instances can still perform well on easier ones. The direction of transfer is the focus of that question. Can RNNs trained on harder subject-verb agreement instances still perform well on easier ones?
The follow-up shifts the comparison from what a trained network encounters during evaluation to what it encounters while learning. The question complements the earlier paper's use of template-generated sentences to probe performance beyond the ordinary mixture of examples in Wikipedia. In the Decay RNN study, a high score on that mixture leaves uncertainty about performance on specific difficult constructions. In the later study's framing, training on difficult cases raises a corresponding question about performance on easier cases. Together, the questions make the distribution of agreement examples part of what a recurrent-network experiment is testing.
Cite
Cite as Gantavya Bhatt, Hritik Bansal, Rishubh Singh and Sumeet Agarwal. 2020. How much complexity does an RNN architecture need to learn syntax-sensitive dependencies?. Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics: Student Research Workshop.
@inproceedings{bhatt2020how,
title = {{How much complexity does an RNN architecture need to learn syntax-sensitive dependencies?}},
author = {Gantavya Bhatt, Hritik Bansal, Rishubh Singh and Sumeet Agarwal},
booktitle = {Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics: Student Research Workshop},
year = {2020},
doi = {10.18653/v1/2020.acl-srw.33},
url = {https://doi.org/10.18653/v1/2020.acl-srw.33}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/bhatt-2020-how-much-complexity-does-rnn/