RePair: Turning Retrieval Failures into Counterfactual Hard Pairs

Siyi Liu, Xiaorong Zhu, Enjun Du, Xinyu Zuo, Lisheng Duan, Haijin Liang, Jin Ma, Junfu Pu, Yongqi Zhang


Abstract
Vision-language retrieval with CLIP-style dual encoders achieves strong cross-modal performance, yet practical accuracy often hinges on localized semantic distinctions where top-ranked near misses differ from the true match by a single critical detail. Hard-sample mining can select confusable candidates but cannot construct corrected counterparts; synthetic augmentation can generate novel samples but, without conditioning on actual model failures, targets irrelevant dimensions of hardness. We observe that a top-ranked false positive is a counterfactual scaffold—sharing most of the query’s semantics while differing in a localized failure-causing residual. Minimally correcting this residual yields a hard positive of the ground truth in the same modality; the corrected and unedited versions form a hard negative pair that straddles the decision boundary, producing complementary pull–push supervision. We introduce RePair, guided by three principles—Validity, Minimality, and Locality—which mines false positives bidirectionally, applies LLM-guided counterfactual editing, and trains with a local hard-pair contrastive objective. On Flickr30K and COCO30K, RePair outperforms controlled augmentation baselines with only 107K synthetic samples—26%–75% fewer than comparable methods—confirming failure-conditioned repair is more data-efficient than error-agnostic augmentation.
Anthology ID:
2026.emnlp-main.1922
Volume:
Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Hung-Yi Lee, Sunipa Dev, Jessy Li, Desmond Elliott
Venue:
EMNLP
SIG:
SIGDAT
Publisher:
Association for Computational Linguistics
Note:
Pages:
43774–43800
Language:
URL:
https://aclanthology.org/2026.emnlp-main.1922/
DOI:
Bibkey:
Cite (ACL):
Siyi Liu, Xiaorong Zhu, Enjun Du, Xinyu Zuo, Lisheng Duan, Haijin Liang, Jin Ma, Junfu Pu, and Yongqi Zhang. 2026. RePair: Turning Retrieval Failures into Counterfactual Hard Pairs. In Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing, pages 43774–43800, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
RePair: Turning Retrieval Failures into Counterfactual Hard Pairs (Liu et al., EMNLP 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.emnlp-main.1922.pdf