Abstract
This survey provides a systematic roadmap for applying Graph Neural Networks (GNNs) to the field of Natural Language Processing (NLP). It introduces a new taxonomy that organizes the field into three core pillars: graph construction, representation learning, and encoder-decoder frameworks. By moving beyond simple sequences to complex graph structures, GNNs unlock new levels of machine reasoning and linguistic understanding.
Introduction
For years, the standard approach in NLP has been to treat text as a sequence of tokens processed by models like Recurrent Neural Networks (RNNs) or Transformers. While effective, this approach often ignores the rich, non-linear relationships inherent in language, such as dependency trees, semantic web structures, and external knowledge bases.
Unlike images (grids) or text (sequences), graph-structured data is "irregular," with varying numbers of neighbors and no fixed ordering. This survey addresses the gap between traditional deep learning and the complex structural needs of NLP, focusing on three fundamental questions: how to construct graphs from text, how to represent them mathematically, and how to map them to structured outputs.
A Systematic Taxonomy of GNNs in NLP
The authors propose a taxonomy organized along three primary axes: graph construction, representation learning, and encoder-decoder frameworks. This structure allows researchers to categorize models based on how they handle the lifecycle of graph data.
Graph Construction
Graph construction is the foundational step of turning raw text into a structured format.
- Static Construction: Utilizes existing linguistic tools, such as dependency parsers or knowledge bases, to build a fixed graph.
- Dynamic Construction: Allows the model to learn the graph structure on the fly. This is particularly promising as it can bypass the noise and errors inherent in manual parsing tools by learning task-specific connections.
Graph Representation Learning
Once a graph is constructed, it must be mathematically represented. The survey reviews techniques like Graph Filtering (aggregating information from neighbors) and Graph Pooling (condensing large graphs into single vectors). A pivotal method highlighted is the Graph Attention Network (GAT), which uses self-attention to weigh the importance of different neighbors dynamically.
Encoder-Decoder Frameworks
Most NLP tasks involve mapping an input to a specific output. The survey details advanced architectures designed for these mappings:
- Graph-to-Sequence: Applied to tasks like translation or summarization.
- Graph-to-Tree: Ideal for generating hierarchical structures like mathematical equations or code.
- Graph-to-Graph: Essential for complex information extraction where both input and output are structured.
Key Insights and Applications
A profound realization in recent research is that the standard Transformer is essentially a GNN operating on a fully connected graph. By adopting Graph Transformers, researchers can inject "structural bias," guiding the model on which connections matter based on syntax or logic rather than assuming every word is equally related to every other word.
Furthermore, GNNs excel in tasks requiring deep reasoning, such as multi-hop Question Answering. While sequence models often lose context across long distances, GNNs allow the model to "jump" across documents and entities, mimicking how a human might connect disparate clues to solve a mystery.
Performance Benchmarks
GNNs have established new state-of-the-art results in several key areas:
- AMR-to-Text Generation: Where preserving the "who-did-what-to-whom" structure is vital.
- Multi-hop Reasoning: GNNs consistently outperform sequence models on datasets like HotpotQA by explicitly modeling the path between pieces of evidence.
- Semantic Role Labeling (SRL): By incorporating syntactic dependency graphs, GNN-based models achieve significantly higher F1 scores than syntax-agnostic LSTMs.
Future Directions and Challenges
Despite significant progress, several frontier challenges remain for the community:
- Scalability: Dynamic graph construction often has $O(n^2)$ complexity, making it difficult to process very long documents or massive knowledge bases.
- Heterogeneity: Most current dynamic methods assume uniform node types; learning graphs that include words, entities, and topics simultaneously remains an open problem.
- Pre-training: There is a lack of a universal "Pre-trained GNN" for NLP comparable to the impact of BERT or GPT for sequences.
- Graph-to-Graph Transformation: This remains the most difficult architecture to master, especially for irregular semantic parsing tasks where both ends of the pipeline are complex.
Summary updated