On Representation Knowledge Distillation for Graph Neural Networks

Chaitanya K. Joshi, Fayao Liu, Xu Xun, Jie Lin, Chuan Sheng Foo · DOI

Introduction

Graph Neural Networks (GNNs) have demonstrated exceptional performance across diverse domains, yet their deployment in resource-constrained environments remains challenging due to high computational demands. Knowledge Distillation (KD) offers a pathway to compress these models by training a lightweight "student" to emulate a complex "teacher." However, conventional GNN distillation methods, such as Local Structure Preserving (LSP), often over-index on immediate neighborhood connectivity. This focus on local edges neglects the "global topology"—the latent relationships and overall organizational structure within the teacher's embedding space—which is crucial for handling noisy or incomplete graph data.

Graph Contrastive Representation Distillation (G-CRD)

To address these limitations, we introduce Graph Contrastive Representation Distillation (G-CRD). Unlike prior methods that attempt to match exhaustive pairwise distances, G-CRD leverages contrastive learning to align student and teacher representations efficiently.

Overview of the representation distillation pipeline and comparison between LSP, GSP, and G-CRD methods.

The G-CRD framework operates through four primary components:

  1. Node Alignment: The student is incentivized to map its node representations close to the corresponding teacher representations (positive pairs).
  2. Contrastive Pushing: The student simultaneously pushes its representations away from other nodes within the teacher's mini-batch (negative pairs), preventing representation collapse and enforcing global structure.
  3. Structure-Aware Projection: A GCN-based projection head is employed to map features into a shared space, ensuring that the alignment process respects the underlying graph connectivity rather than treating nodes as independent entities.
  4. Mutual Information Maximization: By optimizing the InfoNCE objective, G-CRD maximizes the mutual information between the teacher and student embedding spaces.

Experimental Evaluation

The efficacy of G-CRD was evaluated on a rigorous benchmark of large-scale datasets, moving beyond saturated small-scale graphs:

  • Node Classification: OGB-ARXIV and OGB-MAG (up to 1.9M nodes).
  • Graph-Level Prediction: OGB-MOLHIV (molecular property prediction).
  • Semantic Segmentation: S3DIS (3D point clouds).

Key Results

G-CRD consistently outperforms baseline distillation techniques. On the OGB-MOLHIV dataset, G-CRD improved student ROC-AUC by approximately 1-2% over standard logit-based KD. In 3D segmentation tasks on S3DIS, a PointNet++ student distilled via G-CRD achieved a mean Intersection over Union (mIoU) of 53.15, a significant increase from the 49.67 achieved through standard training.

Discussion and Insights

Analysis via the Mantel Test confirms that G-CRD strikes a superior balance between preserving local edges and global topology compared to LSP or Global Structure Preserving (GSP) methods. Furthermore, G-CRD demonstrates remarkable robustness to noise; students trained with this method maintain performance levels on corrupted 3D point cloud data where supervised models fail. Additionally, G-CRD facilitates effective quantization, allowing lightweight models to retain high accuracy even when compressed to 8-bit integers (INT8).

Conclusion

G-CRD represents a significant advancement in GNN distillation by prioritizing global topology through contrastive learning. While challenges remain—particularly in high-homophily graphs where logit-based methods are competitive—G-CRD provides a scalable and robust framework for deploying high-performance GNNs on edge devices.

Summary updated

BibTeX
@article{joshi2021representation,
  author = {Chaitanya K. Joshi and Fayao Liu and Xu Xun and Jie Lin and Chuan Sheng Foo},
  title = {{On Representation Knowledge Distillation for Graph Neural Networks}},
  journal = {IEEE Trans. Neural Networks Learn. Syst.},
  year = {2021},
  doi = {10.1109/tnnls.2022.3223018},
}
Figure