Abstract
Recent studies have determined that the learned token embeddings of large-scale neural language models are degenerated to be anisotropic with a narrow-cone shape. This phenomenon, called the representation degeneration problem, facilitates an increase in the overall similarity between token embeddings that negatively affect the performance of the models. Although the existing methods that address the degeneration problem based on observations of the phenomenon triggered by the problem improves the performance of the text generation, the training dynamics of token embeddings behind the degeneration problem are still not explored. In this study, we analyze the training dynamics of the token embeddings focusing on rare token embedding. We demonstrate that the specific part of the gradient for rare token embeddings is the key cause of the degeneration problem for all tokens during training stage. Based on the analysis, we propose a novel method called, adaptive gradient gating (AGG). AGG addresses the degeneration problem by gating the specific part of the gradient for rare token embeddings. Experimental results from language modeling, word similarity, and machine translation tasks quantitatively and qualitatively verify the effectiveness of AGG.
TL;DR
This research identifies rare token embeddings as the primary trigger for "representation degeneration"—a phenomenon where language model embeddings collapse into a narrow, anisotropic cone. The authors propose Adaptive Gradient Gating (AGG), a method that dynamically identifies rare tokens and gates specific components of their gradients to prevent them from dragging the entire embedding space into a degenerate state, resulting in more diverse and semantically accurate text generation.
The Representation Degeneration Problem
In large-scale neural language models, ideal token embeddings should be "isotropic," meaning they are spread out evenly in the vector space. This allows the model to distinguish clearly between different semantic meanings. However, standard training often leads to representation degeneration: the embeddings cluster together in a narrow, cone-like shape (anisotropy).
When embeddings point in roughly the same direction, their cosine similarity becomes artificially high. This makes it difficult for the model to learn nuanced semantic relationships, often resulting in "lazy" generation—repetitive, low-quality text that struggles to utilize the full vocabulary. While previous solutions attempted to fix this via post-processing or global regularization, they failed to address the underlying training dynamics.
Rare Tokens: The "Patient Zero"
The authors conducted an empirical study of training dynamics and discovered that rare tokens are the first to degenerate. Crucially, as these rare tokens collapse, they eventually "pull" more frequent tokens into the same narrow cone, increasing the similarity across the entire vocabulary.
This "Push-Away" problem is the root cause. Degeneration isn't caused by the model failing to learn what a rare word is; it's caused by the gradient forces trying to define what a rare word isn't. The force pushing rare tokens away from common ones is what drives them into a degenerate corner of the vector space.
Adaptive Gradient Gating (AGG)
To address this, the researchers developed Adaptive Gradient Gating (AGG), which consists of two main components:
- Dynamic Rare Token Grouping: Instead of using static word counts, AGG uses a "token counter memory" to track token frequency in recent training mini-batches. This allows the model to adaptively identify which tokens are "rare" at any specific point in the training process.
- Gradient Gating: The authors mathematically decomposed the gradient for rare token embeddings into three parts. They identified the specific component responsible for pushing rare tokens away from non-rare targets as the "bedrock cause" of the collapse. AGG introduces gate vectors ($g_1, g_2$) that scale down these specific gradient components for rare tokens.
By relaxing the pressure on rare tokens to move away from common ones, the model maintains a spread-out (isotropic) embedding space without sacrificing the learning of frequent words. AGG is "plug-and-play" compatible with other techniques like Unlikelihood Training (UL) because it modifies gradients rather than the loss function itself.
Key Results
AGG demonstrated substantial improvements across multiple benchmarks:
- Isotropy: On WikiText-103, the isotropy score ($I(W)$) increased from 0.293 (baseline) to 0.813.
- Diversity: The number of unique tokens generated in a test set increased from 13,143 to 13,737, moving closer to the human distribution of 18,920.
- Translation Quality: AGG improved BLEU scores by 1.4 points over standard Transformer models on WMT14 En-De.
- Semantic Accuracy: In word similarity tasks (RG65), the Spearman correlation nearly doubled, moving from 35.48 to 65.45. Qualitative analysis showed that rare tokens like "homepage" were correctly associated with "website" rather than random high-frequency words.
Conclusion
By identifying rare tokens as the catalyst for representation collapse, AGG provides a targeted, efficient solution to the degeneration problem. While it introduces a hyperparameter for the rarity threshold, it successfully prevents the embedding space from collapsing into a narrow cone, leading to more robust and semantically rich language models.
Summary updated