TL;DR
When teaching a pre-trained vision-language model like CLIP new tasks one by one from just a handful of examples, most methods struggle to balance learning new things without forgetting the old. The authors of Route-then-Refine (RtR) show that routing (deciding which task an image belongs to) works just as well in CLIP's original, frozen feature space as in an adapted one—while recognition (telling classes apart within a task) needs both an adapted visual representation and a classifier refitted to match it. By decoupling these two jobs, RtR hits state-of-the-art accuracy while keeping GPU memory flat at ~10.9 GB, making it the only tested method able to run every setting on a 16 GB edge device.
What Problem Does This Paper Address?
Imagine deploying a visual recognition system in the real world. Soon enough, the environment shifts: new domains appear, new object categories matter, and you only have a few labeled examples per class to update the model. This is few-shot continual learning (CL).
Pre-trained Vision-Language Models (VLMs) like CLIP give us a huge head start because they can recognize classes from their names alone (zero-shot). Still, zero-shot accuracy often falls short on specialized domains, so some adaptation is necessary—without erasing what the model already knows.
Many modern approaches use a modular design: they keep the main backbone shared and learn a lightweight module for each new task. At test time, prediction splits into two distinct roles:
- Routing: Figuring out which task module an input image belongs to.
- Recognition: Separating the classes within that chosen task.
Until now, it wasn't clear whether adapting the visual representation helps both roles equally, or how much the classifier itself needs to be updated alongside the visual features.
Methods
The authors propose Route-then-Refine (RtR), which cleanly separates routing from task-specific recognition:
- Text Prototype Adaptation: When a new task arrives, RtR first adapts the text embeddings (prototypes) of the new class names using LoRA on the text encoder, anchored to the original zero-shot prototypes.
- Route (Shared Frozen Space): RtR stores the frozen visual features of the few-shot training images from all arrived tasks. Whenever a new task arrives, it runs a routing refit—jointly shifting the routing prototypes of all arrived classes in this shared frozen space so past and current tasks compete fairly.
- Refine (Per-Task Space): For recognition, RtR trains a task-specific visual adapter on the frozen image encoder. Crucially, it then freezes that adapter and refits the classifier in the newly adapted space. The adapter and its refitted classifier are stored together as a frozen pair.
- Inference: An incoming image is first routed in the frozen space against refitted prototypes (for Seen tasks) and zero-shot prototypes (for Unseen tasks). If a Seen task wins, its dedicated adapter and classifier refine the final prediction; otherwise, the model falls back to zero-shot CLIP.
Datasets
RtR is evaluated on two standard cross-domain few-shot continual learning benchmarks:
- X-TAIL: A sequence of 10 diverse datasets (Aircraft, Caltech101, DTD, EuroSAT, Flowers, Food101, MNIST, Pets, Cars, SUN397) tested at 1, 2, 4, 8, and 16 shots per class.
- MTIL: Similar to X-TAIL, but inserts CIFAR100 after Caltech101 and evaluates each dataset with its own label space, tested at 1, 3, and 5 shots.
All hyperparameters (such as the routing temperature $\tau = 1.1$ and regularization weights) were tuned once on Split ImageNet-R before touching X-TAIL or MTIL.
Key Insights and Ideas
- Frozen features route just as well as adapted ones: In diagnostic experiments, adapting the visual representation improved within-task recognition, but did not improve routing—both frozen and adapted spaces routed at ~97% accuracy at 1-shot and >99% at 16-shot. Routing doesn't need to chase visual adaptation.
- Adaptation gains depend on the classifier: Simply plugging a visual adapter in front of fixed text prototypes yielded tiny gains (0.39%–0.45%). Refitting the classifier in the adapted space consistently boosted accuracy and unlocked larger gains from the adapter itself.
- Decoupling saves memory: Because routing stays in the frozen space, past images never need to be re-encoded—only their compact frozen feature vectors are kept.
Key Results
- State-of-the-art accuracy: RtR achieves the highest Average and Last accuracy across every shot setting on both X-TAIL and MTIL. On X-TAIL, it beats the strongest baseline in final (Last) accuracy by 5.4% at 1-shot (reaching 70.0%) and 1.0% at 16-shot (84.1%). On MTIL, it leads Last accuracy by 2.0%, 3.9%, and 1.2% at 1, 3, and 5 shots.
- Model-agnostic gains: Swapping OpenAI CLIP for MetaCLIP ViT-B/16 yields the same pattern, with RtR reaching 74.0% (1-shot) and 85.6% (16-shot) on X-TAIL.
- Edge-ready memory footprint: Peak GPU memory on an RTX 3090 stays nearly flat at 10.90–10.98 GB from 1 to 16 shots. On a 16 GB Jetson Orin NX edge device, every other profiled method (including LADA, Dual-RAIL, MoE-Adapters, S-Prompts, and HiDe-Prompt) runs out of memory in at least some settings—RtR is the only method that completes all five shot settings.
Limitations and Future Work
- RtR assumes class names are known in advance and stores one frozen feature vector per training image, both of which future work could relax.
- The current evaluation focuses on cross-domain task streams with disjoint class sets; same-domain tasks and longer sequences remain untested.
Summary updated