Directional diffusion models for graph representation learning

Run Yang, Yuling Yang, Fan Zhou, Qiang Sun

This paper, presented at NeurIPS 2023, explores why diffusion models—the powerhouse behind modern image generation—have struggled to make a similar impact in the world of graph representation learning. The authors identify a fundamental structural mismatch and propose a "directional" fix that sets new benchmarks for unsupervised graph learning.

TL;DR

Standard diffusion models fail on graphs because their "white noise" destroys delicate graph structures too quickly. By introducing Directional Diffusion Models (DDMs) that use data-dependent, anisotropic noise, the authors preserve signal-to-noise ratios longer, allowing the model to learn superior representations that outperform even supervised methods on several benchmarks.

What Problem Does This Paper Address?

Diffusion models work by gradually turning data into noise (the forward process) and then learning to reverse that process (the denoising process). In computer vision, this works beautifully because image features are relatively "isotropic"—they are distributed somewhat uniformly around a center.

However, graphs are different. The authors use Singular Value Decomposition (SVD) to show that graph data is highly anisotropic: its features cluster along very specific, narrow directions.

Comparison of feature distributions between image (CIFAR-10) and graph (Amazon-Photo, IMDB-M) datasets.

When you apply standard "vanilla" diffusion (which adds isotropic Gaussian white noise), the noise quickly overwhelms these narrow directional signals. The Signal-to-Noise Ratio (SNR) craters almost immediately, leaving the denoising network with nothing but static to learn from. This prevents the model from capturing the meaningful semantic and topological structures needed for tasks like node or graph classification.

Methods

The authors introduce Directional Diffusion Models (DDMs), which modify the forward diffusion process with two key constraints to keep the "signal" alive longer:

  1. Anisotropic Scaling: Instead of using standard unit-variance noise, the noise is scaled by the empirical mean and standard deviation of the features within the current training batch. This ensures the noise "fits" the shape of the data.
  2. Directional Alignment: The noise is constrained to share the same sign as the original feature. This ensures that adding noise doesn't accidentally flip a feature's direction (e.g., turning a positive signal into a negative one), which helps preserve the discriminative boundaries between classes during the diffusion process.

For the architecture, they use a GNN-based U-Net. It consists of an encoder (two GNN layers) and a decoder (two GNN layers) with skip connections to prevent over-smoothing. Unlike some diffusion models that predict the noise added, this model is trained to directly predict the original "clean" graph features.

Datasets

The authors evaluated DDM on 12 publicly available datasets across two primary tasks:

  • Graph Classification: MUTAG, IMDB-B, IMDB-M, PROTEINS, COLLAB, and REDDIT-B.
  • Node Classification: Cora, Citeseer, PubMed, Ogbn-arxiv, Amazon-Computer, and Amazon-Photo.

They also used CIFAR-10 as a baseline for visualizing the structural differences between image and graph data.

Key Insights and Ideas

  • The "Sandstorm" Analogy: If image data is a sturdy building, graph data is a delicate sand sculpture. Vanilla diffusion is like a massive sandstorm that levels the sculpture instantly. Directional noise is like a controlled wind that slowly wears it down, allowing the model to see the internal structure as it fades.
  • SNR Preservation: In their experiments, white noise dropped the SNR to near zero within 50 steps for the Amazon-Photo dataset. Directional noise maintained a usable SNR for the full 1,000 steps.
Signal-to-Noise Ratio (SNR) over diffusion steps for white noise vs. directional noise.
  • Generative Augmentation: The DDM acts as a "pseudo-infinite" data augmentation technique. By diffusing and denoising, the model generates numerous variations of the data while strictly preserving the classification boundaries, which is why it excels in unsupervised settings.

Key Results

  • Graph Classification: DDM achieved state-of-the-art (SOTA) results on all 7 datasets. Remarkably, it outperformed supervised models like GIN and DiffPool on the IMDB-B, COLLAB, and MUTAG datasets.
  • Node Classification: DDM outperformed popular contrastive learning methods (like DGI and MVGRL) and generative baselines (like GraphMAE) on 5 out of 6 datasets, including a significant lead on the "Computer" and "Photo" datasets.
  • Ablation Success: The authors proved that both the scaling and the sign-alignment constraints were "indispensable." Removing either one led to a significant drop in accuracy across all tested datasets.

Limitations and Future Work

  • Manual Step Selection: Currently, the authors manually select specific diffusion steps (e.g., 50, 100, 200) to extract feature representations. They suggest that future work should focus on automatically determining the optimal set of steps for a given dataset.
  • Broadening Scope: While this paper focuses on classification, the authors believe directional diffusion could be extended to other domains with anisotropic data, such as Natural Language Processing (NLP) or object detection in computer vision.
  • Complexity: As with most diffusion models, the training and inference process can be more computationally expensive than simpler contrastive methods.

Summary updated

BibTeX
@inproceedings{yang2023directional,
  author = {Run Yang and Yuling Yang and Fan Zhou and Qiang Sun},
  title = {{Directional diffusion models for graph representation learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=oDtyJt5JLk},
}
Figure