A Flexible Generative Framework for Graph-based Semi-supervised Learning

Jiaqi Ma, Weijing Tang, Ji Zhu, Qiaozhu Mei

TL;DR

Most graph neural networks treat the graph structure as a fixed, noise-free observation and assume node labels are conditionally independent. This paper introduces $G^3\text{NN}$, a generative framework that jointly models node features, labels, and edges using classical random graph models combined with variational inference. By pairing a generative graph model with Graph Neural Networks acting as the approximate posterior, the framework substantially improves semi-supervised classification—especially when edges or labels are scarce.

What Problem Does This Paper Address?

Graph-based semi-supervised learning aims to predict labels for mostly unlabeled nodes in a network using node features, graph topology, and a small set of labeled nodes. Existing methods generally fall into two categories:

  1. Graph regularization methods (e.g., Laplacian smoothing), which force neighboring node predictions to be smooth, often oversimplifying complex relationships.
  2. Discriminative Graph Neural Networks (GNNs) (like GCN and GAT), which aggregate local feature representations to predict node labels independently given the graph.

Both paradigms treat the graph as a deterministic, fixed ground truth. In real-world data, however, networks are noisy, incomplete, or partially unobserved. Moreover, discriminative models overlook the generative dependencies between labels and graph topology (e.g., nodes sharing a label are naturally more likely to connect).

Methods

The authors propose modeling the full joint distribution of features $X$, labels $Y$, and graph structure $G$ via the factorization: $$p(X, Y, G) = p(G \mid X, Y) \, p(Y \mid X) \, p(X)$$

Because computing the exact posterior over missing labels $p(Y_{\text{miss}} \mid X, Y_{\text{obs}}, G)$ is intractable, the authors use scalable variational inference:

  • Generative Model ($p_\theta$):
  • $p_\theta(Y \mid X)$ is modeled via a Multi-Layer Perceptron (MLP).
  • $p_\theta(G \mid X, Y)$ models edge probabilities $p(e_{i,j} \mid \cdot)$ using either a Latent Space Model (LSM) (logistic regression over projected features and label embeddings) or a Stochastic Block Model (SBM) (a planted partition model where edge probability depends purely on whether node labels match).
  • Approximate Posterior / Recognition Model ($q_\phi$): Uses a Graph Neural Network (either GCN or GAT) using a mean-field assumption $q_\phi(Y_{\text{miss}} \mid X, G)$.
  • Training Objective: Minimizes the negative Evidence Lower BOund (ELBO) combined with an explicit supervised classification loss on labeled nodes: $\mathcal{L}_{\text{ELBO}} + \eta \mathcal{L}_s$. Negative edge sampling is adopted to avoid evaluating all $O(n^2)$ node pairs.

The resulting four model variants are designated $G^3\text{NN}$ (LSM-GCN, LSM-GAT, SBM-GCN, SBM-GAT).

          ┌──────────────────────── p(Y|X) [MLP] ────────────────────────┐
          │                                                              ▼
Features (X) ──► Recognition Model q(Y|X, G) [GCN/GAT] ──► Labels (Y_miss, Y_obs)
          │                                                              │
          └───────────► Generative Model p(G|X, Y) [LSM/SBM] ◄───────────┘
                                         │
                                         ▼
                                   Graph Edges (G)

Datasets

The authors evaluate their approach on three standard citation network benchmarks:

  • Cora: 2,708 nodes, 5,429 edges, 7 classes.
  • Citeseer: 3,327 nodes, 4,552 edges, 6 classes.
  • Pubmed: 19,717 nodes, 44,324 edges, 3 classes.

They test across three distinct experimental protocols:

  1. Standard Benchmark Setting: Standard public train/val/test splits.
  2. Missing-Edge Setting: All edges adjacent to test nodes are completely removed (mimicking cold-start / out-of-sample inference).
  3. Reduced-Label Setting: The number of labeled training nodes per class is cut in half.

Key Insights and Ideas

  • Variational Regularization for GNNs: Decomposing the ELBO loss reveals that the generative graph model acts as a regularizer for the inference GNN. It encourages the GNN's label predictions to actively support the observed graph structure and align with the prior $p(Y \mid X)$.
  • Resilience to Incomplete Graphs: When edges for test nodes are missing, purely discriminative GNNs falter because their neighborhood aggregation breaks down. By contrast, generative models infer parameters that capture underlying label–feature–topology relationships, preserving high test accuracy even without test connectivity.

Key Results

  • Standard Setting: $G^3\text{NN}$ variants outperform their discriminative baselines on Cora and Citeseer. For instance, on Citeseer, SBM-GCN achieves 74.5% accuracy compared to 71.8% for standard GCN. On Cora, LSM-GAT and SBM-GAT reach 82.9% (vs. 82.5% for GAT and 81.5% for GCN). On Pubmed, vanilla GCN performs slightly higher (79.4%), which the authors attribute to Pubmed's high graph density and low class count (3 classes).
  • Missing-Edge Setting: When all test-node edges are removed, $G^3\text{NN}$ exhibits massive gains:
  • On Cora, SBM-GCN achieves 71.8% vs. GCN’s 66.5%.
  • On Citeseer, SBM-GCN achieves 71.6% vs. GCN’s 65.2%—nearly matching GCN's performance on the fully connected graph (71.8%).
  • Reduced-Label Setting: With 50% fewer training labels, SBM-GAT attains 79.6% on Cora (vs. 77.1% for GAT and 75.0% for GCN).

Limitations and Future Work

  • Simple Generative Parametrizations: The generative models used (planted-partition SBM and single-layer LSM) make strong conditional independence assumptions regarding edges given node pairs.
  • Pubmed Performance: The framework fell short of vanilla GCN on the dense, low-class Pubmed dataset, suggesting that the added regularization can underperform when neighborhood feature propagation is already sufficient.
  • Future Work: The authors recommend developing richer, more expressive random graph distributions within the generative framework to model more complex network topologies.

Summary updated

BibTeX
@inproceedings{ma2019flexible,
  author = {Jiaqi Ma and Weijing Tang and Ji Zhu and Qiaozhu Mei},
  title = {{A Flexible Generative Framework for Graph-based Semi-supervised Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2019},
  url = {https://openreview.net/forum?id=voMyQSzo9yS},
}
Figure