Manuscript Offprint
arXiv:2610.32013MAGIC: Margin-gated Contrastive Debiasing with Evidence Restoration for VLM Test-time Robustness Scaling
Abstract
This paper studies the problem of test-time robustness scaling for large vision-language models (LVLMs), which aims to mitigate language bias during inference. Existing approaches typically adopt test-time scaling techniques such as contrastive decoding to improve inference performance. Despite the progress, the performance of these approaches is far from satisfactory due to intentional evidence removal during perturbations and redundant inference cost. Towards this end, we propose a novel approach named Margin-gated Contrastive Debiasing with Evidence Restoration (MAGIC). The core of our MAGIC is to evaluate the decision margins of LVLMs to selectively activate textual and visual perturbation branches for efficient debiased inference. In particular, our MAGIC first measures the prediction margins of crucial tokens, and applies a gating function to identify low-confidence responses that are susceptible to language biases. For selected samples, we integrate the token logits from multiple textual and image perturbation branches with the original ones for debiased decision. More importantly, we selectively restore the most informative corrupted views with sharp prediction distributions for ambiguous samples after debiasing, enabling evidence recovery for discriminative decision-making. We further utilize a calibration dataset to actively identify and prune ineffective branches during contrastive debiasing for cost reduction. Extensive experiments on benchmark datasets validate the effectiveness of the proposed MAGIC in comparison with extensive baselines.
1 Introduction
Large vision–language models (LVLMs) often answer from their language prior rather than the image (Antol et al., 2015; Goyal et al., 2019; Agrawal et al., 2018). Asked about an image whose answer is rare in the world, they tend to return the common answer regardless of what the image shows (Luo et al., 2024). Correcting this bias at inference time has become an active line of work, since such correction needs no retraining and applies to any pretrained model.
Most inference-time methods for this problem share a contrastive decoding (CD) paradigm. They run the model a second time on a corrupted input, such as a blank or noised image, subtract the corrupted branch's scores from the original, and take the difference to be the bias. Counterfactual VQA (Niu et al., 2021) subtracts a single image-free branch, while VCD (Leng et al., 2024) and M3ID (Favero et al., 2024) vary how the input is corrupted and how the branches are combined. Building on these, SCI (Tang et al., 2026a) averages several perturbation branches and reports that adding branches yields a stronger correction. Across the family, the correction is a fixed function of the corrupted branches, applied to every sample.
However, this family shares two limitations. First, the perturbation that produces the subtracted branch removes more than the prior. The correction is built from the corrupted branch alone, so it discards the image's own contribution along with the language prior. A sample whose answer turns on that contribution is left without the evidence it needs. Second, the correction is charged to every input over a branch set fixed in advance. Forward passes are spent on inputs that a bounded correction cannot change. Each added branch also yields less than the last, since a perturbed branch estimates the prior rather than being it and averaging shrinks only part of that estimate's error.
To address these limitations, we propose MAGIC, a training-free corrector built from the three parts shown in Figure 1. It allocates correction by the model's decision margin, so confident predictions pass through untouched while contested ones receive it. It then restores the visual evidence the perturbation removes, drawn from whichever perturbed view leaves the model most confident, and keeps it only where the decision becomes more definite. Finally, it prunes its perturbation branches per model on a calibration set rather than fixing them in advance. The design carries three thresholds and no trained parameters, and it spends its passes only where the correction is worth its cost. We validate this design with extensive experiments across four LVLM backbones and six datasets, showing that MAGIC consistently outperforms strong contrastive-decoding baselines
Our contributions are summarized as follows. ① We recast test-time debiasing as an allocation problem rather than a fixed operation, in which the extra forward passes a corrector makes are a budget to be spent where it can change the answer. ② We propose MAGIC, a corrector that adds no trained parameters, gates correction on the decision margin, restores the evidence a perturbation removes, and sizes its branch set per model. ③ Extensive experiments on four LVLMs from two model generations show that MAGIC consistently outperforms strong CD baselines at a cost that adapts to the input.
Test-Time Robustness Scaling. Rather than retraining, a frozen LVLM can be made more robust by spending extra forward passes at inference. Contrastive decoding scores a token by the gap between two runs of the model, one of them weakened so that the gap suppresses what the weaker run favors (Li et al., 2023; Chuang et al., 2024). Vision-language methods weaken the run by corrupting the image and read the gap as the language prior. VCD (Leng et al., 2024) noises the image, while M3ID (Favero et al., 2024) drops it entirely and strengthens the subtraction as the response grows. Counterfactual-inference methods (Tang et al., 2020; Niu et al., 2021) reach the same subtraction through causal effects. SCI (Tang et al., 2026a) averages several such branches. Others make the correction itself adaptive. Some fire it only where a signal read off the model says it is needed, the predictive confidence (Tang et al., 2026b; Huang et al., 2026), the stability of the token preference across layers (Liu, 2026), or the gap between the multimodal and text-only branches (Ren et al., 2026). Others select which perturbation to contrast against (Kim et al., 2024) or contrast iteratively across image scales (Park et al., 2025). In all of them the branch set is fixed in advance and charged to every sample. Adjacent work acts inside the forward pass (Liu et al., 2024b; Huo et al., 2025; Deng and Yang, 2025; Huang et al., 2024), at training time (Clark et al., 2019; Cadene et al., 2019; Utama et al., 2020), or on content-free (Zhao et al., 2021; Holtzman et al., 2021) and self-describing (Schick et al., 2021) prompts. However, subtracting such a branch removes genuine visual evidence along with the prior. MAGIC instead gates the correction on the decision margin, restores the evidence the perturbation removes, and prunes its branches per model.
3 The Proposed MAGIC
Problem Definition. We consider inference-time correction of a frozen LVLM. Given an image v and a question q, let be the scores the model assigns to K answer candidates, each scored by the log-probability of its first answer token. The candidates are the option letters for multiple-choice items and a pool of the model's own answers for open-ended ones. Writing for the scores on the real input, the model answers with . On some inputs these scores are carried by the language prior rather than by the image. Our goal is to correct those inputs without retraining, while leaving the rest untouched. Existing correctors subtract from an estimate of the language prior, which is formulated as follows:
where is read from a perturbation branch that runs the same model on a corrupted input, and existing methods differ only in how is chosen.

Figure 1: Overview of MAGIC. Each step fires only when the margin m still leaves the decision contested, so a sample that clears a gate exits with the scores it already has. Thresholds are fitted offline on the validation split.
Because this correction is charged to every input and its branch set is fixed in advance, the budget is spent uniformly rather than where it can change the answer.
3.1 Framework Overview
In this paper, we propose MAGIC, a training-free corrector that spends the budget of Eq. (1) only where it can change the answer. The core of MAGIC is to treat correction as a resource allocated by the decision margin of , so that a confident prediction keeps its single forward pass while only a contested one is corrected. In particular, MAGIC first replaces with a state rebuilt from anti-prior contrasts, which removes the prior. Then, because that removal also discards what the image contributes, a second gate decides whether to add a visual residual back. Finally, the branch set both steps draw on is fitted per model rather than fixed in advance, and no parameter is trained. Zero gates recover the base model, while an always-open first gate over a single blank branch reduces MAGIC to Eq. (1). An overview of MAGIC can be found in Figure 1.
3.2 Debiased Contrastive Decoding with Margin Gating
The correction of Eq. (1) is charged to every input, yet a correction of bounded size cannot change a decision the model already makes by a wide margin. Below that width, whether it helps depends on whether the prior really drives the input. Therefore, we propose to allocate the correction by the decision margin, firing it only where the lead of the predicted answer is small. When it fires, we rebuild the state from anti-prior contrasts rather than adding to the base scores. A wide-margin input then keeps its answer at a single forward pass, while a contested one is re-decided on a state the prior no longer dominates. Rebuilding is necessary because the base scores are themselves carried by the prior that the branches measure.
Specifically, we define the decision margin (Scheffer et al., 2001) as the gap between the top two scores, which is formulated as follows:
A subtractive correction bounded by moves the gap between any two scores by at most 2B. Therefore, we have
and the correction is inert there. The bound is worst-case but informative, and Appendix B.1 shows that it holds on most of the samples MAGIC skips. It applies directly to the additive restoration of §3.3, while the state-replacing step here is not bounded in this sense and its gate is justified instead by measurement. We define the utility as the

