TL;DR
Instead of modifying millions of internal weights to adapt a massive vision-language model like CLIP to a new task, visual reprogramming (VR) leaves the model completely frozen and learns a trainable border of pixels around the input images. While delightfully lightweight, VR falls apart when you only have a few labeled examples—and naively throwing unlabeled data at it just amplifies the frozen model’s built-in biases. CURE solves this by introducing a tailored semi-supervised framework that sanity-checks unlabeled guesses using both prediction margins and cross-prompt semantic consistency, rescuing few-shot performance across a dozen benchmarks.
What Problem Does This Paper Address?
Imagine trying to get a giant, pre-trained Vision-Language Model (VLM) to classify rare flowers without touching a single weight inside the network. Visual reprogramming achieves this by optimizing a "pixel frame" padded around every input image, nudging the frozen model's representations to align with text descriptions of the target classes.
The catch? VR is surprisingly data-hungry. When labeled data drops to just a handful of examples (say, 1 to 4 shots per class), performance tanks. Specifically, the model retains coarse cues like color, but loses its grip on fine-grained details like leaf arrangement or petal shape:
Normally, when labels are scarce, we turn to semi-supervised learning (SSL): let the model generate "pseudo-labels" on abundant unlabeled images and learn from its own confident guesses. However, in standard SSL, the model updates its internal weights and gradually corrects its representation space. In VR, the backbone is frozen. If the VLM has an inherent bias toward certain classes, optimizing only an input pixel-border can't recalibrate the internal representations—it acts like an echo chamber, amplifying bad pseudo-labels and destabilizing training.
Methods
To safely unlock unlabeled data for VR, the authors propose CURE (Consistency and Unlabeled Recalibration with Confidence-Margin Enhancement).
CURE keeps the standard VR setup—padding weakly and strongly augmented images with a shared, learnable pixel border and matching them against LLM-generated textual attributes—and introduces two novel quality-control mechanisms for unlabeled data:
- Recalibrated Gaussian Confidence-Margin Soft Weighting: First, CURE tracks Exponential Moving Averages (EMA) of class predictions on both labeled and unlabeled batches, gently recalibrating unlabeled probabilities so dominant classes don't steamroll rare ones. Next, instead of throwing away uncertain data using a rigid confidence cutoff, it calculates a smooth reliability weight (between 0 and 1) using a one-sided Gaussian curve. Crucially, it evaluates both top-1 confidence and the top-2 margin (the gap between the first and second-place class probabilities), smoothly down-weighting ambiguous guesses while keeping informative borderline examples in play.
- Dual-Attribute Consistency Regularization: Recent VR methods prompt LLMs for two types of class descriptions: descriptive attributes (common traits, like "purple petals") and distinctive attributes (discriminative traits that separate similar classes, like "starburst shape"). CURE uses these two views as a semantic cross-examination. An unlabeled pseudo-label only gets a high weight if both descriptive and distinctive prompts confidently agree on the target class and produce similar overall probability distributions (measured via Jensen-Shannon divergence).
Datasets
No new datasets are introduced. CURE is evaluated across 12 standard image classification benchmarks covering generic objects, scenes, textures, fine-grained categories, and satellite imagery:
- FGVC-Aircraft, Caltech101, Stanford Cars, Describable Textures (DTD), EuroSAT, Flowers-102, Food-101, Oxford-Pets, SUN397, UCF101, ImageNet, and RESISC45.
Key Insights and Ideas
- Off-the-shelf SSL actually hurts Visual Reprogramming: Plugging classic SSL heavyweights (like FixMatch, SoftMatch, or FreeMatch) directly into attribute-based VR degrades average accuracy compared to just ignoring the unlabeled data altogether (dropping from 71.86% down to 70.40%–71.54%). Without frozen-backbone-specific recalibration, confirmation bias wins.
- Confidence without semantic agreement is a trap: An unlabeled image might score high confidence on a descriptive prompt simply because it shares a common background or color with a class. Checking that distinctive prompts yield the exact same conclusion filters out these false positives.
- Sharper high-dimensional geometry: By rescuing hard, boundary-adjacent unlabeled examples rather than discarding them, CURE carves out noticeably cleaner, tighter class clusters in the frozen VLM's embedding space.
Key Results
Evaluated in a strict 2-shot setting using a frozen CLIP (ViT-B/16) backbone across all 12 datasets:
- Beats supervised VR: CURE achieves 75.31% average accuracy, outperforming the strongest supervised VR baseline (AttrVR at 71.86%) by 3.45 percentage points, with standout gains on fine-grained tasks like Flowers (+8.12%) and Stanford Cars (+5.62%).
- Beats generic SSL extensions: CURE outperforms the best direct SSL integration (CGMatch at 71.54%) by 3.77 percentage points.
- Scales across shots and backbones: CURE maintains its lead across 1, 4, 8, 16, and 32 shots, and generalizes cleanly to newer vision-language backbones, beating baselines by 5.59 and 4.95 percentage points on SigLIP and SigLIP2, respectively.
- Prompt quality matters (slightly): Swapping GPT-3.5 attributes for GPT-4o-mini boosts 3-dataset average accuracy from 60.85% to 62.68%, while LLaMA-3.1 dips to 58.31%.
Limitations and Future Work
- In-domain assumption: CURE operates under the classic semi-supervised assumption that all unlabeled images belong to the same set of target classes as the labeled data. Handling wild, out-of-domain unlabeled samples that don't belong to any known class remains an open vulnerability and a key direction for future work.
- Training overhead: Processing unlabeled pools (at a 7:1 unlabeled-to-labeled ratio) naturally increases training runtime compared to purely supervised few-shot VR, though budget-controlled tests confirm CURE's accuracy gains hold even when training epochs are dialed back.
Summary updated