Learning on Large-scale Text-attributed Graphs via Variational Inference

Jianan Zhao, Meng Qu, Chaozhuo Li, Hao Yan, Qian Liu, Rui Li, Xing Xie, Jian Tang

TL;DR

GLEM (Graph and Language Learning by EM) is a scalable framework that allows Large Language Models (LMs) and Graph Neural Networks (GNNs) to mutually train each other on massive text-attributed graphs. By alternating training steps through a variational Expectation-Maximization framework, GLEM achieves state-of-the-art results on billion-scale datasets like ogbn-papers100M without the prohibitive memory costs of joint training.

The Challenge of Text-Attributed Graphs

Most real-world graphs—such as citation networks, social media platforms, or e-commerce databases—are Text-Attributed Graphs (TAGs). Effectively learning from these graphs requires capturing two distinct types of information:

  1. Local Semantics: The actual text associated with a specific node (best handled by LMs like BERT or DeBERTa).
  2. Global Structure: How nodes connect and relate to one another across the network (best handled by GNNs).

The ideal solution is to train these two modalities together. However, a massive bottleneck exists: Scalability. Standard co-training requires encoding a node and all its neighbors using an LM during every training step. On large, dense graphs, this consumes an astronomical amount of GPU memory. Consequently, researchers usually settle for "static" features (training an LM once and fixing its outputs) or "sampling" (looking at only a tiny fraction of the graph), both of which sacrifice significant performance.

The GLEM Approach: Variational EM

To overcome this bottleneck, the authors introduce GLEM, which uses a Variational Expectation-Maximization (EM) framework. This approach decouples the training of the LM and the GNN while still allowing them to iteratively share knowledge.

GLEM Framework Overview

Instead of relying on one giant, memory-hungry model, GLEM alternates between two distinct steps:

  • E-Step (LM Optimization): The Language Model is trained to predict the "gold" labels of known nodes. Crucially, it also tries to match the pseudo-labels generated by the GNN for unlabeled nodes. This effectively "distills" the GNN’s structural knowledge into the LM.
  • M-Step (GNN Optimization): The GNN is trained using the LM’s latest embeddings as input features. Like the LM, it also uses the LM’s predictions as pseudo-labels for unlabeled nodes. This injects fresh semantic insights from the LM into the GNN.

By alternating these steps, the models act as "teachers" for one another without ever needing to be in the same backpropagation loop.

Key Insights and Ideas

  • The Power of Pseudo-Labels: The core innovation is realizing that gradients do not need to pass between the LM and GNN for them to collaborate. Passing predictions (pseudo-labels) is sufficient to transfer knowledge across the semantic-structural divide.
  • Structure-Free Inductive Learning: One of the most impressive findings is that after GLEM training, the GLEM-LM (the LM part alone) performs significantly better on new, unseen nodes than a standard fine-tuned LM. Because it was trained to mimic a GNN, it effectively "internalized" structural patterns into its text-encoding logic, allowing it to make structure-aware predictions even when graph edges are missing.
  • Scalability as a Feature: Because the modules are decoupled, the authors could use high-capacity models like DeBERTa-large (~400M parameters) on graphs that would normally crash a standard co-training setup.

Key Results

The researchers evaluated GLEM on three major benchmarks from the Open Graph Benchmark (OGB): ogbn-arxiv (~170k nodes), ogbn-products (~2.4M nodes), and the massive ogbn-papers100M (111 million nodes and 1.6 billion edges).

Performance comparison of GLEM against baselines
  • New State-of-the-Art: GLEM-GNN achieved the #1 spot on the OGB leaderboards for all three datasets at the time of publication.
  • Massive Gains: On ogbn-arxiv, GLEM improved GNN performance by up to 19% compared to using raw OGB features.
  • Efficiency: Compared to "Joint" training methods, GLEM is orders of magnitude faster and uses far less memory. For example, on ogbn-arxiv, GLEM-GNN takes about 0.13 seconds per epoch, while joint methods can take thousands of seconds.

Limitations and Future Work

While highly effective, the framework introduces two new hyperparameters ($\alpha$ and $\beta$) to balance the weight of "gold" labels versus "pseudo" labels. The optimal values can vary depending on the specific GNN architecture used. Additionally, while GLEM converges quickly (often in 1-2 iterations on Arxiv), it still requires managing multiple training rounds, adding pipeline complexity compared to a single-shot training run.

Future research could explore extending this EM-based distillation beyond node classification to see if it works as effectively for link prediction or broader graph-level reasoning tasks.

Summary updated

BibTeX
@inproceedings{zhao2023learning,
  author = {Jianan Zhao and Meng Qu and Chaozhuo Li and Hao Yan and Qian Liu and Rui Li and Xing Xie and Jian Tang},
  title = {{Learning on Large-scale Text-attributed Graphs via Variational Inference}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=q0nmYciuuZN},
}
Figure