Figure 2: Utility of the ungated debiasing step against the base decision margin, on biased and natural samples. Bands are 95% intervals and shading marks the margins over which the two curves separate.
mean accuracy change when the debiasing step is applied to every sample of base margin m. Figure 2 plots this curve against the base margin for each backbone, on the biased subsets and on the natural samples separately. On the biased subsets the correction keeps helping over a wide range of margins. On the natural samples it already turns harmful at a small margin, where most contested samples are not prior-driven and the subtraction mostly injects noise. The same shape repeats on all four backbones, which indicates that the margin is where the correction should be allocated.
The gate therefore fires only when . We then form the visual contrast , where is an all-black image. Appendix C.4 shows that the branch decides the same way when the blank is replaced by an external real image. We read the same contrast through a second wording , a rephrased prompt that asks for the answer in a different form. Then, the debiased state is obtained as follows:
where the elementwise maximum keeps the stronger anti-prior signal per candidate, so the prior cannot suppress a candidate through one branch alone.
3.3 Selective Evidence Restoration for Discriminative Decision-Making
Eq. (4) rebuilds the state from contrasts alone, so it discards the image's own contribution to along with the prior, and a sample whose answer turns on that contribution is left without it. Adding it back is not free either, since a corrupted view carries artifacts of its own that the subtraction would import. Therefore, we propose to restore a visual residual from the perturbed view that leaves the model most confident, and to keep it only where it makes the decision more definite. A view that leaves the model confident is less likely to have manufactured evidence of its own, so the residual it yields carries what the image contributes rather than what the perturbation invents. A residual that fails to help is discarded instead of applied.
Specifically, let be the state left by the debiasing step of §3.2. When , we select the source by the drop in maximum softmax probability when the image is replaced by a candidate , which is formulated as follows:
where the candidate images are grayscale, strong-blur and center-mask, which remove color, local detail, and the center of the frame respectively, so that the selection has genuinely different views to choose between. Since does not depend on , Eq. (5) keeps the view whose prediction distribution stays sharpest. Then, we form the residual as follows:
Both terms carry the same question q and therefore the same prior contribution, which the subtraction cancels. What remains in is what the real image adds over the perturbed one. The residual is restored only when it widens the margin by at least , and we have
and a sample whose residual falls short of exits with its debiased state.
3.4 Perturbation Branch Pruning with Calibration
Both steps draw on perturbation branches, and their number is not a free parameter to be raised indefi-

