Abstract
Jie Hao, Xing Wang, Shuming Shi, Jinfeng Zhang, Zhaopeng Tu. Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP).
2019.
Introduction
While Self-Attention Networks (SANs), the foundation of the Transformer architecture, have revolutionized natural language processing, they often struggle to capture the hierarchical nature of language. Human language is inherently structured as nested trees of phrases and clauses, rather than flat sequences. Previous research indicated that hybrid models combining Recurrent Neural Networks (RNNs) and SANs outperform standalone versions, yet the underlying mechanism remained unclear. This paper posits that RNNs provide a "hierarchical complement" to the global relational modeling of SANs.
Methodology: The Cascaded Encoder
The authors propose a Cascaded Encoder designed to inject structural inductive bias into the Transformer framework through three key components:
- Ordered Neurons LSTM (ON-LSTM): Unlike standard LSTMs, ON-LSTM enforces a hierarchy among its neurons. High-level neurons track long-term information (e.g., sentence boundaries), while low-level neurons track short-term signals (e.g., local phrases). This creates a syntax-oriented bias mimicking tree structures.
- Cascaded Architecture: The model stacks a SAN encoder on top of an ON-LSTM encoder. The ON-LSTM extracts structural context, which the SAN then leverages to build global representations.
- Short-Cut Connections: To preserve structural signals from the bottom layers, the outputs of the ON-LSTM and SAN layers are summed before being passed to the decoder.
Experimental Evaluation
The model was evaluated on three benchmarks: Machine Translation (WMT14 En-De), Targeted Linguistic Evaluation (Probing tasks), and Logical Inference.
Key Results in Translation
The hybrid approach demonstrated clear superiority over vanilla Transformers. As shown in the results table, the Hybrid Model with Short-Cut connections achieved state-of-the-art performance, outperforming the standard Transformer by approximately 0.7 to 1.0 BLEU points.
Generalization and Structural Understanding
A critical finding was the model's ability to generalize to increased complexity. In logical inference tasks, the hybrid model was trained on sequences with up to 6 operators. When tested on sequences with up to 12 operators, it maintained significantly higher accuracy than pure SANs or standard LSTMs, which saw performance plummet toward random levels.
Discussion and Insights
- Hierarchy as a Complement: The performance gains are not merely due to increased parameters. Hybrid models outperform deeper "pure" models of similar size, suggesting that the combination of structural bias and global attention is fundamentally advantageous.
- The Importance of Order: Stacking RNNs below SANs is significantly more effective than the reverse. This indicates that structural "chunking" serves as a vital preprocessing step for self-attention.
- Probing Success: The model showed a massive improvement in syntactic tasks, particularly in identifying tree depth, scoring an average of 74.36 compared to the vanilla SAN's 60.66.
Conclusion
By integrating Ordered Neurons into a cascaded architecture, this work bridges the "structural gap" in Self-Attention Networks. While the sequential nature of RNNs introduces some computational overhead, the resulting gains in translation quality and structural generalization provide a compelling case for hybrid hierarchical modeling in NLP.
Summary updated