File size: 3,037 Bytes
8d2407a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fcd8783
8d2407a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fcd8783
8d2407a
fcd8783
 
 
 
 
 
8d2407a
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
pretty_name: SMILE artifacts
language:
- en
tags:
- in-context-learning
- vision-language-models
- hard-negatives
task_categories:
- visual-question-answering
- image-classification
viewer: false
---

# SMILE: CLIP embeddings, mined hard-negative pools and predictions

Artifacts for **The Value of Being Wrong: Self-Mined Visual In-Context Learning from Errors** (NeurIPS 2026 Spotlight).
Paper: [arXiv:2610.16977](https://arxiv.org/abs/2610.16977).
Code: [github.com/Tree-Shu-Zhao/SMILE](https://github.com/Tree-Shu-Zhao/SMILE).

## Contents

```
clip_embeddings/
  <data>_<split>_image.pt            # CLIP ViT-g-14 (laion2b_s12b_b42k) image embeddings, L2-normalized
  <data>_<split>_ids.pt              # the sample id of each row
hard_negatives/<data>/<org_model>/
  hard_negatives.jsonl               # the pool: training samples the model gets wrong, with its voted prediction
  hard_negatives_predictions.jsonl   # the voted prediction for every training sample
  hard_negatives_stats.json
  hard_negatives_params.json
predictions/<data>/<org_model>/
  vicl_<k>_<negative_k>.jsonl        # test predictions, with retrieved_ids and contrastive_ids
  vicl_<k>_<negative_k>_params.json
```

- `<data>`: `cub`, `flowers`, `okvqa`, `vizwiz`. `<split>`: `train`, `test` (for VizWiz, `test` is its val split).
- `<org_model>`: `Qwen_Qwen2.5-VL-7B-Instruct`, `Qwen_Qwen2.5-VL-3B-Instruct`, `google_gemma-3-12b-it`,
  `google_gemma-3-4b-it`.
- Pool records: `id`, `question`, `imgpath`, `gt_answer`, `voted_pred`, `vote_count`, `total_votes`, `token_f1`,
  `is_correct`.
- Prediction records: `id`, `question`, `imgpath`, `pred_answer`, `gt_answer`, `k`, `retrieved_ids`,
  `contrastive_ids`. The VizWiz records hold `id`, `pred_answer`, `query_prediction`, `retrieved_ids` and
  `contrastive_ids`.
- The predictions are one inference run per model and dataset. VizWiz predictions are stored before the
  answerability vote, which the scorer applies.
- `imgpath` is relative to the root of the code repository (`data/<dataset>/...`).
- The records contain questions and answers from CUB-200-2011, Oxford 102 Flowers, OK-VQA and VizWiz, which remain
  under the terms of those datasets. No images are included.

## Usage

From the root of the code repository:

```bash
uvx --from "huggingface_hub>=1.0" hf download TreezzZ/SMILE-data --repo-type dataset --local-dir . \
  --include "clip_embeddings/*" --include "hard_negatives/*" --include "predictions/*"
```

The files land where the code reads them. To score the released predictions:

```bash
bash scripts/cub/evaluate.sh predictions/cub/Qwen_Qwen2.5-VL-7B-Instruct/vicl_8_4.jsonl
bash scripts/vizwiz/evaluate.sh predictions/vizwiz/Qwen_Qwen2.5-VL-7B-Instruct/vicl_12_8.jsonl
```

## Citation

```bibtex
@misc{zhao2026smile,
  title={The Value of Being Wrong: Self-Mined Visual In-Context Learning from Errors},
  author={Shu Zhao and Tan Yu},
  year={2026},
  eprint={2610.16977},
  archivePrefix={arXiv},
  primaryClass={cs.CV},
  url={https://arxiv.org/abs/2610.16977},
}
```