Abstract
Adapting large-scale Vision-Language Models (VLMs) like CLIP to downstream tasks often involves a compromise between computational efficiency and model performance. Traditional methods like prompt tuning are computationally expensive, while standard adapters may fail to fully exploit the synergy between visual and textual modalities. This paper introduces NODE-Adapter, a novel framework that treats class prototype refinement as a continuous mathematical flow. By leveraging Neural Ordinary Differential Equations (Neural ODEs), NODE-Adapter achieves state-of-the-art results in few-shot learning and visual reasoning with significantly reduced parameter counts and computational overhead.
Introduction
Vision-Language Models (VLMs) have demonstrated remarkable zero-shot capabilities. However, adapting these models to specific domains with limited data—few-shot learning—remains challenging. The core of many adaptation strategies is the refinement of class "prototypes," which are representative feature vectors. In few-shot scenarios (1–16 examples), these prototypes are often biased due to the small sample size. Existing solutions generally fall into two categories: input-stage prompting (e.g., CoOp), which is accurate but slow, and feature-stage adapters (e.g., Tip-Adapter), which are faster but often modality-specific and parameter-heavy.
Methodology
NODE-Adapter addresses prototype bias through a two-stage process:
Cross-Modal Prototype Construction
Rather than relying solely on text or image features, NODE-Adapter constructs an initial "cross-modal" prototype. It combines hand-crafted text prompts (e.g., "a photo of a [class]") with available support images. These are encoded via CLIP and adaptively weighted to create a robust starting point that leverages both visual and textual information.
Optimization via Neural ODEs
The primary innovation of NODE-Adapter is modeling prototype optimization as a continuous gradient flow. While standard gradient descent acts as a discrete Euler method, NODE-Adapter uses a neural network to estimate the "velocity" (gradient) of the prototype's evolution over a continuous time interval. A black-box ODE solver, such as Runge-Kutta, integrates this velocity to derive the optimal, rectified prototype. This approach utilizes the Adjoint Sensitivity Method, allowing for backpropagation with constant memory cost regardless of the optimization path's complexity.
Key Insights: Bridging the Modality Gap
A critical observation in this work is the discrepancy between visual and textual similarities. Images from different classes may appear visually similar but remain textually distinct, while images within the same class may look different but share textual traits.
By modeling prototype refinement as a continuous path, NODE-Adapter captures nuanced dynamics that discrete steps might miss, leading to more accurate "rectified" prototypes.
Experimental Results
The NODE-Adapter was evaluated across several benchmarks:
- Few-Shot Classification: Across 11 datasets (including ImageNet, OxfordPets, and EuroSAT), NODE-Adapter consistently outperformed existing methods like CoOp and Tip-Adapter-F. Notably, its 4-shot performance often exceeded the 16-shot performance of competitors.
- Domain Generalization: On ImageNet variants (V2, Sketch, Adversarial, Rendition), NODE-Adapter achieved an average accuracy of 47.11% (using ResNet-50), a significant improvement over zero-shot CLIP (40.58%).
- Visual Reasoning: On the Bongard-HOI benchmark for Human-Object Interaction, it achieved 69.48% accuracy, surpassing the previous state-of-the-art by 1.2%.
Efficiency and Scalability
NODE-Adapter is highly efficient, requiring 1000x fewer GFLOPs than CoOp and using 8x fewer parameters than Tip-Adapter-F. This makes it an ideal candidate for deployment in resource-constrained environments.
Conclusion
NODE-Adapter demonstrates that treating prototype refinement as a continuous flow via Neural ODEs provides a powerful and efficient mechanism for VLM adaptation. By bridging the gap between visual and textual features, it sets a new standard for few-shot learning and visual reasoning tasks. Future work may explore higher-order ODEs and automated prompt engineering to further enhance performance.
Summary updated