LPN: Language-Guided Prototypical Network for Few-Shot Classification

Kaihui Cheng, Chule Yang, Xiao Liu, Naiyang Guan, Zhiyuan WangIEEE TCSVT 2025 · DOI

TL;DR

This paper introduces LPN, a novel language-guided prototypical network for few-shot image classification. LPN leverages the complementary strengths of vision and language modalities through parallel branches and a refined prototypical head, achieving state-of-the-art results, particularly in challenging 1-shot scenarios.

What Problem Does This Paper Address?

Few-shot image classification aims to train models that can accurately classify new categories with very few labeled examples. Traditional deep learning models require vast amounts of labeled data, making them impractical for scenarios where data is scarce. While existing few-shot methods have made progress, they often struggle to fully exploit the rich semantic information available in natural language, which humans readily use to understand new concepts. This paper addresses the gap of effectively integrating multi-modal information (vision and language) to enhance few-shot classification performance, moving beyond simple post-hoc fusion or single-modality adjustments.

Methods

The core of LPN is its dual-branch architecture:

  • Visual Branch: This branch follows a standard metric-based approach. It uses a conventional image encoder to extract visual features from input images. These features are then aligned with class-level textual features (explained below) and used to compute visual logits through a metric module.
  • Text Branch: This branch is where the novelty lies.
  • Class-Level Text Features: A pre-trained text encoder (like CLIP's) is used to extract semantic features directly from class names.
  • Language-Guided Decoder (LaGD): To bridge the gap between class-level text features and individual image features (since explicit text descriptions for each image are unavailable), a LaGD module is introduced. This module, inspired by transformer architectures, uses cross-attention to align class-level text features with visual features, generating image-specific text features.
  • Refined Prototypical Head (RPH): To improve prototype quality, especially in low-data scenarios (like 1-shot), the RPH module is proposed. It refines the text prototypes by incorporating both class-level text features and computed prototypes, balancing their contributions via a hyperparameter $\gamma$.
  • Fusion: LPN employs both pre-fusion (within the LaGD) and post-fusion strategies. The visual and text logits are aggregated in a post-fusion stage to calibrate deviations and produce the final prediction.
  • Supervised Contrastive Loss ($L_{scl}$): An additional loss is used on the text branch to improve the discriminability of text features and mitigate confusion arising from class-level feature extraction.

Datasets

The paper evaluates LPN on three widely-used benchmark datasets:

  • miniImageNet: A coarse-grained dataset with 100 classes, used with 64/16/20 classes for train/val/test splits.
  • tieredImageNet: A larger coarse-grained dataset with 608 classes, used with 351/97/160 classes for train/val/test splits.
  • CUB-200-2011 (CUB): A fine-grained dataset with 200 bird species, used with 100/50/50 classes for train/val/test splits.

Key Insights and Ideas

  • Complementarity is Key: The paper strongly advocates for the synergistic benefits of combining vision and language modalities, showing that their complementarity significantly boosts few-shot performance, especially when handled through parallel, well-integrated branches.
  • Language as a Semantic Anchor: Using class names to derive text features acts as a powerful semantic anchor, providing crucial context that visual features alone might miss, particularly when labeled data is extremely scarce (1-shot).
  • Refined Prototypes for Low-Data Scenarios: The RPH module is a critical innovation, demonstrating that explicitly refining text prototypes by incorporating class-level information can lead to substantial improvements in 1-shot settings, where standard prototypes might be unreliable.
  • LaGD Bridges Modalities Effectively: The Language-Guided Decoder (LaGD) is crucial for translating general class-level language semantics into image-specific textual representations, enabling a more effective fusion with visual features.
  • Versatility of LPN: The method's architecture is designed to be adaptable, showing that it can enhance existing metric-based few-shot classifiers, not just its own specific framework.

Key Results

  • State-of-the-Art Performance: LPN achieves competitive results across multiple benchmarks, notably outperforming existing methods in 1-shot classification. For example, on miniImageNet, LPN achieves 71.99% in 1-shot, a significant improvement over the baseline ProtoNet (63.54%).
  • Significant Gains in 1-Shot: The paper highlights substantial gains in 1-shot settings, with improvements of up to 8.45% on miniImageNet compared to baseline methods.
  • Robustness in 5-Shot: While the gains are most pronounced in 1-shot, LPN also shows strong performance in 5-shot settings, achieving 82.43% on miniImageNet, outperforming many existing methods.
  • Ablation Studies Confirm Module Effectiveness: Ablation studies confirm the significant contributions of the LaGD module (improving accuracy by 1.25% and 0.91% on average) and the RPH module (yielding a 7.16% improvement in 1-shot tasks).
  • Text Encoder Flexibility: LPN demonstrates consistent improvements regardless of the specific text encoder used (CLIP, BERT, GloVe), underscoring the robustness of the language-guided approach.

Limitations and Future Work

  • Text Encoder Dependency: While LPN works with various text encoders, its performance is still influenced by the quality of the pre-trained text encoder.
  • Computational Cost: The introduction of parallel branches and attention mechanisms might increase computational complexity compared to single-modality methods.
  • Future Work: The authors suggest exploring more sophisticated fusion strategies and investigating the application of LPN to other vision-language tasks. They also highlight the potential for further improvements by designing more advanced language-guided modules and exploring different text encoders.

Summary updated

BibTeX
@article{cheng2025lpn,
  author = {Kaihui Cheng and Chule Yang and Xiao Liu and Naiyang Guan and Zhiyuan Wang},
  title = {{LPN: Language-Guided Prototypical Network for Few-Shot Classification}},
  journal = {IEEE Trans. Circuits Syst. Video Technol.},
  year = {2025},
  doi = {10.1109/tcsvt.2024.3456127},
}
Figure