Structure-Aware Group Discrimination with Adaptive-View Graph Encoder: A Fast Graph Contrastive Learning Framework

Zhenshuo Zhang, Yun Zhu, Haizhou Shi, Siliang Tang

TL;DR

AVGE-SAGD is a high-performance graph contrastive learning (GCL) framework designed for speed and scalability. By decoupling message passing from feature transformation and replacing expensive pairwise losses with a structure-aware group discrimination task, it achieves up to a 250x speedup in inference while maintaining or exceeding the accuracy of state-of-the-art methods.

What Problem Does This Paper Address?

Graph Neural Networks (GNNs) have revolutionized representation learning on graphs, but they face two major bottlenecks when scaled to real-world, massive datasets:

  1. Computational Redundancy: Standard GNNs perform multi-hop message passing and non-linear transformations in every layer during every training step. This is computationally expensive and slow.
  2. Inefficient Loss Functions: Most Graph Contrastive Learning (GCL) methods rely on pairwise contrastive losses, which compare every node against many others. This leads to high computational complexity and slow convergence.

The authors aim to bridge this gap by creating a framework that is both "structure-aware" (capturing the graph's topology) and "fast" (suitable for large-scale deployment).

Methods

The authors propose two main components to tackle these challenges:

1. Adaptive-View Graph Encoder (AVGE)

Instead of a traditional deep GNN, AVGE separates the graph operations from the learning operations.

  • Decoupled Message Passing: Message passing is treated as a parameter-free pre-computation step. This transforms the graph data into multi-hop feature vectors before training even begins.
  • MLP-based Learning: The actual encoder is a simple Multi-Layer Perceptron (MLP). During inference, the model doesn't need the graph structure at all—it just processes the pre-computed features, leading to massive speedups.
  • Adaptive Weighted Training: To prevent the model from "taking shortcuts" by only looking at easy-to-distinguish high-order features, the authors use a min-max optimization strategy. It assigns learnable weights to different hop features, forcing the model to learn robust representations from both local and global neighborhoods.
The architecture of separating message passing from feature transformation compared to a standard GCN.

2. Structure-Aware Group Discrimination (SAGD)

To replace slow pairwise losses, the authors use Group Discrimination. Instead of comparing node pairs, the model learns to distinguish between a "real" graph and a "corrupted" version (where node features are shuffled). To ensure the MLP doesn't lose the graph's structural essence, they add auxiliary "Structure-Preserving" tasks:

  • Relative Degree Prediction: Predicting if a node has a high degree relative to its neighbors.
  • Hop Order Prediction: Identifying which "hop" a specific feature came from.
The overall AVGE-SAGD architecture, showing the data flow from augmentation to group discrimination.

Datasets

The framework was evaluated on a mix of small and large-scale benchmarks:

  • Small-scale: Cora, CiteSeer, PubMed (citation networks), and Amazon Computers/Photo (co-purchase graphs).
  • Large-scale: ogbn-arxiv and ogbn-products from the Open Graph Benchmark (OGB), which contain hundreds of thousands to millions of nodes and edges.

Key Insights and Ideas

  • The "Shortcut" Problem: In graphs with high homophily (where similar nodes are connected), high-order message passing naturally clusters similar nodes. If a contrastive model only uses these "easy" features, it fails to learn the nuanced local details needed for downstream tasks. The min-max weighting is a clever adversarial way to ensure the model pays attention to "harder" low-order features.
  • Structural Injection: An MLP on its own is "graph-blind." By forcing the MLP to solve auxiliary tasks like predicting relative degrees, the authors effectively "bake" structural awareness into the node embeddings without the overhead of a full GNN.
  • Inference Efficiency: Because the graph structure is only used for pre-computation, the inference stage is essentially just an MLP forward pass. This makes it incredibly lightweight for production environments.

Key Results

  • Massive Speedups: On the ogbn-arxiv dataset, AVGE-SAGD is 266x faster in inference than the efficient GGD baseline. On ogbn-products, it is 301x faster.
  • State-of-the-Art Accuracy: Despite being much faster, it outperforms supervised GCNs and other GCL methods on small-scale datasets. On large-scale OGB datasets, it remains highly competitive with much heavier models.
  • Embedding Quality: t-SNE visualizations show that AVGE-SAGD produces much cleaner, more distinct clusters of node categories compared to raw features or other efficient baselines.
t-SNE visualization showing the clear separation of node clusters achieved by AVGE-SAGD on the Cora dataset.

Limitations and Future Work

  • The Supervised Gap: On very large datasets like those from OGB, the authors note that self-supervised GCL still generally lags behind fully supervised GCNs when labels are abundant.
  • Pre-computation Storage: While pre-computing multi-hop features saves time, it increases storage requirements (storing $K$ versions of the feature matrix). The authors mitigate this with a sampling strategy, but it remains a trade-off.
  • Future Directions: The authors suggest further exploring the relationship between different encoder architectures and various pretext tasks to find even more efficient combinations.

Summary updated

BibTeX
@inproceedings{zhang2023structure,
  author = {Zhenshuo Zhang and Yun Zhu and Haizhou Shi and Siliang Tang},
  title = {{Structure-Aware Group Discrimination with Adaptive-View Graph Encoder: A Fast Graph Contrastive Learning Framework}},
  booktitle = {ECAI},
  year = {2023},
  doi = {10.3233/faia230624},
}

Loading related content...

Figure