TL;DR
PLOT (Prompt Learning with Optimal Transport) moves beyond the limitation of learning a single "prompt" for vision-language models like CLIP. By learning multiple prompts and using Optimal Transport to align them with local image features, the method captures diverse category characteristics—like a bird’s specific texture versus its habitat—leading to state-of-the-art performance in few-shot classification and improved domain robustness.
The Problem: The Bottleneck of Single Prompts
Large-scale vision-language models (VLMs) like CLIP have revolutionized how AI understands images through text. However, these models are too massive for most users to fine-tune directly. To adapt them to specific downstream tasks, researchers increasingly rely on "prompt learning," where the core model remains frozen and only a small set of "context vectors" (prompts) are learned to describe a category.
The current gold standard, CoOp, learns a single prompt per class. The authors of PLOT argue this is fundamentally insufficient. A single category, such as a "Brambling" bird, is defined by multiple distinct attributes: a dark fan-tail, an orange texture, a black crown, or a specific winter wood environment. Trying to cram all these diverse visual cues into one prompt is like trying to describe a complex painting with a single sentence.
Conversely, if you simply try to learn multiple prompts and match them all to the same global image feature, the prompts tend to "collapse" and redundantly learn the same representation.
The PLOT Solution: Distribution Matching
To solve this, the authors introduce PLOT, which treats prompt learning as a distribution matching problem rather than a simple point-to-point alignment.
- Multiple Prompts: Instead of one prompt, PLOT learns a set of $N$ prompts (typically 4) for each category to capture diverse semantic attributes.
- Local Visual Features: Instead of using a single global vector for an image, PLOT extracts a set of local feature maps (e.g., a $7 \times 7$ grid of visual descriptors) from the image encoder.
- Optimal Transport (OT): This is the core innovation. OT is a mathematical framework used to calculate the distance between two distributions. PLOT uses it to find the best "transport plan" to align the set of textual prompts with the set of local visual features. This allows specific prompts to focus on specific parts of the image (e.g., one prompt matches the bird's head, another matches the background).
- Two-Stage Optimization:
- Inner Loop: Uses the Sinkhorn algorithm (a fast, differentiable version of OT) to find the optimal alignment between local visual features and the multiple prompts.
- Outer Loop: Updates the learnable prompt vectors using standard cross-entropy loss based on the OT distance calculated in the inner loop.
By forcing a granular mapping, OT prevents the multiple prompts from converging into a single, indistinguishable point. Visualization shows that different prompts actually learn different things—one might focus on the object's shape, while another focuses on the environment or color.
Key Results
The authors evaluated PLOT on a comprehensive suite of benchmarks, including 11 diverse few-shot recognition datasets (ImageNet, Caltech101, OxfordPets, StanfordCars, etc.) and domain generalization tasks.
- Superior Few-Shot Performance: PLOT consistently outperformed CoOp and its variants across all 11 datasets. On average, it provided a 3.03% boost in 1-shot accuracy and a 0.61% boost in 16-shot accuracy over CoOp.
- Robustness to Domain Shift: When trained on standard ImageNet and tested on shifted versions (like sketches, renditions, or adversarial images), PLOT showed better generalization than CoOp. Learning multiple attributes makes the model less likely to be fooled by changes in a single visual cue.
- Efficiency: Despite the added complexity of multiple prompts and Optimal Transport, the computational overhead is surprisingly low—only about a 10% hit to inference speed and 5% to training time compared to the single-prompt baseline.
Limitations and Future Work
While highly effective, PLOT does have limitations. It requires at least a few examples (few-shot) to learn the prompts, meaning it cannot improve "out-of-the-box" zero-shot performance. Additionally, the current study uses a fixed number of prompts ($N=4$) for all categories. Because simple categories might only need one prompt while complex ones might need ten, exploring dynamic prompt numbers is a promising direction for future research. Finally, because the prompts are learned in a continuous embedding space, translating them back into human-readable words often yields nonsensical text, limiting human interpretability.
Summary updated