← All writing
Evaluation · 5 min read · 7 Jul 2026

Perplexity: What It Rewards and What It Ignores

A close look at what perplexity actually measures in language models, and why a lower number does not always mean a better one.

Cover image for the article: Perplexity: What It Rewards and What It Ignores

Why perplexity keeps showing up

If you have read a paper introducing a new language model, you have almost certainly seen a perplexity number in the results table. It is cheap to compute, requires no human judges, and gives a single scalar you can plot against training steps. That convenience is exactly why it has stuck around since the earliest days of statistical language modelling, and why it still gets quoted alongside far more elaborate benchmarks today.

But convenience is not the same as completeness. Perplexity measures one thing precisely: how surprised a model is by a sequence of held-out text, on average, per token. It does not measure whether the text a model generates is coherent, factually correct, safe, or even grammatical in a way a human would care about. Understanding exactly what perplexity rewards, and where that reward signal quietly breaks down, matters if you are choosing between models, tuning hyperparameters, or deciding whether a metric improvement is worth celebrating.

What perplexity actually rewards, worked through

Perplexity is derived from cross-entropy loss. For a sequence of tokens, the model assigns a probability to each token given the ones before it. Average the negative log of those probabilities across the sequence, then exponentiate the result, and you get perplexity. A perplexity of 1 means the model was certain and correct every time. A perplexity of 50 means the model was, on average, as uncertain as if it had to choose uniformly among 50 equally likely options at each step.

Consider a toy example. Suppose a model sees the sentence 'the cat sat on the mat' and assigns probabilities of 0.9, 0.8, 0.7, 0.6, 0.95, and 0.85 to each successive word given its context. The negative log probabilities average out to roughly 0.19 nats, and exponentiating gives a perplexity close to 1.2. That is a model that is rarely surprised by this particular sentence. Now imagine a second model that assigns much flatter probabilities, say around 0.3 to each word because it has weaker context modelling; its perplexity on the same sentence would climb well above 3. The metric is directly rewarding calibrated confidence in the correct next token, averaged over many tokens and many sequences.

This is genuinely useful for certain comparisons. If you train the same architecture on the same tokeniser and the same held-out set, and one checkpoint has lower perplexity than another, that checkpoint really has learned to predict the data distribution more accurately in a statistical sense. Perplexity also correlates reasonably well with downstream performance early in training, which is why it remains a sensible early signal for whether a training run is working at all, before you spend compute on more expensive evaluations.

laptop screen showing code and numbers

Where the reward signal breaks down

The trouble starts the moment you compare perplexity across different tokenisers or vocabularies. Perplexity is computed per token, so a model that splits words into smaller subword units will naturally report a different number even if it predicts the underlying text equally well. A model using a vocabulary of 32,000 tokens and one using 100,000 tokens are not directly comparable on raw perplexity unless you normalise carefully, for instance by converting to bits per character or bits per byte. I have seen leaderboard-style comparisons quietly skip this step, which makes the ranking meaningless before any modelling difference is even considered.

A second, more subtle issue is that perplexity averages over every token equally, which flattens out exactly the distinctions that matter most in practice. Predicting a common function word like 'the' correctly contributes very little information either way, since almost any model gets it right, while getting a rare but semantically crucial word wrong, such as a number in a financial document or a named entity in a medical note, barely moves the average. A model can achieve excellent perplexity by being very good at the easy, high-frequency tokens that make up most of a corpus while remaining weak exactly where correctness matters most.

Perplexity also says nothing about generation quality, because it is a metric about probability assignment on existing text, not about the text a model produces on its own. A model can assign high probability to fluent, grammatical continuations and still generate repetitive or contradictory text at inference time, because sampling strategies, decoding length, and exposure bias during generation are not captured by a metric computed on teacher-forced, ground-truth sequences. Two models with nearly identical perplexity can differ substantially in how coherent, factual, or useful their actual outputs are when you sit down and read them.

Finally, perplexity is entirely blind to what the text is about. It cannot tell you whether a model has memorised training data verbatim, whether it produces biased or harmful completions, or whether it reasons correctly through a multi-step problem. None of that touches the token-level probability distribution in a way perplexity can register, which is why serious evaluation work pairs perplexity with task-specific benchmarks, human evaluation, or targeted probing rather than relying on it alone.

A practical takeaway

Use perplexity for what it is good at: a fast, leakage-aware sanity check on a held-out set, computed with a fixed tokeniser and a fixed test distribution, tracked across checkpoints of the same model family. Treat any cross-tokeniser or cross-architecture comparison with suspicion unless it has been normalised to a common unit such as bits per byte. And never let a perplexity improvement stand in for evidence that a model is actually better at the task you care about; if you cannot connect the number to something a user would notice, run the downstream evaluation before you trust it.

open notebook with statistics equations
← All writing See the project case studies →