[Paper Review] Edgeformers: Graph-Empowered Transformers for Representation Learning on Textual-Edge Networks
Edgeformers is a graph-empowered Transformer framework that jointly models textual edge content and network structure for improved node and edge representation learning. By injecting graph signals into each Transformer layer during edge text encoding and aggregating context-aware edge representations via ego-graph attention, Edgeformers outperforms state-of-the-art baselines on five real-world datasets in edge classification and link prediction tasks.
Edges in many real-world social/information networks are associated with rich text information (e.g., user-user communications or user-product reviews). However, mainstream network representation learning models focus on propagating and aggregating node attributes, lacking specific designs to utilize text semantics on edges. While there exist edge-aware graph neural networks, they directly initialize edge attributes as a feature vector, which cannot fully capture the contextualized text semantics of edges. In this paper, we propose Edgeformers, a framework built upon graph-enhanced Transformers, to perform edge and node representation learning by modeling texts on edges in a contextualized way. Specifically, in edge representation learning, we inject network information into each Transformer layer when encoding edge texts; in node representation learning, we aggregate edge representations through an attention mechanism within each node's ego-graph. On five public datasets from three different domains, Edgeformers consistently outperform state-of-the-art baselines in edge classification and link prediction, demonstrating the efficacy in learning edge and node representations, respectively.
Motivation & Objective
- To address the gap in existing network representation learning models that fail to effectively utilize rich textual information associated with edges.
- To overcome the limitations of node-centric GNNs and edge-aware GNNs that treat edge features as static vectors rather than contextualized text.
- To propose a unified framework that enables deep, bidirectional interaction between graph structure and contextualized text representations on edges.
- To demonstrate the superiority of the proposed method on edge-level and node-level downstream tasks across diverse real-world networks.
- To establish a new paradigm for representation learning on textual-edge networks, where edges carry semantically rich, context-dependent text.
Proposed method
- Edgeformers introduces Edgeformer-E, a modified BERT-style Transformer where virtual node tokens are injected into each self-attention layer to propagate network structure information during edge text encoding.
- In Edgeformer-E, each edge's text is encoded with graph-enhanced attention, allowing the model to dynamically attend to neighboring nodes and incorporate structural context into the edge representation.
- Edgeformer-N aggregates edge representations within each node’s ego-graph using a learnable attention mechanism, fusing both textual and structural signals to produce node-level representations.
- The framework jointly trains on edge classification (to optimize edge representations) and link prediction (to optimize node representations), enabling end-to-end learning.
- Graph signals are injected layer-wise into the Transformer architecture, enabling deep, iterative interaction between text semantics and network topology.
- The model leverages pretrained language models (PLMs) such as BERT and integrates GNN-style message passing within the attention mechanism to preserve contextualized edge semantics.
Experimental results
Research questions
- RQ1Can joint modeling of textual edge content and network structure improve representation learning on textual-edge networks compared to traditional node-centric GNNs?
- RQ2How does injecting graph structure into each Transformer layer during text encoding affect the quality of edge representations?
- RQ3To what extent can ego-graph attention mechanisms that fuse graph and text signals improve node representation learning?
- RQ4Does the proposed framework outperform PLM-GNN cascaded architectures and edge-aware GNNs on edge-level and node-level tasks?
- RQ5Can the model generalize across diverse domains such as social networks, product reviews, and citation networks?
Key findings
- Edgeformers consistently outperforms state-of-the-art baselines, including node-centric GNNs, edge-aware GNNs, and PLM-GNN cascaded models, on five public datasets from three different domains.
- On edge classification tasks, Edgeformers achieves significant improvements over the best baseline, with gains of up to 5.2% in F1-score on the Reddit dataset.
- In link prediction, Edgeformers achieves higher AUC and AUPRC than all baselines, demonstrating the effectiveness of its node representation learning via ego-graph attention.
- The ablation study confirms that both graph injection into the Transformer and ego-graph attention are critical components, with ablation on either reducing performance by over 4% on average.
- Edgeformers scales efficiently, with Edgeformer-N’s time complexity growing linearly with neighbor size, making it practical for large graphs.
- The model demonstrates robustness across domains, showing consistent gains on social networks (Reddit), product review networks (Amazon), and citation networks (PubMed, DBLP, OGB)
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.