One email each morning — yesterday's AI, sortedGet it in your inbox

METAL LAB

When Irrelevant Text Matters: Affine Margin Shifts in Multimodal Large Language Models

arXiv:2608.192082026-08-21

Slipping an irrelevant sentence into a prompt shifts multimodal AI answers in a predictable, formula-like way

Researchers tested what happens when a sentence completely unrelated to an image and question is inserted into prompts for multimodal large language models (MLLMs). They found that the gap between 'yes' and 'no' answer probabilities doesn't scatter randomly but instead shifts following a consistent straight-line (affine) formula. Using this pattern, they built a simple after-the-fact correction that can partly undo the distortion.

What they did

  1. The team ran experiments on yes/no visual benchmarks (POPE, AMBER, MME, GQA) using LLaVA-1.5-7B, the Qwen2-VL family (2B and 7B), and InternVL3-8B, inserting unrelated WikiText sentences after the question.
  2. They defined a 'decision margin' as the log-probability gap between the 'Yes' and 'No' answers, and found that the margin after adding irrelevant text (mc) closely follows mc≈a·m0+b relative to the original margin (m0), fitting with high R² across models and datasets.
  3. Framing the irrelevant text as 'possibly related to the image' sharply lowered the slope (a), meaning the model's original visual judgment was more distorted, while the offset (b) stayed consistently negative, pushing answers toward 'No.'
  4. Samples whose original margin was close to zero (i.e., borderline cases) flipped their answer far more often than confident ones; reversing the fitted affine formula largely restored accuracy and F1 on held-out data and cut the flip rate substantially.
  5. In open-ended image description tasks, adding irrelevant text made models describe only the most salient objects while dropping mentions of peripheral objects, producing shorter and more conservative captions.