Figure 3: Error of the corrector of Eq. (1) as averages branches, with an fit and its asymptote dashed.
nitely. Since only approximates the prior, averaging more branches shrinks the zero-mean component of its error but not the component the perturbation itself induces, and the return from each further branch vanishes against its fixed cost. Therefore, we propose to prune the branch set per model on a calibration set rather than fix it in advance, keeping a perturbation family only where the prior mass it removes exceeds the error it injects. Because both the surviving error and the variance above it are properties of the encoder, this leaves each backbone with the branches it can still profit from and charges no pass for the ones it cannot.
Formally, write the estimate as , where is the prior's contribution to the scores and is estimation error, and split into a zero-mean part with variance and a part that averaging does not shrink. The estimate formed from branches then carries the following error:
The bias floor survives any budget, and the -th branch lowers the error by at most , which vanishes as grows; see Appendix B.2 for the derivation. Figure 3 shows both effects on an observable proxy, the error rate of the corrector of Eq. (1) whose estimate averages branches on the biased samples. An fit shows the error leveling off at a large floor rather than falling to zero, with the encoders differing in the variance above it.
Each candidate perturbation family is therefore tested on the calibration set, the validation split of the target distribution, and kept where it improves the calibration accuracy. The three thresholds are fit on the same set, and by grid search and as a percentile of the base margin.
| Subset Size | ||||
|---|---|---|---|---|
| B Subset | S Subset | BS Subset | Overlap | |
| LLaVA-NeXT (MCQ) | 1810 | 1005 | 2476 | 339 |
| LLaVA-NeXT (Others) | 345 | 582 | 794 | 133 |
| LLaVA-NeXT (Overall) | 2155 | 1587 | 3270 | 472 |
| Qwen2-VL (MCQ) | 1080 | 252 | 1243 | 89 |
| Qwen2-VL (Others) | 327 | 311 | 513 | 125 |
| Qwen2-VL (Overall) | 1407 | 563 | 1756 | 214 |
Table 1: The size of each subset in constructed DR-Bench. The overall number of samples across all six datasets is 13,251, with the MCQ and Others categories being 10,632 and 2,619, respectively.
4 Experiments
This section evaluates MAGIC against the CD family on biased benchmarks and on real-world LVLM datasets, across four backbones from two model generations.
4.1 Experimental Settings
Datasets and Metrics. We evaluate on DRBench (Tang et al., 2026a), whose biased subsets are built from MMStar (Chen et al., 2024), CCBench and MMBench-EN/CN (Liu et al., 2024c), MME (Fu et al., 2026), and ViLP (Luo et al., 2024). The evaluation subsets are B(ias), where the model answers wrongly and repeats that answer under a blank image, S(ensitivity), where its answer changes across prompt rephrasings, and their union BS. They are built with visual and textual counterfactual probes (VCF and TCF), with MCQ, Others, and Overall accuracy on the BS subset, following the benchmark. We report top-1 accuracy throughout, scoring open-ended items by generation with prefix match. MME uses its own score, which we convert to accuracy so that it combines with the other datasets. Besides accuracy, we report each method's average number of forward passes per sample as its cost. Table 1 summarizes the subset statistics.
Backbones. We use the Hugging Face releases of Qwen2-VL-7B (Wang et al., 2024) and LLaVA-NeXT-8B (Liu et al., 2024a) as base models, and extend the evaluation to Qwen3-VL-8B (Bai et al., 2025) and LLaVA-OneVision-1.5-8B (An et al., 2025). Qwen2-VL follows its release default of bfloat16 precision with top-k decoding and LLaVA-NeXT its default of float16 with greedy decoding, and the two newer backbones run in bfloat16 with greedy decoding.
Counterfactual Construction. Every branch is built from the same question and image. The blank branch replaces the image with an all-black canvas
| Model | Method | Bias Subset | Sensitivity Subset | BS Subset | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| MCQ | Others | All | MCQ | Others | All | MCQ | Others | All | Passes | ||
| Qwen2-VL-7B | Base | 5.37 | 8.56 | 6.11 | 38.10 | 34.41 | 36.06 | 10.78 | 23.59 | 14.52 | 1 |
| TIE | 16.20 | 16.82 | 16.35 | 45.63 | 36.66 | 40.67 | 20.27 | 27.29 | 22.32 | 2 | |
| VCD | 15.74 | 21.71 | 17.13 | 46.83 | 40.84 | 43.52 | 20.11 | 30.41 | 23.12 | 2 | |
| M3ID | 19.81 | 21.71 | 20.26 | 47.22 | 41.16 | 43.87 | 23.65 | 30.60 | 25.68 | 2 | |
| 21.67 | 26.30 | 22.74 | 44.05 | 42.44 | 43.16 | 24.54 | 32.75 | 26.94 | 3 | ||
| 24.91 | 25.69 | 25.09 | 47.22 | 42.44 | 44.58 | 28.00 | 33.14 | 29.50 | 5 | ||
| 27.04 | 29.66 | 27.65 | 47.22 | 45.98 | 46.54 | 29.61 | 36.84 | 31.72 | 7 | ||
| MAGIC | 30.26 | 25.15 | 29.07 | 48.73 | 45.63 | 47.09 | 32.30 | 35.16 | 33.13 | 4.9 | |
| LLaVA-NeXT-8B | Base | 0.00 | 0.00 | 0.00 | 39.20 | 37.63 | 38.63 | 15.91 | 27.58 | 18.75 | 1 |
| TIE | 12.98 | 23.48 | 14.66 | 39.00 | 57.56 | 45.81 | 21.89 | 44.21 | 27.31 | 2 | |
| VCD | 12.65 | 25.51 | 14.71 | 40.50 | 56.53 | 46.38 | 22.54 | 44.58 | 27.89 | 2 | |
| M3ID | 16.91 | 25.22 | 18.24 | 39.90 | 56.36 | 45.94 | 24.15 | 44.33 | 29.05 | 2 | |
| 21.22 | 35.36 | 23.48 | 39.60 | 60.31 | 47.20 | 27.14 | 50.13 | 32.72 | 3 | ||
| 23.81 | 37.97 | 26.08 | 40.60 | 60.65 | 47.95 | 28.80 | 51.01 | 34.19 | 5 | ||
| 24.86 | 38.26 | 27.01 | 40.10 | 60.65 | 47.64 | 29.68 | 51.26 | 34.92 | 7 | ||
| MAGIC | 26.95 | 41.83 | 29.37 | 40.99 | 58.30 | 47.29 | 31.13 | 52.01 | 36.22 | 4.7 | |
Table 2: Experiments on the B(ias) Subset, S(ensitivity) Subset, and BS Subset of DRBench. Baseline results are from Tang et al. (2026a). Passes is the mean per-sample forward count. We bold the best result in each column and underline the second best.
| Method | Single Dataset | Question Type | |||||||
|---|---|---|---|---|---|---|---|---|---|
| MMB-C | MMB-E | MME | CCB | MMS | ViLP | MCQ | Others | Overall | |
| Qwen2-VL | 85.26 | 86.36 | 87.89 | 73.22 | 59.50 | 56.53 | 80.91 | 79.27 | 80.58 |
| Qwen2-VL-TIE | 86.00↑0.74 | 86.59↑0.23 | 86.52↓1.37 | 73.84↑0.62 | 59.00↑0.50 | 57.08↑0.55 | 81.30↑0.39 | 78.43↓0.84 | 80.73↑0.15 |
| Qwen2-VL-VCD | 86.05↑0.79 | 86.56↑0.20 | 86.41↓1.48 | 73.77↑0.55 | 60.08↑0.58 | 57.92↑1.39 | 81.42↑0.51 | 78.58↓0.69 | 80.86↑0.28 |
| Qwen2-VL-M3ID | 85.69↑0.43 | 86.46↑0.10 | 86.10↓1.79 | 73.96↑0.74 | 59.75↑0.25 | 57.78↑1.25 | 81.25↑0.34 | 78.31↓0.96 | 80.67↑0.09 |
| Qwen2-VL-SCI5 | 85.97↑0.71 | 86.67↑0.31 | 87.36↑0.53 | 73.59↑0.37 | 59.92↑0.42 | 58.06↑1.53 | 81.39↑0.48 | 79.31↑0.04 | 80.98↑0.40 |
| Qwen2-VL-MAGIC (ours) | 86.05↑0.79 | 86.49↑0.13 | 88.26↑0.37 | 73.90↑0.68 | 60.68↑1.18 | 56.53 | 81.49↑0.58 | 79.53↑0.26 | 81.10↑0.52 |
| LLaVA-NeXT | 78.00 | 79.72 | 79.57 | 47.00 | 44.75 | 51.53 | 70.12 | 71.86 | 70.46 |
| LLaVA-NeXT-TIE | 78.28↑0.28 | 80.28↑0.56 | 77.30↓2.27 | 45.65↓1.35 | 46.00↑1.25 | 53.19↑1.66 | 70.36↑0.24 | 70.68↓1.18 | 70.42↓0.04 |
| LLaVA-NeXT-VCD | 78.38↑0.38 | 80.28↑0.56 | 78.09↓1.48 | 46.63↓0.37 | 45.00↑0.25 | 54.31↑2.78 | 70.44↑0.32 | 71.55↓0.31 | 70.66↑0.20 |
| LLaVA-NeXT-M3ID | 78.31↑0.31 | 80.18↑0.46 | 78.62↓0.95 | 45.89↓1.11 | 45.92↑1.17 | 54.03↑2.50 | 70.36↑0.24 | 71.86 | 70.66↑0.20 |
| LLaVA-NeXT-SCI5 | 78.21↑0.21 | 80.08↑0.36 | 80.15↑0.58 | 46.20↓0.80 | 45.75↑1.00 | 53.06↑1.53 | 70.32↑0.20 | 72.70↑0.84 | 70.79↑0.33 |
| LLaVA-NeXT-MAGIC (ours) | 78.21↑0.21 | 80.26↑0.54 | 80.62↑1.05 | 47.79↑0.79 | 46.74↑1.99 | 52.78↑1.25 | 70.74↑0.62 | 72.97↑1.11 | 71.18↑0.72 |
Table 3: Experiments on the six real-world LVLM datasets, MMB(ench-Dev)-C/E(N-V11), MME, CCB(ench), MMS(tar), and ViLP (using 80% test splits). Baseline results are from Tang et al. (2026a).
of the same size. The visual sources of Eq. (5) transform the real image rather than discarding it, by conversion to grayscale, by a Gaussian blur of radius 100, and by covering the central half of the frame with the image's mean color. The answer-format branch keeps the image and swaps the instruction for a second wording of the same answer-format requirement, so contrasting it against the same wording under a blank image measures the prior through a different phrasing.
Baselines. The CD baselines instantiate the prior-estimate subtraction of Eq. (1) with different counterfactual sets. TIE removes one visual counterfactual, VCD and M3ID reweight that same difference with M3ID growing the weight along the token position, and average visual and textual counterfactuals together with the original input. Their branches follow their own papers. SCI uses a blank and a noised image as its visual counterfactuals and two prompt rephrasings as its textual ones. On the two newer backbones we run every baseline with the implementation released with DRBench, validated against the released cells, and score open-ended items over the shared candidate pool.
4.2 Performance Comparison
Results on DRBench. We compare the MAGIC with the CD family on the B(ias), S(ensitivity), and BS subsets of DRBench across two backbones, and report the accuracy together with the average number of forward passes per sample in Table 2. According to the results, we make several observations (Obs.) listed as follows: Obs.① MAGIC attains the best BS Overall on both backbones, outperforming the uncorrected base model and the strongest two-branch correctors. As shown in Table 2, it improves over the base model in terms of

