Pith. sign in

REVIEW 3 major objections 9 minor 10 references

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

T0 review · 3 major / 9 minor · reviewed 2026-08-06 · deepseek-v4-flash

Pith's one-line read The paper claims that certain vocabulary tokens, called sticky tokens, pull sentence-pair cosine similarity toward the model's mean token similarity when inserted repeatedly, and that they are common enough (868 across 40 checkpoints) to…

desk verdict Real phenomenon, useful catalogue, but the formal definition overstates what the validation actually checks. read the letter →

arxiv 2507.18171 v1 pith:HWAJWGGC submitted 2025-07-24 cs.CL cs.AI

classification cs.CLcs.AI
keywords stickytokenstextembeddingssentencesimilaritytokenizationrobustnessembeddinganisotropyretrievaldegradationclusteringattentionanalysis
verification ladder T0 review T1 audit T2 compute T3 formal

The pith

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The reading

Text embedding models represent sentences as vectors, and applications such as search and clustering compare those vectors by cosine similarity. The paper claims that certain vocabulary tokens, called sticky tokens, act as anchors: repeat them inside one sentence of a pair and the pair's similarity moves toward the model's average token-to-token similarity, regardless of meaning. It formalizes this property, builds a detector called STD, and reports 868 sticky tokens across 40 checkpoints spanning 14 model families. The finding matters because injecting just a few of these tokens can cut retrieval accuracy by more than 50% and visibly distort clustering, so tokenization choices affect the reliability of embedding-based systems.

What carries the argument

The load-bearing quantity is Definition 1's anchor $u$, the mean pairwise cosine similarity of one-token embeddings, treated as a fixed point that repeated insertion pushes sentence pairs toward. STD is the machinery that finds tokens with this property at scale: it filters sentence pairs to those below $u$, discards undecodable and unreachable vocabulary entries, shortlists candidates by a sticky score that rewards frequent positive similarity shifts, and validates survivors with an IQR-based threshold $\varepsilon$.

What would settle it

Recompute $u$ from whole-sentence embeddings of a large and diverse corpus rather than from one-token embeddings, and rerun STD on a T5-style embedding model; if many validated tokens change or the surviving tokens no longer satisfy Definition 1 with the new $u$, the token-embedding surrogate is the load-bearing assumption.

Watch

Extended reading notes

Core claim

On the paper's terms, the discovery is that Definition 1 captures a real and widespread failure mode. For an embedding model $E$, let $u$ be the mean pairwise cosine similarity of its token embeddings; a token $t$ is sticky if, for every sentence pair $(s_1,s_2)$ and every insertion operation $I \in \{$prefix, suffix, random$\}$, $|\mathrm{Sim}(s_1, I(s_2,t,n)) - u| \le \varepsilon$. The Sticky Token Detector operationalizes this definition by keeping only pairs with initial similarity below $u$, removing undecodable and unreachable tokens, ranking the rest by a sticky score, and validating the top 2% against the full definition with an adaptive threshold $\varepsilon$. Applying the detector to 40 checkpoints yields 868 sticky tokens, frequently special, unused, or multilingual subword fragments, and insertion experiments show downstream degradation, with retrieval on one T5-family model falling from 28.64 to 13.65. Attention analysis shows that these tokens attract disproportionately high attention in later layers, consistent with small anomalies being amplified.

Load-bearing premise

The definition assumes the mean similarity of one-token embeddings is the anchor that real sentence pairs are pulled toward, so if single-token embeddings misrepresent sentence-level geometry, the detector targets the wrong quantity.

Editorial extensions

If this is right

  • If sticky tokens are as widespread as reported, embedding-based retrieval and clustering systems can be silently degraded by inputs containing a handful of rare tokens, without any semantic change to the text.
  • The reported absence of a consistent correlation with model size or vocabulary size implies that scaling models alone will not eliminate the failure; tokenizer design and training-data coverage are the relevant levers.
  • Because the detection pipeline filters and shortlists before validating, the formal definition can be checked cheaply on new checkpoints rather than by scanning the full vocabulary against all sentence pairs.
  • The layer-wise attention amplification suggests that interventions to reduce stickiness probably need to act on intermediate representations, not only on the final embedding layer.
  • Special and unused tokens being overrepresented gives tokenizer designers a concrete set of vocabulary entries to sanitize or re-initialize before fine-tuning.

Reading between the lines