Figure 1: Overview of the controlled intervention and its behavioral effects. (a) For each image-question pair, we compare a context-free input with a paired context-conditioned input, where an irrelevant context is inserted while the prompt structure is kept unchanged. (b) Across multiple benchmarks, irrelevant context not only reduces predictive accuracy, but also shifts model decisions toward negative responses.
Figure 1: Overview of the controlled intervention and its behavioral effects. (a) For each image-question pair, we compare a context-free input with a paired context-conditioned input, where an irrelevant context is inserted while the prompt structure is kept unchanged. (b) Across multiple benchmarks, irrelevant context not only reduces predictive accuracy, but also shifts model decisions toward negative responses.
Table 1: Behavioral effects of image-irrelevant context across datasets and models. Irrelevant context generally degrades performance, induces a negative-response shift, and has stronger effects when presented as potentially image-related. Free indicates the context-free condition, while ΔNeu. and ΔCon. report changes under the context-neutral and context-condition setting relative to context-free condition. Yes Rate reports the proportion of positive responses among all answers, indicating the model’s tendency toward affirmative predictions. Flip Rate reports the percentage of samples whose prediction changes. All values are reported in percentage points.
DatasetModelAccuracyRecallYes RateFlip Rate
FreeΔNeu.ΔCon.FreeΔNeu.ΔCon.FreeΔNeu.ΔCon.Neu.Con.
MMELLaVA-1.5-7B78.5↑0.1\cellcolorgray!10↓0.980.5↓7.9\cellcolorgray!10↓8.451.9↓7.9\cellcolorgray!10↓7.49.0\cellcolorgray!109.8
Qwen2-VL-2B79.9↓10.6\cellcolorgray!10↓20.880.5↓24.6\cellcolorgray!10↓40.848.7↓16.8\cellcolorgray!10↓26.420.5\cellcolorgray!1033.4
Qwen2-VL-7B87.6↑0.2\cellcolorgray!10↓27.590.6↓2.6\cellcolorgray!10↓69.552.7↓2.8\cellcolorgray!10↓41.74.3\cellcolorgray!1042.0
InternVL387.9↓3.1\cellcolorgray!10↓3.785.3↓9.9\cellcolorgray!10↓10.547.3↓7.0\cellcolorgray!10↓7.07.8\cellcolorgray!107.9
GQALLaVA-1.5-7B76.4→0.0\cellcolorgray!10↓1.976.4↑2.2\cellcolorgray!10↑7.050.7↑2.3\cellcolorgray!10↑9.17.6\cellcolorgray!1014.3
Qwen2-VL-2B79.2↓6.3\cellcolorgray!10↓6.276.1↓20.1\cellcolorgray!10↓18.447.6↓14.3\cellcolorgray!10↓12.616.0\cellcolorgray!1015.6
Qwen2-VL-7B82.2↓1.4\cellcolorgray!10↓19.878.7↓2.8\cellcolorgray!10↓48.347.4↓1.6\cellcolorgray!10↓29.93.9\cellcolorgray!1030.0
InternVL381.9↓1.5\cellcolorgray!10↓2.085.1↓4.3\cellcolorgray!10↓6.154.2↓2.9\cellcolorgray!10↓4.28.0\cellcolorgray!109.4
AMBERLLaVA-1.5-7B81.2↓0.3\cellcolorgray!10↓1.364.8↓2.4\cellcolorgray!10↓2.328.8↓1.3\cellcolorgray!10↓2.96.3\cellcolorgray!105.7
Qwen2-VL-2B85.3↓0.7\cellcolorgray!10↓4.978.5↓9.8\cellcolorgray!10↓21.633.9↓5.9\cellcolorgray!10↓10.87.2\cellcolorgray!1012.3
Qwen2-VL-7B86.9↑0.5\cellcolorgray!10↓9.481.2↓2.0\cellcolorgray!10↓43.134.1↓1.8\cellcolorgray!10↓19.72.9\cellcolorgray!1019.7
InternVL388.3↑0.5\cellcolorgray!10↑0.185.7↓4.7\cellcolorgray!10↓6.035.8↓3.7\cellcolorgray!10↓4.25.6\cellcolorgray!106.0
POPELLaVA-1.5-7B85.5↓0.7\cellcolorgray!10↓0.376.6↓2.4\cellcolorgray!10↓0.941.4↓1.8\cellcolorgray!10↓0.62.3\cellcolorgray!102.3
Qwen2-VL-2B87.8↓1.8\cellcolorgray!10↓2.079.6↓4.5\cellcolorgray!10↓5.142.1↓2.8\cellcolorgray!10↓3.23.3\cellcolorgray!103.6
Qwen2-VL-7B88.3↓1.3\cellcolorgray!10↓8.481.1↓3.4\cellcolorgray!10↓19.843.1↓2.1\cellcolorgray!10↓11.62.6\cellcolorgray!1011.6
InternVL390.9↓0.8\cellcolorgray!10↓0.390.7↓5.3\cellcolorgray!10↓3.950.2↓4.5\cellcolorgray!10↓3.64.8\cellcolorgray!104.1
Figure 2: Illustration of the margin-level analysis. (a) The decision margin is defined as the log-probability difference between the positive and negative answers. (b) Adding irrelevant context transforms the context-free margin m0 into the context-conditioned margin mc, which follows an approximate affine relation mc≈a​m0+b. (c) The affine transformation shifts the effective decision boundary from m0=0 to m0=−b/a. This shift expands the Negative Region and compresses the Positive Region. As a result, samples in the Flip Region, i.e., 0<m0<−b/a, are likely to change from positive to negative predictions, inducing a systematic shift in decision preference.
Figure 2: Illustration of the margin-level analysis. (a) The decision margin is defined as the log-probability difference between the positive and negative answers. (b) Adding irrelevant context transforms the context-free margin m0 into the context-conditioned margin mc, which follows an approximate affine relation mc≈a​m0+b. (c) The affine transformation shifts the effective decision boundary from m0=0 to m0=−b/a. This shift expands the Negative Region and compresses the Positive Region. As a result, samples in the Flip Region, i.e., 0<m0<−b/a, are likely to change from positive to negative predictions, inducing a systematic shift in decision preference.
Table 2: Fitted affine parameters across models and benchmarks. The affine relationship exhibits consistently high goodness of fit, indicating that such affine is structural and stable.
ModelDatasetabR2r
LLaVA-1.5-7BPOPE0.55-1.050.900.95
AMBER0.52-1.150.790.89
MME0.54-1.080.830.91
GQA0.48-0.920.740.86
Qwen2-VL-2BPOPE0.56-1.580.860.93
AMBER0.59-1.610.860.93
MME0.56-1.130.740.86
GQA0.62-1.550.780.88
Figure 3: Visualization of three input conditions. These three conditions represent different degrees to which the irrelevant context is framed as potentially image-related.
Figure 3: Visualization of three input conditions. These three conditions represent different degrees to which the irrelevant context is framed as potentially image-related.
Table 3: In-domain post-hoc affine calibration under WikiText-after-possibly context. Affine parameters are fitted on calibration splits and evaluated on held-out test splits. We report the Accuracy and Flip rate with percentage.
DatasetOriginCon.Cal.Con. FlipCal. Flip
POPE86.178.084.616.66.1
AMBER82.774.979.729.213.6
MME78.768.576.530.212.6
GQA73.269.272.336.314.8
Figure 4: Affine margin patterns for LLaVA-1.5-7B across four benchmarks. Each panel plots the context-free margin mo against the context-conditioned margin mc. Points are colored by prediction transitions between the two conditions, and the solid line shows the fitted affine relation mc=a​mo+b; the dashed line denotes the identity relation mc=mo. The consistently high R2 and correlation values indicate that textual context induces a structured affine transformation of the original decision margin rather than unstructured perturbations. Notably, changing the semantic framing from Neutral to Condition substantially decreases the fitted slope a, while leaving the negative offset b largely stable. Results are shown for LLaVA.
Figure 4: Affine margin patterns for LLaVA-1.5-7B across four benchmarks. Each panel plots the context-free margin mo against the context-conditioned margin mc. Points are colored by prediction transitions between the two conditions, and the solid line shows the fitted affine relation mc=a​mo+b; the dashed line denotes the identity relation mc=mo. The consistently high R2 and correlation values indicate that textual context induces a structured affine transformation of the original decision margin rather than unstructured perturbations. Notably, changing the semantic framing from Neutral to Condition substantially decreases the fitted slope a, while leaving the negative offset b largely stable. Results are shown for LLaVA.
Table 4: Cross-dataset affine calibration transfer result. Affine parameters are fitted on POPE and directly applied to other benchmarks without target calibration samples. We report the Accuracy and Flip rate with percentage.
DatasetOriginCon.Cal.Con. FlipCal. Flip
AMBER82.775.080.129.114.7
MME78.768.576.630.412.8
GQA73.269.371.736.213.1
Figure 6: Experiment results for Validating the Parameter Interpretation. Points are colored by ground-truth label. Arrows show the mean label-conditioned margin shift from the identity line to the observed context-conditioned mean. The monotonic trend asup>airr>aconf is consistent with the interpretation of a as commitment preservation.
Figure 6: Experiment results for Validating the Parameter Interpretation. Points are colored by ground-truth label. Arrows show the mean label-conditioned margin shift from the identity line to the observed context-conditioned mean. The monotonic trend asup>airr>aconf is consistent with the interpretation of a as commitment preservation.
Table 5: Absolute behavioral metrics across tested models and benchmarks. Free denotes context-free input, Neutral denotes WikiText-after-neutral, and Condition denotes WikiText-after-possibly. Part (b) reports the original-style MME score.
ModelDatasetFreeNeutralCondition
AccF1Rec.Prec.AccF1Rec.Prec.AccF1Rec.Prec.
LLaVA-1.5-7BPOPE85.584.276.693.584.883.274.294.685.283.875.793.8
LLaVA-1.5-7BAMBER81.269.864.875.880.968.762.476.579.969.267.171.4
LLaVA-1.5-7BMME78.578.980.577.478.677.272.682.577.676.372.181.0
LLaVA-1.5-7BGQA-Binary76.476.976.477.576.477.478.676.374.577.183.471.7
Qwen2-VL-2BPOPE87.886.879.695.586.084.575.196.485.884.174.596.7
Qwen2-VL-2BAMBER85.378.378.578.184.675.168.782.780.466.256.979.1
Qwen2-VL-2BMME79.980.180.579.669.364.655.976.459.149.339.765.0
Qwen2-VL-2BGQA-Binary79.279.076.182.172.968.056.086.673.068.757.784.9
Qwen2-VL-7BPOPE88.387.581.195.087.085.877.795.779.975.561.398.4
Qwen2-VL-7BAMBER86.980.781.280.287.480.979.282.777.553.338.188.8
Qwen2-VL-7BMME87.688.090.685.587.887.888.087.760.134.621.195.4
Qwen2-VL-7BGQA-Binary82.282.078.785.580.880.375.985.262.445.430.489.6
InternVL3POPE90.991.090.791.390.189.785.494.490.690.386.894.1
InternVL3AMBER88.383.185.780.688.882.981.084.988.482.279.784.9
InternVL3MME87.987.685.390.084.883.275.492.784.282.674.892.1
InternVL3GQA-Binary81.982.985.180.880.480.980.881.079.980.279.081.4
Figure 7: The affine transformation results across all models and benchmarks.
Figure 7: The affine transformation results across all models and benchmarks.
Table 6: In-domain post-hoc affine calibration under WikiText-after-possibly context. Affine parameters are fitted on calibration splits and evaluated on held-out test splits. Values are percentages averaged over five splits. Flip is relative to Origin predictions.
ModelDatasetOrigin Acc.Context Acc.Cal. Acc.Origin F1Context F1Cal. F1Context FlipCal. Flip
LLaVA-1.5-7BPOPE86.178.084.685.672.683.216.66.1
LLaVA-1.5-7BAMBER82.774.979.777.547.371.029.213.6
LLaVA-1.5-7BMME78.768.576.579.256.576.430.212.6
LLaVA-1.5-7BGQA-Binary73.269.272.377.763.575.836.314.8
Figure 8: Residual diagnostics for the affine fit under the WikiText-after-possibly context. Columns denote benchmarks and rows denote models. Each point is a sample residual mc−(a​m0+b); the red curve is the binned mean residual. All panels use shared symmetric axes so that residual dispersion is directly comparable.
Figure 8: Residual diagnostics for the affine fit under the WikiText-after-possibly context. Columns denote benchmarks and rows denote models. Each point is a sample residual mc−(a​m0+b); the red curve is the binned mean residual. All panels use shared symmetric axes so that residual dispersion is directly comparable.
Table 7: Cross-dataset affine calibration transfer on LLaVA-1.5-7B under WikiText-after-possibly context. Source-fitted parameters are applied directly to the target benchmark without target calibration samples. Values are percentages.
SourceTargetOrigin Acc.Cal. Acc.Origin F1Cal. F1Origin FlipCal. Flip
POPEAMBER75.080.147.770.329.114.7
POPEMME68.576.656.476.230.412.8
POPEGQA-Binary69.371.763.675.936.213.1
AMBERPOPE78.285.272.884.016.55.2
AMBERMME68.576.556.477.030.412.4
AMBERGQA-Binary69.370.363.675.636.212.0
MMEPOPE78.284.972.883.616.55.6
MMEAMBER75.080.247.770.929.114.1
MMEGQA-Binary69.371.063.675.736.212.4
GQA-BinaryPOPE78.284.372.882.516.57.2
GQA-BinaryAMBER75.079.947.768.429.116.4
GQA-BinaryMME68.576.256.474.830.414.0
Figure 9: A case of our open-ended generation experiment. We use the green mask to indicate the region covered by the model’s prediction under the context-condition setting. After adding irrelevant context, the model tends to describe only salient objects in the image, while peripheral objects are no longer mentioned.
Figure 9: A case of our open-ended generation experiment. We use the green mask to indicate the region covered by the model’s prediction under the context-condition setting. After adding irrelevant context, the model tends to describe only salient objects in the image, while peripheral objects are no longer mentioned.
Table 8: Prompt, template, length, and source ablations on POPE with LLaVA-1.5-7B. Acc, Recall, YesRate, and Flip are reported in percentages.
GroupVariantabR2AccRecallFlip
Position/templateWiki before + possibly0.726-0.0410.94386.482.83.7
Wiki after + possibly0.554-1.0460.89678.257.816.5
Wiki before + neutral0.7550.0840.94986.282.73.7
Wiki after + neutral0.706-1.2430.92180.161.614.5
Template onlyAfter + possibly0.583-0.9100.94480.863.313.5
After + neutral0.819-0.4550.97685.174.36.7
LengthShort Wiki0.699-0.0000.94086.382.44.1
Medium Wiki0.726-0.0410.94386.482.83.7
Long Wiki0.743-0.1500.93486.382.24.2
Source/shuffleShuffled Wiki0.7960.0370.96586.782.83.2
COCO caption before0.6170.1920.89685.784.76.0
COCO caption after0.475-1.2040.89274.249.720.7
Table 9: Label-verbalization controls on POPE with LLaVA-1.5-7B. For each verbalizer pair, margins score the semantically affirmative token against the negative token. Behavioral metrics and Flip are percentages; affine quantities are fitted between Origin and each context condition.
VerbalizerConditionAccF1YesRateFlipabR2r
Yes/NoOrigin86.486.147.1
Neutral73.564.724.722.40.481-1.2290.8540.924
Possibly75.368.026.820.40.384-0.8710.8360.914
True/FalseOrigin85.684.744.1
Neutral80.982.558.716.50.6000.5870.7910.889
Possibly62.572.786.642.60.5101.1240.7470.864
Table 10: Natural verbalizer control on AMBER discriminative with LLaVA-1.5-7B using True/False. Behavioral metrics and Flip are reported in percentages.
ConditionAccYesFlipabR2
Origin77.426.9
Neutral68.858.732.90.580.610.66
Possibly48.484.257.40.471.040.57
Table 11: Context-role intervention on POPE with LLaVA-1.5-7B. Δ​m+ and Δ​m− denote the mean shift mc−m0 for ground-truth Yes and No samples, respectively.
ContextabR2Δ​m+Δ​m−
Irrelevant0.554-1.0460.896-1.960.16
Supporting0.626-0.2870.873-0.940.61
Conflicting0.367-1.2280.869-2.630.59
Table 12: Context-only prior subtraction on POPE with LLaVA-1.5-7B. We report the affine fit between m0 and the prior-subtracted margin msub=mc−mprior. Acc, F1, YesRate, and Flip are reported in percentages.
ContextPrior estimatorabR2rAccF1YesRateFlip
neutralcontext-only blank0.705-0.8720.8980.94881.778.534.511.4
neutralquestion+context blank0.7001.8940.9040.95179.782.464.919.1
neutralcontext-only same image0.705-0.6530.9020.95082.780.035.910.0
possiblycontext-only blank0.552-0.2330.8680.93283.381.338.58.2
possiblyquestion+context blank0.5491.5990.8720.93475.579.770.024.3
possiblycontext-only same image0.5510.1030.8620.92884.883.541.96.4
Table 13: Nested margin-model comparison on POPE with LLaVA-1.5-7B. The context variant is WikiText-after-neutral. Fit metrics evaluate mc prediction on held-out samples. Calibration metrics evaluate the corrected margin as a binary prediction.
ModelR2MAEFlip F1Calib AccCalib F1Calib Flip
Identity0.5221.3370.0000.8000.7560.145
Shift-only0.7600.9340.7110.8540.8410.054
Scale-only0.6421.2540.0000.8000.7560.145
Full affine0.9200.5180.8490.8550.8420.050
Table 14: Local margin analysis under WikiText-after-possibly. For each model and dataset, we report the global affine fit and the flip rate within low-, mid-, and high-margin regions. Flip rates are percentages.
ModelDatasetGlobal aGlobal R2Trim R2Low FlipMid FlipHigh Flip
LLaVAPOPE0.5540.8960.89942.26.40.1
LLaVAAMBER0.5250.7860.78552.431.62.6
LLaVAMME0.5420.8300.80552.133.05.3
LLaVAGQA0.4760.7430.69156.342.39.6
Qwen2-2BPOPE0.5570.8590.84142.615.43.1
Qwen2-2BAMBER0.5920.8630.84846.018.73.0
Qwen2-2BMME0.5610.7400.73042.821.75.9
Qwen2-2BGQA0.6150.7750.75053.633.05.5
Table 15: Random-context-seed robustness on POPE with LLaVA-1.5-7B under the WikiText-after-possibly condition. Behavioral metrics and Flip are reported in percentages.
SeedabR2r
130.5541-1.04410.89680.9470
210.5536-1.04920.89520.9461
Mean0.5539-1.04660.89600.9466
Std.0.00030.00360.00120.0006
Table 16: GQA-Judgment behavior and affine fit for LLaVA under the WikiText-after-possibly context. Origin accuracy is evaluated without irrelevant context, while context metrics are evaluated after inserting irrelevant context.
Affine FitBehavior
MetricValueMetricValue
Slope a0.336Origin Acc.81.3
Intercept b-1.377Context Acc.61.6
R20.580Context F140.4
Pearson r0.762Yes Rate14.5
Flip Rate32.1
Table 17: AMBER generative evaluation with LLaVA-1.5-7B. Free and Condition denote context-free and context-conditioned generation, respectively. Hal., Cov., Cog., and Len. denote hallucination rate, object coverage, cognitive error, and average output length.
SettingCHAIR ↓Cov. ↑Hal. ↓Cog. ↓Len.
Free7.949.433.34.068.1
Condition3.839.39.50.716.1

