News for hackers. Stuff that matters.
Re:Perplexity and Intelligence by hazrmard on Sunday November 22, 2026 @03:59PM (#50603826)
Perplexity is not defined in the article. FYI:

Perplexity is the degree of surprise the model has in predicting the next token, given a sequence of tokens. At the worst case, perplexity is equal to the size of the vocabulary. At the best case, perplexity is 1.

So, given a sequence of tokens, "e = m c ^ 2", if the p(token | prev tokens) = 1 for every token, perplexity ends up being 1. If, however, it's a random predictor, the p(token | prev tokens) is 1/vocab for every token, and perplexity ends up being len(vocab).

The article plots log(perplexity) on the y-axis, which puts the best case at 0 (i.e. log 1).

Re:Perplexity and Intelligence by FailMore on Sunday November 22, 2026 @04:09PM (#50603930)
Here is an article with a little interactive example:

https://smalldocs.org/p/perplexity-explained-with-toast-Q0y3...

I liked to it as a stand alone comment as well: https://news.ycombinator.com/item?id=50601525#50603714

Re:Perplexity and Intelligence by agnosticmantis on Sunday November 22, 2026 @04:25PM (#50604063)
And for the statistician in the audience, log-perplexity is the normalized negative log-likelihood.
Re:Perplexity and Intelligence by WithinReason on Sunday November 22, 2026 @04:48PM (#50604269)
[delayed]
Re:Perplexity and Intelligence by yorwba on Sunday November 22, 2026 @04:55PM (#50604329)
Yes. The tokenizer-independent alternative is to measure bits (of entropy) per byte.
Re:Perplexity and Intelligence by a3w on Sunday November 22, 2026 @05:03PM (#50604397)
"At the best case, perplexity is 1"

This graph shows log(perplexity) it says. So perplexity starts at zero, then gets negative? I notice I am confused. Most plausible: you mean log-perplexity in best case is 1, for no perplexity?

Re:Perplexity and Intelligence by gregdeon on Sunday November 22, 2026 @05:41PM (#50604737)
The best possible perplexity is 1, and the best possible log-perplexity is log(1) = 0. The only way to achieve this is with a model that always predicts that the next token has probability 1 -- i.e., a perfect model.

A helpful comparison: suppose you have a model that always outputs a uniform distribution over K possible tokens (assigning probability 1/K to each one), and that the next token is indeed one of those K options. This model has perplexity K. So, in some sense a perplexity of K is comparable to narrowing down the answer to one of K possibilities. This includes the special case of K=1, which is the best possible model.

Re:Perplexity and Intelligence by a3w on Monday November 23, 2026 @05:47AM (#50609993)
Great, thank!

Then

> So perplexity [in this graph] starts at [or near] zero, then gets negative?

was correct. Strange that some things are not inverted to be more handy.

Conversly pH/pOH using inverted, then positive numbers, since logs get negative.

Re:Perplexity and Intelligence by senordevnyc on Sunday November 22, 2026 @05:10PM (#50604464)
Maybe it was edited, but it says this right now:

The primary way we measure progress on this key “intelligence substrate” has remained remarkably constant over the years—we have been tracking the perplexity of the models on a held-out dataset.2, 3 Perplexity measures how well a model predicts the next token on average; lower perplexity means better predictions.

Re:Perplexity and Intelligence by hauntsaninja on Sunday November 22, 2026 @05:32PM (#50604668)
An intuitive way of thinking about perplexity is that it is the number of options a model is considering for the next token.

Note the best case is not actually zero. If your model had zero log(perplexity) on "A random number from 1 to 10 is ___" it's not doing something useful. See the "Unknown floor" part of the original post.

In practice it is possible to get estimates for the floor assuming your current methodology, for example see Section 6.3 from Scaling Laws for Neural Language Models (2020)

Re:Perplexity and Intelligence by ijidak on Sunday November 22, 2026 @06:19PM (#50605121)
I think the parent is still correct though. Mathematically the best case is zero. But you're pointing out that in the real world, setting aside the pure mathematical definition of the outcome, zero is unattainable because it's an illogical outcome. Zero would be a sign of something fishy rather than improved intelligence. The article, I believe, referred to it as "fully deterministic being impossible."

Just clarifying because the parent's mathematical explanation was simple, accurate and clear. Just want to make sure readers are not confused when reading your response.

Re:Perplexity and Intelligence by arijun on Sunday November 22, 2026 @07:37PM (#50605825)
I think their point is that useful responses will have a perplexity > 0 as a mathematical necessity; if perplexity is always zero that’s the same as zero entropy in information theory. If I knew what your message was going to be beforehand then what was the point of listening to it.
Re:Perplexity and Intelligence by londons_explore on Sunday November 22, 2026 @07:05PM (#50605546)
If we live in a superdeterministic world, there is no such thing as a random number, and everything is fully predictable.
Re:Perplexity and Intelligence by arijun on Sunday November 22, 2026 @07:30PM (#50605768)
But it’s not p(token | entire world state) it’s p(token | previous tokens), and that cannot always be 1 unless your language is very boring indeed.
Re:Perplexity and Intelligence by noduerme on Sunday November 22, 2026 @07:31PM (#50605775)
Yeah, but even that wouldn't mean the last token in "a random number is ___" should be the same number every time, which is what would happen with perplexity=1. Even if the next number were predetermined by the universe, it wouldn't always be "two". If you ask for a random number and the same number appears every single time, that's not a good model of a predictable "randomness" or pseudo-randomness either.
Re:Perplexity and Intelligence by lxe on Sunday November 22, 2026 @09:49PM (#50606929)
Yeah, I guess I'm a little bit confused about how perplexity is defined and how it maps to the model intelligence as written in this article.
Re:Perplexity and Intelligence by pizzathyme on Sunday November 22, 2026 @09:54PM (#50606955)
How do we score perplexity/correct predictions with tokens that we don't have the answer to? "The theory that unifies gravity and quantum physics is ___"
Re:Perplexity and Intelligence by saagarjha on Sunday November 22, 2026 @10:16PM (#50607099)
At some point the model will be “wrong” ;)
Re:Perplexity and Intelligence by shiandow on Monday November 23, 2026 @03:38AM (#50608996)
At some point it stops generating text and just regurgitates the source data.
Re:Perplexity and Intelligence by zh3 on Monday November 23, 2026 @02:13AM (#50608474)
Wouldn't zero mean a perfect search engine?
Re:Perplexity and Intelligence by bryanrasmussen on Monday November 23, 2026 @03:04AM (#50608783)
I don't think perplexity has anything to do with the result being correct, although if it has a low perplexity you might find that is more often the case, whereas I think the phrase "perfect search engine" supposes a correct result.
Re:Perplexity and Intelligence by aflinik on Monday November 23, 2026 @04:13AM (#50609234)
You probably 1, not 0?
Re:Perplexity and Intelligence by yellowflash on Monday November 23, 2026 @02:49AM (#50608676)
I think "number of equiprobable options a model can be thought of considering..." would be more like it?
Re:Perplexity and Intelligence by soleveloper on Monday November 23, 2026 @05:42AM (#50609958)
The answer here is 7.
Re:Perplexity and Intelligence by onraglanroad on Sunday November 22, 2026 @05:45PM (#50604783)
> Perplexity is the degree of surprise the model has in predicting the next token

I think "predicting" is a really bad term. It's not predicting anything. You don't get any lottery numbers out, it doesn't predict your future, and it's not predicting what word you were going to type.

It's "choosing" the best token to produce intelligible output. "Choosing" or "selecting" would be much better terms and wouldn't confuse people about what is actually happening.

It's probably too late though as it's become part of the jargon.

Re:Perplexity and Intelligence by famouswaffles on Sunday November 22, 2026 @06:07PM (#50605002)
No it's prediction and prediction is the appropriate term here. I don't know what lottery numbers has to do with anything. It's trained to predict future text y given context x.
Re:Perplexity and Intelligence by onraglanroad on Sunday November 22, 2026 @06:25PM (#50605194)
No it doesn't predict the future text, it generates it.

What exactly is the prediction? What future events tell it that it made an incorrect prediction and should have chosen another token?

Lottery numbers are a clear example of something you can attempt to predict and that you might get wrong. I would have thought that was obvious?

If you want a more specific term, it dicts not predicts. There is no pre.

Re:Perplexity and Intelligence by famouswaffles on Sunday November 22, 2026 @06:47PM (#50605401)
>What future events tell it that it made an incorrect prediction and should have chosen another token?

The next token in the training data of course. During training, the model predicts a probablitiy distribution over the next token, compares it against the actual token, and updates its weights to minimize prediction error.

During inference, the same learned distribution is used to generate text. Prediction and generation are not mutually exclusive and in fact, the latter relies on the former.

If you didn't know this much, why argue a term is incorrectly used ?

Re:Perplexity and Intelligence by hackinthebochs on Sunday November 22, 2026 @10:46PM (#50607253)
This is really just a silly verbal dispute but I can't help myself from weighing in on silly verbal disputes...

>During training, the model predicts a probablitiy distribution over the next token,

But when the model is taken out of a training context, we might not want to say it is "predicting" the next token as this misleads on the mechanisms involved. It's like the dispute between frequentists and bayesians in probability. If you think of a probability as a frequency analysis, then the probability of a one-off is undefined. We have a more generic term that avoids this dispute, namely credence. What the parent is saying is perhaps we should use the more generic term "generate" in contexts divorced from a ground truth in which to compare the prediction.

>How are lottery numbers an example of something you can attempt to predict, but written text is not

There's a ground truth to what the lottery number will be, whereas in general there is no ground truth to what token comes after some prefix sequence.

Re:Perplexity and Intelligence by Almondsetat on Monday November 23, 2026 @04:57AM (#50609599)
>There's a ground truth to what the lottery number will be

Since everything computers do is binary, there is also a ground truth to what a digital "thing"'s next atom will be

Re:Perplexity and Intelligence by cameldrv on Monday November 23, 2026 @01:40AM (#50608260)
One of the biggest insights of the last ten years in ML (This was understood much earlier, but now it's widely applied) is that prediction and generation are two sides of the same coin.

The way an LLM generates text is by generating a probability distribution over the possible next tokens, and then you take a sample from the distribution and pick that as the concrete token to generate.

Re:Perplexity and Intelligence by saagarjha on Sunday November 22, 2026 @10:18PM (#50607109)
You’re too focused on looking at it as a chatbot. Models produce probability distributions of what they believe the next token is going to be.
Re:Perplexity and Intelligence by anonymousDan on Sunday November 22, 2026 @06:07PM (#50604997)
What's the difference with entropy?
Re:Perplexity and Intelligence by rockinghigh on Sunday November 22, 2026 @07:35PM (#50605819)
The perplexity in the article is the log-perplexity. It's equivalent to the cross-entropy loss.
Re:Perplexity and Intelligence by ramijames on Sunday November 22, 2026 @06:25PM (#50605198)
Thanks for explaining this. I didn't understand why the initial graph was descending, but now it makes perfect sense.
Re:Perplexity and Intelligence by seanp2k2 on Monday November 23, 2026 @03:09AM (#50608810)
>We do not expect it is possible to achieve a loss of 0, which would correspond to being able to predict the dataset entirely deterministically

Let's say they get to loss = 0. How much of the dataset is incorrect, and how is new knowledge verified and folded in?

Re:Perplexity and Intelligence by fela on Monday November 23, 2026 @07:57AM (#50610967)
an intuitive way to think about it is: perplexity is a measure of how good of a next token predictor the pretrained model is, it is a measure of pretraining quality

pretraining is where the raw intelligence comes from, emerging merely from predicting the next token as well as possible, hence perplexity is the measure of raw intelligence

what happens after, in post training is more about eliciting this intelligence, and making sure the model will do what we want