Editorial extensions of the paper, not claims the author makes directly.

  • An extension the paper does not pursue: sticky-token behavior can be measured from insertion effects alone, so the same detector logic could serve as a black-box probe for embedding services whose vocabularies are hidden.
  • If the anisotropy conjecture is right, post-processing that whitens or isotropizes the embedding space should shrink or eliminate the sticky-token effect; testing STD on such models would directly check the proposed mechanism.
  • The mean-pulling behavior suggests a quantitative predictor: tokens whose embeddings lie near the principal direction of the anisotropic cone should be the stickiest, so candidate ranking could be done from token geometry before running the full validation.
Share X Bluesky LinkedIn Reddit HN

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, and a circularity audit.

Referee Report

3 major / 9 minor

Summary. The paper introduces the notion of "sticky tokens" in text embedding models: vocabulary tokens whose repeated insertion into sentences pulls pairwise cosine similarity toward a fixed value u, defined as the mean pairwise similarity of token embeddings. It proposes a formal definition (Definition 1), a detection pipeline called Sticky Token Detector (STD) with sentence-pair filtering, token filtering, sticky scoring, and validation, and applies STD to 40 checkpoints across 14 model families, reporting 868 sticky tokens. The paper further shows that inserting these tokens can degrade MTEB retrieval and clustering performance by up to roughly 50%, and provides an attention-layer analysis suggesting sticky tokens dominate attention patterns. The authors also discuss implications for RAG adversarial attacks and potential mitigation strategies.

Significance. If the claims hold, this is a timely and practically relevant study of tokenization-level vulnerabilities in embedding models, with a broad empirical scope (40 models), a publicly released code repository, and concrete downstream performance evidence. The downstream degradation results and the attention analyses are interesting and likely reproducible. However, the paper's central formal claim is currently not supported by the validation procedure: the formal definition quantifies over all sentence pairs, while detection and validation only use pairs with initial similarity below the mean, and the validation threshold is derived from the candidate tokens themselves. These gaps undermine the 868-token count as evidence for Definition 1, though the core phenomenon and the detection method remain plausible. The value of the paper would increase substantially if the formal definition and the validation were brought into alignment.

major comments (3)
  1. [Section 4.1 and Algorithm 1] Definition 1 (Section 3.2) requires that for all s1, s2 in S and all I in I, |Sim(s1, I(s2,t,n)) - u| <= epsilon. However, the filtering step restricts the sentence-pair set to Pf = {(s1,s2) | Sim(s1,s2) < u}, and Algorithm 1 validates candidates only on Pf. A token that moves below-mean pairs toward u but moves above-mean pairs away from u would pass validation yet violate Definition 1. The empirical observation that sticky tokens have a clear impact on below-mean pairs does not establish the universal claim. Please either extend Algorithm 1 to also check pairs with Sim(s1,s2) >= u, or revise Definition 1 to quantify only over Pf and adjust the abstract and headline counts accordingly. This is load-bearing because the 868-token count is presented as satisfying Definition 1.
  2. [Section 3.1 and Appendix D.1] The constant u in Definition 1 is the mean pairwise cosine similarity of token embeddings, but the definition concerns sentence embeddings. The paper asserts that "we use token embeddings as a surrogate for text embeddings since both share the same embedding space" without providing evidence that the mean token-pair similarity equals (or even approximates) the mean sentence-pair similarity for the 40 evaluated models. If these means differ, the formal definition targets a value that is not the natural center of the sentence-similarity distribution, and the detection results would not match the intended phenomenon. Please provide a systematic comparison of u computed from token embeddings versus from sentence embeddings across all models, or justify the surrogate more rigorously, and if the two differ, redefine u accordingly.
  3. [Appendix D.4.1 and Algorithm 2] The validation threshold epsilon is set as Q3 + 1.5*IQR of the GE(t) values computed over the candidate tokens C themselves. This is circular: a candidate token is validated as sticky if its deviation from u is small relative to other candidates, not if it satisfies Definition 1's requirement that |Sim(s1, I(s2,t,n)) - u| <= epsilon for a threshold chosen a priori or from normal tokens. The paper's statement that epsilon is "based on how much change in sentence similarity is considered significant by the model's users" is not reflected in Algorithm 2. Please anchor epsilon to an external criterion (e.g., the distribution of GE for normal tokens, or a user-specified value), report the resulting thresholds, and re-run the validation with the chosen threshold.
