Abstract
Graph neural networks (GNNs) have been used to tackle the few-shot learning (FSL) problem and shown great potentials under the transductive setting. However under the inductive setting, existing GNN based methods are less competitive. This is because they use an instance GNN as a label propagation/classification module, which is jointly meta-learned with a feature embedding network. This design is problematic because the classifier needs to adapt quickly to new tasks while the embedding does not. To overcome this problem, in this paper we propose a novel hybrid GNN (HGNN) model consisting of two GNNs, an instance GNN and a prototype GNN. Instead of label propagation, they act as feature embedding adaptation modules for quick adaptation of the meta-learned feature embedding to new tasks. Importantly they are designed to deal with a fundamental yet often neglected challenge in FSL, that is, with only a handful of shots per class, any few-shot classifier would be sensitive to badly sampled shots which are either outliers or can cause inter-class distribution overlapping. Extensive experiments show that our HGNN obtains new state-of-the-art on three FSL benchmarks.
Introduction
Few-shot learning (FSL) aims to recognize novel classes using only a limited number of labeled examples, known as "shots." While Graph Neural Networks (GNNs) have demonstrated significant potential in transductive FSL—where the model observes all test instances simultaneously—they often underperform in inductive settings. The primary limitation of existing GNN-based methods lies in their use of GNNs as task-agnostic classifiers performing label propagation. This approach fails to account for the need for rapid task adaptation and the inherent noise in small-sample distributions, such as outliers and inter-class overlap.
The HGNN Framework
The proposed Hybrid Graph Neural Network (HGNN) redefines the role of GNNs by utilizing them as feature adaptation modules rather than simple classifiers. By decoupling the GNN from the final prediction step, the model can refine feature embeddings to better fit the specific geometry of a given task. The architecture integrates two complementary GNN modules:
- Prototypical GNN (PGNN): This module operates at the class level, using class prototypes as nodes. Through message passing, it encourages the model to increase the distance between different class embeddings, directly addressing the problem of inter-class overlapping.
- Instance GNN (IGNN): This module operates at the instance level, constructing a graph from support samples and a query instance. It identifies intra-class outliers and pulls them toward the more representative samples of their respective classes.
Experimental Results
HGNN was evaluated on three major benchmarks: MiniImageNet, TieredImageNet, and CUB-200-2011. The model achieved new state-of-the-art results across various backbones. For instance, on MiniImageNet with a ResNet-12 backbone, HGNN reached 67.02% accuracy in the 1-shot setting and 83.00% in the 5-shot setting.
Qualitative analysis using t-SNE visualizations confirms the effectiveness of the dual-graph approach. The PGNN successfully separates class prototypes that were initially overlapping, while the IGNN effectively "neutralizes" outliers by shifting their embeddings closer to the class centers.
Conclusion
By shifting the focus from label propagation to feature adaptation, the HGNN framework provides a robust solution for inductive few-shot learning. The combination of instance-level and prototype-level graphs allows the model to handle the messy reality of random sampling, effectively mitigating the impact of outliers and overlapping distributions. This hybrid approach sets a new benchmark for graph-based models in the few-shot learning domain.
Summary updated