每天早上一封邮件,把昨天的 AI 梳理好订阅邮件

METAL LAB

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

arXiv:2608.192082026-08-21

只插一句和图片无关的话,多模态AI的判断就会按固定规律偏移

研究团队测试了在图片和问题之外插入一句完全无关的文字后,多模态大语言模型(MLLM)会发生什么变化。结果发现,模型对正确答案的把握程度(决策边际)并不是随机波动,而是遵循一种稳定的一次函数式变换。基于这一规律,他们还设计了一种无需重新训练模型的事后校正方法。

他们做了什么

  1. 研究者在POPE、AMBER、MME、GQA等只需回答是/否的视觉基准上,对LLaVA-1.5-7B、Qwen2-VL(2B和7B)、InternVL3-8B等模型,在问题后插入与图片无关的WikiText句子进行实验。
  2. 他们把模型对'是'和'否'两个答案的对数概率之差定义为'决策边际',发现插入无关文本后的边际mc与原始边际m0之间近似满足mc≈a·m0+b的一次函数关系,且在多个模型和数据集上拟合优度(R²)都很高。
  3. 如果把无关文本包装成'可能与图片相关'的说法,拟合出的斜率a会明显变小,说明模型原本的视觉判断被更强烈地扰乱;而截距b则始终为负且大小相对稳定,表明答案被系统性地推向'否'。
  4. 原始边际接近于零(即判断本就模糊)的样本,在加入无关文本后答案被'翻转'的比例远高于判断本就坚定的样本;利用拟合出的一次函数关系反向校正后,模型在测试集上的准确率和F1值大幅恢复,翻转率也明显下降。
  5. 在开放式图片描述任务中,加入无关文本会让模型只描述图中最显眼的物体,而忽略边缘或次要物体,生成的描述变得更短、更保守。
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

为什么重要

在实际应用中,聊天机器人或检索增强系统经常会把无关的文档、对话历史等文字和图片一起输入模型,这项研究首次证明这类无关文字会以可量化、可预测的方式扭曲视觉判断,而非单纯造成随机噪声。这为诊断和部分修正此类偏差提供了具体方法,对打造更可信的多模态AI产品具有参考价值。

本文术语

  • MLLM(多模态大语言模型) · 能够同时理解图片和文字并作答的人工智能模型
  • 决策边际 · 模型对两个候选答案(如是/否)的对数概率之差,反映其倾向和把握程度
  • 一次函数变换(仿射变换) · 形如y=ax+b的变换,对原始数值先按比例缩放再整体平移
  • 翻转率 · 加入无关文本前后,模型给出的答案(是/否)发生改变的样本比例
  • 事后校正 · 在不重新训练模型的前提下,对推理结果进行数学修正的方法

无法转载的图表

  • 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.
在原文中查看图表 →

论文原文摘要(英文)

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

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

在 arXiv 阅读

最新论文

全部论文 →

METAL LAB 最新报道

图片来源: Yinfeng Wang et al., arXiv:2608.19208, CC BY 4.0