Abstract
Few-shot learning aims to learn novel categories from very few samples given some base categories with sufficient training samples. The main challenge of this task is that novel categories are prone to being dominated by the color, texture, shape of the object, or background context (namely specificity), which are distinct for the given few training samples but not common for the corresponding categories. Fortunately, we find that transferring information from correlated base categories can help learn novel concepts and thus avoid the novel concept being dominated by specificity. Besides, incorporating semantic correlations among different categories can effectively regularize this information transfer. In this work, we represent semantic correlations in the form of a structured knowledge graph and integrate this graph into deep neural networks to promote few-shot learning by a novel Knowledge Graph Transfer Network (KGTN). Specifically, by initializing each node with the classifier weight of the corresponding category, a propagation mechanism is learned to adaptively propagate node messages through the graph to explore node interaction and transfer classifier information of the base categories to those of the novel ones. Extensive experiments on the ImageNet dataset show significant performance improvement compared with current leading competitors. Furthermore, we construct an ImageNet-6K dataset that covers larger scale categories, i.e., 6,000 categories, and experiments on this dataset further demonstrate the effectiveness of our proposed model.
The Challenge of Specificity in Few-Shot Learning
In few-shot recognition, a model must learn to identify a new category (e.g., a "Kerry Blue Terrier") after seeing only one or a few examples. The fundamental challenge is specificity: a single training image contains features that are unique to that specific instance—such as a specific side-standing pose or a particular backyard background—but are not common to the category as a whole.
Standard deep learning models often overfit to these specificities, leading to a classifier that fails when it encounters the same object in a different context. Humans avoid this because we possess prior knowledge; we know a terrier is related to other dogs we have seen thousands of times. This research aims to provide neural networks with a similar form of "common sense" by leveraging semantic correlations between categories to regularize the learning process.
Methodology: The Knowledge Graph Transfer Network (KGTN)
The proposed Knowledge Graph Transfer Network (KGTN) addresses the specificity trap by using a Gated Graph Neural Network (GGNN) to "borrow" classifier information from semantically related categories that have abundant data. The architecture consists of three main components:
- Feature Extraction: A standard ResNet-50 backbone is employed to transform input images into d-dimensional feature vectors.
- Knowledge Graph Transfer Module: This is the core innovation. All categories (both "base" classes with abundant data and "novel" classes with very little) are represented as nodes in a graph.
- Edges: These represent semantic correlations, calculated either via word embeddings (GloVe) or hierarchical relationships (WordNet).
- Propagation: A GGNN passes messages between nodes, allowing the classifier weights of a novel category to be refined by the weights of its semantically similar neighbors. This effectively "denoises" the prototype representation of the novel class.
- Prediction: The final classifier weights (prototypes) are generated by the graph. Recognition is performed using a similarity metric—such as Cosine Similarity or Pearson Correlation—between the image features and these generated weights.
The training process is conducted in two stages: first, the feature extractor is trained on base classes; second, the extractor is fixed while the GGNN is trained to learn the optimal information propagation mechanism across the graph.
Large-Scale Evaluation and ImageNet-6K
The researchers evaluated KGTN on three benchmarks to ensure robustness and scalability:
- ImageNet-FS: A standard few-shot benchmark derived from ImageNet, containing 1,000 categories (389 base, 611 novel).
- ImageNet-6K: A newly introduced dataset by the authors designed to test scalability. It covers 6,000 categories (1,000 base and 5,000 novel), providing a rigorous test of the model's ability to handle massive category spaces.
- ImageNet 2012/2010: Large-scale benchmarks used for comparison against other specific state-of-the-art methods.
Key Results and Insights
KGTN demonstrates significant improvements over existing metric-learning approaches. On ImageNet-FS, the model achieved a top-5 accuracy of 62.1% for 1-shot learning, outperforming the previous state-of-the-art (SGM) by 7.8%. On the massive ImageNet-6K dataset, KGTN maintained a significant lead with 30.5% accuracy in the 1-shot setting, proving that the knowledge graph approach scales effectively to thousands of classes.
Several key insights emerged from the study:
- Classifiers as Prototypes: By treating classifier weights as category prototypes, the graph acts as a powerful denoising mechanism against specificity.
- Semantic Regularization: Forcing the model to consider semantic neighbors prevents the "novel" node from drifting toward the unique quirks of its limited training samples.
- Random Initialization: Interestingly, randomly initializing base category weights during the second stage of training improved performance, suggesting that starting from scratch helps the GGNN learn a more robust propagation mechanism.
- Similarity Metrics: While inner product is standard, Cosine Similarity and Pearson Correlation offered better performance in larger-scale scenarios like ImageNet-6K.
Conclusion
The Knowledge Graph Transfer Network successfully mitigates the specificity problem in few-shot recognition by integrating structured semantic knowledge into the deep learning pipeline. By leveraging the relationships between well-known base classes and unfamiliar novel classes, KGTN achieves superior generalization. Future work may explore dynamic, attention-based graphs or end-to-end training to further refine the transfer of knowledge across category boundaries.
Summary updated