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

AnglE 优化的文本嵌入

AnglE-optimized Text Embeddings

The Hong Kong Polytechnic University(香港理工大学)

Xianming Li, Jing Li

AI总结:

本文提出 AnglE 模型,通过在复数空间中引入角度优化来缓解余弦函数饱和区导致的梯度消失问题,在短文本、长文本及领域特定 STS 任务上均优于现有 SOTA 模型。

摘要:

高质量文本嵌入对于提升语义文本相似度(STS)任务至关重要,而 STS 任务是大型语言模型(LLM)应用中的关键组成部分。然而,现有文本嵌入模型面临的一个共同挑战是梯度消失问题,这主要源于它们在优化目标中依赖余弦函数,而余弦函数存在饱和区。为解决这一问题,本文提出了一种新颖的角度优化文本嵌入模型,称为 AnglE。AnglE 的核心思想是在复数空间中引入角度优化。这种新颖方法有效缓解了余弦函数饱和区带来的不利影响,因为饱和区会阻碍梯度并妨碍优化过程。为了建立全面的 STS 评估,我们在现有的短文本 STS 数据集和一个新收集的来自 GitHub Issues 的长文本 STS 数据集上进行了实验。此外,我们考察了标注数据有限的领域特定 STS 场景,并探索了 AnglE 如何与 LLM 标注数据协同工作。我们在包括短文本 STS、长文本 STS 和领域特定 STS 任务在内的多种任务上进行了大量实验。结果表明,AnglE 优于忽略余弦饱和区的最先进(SOTA)STS 模型。这些发现证明了 AnglE 生成高质量文本嵌入的能力以及角度优化在 STS 中的有效性。

英文摘要:

High-quality text embedding is pivotal in improving semantic textual similarity (STS) tasks, which are crucial components in Large Language Model (LLM) applications. However, a common challenge existing text embedding models face is the problem of vanishing gradients, primarily due to their reliance on the cosine function in the optimization objective, which has saturation zones. To address this issue, this paper proposes a novel angle-optimized text embedding model called AnglE. The core idea of AnglE is to introduce angle optimization in a complex space. This novel approach effectively mitigates the adverse effects of the saturation zone in the cosine function, which can impede gradient and hinder optimization processes. To set up a comprehensive STS evaluation, we experimented on existing short-text STS datasets and a newly collected long-text STS dataset from GitHub Issues. Furthermore, we examine domain-specific STS scenarios with limited labeled data and explore how AnglE works with LLM-annotated data. Extensive experiments were conducted on various tasks including short-text STS, long-text STS, and domain-specific STS tasks. The results show that AnglE outperforms the state-of-the-art (SOTA) STS models that ignore the cosine saturation zone. These findings demonstrate the ability of AnglE to generate high-quality text embeddings and the usefulness of angle optimization in STS.

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

↑