Figure 4: Accuracy against compute on the biased subset of Qwen2-VL as is swept. Each baseline sits at one fixed budget, while MAGIC traces a frontier. The star marks the deployed setting.
BS Overall accuracy by 18.61% on Qwen2-VL and 17.47% on LLaVA-NeXT, and it surpasses M3ID by 7.45% and 7.17%. Obs. MAGIC improves over the SCI family at a lower inference cost. The results in Table 2 demonstrate that MAGIC improves over the cost-matched by 3.63% and 2.03%, and exceeds the seven-branch on Overall while using roughly 70% of its passes. We further sweep the debiasing gate on the biased subset of Qwen2-VL and plot accuracy against the average number of forward passes in Figure 4. According to the results, each baseline sits at one fixed budget, while MAGIC traces the accuracy–compute frontier over .
Results on Real-world LVLM Datasets. We evaluate MAGIC against the CD family on the six real-world LVLM datasets across two backbones, and report the accuracy. As shown in Table 3, MAGIC improves over the base on both backbones and outperforms the strongest CD baseline's Overall at fewer passes, while TIE and VCD lose accuracy on the Others question type. The margins are small because vulnerable samples are only a fraction of these datasets.
Results on Newer Backbones. We extend the evaluation to two more recent models. As shown in Table 4, MAGIC attains the best B and BS on both and the best S on Qwen3-VL. It improves BS Overall over the base by 19.28% on Qwen3-VL and 15.58% on LLaVA-OneVision-1.5, over M3ID by 16.66% and 7.81%, and over the best SCI setting by 5.40% and 0.92%. On both backbones the calibration screen keeps a single debiasing contrast, and on Qwen3-VL it also drops the restoration step, so the correction costs 2.9 and 4.0 passes. The SCI family itself stops scaling here, with falling below on Qwen3-VL and below on LLaVA-OneVision-1.5 in BS Overall, the vanishing return that Eq. (8) predicts.
| Model | Method | B | S | BS | Passes |
|---|---|---|---|---|---|
| Qwen3-VL | Base | 0.49 | 34.65 | 12.56 | 1 |
| TIE | 5.71 | 32.44 | 13.47 | 2 | |
| VCD | 7.19 | 32.60 | 14.27 | 2 | |
| M3ID | 8.74 | 33.54 | 15.18 | 2 | |
| 21.37 | 41.42 | 24.96 | 3 | ||
| 22.43 | 47.56 | 26.44 | 5 | ||
| 21.93 | 46.61 | 25.92 | 7 | ||
| MAGIC | 28.98 | 49.13 | 31.84 | 2.9 | |
| OneVision-1.5 | Base | 0.17 | 52.16 | 26.58 | 1 |
| TIE | 11.75 | 52.81 | 31.60 | 2 | |
| VCD | 12.03 | 53.09 | 32.00 | 2 | |
| M3ID | 15.96 | 53.60 | 34.35 | 2 | |
| 25.24 | 57.99 | 41.24 | 3 | ||
| 24.85 | 52.73 | 38.82 | 5 | ||
| 25.74 | 52.23 | 38.82 | 7 | ||
| MAGIC | 27.49 | 56.47 | 42.16 | 4.0 |
Table 4: B/S/BS Overall accuracy on two more recent backbones. We bold the best result in each column and underline the second best.
4.3 Further Analysis
Ablation Study. We then investigate how the two gated steps and the two debiasing contrasts in MAGIC affect the final performance. In particular, we design four variants, which remove the debiasing step, the restoration step, the blank contrast, and the answer-format contrast, respectively. We perform experiments on the BS subset of DRBench with both backbones, and the results are shown in Table 5, from which we have the following observations: Obs. Both gated steps contribute to the final performance. Removing the debiasing step collapses the BS accuracy, since the visual residual is left with no cleaned state to build on, and adding the residual back on top of it recovers accuracy on the multiple-choice items. Obs. The two debiasing contrasts are complementary. Within the debiasing step, replacing the fusion of the blank and the answer-format contrasts by either one alone costs between 0.5% and 1.7% of BS Overall, so each step carries a distinct part of the result.
Sensitivity Analysis. To see how much the result depends on the fitted constants, we sweep the two allocation thresholds one at a time on Qwen2-VL in Table 6. Above the fitted value , accuracy is flat, gaining at most in BS Overall as rises to 8, and it falls off only below it, where the gate stops firing on samples that need it. That plateau is the inert regime of Eq. (3), where a larger
(a) One gate opens — 4 forward passes

Question: Which is the main topic of the image?
A. A driving car
B. Driving cars
C. Driving buses
D. A driving bus
Correct answer: C. Driving buses
| Stage | A | B | C | D | m |
|---|---|---|---|---|---|
| Base | -5.04 | -5.29 | -0.91 | -0.54 | 0.37 |
| Debiased | -3.09 | -3.71 | 2.54 | 0.37 | 2.17 |
| Residual | gate closed | ||||
| Final S | -3.09 | -3.71 | 2.54 | 0.37 | 2.17 |
Base D Several buses share the street and the model answers as if there were one, 0.37 ahead of the plural option. The margin opens the debiasing gate.
Step 1 → C √ Contrasting the image against a blank one under both instructions removes what the question alone makes likely. C gains 3.45 against D's 0.91 and takes the lead, at a margin of 2.17.
Step 2: not run That , so the restoration gate stays shut and no visual residual is built. The sample leaves after 4 passes, three of them spent by the step that fired.
(b) Both gates open — 7 forward passes

