[Paper Review] GraphFormers: GNN-nested Language Models for Linked Text Representation.
GraphFormers proposes a novel architecture that nests graph neural networks within each transformer layer of pretrained language models to iteratively enhance text representations using neighborhood information. This end-to-end integration improves linked text representation quality, with unidirectional variants offering high efficiency and performance comparable to stronger baselines on large-scale datasets.
Linked text representation is critical for many intelligent web applications, such as online advertisement and recommender systems. Recent breakthroughs on pretrained language models and graph neural networks facilitate the development of corresponding techniques. However, the existing works mainly rely on cascaded model structures: the texts are independently encoded by language models at first, and the textual embeddings are further aggregated by graph neural networks. We argue that the neighbourhood information is insufficiently utilized within the above process, which restricts the representation quality. In this work, we propose GraphFormers, where graph neural networks are nested alongside each transformer layer of the language models. On top of the above architecture, the linked texts will iteratively extract neighbourhood information for the enhancement of their own semantics. Such an iterative workflow gives rise to more effective utilization of neighbourhood information, which contributes to the representation quality. We further introduce an adaptation called unidirectional GraphFormers, which is much more efficient and comparably effective; and we leverage a pretraining strategy called the neighbourhood-aware masked language modeling to enhance the training effect. We perform extensive experiment studies with three large-scale linked text datasets, whose results verify the effectiveness of our proposed methods.
Motivation & Objective
- To address the limitation of cascaded model structures in linked text representation, where neighborhood information is underutilized.
- To improve the quality of text representations by enabling iterative, bidirectional neighborhood information extraction within the transformer architecture.
- To design an efficient variant, unidirectional GraphFormers, that maintains strong performance while reducing computational cost.
- To develop a pretraining strategy—neighbourhood-aware masked language modeling—that enhances model learning of contextual and structural dependencies.
Proposed method
- GraphFormers integrate graph neural networks directly into each transformer layer of the language model, allowing each token to attend to both its own context and neighboring nodes in a knowledge graph.
- The model employs an iterative message-passing mechanism across the graph structure, refining token representations through multiple rounds of neighborhood aggregation.
- A novel pretraining objective, neighbourhood-aware masked language modeling, is introduced to jointly optimize for both masked token prediction and graph-structure-aware representation learning.
- The unidirectional GraphFormers variant restricts message passing to a single direction, reducing computation while preserving most performance gains.
- The architecture enables end-to-end training, where textual and structural information are jointly optimized rather than processed in isolation.
- The model leverages attention mechanisms enhanced with graph-structural features to dynamically weight neighboring nodes during representation learning.
Experimental results
Research questions
- RQ1Can nesting GNNs within transformer layers improve linked text representation beyond cascaded architectures?
- RQ2How does iterative neighborhood information aggregation within the transformer layers affect representation quality?
- RQ3What is the trade-off between performance and efficiency when using bidirectional versus unidirectional message passing in GraphFormers?
- RQ4To what extent does neighbourhood-aware masked language modeling improve downstream representation learning?
- RQ5How do GraphFormers compare to state-of-the-art models on large-scale linked text benchmarks?
Key findings
- GraphFormers achieve state-of-the-art performance on three large-scale linked text datasets, demonstrating superior representation quality over cascaded models.
- The unidirectional GraphFormers variant achieves performance comparable to the full bidirectional version while significantly reducing computational cost.
- The neighbourhood-aware masked language modeling pretraining strategy leads to measurable improvements in downstream representation learning.
- Iterative neighborhood encoding within the transformer layers enables more effective utilization of graph-structural information than static or single-pass aggregation.
- The model shows consistent gains across multiple evaluation metrics, confirming the effectiveness of the nested GNN-Transformer architecture.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.