Cross-Modal Few-Shot Learning with Second-Order Neural Ordinary Differential Equations

Yi Zhang, Chun-Wun Cheng, Junyi He, Zhihai He, Carola-Bibiane Schönlieb, Yuyan Chen, Angelica I. Avilés-Rivero · DOI

Abstract

Few-shot learning for vision-language models like CLIP often faces challenges with overfitting and computational efficiency. We present SONO (Second-Order Neural ODEs), a framework that models feature refinement as a continuous physical system. By employing second-order equations to capture complex feature dynamics and utilizing "Text-as-Image Augmentation" (TAI) to synthesize training samples from text descriptions, SONO achieves state-of-the-art performance. Experimental results across 11 benchmarks demonstrate that SONO is not only more accurate but also significantly faster to train than existing methods, requiring only minutes on a single GPU.

Introduction: The Challenge of Few-Shot Adaptation

Adapting large-scale pre-trained models like CLIP to specific downstream tasks with minimal data (e.g., 1 to 16 images) is a significant hurdle in computer vision. Standard deep learning approaches often overfit, memorizing specific training instances rather than learning generalizable concepts. Existing adaptation strategies, such as prompt tuning (e.g., CoOp) or discrete adapters (e.g., Tip-Adapter), often struggle with a trade-off between expressivity and efficiency. There is a clear need for a method that can capture complex patterns while remaining computationally lightweight.

Methodology: SONO Architecture

The SONO framework introduces three core innovations to address these challenges:

1. Second-Order Neural ODEs ($S^{(a)}_\theta$)

Unlike traditional discrete layers or first-order Neural ODEs that model feature "velocity," SONO treats feature refinement as a continuous process governed by second-order differential equations (modeling "acceleration"). This allows for smoother, more stable feature transformations and enables the model to approximate a broader class of functions, effectively representing non-intersecting paths in the feature space to capture intricate data relationships.

2. Text-as-Image Augmentation (TAI)

To mitigate data scarcity, SONO leverages CLIP’s cross-modal alignment. Descriptive text prompts (e.g., "A photo of a {class}") are converted into text features that serve as additional "synthetic" training samples. This effectively "hallucinates" visual diversity from textual descriptions, providing the model with a richer understanding of class-specific features.

3. Efficient Cross-Modal Classifier

Training efficiency is maximized by initializing the final classification layer with pre-computed text embeddings. This avoids the overhead of passing text through heavy encoders during every training iteration, making the process extremely fast.

Figure 2: The SONO architecture featuring Text-as-Image augmentation and the Second-Order Neural ODE refinement block.

Experimental Evaluation

SONO was evaluated on 11 diverse benchmark datasets, including general object recognition (ImageNet, Caltech101), fine-grained tasks (OxfordPets, Flowers102, Food101), and specialized domains like satellite imagery (EuroSAT) and action recognition (UCF101).

Performance and Efficiency

SONO consistently outperforms state-of-the-art methods across various shot counts. On 16-shot ImageNet, SONO achieves 66.37% accuracy, with an average of 77.86% across all 11 datasets. Beyond accuracy, the efficiency gains are substantial: training on 16-shot ImageNet takes approximately 3.5 minutes on a single NVIDIA RTX 3090, compared to the 15 hours required by methods like CoOp.

Figure 3: Performance comparison of SONO against state-of-the-art methods across 11 benchmark datasets.

Discussion and Key Insights

  • The Advantage of Acceleration: The transition to second-order ODEs allows the model to represent more complex, non-linear relationships in the feature space that first-order models cannot, leading to better generalization from few examples.
  • Text as a Low-Cost Augmentor: High-quality text descriptions act as effective proxies for visual features, allowing the model to learn the "essence" of a category even when visual data is extremely limited.
  • Robustness to Domain Shift: In domain generalization tests (e.g., ImageNet-A), SONO showed superior robustness, improving accuracy by nearly 4% over the next best method, likely due to the smoother feature transformations learned via the ODE framework.

Conclusion and Future Work

SONO demonstrates that continuous-time modeling via second-order ODEs is a powerful tool for few-shot learning. While highly efficient, the reliance on an ODE solver during inference introduces a slight computational overhead compared to simple linear adapters. Future research could explore the behavior of these models with partially unfrozen backbones or their application to even larger multimodal architectures.

Summary updated

BibTeX
@inproceedings{zhang2025cross,
  author = {Yi Zhang and Chun-Wun Cheng and Junyi He and Zhihai He and Carola-Bibiane Schönlieb and Yuyan Chen and Angelica I. Avilés-Rivero},
  title = {{Cross-Modal Few-Shot Learning with Second-Order Neural Ordinary Differential Equations}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i10.33118},
}
Figure