Question: Which image is the brightest one?
A. upper left
B. upper right
C. down left
D. down right
Correct answer: C. down left
| Stage | A | B | C | D | m |
|---|---|---|---|---|---|
| Base | -0.22 | -5.22 | -1.72 | -4.59 | 1.50 |
| Debiased | 0.40 | -3.22 | 0.35 | -2.15 | 0.05 |
| Residual | -0.10 | -0.22 | 0.65 | -0.22 | |
| Final S | 0.30 | -3.44 | 1.00 | -2.37 | 0.70 |
Base A The model picks the upper-left frame, a photograph shot in the dark, rather than the lit one below it. The margin opens the debiasing gate.
Step 1 A Debiasing lifts C by 2.07 but leaves it 0.05 behind A, so the answer does not settle. That opens the restoration gate.
Step 2 C The residual puts the removed evidence back: it adds 0.65 to C and moves the rest down. The margin widens by , so the step commits.
Figure 5: Two biased-subset samples MAGIC repairs on Qwen2-VL, at the fitted thresholds. Each note keeps its stage's color from Figure 1 and is dashed when that gate never opened. and flag the answer a stage leaves, is the top-two margin, and the committed answer is bold.
| Model | Configuration | MCQ | Others | Overall | Passes |
|---|---|---|---|---|---|
| MAGIC w/o CD | 13.17 | 25.39 | 16.70 | 2.2 | |
| MAGIC w/o BC | 31.59 | 34.77 | 32.51 | 4.0 | |
| Qwen2-VL | MAGIC w/o AF | 31.11 | 32.42 | 31.49 | 3.2 |
| MAGIC w/o SR | 30.40 | 33.59 | 31.32 | 3.8 | |
| MAGIC | 32.30 | 35.16 | 33.13 | 4.9 | |
| MAGIC w/o CD | 17.07 | 38.44 | 22.28 | 1.9 | |
| MAGIC w/o BC | 30.48 | 51.88 | 35.70 | 3.7 | |
| LLaVA-NeXT | MAGIC w/o AF | 30.44 | 50.88 | 35.43 | 3.0 |
| MAGIC w/o SR | 30.52 | 52.76 | 35.95 | 3.9 | |
| MAGIC | 31.13 | 52.01 | 36.22 | 4.7 |
Table 5: Ablation on the BS Subset of DRBench. CD: Contrastive Debiasing, BC: Blank Contrast, AF: Answer-Format Contrast, SR: Selective Restoration. Passes is the mean per-sample forward count.
| Model | Value | MCQ | Others | Overall | Passes |
|---|---|---|---|---|---|
| Debiasing gate | |||||
| 0.5 | 18.81 | 29.30 | 21.84 | 3.0 | |
| 1.0 | 24.68 | 31.64 | 26.69 | 3.7 | |
| Qwen2-VL | 2.0 | 31.03 | 34.38 | 32.00 | 4.4 |
| 3.0 | 32.30 | 34.96 | 33.07 | 4.8 | |
| 5.0 | 32.38 | 35.74 | 33.35 | 5.0 | |
| 8.0 | 32.46 | 35.94 | 33.47 | 5.0 | |
| Restoration gate | |||||
| 0.0 | 30.32 | 33.59 | 31.26 | 4.0 | |
| 0.2 | 31.35 | 33.40 | 31.94 | 4.4 | |
| Qwen2-VL | 0.3 | 32.14 | 33.59 | 32.56 | 4.6 |
| 0.4 | 32.30 | 34.18 | 32.84 | 4.9 | |
| 0.6 | 32.46 | 35.16 | 33.24 | 5.1 | |
| 1.0 | 32.06 | 35.16 | 32.96 | 5.5 | |
Table 6: Sensitivity to the two allocation thresholds on Qwen2-VL, BS Subset of DRBench. We bold the best result in each column within a block.
mostly admits samples too confident to move. In deployment is not tuned for accuracy but set as the 95th percentile of the base margin on the biased calibration set. The restoration gate moves BS Overall by on Qwen2-VL while the mean pass count rises from 4.0 to 5.5, so it trades additional compute for accuracy within a narrow band. Case Study. To see how the allocation rule behaves on individual samples, we trace two Qwen2-VL samples through MAGIC. Figure 5 presents two cases the base model answers incorrectly. In the first the image shows several buses and the model answers as if there were one, 0.37 ahead of the correct option. The debiasing step fires and moves the answer to that option with a margin of 2.17, wide enough that the restoration step never runs. In the second the debiasing step leaves the top two options 0.05 apart, so the restoration step also fires and the visual residual adds 0.65 to the correct option. The same rule therefore spends four forward passes on one sample and seven on the other. A fixed branch set would instead spend the same number on both, including on the first sample, where one step already leaves the margin wide.
5 Conclusion
In this paper, we propose MAGIC, a training-free corrector for test-time robustness scaling that fires only where the decision margin is small, restores the visual evidence the perturbation removes, and sizes its branch set per model. Two measurements on the contrastive decoding family motivate this design. Extensive experiments demonstrate the effectiveness of the proposed MAGIC.
Limitations
MAGIC operates on the model’s scores over a fixed candidate set, the option letters for multiple-choice items and a materialized pool of generations for open-ended ones, and does not intervene inside token-by-token decoding, so free-form captioning benchmarks fall outside the scope of these results. Its three thresholds are fitted per target distribution on a validation split, so a new distribution requires re-running that selection. Extending margin allocation into token-by-token decoding, so that it also covers free-form generation, is the natural next step for this line of work.
References
Aishwarya Agrawal, Dhruv Batra, Devi Parikh, and Aniruddha Kembhavi. 2018. Don’t just assume; look and answer: Overcoming priors for visual question answering. In 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4971–4980. IEEE.
Xiang An, Yin Xie, Kaicheng Yang, Wenkang Zhang, Xiuwei Zhao, Zheng Cheng, Yirui Wang, Songcen Xu, Changrui Chen, Didi Zhu, et al. 2025. Llava-onevision-1.5: Fully open framework for democratized multimodal training. arXiv preprint arXiv:2509.23661.
Stanislaw Antol, Aishwarya Agrawal, Jiasen Lu, Margaret Mitchell, Dhruv Batra, C Lawrence Zitnick, and Devi Parikh. 2015. Vqa: Visual question answering. In Proceedings of the IEEE international conference on computer vision, pages 2425–2433.
Shuai Bai, Yuxuan Cai, Ruizhe Chen, Keqin Chen, Xionghui Chen, Zesen Cheng, Lianghao Deng, Wei Ding, Chang Gao, Chunjiang Ge, et al. 2025. Qwen3-vl technical report. arXiv preprint arXiv:2511.21631.
Remi Cadene, Corentin Dancette, Matthieu Cord, Devi Parikh, et al. 2019. Rubi: Reducing unimodal biases for visual question answering. Advances in neural information processing systems, 32.
Lin Chen, Jinsong Li, Xiaoyi Dong, Pan Zhang, Yuhang Zang, Zehui Chen, Haodong Duan, Jiaqi Wang, Yu Qiao, Dahua Lin, et al. 2024. Are we on the right way for evaluating large vision-language models? Advances in Neural Information Processing Systems, 37:27056–27087.
Yung-Sung Chuang, Yujia Xie, Hongyin Luo, Yoon Kim, James R Glass, and Pengcheng He. 2024. Dola: Decoding by contrasting layers improves factuality in large language models. In International Conference on Learning Representations, volume 2024, pages 54158–54183.
Christopher Clark, Mark Yatskar, and Luke Zettlemoyer. 2019. Don’t take the easy way out: Ensemble based methods for avoiding known dataset biases. In Proceedings of the 2019 conference on empirical methods in natural language processing and the 9th international joint conference on natural language Processing (EMNLP-IJCNLP), pages 4069–4082.
Jingyuan Deng and Yujiu Yang. 2025. Maskcd: Mitigating lvlm hallucinations by image head masked contrastive decoding. arXiv preprint arXiv:2510.02790.
Alessandro Favero, Luca Zancato, Matthew Trager, Siddharth Choudhary, Pramuditha Perera, Alessandro Achille, Ashwin Swaminathan, and Stefano Soatto. 2024. Multi-modal hallucination control by visual information grounding. In 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 14303–14312. IEEE.
Chaoyou Fu, Peixian Chen, Yunhang Shen, Yulei Qin, Mengdan Zhang, Xu Lin, Jinrui Yang, Xiawu Zheng, Ke Li, Xing Sun, et al. 2026. Mme: A comprehensive evaluation benchmark for multimodal large language models. Advances in Neural Information Processing Systems, 38.
Yash Goyal, Tejas Khot, Aishwarya Agrawal, Douglas Summers-Stay, Dhruv Batra, and Devi Parikh. 2019. Making the v in vqa matter: Elevating the role of image understanding in visual question answering. International Journal of Computer Vision, 127(4):398–414.
Dan Hendrycks and Kevin Gimpel. 2016. A baseline for detecting misclassified and out-of-distribution examples in neural networks. arXiv preprint arXiv:1610.02136.
Ari Holtzman, Peter West, Vered Shwartz, Yejin Choi, and Luke Zettlemoyer. 2021. Surface form competition: Why the highest probability answer isn’t always right. In Proceedings of the 2021 conference on empirical methods in natural language processing, pages 7038–7051.
Qidong Huang, Xiaoyi Dong, Pan Zhang, Bin Wang, Conghui He, Jiaqi Wang, Dahua Lin, Weiming Zhang, and Nenghai Yu. 2024. Opera: Alleviating hallucination in multi-modal large language models via over-trust penalty and retrospection-allocation. In 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 13418–13427. IEEE.
Xiaoyi Huang, Kejia Zhang, and Zhiming Luo. 2026. Chasd: Language increment-calibrated contrastive decoding against hallucination in lvlms. arXiv preprint arXiv:2605.23344.
Fushuo Huo, Wenchao Xu, Zhong Zhang, Haozhao Wang, Zhicheng Chen, and Peilin Zhao. 2025. Self-introspective decoding: Alleviating hallucinations for large vision-language models. In International Conference on Learning Representations, volume 2025, pages 24272–24295.
Sihyeon Kim, Boryeong Cho, Sangmin Bae, Sumyeong Ahn, and Se-Young Yun. 2024. Vacode: Visual augmented contrastive decoding. arXiv preprint arXiv:2408.05337.
Sicong Leng, Hang Zhang, Guanzheng Chen, Xin Li, Shijian Lu, Chunyan Miao, and Lidong Bing. 2024. Mitigating object hallucinations in large vision-language models through visual contrastive decoding. In 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 13872–13882. IEEE.
Xiang Lisa Li, Ari Holtzman, Daniel Fried, Percy Liang, Jason Eisner, Tatsunori B Hashimoto, Luke Zettlemoyer, and Mike Lewis. 2023. Contrastive decoding: Open-ended text generation as optimization. In Proceedings of the 61st annual meeting of the association for computational linguistics (volume 1: Long papers), pages 12286–12312.
Haotian Liu, Chunyuan Li, Yuheng Li, Bo Li, Yuanhan Zhang, Sheng Shen, and Yong Jae Lee. 2024a. Lla-vanext: Improved reasoning, ocr, and world knowledge.
Shi Liu, Kecheng Zheng, and Wei Chen. 2024b. Paying more attention to image: A training-free method for alleviating hallucination in lvlms. In European Conference on Computer Vision, pages 125–140. Springer.
Xinyun Liu. 2026. Htdc: Hesitation-triggered differential calibration for mitigating hallucination in large vision-language models. arXiv preprint arXiv:2604.12115.
Yuan Liu, Haodong Duan, Yuanhan Zhang, Bo Li, Songyang Zhang, Wangbo Zhao, Yike Yuan, Jiaqi Wang, Conghui He, Ziwei Liu, et al. 2024c. Mmbench: Is your multi-modal model an all-around player? In European conference on computer vision, pages 216–233. Springer.
Tiange Luo, Ang Cao, Gunhee Lee, Justin Johnson, and Honglak Lee. 2024. Probing visual language priors in vlms. arXiv preprint arXiv:2501.00569.
Yulei Niu, Kaihua Tang, Hanwang Zhang, Zhiwu Lu, Xian-Sheng Hua, and Ji-Rong Wen. 2021. Counterfactual vqa: A cause-effect look at language bias. In 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 12695–12705. IEEE.
Woohyeon Park, Woojin Kim, Jaeik Kim, and Jaeyoung Do. 2025. Second: Mitigating perceptual hallucination in vision-language models via selective and contrastive decoding. arXiv preprint arXiv:2506.08391.
Tian Qin, Junzhe Chen, Yuqing Shi, Tianshu Zhang, Qiang Ju, and Lijie Wen. 2026. Do we really need external tools to mitigate hallucinations? sira: Shared-prefix internal reconstruction of attribution. arXiv preprint arXiv:2605.14621.
Lingfeng Ren, Weihao Yu, Runpeng Yu, and Xinchao Wang. 2026. Nolan: Mitigating object hallucinations in large vision-language models via dynamic suppression of language priors. arXiv preprint arXiv:2602.22144.
Tobias Scheffer, Christian Decomain, and Stefan Wrobel. 2001. Active hidden markov models for information extraction. In International symposium on intelligent data analysis, pages 309–318. Springer.
Timo Schick, Sahana Udupa, and Hinrich Schütze. 2021. Self-diagnosis and self-debiasing: A proposal for reducing corpus-based bias in nlp. Transactions of the Association for Computational Linguistics, 9:1408–1424.
Kaihua Tang, Yulei Niu, Jianqiang Huang, Jiaxin Shi, and Hanwang Zhang. 2020. Unbiased scene graph generation from biased training. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 3713–3722. IEEE.
Kaihua Tang, Jiaxin Qi, Jinli Ou, Yuhua Zheng, and Jianqiang Huang. 2026a. Scaling test-time robustness of vision-language models via self-critical inference framework. arXiv preprint arXiv:2603.07659.
Lexiang Tang, Weihao Gao, Bingchen Zhao, Lu Ma, Bang Yang, Yuexian Zou, et al. 2026b. Thinking by subtraction: Confidence-driven contrastive decoding for llm reasoning. arXiv preprint arXiv:2602.18232.
Prasetya Ajie Utama, Nafise Sadat Moosavi, and Iryna Gurevych. 2020. Mind the trade-off: Debiasing nlu models without degrading the in-distribution performance. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 8717–8729.
Peng Wang, Shuai Bai, Sinan Tan, Shijie Wang, Zhi-hao Fan, Jinze Bai, Keqin Chen, Xuejing Liu, Jialin Wang, Wenbin Ge, et al. 2024. Qwen2-vl: Enhancing vision-language model's perception of the world at any resolution. arXiv preprint arXiv:2409.12191.
Jianfei Zhao, Feng Zhang, Xin Sun, Lingxing Kong, Zhixing Tan, and Chong Feng. 2025. Cross-image contrastive decoding: Precise, lossless suppression of language priors in large vision-language models. arXiv preprint arXiv:2505.10634.
Zihao Zhao, Eric Wallace, Shi Feng, Dan Klein, and Sameer Singh. 2021. Calibrate before use: Improving few-shot performance of language models. In International conference on machine learning, pages 12697–12706. Pmlr.
A Implementation Details
On Qwen2-VL and LLaVA-NeXT, and are fitted separately for multiple-choice and open-ended items on the calibration split, since the two answer formats place the decision margin on different scales, a fixed set of option letters against a pool of the model's own generations. Based on the calibration results, we set to 3.25 and 5.03 for Qwen2-VL and LLaVA-NeXT. We set to 0.4 for multiple-choice and 0.5 for open-ended items on Qwen2-VL, and to 0.3 and 0.5 on LLaVA-NeXT. The commitment threshold is 0.625 for multiple-choice items on both backbones, and -0.22 on Qwen2-VL and 0.375 on LLaVA-NeXT for open-ended ones, where the negative value accepts residuals that leave the margin essentially unchanged. For experiments on the full distributions, the same procedure lowers to 0.5 and 2.0 and to 0.2, since most contested samples there are not prior-driven and the gate fires only on near-ties. The fit replays cached branch scores and costs no additional model passes. Pool candidates are the model's own short answers, collected once per sample by greedy decoding and scored by every view. All experiments run under PyTorch 2.6 on a single NVIDIA A100-80GB GPU.
B Proofs and Derivations
Fix a sample with base scores , let and be the runner-up, so the margin is . A corrector replaces by with prior estimate . Because only the top-two gap decides
Algorithm 1 The MAGIC correction pipeline.
1: 1 forward
2: if then gate the debiasing step
3:
4: replace with debiased state
5: end if
6: if then gate the restoration step
7: visual residual
8: if then commit
9: restore grounding
10: end if
11: end if
12: return valid after any gate
the answer, we write the signed corrections
so the correction flips the decision if and
only if .
B.1 Inertness of a Bounded Correction
Proof of Eq. (3). Let with and let be the top-two candidates of with . Then , and for any other candidate , . Hence and for . The same argument covers the additive restoration of Eq. (7) with in place of , and its per-sample form holds on 85.1% of the samples MAGIC skips on Qwen2-VL and 94.3% on LLaVA-NeXT. The debiasing step replaces the state rather than subtracting from it, so its gate is licensed by the measured utility curve of Figure 2 rather than by this bound. The bound is worst-case, so is fitted on the calibration set rather than computed from .
B.2 The Bias Floor and the Branch Budget
Proof of Eq. (8). With and , the cross term vanishes and
The first difference is , so a -th branch lowers the error iff , that is iff . The right side is positive and strictly decreasing in with limit 0. Each perturbation corrupts the input rather than marginalizing the prior, averaging does not reduce the bias, which the non-zero error floor of Figure 3 confirms. The left side is therefore nonnegative. The error never falls below and converges to at constant bias, and the marginal reduction of an added branch is at most , which vanishes. The floor and the budget are separate consequences, the first of the bias and the second of the vanishing return alone. Charging a fixed cost per branch on the same scale as the error, the net value of the -th branch is negative for every with . A finite optimum therefore exists even at , and its location is set by the encoder's together with any growth in the bias increments. That is the model-dependent budget the branch pruning of §3.4 estimates. Sweeping the branch count removes 4.37% of error on Qwen2-VL but only 0.57% on LLaVA-NeXT, so the variance above the floor is itself encoder-specific.
C Additional Analyses
C.1 Additional Case Studies
Figure 6 takes four samples that Figure 5 does not use and traces one through each exit of Algorithm 1. In (a) the base model separates yellow from the other colors by 8.50, the gate stays closed, and the sample costs one forward pass. In (b) the debiasing step alone moves the answer from Mercury to Venus and leaves a margin of 0.50, so the restoration step never runs. In (c) that step is not enough on its own, and the visual residual adds 1.78 to north and turns the answer over. In (d) the debiasing step has already repaired the answer and the residual would move it to sadness on a narrower margin, so the commitment test rejects it and the debiased answer stands. Panel (a) is drawn from the natural distribution, where the fitted is 0.5, because no sample the gate skips on the biased subsets is answered correctly by the base model.
C.2 Full Sensitivity Analysis
Table 7 reports the same sweep as Table 6 on both backbones. The pattern on LLaVA-NeXT matches Qwen2-VL: above the fitted value , the Overall column is flat, gaining at most as rises to 8, and the restoration gate moves BS Overall by while the mean pass count rises from 4.0 to 5.5.
C.3 Cost Analysis
A fired step costs what a perturbation branch costs, so cost is set by how often the gate fires rather than by a cheaper branch. On MMStar, where SCI reports its own overhead, the gate fires on about a quarter of the samples, and MAGIC spends 1.98 passes on Qwen2-VL and 3.47 on LLaVA-NeXT against 's five. On the biased subsets almost every sample is contested, and Table 8 reports the pass counts there. A scoring pass costs 915 ms on Qwen2-VL and 130 ms on LLaVA-NeXT, and a generation pass 1339 ms and 473 ms, measured on one A100-80GB at the deployed image budget. At those pass counts MAGIC takes 4.57 s per sample on Qwen2-VL against 4.58 s for and 6.41 s for , and 0.69 s on LLaVA-NeXT against 0.65 s and 0.91 s.
| Model | Value | MCQ | Others | Overall | Passes |
|---|---|---|---|---|---|
| Debiasing gate | |||||
| 0.5 | 18.81 | 29.30 | 21.84 | 3.0 | |
| 1.0 | 24.68 | 31.64 | 26.69 | 3.7 | |
| Qwen2-VL | 2.0 | 31.03 | 34.38 | 32.00 | 4.4 |
| 3.0 | 32.30 | 34.96 | 33.07 | 4.8 | |
| 5.0 | 32.38 | 35.74 | 33.35 | 5.0 | |
| 8.0 | 32.46 | 35.94 | 33.47 | 5.0 | |
| 0.5 | 21.36 | 45.73 | 27.31 | 2.7 | |
| 1.0 | 25.05 | 47.11 | 30.43 | 3.3 | |
| LLaVA-NeXT | 2.0 | 29.23 | 49.75 | 34.23 | 4.0 |
| 3.0 | 30.48 | 51.76 | 35.67 | 4.4 | |
| 5.0 | 31.13 | 52.01 | 36.22 | 4.7 | |
| 8.0 | 31.29 | 52.51 | 36.47 | 4.8 | |
| Restoration gate | |||||
| 0.0 | 30.32 | 33.59 | 31.26 | 4.0 | |
| 0.2 | 31.35 | 33.40 | 31.94 | 4.4 | |
| Qwen2-VL | 0.3 | 32.14 | 33.59 | 32.56 | 4.6 |
| 0.4 | 32.30 | 34.18 | 32.84 | 4.9 | |
| 0.6 | 32.46 | 35.16 | 33.24 | 5.1 | |
| 1.0 | 32.06 | 35.16 | 32.96 | 5.5 | |
| 0.0 | 30.48 | 52.39 | 35.83 | 4.0 | |
| 0.2 | 30.89 | 52.39 | 36.13 | 4.5 | |
| LLaVA-NeXT | 0.3 | 31.13 | 52.51 | 36.35 | 4.7 |
| 0.4 | 31.17 | 52.26 | 36.32 | 4.9 | |
| 0.6 | 31.25 | 51.88 | 36.29 | 5.1 | |
| 1.0 | 31.29 | 51.76 | 36.29 | 5.5 | |
Table 7: Sensitivity to the two allocation thresholds on the BS Subset of DRBench, on both backbones. We bold the best result in each column within a block.
| Method | Biased (BS) | Natural | ||
|---|---|---|---|---|
| MCQ | Others | MCQ | Others | |
| 5.0 | 5.0 | 5.0 | 5.0 | |
| 7.0 | 7.0 | 7.0 | 7.0 | |
| MAGIC (Qwen2-VL) | 5.0 | 4.5 | 1.5 | 2.8 |
| MAGIC (LLaVA-NeXT) | 4.9 | 4.2 | 2.4 | 2.5 |
Table 8: Average inference passes per sample.
C.4 Perturbation Invariance
Several recent methods are built on the assumption that perturbing the image puts the branch off-distribution, whether by moving the counterfactual inside the forward pass (Qin et al., 2026) or by replacing the perturbed branch with a cross-image one (Zhao et al., 2025). At the decision point we do not reproduce that premise, as Figure 7 shows. We replace the image with another real photograph rather than a corrupted one, drawn at random or retrieved by keyword from the question, and the branch still decides as it does on a blank image. What we measure is invariance at the decision rather than in the distribution, over replacements that do not answer the question.
(a) No gate opens — 1 forward pass

