---
title: "Too Much in Common — paper by Biś et al. (2021)"
description: "Why Transformer word embeddings drift in a shared direction, how centering changes their geometry, and what improves on word similarity tests."
canonical: "https://research.elamur.ai/free/en/papers/bis-2021-too-much-common-shifting-embeddings/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/bis-2021-too-much-common-shifting-embeddings/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2021](https://md.research.elamur.ai/free/en/papers/2021/) / Too Much in Common: Shifting of Embeddings in Transformer Language Models and its Implications

# Too Much in Common: Shifting of Embeddings in Transformer Language Models and its Implications

Paper · 2021 · Daniel Biś, Maksim Podkorytov and Xiuwen Liu

**Authors:** Daniel Biś, Maksim Podkorytov and Xiuwen Liu · **Year:** 2021 · **Venue:** Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

[Cited by **20** papers in our library of more than 163,000 papers whose bibliographies we read](https://md.research.elamur.ai/free/en/papers/bis-2021-too-much-common-shifting-embeddings/cited-by/) · Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2021.naacl-main.403/)
- [PDF](https://aclanthology.org/2021.naacl-main.403.pdf)
- [DOI 10.18653/v1/2021.naacl-main.403](https://doi.org/10.18653/v1/2021.naacl-main.403)

## Summary

Words with different meanings can end up pointing in much the same direction in a language system’s vocabulary. This makes an angle between their vectors harder to interpret. Is it small because the words are closely related, or because nearly every vector carries a large component in the same direction? Daniel Biś, Maksim Podkorytov, and Xiuwen Liu investigate this question in BERT, RoBERTa, and GPT-2. Their starting point is a geometric distinction. A collection of vectors may look tightly packed when viewed from the origin even when the points are fairly well spread around their own center. The paper argues that much of the apparent collapse in these systems has this form, and demonstrates it by moving the origin to the mean of their [word embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/).

The authors trace the displacement to the way a prediction is trained. When a network predicts a token, the correct vocabulary entry gets an output-layer update towards the vector representing the current context. All competing entries get updates away from that vector, with magnitudes set by their predicted probabilities. The context changes, so the shared direction at one prediction can differ from the direction at another. Yet ordinary text contains a steep imbalance in token frequencies. Rare entries seldom receive the update reserved for the correct answer and often share the direction of the competing entries’ updates. The authors examine BERT vocabulary entries that were never used as inputs or correct answers during pretraining. Those entries point more nearly in the same direction as low-frequency entries than as frequent ones.

Subtracting the average vocabulary vector from every entry substantially improves the paper’s measure of isotropy, which gauges how evenly the vectors are distributed across directions. GPT-2 with 12 layers goes from 0.12 to 0.91 by that measure. RoBERTa-large starts at 0.07 and reaches 0.64 with mean subtraction, then 0.956 after removing additional principal components, the directions along which the centered vectors vary most. The change also matters for tests of word meaning. On the paper’s average across its word-pair benchmarks, RoBERTa-large’s inner-product score rises from 44.79 to 65.17 after full post-processing, measured as Pearson’s correlation multiplied by 100. Simple centering has mixed effects on those benchmarks, particularly for cased BERT. The evidence is strongest for a geometric explanation of what a vocabulary table looks like and for changes in how well its fixed vectors reflect human judgments of word pairs.

## Deep dive: Too Much in Common: Shifting of Embeddings in Transformer Language Models and its Implications

Why Transformer word embeddings drift in a shared direction, how centering changes their geometry, and what improves on word similarity tests. · about 35 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### What a vocabulary vector is expected to preserve

A vocabulary embedding gives a token a position in a space with many coordinates. Each coordinate contributes to comparisons among tokens, and a single coordinate can play a part in many of those comparisons. Earlier work discussed by the paper helped establish the value of these representations. Training on text can place words with similar uses near one another and preserve relationships that are useful across examples. That creates a way for a system to handle an unfamiliar sequence using what it has learned from related sequences. The paper situates its work in this tradition, which includes the static vectors learned by [GloVe](https://md.research.elamur.ai/free/en/papers/pennington-2014-glove-global-vectors-word-representation/) and [Efficient Estimation of Word Representations in Vector Space](https://md.research.elamur.ai/free/en/papers/mikolov-2013-efficient-estimation-word-representations-vector/).

There are two different kinds of representation in the paper. One is a fixed vocabulary row, retrieved whenever the system sees its token. The other is a representation computed during the processing of a particular sequence. Its value depends on the other tokens available to the network and on the transformations performed in its layers. A fixed embedding can therefore supply information to many different context-dependent representations. The experiments inspect the fixed rows, while the explanation of training also needs the context-dependent vectors that produce predictions. The distinction determines which part of the system is being diagnosed and which part helps produce the diagnosis.

The paper motivates the issue with a sentence describing a building as dilapidated. Substituting *ruined* preserves much of the relevant meaning, while *reconditioned* changes it substantially. Yet *dilapidated* and *reconditioned* are both relatively uncommon. A space in which rarity tends to bring vectors together might therefore put the opposing descriptions unusually close. If the system uses similarity in representation to generalize across sequences, the distinction between the descriptions needs to survive somewhere in the computation. The example illustrates why the location of rare words in a vocabulary table is worth studying, even though the table is only the starting point of a contextual computation. It is a question about the geometry of [lexical semantics](https://md.research.elamur.ai/free/en/concepts/lexical-semantics/).

The introduction connects this concern to earlier tests that replaced words in inference examples with less frequent synonyms. Those substitutions preserve the intended relationship between the sentences while changing the frequency of some of the words the system has to handle. The reported performance figures come from earlier studies, and the paper uses them to motivate a question about training. Why should vocabulary entries be harder to learn at the rare end when the network has already seen a large collection of text? The inference dataset in that discussion is [MultiNLI](https://md.research.elamur.ai/free/en/papers/williams-2018-broad-coverage-challenge-corpus-sentence/).

#### Why splitting words leaves a frequency imbalance

Rare words can be split into smaller pieces so that a system can process them through a fixed vocabulary. The paper discusses Byte-Pair Encoding and WordPiece, whose vocabulary construction starts from basic symbols and iteratively forms larger units. Frequent combinations are more likely to become entries in their own right. Common words can thus stay intact, while unusual words are more frequently represented by sequences of pieces. The authors ask whether using these pieces enough times, across different words, makes the resulting training targets substantially more balanced. This is a question about the sequence of units supplied by [subword tokenization](https://md.research.elamur.ai/free/en/concepts/subword-tokenization/).

A token count and a word count measure different things. A token can be a whole word or part of one. Splitting an unusual word may let the network reuse a piece it has learned elsewhere, which is one reason the paper gives for retaining the approach. A training objective still receives whatever distribution of targets the resulting sequence contains. If a small group of units covers a large part of that sequence, the competition among vocabulary entries remains highly unequal. An infrequent piece can consequently face a version of the same learning problem as an infrequent whole word.

The relevant regularity is the steep fall in frequency as units are ordered from common to rare. It means that even a token near the top of the vocabulary usually accounts for only a portion of the events at which the network makes predictions. A token farther down the order has fewer occasions to be the correct answer. The authors use this imbalance to connect an observation about text to one about training. Different entries can have very different opportunities to receive a target update, while sharing many occasions on which some other token is the target. Their discussion draws on [Zipf’s law](https://md.research.elamur.ai/free/en/concepts/zipfs-law/).

#### Why a narrow cone was a plausible explanation

Earlier studies had observed that representations from Transformer systems favor particular directions. A common way to see such anisotropy is to examine the singular values of the matrix whose rows are the vocabulary vectors. A large leading singular value means that the matrix has much more strength along its leading direction than it has along directions with small singular values. Earlier researchers interpreted the steep spectrum, together with other evidence, as indicating that vectors were confined to a narrow region. The paper discusses this account in connection with [Representation Degeneration Problem in Training Natural Language Generation Models](https://md.research.elamur.ai/free/en/papers/gao-2019-representation-degeneration-problem-training-natural/).

There is an ambiguity in that measurement. A direction can dominate because the cloud genuinely varies much more along that axis. It can also dominate because the entire cloud sits far from the origin along that axis. In the second case, directions measured from the origin will frequently look similar even if the spread around the cloud’s own center is fairly even. Distinguishing displacement from uneven spread matters because moving every point by the same amount is a much simpler intervention than changing the shape of the cloud. Earlier comparisons of representation geometry gave the authors a reason to ask how much of the phenomenon was visible from the choice of origin. [How Contextual are Contextualized Word Representations?](https://md.research.elamur.ai/free/en/papers/ethayarajh-2019-how-contextual-are-contextualized-word/)

The paper also describes earlier interventions. Work on static embeddings had used mean subtraction and principal-component removal. Other work introduced training regularization to discourage excessive similarity among vocabulary vectors, or reparameterized the embedding matrix so that the decay of its spectrum could be controlled directly. Approaches to rare words had incorporated information from their written forms, obtained representations from the contexts in which they occur, or combined those sources. These lines of work addressed practical symptoms. Biś and colleagues ask what the prediction objective itself does to a vocabulary table while training is in progress. That question is particularly concrete when the input lookup table also supplies the vectors that score output candidates, the arrangement described in [Tying Word Vectors and Word Classifiers](https://md.research.elamur.ai/free/en/papers/inan-2016-tying-word-vectors-word-classifiers/).

### The method, step by step

#### Follow a token from its context to the vocabulary scores

The paper combines an analysis of training with an experiment on the resulting vocabulary tables. The analysis begins with a single prediction. The experimental part takes tables from already pretrained systems, examines their geometry, and transforms them for direct word-pair comparisons. The distinction matters when interpreting the post-processing. The authors use a derivation to understand how a displacement can arise, then use the tables left behind by training to test whether a common displacement is visible and whether subtracting it changes the scores.

From token prediction to tests of embedding geometry The steps in order.

To make a prediction, the network first produces a vector for a position in the sequence. Its components summarize the context available for that prediction. It then compares the vector against the entries in its vocabulary table. A token receives a high raw score when its row and the context vector have a large inner product. An inner product multiplies matching coordinates and sums the products. The softmax converts the resulting scores into probabilities by exponentiating each one and dividing by the total of those exponentials across the vocabulary.

The training examples supply the correct token. In an autoregressive objective such as the one discussed for GPT-2, the correct answer at a position is the next token relative to the prefix the system has been given. In masked prediction, used in [BERT](https://md.research.elamur.ai/free/en/papers/devlin-2019-bert-pre-training-deep-bidirectional/) and [RoBERTa](https://md.research.elamur.ai/free/en/papers/liu-2019-roberta-robustly-optimized-bert-pretraining/), selected positions in a sequence become prediction targets. The network receives a corrupted version of the input and can use information on both sides of a masked position. The paper uses these objectives to show that different ways of constructing contexts can share the same output scoring mechanism. The blocks that construct those contexts use the [Transformer and attention](https://md.research.elamur.ai/free/en/concepts/transformer/).

#### Write the objectives in terms of the correct token

For autoregressive prediction, the probability of the sequence is factored into conditional probabilities, one for each target token given the prefix. The paper maximizes the log of that probability. Taking a log turns the product of conditional probabilities into a sum. The following form writes the per-position scoring with the inner product and softmax explicitly.

```
maximize over θ: log pθ(w) = ∑ₜ₌₁ᴺ log [ exp(⟨hθ(w₁:ₜ₋₁), e(wₜ)⟩) / ∑ᵤ∈ⱽ exp(⟨hθ(w₁:ₜ₋₁), e(u)⟩) ]
```

Here θ is the collection of learned parameters, and pθ(w) is the probability assigned to the token sequence w. The sequence has length N, t indexes its positions, wₜ is the correct token at position t, and w₁:ₜ₋₁ is the prefix before it. The function hθ maps that prefix to the output vector for the prediction. The function e returns a token’s embedding row, u ranges over the vocabulary V, and the brackets ⟨ , ⟩ denote an inner product. The exponential is written exp, the logarithm is log, and each ∑ adds over the indices displayed next to it. The numerator is the exponential score of the correct entry. The denominator is the total exponential score of all entries, including the correct one. The paper leaves the output bias out of this expression.

For masked prediction, the paper writes the objective in terms of the likelihood of the selected tokens given the corrupted sequence. The terms in its approximation score the designated positions separately using their own context representations. Each such representation can depend on the available tokens on either side of its position. The correct target in every term is drawn from the original sequence.

```
maximize over θ: log pθ(w̄ | ŵ) ≈ ∑ₜ₌₁ᴺ mₜ log pθ(wₜ | ŵ)
```

Here θ again denotes the learned parameters. The original sequence has N tokens and wₜ denotes its token at position t. The corrupted input is ŵ, while w̄ denotes the tokens chosen for prediction. The vertical bar means “conditioned on,” so the probability terms use ŵ as their input context. The indicator mₜ equals 1 at a masked position and 0 elsewhere. The sum therefore includes only terms for the selected positions. The symbol ≈ gives the approximation used to express the objective as a sum of position-wise log probabilities.

The calculation of a masked token’s probability uses the same normalization over the vocabulary as the autoregressive case. The vector fed to that normalization comes from the network’s output at the designated position in the corrupted sequence. Several positions in the same sequence can contribute terms to the objective from a single input. The fact that they share an input does not require their context vectors to coincide. Each prediction has its own set of probabilities and its own gradient direction at the output.

The paper also expresses both objectives as losses to minimize. The loss is an average negative log probability. It gets smaller as training assigns more probability to the observed tokens.

```
J(θ) = −E₍w∼data₎[log pθ(w)]
```

Here J is the autoregressive training loss, θ contains the parameters that determine probabilities, and pθ(w) is the probability of the sequence w. The expectation operator E averages over sequences drawn from the training data, as indicated by w∼data. The negative sign converts maximizing the log probability into minimizing the loss.

```
J(θ) = −E₍w∼data₎[log pθ(w̄ | ŵ)]
```

Here J is the masked prediction loss and θ again denotes the parameters. The expectation averages across sequences w drawn from the data. As in the masked objective, w̄ denotes the selected targets and ŵ the corrupted input. The log probability being averaged is the one assigned to those targets given the input. The negative sign gives a loss to minimize.

#### Trace the two routes into the shared table

The vocabulary table has a row for every possible token and a column for each embedding coordinate. In a weight-tied system, an occurrence of a token at the input retrieves a row from the same table that the output uses to score that token. These uses create two routes by which the loss can change the table. One runs directly through the output scores. The other runs through the layers that produced the context vector and into the input embeddings. The paper isolates the output route to explain what ties the updates of competing entries together.

For a single prediction, it is convenient to write the context vector as a column, so multiplying the vocabulary table by this vector returns one score per row. This is an orientation convention. With a row context vector, the same calculation uses the transpose of the vocabulary table on its right.

```
f = W h
```

Here W is the vocabulary table, h is the context vector for the prediction, and f is the vector of raw scores, also called logits. The multiplication computes an inner product between h and every row of W. In autoregressive prediction, h is produced at the position preceding the chosen target. In masked prediction, h comes from the position being predicted.

```
y = softmax(f)
```

Here y contains the predicted probabilities, f contains the logits, and softmax is the exponential normalization over all vocabulary entries. The paper denotes the true distribution by ŷ. At the correct token its value is 1, and every competing token has a value of 0. The difference between the predicted and true distributions governs the direct output-layer gradient.

```
∂Jₜ/∂W = (y − ŷ) hᵀ
```

Here Jₜ is the loss contribution of the single prediction indexed by t, and ∂Jₜ/∂W is its direct gradient with respect to the output use of the table W. The vectors y and ŷ give the predicted and true probabilities. The superscript ᵀ transposes the context column h to a row. Their product on the right is an outer product, yielding a matrix with the same shape as W. Each vocabulary row is a copy of the context direction multiplied by the corresponding entry of y − ŷ. This expression treats h as fixed while taking the direct derivative through the output scores.

```
W′ = W − η (y − ŷ) hᵀ
```

Here W′ is the table after applying this gradient term, W is the table before it, and η is the learning rate. The probability difference y − ŷ and the transposed context hᵀ are the same as in the gradient. Subtracting the gradient makes the direct update for a competing token point opposite h, with a magnitude proportional to the probability the system assigned that token. For the correct token, the probability difference is the predicted probability minus 1. Subtracting that row’s gradient makes its update point toward h.

For a competitor that already has a high predicted probability, the output loss has a stronger reason to reduce its score. Its update is therefore larger than that of a token to which the network gave very little probability. Two competing entries can move along the same direction by quite different amounts. Their initial positions also differ, so their distances and angles can change differently. What is common is the direction contributed by this particular prediction, which is why the authors call it the common enemies effect.

This picture concerns one target and one context vector. A training sequence, or a batch of sequences, can contribute many such directions to the same parameter update. A token can be the correct answer for some predictions and a competitor for others. The input route adds further contributions for entries used in the sequence. The simple row-wise rule is valuable precisely because it identifies a contribution that is present even for vocabulary entries absent from the input. It also shows how a shift can develop while the rest of the parameters are changing. The context vector h depends on those parameters and may change on a later encounter with the very same context.

#### Measure displacement and directional balance

The authors illustrate the geometric issue with points sampled from spheres. One set is centered at the origin, and another is displaced. Singular value decomposition identifies directions that are prominent in a matrix viewed from the origin. When a spherical cloud is displaced, the displacement direction becomes more prominent in that calculation, and projecting the points onto leading singular directions can make them appear to occupy a narrow angular region. The comparison supplies a case where the origin accounts for the appearance. The authors then make corresponding projections for the pretrained tables and repeat them after centering.

The mean is taken over vocabulary entries, with each row contributing equally to the calculation. Its direction points from the origin to the centroid of the table. Its length is one measure of how substantial the shared offset is. The authors compare that length with the average length of the individual embeddings, since the same offset can have different geometric significance in tables with different vector norms.

```
μ = (1 / |V|) ∑ᵤ∈ⱽ e(u)
```

Here μ is the mean embedding, V is the vocabulary, |V| is its number of entries, u ranges over those entries, and e(u) is the embedding of u. The sum adds vectors coordinate by coordinate. Dividing by the number of entries makes this an average across the table, independent of how frequently each entry appears in running text.

To quantify directional balance, the paper uses a partition function. It asks how the vocabulary responds to a probe pointing along a chosen direction. Each vector contributes the exponential of its projection onto the probe, and the contributions are summed. A direction along which many vectors have large positive projections can give a higher value than a direction along which their projections are small. The intuition is that a directionally balanced table should have similar totals across the probe directions.

```
Z(c) = ∑ᵤ∈ⱽ exp(⟨c, e(u)⟩)
```

Here Z(c) is the partition function evaluated at direction c, a vector of unit length. The token u ranges over the vocabulary V, and e(u) is its row in whichever version of the table is being measured. The inner product ⟨c, e(u)⟩ gives the signed projection of the embedding onto c. The function exp exponentiates that projection, and the sum combines the resulting values.

```
I(W) = min₍c∈X₎ Z(c) / max₍c∈X₎ Z(c)
```

Here I(W) is the isotropy score for table W. The set X consists of eigenvector directions of WᵀW, where Wᵀ is the transpose of W. The numerator is the smallest partition-function value over those test directions, and the denominator is the largest. The paper gives the score a range of 0 to 1, with values nearer 1 indicating closer agreement among those directions. X is a finite selection from the possible directions in the space. For an uncentered matrix, its eigenvectors describe variation measured with respect to the origin, which helps explain why the leading one can align with the mean.

#### Apply the transformations in vocabulary space

The first intervention subtracts the same vector from every row. This relocates the cloud while preserving the difference vector between any pair of points. The relocation can still change cosine similarity and inner products, since both depend on vectors relative to the origin. This is the simplest test of how strongly a common offset influences scores intended to describe relationships among words.

```
W̃ᵢ = Wᵢ − μ
```

Here Wᵢ is row i of the original table, μ is the vocabulary mean defined above, and W̃ᵢ is the corresponding centered row. The full set of centered rows is written W̃. In the isotropy results, the paper also calls the mean-centered table Wc.

The second intervention, scaled centering, first normalizes each original vector to unit length to estimate a common direction. This makes a long vector and a short one contribute equally in length to the calculation of the average. It then scales the subtraction for each entry by the length of that entry’s original vector. A long embedding thus receives a larger correction than a short embedding. The motivation comes from observations connecting vector length and frequency, and from the paper’s finding that rare entries more visibly share the effects of the output update.

```
μ̂ = (1 / |V|) ∑ᵤ∈ⱽ [e(u) / ‖e(u)‖₂]
```

Here μ̂ is the mean of the normalized vectors. The set V and its size |V| identify the entries and divisor, u indexes an entry, and e(u) is its original vector. The notation ‖e(u)‖₂ gives its Euclidean length. Dividing by that length gives the vector with the same orientation and unit length. The average μ̂ is used directly in the correction.

```
e′(u) = e(u) − ‖e(u)‖₂ μ̂
```

Here e′(u) is the scaled-centered embedding of token u. Its original vector is e(u), its original length is ‖e(u)‖₂, and μ̂ is the average of the normalized vocabulary vectors. The product scales the common correction by that token’s original length before subtracting it. Because the correction varies in size, scaled centering can change how far apart the endpoints of two vectors are.

The third intervention follows earlier post-processing work and removes leading principal components after centering. A principal component describes an axis of variation through the centroid. The paper applies principal component analysis to the centered table to identify those axes. It then subtracts the projection of each centered row onto the leading axes selected for removal.

```
U = PCA(W̃)
```

Here PCA denotes principal component analysis, W̃ is the mean-centered table, and U is the ordered collection of its principal directions. The leading directions are those along which the centered data vary most.

```
Ŵᵢ = W̃ᵢ − ∑ⱼ₌₁ᴰ ⟨Uⱼ, W̃ᵢ⟩ Uⱼ
```

Here Ŵᵢ is the fully post-processed row and W̃ᵢ is the corresponding mean-centered row. The index j selects a component Uⱼ from U, and D is the number selected for removal. The inner product gives the amount of W̃ᵢ in direction Uⱼ. Multiplying by Uⱼ yields the vector contribution to subtract, and the sum combines those contributions. The paper calls this result Wr in its isotropy comparisons.

```
D = ⌈d / 100⌉
```

Here d is the width of an embedding, D is the number of components removed, and the ceiling brackets indicate rounding upward to an integer. The divisor 100 is the rule the paper follows from the earlier post-processing method. In its version of the projection subtraction, the authors use the centered row inside the projection term and report that this choice was more effective in their experiments.

#### Relate post-processing to a regularizer used in training

The paper also connects its displacement interpretation to an earlier penalty on average similarity among vocabulary vectors. The penalty uses normalized rows, so the inner product between any pair is their cosine similarity. Its double sum takes contributions from distinct pairs. The algebra behind the connection is that the squared length of the sum of the normalized vectors contains all those pair terms, plus the self-inner-products. Since every normalized vector has unit length, the self-terms together give a constant for a fixed vocabulary.

```
CosReg = (1 / N²) ∑ᵢ₌₁ᴺ ∑ⱼ≠ᵢ ⟨v̂ᵢ, v̂ⱼ⟩
```

Here CosReg denotes the cosine regularizer, N in this derivation is the number of vocabulary entries, and i and j index those entries. The vectors v̂ᵢ and v̂ⱼ are their unit-normalized embeddings. The brackets give the inner product, and the condition j≠i excludes self-pairs. The squared vocabulary size N² supplies the prefactor used in the derivation.

```
‖(1 / N) ∑ᵢ₌₁ᴺ v̂ᵢ‖₂²
```

This expression is the squared length of the mean of the normalized vectors. The index i ranges over all N entries, v̂ᵢ is the normalized vector for entry i, and ‖ ‖₂² denotes squared Euclidean length. Expanding that square yields the same cross-entry terms as CosReg, with the constant self-terms included. The two quantities therefore favor the same solutions when minimized over vectors in a fixed vocabulary. The connection gives a geometric reading of the earlier regularizer. It discourages a large shared mean direction among normalized embeddings. The post-processing experiments in this paper use existing pretrained tables. The authors make the code and datasets for their study available in the accompanying repository.

### Experiments and results

#### How much of the geometry changes with the origin?

The geometric evaluation starts from pretrained BERT, RoBERTa, and GPT-2 vocabulary tables. Each unmodified table serves as its own baseline. The authors measure it again after subtracting the mean, and then after centering and removing the leading principal components. They also inspect the leading singular directions and singular values. The projections give a visual account of the change, while the partition-function ratio quantifies directional balance on a defined set of probes.

In the projections for RoBERTa-large and GPT-2 with 12 layers, the original clouds look narrow when viewed with respect to the origin. After centering, the plotted clouds spread around the new origin and look more rounded. The associated spectra show how strongly the largest singular direction had influenced the original view. These figures connect the behavior of actual vocabulary tables to the experiment with sampled spheres. They also put the table of isotropy results in context, since an increase in the score can be read alongside a visible change in the distribution.

RoBERTa-large vocabulary table isotropy across post-processing settings Mean subtraction accounts for a substantial rise, and removing leading components raises the score further.

**The numbers**

| System or setting | partition-function isotropy ratio |
| --- | --- |
| Original vocabulary table | 0.07 |
| Mean centered | 0.64 |
| Centered with leading components removed (this paper) | 0.956 |

RoBERTa-large has the lowest initial isotropy among the systems measured. The centered table reaches 0.64 and has more directional structure left by this measure than the other centered tables. RoBERTa-base moves from 0.50 in the original table to 0.87 after centering and 0.959 after component removal. The difference between the variants illustrates why the mean and the leading directions after centering are measured separately. A comparison based only on the original spectrum would mix their effects.

In BERT-base-uncased, the isotropy values for the original, centered, and fully processed table are 0.39, 0.98, and 0.998. The corresponding values for BERT-base-cased are 0.59, 0.98, and 0.996. Both reach almost the same score after centering even though they start at different points. The large BERT variants also change markedly with the translation. BERT-large-uncased moves from 0.44 to 0.97 with centering, while BERT-large-cased moves from 0.52 to 0.96. Most of the gain observed by the metric for these BERT tables is visible as soon as their common mean is removed.

The original GPT-2 table with 12 layers has isotropy of 0.12. Centering raises this to 0.91, and component removal yields 0.969. For GPT-2 with 24 layers, the corresponding values are 0.52, 0.95, and 0.981. These are comparisons of transformations within each table. They establish that the measured contribution of the mean can be substantial for both masked prediction and autoregressive prediction.

The paper reports vector lengths to indicate how large the recentering step is relative to the entries it moves. For RoBERTa-large, the Euclidean length of the mean is 2.53, the average embedding length is 4.36, and the reported ratio is 0.58. For RoBERTa-base the corresponding measurements are 0.57, 3.65, and 0.16. The leading eigenvector of RoBERTa-large’s uncentered matrix product has a cosine similarity of 0.99 with its mean vector. In this case, a direction that stands out in the uncentered decomposition points almost the same way as the centroid itself.

#### Do the scores track human judgments of words more closely?

The word-pair experiments ask whether the transformations change agreement with people’s ratings. The benchmarks involve a distinction between similarity and broader relatedness. Two words may be associated because they belong to the same situation or subject, even if their meanings differ. SimLex-999 emphasizes similarity, MEN measures relatedness, and WordSim353 has portions analyzed for both. Stanford Rare Words tests similarity with a rare word in each pair. These tasks probe several aspects of [semantic similarity](https://md.research.elamur.ai/free/en/concepts/semantic-similarity/). SimLex-999

The evaluation pairs must be represented in the fixed vocabulary table. The authors filter samples involving sub-word units, so the usable pairs depend on the system’s tokenizer. Each transformation of a given table can be compared on the same eligible pairs. Scores for different tables can involve different subsets of the benchmark. As a result, the key comparisons are the changes from the original table to its processed versions within a given system, rather than standings between systems on nominally identical datasets.

Each eligible pair receives a score from either the raw inner product or cosine similarity. The inner product reflects both orientation and vector length. Cosine similarity divides out both lengths, so it uses the angle between the vectors. The Pearson correlation compares these scores with human ratings across pairs. The paper reports Pearson’s r × 100, which is a correlation scale, not a percentage of correctly answered questions. Its main table averages the results across the word-pair evaluations, and its appendix gives the results separately for the filtered benchmark portions.

RoBERTa-large on the word-pair benchmark average using inner products All the transformations improve agreement with human judgments, with full post-processing giving the highest average.

**The numbers**

| System or setting | Pearson’s r × 100 |
| --- | --- |
| Original vocabulary table | 44.79 |
| Mean centered | 63.78 |
| Scaled centered | 64.16 |
| Centered with leading components removed (this paper) | 65.17 |

RoBERTa-large illustrates how much the outcome can depend on the word-pair scoring rule. Its cosine-based benchmark average starts at 61.29, reaches 64.09 after ordinary centering, and reaches its highest value of 65.49 with scaled centering. Full post-processing gives 64.38 on that same cosine evaluation. The inner-product baseline starts lower, and after full post-processing it reaches 65.17. In this case the transformation with the highest cosine average differs from the transformation with the highest inner-product average.

RoBERTa-base starts at 66.81 with cosine and 66.01 with inner products. On the same benchmark average, scaled centering gives 67.02 using cosine, and full post-processing gives 67.15 using inner products. The best values are close to the original table’s scores. This contrast within the RoBERTa family gives the reader some scale for interpreting the large variant’s results. An intervention that visibly changes the spectrum may have a small effect on correlations if the original word-pair scores already work well under the relevant scoring rule.

GPT-2-small’s average cosine score goes from 64.71 in the baseline to 67.85 after full post-processing. Its inner-product average moves from 59.45 to 67.67 under the same comparison. GPT-2-medium shows a different ordering among the stronger transformations. Its inner-product average is 59.20 in the original table, 67.90 with ordinary centering, 68.22 with scaled centering, and 67.81 after full post-processing. For its cosine average, full post-processing gives 68.05, compared with 65.53 for the original embeddings. These results tie the usefulness of a correction to the way the resulting vectors are compared.

The cased BERT results show why it matters to report the unmodified baseline beside every intervention. BERT-base-cased has a cosine average of 62.29 initially and 60.44 after mean subtraction alone. With full post-processing it reaches 65.57. BERT-large-cased moves from 61.90 initially to 58.66 with ordinary centering and then reaches 65.72 with full post-processing. On the inner-product average, full post-processing gives 66.10 for BERT-base-cased and 65.89 for BERT-large-cased, compared with their original values of 60.91 and 59.42. The near-unity isotropy scores reached by simple centering in these tables coexist with a drop on the cosine-based semantic average.

#### How the aggregate relates to individual datasets

The appendix separates the benchmark portions, making it possible to see which evaluations supply strong gains and which favor another setting. For RoBERTa-large, the WordSim353 relatedness portion gives an inner-product correlation of 27.47 for the original table. The value is 56.19 with scaled centering and 60.36 with full post-processing. Using cosine for the same portion, the corresponding values are 50.69, 59.35, and 59.71. The relatively low unprocessed inner-product score leaves substantial room for a geometric correction to change its agreement with the ratings.

Stanford Rare Words offers a more direct check on the frequency motivation. For the eligible RoBERTa-large pairs, the inner-product score is 49.72 with the original table, 63.09 with scaled centering, and 63.11 with full post-processing. Using cosine, the original table gives 64.31, scaled centering gives 65.63, and full post-processing gives 63.64. The benchmark thus supplies evidence for gains on rare-word pairs, with the direct comparison again depending on how the vectors are scored.

For SimLex-999, the RoBERTa-large cosine results favor the original vectors among the settings shown in the appendix. The baseline score is 54.54, scaled centering yields 54.18, and full post-processing yields 50.93. On that same filtered benchmark, the inner-product score moves from 45.75 to 55.24 with scaled centering, then to 52.48 with full post-processing. The agreement between original cosine scores and human ratings can hold up well while the corresponding inner products improve. When the aggregate favors a transformation, the individual results show which relationships gained from it and which were better preserved in another setting.

### What the ablations show

#### Translating the cloud isolates the role of its mean

The experiment with sampled spheres is the paper’s cleanest geometric control. Both sets of points come from spherical distributions. The manipulated feature is where the sphere sits relative to the origin. When the sphere is displaced, the spectrum becomes less even and an origin-based view can make the vectors appear confined to a small angular region. There is no vocabulary or language learning in this example. Its purpose is to show that the observed spectral signature has a simple geometric explanation that is compatible with substantial spread around the centroid.

The pretrained-table comparison turns this demonstration into an empirical test. Holding the vocabulary and its original pairwise differences fixed, the authors move the origin to the center of the table. The large change in the score for GPT-2 with 12 layers and for several BERT variants shows that the metric had been responding strongly to the shared offset. The unusually close alignment between RoBERTa-large’s mean and leading uncentered eigenvector independently supports the same interpretation for that table. The point of the control is that ordinary centering has a sharply defined effect. The rest of the geometry is still available for inspection after the mean has been removed.

The further improvement from principal-component removal reveals directional structure around the centroid. RoBERTa-large is the clearest case because the centered table still has a low score relative to the other centered tables in the comparison. Mean subtraction and component removal therefore diagnose different contributions to an uneven spectrum. The first acts on the cloud’s position. The second acts on the cloud’s spread by deleting variation along selected axes. Because the latter removes differences among entries, the word-pair evaluation matters for deciding what that improvement in isotropy corresponds to semantically.

#### Unused entries isolate a route by which drift can arise

BERT contains 994 reserved entries that were never used as inputs or correct targets during pretraining. They nevertheless occupy rows in the shared table and are available to the output softmax as competing entries. This makes them a revealing comparison group. They lack two kinds of training signal that ordinary tokens receive, namely use as an input and the positive output update for a correct prediction. Their negative output updates still depend on their predicted probabilities. The authors use the resulting rows to ask which ordinary tokens have moved in related directions.

They group entries in the cased BERT-base vocabulary by index. Higher indices generally correspond to rarer entries because of the vocabulary construction, though actual frequency depends on the corpus. The average cosine similarity with the unused entries is 0.27 for the index range [2000-3000]. It reaches 0.63 for entries in [28500-29500]. The paper’s plot traces the pattern across bins, so the two reported values illustrate a broader tendency. As the entries grow rarer by this proxy, their vectors become more aligned with those that learned from competing output updates without ever serving as ordinary inputs or targets.

RoBERTa provides a comparison with a different reference group. The authors use the last 1000 vocabulary entries and report a similar pattern. Those rows represent a rare end of a vocabulary and the evidence they supply is correspondingly different from the BERT comparison with explicitly unused entries. Together the observations are consistent with a stronger shared update effect toward the rare end. The unused-token test gives the mechanism a concrete empirical signature, since it examines entries for which the output competitor route is directly relevant throughout pretraining.

#### Frequency counts test whether the training imbalance survives segmentation

The authors also test the frequency premise directly. They apply BERT’s WordPiece tokenizer to the CNN News corpus and compare the resulting token distribution with word frequencies in the appendix. Over 30% of the tokenized corpus is covered by the 13 most frequent tokens. The 85 most frequent tokens account for 50%, and reaching at least 98% coverage requires almost 15,000 tokens. These are coverage statistics for running tokens in the corpus. They describe how frequently the units occur in text, as distinct from the number of entries taking up rows in a vocabulary table.

The combination of concentration at the top and a long tail is the relevant observation for the gradient argument. Changing the unit from words to pieces gives uncommon words some access to shared representations, while the target counts remain highly unequal. A large share of prediction events can still be concentrated among common entries. Tail entries have relatively few chances to receive direct positive output updates. The coverage analysis supports that premise in a concrete corpus independently of the geometric comparisons on pretrained tables.

#### Scoring with and without vector length separates two effects

The comparison between cosine and inner product asks whether length-dependent contributions matter to agreement with human ratings. The inner product uses the full size of each vector. The cosine changes the emphasis to orientation, which can protect it from some differences in length while leaving it sensitive to a common direction. In the original GPT-2 and RoBERTa-large tables, the paper finds an appreciable gap between the cosine and inner-product averages. The much stronger inner-product results after centering show that the contribution of lengths and shared components can have a large effect on practical word-pair scores.

Scaled centering gives this comparison a more specific interpretation. The direction is estimated using unit-normalized entries, and the amount removed from an entry depends on its original norm. That changes both how the common direction is estimated and how the subtraction is applied. It often gives a stronger benchmark average than ordinary centering. In GPT-2-medium’s inner-product evaluation it even gives the highest reported average among the tested settings. This supports treating the magnitude of the correction as part of the problem. Because the procedure changes both ingredients together, the experiment supports the combined transformation more directly than it supports either ingredient in isolation.

BERT-large-cased on the word-pair benchmark average using cosine similarity Ordinary and scaled centering lower the average, while removing leading components after centering gives the strongest result.

**The numbers**

| System or setting | Pearson’s r × 100 |
| --- | --- |
| Original vocabulary table | 61.90 |
| Mean centered | 58.66 |
| Scaled centered | 61.18 |
| Centered with leading components removed (this paper) | 65.72 |

BERT-large-cased supplies a counterexample to a simple ordering of the transformations by semantic benefit. Its plain centering is very effective by the geometric metric. The cosine benchmark average still falls, and scaling the correction restores only part of the lost agreement. Removing the leading components following centering raises the average above the original one. This comparison shows that the useful decision concerns which structure a scoring rule emphasizes after the transformation. A single score for isotropy can summarize directional balance without predicting every change in the ordering of word-pair scores.

#### The norms help describe the shift

In an appendix analysis across the tested tables, the authors report a correlation of negative 0.61 between the average vector norm and isotropy. They also observe that the ratio of mean length to average embedding length tends to be larger for less isotropic tables. The two analyses ask related questions. One describes the typical distance of an embedding from the origin. The other scales the displacement of the centroid by that typical distance. Their trends make vector length an informative quantity to examine alongside a spectrum or a projection.

The paper also plots how centering changes the distributions of embedding norms in BERT-large-cased and RoBERTa-large. A single translation can change the distance to the origin by different amounts for different entries, depending on their original directions. Thus even the simplest intervention can affect a length-sensitive scoring rule without modifying any of the differences between endpoints. This helps explain why a comparison based purely on distances between points would answer a different question from the inner-product and cosine evaluations in the paper.

### Limitations

#### Limits the authors identify

The authors describe the isotropy score as an approximation. Ideally the partition function would be compared over all directions. In practice, the paper tests eigenvector directions of the embedding matrix product. A ratio close to 1 means that the tested directions produce similar partition values. It gives a finite directional check on a high-dimensional table. The score is particularly helpful for consistent comparisons of alternative transformations, and the evidence about the shape of the cloud also rests on the singular values and projections.

The paper explicitly leaves open why the different pretrained systems have different amounts of displacement and residual directional structure. The authors suggest that RoBERTa’s longer pretraining might contribute to a larger shift. They also suggest that a larger corpus and dynamic masking might expose the network to a greater variety of shift directions. These are hypotheses about training differences that occur together in the systems examined. The appendix likewise leaves the relationships among embedding norms, isotropy, corpus size, training duration, and weight decay to further study.

Another open question is how the later layers use a vocabulary with a large shared component. The authors cite earlier work suggesting that neural networks can learn to remove an embedding mean and raise the possibility that Transformer systems perform some implicit centering. Their own experiments measure fixed vocabulary rows. Their discussion proposes a feedback process in which more similar embeddings lead to more similar context representations, which can in turn drive more collective movement. The output-gradient result gives a mechanism that could participate in such a process. The evolution of that feedback and its relationship to task performance are left open.

The reported benchmark comparisons also have a scope the authors emphasize. Each vocabulary permits a different subset of word pairs after the filtering step. The semantic experiments consequently support comparisons before and after processing within the same vocabulary. The cited standings on downstream tasks supply context for the observation that RoBERTa-large can be effective despite its low initial isotropy. They come from evaluations distinct from the tests in which the authors transform its embeddings.

#### Limits that follow from the setup

The direct gradient derivation establishes the direction of one term for one prediction. The input route, the combination of losses over positions and examples, and the changing context vectors all matter to the eventual trajectory. A shared direction in the direct output term explains why many entries can move together. A guarantee of a particular final displacement would require additional assumptions about the sequence and relative size of those directions. The endpoint measurements and the unused rows are evidence that a displacement occurred and that the mechanism is relevant in the examined tables. They do not measure how much of the final displacement comes from each route through training.

The geometric results are strongest where the question concerns the origin. The sampled spheres establish that a steep singular spectrum can accompany spread around a displaced center, and the measured changes after centering show that this issue matters empirically for the pretrained tables. Claims about the full distribution of an embedding cloud have a broader scope. The projections retain leading directions, and the score samples a finite set of probes. Comparable-frequency entries can still form clusters in the centered representations. Different axes and subsets of entries can thus retain meaningful structure beneath a high aggregate isotropy score.

The rare-word evidence covers different objects in different experiments. Vocabulary index is a proxy for frequency in the unused-token comparison. The CNN News counts concern a tokenized corpus. The Stanford Rare Words results concern the subset of benchmark pairs supported by each vocabulary. A gain on those pairs says something about rare words with usable fixed entries. Understanding a rare word assembled from multiple pieces requires a further account of how the network combines them in context. Similarly, connecting a shared direction to rare-word inference errors would require measuring the effect within an end-to-end inference task.

Finally, changing a table for a word-pair evaluation and changing it inside a predictor are separate experiments. In an operating weight-tied system, the same table also determines the vectors supplied at the input. Altering it there can change the context vectors and the scoring of vocabulary entries together. The results reported here come from comparing fixed embeddings directly with human judgments. That scope supports the paper’s interpretation of semantic geometry and leaves the effect of reinserting a processed table into the original system an empirical question.

### What came after

Later citing work takes up questions about the geometry of representations, the quality of particular vocabulary entries, and the consequences of scoring outputs through an embedding table. Those questions involve different levels of the system. Their relation to this paper is clearest when the object being studied is kept in view, whether that object is a direction in a space, a particular token, or the output distribution as a whole.

[All Bark and No Bite](https://md.research.elamur.ai/free/en/papers/timkey-2021-all-bark-no-bite-rogue/) studies rogue dimensions that obscure judgments of representational quality in Transformers. Its focus on particular dimensions connects to the earlier paper’s observation that a conspicuous geometric feature can dominate a measurement. Biś and colleagues examine what happens when a shared offset changes the angle at which an entire vocabulary is viewed. The later work’s question concerns what happens when particular dimensions obscure the qualities an evaluation seeks to measure. Together the two questions help distinguish the presence of a dominant geometric feature from the value of the remaining representation for a particular test.

[Fishing for Magikarp](https://md.research.elamur.ai/free/en/papers/land-2024-fishing-magikarp-automatically-detecting-under/) frames undertraining as something to detect automatically at the level of individual tokens. The connection is to the earlier paper’s account of unequal training opportunities across vocabulary entries. Its unused-token comparison was possible because BERT already marked a group of entries whose status the authors knew. Automatic detection poses the problem from the other direction, starting with a vocabulary and asking which entries may be undertrained. That shifts attention from an aggregate description of the table and averages over frequency bands to the status of particular tokens.

[Generative Models as a Complex Systems Science](https://md.research.elamur.ai/free/en/papers/holtzman-2023-generative-models-complex-systems-science/) asks how to make sense of language-system behavior at the level of interacting mechanisms. The embedding study offers a concrete instance of that explanatory problem. A local rule determines the direct update at a prediction, vocabulary frequencies determine how frequently different rows occupy the target role, and changing context representations affect the direction of subsequent updates. The vocabulary’s final shape is an aggregate outcome of that interaction. The later work places the broader problem of making sense of such behavior in the framing of complex systems science.

[Why do small language models underperform?](https://md.research.elamur.ai/free/en/papers/godey-2024-why-small-language-models-underperform/) studies saturation through the softmax bottleneck. This follows a different question about the output calculation central to Biś and colleagues’ derivation. The earlier paper examines what gradients through the softmax do to the vocabulary table during learning, while the bottleneck question concerns how the scoring arrangement constrains the distributions the system can express. The two perspectives give a reason to study both the geometry the table acquires and the work it must do when generating probabilities.

[Weight Tying Biases Token Embeddings Towards the Output Space](https://md.research.elamur.ai/free/en/papers/lopardo-2026-weight-tying-biases-token-embeddings/) takes up the architectural choice at the center of the earlier derivation. Weight tying assigns one set of vectors the dual roles of representing input tokens and scoring output candidates. Biś and colleagues isolate a directional contribution from one of those roles. The later work focuses on the bias towards the output space under that shared arrangement, extending the question from the direction of an individual gradient to the balance between the two jobs assigned to the same embedding table.

## Cite

Cite as Daniel Biś, Maksim Podkorytov and Xiuwen Liu. 2021. Too Much in Common: Shifting of Embeddings in Transformer Language Models and its Implications. Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.18653/v1/2021.naacl-main.403](https://doi.org/10.18653/v1/2021.naacl-main.403)

```bibtex
@inproceedings{bis2021too,
  title = {{Too Much in Common: Shifting of Embeddings in Transformer Language Models and its Implications}},
  author = {Daniel Biś, Maksim Podkorytov and Xiuwen Liu},
  booktitle = {Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies},
  year = {2021},
  doi = {10.18653/v1/2021.naacl-main.403},
  url = {https://doi.org/10.18653/v1/2021.naacl-main.403}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
