UVA's CIRCLES Beats Standard AI Retrieval by Teaching Models What Changed
A new retrieval framework called CIRCLES feeds vision-language models counterfactual examples instead of just visually similar ones, sharpening attribute-level reasoning.
ProTakeaways
- CIRCLES retrieves counterfactual in-context examples via composed image retrieval instead of pure nearest-neighbor similarity.
- The pipeline extracts key attributes, generates counterfactual captions, then retrieves matching images from training data.
- Beats RICES, MUIER, and MMICES across CUB, Flowers, OK-VQA, and VizWiz on four VLM backbones.
- Gemma3-4B accuracy on CUB jumps from 65.4 to 72.0 with CIRCLES using a 32-example budget.
- Advantage grows under information scarcity: gains widen as training data is randomly removed.
- Training-free, adds about 10 percent token overhead, code on GitHub.
Vision-language models are surprisingly bad at telling two similar things apart. Ask one whether a warbler has black head markings or a solid belly, and it often latches onto whatever visual pattern its training data leaned on, not the attribute that actually decides the label. A new paper from the University of Virginia, Retrieving Counterfactuals Improves Visual In-Context Learning, argues that the fix is a smarter way to pick in-context examples rather than a bigger model.
The method, called CIRCLES (Composed Image Retrieval for Causal Learning Example Selection), retrieves counterfactual demonstrations, examples that look like the query but differ in one specific attribute, so the model can see how that attribute changes the answer. Across four benchmarks and four backbones, it beats standard retrieval baselines, with the largest gains on smaller models and in low-data regimes.
Why nearest-neighbor retrieval falls short
Most retrieval-augmented in-context learning today uses a variant of RICES: embed the query image with CLIP, grab the top-k most similar training images, and stuff them into the prompt as demonstrations. This works fine when visual similarity aligns with the correct label, and fails when it does not.
The paper illustrates the problem with a Magnolia Warbler. CLIP-based retrieval pulls back a batch of visually similar birds, but many of them happen to be Myrtle Warblers. The prompt now nudges the model toward the wrong species because the retrieved examples share confounding features rather than the ones that actually determine the label (black head markings, white wing patches). The model learns the surface correlation, not the causal attribute.