Abstract
This research explores whether Recurrent Neural Networks (RNNs) can acquire the recursive, hierarchical rules of human language. By testing various architectures on a synthetic grammar that separates sentence length from recursive depth, we demonstrate that while RNNs excel at generalizing to longer sequences, they struggle with deeper recursive structures. Even models with explicit structural biases, such as Stack-LSTMs, fail to learn universal recursive rules, instead exhibiting performance limits tied to their training data.
Introduction
A fundamental principle in linguistics is that language is organized into hierarchical, nested tree structures. Processing a sentence like "The keys that the man who is tall holds are silver" requires recursion—the ability to embed one grammatical structure within another. While modern RNNs and LSTMs perform impressively on many tasks, it is unclear if they truly learn these recursive rules or rely on statistical shortcuts. This study aims to decouple sentence length (spacing) from tree depth to determine if recursion is a fundamental bottleneck for neural models.
Methodology
The study evaluates six RNN architectures categorized into standard models (SRN, LSTM, GRU) and structurally biased models (Ordered-Neurons LSTMs and Stack-RNNs/LSTMs). These models were trained on a probabilistic Context-Free Grammar (pCFG) designed to independently manipulate two variables:
- Spacing ($s$): The number of words between a subject and its corresponding verb.
- Depth ($d$): The number of nested clauses, representing the level of recursion.
Models were trained on a language modeling objective and evaluated on a number-prediction task: identifying whether a verb should be singular or plural based on its distant subject. The researchers generated 170 distinct test datasets to map the failure points across the depth-spacing landscape.
Results and Discussion
The experiments revealed a consistent "structural wall" across all architectures. While models generalized effectively to subject-verb dependencies longer than those seen in training, their performance plummeted when the recursive depth exceeded the training maximum.
Key Findings:
- Generalization Asymmetry: Models handle increased spacing with ease but fail at increased depth. This suggests that RNNs learn bounded nested structures rather than unbounded recursive rules.
- The Structural Bias Paradox: Memory-augmented models like Stack-LSTMs achieved higher accuracy within their training limits but still failed to generalize to deeper trees, indicating they did not learn a systematic recursive rule.
- Internal Representations: Ablation studies identified specific "long-range" units (e.g., Unit 23 in an LSTM) that track grammatical numbers across multiple nouns simultaneously using fractal-like encoding. Removing these units specifically impaired the model's ability to handle outer and middle nesting levels.
- Human-like Failure Patterns: The models exhibited a "U-shaped" performance curve, succeeding on the innermost and outermost clauses but failing on middle levels. This mirrors "structural forgetting" observed in human sentence processing.
Conclusion
The results suggest that current RNN architectures, even those with structural priors, do not naturally learn the universal recursive properties of language. Instead, they appear to approximate these structures within fixed bounds. Future research may explore whether higher lexical variety or different training objectives could encourage the development of more robust recursive representations.
Summary updated