Question: what is the color of this object?
A. green B. red
C. blue D. yellow
Correct answer: D. yellow
| Stage | A | B | C | D | m |
|---|---|---|---|---|---|
| Base | -2.62 | -2.12 | -1.88 | 6.62 | 8.50 |
| Debiased | gate closed | ||||
| Residual | gate closed | ||||
| Final S | -2.62 | -2.12 | -1.88 | 6.62 | 8.50 |
Base → D √ The base already separates yellow from every other color by 8.50. Drawn from the natural distribution, where the fitted is 0.5.
Step 1: not run That , so the debiasing gate stays shut, no perturbation branch is built, and the state is still the one the base pass produced.
Step 2: not run The second gate reads that same 8.50, so there is no visual residual either and the sample leaves after one pass, the cost of the base model alone.
(c) Both gates open, residual commits — 7 passes

Question: What direction is Serbia in the Mediterranean Sea?
A. east B. south
C. west D. north
Correct answer: D. north
| Stage | A | B | C | D | m |
|---|---|---|---|---|---|
| Base | -0.74 | -2.24 | -3.12 | -0.99 | 0.25 |
| Debiased | 0.39 | 0.30 | -1.45 | 0.05 | 0.09 |
| Residual | -0.34 | -0.34 | -0.97 | 1.78 | |
| Final S | 0.05 | -0.04 | -2.42 | 1.83 | 1.78 |
Base → A × East leads north by 0.25 on a map that puts Serbia well above the sea, and that opens the debiasing gate on what is close to a tie.
Step 1 → A × Debiasing lifts the whole field but not the answer, leaving east ahead by 0.09. That opens the restoration gate.
Step 2 → D √ The residual adds 1.78 to north alone and moves the rest down. The margin widens by , so the step commits.
(b) One gate opens — 4 forward passes