minor comments (9)
  1. [Section 5.1] The text says "12 text embedding model families" but Table 5 lists 14 families, and the abstract says 14; please make the count consistent.
  2. [Section 4.3] The sticky score formula "SS_I(t) = M+ + αF+ / M− + βF− + Sim(s1,t) + γ" is ambiguous due to missing parentheses; please clarify the intended fraction and report the values of α, β, and γ used in the experiments.
  3. [Appendix D.4.1] The definition of GE(t) uses k in place of the insertion count n used in Definition 1 and Algorithm 1; please align the notation.
  4. [Table 7] The table note says the thresholds are "derived from the standard deviation, not the variance," but Algorithm 2 uses the interquartile range; please correct the note.
  5. [Figure 3 and Section 5.1] There are typos: "String Dateset" in the Figure 3 caption and "Dateset" in Section 5.1 should both be "Dataset."
  6. [Table 1] In the examples column, tokens are concatenated without clear separators (e.g., "(,h₂o,[CLS],₂,gambia"); please add spaces or commas between token examples.
  7. [Algorithm 2] In the pseudocode, epsilon is initialized as an empty set but returned as a scalar; please clean up the initialization and the return type.
  8. [Abstract and Section 5.3] The abstract says degradation "approaches 50%" while the reported NFCorpus drop is 52.3%; please use "over 50%" or quote the exact figure.
  9. [Appendix E] The ablation study refers to the (n=10, k=10) configuration as "ground truth," but this is just a larger hyperparameter setting, not an external ground truth; please rephrase to avoid confusion.

Circularity Check

2 steps flagged · score 4.0 of 10

Validation threshold is fitted from the candidate tokens' own deviation distribution, making the 868-token certification partly self-confirming; the downstream degradation results remain independent.

  1. fitted input called prediction [Appendix D.4.1 (Algorithm 2), used by Section 4.4 (Algorithm 1)]
    "GE ={GE(t)| t∈C} ... As detailed in Algorithm2, we present an adaptive thresholding algorithm inspired by statistical anomaly detection theory. ... ϵ_E← Q3_E + α× IQR_E"

    The threshold ε used to declare a candidate sticky is computed from the GE values of the very candidates being validated. Algorithm 1 then accepts t exactly when |Sim(·,·) − u| ≤ ε. Hence a token's 'validated' status is determined by where it falls in the candidate set's own deviation distribution (below the upper fence), not by an independent pre-specified bound. This is an in-sample fit: the same data determine both the criterion and the verdict, so the validation cannot serve as independent confirmation of Definition 1.

  2. self definitional [Section 3.2 (Definition 1); Section 4.4 (Algorithm 1)]
    "a token t is called a sticky token if, for all s1, s2∈ S and for all I∈ I, we have: |Sim(s1, I(s2, t, n)) − u| ≤ ϵ. ... Finally, we check each shortlisted token to confirm it meets the formal definition of a sticky token (Definition 1)."

    The formal definition fixes 'sticky' as 'after insertion, similarity is within ε of u,' where u is the mean pairwise similarity of the model's own token embeddings. The detection and validation pipeline operationalizes exactly this condition: shortlisting rewards increases toward u for below-mean pairs, and validation checks closeness to u. Consequently, the paper's statement that sticky tokens 'pull' sentence similarity toward u is not an independent empirical discovery but the content of the definition; the empirical output is only which tokens satisfy the criterion. This is a definitional loop, though the inventory and downstream effects carry independent information.

full rationale

The main circular element is the validation threshold. Algorithm 2 computes epsilon as Q3 + 1.5*IQR of GE(t) over the candidate set C itself, and Algorithm 1 uses that epsilon to decide which candidates are sticky. Thus a token is 'validated' if its |Sim − u| is not an upper outlier among already-shortlisted tokens, not if it meets an externally fixed bound; the certification is partly self-confirming. Additionally, Definition 1 quantifies over all sentence pairs, but Algorithm 1 loops only over Pf = {(s1,s2): Sim(s1,s2) < u}, so the 868-token claim does not establish the universal formal statement. I treat this as a coverage gap rather than circularity because it is a subset check, not an equation-identical reduction. The sticky property itself is defined in terms of u, the model's own token-embedding mean, so the 'mean-pulling' tendency reported in the paper is largely definitional; the empirical contribution is the inventory of tokens and downstream degradation. The downstream MTEB results and attention analysis are external, independent evidence, so the central claims do not reduce entirely to the fitted threshold. No load-bearing self-citations or uniqueness theorems are present; the paper's reliance on prior work is for standard methodology, not for the central conclusion.

Assumptions & free parameters 6 free parameters · 4 assumptions · 0 invented entities

