Hacker News new | ask | show | jobs
by hauntsaninja 10 days ago
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)

7 comments

I think "number of equiprobable options a model can be thought of considering..." would be more like it?
I believe 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,' or invalid, or something along those lines.

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.

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.
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 ___"
You don't. Perplexity is defined for a given text corpus. It's a metric of how well the model predicts the evaluation data set.
At some point it stops generating text and just regurgitates the source data.
This is why we train models on datasets which are significantly larger than the model! This forces the model to learn how to compress the dataset into useful representations.
"The theory that unifies gravity and quantum physics is currently unknown." would be the correct prediction?
At some point the model will be “wrong” ;)
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.
If we live in a superdeterministic world, there is no such thing as a random number, and everything is fully predictable.
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.
Isn't the point of determinism, not that it would return the same number each time, but that it would return the same number at that hyper-specific time?
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.
Wouldn't zero mean a perfect search engine?
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.
I was thinking more in terms of "find this specific piece of information for me" than "recommend me a soup recipe" - so I should perhaps have said "perfect information retrieval engine".
You probably 1, not 0?
The answer here is 7.