Abstract
Graph-to-Sequence (Graph2Seq) learning is essential for tasks like generating text from Abstract Meaning Representation (AMR) graphs or syntax-aware machine translation. We present the Heterogeneous Graph Transformer (HetGT), which improves upon existing methods by treating graphs as collections of distinct subgraphs rather than monolithic structures. By processing direct, indirect, and reverse relations in independent representation subspaces and utilizing a "Jump" connection for multi-layer aggregation, HetGT achieves state-of-the-art results on AMR-to-text and syntax-based translation benchmarks.
Introduction
The core challenge in Graph2Seq learning is building an encoder that captures both local structural nuances and global dependencies. Previous approaches using Graph Neural Networks (GNNs) often ignore distant node relations, while Transformer-based models frequently conflate direct and indirect relations. The authors of HetGT argue that treating these distinct relation types identically disturbs the information propagation process. HetGT is designed to adaptively weight different relation types without losing the inherent structural hierarchy of the graph.
Methodology
HetGT introduces several architectural innovations to handle graph heterogeneity:
Graph Preprocessing and Subword Segmentation
Input graphs are transformed into "extended Levi graphs," where edges are converted into nodes, and reverse edges and self-loops are added to ensure robust information flow. To combat data sparsity, Byte Pair Encoding (BPE) is applied to the graph nodes themselves, splitting concept nodes into subword components.
Heterogeneous Subgraph Splitting
The model's primary innovation is splitting the graph into multiple subgraphs based on relation types:
- Default: Original directed edges.
- Reverse: Added backward edges.
- Connected: An undirected version of the graph.
- Fully-connected: A complete graph to capture implicit/indirect relations.
Multi-Head Attention and Layer Aggregation
Each attention head in the Transformer encoder is restricted to a specific subgraph via masking, forcing the model to learn independent representations for different connectivity types. Furthermore, HetGT uses a "Jumping Knowledge" architecture (Jump connection), concatenating the outputs of all encoder layers. This allows the decoder to selectively aggregate intermediate representations, preserving lower-level structural features that are often lost in deeper layers.
Experimental Setup
The model was evaluated on four standard benchmarks:
- AMR-to-Text: LDC2015E86 (AMR15) and LDC2017T10 (AMR17).
- Syntax-based NMT: English-German (En-De) and English-Czech (En-Cs) from the WMT16 task, using dependency trees as input.
Results and Analysis
HetGT established a new state-of-the-art (SOTA) across all tested benchmarks. On AMR17, HetGT achieved 34.10 BLEU, outperforming the previous SOTA by 2.28 points.
Key Insights
- Explicit vs. Implicit Heterogeneity: While standard Transformers implicitly attend to different subspaces, HetGT explicitly partitions them based on topology, preventing the "blurring" of structural information.
- The Power of Indirect Relations: Ablation studies showed that removing the "fully-connected" subgraph caused a significant drop in BLEU scores, proving that modeling indirect relations is crucial for global context.
- Jump vs. Residual Connections: The "Jump" connection significantly outperformed standard residual connections, suggesting that early-layer structural features remain highly relevant for text generation.
Conclusion
The Heterogeneous Graph Transformer demonstrates the effectiveness of explicitly modeling graph heterogeneity in sequence generation tasks. By partitioning attention across diverse subgraphs and aggregating multi-layer information, HetGT provides a powerful framework for structural learning. Future work will address remaining challenges such as word duplication in generated sequences and the computational overhead of multi-subgraph processing.
Summary updated