Why it matters

In real deployments, chatbots and retrieval-augmented systems often mix in unrelated documents or chat history alongside images, and this work shows for the first time that such noise skews visual judgments in a quantifiable, predictable way rather than randomly. That makes it possible to diagnose and partially correct this bias, which matters for building more trustworthy multimodal AI products.

Terms in this paper

  • MLLM (multimodal large language model) · an AI model that jointly processes images and text to answer questions or generate descriptions
  • decision margin · the log-probability difference between two candidate answers (e.g., Yes vs. No), indicating how confidently the model favors one
  • affine transformation · a straight-line formula of the form y=ax+b that scales and shifts an original value
  • flip rate · the percentage of samples whose predicted answer changes after irrelevant context is added
  • post-hoc calibration · a correction applied to model outputs after inference, without retraining the model itself

Figures we cannot republish

  • Figure 5: Flip rate across context-free margin bins. Samples with smaller |m0| are much more likely to change their predictions after adding irrelevant context. This indicates that context-induced flips are concentrated near the original decision boundary.
See the figures in the original paper →

Original abstract (English)

Multimodal large language models (MLLMs) are frequently exposed to auxiliary textual context, the impact of which on visually grounded tasks remains underexplored. In this paper, we investigate the influence of task-irrelevant context by formulating it as a controlled intervention within a binary visual judgment framework. By maintaining an invariant prompt structure while varying auxiliary inputs, we observe that irrelevant text consistently biases model predictions across diverse benchmarks. To move beyond performance metrics, we characterize this sensitivity through a decision margin defined by the log-probability difference between binary candidates. Our analysis reveals a robust geometric regularity: contextconditioned margins follow a consistent affine transformation of their context-free counterparts. This finding demonstrates that irrelevant context does not manifest as unstructured stochastic noise but as a estimable distortion of model preference. We further interpret the fitted affine parameters as metrics for visual commitment preservation and directional answer bias. These findings provide a margin-level diagnostic view of irrelevant-context effects in MLLMs and offer a basis for future studies on noisy-context robustness

Authors · Yinfeng Wang, Zhiyuan Yao, Zheren Fu, Lei Zhang, Zhendong Mao

Read on arXiv

Latest papers

All papers →

Latest from METAL LAB

Figures: Yinfeng Wang et al., arXiv:2608.19208, CC BY 4.0