Distractor-Targeted Adversarial Training for Region-Based Visual Grounding

When a model is asked to find "the man in the red jacket on the left," the most damaging attack is often not making the man invisible. It is making a different person look more like the description, so the model confidently boxes the wrong object. Region-based models, which first cut the image into a set of detected object boxes and then match words against those boxes, make this failure easy to name. The correct answer is one region, and every other region is a distractor that an attacker can try to promote. We propose to train grounding models against exactly this threat. During training, an adversary adds small pixel perturbations confined to the box of the most confusable distractor, chosen to push that distractor's match score above the true referent's. It can also try to make the detector drop the referent's box altogether. The model is trained to keep the true region on top under the stronger of these attacks.

The motivation is a gap between two literatures that rarely meet. Attacks on grounding are severe. Perturbing a multimodal model's image representation cut its average [email protected] (the fraction of predicted boxes overlapping the correct box by at least half) on the RefCOCO benchmarks from 84.96% to 23.24%, and a "permuted" attack that swaps which object each expression points to raised false-target [email protected] from 8.89% to 30.14% (Adversarial Robustness for Visual Grounding of Multimodal Large Language Models). That study proposes no defense. Adversarial training, meanwhile, has been adapted to detectors and to vision-language embeddings, but never in a form that targets cross-object misattribution. Our claim is that the region structure tells us where the worst-case perturbations live. Training against those perturbations should give much stronger robustness to misattribution attacks than standard whole-image adversarial training at the same compute.

Core Claim and Position Relative to Prior Work

Adversarial training here means the min-max procedure from Intriguing properties of neural networks and its successors: at each step, find a small worst-case input perturbation and train on it. Our specific claim has two parts. First, standard whole-image attacks on a multi-object grounding model are "lazy." They mostly lower the referent's score and rarely explore perturbations that make a specific distractor attractive. As a result, whole-image adversarial training leaves the model exposed to permuted, misattribution-style attacks. Second, an attacker that is localized to individual regions and aimed at distractors closes this gap at equal gradient budget.

The laziness hypothesis is borrowed from Class-Aware Robust Adversarial Training for Object Detection. That work showed that projected gradient descent (PGD, the standard iterative attack) on multi-object detectors spends its budget on high-loss majority classes. It responded with object-wise loss clipping and class-frequency normalization. That paper motivates our design, but it stays inside pure detection and balances over object classes. We instead balance over candidate referents relative to a language query.

Robust and Accurate Object Detection via Adversarial Learning supplies two techniques we reuse. Its "Max-Max" rule attacks the classification and localization losses separately and trains on the stronger attack. Its auxiliary batch normalization keeps separate normalization statistics for adversarial images so that clean accuracy is preserved. Its perturbations, however, cover the whole image and it never evaluates language grounding.

The closest connecting work is Large-Scale Adversarial Training for Vision-and-Language Representation Learning (VILLA). VILLA perturbs pre-extracted region embeddings and word embeddings, with a smoothness penalty between clean and perturbed predictions. Its detector is frozen and run offline, so pixel-level attacks on the detector are never defended. Its perturbations are also applied uniformly across regions rather than aimed at a particular distractor. We differ on both counts: the attack lives in pixel space, the detector is trained jointly, and the adversary is directed at a chosen region.

The scoring objective follows Generation and Comprehension of Unambiguous Object Descriptions. That paper discriminates the target from within-image distractors using region features plus a 5D spatial vector, under a maximum mutual information objective. It reports Precision@1 of 0.848 on the UNC-Ref validation set, against 0.803 for maximum-likelihood training. Our method can be read as the adversarial counterpart of that objective. They show that distractors matter for clean training; we let an adversary manufacture the hardest distractor.

Two constraining results shape the design. First, Plausible May Not Be Faithful: Probing Object Hallucination in Vision-Language Pre-training found that dense ViT patch features can beat detector regions on caption faithfulness. Because region pipelines are not automatically better, we must include a patch-based grounder with equivalent adversarial training as a baseline. Second, REVIVE: Regional Visual Representation Matters in Knowledge-Based Visual Question Answering documents that downstream modules cannot recover objects the detector missed. This is why our adversary includes a term that tries to delete the referent's proposal, and why the detector is not frozen.

