Sticking to the Mean: Detecting Sticky Tokens in Text Embedding Models

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Chen, Kexin, Wang, Dongxia, Liu, Yi, Zhang, Haonan, Wang, Wenhai
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866918103242244096
author Chen, Kexin
Wang, Dongxia
Liu, Yi
Zhang, Haonan
Wang, Wenhai
author_facet Chen, Kexin
Wang, Dongxia
Liu, Yi
Zhang, Haonan
Wang, Wenhai
contents Despite the widespread use of Transformer-based text embedding models in NLP tasks, surprising 'sticky tokens' can undermine the reliability of embeddings. These tokens, when repeatedly inserted into sentences, pull sentence similarity toward a certain value, disrupting the normal distribution of embedding distances and degrading downstream performance. In this paper, we systematically investigate such anomalous tokens, formally defining them and introducing an efficient detection method, Sticky Token Detector (STD), based on sentence and token filtering. Applying STD to 40 checkpoints across 14 model families, we discover a total of 868 sticky tokens. Our analysis reveals that these tokens often originate from special or unused entries in the vocabulary, as well as fragmented subwords from multilingual corpora. Notably, their presence does not strictly correlate with model size or vocabulary size. We further evaluate how sticky tokens affect downstream tasks like clustering and retrieval, observing significant performance drops of up to 50%. Through attention-layer analysis, we show that sticky tokens disproportionately dominate the model's internal representations, raising concerns about tokenization robustness. Our findings show the need for better tokenization strategies and model design to mitigate the impact of sticky tokens in future text embedding applications.
format Preprint
id arxiv_https___arxiv_org_abs_2507_18171
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Sticking to the Mean: Detecting Sticky Tokens in Text Embedding Models
Chen, Kexin
Wang, Dongxia
Liu, Yi
Zhang, Haonan
Wang, Wenhai
Computation and Language
Artificial Intelligence
Despite the widespread use of Transformer-based text embedding models in NLP tasks, surprising 'sticky tokens' can undermine the reliability of embeddings. These tokens, when repeatedly inserted into sentences, pull sentence similarity toward a certain value, disrupting the normal distribution of embedding distances and degrading downstream performance. In this paper, we systematically investigate such anomalous tokens, formally defining them and introducing an efficient detection method, Sticky Token Detector (STD), based on sentence and token filtering. Applying STD to 40 checkpoints across 14 model families, we discover a total of 868 sticky tokens. Our analysis reveals that these tokens often originate from special or unused entries in the vocabulary, as well as fragmented subwords from multilingual corpora. Notably, their presence does not strictly correlate with model size or vocabulary size. We further evaluate how sticky tokens affect downstream tasks like clustering and retrieval, observing significant performance drops of up to 50%. Through attention-layer analysis, we show that sticky tokens disproportionately dominate the model's internal representations, raising concerns about tokenization robustness. Our findings show the need for better tokenization strategies and model design to mitigate the impact of sticky tokens in future text embedding applications.
title Sticking to the Mean: Detecting Sticky Tokens in Text Embedding Models
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2507.18171