Question: Which planet is depicted by label G?
A. Mars B. Venus
C. Earth D. Mercury
Correct answer: B. Venus
| Stage | A | B | C | D | m |
|---|---|---|---|---|---|
| Base | -3.11 | -0.98 | -1.86 | -0.86 | 0.12 |
| Debiased | -0.10 | 0.65 | 0.15 | 0.06 | 0.50 |
| Residual | gate closed | ||||
| Final S | -0.10 | 0.65 | 0.15 | 0.06 | 0.50 |
Base → D × Mercury leads Venus by 0.12, the narrowest base margin of the four samples here, and opens the gate on a barely-made decision.
Step 1 → B √ The contrast turns the answer over, from Mercury to Venus, and leaves a margin of 0.50, four times the 0.12 it started from and enough to settle the answer.
Step 2: not run That 0.50 clears by a tenth of a point, so the restoration gate stays shut and the sample leaves after 4 passes, three spent by the first step.
(d) Both gates open, residual declined — 7 passes

Question: Identify the emotion expressed in this image.
A. sadness B. anger
C. loneliness D. happiness
Correct answer: D. happiness
| Stage | A | B | C | D | m |
|---|---|---|---|---|---|
| Base | -1.98 | -6.85 | -0.35 | -1.85 | 1.50 |
| Debiased | 0.17 | -4.13 | 0.17 | 0.37 | 0.20 |
| Residual | 1.26 | -1.62 | -0.24 | 1.01 | |
| Final S | 0.17 | -4.13 | 0.17 | 0.37 | 0.20 |
Base → C × Loneliness leads happiness by 1.50, the widest base margin of the three biased samples here, and opens the debiasing gate.
Step 1 → D √ Debiasing already repairs the answer, but only by 0.20, and that opens the restoration gate on a sample that no longer needs it.
Step 2: rejected The residual would put sadness ahead by 0.05, narrower than the 0.20 it starts from. That gain of -0.15 is below , so the test discards it .
Figure 6: Four further Qwen2-VL samples, one per exit of Algorithm 1.

