# Embedding Cosine Measures Text Length Before It Measures Homogenization

Length drives embedding cosine homogenization signals, so corrected measures change the story

Fengming Liu · arXiv · 2026-11-16

- **Problem** Mean pairwise cosine between embeddings is used to detect online homogenization, but with mean-pooled encoders it mostly tracks text length. Truncating the same comments from 10 to 150 words raises their mean cosine by eight times the reported break.
- **Method** The corrected measure splits comments into word-count quintiles and computes raw uncentered similarity within each band. It is checked against a length-only placebo that swaps each comment for a random one of equal length.
- **Results** Under DeBERTa, the Reddit asymmetry falls from 3.96 SD to 1.09 SD after length stratification, and the placebo reproduces 81% of the asymmetry.

## Why raw cosine tracks more than meaning

Studies of AI-assisted writing read the mean cosine between document embeddings as a homogeneity score, and platform studies now apply the same number to whole forums over time. The number is a cosine, though, and a cosine depends on the embedding space as much as on the texts. Contextual encoders crowd their outputs into a narrow cone, which lifts the cosine even between unrelated texts.

Length adds a second hidden driver, because longer texts collapse toward one another in these spaces.

The author's earlier Reddit study reported a within-group break in right-flaired comments after December 2022, with γ = +0.0081. In the same corpus, the average length of those comments fell from 109 words in 2019 to 61 in 2022. A falling length line of this kind looks like diversification while it runs, and like a break when it levels off.

So the question becomes whether the break survives once length is removed from the measure.

## How much length alone moves raw DeBERTa homogeneity

Truncation gives the cleanest test, because it holds each comment's content fixed while only its length changes. I drew 20,000 comments with at least 150 words and cut each to its first k words, with k set to 10, 20, 40, 80 or 150. Under DeBERTa, raw homogeneity climbs from 0.904 at ten words to 0.968 at 150 words. That gain of 0.064 is eight times the conservative break of 0.0081, so truncation alone moves the score more than the effect under test.

Figure 1 plots all three encoders on the same truncation levels.

