通过反转文本提升冻结大模型的文本嵌入效果
ReverseEOL: Improving Training-free Text Embeddings via Text Reversal in Decoder-only LLMs

- 用输入文本反转生成互补嵌入,弥补原顺序信息缺失
- 在STS和MTEB上显著提升多种大模型的嵌入性能
- 无需训练,适合快速增强现有文本表示系统
近期大语言模型的发展为生成无训练文本嵌入提供了新路径。然而,解码器架构中的因果注意力机制导致早期词元无法访问未来上下文,造成上下文表示偏差。本文提出ReverseEOL方法,在标准前向嵌入基础上增加由反转输入文本生成的反向嵌入。由于反转使每个词元暴露于原顺序下不可见的上下文,反向嵌入能有效补充原始嵌入信息。最终将前向与反向嵌入融合,得到更丰富的表示。在STS和MTEB基准上的全面实验表明,ReverseEOL显著提升了多种不同架构与规模大模型的现有无训练基线表现。大量消融与分析进一步验证了反转机制的必要性。
原文摘要 · Abstract (English)
Recent advances in Large Language Models (LLMs) have opened new avenues for generating training-free text embeddings. However, the causal attention in decoder-only LLMs prevents earlier tokens from attending to future context, leading to biased contextualized representations. In this work, we propose Reverse prompting with Explicit One-word Limitation (ReverseEOL), a simple yet effective method for enhancing the representational capability of frozen LLMs. ReverseEOL augments the standard forward embedding with an additional reversed embedding derived from the reversed input text. Since reversing the input exposes each token to context inaccessible in the original order, the resulting reversed embedding effectively provides complementary information to the original one. As a result, combining the forward and reversed embeddings yields a richer final representation. Comprehensive experiments on STS and MTEB benchmarks demonstrate that ReverseEOL significantly improves the performance of existing training-free baselines across a broad range of LLMs with diverse architectures and scales. Extensive ablations and analyses further confirm the necessity of our reversal mechanism.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。