Method

Let $x$ be an image and $q$ a referring expression. The detector produces regions $r_1,\dots,r_N$. A cross-attention scorer gives each region a match score $s_j(x,q)$, using region features and the 5D spatial vector. Let $j^*$ be the region that overlaps the ground-truth box, and let $M_j$ be the binary pixel mask of region $j$'s box.

The distractor-promotion attack picks a distractor $j$ and searches for a perturbation $\delta$ supported only on $M_j$, with $\|\delta\|_\infty \le \epsilon$, that maximizes the margin by which the distractor beats the referent:

$$\delta_j = \arg\max_{\delta = M_j \odot \delta,\ \|\delta\|_\infty \le \epsilon} \big[ s_j(x+\delta, q) - s_{j^*}(x+\delta, q) \big].$$

The perturbation is pixel-level, so it also flows through the backbone's receptive fields into neighboring regions. This is intended, because it matches what a real attacker could do.

The referent-deletion attack instead perturbs pixels inside and around $M_{j^*}$ to lower the detector's objectness and box-regression quality for the referent. Following the Max-Max rule, we compute both attacks and train on whichever yields the larger grounding loss. The grounding loss is a softmax cross-entropy over regions on the perturbed image, plus the detector's own loss on that image. Adversarial images pass through auxiliary batch normalization layers.

To keep cost bounded, the attacked distractor is the one with the smallest clean margin, optionally sampled from the top three. Each attack uses $K$ PGD steps. We also test the gradient-recycling "free" variant from VILLA so that the total number of forward-backward passes matches the baselines. The class-balancing idea from CWAT enters as per-query normalization, so that rare referent categories are not drowned out.

Research Program

We build one region-based grounder: a trainable two-stage detector, a region-word cross-attention scorer in the style of Stacked Cross Attention for Image-Text Matching, and Mao-style spatial features. We train it on RefCOCO, RefCOCO+, and RefCOCOg under each training regime below.

The analysis has three parts. First, we test the laziness hypothesis directly. During whole-image PGD, we record how often the attack's final effect is a distractor overtaking the referent, versus the referent simply losing score with no single winner. We expect the first outcome to be rare. Second, we check whether training against region-localized attacks transfers to unconstrained whole-image attacks. This is the property that would make the method useful rather than merely self-consistent. Third, we break robustness down by referent box size, by referent category frequency, and by the number of same-category distractors in the image. These are where misattribution should concentrate.

Baselines

The naive reference point is the same grounder trained with ordinary cross-entropy and no perturbations. We report its clean Precision@1 and [email protected], then its accuracy under each attack. We expect it to collapse much as the patch-based model in Adversarial Robustness for Visual Grounding of Multimodal Large Language Models collapsed from 84.96% to 23.24%. That figure comes from a different architecture, so we re-run their untargeted, exclusive targeted, and permuted targeted attacks on every model here rather than borrowing numbers.

The strongest existing competitor is whole-image PGD adversarial training of the same grounder end-to-end, using the Det-AdvProp recipe (Max-Max over the scorer and detector losses, plus auxiliary batch normalization) from Robust and Accurate Object Detection via Adversarial Learning. It is the strongest because it already trains the detector and scorer jointly, already handles conflicting losses, and has the most evidence for preserving clean accuracy. On COCO it reports +1.1 mAP for EfficientDet-D7 and +3.8 mAP on the COCO-C corruption benchmark. Neither paper reports a grounding robustness figure for it: no reported result found on Lacuna for adversarially trained referring-expression models. We will run it with the same backbone, data, epochs, $\epsilon$, total PGD steps per batch, and hyperparameter search budget as our method.

The second competitor is VILLA-style embedding-space adversarial training with a frozen detector, from Large-Scale Adversarial Training for Vision-and-Language Representation Learning. On VQA this raised UNITER-large from 74.02 to 74.87, and on VCR Q→AR from 62.8 to 65.7. We port its free adversarial training and smoothness penalty to our grounder under the same compute budget.

