arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.24200cs.CLcs.AIcs.IR
收藏

基于 PLM 的模型中的长度诱导嵌入坍缩

Length-Induced Embedding Collapse in PLM-based Models

Gaoling School of Artificial Intelligence, Renmin University of China(中国人民大学北京校区人工智能学院)

Yuqi Zhou, Sunhao Dai, Zhanshuo Cao, Xiao Zhang, Jun Xu

AI总结:

本文揭示基于 PLM 的文本嵌入随长度增加而聚集坍缩的问题,从自注意力低通滤波角度给出理论解释,并提出 TempScale 缩小长短文本滤波率差距,在 MTEB 和 LongEmbed 上取得提升。

摘要:

来自基于 PLM 的模型的文本嵌入支持广泛的应用,但其在较长文本上的性能往往会下降。在本文中,我们介绍了一种称为 Length Collapse(长度坍缩)的现象,即较长文本的嵌入倾向于聚集在一起。这种聚集导致短文本与长文本嵌入之间存在分布不一致。我们进一步研究了这些差异如何在各种下游任务中造成在较长文本上观察到的性能下降。通过对自注意力机制进行严格的理论分析——该机制在基于 PLM 的模型中充当低通滤波器——我们证明,随着文本长度增加,低通滤波的强度会增强,使嵌入保留更多低频成分。因此,输入 token 特征变得更加相似,导致聚集,并最终造成较长文本嵌入的坍缩。为解决这一问题,我们提出了一种简单方法 TempScale,用于缓解 Length Collapse 现象。通过缩小长文本与短文本之间低通滤波率的差距,TempScale 确保不同文本长度下的嵌入更加一致。该方法在 MTEB 上带来 0.94% 的性能提升,在专门关注长上下文检索的 LongEmbed 上带来 1.10% 的提升,为我们分析的有效性提供了有力证据。源代码可在 https://github.com/Yuqi-Zhou/Length_Collapse 获取。

英文摘要:

Text embeddings from PLM-based models enable a wide range of applications, yet their performance often degrades on longer texts. In this paper, we introduce a phenomenon we call Length Collapse, where embeddings of longer texts tend to cluster together. This clustering results in a distributional inconsistency between the embeddings of short and long texts. We further investigate how these differences contribute to the performance decline observed with longer texts across various downstream tasks. Through a rigorous theoretical analysis of the self-attention mechanism, which acts as a low-pass filter in PLM-based models, we demonstrate that as text length increases, the strength of low-pass filtering intensifies, causing embeddings to retain more low-frequency components. As a result, input token features become more similar, leading to clustering and ultimately the collapse of embeddings for longer texts. To address this issue, we propose a simple method, TempScale, which mitigates the Length Collapse phenomenon. By narrowing the gap in low-pass filtering rates between long and short texts, TempScale ensures more consistent embeddings across different text lengths. This approach leads to performance improvements of 0.94% on MTEB and 1.10% on LongEmbed, which focuses specifically on long-context retrieval, providing strong evidence for the validity of our analysis. The source code is available at https://github.com/Yuqi-Zhou/Length_Collapse.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