Unlocking the Potential of Black-box Pre-trained GNNs for Graph Few-shot Learning

Qiannan Zhang, Shichao Pei, Yuan Fang, Xiangliang Zhang

Abstract

Graph Few-shot Learning (FSL) typically relies on "white-box" access to pre-trained models for fine-tuning. However, many state-of-the-art models are provided as black-box services. This paper introduces Meta-BP, a framework that enables effective few-shot learning using only output embeddings from black-box Graph Neural Networks (GNNs). By integrating a lightweight meta-learner with an Information Bottleneck (IB) filter and subnetwork pruning, Meta-BP extracts task-relevant knowledge while filtering out pre-training noise, outperforming existing methods.

Introduction

Graph Few-shot Learning aims to classify nodes or structures with minimal labeled data. While combining pre-trained GNNs with meta-learning is a promising direction, most current methods assume a "white-box" setting where model parameters are accessible. In practice, many high-performing models are delivered via APIs (Model-as-a-Service), providing only black-box access to embeddings.

This setting presents two major challenges: the Task Gap, where general pre-training information acts as noise for specific downstream tasks, and Adaptation Limits, as the original model cannot be fine-tuned. Meta-BP addresses these by learning to adapt to new tasks using only the fixed embeddings provided by the black-box model.

Methodology: The Meta-BP Framework

Meta-BP (Graph Meta-learning with Black-box Pre-trained GNNs) introduces a multi-stage pipeline to bridge the gap between black-box embeddings and few-shot tasks.

The Meta-BP framework architecture, illustrating the interaction between the black-box GNN, the meta-learner, and the information bottleneck filter.

The framework consists of three primary components designed to work around the black-box constraint:

  1. Lightweight Graph Meta-Learner: A small adapter that employs "neighbor abstraction" to reconstruct topological context from point-wise embeddings provided by the black box.
  2. Information Bottleneck (IB) Filter: Based on the IB principle, this component ensures the meta-learner extracts minimal sufficient information. It compresses input embeddings to discard irrelevant pre-training noise while retaining task-critical features.
  3. Subnetwork Pruning: Inspired by the Lottery Ticket Hypothesis, Meta-BP identifies a sparse subnetwork within the meta-learner. This acts as a powerful regularizer, preventing overfitting on limited meta-training data and enhancing generalization to unseen tasks.

Experimental Evaluation

The researchers evaluated Meta-BP on four benchmarks: Cora, Cora-full, Amazon Computers, and OGBN-arxiv. The model was tested across various N-way K-shot scenarios (e.g., 2-way 1-shot, 5-way 3-shot) to assess performance under extreme data scarcity.

Key Results

Meta-BP consistently outperformed baselines, including standard GNNs (GCN, GraphSage) and specialized meta-learning frameworks (MAML, G-Meta). For instance, on the Cora dataset (2-way 1-shot), Meta-BP achieved 66.38% accuracy, surpassing the best black-box baseline.

Ablation study results on Cora and OGBN-arxiv datasets, demonstrating the performance contribution of each Meta-BP component.

Ablation studies confirm the necessity of each component. As shown in the figure above, removing neighbor abstraction (w/o-N), the IB filter (w/o-I), or the pruning step (w/o-S) consistently led to performance degradation, validating the integrated design of Meta-BP.

Discussion and Conclusion

Meta-BP demonstrates that "cracking open" a pre-trained GNN is not a prerequisite for high performance in few-shot learning. By treating pre-training noise as an adversary and using sparsity for generalization, Meta-BP provides a robust solution for the Model-as-a-Service (MaaS) era.

While Meta-BP effectively filters noise, its performance remains bounded by the quality of the underlying black-box embeddings. Future work may extend this approach beyond node classification to link prediction or whole-graph tasks. Nonetheless, Meta-BP represents a significant step toward practical, efficient graph meta-learning in restricted access environments.

Summary updated

BibTeX
@inproceedings{zhang2025unlocking,
  author = {Qiannan Zhang and Shichao Pei and Yuan Fang and Xiangliang Zhang},
  title = {{Unlocking the Potential of Black-box Pre-trained GNNs for Graph Few-shot Learning}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i21.34407},
}
Figure