The central detection pipeline introduces five hand-chosen parameters (n, k, alpha/beta, gamma, shortlist fraction) and a data-dependent threshold epsilon. The definition rests on two domain assumptions (token-embedding surrogate, anisotropy) and a post hoc restriction of validation to below-mean sentence pairs. No new physical entities are postulated; 'sticky token' is a label for existing vocabulary entries.

free parameters (6)
  • n (insertion count) = 8
    Chosen via ablation on sentence-t5-base (Table 6); affects whether a token is validated as sticky.
  • k (sampled sentence pairs) = 5
    Chosen via ablation on sentence-t5-base; sticky score uses k sampled pairs.
  • alpha and beta (sticky score weights) = not reported
    Constants balancing magnitude and frequency in SS_I(t); numeric values are never given in the paper.
  • gamma = 1e-8
    Numerical stability constant in the sticky score denominator.
  • epsilon (per-model validation threshold) = Table 7 values (e.g., 0.1106 for sentence-t5-base)
    Adaptive threshold from Algorithm 2 computed from candidate tokens' own GE(t) values; caption of Table 7 says thresholds are based on standard deviations, which conflicts with Algorithm 2.
  • shortlist fraction = top 2%
    Chosen by hand to bound compute; affects which tokens reach validation.
assumptions (4)
  • domain assumption Token embeddings can be used as a surrogate for text embeddings because they share the same embedding space; the mean of token-embedding similarities approximates the mean of sentence-embedding similarities.
    Stated in Section 3.1 and used to define u and to interpret Figure 2c. The paper computes token embeddings by encoding each vocabulary token as a one-token sentence (Appendix C), which is not shown to match contextualized sentence statistics.
  • domain assumption All 40 evaluated models have anisotropic embedding spaces, so a dominant direction exists for sticky tokens to pull toward.
    Appendix C and the Limitations assert all evaluated models are anisotropic; the stickiness definition depends on this geometry being generic.
  • ad hoc to paper Sentence pairs with initial similarity below the mean u are sufficient to detect and validate sticky tokens, even though Definition 1 quantifies over all pairs.
    Section 4.1 restricts Pf to Sim(s1,s2) < u; Algorithm 1 validates only on Pf. This is a post hoc reduction of the universal definition, justified by Figure 2 examples rather than a proof.
  • ad hoc to paper Insertion operations can be limited to prefix, suffix, and random placement with a fixed count n; deletion and replacement are excluded.
    Section 3.2 and Appendix B choose I = {Ipre, Isuf, Iran}; Definition 1 depends on this restriction, and the paper argues replacement causes less granular shifts.

how reviews work

0 comments
Cite this review

Pith. "Pith review of Sticking to the Mean: Detecting Sticky Tokens in Text Embedding Models." pith.science (2026). https://pith.science/paper/HWAJWGGC

