Abstract
While Transformer-based models dominate modern natural language processing, their quadratic computational complexity and representation redundancy present significant challenges for long-document processing and efficient scaling. This paper introduces a pre-trained Graph Recurrent Network (GRN) that serves as a linear-complexity alternative. By modeling sentences as graphs with local token-level communication and a decoupled global sentence state, the proposed architecture achieves performance comparable to BERT while offering substantial speedups for long sequences and producing more diverse, isotropic representations.
Introduction
The current NLP landscape is primarily defined by the success of self-attention mechanisms. However, Transformers suffer from two major drawbacks: quadratic time complexity ($O(n^2)$) relative to sequence length and contextualized feature redundancy. The self-attention mechanism requires every token to attend to every other token, making the processing of long documents computationally expensive and environmentally taxing. Furthermore, recent studies suggest that the "anisotropy" of Transformer embeddings—where vectors cluster into a narrow cone—limits their expressiveness.
This research investigates whether a non-Transformer architecture, specifically a Graph Recurrent Network (GRN), can bridge the gap between computational efficiency and high-quality language representation.
Methods
The authors adapt the Sentence-state LSTM (S-LSTM) architecture for large-scale self-supervised pre-training.
The Graph Architecture
Instead of a fully connected attention matrix, the model treats each sequence as a graph. This structure consists of:
- Token Nodes: Each word is a node connected to its immediate left and right neighbors.
- Sentence Node: A global node connected to every token node, providing a decoupled "summary" of the sequence.
- Bi-directional Edges: Information flows both ways between neighbors and between tokens and the global state.
The Update Mechanism
Unlike standard LSTMs that process tokens sequentially, this GRN updates all nodes in parallel across multiple layers (recurrent steps). It uses an LSTM-style gating mechanism (input, forget, and output gates) to control information flow. To improve parameter efficiency, the authors employ cross-layer parameter sharing, similar to the ALBERT architecture.
Pre-training
The model is pre-trained using Masked Language Modeling (MLM). In this setup, 15% of tokens are masked, and the model must predict them based on the graph-structured context provided by the encoding layer.
Key Insights and Ideas
Linear Complexity ($O(n)$)
Because each token only communicates with its immediate neighbors and one global node, the computation scales linearly. This makes the model significantly more efficient for long-form text compared to the quadratic scaling of standard Transformers.
Decoupled Global State and Diversity
In Transformers, the [CLS] token is treated like any other token. In this GRN, the sentence node is structurally distinct. This decoupling appears to mitigate the "representation degeneration" problem. Using Principal Component Analysis (PCA), the authors found that the GRN's representations are less redundant than BERT's; it takes more principal components to explain the same amount of variance in the GRN's features, suggesting the model captures more varied information per token.
Anisotropy Mitigation
The GRN produces a more uniform (isotropic) distribution of embeddings. While BERT embeddings are highly positively correlated (clustered), the GRN embeddings show a wider range of similarity scores, including negative relationships, which enhances the expressiveness of the feature space.
Key Results
- Competitive Accuracy: On the GLUE benchmark, the GRN achieved an average score of 78.67, outperforming ELMo (69.65) and DistilBERT (77.87), and remaining within 1.5 points of BERT-base (80.18).
- Inference Speedup: For sequences of length 512, the GRN is 2x to 3x faster than RoBERTa-base.
- Long Sequence Scalability: In CPU runtime tests for sequences up to 10,000 tokens, the GRN maintained near-linear growth, outperforming specialized "Longformers" for sequences under 8,500 tokens.
- Parameter Efficiency: By sharing parameters across layers, the model remains compact (approx. 186M parameters for the large version) while maintaining high capacity.
Conclusion
The pre-trained Graph Recurrent Network offers a compelling alternative to the Transformer for language representation. By achieving linear complexity without sacrificing significant accuracy, it opens new doors for processing long-form documents efficiently. Future work will explore extending this architecture to sequence-to-sequence frameworks for generative tasks like translation and summarization.
Summary updated