Cross-Layer and Cross-Sample Feature Optimization Network for Few-Shot Fine-Grained Image Classification

Zhen-Xiang Ma, Zhen-Duo Chen, Li-Jun Zhao, Zi-Chao Zhang, Xin Luo, Xin-Shun Xu

Abstract

Few-Shot Fine-Grained Image Classification (FS-FGIC) presents a unique challenge: identifying subtle differences between highly similar categories (e.g., specific bird species or dog breeds) using only a handful of labeled examples. The C2-Net (Cross-Layer and Cross-Sample Feature Optimization Network) addresses this by filtering out layer-specific noise and spatially aligning features between support and query images. By introducing Cross-Layer Feature Refinement (CLFR) and Cross-Sample Feature Adjustment (CSFA), C2-Net establishes new state-of-the-art performance benchmarks across several fine-grained datasets.

Introduction

Standard deep learning models for fine-grained classification often struggle when data is scarce. Two primary hurdles hinder performance in the few-shot regime:

  1. The Noise Trap: Extracting detailed features from multiple network layers often introduces "sample-level noise"—background clutter or lighting conditions that do not generalize across the category. With limited training data, models easily overfit to these irrelevant details.
  2. The Mismatch Problem: Support and query images often feature objects in different poses or positions. Standard metric learning models struggle to compare these features because they lack spatial alignment.

Methodology: The C2-Net Architecture

C2-Net integrates two novel modules into a standard backbone-plus-metric learning framework to overcome these challenges.

The C2-Net architecture overview, illustrating the integration of Cross-Layer Feature Refinement (CLFR) and Cross-Sample Feature Adjustment (CSFA) modules.

Cross-Layer Feature Refinement (CLFR)

Instead of simply concatenating features from different layers, CLFR employs a reconstruction procedure. It calculates a correlation matrix between the high-level semantics of the last layer and the mid-level details of the penultimate layer. By reconstructing features based on shared information, the module suppresses unshared noise (like background elements) and emphasizes the discriminative features of the target object.

Cross-Sample Feature Adjustment (CSFA)

Once features are refined, they must be compared effectively. CSFA facilitates this through two operations:

  • Channel Activation: This step adaptively re-weights feature channels based on shared information between the query and support images, "activating" the most relevant traits for the specific comparison.
  • Position Matching: To solve the mismatch problem, this operation learns a dynamic adjustment matrix to spatially warp query features to match the support prototype. This alignment ensures that the comparison is based on corresponding object parts, regardless of pose or location.

Experimental Results

C2-Net was evaluated on five rigorous benchmarks: CUB-200-2011 (birds), Stanford Dogs, Stanford Cars, and the large-scale meta-iNat and tiered meta-iNat datasets.

Performance Benchmarks

The model outperformed existing state-of-the-art (SOTA) methods, particularly in the challenging 1-shot setting:

  • CUB-200-2011: Achieved 78.66% accuracy, a significant improvement over previous methods (~74%).
  • Stanford Dogs: Reached 66.42%, surpassing the previous SOTA by approximately 5%.
  • meta-iNat: Demonstrated strong generalization on large-scale data with 71.47% accuracy.
Heatmap visualizations showing how C2-Net focuses on discriminative object parts (like beaks and ears) while successfully ignoring background noise in both support and query images.

Qualitative analysis via heatmaps confirms that C2-Net consistently focuses on the most discriminative parts of the object, whereas standard backbones are often distracted by complex backgrounds.

Discussion and Future Work

The core innovation of C2-Net lies in its use of redundancy as a filter; by forcing different network layers to "agree" on features, the model naturally discards layer-specific noise. Furthermore, explicit spatial alignment reduces the burden on the classifier to be perfectly invariant to pose changes.

While C2-Net sets a new bar for FS-FGIC, future research may focus on reducing the computational overhead introduced by cross-layer correlation matrices and exploring how these refinement modules scale with Vision Transformer (ViT) backbones. Additionally, handling extreme occlusions or radically different viewpoints remains an open challenge for spatial alignment modules.

Summary updated

BibTeX
@inproceedings{ma2024cross,
  author = {Zhen-Xiang Ma and Zhen-Duo Chen and Li-Jun Zhao and Zi-Chao Zhang and Xin Luo and Xin-Shun Xu},
  title = {{Cross-Layer and Cross-Sample Feature Optimization Network for Few-Shot Fine-Grained Image Classification}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i5.28208},
}
Figure