arXiv:2610.23248cs.CVOct 2026

Manuscript Offprint

arXiv:2610.23248

Can the Parts Fool the Test? Counterfactual Pairing Cycles for Relational OOD

Yibo Zhou, Yirong Xiang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Relational out-of-distribution errors are easy to describe and hard to evaluate cleanly. An image may be natural, a caption may be fluent, and all mentioned objects may be common, yet the caption may describe the wrong relation in the image. Many evaluations intended to test this behavior can be solved without checking the pairing at all, because negatives differ in caption style, template, length, object frequency, or image statistics. We propose counterfactual pairing cycles, a blocked evaluation primitive that reuses the same two images and the same two captions on both sides of the comparison, changing only which image is paired with which caption. This makes image-only, text-only, and additive component shortcuts cancel exactly in finite samples. The same contrast also gives a training loss for relational outlier exposure and a diagnostic for bilinear vision-language scores. Across synthetic controls, GQA, and COCO, cycles separate coarse image-caption matching from directional role-binding failures, while also identifying geometric size relations that remain strongly visible in global features. In a shortcut-contaminated COCO outlier-exposure stress test, a model selected by a near-perfect shortcut validation AUROC retains substantial relational signal but remains below cycle training on exact cycles; cycle training improves CycleAcc from 0.882 to 0.927. The main lesson is simple: to test whether a model understands a pairing, the benchmark should keep the parts fixed, change the pairing, and ask only about coupling. The official implementation is available online.

1 Introduction

A wrong image-caption pair can look perfectly ordinary in isolation. The image is a real photograph. The caption is grammatical. The objects are familiar. The failure appears only when the two are put together: the caption assigns an attribute to the wrong object, reverses a spatial relation, or describes an event that belongs to a different image.

This is the relational OOD problem we study. It is not an anomaly of the image alone or the caption alone. It is an anomaly of their coupling. This distinction has become important as vision-language models are deployed as general-purpose perceptual systems. Recent evaluations show that strong multimodal models can struggle with fine-grained composition, natural adversarial examples, spatial reasoning, and object-relation binding [4, 18, 13, 17, 3, 15, 27]. These failures are small in form but large in consequence: a model may recognize the objects and still miss who is doing what to whom, which object is on the left, or which caption belongs to the image.

The difficulty is not only that relational errors are hard for models. They are also hard to evaluate cleanly. Many benchmarks that test multimodal reasoning contain easier signals. If negative captions are shorter, come from a different generator, use a special template, or mention rarer objects, a text-only detector can succeed. If negative images differ in style or category distribution, an image-only detector can succeed. Similar concerns have motivated efforts to build vision-indispensable,

∗^{*}Corresponding author.

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

adversarial, bidirectional, and composition-focused benchmarks for vision-language models [4, 18, 22, 13, 17, 25]. Related work on attribute recognition and spurious correlation likewise shows that label imbalance, component bias, and object co-occurrence can provide alternatives to learning the intended coupling [34–38]. The common lesson is that high benchmark performance can mislead when evaluation does not control what information the model is allowed to use.

This issue is especially sharp for OOD detection. Classical and reconstruction-based OOD methods already show that the statistic used for training and validation determines what kind of abnormality is learned [10, 19, 21, 33]. Modern OOD methods increasingly use vision-language representations, negative labels, prompt tuning, and multimodal cues [16, 32, 30, 6, 25]. These methods are valuable, but the standard OOD framing often asks whether an example looks unlike the training distribution. Relational OOD asks a different question. The image and the caption may both look in-distribution. What is out-of-distribution is the pairing. A detector that succeeds by scoring the image and caption separately may therefore solve the wrong problem.

We propose a small change in the unit of evaluation. Instead of comparing arbitrary positive and negative pairs, we compare two ways of pairing the same components. Take two valid image-caption pairs. Now keep the two images and the two captions fixed, but swap the captions across images. This creates a complete four-entry block: two original pairs and two swapped pairs. We retain the block only when the swapped pairs are verified invalid by the construction annotations or filters.

The test then asks a single question: does the model prefer the original pairing over the swapped pairing? The positive side and the negative side contain exactly the same images and exactly the same captions. Only the assignment between images and captions changes. As a result, image-only cues, text-only cues, and any additive combination of such component cues cancel inside the block. The benchmark no longer asks whether either side looks unusual. It asks whether the two sides match. This blocked comparison is the central object of the paper. We call it a counterfactual pairing cycle. "Counterfactual" refers to the swapped pairings: the caption is fluent and the image is natural, but their association is wrong. "Cycle" refers to the complete four-entry structure: each image is paired once with its true caption and once with the other caption, and each caption is paired once with its true image and once with the other image. This symmetry is what makes the test insensitive to marginal shortcuts. We make three contributions:

  1. We formalize counterfactual pairing cycles as a blocked evaluation primitive for relational OOD. In every block, the positive and negative sides have identical image and caption marginals.

  2. We characterize the finite-sample balance condition required to remove all additive image-only and text-only scores: a signed comparison cancels such scores if and only if every image and every caption has zero signed degree. The 2×22 \times 2 counterfactual pairing cycle is the minimal nondegenerate block satisfying this condition.

  3. We use the same contrast as a training loss for relational outlier exposure and as a diagnostic for bilinear dual-encoder scores. The bilinear cycle score factorizes into paired image and text differences. Also, we evaluate the protocol on synthetic controls, GQA, and COCO. Cycles separate coarse matching from several strict role-binding failures and show why shortcut validation can overstate relational transfer.

References (37)