This paper investigates a fundamental question in Neural Natural Language Processing: Do deep learning models actually "understand" the hierarchical structure of language, or are they simply proficient at memorizing linear sequences? By probing the internal states of Recurrent Neural Networks (RNNs), the authors demonstrate that these models naturally induce hierarchical syntactic representations that mirror human linguistic structures.
The Challenge of Syntactic Representation
Before the dominance of Transformers, deep RNNs like LSTMs were the standard for NLP tasks. While they performed exceptionally well on translation and language modeling, it was unclear if they were capturing the "tree-like" nature of language—where words form phrases, which in turn form clauses—or if they were relying on local word patterns. The researchers sought to determine if internal hidden states contain explicit syntactic information and whether that information is organized by network depth.
Methodology: Diagnostic Probing
The researchers employed diagnostic probing to analyze four different deep RNN models pre-trained on diverse tasks: Dependency Parsing, Semantic Role Labeling (SRL), Machine Translation (MT), and Language Modeling (LM).
After freezing the weights of these models, they trained simple, shallow classifiers (probes) to predict syntactic features from specific hidden layers. These features included Part-of-Speech (POS) tags and constituent labels at three levels of abstraction: the Parent (e.g., NP), Grandparent (e.g., VP), and Great-grandparent (e.g., S).
Key Insights: The "Soft Hierarchy"
The study revealed several critical findings regarding how RNNs process syntax:
- Syntax Induction without Supervision: Models with no explicit syntactic training (like the Language Model and MT encoder) performed significantly better than baselines at predicting parse tree labels. This suggests that structural understanding is a natural byproduct of learning to predict the next word or translate a sentence.
- Depth and Abstraction: There is a striking correlation between network depth and syntactic abstraction. POS tags (low-level) are typically best represented in the earliest layers. As one moves deeper into the network, representations become more adept at predicting higher-level constituents like the "Great-grandparent" label.
- Task-Specific Forgetting: In SRL and Language Models, syntactic information often peaks in the middle layers and declines in the final layers. This suggests the model uses syntax as an intermediate step to solve its primary task and then discards the raw syntactic data to focus on the final output.
Layer-wise Performance Trends
Across 11 of the 16 experimental cases, performance improved up to a specific layer and then declined, supporting the theory that different layers specialize in different levels of the hierarchy.
For example, the Language Model's internal representations were highly effective at identifying parent-child relationships. Its best layer (Layer 3) achieved 80% accuracy in dependency arc prediction, compared to only 62% at the input layer (Layer 0). All RNN-based representations significantly outperformed non-contextual baselines like GloVe, proving that the context captured by the RNN is essential for encoding hierarchy.
Conclusion
This research confirms that deep RNNs naturally organize linguistic information into a "soft hierarchy." While these models were not explicitly designed to build parse trees, the requirements of complex language tasks force them to induce structural representations that align with classical linguistic theory. Future work in this area has since expanded these probing techniques to Transformer-based architectures like BERT and GPT.
Summary updated