From observations to models
I’m interested in how we get from observations to scientific knowledge, and how machine learning can help with that. An example from astronomy shows what I mean. People have probably always looked up at the night sky and wondered what the stars are all about. A very long time ago, some of them must have noticed that a few of the stars move. Those are the planets. Keep watching for longer and you find that they seem to follow paths.
But how can we predict these movements, and what laws do they follow?
The Greek model
The ancient Greeks believed that all the planets moved in circles around the Earth. In their picture, the Earth sits at the center, and the sun and the planets revolve around it.
The Kepler model
Today we know that the movements in the night sky can be described much better if the sun, not the Earth, sits in the middle and the planets orbit it on ellipses. We were able to learn this theory just from watching the night sky.
Scientific data
Scientific machine learning tries to find laws for other problems in much the same way. Take microscopy data instead of the night sky, for example. Can we derive the laws that the system under study follows automatically and directly from the data?
And AI?
Some of the methods we use for this are the same ones used in AI research.
Thinking computers
From planets to computers, then. When I talk about “thinking computers”, I mean large language models like ChatGPT. The mechanisms used to train language models are also what scientific machine learning uses to learn models from scientific observations. In the end it’s always about deriving a model from data. What follows is about the basic learning principles behind machine learning, the ones that make applications like ChatGPT possible in the first place.
What does a language model actually do? If you use ChatGPT, you can see the words appear on the screen one after another. That’s not just a visual effect. The words really are generated one at a time, and the problem a language model solves is which word should come next in this context. You may know this from your phone’s keyboard. Type “Tomorrow I’m going” and it suggests possible next words. Keep tapping one of the suggestions and you end up with a whole text. A language model like ChatGPT does the same thing, just in a far more sophisticated way.
Tomorrow I’m going
That raises two questions. How do you get this kind of autocomplete to work so well that it looks like thinking? And have language models like ChatGPT really learned something fundamental about human thinking and about language along the way?
A naive approach to a language model
Let’s take a step back and think about how a programmer might build a language model. Suppose we have a simple computer and want to design a program that predicts words and sentences so that the result sounds as if a person had written it. To do that we somehow have to capture the rules of language, there’s no way around it. Computers are good at carrying out exact instructions, manipulating symbols and numbers as they go. So if we manage to break written language down into a system of exact rules and write them out in a form the computer understands, we should be able to program our language model. But that is exactly what’s extremely hard. Linguistics and rules of grammar do exist, but anyone who has ever tried to learn a foreign language knows that there are many rules and even more exceptions.

Just as the ancient Greeks didn’t work out from their observations of the night sky that the Earth goes around the sun, we don’t have a complete explanation of how language works either.
Language models have to be learned implicitly
What we can do, though, is distill a language model out of a large body of text. To develop ChatGPT, OpenAI collected large parts of the internet, meaning huge amounts of text from books, online forums and documents. With this text the company trained a language model that distills the rules of language out of it implicitly. So we don’t tell the computer how language is formed, only how it should derive the rules of language from examples. What rules the model actually ends up working by, we don’t know.
An analogy helps here. If you want to get the scent of a rose into a bottle, you don’t drop a single flower into a vial. You take thousands of flowers and pass steam through them. The steam carries the fragrance along, the oil separates from the water as it cools, and you’re left with a few drops of pure rose oil. That’s the essence.




