{"slug": "perplexity-cross-entropy-and-what-0-76-means", "title": "Perplexity, Cross Entropy, and What 0.76 Means", "summary": "A cross-entropy of 0.76 corresponds to a perplexity of about 2.1 and means a language model assigns roughly 47% probability to the correct token on geometric average, according to an analysis building on OpenAI's post \"Perplexity and Intelligence.\" The same conversion puts GPT-3.5 at a log perplexity of 0.99 (37% average probability on the correct token) and GPT-4 at 0.91 (40%), while a model choosing uniformly across a 100,000-token vocabulary would score about 11.5. The piece explains that log perplexity equals cross entropy, so exponentiating the negative cross entropy yields the geometric mean probability the model places on the observed token.", "body_md": "# Perplexity, Cross Entropy, and What 0.76 Means\n\n          Inspired by OpenAI's recent post,\n          [Perplexity\n          and Intelligence](https://openai.com/index/perplexity-and-intelligence/):\n        \n\n## Perplexity\n\nConsider predicting the token at position $t$. The classes are the tokens in the vocabulary, indexed by $k=1,\\ldots,d_{\\text{vocab}}$. Here $y_{t,k}$ is the target for token $k$ (1 for the observed token, 0 otherwise) and $\\hat{y}_{t,k}$ is the model's predicted probability of token $k$ given the previous tokens. The cross entropy is\n\n$$\n\\mathcal{L}_{\\textsf{CE}} = -\\sum_{k=1}^{d_{\\text{vocab}}} y_{t,k}\\ln\\hat{y}_{t,k}(y_{<t}).\n$$\nWith a one-hot target, only the term for the observed token $y_t$ survives, leaving $-\\ln p_\\theta(y_t\\mid y_{<t})$.\n\nTake a sequence of $N$ tokens\n\n$$\nY=(y_1,\\ldots,y_N).\n$$\nIts perplexity is\n\n$$\n\\operatorname{PP}(Y) = \\exp\\!\\left(-\\frac{1}{N}\\sum_{t=1}^{N}\\ln p_\\theta(y_t\\mid y_{<t})\\right).\n$$\nThe cross entropy averaged over the same sequence is\n\n$$\n\\operatorname{CE}(Y) = -\\frac{1}{N}\\sum_{t=1}^{N}\\ln p_\\theta(y_t\\mid y_{<t}).\n$$\nThe term inside the exponential is exactly $\\operatorname{CE}(Y)$. So\n\n$$\n\\ln\\operatorname{PP}(Y)=\\operatorname{CE}(Y).\n$$\n## What the Numbers Mean\n\nUndo the log:\n\n$$\ne^{-\\operatorname{CE}(Y)} = \\left(\\prod_{t=1}^{N} p_\\theta(y_t\\mid y_{<t})\\right)^{1/N}.\n$$\nSo $e^{-\\operatorname{CE}}$ is the geometric mean of the probability the model assigns to the correct token. A cross entropy of $0.76$ gives $e^{-0.76}\\approx 0.47$: on (geometric) average, the model puts about 47% on the correct token. The perplexity is $e^{0.76}\\approx 2.1$, as if the model were choosing uniformly between about two tokens.\n\nApplying the same conversion to the log perplexities quoted in the OpenAI post:\n\n| Model | Log perplexity (aka CE) | Average probability assigned to the correct token <sup>[1](#fn-1)</sup> | \n|---|---|---|\n| GPT‑3.5 | 0.99 | 37% | \n| GPT‑4 | 0.91 | 40% | \n| “Losses below 0.8” | 0.80 | 45% | \n| Model producing the maths results | 0.76 | 47% | \n| Next expected window | 0.68–0.70 | 50–51% | \n\nFor context, an LLM has a vocab in the order of 100k. A model that picks a token totally at random assigns a probability of $1/100{,}000 = 0.001\\%$ to the correct token. Or a log perplexity of $\\ln(100{,}000)\\approx 11.5$.\n\n1. It's the geometric mean. [↩](#fnref-1)", "url": "https://wpnews.pro/news/perplexity-cross-entropy-and-what-0-76-means", "canonical_source": "https://www.sithankanna.com/posts/perplexity-is-cross-entropy.html", "published_at": "2026-11-28 12:21:01+00:00", "updated_at": "2026-11-28 12:42:38.887765+00:00", "lang": "en", "topics": ["large-language-models", "machine-learning", "artificial-intelligence", "ai-research"], "entities": ["OpenAI", "GPT-3.5", "GPT-4"], "also_reported_by": [], "takeaway": "Log perplexity equals cross entropy, so e^(-CE) gives the geometric mean probability on the correct token: a CE of 0.76 means about 47% average probability and a perplexity of roughly 2.1.", "recommendation": {"advice": "Report cross entropy alongside perplexity and convert with e^(-CE) to state the average probability the model assigns to correct tokens when comparing models.", "playbook": "evals-testing", "playbook_url": "https://wpnews.pro/playbooks/evals-testing"}, "alternates": {"html": "https://wpnews.pro/news/perplexity-cross-entropy-and-what-0-76-means", "markdown": "https://wpnews.pro/news/perplexity-cross-entropy-and-what-0-76-means.md", "text": "https://wpnews.pro/news/perplexity-cross-entropy-and-what-0-76-means.txt", "jsonld": "https://wpnews.pro/news/perplexity-cross-entropy-and-what-0-76-means.jsonld"}}