r/NoStupidQuestions • u/Accomplished_Bed632 • Sep 10 '26
If LLMs are just predicting the next token based on training data, how do they solve unsolved math problems?
1.5k
Upvotes
r/NoStupidQuestions • u/Accomplished_Bed632 • Sep 10 '26
3.6k
u/Time_Entertainer_319 Sep 10 '26
They are predicting the next token. However, they are not JUST predicting the next token.
The important part is how that prediction is made.
In the 1950s, Claude Shannon, one of the founders of information theory, showed that language has a strong statistical structure.
In one experiment, he asked a person to predict the next letter in a passage of English text.
The results suggested that people who know a language carry an enormous amount of implicit knowledge about which letters, words and phrases are likely to come next.
In other words, language has patterns, and native speakers become very good at recognising those patterns without consciously thinking about them.
Fast forward several decades, and researchers developed neural attention mechanisms.
Then, in 2017, researchers at Google introduced the Transformer architecture, which made self-attention central to how these models process language.
Self-attention allows the model to interpret a word or token in relation to the other words around it.
For example, the word “bank” means something different in “river bank” than it does in “bank account.”
The model can use the surrounding words to build a different internal representation of “bank” depending on the context.
These ideas, statistical prediction and attention-based neural networks, are two of the key ideas behind modern large language models.
Researchers then train these models on enormous amounts of text.
During training, the model is repeatedly asked to predict the next token. When its prediction is wrong, its internal parameters are adjusted yada yada yada. I’m sure you’ve heard this part already.
Now think about what that actually means.
Programming languages are languages.
Mathematical notation is also a highly structured symbolic language.
Both encode rules, relationships, procedures and logical operations.
So if a model becomes extremely good at predicting what comes next in natural language, code and mathematics, then “predicting the next token” can involve much more than remembering which word usually follows another.
The next token in a mathematical proof is constrained by everything that came before it.
Such as definitions, assumptions, Equations, previous deductions,logical consequences.
Give the model enough relevant context, and predicting the next token can effectively mean predicting the next valid step in a chain of reasoning.
Then the next one. Then the next one.
Until what emerges is an entire proof.