A language model comes about in just the same way. From billions of sentences on the internet, we extract the essence of language, compressed into a language model that contains what matters. Computers learn language by extracting the rules of human thinking from written text. Formalizing this intuition is anything but easy, but it’s necessary, because computers only work with exact instructions. Two questions are central here.
What does the distillation of language look like?
What does a distillation process for text and symbols look like as a mathematical problem? In other words, what corresponds to distilling our flowers with steam?
What kind of container holds the essence of language?
How do you get a computer to act according to rules you can’t spell out yourself? What kind of program is like a bottle you can pour the essence of language into?
The rest of this text is about these two questions.
Distillation: compression is learning
Let’s start with the distillation process. Imagine you’re a student with an exam in a few days, and it can ask about anything from the last 24 lectures. You have all of it in a set of lecture notes.
One set of notes, three ways to study
A common and good way to study is to read through the material and summarize it. But what does a good summary look like?
No notes. Just read through the text and write nothing down. Probably not the best approach if you need to recall the content in an exam.
Copy the text word for word. Copy out the whole text and try to memorize every sentence without really understanding how things fit together. Probably not ideal either.
Summary. At best you end up with a summary of a few pages. It holds on to the big, important connections and leaves out the supporting detail. In this way, the information from the lectures gets compressed.
That’s not only a good way to study. The idea of representing information in compressed form also captures pretty well what learning itself means. I didn’t come up with this myself, of course, and the reasons for seeing compression of information as the central principle of learning lead straight into philosophy and the philosophy of science. A language model is basically a theory of how language works, and people have been thinking for a long time about how to derive theories from observations.
Attributed to William of Ockham
entia non sunt multiplicanda praeter necessitatem
The simplest explanation is the best.
The principle of parsimony
An important idea in learning theory is attributed to the medieval monk William of Ockham. This logician and theologian gave us what is known today as Ockham’s razor, the principle of parsimony or lex parsimoniae. It says that if there are several explanations for the same observations, you should prefer the simplest one, and that this simplest explanation is also the best one for making predictions. The following three questions should show what that means in practice.
First question
Why do parents (generally speaking) love their children?
One possible answer is: “Children are very sweet. How could anyone not love their own child?”
Another possible answer: “Children need their parents’ care to survive. We humans evolved to love our offspring because that raises the chance that our genes live on in our children.” Both are valid explanations.
Second question
Why is water transparent?
One answer would be: “Water barely absorbs visible light. The light has too much energy for the vibrations of its molecules and too little for their electrons.” That’s one explanation.
Another one goes: “Vision evolved around exactly the narrow band of light that water barely absorbs, because otherwise it would be useless to animals in the water. That’s why water looks transparent to us.”
Last question
Why do people get angry when someone insults them?
A first answer: “The body releases stress hormones.”
Another possibility: “It’s a reaction built into our psyche, because responding to an attack with aggression has evolutionary advantages. It makes future attacks less likely.”
Which theory is better?
If you put the three questions together, the explanation on the left names lovable children, low absorption of light in water, and stress hormones. The explanation on the right says that human experience is shaped by evolution. Which one is better?
The theory on the right is better, at least in this example. But why? Both theories are, after all, consistent with the observations (the three questions). The difference only shows when you try to answer more questions of this kind. The first theory probably won’t get much further, because it needs a new basic assumption for every question.
The second theory, on the other hand, explains all the observations with a single assumption.
This is the principle of parsimony in action. The simpler theory is more powerful because it can predict more.
Of course, this only works as long as I, the person writing this, keep asking questions that have to do with human evolution. With a question about relativistic quantum mechanics, neither theory helps. But that’s not a weakness of the principle of parsimony, it’s a strength! The principle really does find out something about the process that generates the observations.
You’re learning something about the questioner!
All my questions had to do with human evolution. So if you look for a simple explanation of them, you find out something about me as the questioner, namely that I ask about human evolution and not about other topics. That’s why the principle of parsimony is also a principle of learning. If you find the most compact explanation for a set of observations, you get closer to what really matters and learn something about the underlying principles.
Principle of parsimony = learning


- Why do parents love their children?
- Why is water transparent?
- Why do people get angry?

For our example from the beginning, this means that if you try to explain how the planets move, you really do learn something about how the universe works. If the motion of the planets is best described by putting the sun at the center of the solar system, then the Earth probably really does go around the sun. For my three questions, it means that I only ask ones that can be answered with human evolution. And for our language model, it means that a computer program that can represent billions of snippets of text in compressed form really has learned something about the language behind the letters and symbols.
Too short
For our student summarizing the lectures, this means that if the summary is too short, or in the extreme case missing altogether, there is no model in the first place. Then nothing gets explained.
Too long
If the summary is too long, we have a theory that needs too many assumptions. It’s not a good one, because it doesn’t carry over to new questions.
Just right
According to the principle of parsimony, what’s just right is a short summary that gets by with few assumptions but contains what matters, and so explains the observations.
For the language model
This is how we can apply the principle of parsimony to language models in technical terms too. We take the billions of example sentences …
… and compress the information as much as possible.
The program that achieves this compression, in other words that can write a good cheat sheet, is then our language model. It takes the role of the student who learns the lecture material by writing a good summary.
How do I technically write the best cheat sheet?
So we know what makes a good language model. But how do we find it? We’re looking for the simplest model that describes the text data well, that is, a simple and accurate explanation of the observations.
Mathematically, this goal corresponds exactly to minimizing the entropy between the model’s prediction and the text data. The word entropy won’t mean much to some readers. I mention it for completeness, because formalizing philosophical ideas like these far enough that you can work with them mathematically and on a computer is one of my research interests.
- We’re looking for
- a good model
- which means
- a short description of the text data
- which means
- minimal entropy between the prediction and the text data
- which means
Minimizing the entropy can be written down as a mathematical, symbolic problem, and that is the kind of instruction a computer can carry out.
What kind of container holds the essence of language?
That brings us to the second question. What kind of container can hold the essence of language? With rose oil, you start with the flowers. They get distilled, the result goes into a container, and that gives you the essence. With a language model, you start with billions of snippets of text. A technically worked-out version of the principle of parsimony turns them into a language model that is especially good at compressing text.