@misc{pith2026250718171,
  author       = {Pith},
  title        = {Pith review of: Sticking to the Mean: Detecting Sticky Tokens in Text Embedding Models},
  year         = {2026},
  howpublished = {\url{https://pith.science/paper/HWAJWGGC}},
  note         = {Machine review of arXiv:2507.18171}
}
read the original abstract

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.

Figures

Figures reproduced from arXiv: 2507.18171 by the authors.

Figure 1
Figure 1. An example illustrating how a sticky token [PITH_FULL_IMAGE:figures/full_fig_p001_1.png] view at source ↗
Figure 2
Figure 2. Sentence similarity trend curves and similarity distributions for various tokens and text embedding models. [PITH_FULL_IMAGE:figures/full_fig_p003_2.png] view at source ↗
Figure 3
Figure 3. The framework of STD to detect sticky tokens. [PITH_FULL_IMAGE:figures/full_fig_p004_3.png] view at source ↗
Figures from the paper (10 more)
Figure 4
Figure 4. Figure 4: The example distribution of attention patterns KL Divergence Between Sticky and Normal To [PITH_FULL_IMAGE:figures/full_fig_p009_4.png]
Figure 8
Figure 8. Figure 8: sup-simcse-bert-base-uncased + token: [SEP] [PITH_FULL_IMAGE:figures/full_fig_p013_8.png]
Figure 9
Figure 9. Figure 9: UAE-Large-V1 + token: [SEP] [PITH_FULL_IMAGE:figures/full_fig_p013_9.png]
Figure 10
Figure 10. Figure 10: Similarity distribution for different text [PITH_FULL_IMAGE:figures/full_fig_p013_10.png]
Figure 6
Figure 6. Figure 6: bge-base-en-v1.5 + token: www [PITH_FULL_IMAGE:figures/full_fig_p013_6.png]
Figure 7
Figure 7. Figure 7: instructor-base + token: lucrarea [PITH_FULL_IMAGE:figures/full_fig_p013_7.png]
Figure 11
Figure 11. Figure 11: Inserting operations of token into sentence. [PITH_FULL_IMAGE:figures/full_fig_p014_11.png]
Figure 12
Figure 12. Figure 12: Effect of token replacement operation on [PITH_FULL_IMAGE:figures/full_fig_p014_12.png]
Figure 13
Figure 13. Figure 13: Our conjecture about sticky tokens, based on [PITH_FULL_IMAGE:figures/full_fig_p015_13.png]
Figure 14
Figure 14. Figure 14: A diagram of how to calculate the attention [PITH_FULL_IMAGE:figures/full_fig_p021_14.png]

Discussion (0). Continue with ORCID to comment.

Reference graph

Works this paper leans on

10 extracted references · 7 canonical work pages

  1. [1]

    Sentence pair filter, filter out sentence pairs with initial similarity above themeanof the distribution1

  2. [2]

    Token filter, filter out those undecodable or unreachabletokens

  3. [3]

    Shortlisting, shortlist tokens via sticky scoring

  4. [4]

    fallbackbyte

    Validation, validate whether the shortlisted tokens are indeed sticky ones based on Definition1. D.1 Sentence Pair Filtering WeobservedinFigure 2thatcomparedwithnormal ones,stickytokenstendtoobviouslybringcloser thosesentenceswhoseinitialsimilarityisbelowthe mean uoftheinitialpairwise-similaritydistribution oftokens. Formally, given a modelE, the mean of ...

  5. [8]

    For each pair, oneofthesentencegetsinserted 13 withtoken tvia operationI

    denote the change in similarity between sj 1, sj 2 after inserting t . For each pair, oneofthesentencegetsinserted 13 withtoken tvia operationI. Forexample,for sj 1, sj 2,let ∆j t,I,p = Sim(sj 1, sj′ 2 )− Sim(sj 1, sj 2)denotethechangein theirsimilarity. Forallthepairs,denotethechange asLt,f,p = [ ∆1 t,f,p, ∆2 t,f,p, . . . ,∆k t,f,p ] ∈ Rk. We measure the...

  6. [9]

    2)Normaltoken Variant: The original sentence inserted with a normaltokensrandomlyselectedfromthemodel’s vocabulary

    Sticky Token Variant: The original sentence inserted with a sticky tokens validated in Section5.2(e.g.,</s>,lucrarca). 2)Normaltoken Variant: The original sentence inserted with a normaltokensrandomlyselectedfromthemodel’s vocabulary. Weselectakeyfeaturetorepresentthemodel’s internalstate,i.e., attention patterns. Theattention patterns capture the relativ...

  7. [1969]

    howtoimprove mental health?

    to quantify the differences in the outputs of intermediate layers generated by normal and sticky tokens. This approach helps uncover the variationsinthemodel’sinternalmechanismswhen processing these two types of tokens. In this study,alargerWassersteindistancesignifiesamore significantdivergenceindistributions. The Wasserstein distance (Vaserstein, 1969) ...

  8. [2016]

    Preprint,arXiv:1508.07909

    Neuralmachinetranslationofrarewordswith subwordunits. Preprint,arXiv:1508.07909. AadityaK.SinghandDJStrouse.2024. Tokenization counts: theimpactoftokenizationonarithmeticin frontierllms. Preprint,arXiv:2402.14903. SabaSturua,IsabelleMohr,MohammadKalimAkram, MichaelGünther,BoWang,MarkusKrimmel,Feng Wang, Georgios Mastrapas, Andreas Koukounas, NanWang,andHa...

Show all 10 references
  1. [2019]

    arXiv preprint arXiv:1907.11692

    Roberta: Arobustlyoptimizedbertpretraining approach. arXiv preprint arXiv:1907.11692. AnemilyMachinaandRobertMercer.2024. Anisotropy is not inherent to transformers. In Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Lingui...

  2. [2024]

    Preprint, arXiv:2205.13147

    Matryoshkarepresentationlearning . Preprint, arXiv:2205.13147. Sander Land and Max Bartolo. 2024a.Fishing for magikarp: Automatically detecting under-trained tokens in large language models . Preprint, arXiv:2405.05417. Sander Land and Max Bartolo. 2024b.Fishing for magikarp: ...

Pith tools

Reviewed August 6, 2026 · model on record in the stance chip above.