![Figure 1: Mean pairwise cosine of the same 20,000 com- ments truncated tokwords. Content is held fixed and only length changes](https://refivu.com/papers/f5a62c1c-ca4f-4b4f-a5bb-ac167935507f/figures/figure-e29733ad40da0201dbb62a432092ec1e.png?thumb=512)

**Figure 1** : Mean pairwise cosine of the same 20,000 com- ments truncated tokwords. Content is held fixed and only length changes.

[Original paper](https://arxiv.org/abs/2611.21519v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Fengming Liu · Embedding Cosine Measures Text Length Before It Measures Homogenization · Original paper figure · Extracted the figure area from page 3 of the original PDF.

BGE, a sentence encoder, rises from 0.452 to 0.612, so training for similarity doesn't shield a measure from length. all-mpnet-base-v2 stays nearly flat, moving between 0.125 and 0.151 with no steady direction. Naturally occurring comments show the same ordering: random DeBERTa pairs with both comments under 15 words average 0.879. Pairs with both comments over 120 words average 0.970 under DeBERTa, a much higher baseline.

For the two sentence encoders, those shares fall to 3 to 4% and 21 to 23%. The first direction carries 99.9% of mean raw DeBERTa homogeneity, although it holds 92.5% of the second moment.

After subtracting the corpus mean, DeBERTa similarity at fixed truncation becomes U-shaped: 0.337 at ten words, 0.026 at forty, and 0.321 at 150. Centering therefore leaves a length dependence of its own.

## Redefining the measure to remove length

The fix keeps the raw form and handles length by splitting comments into word-count bands. Raw H is the mean dot product over all pairs of distinct comments, which is essentially the squared length of the cell's mean vector. Written out, \\\[ H=\\frac{1}{n(n-1)}\\sum\_{i\\neq j}x\_i^\\top x\_j \\\] where each x\_i is an L2-normalized embedding of one of the n comments in a cell.

For unit vectors the dot product equals one minus half the squared distance, so subtracting a common vector without renormalizing leaves H unchanged.

The corrected measure computes H on uncentered vectors within each global word-count quintile, with cut points at 15, 28, 47 and 86 words. The centered measure takes the other route, subtracting the corpus mean and then renormalizing, and the authors use it only as a contrast. That renormalization step matters later, because it can reverse a genuine effect.

Three diagnostics then test the raw and corrected series: a length-only placebo, a fixed-content simulation and a spectral split of H. The spectral split writes H as a sum over orthogonal principal directions, so each band of directions gets its own series.

## How much of the break length alone explains

A length-only placebo tests how much of the asymmetry length alone can produce. The placebo drops topic, ideology, period, and author, and the procedure repeats fifty times.

The placebo yields 0.0072 on average across draws, with an SD of 0.0007. Length alone therefore reproduces 81% of the asymmetry, and 58% of placebo draws reach p below 0.05. Regressing the observed series on its placebo leaves a residual asymmetry of 0.59 SD with p = 0.48 under DeBERTa.

The fixed-content simulation goes further by fixing content entirely and drawing every synthetic cell from one pool of 8,000 comments. Each synthetic cell cuts its draws to lengths set by the cell's observed word-count distribution. Under DeBERTa the simulation yields 0.0069, against the observed 0.0089, so content-free length variation reproduces 78% of the effect.

Under BGE the share is 96%, with 0.0144 against 0.0151. The authors argue that residual asymmetry in a corrected measure should mostly be attributed to length unless length is controlled directly.

## Does the corrected measure keep the asymmetry?

Table 1 places the raw, placebo, corrected and centered estimates side by side for DeBERTa, mpnet and BGE. On the 2019 baseline, the DeBERTa sample reproduces the original full-corpus estimate of 3.26 SD at 3.96 SD (p = 0.021). Stratifying the uncentered measure by word-count quintiles drops the DeBERTa asymmetry from 3.96 SD to 1.09 SD. The p-value for that DeBERTa estimate rises from 0.021 to 0.26 once length is stratified.

Under mpnet and BGE, the corrected estimates fall to 0.08 and 0.44, with p above 0.7 in both cases. Residualizing on the placebo gives estimates between −0.58 and +0.59, and every p is above 0.4.

![Table 1: Right×post difference-in-differences (right-flaired users in r/AskConservatives against left-flaired users in r/AskALiberal), in SD units of each seri…](https://refivu.com/papers/f5a62c1c-ca4f-4b4f-a5bb-ac167935507f/figures/figure-27c77de4519b64c678237dbb92dac80c.png?thumb=512)

**Table 1** : Right×post difference-in-differences (right-flaired users in r/AskConservatives against left-flaired users in r/AskALiberal), in SD units of each series in 2021–22. The corrected measure averages uncentered pairwise cosines within global word-count quintiles. Newey–West standard errors with six lags. ∗∗p \< .01,∗p \< .05,†p \< .10. Columns other than “mpnet (all)” use the stratified sample of 915,225 comments, and “mpnet (all)” uses all 6,056,593.

[Original paper](https://arxiv.org/abs/2611.21519v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)

Centering behaves less predictably, because the centered DeBERTa estimate without length control stays large. Centered DeBERTa without length control reaches 8.9 SD, but its p-value is only 0.06. Adding length terciles after centering still leaves 3.1 SD, with p = 0.04. With the 2021 baseline, the corrected mpnet estimate is 1.31 SD on both the full corpus and the sample.

When the pre-trend comes from 2021 to 2022 only, no measure under any encoder produces an asymmetry with p below 0.10. The corrected estimates there are positive and small, from 0.67 to 1.31 SD, while every centered sentence-encoder estimate is negative.

Monthly full-corpus and sample series correlate at 0.975 to 0.998 in every group and measure, so sampling doesn't drive these results. Month-to-month movements synchronize within each subreddit, with r from 0.74 to 0.79 between its Left and Right series. Across subreddits the same series correlate only weakly, at r from 0.22 to 0.46, which points to a driver at the subreddit level.

## Stack Exchange shows the artifact in reverse

The second test uses 575,000 answers from eight Stack Exchange sites, posted between January 2018 and March 2024. Here the length shift runs upward, because answers on Super User and Unix & Linux grew from 103 to 109 and from 95 to 110 words.

On Super User, raw DeBERTa homogeneity jumps by 1.62 SD after November 2022, and on Unix & Linux it jumps by 1.63 SD. Across the 75 months, raw homogeneity correlates with its placebo at 0.96 and 0.81 on the two largest technical sites.

The placebo alone gives +1.53 SD (p below 0.001), and the residual falls to −0.50 (p = 0.20). Mean word count itself shifts by +1.73 SD (p below 0.001), so length moves on the technical sites too.

DeBERTa homogeneity rises with length, while mpnet's homogeneity falls with length up to about 40 words. Of the 31 embedding-similarity studies in the census, four of the five studies using masked or decoder encoders are rated medium or higher. Those ratings measure exposure only, so the authors' own data decide whether a given result survives.

## Centering can reverse a real effect

Doshi and Hauser's experiment on AI-assisted short stories is rated low risk, because its conditions are randomized. The author re-encoded their 293 human-written stories with the three encoders used in this paper.

The pairwise measure of this paper gives 0.58 to 1.03 SD for the same stories. Centering on the pooled mean and then renormalizing reverses the sign of the effect under every encoder. Under BGE the effect falls to −0.39 SD (p = 0.004), and under DeBERTa it is −0.30 SD (p = 0.005), with mpnet at −0.23.

A distance to the leave-one-out centroid doesn't renormalize, so centering leaves it unchanged.

That distance measure recovers a positive effect of 0.29 to 0.52 SD (p ≤ 0.022). AI-assisted stories were also 10 to 17% longer, yet the effect survives under DeBERTa with length controlled at 0.21 SD (p = 0.06).

## Where the risk lies across 31 studies

The author coded 31 embedding-similarity studies of homogenization or diversity by encoder family and by design. Four of the five studies using masked or decoder encoders are rated medium or higher, and that group includes the original Reddit study.

![Table 2: Census of 31 embedding-similarity studies of ho- mogenization, by encoder family and design. At risk counts studies rated medium or higher](https://refivu.com/papers/f5a62c1c-ca4f-4b4f-a5bb-ac167935507f/figures/figure-2f69e9b41db7bd8dd8a296cacec8cc42.png?thumb=512)

**Table 2** : Census of 31 embedding-similarity studies of ho- mogenization, by encoder family and design. At risk counts studies rated medium or higher.

[Original paper](https://arxiv.org/abs/2611.21519v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)

These ratings are the author's own judgment and measure exposure, not whether a given result survives.

## Convergence between the political camps

The author measures the Left–Right centroid distance inside each subreddit, month and length quintile, using uncentered sum vectors. After December 2022 the distance stays flat in r/AskConservatives and drifts slightly up in r/AskALiberal. Convergence therefore happened before ChatGPT, and the camps had stopped moving closer by its arrival.

Separability tracked the distance: AUC fell from 0.69 to 0.57 in r/AskConservatives. In r/AskALiberal the AUC fell from 0.64 to 0.58 over the same period. A logistic classifier using length alone separates the camps at only 0.51.

The author sampled 192,975 direct replies and compared each reply's similarity to its parent with a control comment from the same thread, camp and length tercile. Replies sit much closer to the comment they answer, with accommodation at 0.23 on uncentered mpnet. Right-flaired users answering each other accommodate by −0.006, and these pairwise contrasts come with p below 0.001.

Cross-camp replies quote their parents more often, at 19.5% against 13.6 to 14.8%. Accommodation didn't rise after ChatGPT, and it fell slightly in every reply type (−0.009, p = 0.052).

## A short protocol before reporting a trend

A study should first report the random-pair baseline before it reports any embedding-based trend. The same check applies when a single direction carries nearly all of the measure. The paper reports the random-pair cosine of 0.924 for DeBERTa against 0.111 for mpnet and 0.520 for BGE.

The protocol also asks authors to pick encoders trained for sentence similarity. Mean-pooled outputs of masked language models don't suit this purpose, because Sentence-BERT was built to fix that failure. Length gets handled explicitly, through stratification, reweighting, or residualization. Centering alone leaves the U-shaped length dependence, and sentence encoders alone leave BGE's large monotone length effect.

In the Doshi and Hauser stories, that combination reversed a genuine effect.

Authors should prefer measures that don't renormalize, such as the squared distance to a group centroid. They should compute these measures within length strata. When centered and uncentered measures disagree in sign, the author recommends reporting both before choosing. It shows how much of a trend length alone would produce, so it belongs next to the main estimate.

A study should also separate agenda from voice by reporting how much a dominant-topic term explains. Estimates should cover several encoders and several baselines, because the result was fragile across measures. The final step calibrates the test on fixed-content synthetic series with no effect. In this case that calibration showed a rejection rate two to three times the nominal rate.

## Where the results stop

The limits start with the census, whose risk ratings come from my own reading of the reported methods. Four of those ratings rest on incomplete information, so readers should check them against the original papers. I chose the corrected measures after I had seen the artifact, so they are a judgment call rather than a fixed standard. Simple corrections may not be the best ones, since whitening, cluster-based isotropy methods, or length-normalized encoders might do better.

The Newey–West test over-rejects here, so I present the estimates as descriptions of this corpus. With no length change at all, 10 to 15% of runs reject at p below 0.05. That rate is two to three times the nominal level, because 84 monthly observations with six Newey–West lags give intervals that are too narrow. The centered DeBERTa estimate of 8.9 SD has p of 0.06, so the centered results stay imprecise.

The agenda-voice split relies on a single principal direction. Some of the 30 events fall in overlapping weeks, such as the 2020 election and its call. DeBERTa on the 915,225-comment sample reproduces the full-corpus estimate.

## Paper info

- **Authors**: Fengming Liu
- **Venue**: arXiv · Preprint
- **First published**: 2026-11-16
- **Added**: 2026-11-18
- **Updated**: 2026-11-16
- **Version**: v1
- **arXiv**: 2611.21519
- **Category**: cs.CL · cs.CY · cs.SI
- **Original paper terms**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **What we show**: Paper info, commentary and permitted figures from the original paper

[Original paper ↗](https://arxiv.org/abs/2611.21519v1) · [PDF ↗](https://arxiv.org/pdf/2611.21519v1)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Abstract

Mean pairwise cosine similarity between transformer embeddings is a standard measure of whether online discourse is converging under generative AI. When the embeddings are mean-pooled outputs of an encoder never trained for sentence similarity, this measure mostly tracks text length. In 6.06 million Reddit comments, an uncentered DeBERTa-v3 measure had suggested that only conservative discourse broke toward homogeneity after late 2022. Truncating the same comments from 10 to 150 words raises their mean cosine by eight times the reported break. A placebo that swaps every comment for a random one of equal length reproduces 81% of the asymmetry, and a fixed-content simulation reproduces 78%. The leading principal direction carries 99.9% of raw DeBERTa homogeneity, and once length is handled the asymmetry disappears under every encoder. On 575,000 Stack Exchange answers the measure reports a post-ChatGPT homogenization of technical sites that the placebo fully reproduces, although answers grew longer. A census of 31 studies locates the risk where anisotropic encoders meet time-series or length-unequal designs. A reverse control on a well-known experiment shows that centering with renormalization can reverse a genuine effect. I propose a low-cost diagnostic protocol. Corrected measures show that the two political camps converged between 2019 and 2022 and stopped converging before ChatGPT. Cross-camp replies engage their targets more closely than same-camp replies.

## Quote from the paper

Fengming Liu (2026). Embedding Cosine Measures Text Length Before It Measures Homogenization. arXiv:2611.21519v1. https://arxiv.org/abs/2611.21519v1

**BibTeX**

```
@misc{liu2026embedding,
  title = {{Embedding Cosine Measures Text Length Before It Measures Homogenization}},
  author = {Fengming Liu},
  year = {2026},
  eprint = {2611.21519},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.21519v1}
}
```

## Other paper commentary

- [Centered Ablation: Why Last-Layer Directional Ablation Under-Fires or Collapses, and a Closed-Form Fix](https://refivu.com/en/papers/e522068b-b9e0-411d-8146-73a3b153eaba-centered-ablation-why-last-layer-directional-ablation-under.md)
- [Delayed Effects of Temporary Weight Decay in Muon Pretraining](https://refivu.com/en/papers/c8f38eb0-af09-4136-b73f-cd4f12a55a5f-delayed-effects-of-temporary-weight-decay-in-muon.md)
- [CoReMem: Cost-Internalizing Memory for Successive Coding Tasks with Prospective Valuation](https://refivu.com/en/papers/e104c90e-8d89-4dc7-99ab-fd5ebe5db15e-coremem-cost-internalizing-memory-for-successive-coding.md)
- [Science Prediction Universe](https://refivu.com/en/papers/a7e7d76f-1d7b-492e-912f-84d45d06f6fb-science-prediction-universe.md)
- [Human or Synthetic? What a Fixed Budget Buys for Post-Training](https://refivu.com/en/papers/ebc91436-bab8-4ede-b9f3-76225691e038-human-or-synthetic-what-a-fixed-budget-buys.md)
- [Calibrate, Don't Retrain: Decomposing the Value of Annotator Disagreement in Cyberbullying Severity](https://refivu.com/en/papers/8c08c18f-ffcd-4d8e-9fef-9ac1fa6a8a00-calibrate-don-t-retrain-decomposing-the-value-of.md)
- [Almost Controlled: The FDR of Benjamini-Hochberg on Weighted Conformal p-Values](https://refivu.com/en/papers/67933ded-b4ac-4ad4-8798-567c2f63909e-almost-controlled-the-fdr-of-benjamini-hochberg-on.md)
- [Multi-CONDOR: Learning Multistable Motion Primitives from Demonstration](https://refivu.com/en/papers/a0e9dd9a-72f5-4996-b6e1-093315cbe221-multi-condor-learning-multistable-motion-primitives-from.md)
- [WiTac: Wrist-Informed Tactile Representations for Contact-Rich Manipulation](https://refivu.com/en/papers/bb927319-1baf-480e-ba83-7f0d6d19233c-witac-wrist-informed-tactile-representations-for-contact.md)
- [POKE: Probe Offline, Keep Efficiently for Vision-Language-Action Models](https://refivu.com/en/papers/f89bbf6a-69ff-4426-9edc-d43a8fad8607-poke-probe-offline-keep-efficiently-for-vision-language.md)
- [Breaking feature collapse in self-supervised time series encoders](https://refivu.com/en/papers/819f640a-5ad8-4d90-8850-3c039f21f3d1-breaking-feature-collapse-in-self-supervised-time-series.md)
- [A Convergence Analysis of the Random Feature Method for Linear PDEs](https://refivu.com/en/papers/e23ddbbe-6639-473b-8f15-06395434c589-a-convergence-analysis-of-the-random-feature-method.md)

## Terms in this paper

- [difference-in-differences](https://refivu.com/en/terms/7aa70e16c80e-difference-in-differences)
- [Vendi Score](https://refivu.com/en/terms/b20b0c222150-vendi-score)
- [BGE-base-en-v1.5](https://refivu.com/en/terms/e58be58b7a01-bge-base-en-v1-5)
- [DeBERTa-v3-base](https://refivu.com/en/terms/8a8aa04a0acc-deberta-v3-base)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/f5a62c1c-ca4f-4b4f-a5bb-ac167935507f-embedding-cosine-measures-text-length-before-it-measures)
