Shared Growth of Graph Neural Networks via Prompted Free-Direction Knowledge Distillation

Kaituo Feng, Yikun Miao, Changsheng Li, Ye Yuan, Guoren Wang

Abstract

Knowledge distillation (KD) has shown to be effective to boost the performance of graph neural networks (GNNs), where the typical objective is to distill knowledge from a deeper teacher GNN into a shallower student GNN. However, it is often quite challenging to train a satisfactory deeper GNN due to the well-known over-parametrized and over-smoothing issues, leading to invalid knowledge transfer in practical applications. In this paper, we propose the first Free-direction Knowledge Distillation framework via reinforcement learning for GNNs, called FreeKD, which is no longer required to provide a deeper well-optimized teacher GNN. Our core idea is to collaboratively learn two shallower GNNs to exchange knowledge between them. As we observe that one typical GNN model often exhibits better and worse performances at different nodes during training, we devise a dynamic and free-direction knowledge transfer strategy that involves two levels of actions: 1) node-level action determines the directions of knowledge transfer between the corresponding nodes of two networks; and then 2) structure-level action determines which of the local structures generated by the node-level actions to be propagated. Additionally, considering that different augmented graphs can potentially capture distinct perspectives of the graph data, we propose FreeKD-Prompt that learns undistorted and diverse augmentations based on prompt learning for exchanging varied knowledge. Furthermore, instead of confining knowledge exchange within two GNNs, we develop FreeKD++ to enable free-direction knowledge transfer among multiple GNNs. Extensive experiments on five benchmark datasets demonstrate our approaches outperform the base GNNs in a large margin. More surprisingly, our FreeKD has comparable or even better performance than traditional KD algorithms that distill knowledge from a deeper and stronger teacher GNN.

Introduction

Traditional knowledge distillation in Graph Neural Networks (GNNs) typically follows a teacher-student paradigm, where a complex, deep model guides a simpler, shallow one. However, deep GNNs often suffer from over-smoothing—where node representations become indistinguishable—and over-parametrization, making them difficult to optimize. This creates a "capacity gap" where the student cannot effectively learn from an over-complex or poorly optimized teacher.

To address these challenges, we propose FreeKD, a framework that enables collaborative learning between shallow GNNs. By allowing models to teach each other dynamically, we bypass the need for a deep teacher entirely.

The FreeKD Framework

FreeKD utilizes a hierarchical reinforcement learning (RL) approach to manage knowledge exchange. A "Reinforced Knowledge Judge" acts as an agent to determine the optimal direction and content of distillation.

The FreeKD framework architecture, illustrating the hierarchical reinforcement learning process and the Knowledge Judge.

The framework operates at two levels:

  1. Node-level Action: For each node, the agent evaluates which GNN is performing better and designates it as the teacher for that specific node.
  2. Structure-level Action: The agent decides whether the local neighborhood structure is reliable enough to be propagated, ensuring that only high-quality structural knowledge is transferred.

Additionally, we introduce FreeKD-Prompt, which uses prompt learning to generate augmented "prompt graphs." Unlike standard augmentations that may destroy semantic meaning, FreeKD-Prompt ensures information preservation and diversity, providing varied perspectives for the GNNs to learn from.

Key Insights and Experimental Results

The core motivation for FreeKD is the observation that GNNs possess "local strengths"—one model may excel at classifying nodes in dense clusters while another performs better on the periphery.

Heatmap comparing GraphSAGE and GAT performance across different node IDs, demonstrating that models exhibit varying strengths at the node level.

As shown in the heatmap above, GraphSAGE and GAT exhibit significantly different performance levels across various node IDs. FreeKD exploits this by dynamically switching the teacher-student roles node-by-node.

Our evaluation across five benchmark datasets (Cora, Citeseer, Chameleon, Texas, and PPI) shows that FreeKD consistently outperforms base GNNs, with improvements of up to 4.7% on the Chameleon dataset. Notably, FreeKD using two shallow GATs achieved better performance than traditional KD methods using a 32-layer GCNII teacher. Furthermore, models trained with FreeKD exhibit greater robustness to parameter noise, suggesting they converge to flatter, more generalizable minima.

Conclusion

FreeKD represents a paradigm shift in GNN distillation, moving away from the problematic deep-teacher model toward a collaborative, peer-to-peer growth strategy. By combining hierarchical RL with prompt-based augmentation, FreeKD achieves superior performance and robustness, offering a scalable solution for training high-performance GNNs without the overhead of deep architectures.

Summary updated

BibTeX
@article{feng2023shared,
  author = {Kaituo Feng and Yikun Miao and Changsheng Li and Ye Yuan and Guoren Wang},
  title = {{Shared Growth of Graph Neural Networks via Prompted Free-Direction Knowledge Distillation}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2023},
  url = {https://openreview.net/forum?id=tn97hzQ9Pf},
}
Figure