But what corresponds to the container? What kind of program can capture the rules of language? Exact rules don’t work in practice, and yet precise instructions are what computers carry out. How do those two fit together? How do you get a computer to handle imprecise or associative processes? For that we need a program that isn’t designed for one particular task but can, ideally, represent any process at all, a universal container, if you like. To give away this much, it will have something to do with a mixing desk with lots of knobs.
A universal recipe
Say we want to bake a cake that tastes the way we remember it from childhood. Many factors affect the taste, such as resting time, baking time, temperature, and the amounts of butter, sugar and milk. On top of that, these are all coupled. If you use more eggs, you have to leave out some milk so the consistency stays the same.
With the right values for all of these, you can in principle get any taste you like. Leave out the sugar and the recipe can even make bread or pasta. So a recipe consists of precise instructions, but the result depends on lots of small changes. Every amount or time is like a knob you can turn up or down. That makes a recipe a kind of universal instruction for every possible taste, and it behaves just like the container we’re looking for to hold our essence of language. There, we’re after a universal instruction for every possible cognitive process. The only hard part is finding the right amounts.
The technical counterpart of a recipe with adjustable amounts is a class of elementary curves and functions that are coupled to each other through knobs. In language models, in practice, there are trillions of these knobs, tangled together in a kind of neural network. You can show mathematically that such functions, or neural networks, really are largely universal. With the right knob settings we can in principle compute all sorts of things, such as recognizing objects in images or imitating human language. The only difficulty lies in setting the knobs correctly.
Coupled knobs
Finding the right settings all at once is impossible. But a much simpler question can be answered: “If I turn this one knob slightly to the right, does the result get better or worse?” We can answer or compute this for every single knob, and then turn all the knobs a small step in the better direction. Then we ask the same question again and turn them again. After many repetitions, this gives a good result. It’s as if we found the right cake recipe by baking many cakes in a row and improving the recipe a tiny bit each time.
Does it taste better?
Turn a knob.
For our language model, this means we adjust the knobs so that the summary of the text data keeps getting shorter. To show this process, I’ve programmed 25 knobs here that influence a curve. Each knob changes the curve in a different way. Set correctly, they can produce all sorts of shapes, like an ellipse, a heart or even an elephant. Press “Fit” to see the knobs adjust themselves live and automatically. The program keeps computing whether a knob has to turn left or right to make the result better. Then the knob turns a little and it all starts again, several times a second.
Here’s the same thing again with real data instead of a curve. Using 65 knobs, the computer has to learn whether a tiny image of 8 × 8 pixels shows a handwritten 3. There’s one knob for each pixel, plus a base value. Nobody tells the computer what a 3 looks like. It only gets examples, and after each small batch of images it turns all the knobs a tiny step in the better direction.
65 knobs
Is this a 3?
Draw your own
A language model works in just the same way, except that it has trillions of these knobs instead of 25 or 65, and the knobs interact not with a curve but with the model’s prediction.
Summary
To finish, the main points in five questions.
What does thinking mean in the context of AI?
Predicting the next word, again and again. A simple, recursive process that looks like human thinking.

What is a language model?
Basically just a theory of how language works.

How do you learn a model?
With the principle of parsimony, which we discussed.

What do these models look like on a computer?
Trillions of coupled knobs that together work like a universal recipe. That’s the answer to the question of the container that can hold the essence of language.
How do you find the right knob settings?
Through billions of small adjustments. You keep adjusting them in small steps until the result is good.
Figures and sources
- Starry sky: Drew Cotten, 7PM to 7AM Night Sky Stars Timelapse, YouTube.
- Epicycle diagram: MLWatts, Wikimedia Commons, public domain.
- Ockham drawing: “frater Occham iste”, manuscript of the Summa Logicae, 1341, Gonville and Caius College, Cambridge, MS 464/571, fol. 69r, Wikimedia Commons, public domain.
- Microscopy video: Schaller, Weber, Semmrich, Frey, Bausch, Polar patterns of driven filaments, Nature 2010, supplementary material.
- Textbook: Ellen Brandner, Germanistische Linguistik, Stark Verlag 2024.
- Digit data: scikit-learn, CC BY 4.0.
- AI head, robot, rose petals, cheat sheet, solar system, ingredients, dishes and other stock images: Adobe Stock.
- Study photo: Kaboompics, Pexels.
- Wikipedia logo: Wikimedia Foundation.
- Curve, cube and surface: made with Matplotlib.
- Product photos: Behringer, Xavax, Diamant, Wiener Zucker, Dr. Oetker, Lesebrille.de.