The third competitor is a patch-based grounder with an equally capable backbone, trained with the same whole-image adversarial training. It tests whether region structure matters at all.

We will count the proposal as beating these baselines if it improves [email protected] under the permuted targeted attack and the image-embedding attack over Det-AdvProp-style training, by a margin larger than the seed-to-seed spread across three seeds. It must also lose no more than one point of clean [email protected].

Four ablations isolate the key ingredient. The first keeps region-localized support but makes the attack untargeted (it only lowers the referent), which separates "aiming at a distractor" from "localizing the perturbation." The second keeps the distractor-targeted margin objective but lets the perturbation cover the whole image, which tests whether localization matters or only the objective does. The third drops the referent-deletion branch. The fourth replaces hardest-distractor selection with uniform sampling.

Why not just…?

Why not just run standard whole-image PGD adversarial training? This is the real threat. If whole-image training already explores distractor promotion, our method reduces to it with extra bookkeeping. Our bet rests on the laziness finding in Class-Aware Robust Adversarial Training for Object Detection, but that was shown for detection, not grounding. The attack-outcome analysis and the head-to-head under the permuted attack settle the question. If the margins are within noise, we will report that whole-image adversarial training suffices for grounding and that region targeting adds nothing.

Why not just apply VILLA-style perturbations to region embeddings? It is cheaper, and VILLA showed gains on reasoning benchmarks. But the attacks in Adversarial Robustness for Visual Grounding of Multimodal Large Language Models act on pixels through the visual encoder. A frozen detector, as in VILLA, receives no training signal against pixel attacks that delete or distort proposals, the cascading failure REVIVE describes. The VILLA baseline under pixel-space attacks directly measures how much of this gap remains.

Why not just add Gaussian noise or heuristic augmentation? Poison as Cure: Visual Noise for Mitigating Object Hallucinations in LVMs found that Gaussian noise of matched strength hurt where optimized noise helped. Robust and Accurate Object Detection via Adversarial Learning reports that model-agnostic augmentation gains wash out during detector fine-tuning. Both results come from different tasks, so we include matched-strength Gaussian noise inside region boxes as a cheap control rather than assuming it fails.

Why not just use a patch-based model and skip detectors? Plausible May Not Be Faithful: Probing Object Hallucination in Vision-Language Pre-training is a genuine counterweight. It shows patches can be more faithful than regions in clean conditions. The adversarially trained patch baseline answers this directly. If it matches our method under attack, the region structure is a convenience for building the attack, not a source of robustness. That would still be a useful finding, because the distractor-targeted attack could then be run with predicted boxes on patch models.

Decisive Experiments

All experiments use RefCOCO, RefCOCO+, and RefCOCOg with [email protected] and Precision@1, matching the protocol of Adversarial Robustness for Visual Grounding of Multimodal Large Language Models. Each trained model faces five attacks: that paper's untargeted image attack, its untargeted textual box attack, its exclusive targeted attack, its permuted targeted attack, and our own distractor-promotion attack. For targeted attacks we report attack success as false-target [email protected].

Several design choices guard against false robustness. Evaluation attacks use more PGD steps and random restarts than training attacks, and we run an adaptive attack that maximizes the larger of the two training objectives. This guards against robustness that comes only from gradient masking (models that hide useful gradients from the attacker without actually being robust). We also run an attack that transfers from the undefended model.

The decisive check has two conditions. The method must clearly lower permuted-attack success relative to compute-matched whole-image adversarial training, and that advantage must be largest on queries with several same-category distractors. If the gain is uniform across distractor counts, or vanishes under the adaptive attack, the misattribution hypothesis is wrong.

A secondary check reports clean accuracy against the 0.848 Precision@1 of the MMI model on UNC-Ref validation from Generation and Comprehension of Unambiguous Object Descriptions, with and without auxiliary batch normalization, to confirm the defense does not trade away ordinary grounding quality.