HyperAIHyperAI

Command Palette

Search for a command to run...

3 months ago

AnglE-optimized Text Embeddings

Xianming Li Jing Li

AnglE-optimized Text Embeddings

Abstract

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.

Code Repositories

SeanLee97/AnglE
Official
pytorch
Mentioned in GitHub
4ai/bellm
pytorch
Mentioned in GitHub

Benchmarks

BenchmarkMethodologyMetrics
semantic-textual-similarity-on-mtebAnglE-UAE
Spearman Correlation: 84.54
semantic-textual-similarity-on-sick-r-1AnglE-LLaMA-7B
Spearman Correlation: 0.8094
semantic-textual-similarity-on-sick-r-1AnglE-LLaMA-13B
Spearman Correlation: 0. 8132
semantic-textual-similarity-on-sts-benchmarkAnglE-LLaMA-13B
Spearman Correlation: 0.8969
semantic-textual-similarity-on-sts-benchmarkAnglE-LLaMA-7B
Spearman Correlation: 0.8897
semantic-textual-similarity-on-sts-benchmarkAnglE-LLaMA-7B-v2
Spearman Correlation: 0.8897
semantic-textual-similarity-on-sts12AnglE-LLaMA-7B
Spearman Correlation: 0.7868
semantic-textual-similarity-on-sts12AnglE-LLaMA-13B
Spearman Correlation: 0.7868
semantic-textual-similarity-on-sts13AnglE-LLaMA-7B-v2
Spearman Correlation: 0.9056
semantic-textual-similarity-on-sts13AnglE-LLaMA-7B
Spearman Correlation: 0.9058
semantic-textual-similarity-on-sts14AnglE-LLaMA-7B-v2
Spearman Correlation: 0.8579
semantic-textual-similarity-on-sts14AnglE-LLaMA-13B
Spearman Correlation: 0.8689
semantic-textual-similarity-on-sts14AnglE-LLaMA-7B
Spearman Correlation: 0.8549
semantic-textual-similarity-on-sts15AnglE-LLaMA-13B
Spearman Correlation: 0.8956
semantic-textual-similarity-on-sts15AnglE-LLaMA-7B-v2
Spearman Correlation: 0.8943
semantic-textual-similarity-on-sts16AnglE-LLaMA-13B
Spearman Correlation: 0.8700
semantic-textual-similarity-on-sts16AnglE-LLaMA-7B
Spearman Correlation: 0.8691
semantic-textual-similarity-on-sts16AnglE-LLaMA-7B-v2
Spearman Correlation: 0.8700
sentiment-analysis-on-crAnglE-LLaMA-7B
Accuracy: 93.54
sentiment-analysis-on-mrAnglE-LLaMA-7B
Accuracy: 91.09

Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing
Get Started

Hyper Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp
AnglE-optimized Text Embeddings | Papers | HyperAI