# The Value of Being Wrong: Self-Mined Visual In-Context Learning from Errors

*Shu Zhao, TAN YU*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/151028) · [OpenReview](https://openreview.net/forum?id=dVu1u4QgAp) · [Open on the map](../papers.html#p151028)

Category: [Vision-Language Models](../pcat/0.md) › [Multimodal Vision-Language Integration](../pgroup/170.md) · Type: new method · Keywords: visual in-context learning, counterfactual demonstrations, model error mining, vision-language models, benchmark evaluation

Areas: [Multimodal](../areas/multimodal.md) › Multimodal Visual Reasoning › Visual and Textual Reasoning; [Evaluation & Benchmarks](../areas/evaluation.md) › Visual Multimodal Evaluation › Vision-Language Diagnostics

## Summary
SMILE leverages a model’s own prediction errors as self-mined counterfactual demonstrations to improve visual in-context learning, achieving a 2.72-point gain over prior methods at lower latency.

## Explained to a 5-year-old
A computer program looks at pictures and answers questions. Sometimes it makes mistakes, and we write down those wrong answers. We keep a collection of these mistakes as special examples. When the program sees a new picture, we show it the mistakes that are most similar. This helps the program learn faster and do better without a lot of work.

## Explained to a 5-year-old, longer
A computer program can look at pictures and answer questions. It tries to guess the right answer, but sometimes it gets it wrong. We let the program make many guesses on many pictures. Every time it makes a mistake, we write down that picture and the wrong answer. We keep all these mistakes in a special box. When the program sees a new picture, we look for mistakes that are similar. We show the program those similar mistakes as examples. This helps the program remember what it did wrong before. By looking at its own errors, the program learns to avoid them. It can then answer new questions more accurately. This works for both simple picture categories and more open-ended questions. The whole process is simple and fast, so the program can improve quickly.

## For a technical reader
The paper observes that a vision-language model’s own prediction errors can serve as effective counterfactual demonstrations for in-context learning. An offline mining step records hard negatives from the model’s past mistakes, building a model-specific error pool. At inference time, the model’s current prediction is used as a query to retrieve the most relevant past errors in the embedding space. This retrieval provides a unified mechanism that works for both closed-set classification and open-ended visual question answering without task-specific pipelines. Empirical evaluation shows a consistent 2.7-point improvement over prior state-of-the-art methods while reducing inference latency by a factor of five.

## Problem
Selecting good demonstration examples for visual in-context learning is crucial but challenging; current approaches require complex multi-stage pipelines to construct counterfactual demonstrations.

## Method
The approach builds a model-specific pool of hard negatives by recording the target vision-language model’s own mistakes offline. At test time, the model’s prediction is used as a direction signal to retrieve from this pool the past errors most likely to recur for the current query, providing a unified mechanism for both classification and open-ended VQA.

## Results
The approach achieves an average improvement of 2.72 points over the state-of-the-art on four benchmarks while running five times faster.

## Contributions
It introduces a simple offline mining of model errors to create counterfactual demonstrations and a prediction-conditioned retrieval mechanism that works for both closed-set classification and open-ended visual question answering.

## Research questions this paper is counted under

- [How can we select the most effective demonstration examples for in-context learning?](../q/871.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/151028)
