arXiv:2610.32013cs.CVOct 2026

Manuscript Offprint

arXiv:2610.32013

MAGIC: Margin-gated Contrastive Debiasing with Evidence Restoration for VLM Test-time Robustness Scaling

Shunshun Gu, Enze Zhang, Ming Pei, Hang Zhou, Xiao Luo

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.

References (31)