Figure 7: Random and keyword-matched replacements decide as a blank image does. The keyed-full condition answers the question and is the positive control.
C.5 Attribution Analysis
We examine whether the gain comes from the margin gate or from the two-step correction it fires. Table 9 compares MAGIC against the two adap- tive CD methods nearest to it, which already vary their correction per sample, and against a corrector that keeps our gate and nothing else. Neither VACoDe (Kim et al., 2024) nor CHASD (Huang et al., 2026) beats MAGIC on any cell. Keeping our gate but dropping the second contrast and the residual costs in BS Overall on Qwen2-VL and on LLaVA-NeXT, so the gate alone does not carry the gain either. Two further checks agree. Adding our gate to SCI's fusion leaves every prediction on the calibration set unchanged, and replacing the margin with maximum softmax probability (Hendrycks and Gimpel, 2016) or predictive entropy, at a matched firing rate, moves BS Overall by at most . What the gate measures therefore matters little, and the separation comes from the correction it fires.
Both baselines act token-by-token during generation, so each port keeps its selection rule and
| Method | Qwen2-VL | LLaVA-NeXT | ||
|---|---|---|---|---|
| S | BS | S | BS | |
| VACoDe-A (max contrast) | 46.91 | 22.28 | 40.99 | 26.78 |
| VACoDe-A (min contrast) | 38.55 | 32.20 | 31.09 | 29.38 |
| CHASD-A (uncertainty-gated) | 48.73 | 30.53 | 40.30 | 30.47 |
| gate only (blank contrast) | 45.35 | 29.29 | 39.52 | 30.00 |
| MAGIC | 48.73 | 32.30 | 40.99 | 31.13 |
Table 9: Our answer-level adaptations of the nearest adaptive-contrast methods, MCQ cells on the test split.
re-reads it over the candidate scores on the multiple-choice test split. VACoDe picks the corruption whose answer softmax is farthest from the original's and feeds it to the VCD operator, as its published rule prescribes. CHASD rebuilds its counterfactual from the regions its attention map marks as salient, which has no analogue over a fixed candidate set. Our port therefore drops that step and gates a noised-image contrast by predictive entropy, in place of its published maximum-probability threshold. The margin-gate-only row keeps our gate over a single blank contrast and drops the restoration step. Free constants are fitted on the calibration set MAGIC uses, over a grid that extends in the baseline-favoring direction.
D Prompt Templates
Table 10 lists the rephrasing pairs, matched on the instruction the benchmark itself issues.
| Instruction issued by the benchmark | Answer-format rephrasing |
|---|---|
| Please select the correct answer from the options above. | Return only the final option letter, with no explanation. |
| Please answer yes or no. | Return exactly one word: yes or no. |
| Answer the question using a single word or phrase. | Return only the final short answer, without a full sentence. |
| Answer the question directly. | Return only the final answer, without a full sentence. |
Table 10: The answer-format rephrasings the debiasing step contrasts against, one representative benchmark instruction per row. Variant wordings of the same instruction map to the same rephrasing.