Thursday, December 3, 2026 | London 11°C · Drizzle
DailyGlimpse

AI

How Adam's Adaptive Learning Overcomes SGD's Frequency Bias in Language Models

AI training data skews heavily toward common words like "the", leaving rare tokens drastically underrepresented.

MarkTechPost 2 min read

How Adam's Adaptive Learning Overcomes SGD's Frequency Bias in Language Models

Modern language models are trained on data with highly uneven token distributions—common words like "the" appear in nearly every batch, while rare tokens may appear only 0.1% of the time. This imbalance creates a hidden optimization problem: under standard Stochastic Gradient Descent (SGD), parameters tied to frequent tokens converge quickly, while those for rare tokens receive infrequent updates and remain near their initial values.

Adam, a popular adaptive optimizer, addresses this through variance normalization. Instead of using the same learning rate for all parameters, Adam tracks historical gradient statistics per parameter and automatically adjusts update sizes. Parameters with sparse gradient signals receive proportionally larger effective learning rates, enabling underrepresented features to learn faster than under vanilla SGD.

To illustrate this, researchers conducted a controlled NumPy experiment using a six-token vocabulary with frequencies spanning four orders of magnitude. A linear model was trained with both SGD and Adam on identical synthetic data, where all target weights were set to 1.0. By comparing final parameter values, non-zero gradient counts, and Adam's effective learning rates, they directly observed how adaptive optimization compensates for frequency imbalance.

The experiment's simplicity—removing semantic complexity—allowed them to isolate the effect of token frequency on gradient updates. Each training sample was a sparse binary vector indicating token presence, with target values equal to the sum of active token weights plus noise. Because gradients only flow for tokens present in a batch, rare tokens received far fewer updates.

The code and setup details are available in the original article, demonstrating a clear empirical distinction between SGD's bias toward common tokens and Adam's ability to balance learning across the frequency spectrum.

React