CURE: Visual Reprogramming of Vision-Language Models under Limited Supervision

Lingzhi Wang, Wei Wang, Xinyang ChenNeurIPS 2026

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:

Figure 1: Attribute-level degradation of supervised VR under limited supervision. Sample descriptions of different aspects “Passion Flower” and “Mexican Petunia” are shown on the left, while recorded cosine similarities of images and descriptions are on the right under [16, 4, 1] shots.

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).

Figure 2: Semi-supervised learning for VR. On the left, conventional VR is shown, where only labeled data is used for training. On the right, SSL-VR utilizes the unlabeled data for training.

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:

  1. 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.
  2. 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

Abstract

Visual reprogramming (VR) efficiently repurposes pre-trained vision-language models for new image classification tasks by adding trainable patterns to inputs without modifying the backbone. Nevertheless, existing VR methods heavily depend on labeled data and thus suffer substantial performance degradation under limited supervision (i.e., scarce labeled images). We introduce semi-supervised learning (SSL) into VR to exploit abundant unlabeled images and enhance data efficiency. However, directly applying generic SSL techniques often amplifies biases in unlabeled posteriors and destabilizes VR training. To address these challenges, we propose **CURE** (**C**onsistency and **U**nlabeled **R**ecalibration with Confidence-Margin **E**nhancement), a semi-supervised VR framework comprising two key components: *(i)* Recalibreted Gaussian Confidence-Margin Soft Weighting to dynamically adjust sample importance; *(ii)* Dual-attribute Consistency Regularization to ensure consistency across attribute prompts. Extensive experiments show that CURE consistently outperforms both existing VR methods and direct SSL extensions, improving average classification accuracy by **3.45** and **3.77** percentage points across twelve widely-used benchmarks for limited supervision tasks. Our code is available at https://github.com/iLearn-Lab/NeurIPS26-CURE/.
BibTeX
@inproceedings{wang2026cure,
  author = {Lingzhi Wang and Wei Wang and Xinyang Chen},
  title = {{CURE: Visual Reprogramming of Vision-Language Models under Limited Supervision}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=2H603JxvpD},
}
Figure