使用可训练前缀标记减少检索嵌入中的表示干扰

·

研究论文 · 2026/11/06

嵌入模型将变长文本压缩为固定大小的向量表示,但这种压缩可能将语义内容与残留的token级信息(如注意力汇行为产生的伪影)纠缠在一起。我们提出一种简单方法:在嵌入模型训练时,在输入前添加可训练的[DUMP] token。该方法保持模型架构、池化策略和训练损失不变,通过标准对比检索目标优化添加的token。通过引入与常规token在编码过程中交互的可训练前缀位置,[DUMP] token有助于减少残留或无信息token级信号对最终检索表示的影响。在标准检索和长上下文基准上的实验表明,我们的方法在编码器和解码器嵌入模型上均持续优于微调基线。进一步分析显示,[DUMP] token改变了与低信息token相关的token级激活和注意力模式。这些结果表明,可训练前缀token提供了一种轻量级方法来改进检索表示。

该论文提出了一种简单且轻量的方法,在不改变模型架构和训练损失的情况下,通过可训练前缀token减少嵌入中的表示干扰,并在多个基准上验证了有效性,对嵌入模型的研究和应用具有参考价值。

Embedding models compress variable-length text into fixed-size vector representations, but this compression can entangle semantic content with residual token-level information, such as artifacts arising from attention sink behavior. We propose a simple method that prepends trainable [DUMP] tokens to the input during embedding model training. The method keeps the model architecture, pooling strategy, and training loss unchanged, while optimizing the added tokens through the standard contrastive retrieval objective. By introducing trainable prefix positions that interact with regular tokens during encoding, [DUMP] tokens help reduce the influence of residual or uninformative token-level signals on the final retrieval representation. Experiments on standard retrieval and long-context benchmarks show that our method consistently improves over finetuned baselines across encoder and decoder embedding models. Further analysis shows that [DUMP] tokens alter token-level activation and attention patterns associated with low-information tokens. These results suggest that trainable prefix tokens provide a lightweight way to improve retrieval representations.

阅读原文

参与讨论