面向位置公平的密集信息检索的注意力校准
Attention Calibration for Position-Fair Dense Retrieval
AI总结:
针对密集检索模型的位置偏差问题,提出在推理时通过注意力校准(引入强度系数λ插值原始与完全校准分布)来提升位置公平性,无需重新训练且不牺牲整体检索效果,在多个数据集和模型上验证了部分校准优于完全校准,并提供了默认配置。
摘要:
密集检索模型存在位置偏差:当相关信息出现在段落较后位置时,检索效果会下降(Zeng et al., 2025)。我们探究是否可以在推理时减少这种偏差,无需重新训练且不牺牲整体检索效果。为此,我们将推理时的注意力校准(Schuhmacher et al., 2026)适配到下游检索,并引入强度系数λ,在原始注意力分布和完全校准的注意力分布之间进行插值。在SQuAD-PosQ和FineWeb-PosQ上的三个嵌入模型上,我们考察了篮子大小、校准层集和强度如何影响位置公平性与检索效果之间的权衡,发现部分校准通常优于完全校准。单个配置(B=128, λ=0.5, 50%层深度)在FineWeb-PosQ上提升了所有三个模型跨位置组的nDCG@10的调和平均值,无需逐模型调参,并且适用于<s>-池化和最后token池化两种架构。该默认配置无需修改即可迁移到PosIR(涵盖10种语言和31个领域),在所有16种长度四分位×模型×检索设置组合中降低了位置敏感指数,同时保持或提升了整体nDCG@10。我们在以下网址发布扩展后的代码库:this https URL
英文摘要:
Dense retrieval compresses a passage into a single vector, but this compression is positionally skewed: early content dominates the embedding, and retrieval degrades when the relevant span appears later. Prior work proposed an inference-time method that counteracts this skew by equalizing the pooling token's attention across passage segments. However, (i) it redistributes attention at a fixed strength, (ii) it forces the pooling token's attention to itself to a fixed basket-level mass despite substantial variation across layers and architectures, and (iii) its effect on retrieval has not been evaluated. We introduce a strength coefficient that interpolates between uncalibrated and fully equalized attention, together with an efficient implementation that reduces peak calibration memory overhead from 5-7 GiB to under 1 MiB. Across three embedding models and two pooling schemes, moderate calibration provides a better retrieval trade-off than full equalization. We introduce a variant that preserves the pooling token's self-attention mass and redistributes only the remaining mass. On a position-aware retrieval benchmark spanning 10 languages and 31 domains, a configuration selected on English FineWeb-PosQ and transferred without tuning reduces position sensitivity in all 16 evaluated length-quartile, model, and retrieval-setting combinations, by up to 43% relative, while improving nDCG@10 by up to 4.8% relative and leaving general retrieval effectiveness on NanoBEIR essentially unchanged. Calibration runs at indexing time, adding no query-time latency. We release our code at github.com/impresso/fair-sentence-transformers
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。