Kaijing Ma

Beyond Logits: Coherent Hallucination Mitigation via Attention Contrastive Decoding

Original note, sentence-aligned / 原创笔记逐句对照。Not a full-paper translation / 不是论文全文翻译。

English / 中文 · Source / 原文

Move the subtraction inside the forward pass

将减法移到前向计算内部

The official ICML page identifies this paper as Beyond Logits: Coherent Hallucination Mitigation via Attention Contrastive Decoding.

ICML 官方页面确认论文正式标题为 Beyond Logits: Coherent Hallucination Mitigation via Attention Contrastive Decoding。

This note uses the PMLR 306 proceedings PDF, linked to the same OpenReview record.

本笔记使用 PMLR 306 的正式论文集 PDF,它链接至同一 OpenReview 记录。

The method compares clean and hallucination-inducing attention patterns rather than subtracting the final vocabulary logits.

方法比较干净输入与诱发幻觉输入的注意力模式,而不是减去最终词表 logit。

The intended benefit is to let the remaining network transform the intervention into a coherent output distribution.

其预期优势是让后续网络将干预转化为连贯的输出分布。

Adaptive subtraction

自适应减法

Let A_c and A_n be attention weights for clean and perturbed inputs at the same aligned positions.

令 A_c、A_n 表示干净输入与扰动输入在同一对齐位置上的注意力权重。

A uniform contrast would use (1 + α)A_c − αA_n.

均匀对比会使用 (1 + α)A_c − αA_n。

The adaptive strategy subtracts the noisy weight only where it exceeds the clean weight.

自适应策略只在噪声权重大于干净权重的位置减去噪声项。

M_i = 1{A_n,i > A_c,i}; A_ACD = (1 + α)A_c − α(A_n ⊙ M)

When M_i is zero, the clean weight is amplified without the subtraction term.

当 M_i 为零时,干净权重直接放大,不含减法项。

When M_i is one, the update suppresses an attention component increased by the perturbation.

当 M_i 为一时,更新会压低被扰动增强的注意力分量。

The values then aggregate through this modified attention within the decoder.

随后,value 通过这一修改后的注意力在解码器中聚合。

The displayed arithmetic can produce negative entries and need not sum to one.

展示的算术可能产生负分量,且不必和为一。

Consequently the modified weights must not be presented as an ordinary probability distribution or as guaranteed semantic evidence.

因此,不应将修改后的权重展示为普通概率分布,或视作有保证的语义证据。

The paper's smoothness motivation is a hypothesis about the intervention location, not a proof of preserved coherence.

论文的平滑性动机是关于干预位置的假设,而不是连贯性保留的证明。

What X + ACD means

X + ACD 的实际含义

Section 4.1 states that X + ACD retains X's hallucination-inducing construction but replaces its logit subtraction and plausibility filter.

第 4.1 节说明,X + ACD 保留 X 构造诱发幻觉分支的方法,但替换其 logit 减法和合理性筛选。

It should not be implemented as an unexamined stacking of two independent contrastive corrections.

不应未经核对就将它实现为两个独立对比修正的叠加。

ICD integration requires matching prompt lengths to align attention positions.

与 ICD 结合时,需要匹配提示词长度,以对齐注意力位置。

The default applies the operation across decoder layers and heads.

默认设置将该操作应用于解码器各层与各注意力头。

Evidence and limitations

证据与局限

On LLaVA-1.5 in Table 1, VCD's instance-level CHAIR decreases from 16.2 to 14.3 with ACD, while recall increases from 76.8 to 78.3.

表 1 中,LLaVA-1.5 的 VCD 实例级 CHAIR 在加入 ACD 后从 16.2 降至 14.3,召回率从 76.8 升至 78.3。

For SID the corresponding figures are 14.1 to 13.3 and 78.2 to 79.4.

SID 对应数值分别为 14.1 降至 13.3、78.2 升至 79.4。

These are benchmark-specific percentages, not guarantees for arbitrary images or reasoning tasks.

这些是特定基准的百分数,而非对任意图像或推理任务的保证。

The evaluation includes Qwen-VL, POPE, MME, and judge-based LLaVA-Bench comparisons.

评估还包含 Qwen-VL、POPE、MME 和使用评判模型的 LLaVA-Bench 比较。

A useful reproduction should compare against the same sampling and candidate-filter settings and report malformed outputs separately from hallucinations.

有价值的复现应使用一致的采样和候选筛选设置,并将格式损坏输出与幻觉分开报告。

Noise-induced attention changes are proxies; high attention on a location does not alone establish that the associated content is false.

噪声引起的注意力变化属于代理信号;某位置注意力较高本身不能证明相关内容是假的。

The author code is linked as jj-ccc/ACD.

作者代码链接为 jj-ccc/ACD。