Retrieved article excerpt
Open article ¡ Retrieved 2026-11-06T22:21:50.974293+00:00
### 01A three-step program
# Teaching AI to build scientific models
Collage of a looping black line drawn across a pink grid, continuing into a green engraving of a textured, branching landscape.
- Published
Nov 6, 2026
- Team
[Science](https://www.anthropic.com/science)
> *[AI for Science](https://www.anthropic.com/news/ai-for-science-program) grantees [Jakob Macke](https://www.mackelab.org/), [Daniel Gedon](https://dgedon.github.io/), and [Stefan Wahl](https://scholar.google.com/citations?user=-aivjt0AAAAJ) are researchers at the [ELLIS Institute TĂźbingen](https://institute-tue.ellis.eu/) and the University of TĂźbingen, where they build AI tools for developing scientific models in neuroscience and beyond. In this guest post, they discuss how AI is starting to change scientific modeling.*
In 1951, Cambridge Universityâs computer went out of action for six months. This was inconvenient for physiologist Andrew Huxley, who, alongside his colleague Alan Hodgkin, had just built a set of equations to describe how a particular squid nerve cell fired. The scientists wanted to understand the âaction potentialâ of these nerve cells: the electrical pulses they use to communicate, which underlie everything brains do, from perception to intelligence. The only way to find out whether the equations worked was to solve them and compare the solutions to data.
Huxley had hoped to use the newfangled computer to solve the equations. Instead, he was forced to solve them using a hand-cranked mechanical calculator. It took him over three weeks.
The basic structure of their model was dictated by known facts about the cell. Hodgkin and Huxley modeled its membrane as an electrical circuit. One part of the model, however, was just an educated guess. In order to make the curve fit the data they had measured, they found that they had to raise one variable to the fourth powerâthat is, to multiply it by itself three times. At the time, they did not know why. They just knew that otherwise the model didnât predict the observed data as well.
They did offer a hypothesis, however. They cautiously suggested that the variable in question, which governed how particular gates in the cell membrane opened, might require the fourth power because multiple charged particles in the membrane had to move into place before the gate would open.
Decades later, long after both Hodgkin and Huxley had won the Nobel Prize in Physiology or Medicine in 1963, another team [found the structure of a related potassium channel protein](https://www.science.org/doi/10.1126/science.280.5360.69). And they discovered that, yes, it had four identical pieces arranged [around a central pore](https://doi.org/10.1126/science.1116270). The model was fit to the data in 1951. Even then, it predicted how fast the impulse travels relatively accurately. More than that, it turned out to have helped predict the structure of potassium ion channels themselves, which it had never been fit to.
Today, an AI system could plausibly find an equation like Hodgkin and Huxleyâs in an afternoon, and perhaps it would fit the experimental data even more closely. But the point of the story is that simply knowing the fourth power did the job was not enough; what mattered was knowing that a simpler version of the model did not work. An AI system that merely hands you the model might give you an answer, but it does not give you understanding. Reproducing the data with a model is insufficient, because any number of models could do the same. What matters is being able to make claims about the real-world system itself, and ideally about other, similar systems. To do so, you need to know which features the model shares with other models that work, and which set it apart from models that donât. As the mathematician Richard Hamming wrote in 1962, âThe purpose of computing is insight, not numbers.â
## A three-step program
More than 70 years on, [the Hodgkin-Huxley model](https://pmc.ncbi.nlm.nih.gov/articles/PMC1392413/) remains the standard description of electrical activity in neurons. The same kinds of equations, with different constants, describe nerve cells across the animal kingdom, from squids to humans, even though our evolutionary lineages separated more than half a billion years ago.
Even more important than its longevity, however, is what the Hodgkin-Huxley model tells us about how models work. Hodgkin and Huxleyâs approach can be broken down into three steps, and most scientific modeling involves some version of them.
- The first is **building** the model. This means deciding what the model is made of and what shape its equations take. In Hodgkin and Huxleyâs case, that meant the parts of the electrical circuitâthe membrane and the gatesâand the form of the equations, such as raising the underlying variable to the fourth power.
- The second is **constraining** the modelâtuning its adjustable parameters to fit real measurements. For Hodgkin and Huxley, that included settings like how often the gates open under different voltages.
- The third is **interpreting** the modelâasking what the model says about the real system, such as suggesting that the fourth power meant the gate had four moving parts.
In practice, scientists [go through these steps repeatedly](https://www.jstor.org/stable/2286841). If the numbers fail to fit the measurements, or if the interpretation makes no sense, they go back and revise.
All three steps were once done by people, but AI systems are increasingly involved in each of them. Machines have arguably made the most progress in constraining models, so weâll start there.
## Splitting the bill, or how to constrain models
When Hodgkin and Huxley constrained their model by eye and intuition, they ended up with a single set of numbers. This told them that the model *could* match the data. It didnât tell them whether other numbers would have worked just as well or even better.
Imagine you know that a group dinner added up to $120, but not who ordered what. Many different combinations of orders could have added up to that amountâperhaps everyone ordered a mid-priced burger, or perhaps one person had steak and lobster while everyone else had soup. Models of nerve cells work on the same principle: different combinations of gate parameters can produce near-identical electrical activity. Simply showing one combination that fits well hides all the other plausible parameter settings, and other combinations might have led to different predictions. This is true of almost any phenomenon being modeled. Many different sets of parameters can explain the observed data equally well.
An illustration of constraining the Hodgkin-Huxley model. (1) A measurement from a nerve cell. (2) How likely the measurement is for each combination of potassium and sodium channel settings. Darker means a better fit. The blue dot is interactive. (3) Simulations of the model at three settings, compared to the measurement (gray). Some fit well, while others do not.
The solution is a statistical method called Bayesian inference. It gives you every set of numbers that works reasonably well, as a probability distribution that takes into account their fit to the data and your prior knowledge about the parameters. The distribution takes the shape of a curve, with the best fits at the peak and the weaker ones at the fringes.
But this method has usually been impractical for complex models, because it involves calculating how likely your measurements would be under every possible set of numbers. In Hodgkin and Huxleyâs model, that would still be feasible, but for anything more complicated, it would be computationally impossible. For example, if each of the thousands of ion channels opens and closes at random, you would have to work out every combination. Returning to our restaurant bill analogy: it would be easy to answer, âIf person A had the burger and person B had the steak, what would the bill come to?â but much harder to show which combinations could have led to the final bill, especially as the number of people and menu options grows.
A different approach called [simulation-based inference (SBI)](https://www.pnas.org/doi/10.1073/pnas.1912789117) overcomes this reverse-engineering problem with sheer computation. You pick random parameters, run the model, and record the output. You do it again and againâ[perhaps 100,000 times for a model like Hodgkin-Huxley](https://elifesciences.org/articles/56261), and millions of times for larger, more complex ones. Then you train a neural network on the results so that, given an output, it can return the range of parameters that could have produced it.
All SBI requires is that you can run the model: put in a set of parameters and get back the kind of data you would expect to see. A model you can run like thisâparameters in, data outâis called a *simulator*, hence the name âsimulation-based inference.â You never need to use a formula to calculate how likely your measurements are, which is the step that makes standard Bayesian inference often impractical. These days a simulator is usually a computer program, but it doesnât have to be: Huxley, cranking through the equations by hand, was running one. Many simulators are easy to run forward but impossible to reverse. Some canât even be written out as a tidy equationâtheir assumptions are built into the rules they followâbut they are models nonetheless. For many complex phenomena, from networks of neurons to colliding galaxies, simulators are often the only kind of model we have. SBI lets us constrain those models with data.
Running all those simulations is expensive and can take weeks. But once it is done, a trained network can perform inference on new data in seconds, without requiring further simulations. That speed has changed whatâs possible. When [two neutron stars collide](https://www.nature.com/articles/s41586-025-08593-z), SBI can work out roughly where in the sky the collision happened, fast enough to point telescopes at it while the signal is still detectable. The same approach has been successfully applied to problems in [cosmology](https://journals.aps.org/prd/abstract/10.1103/3sj1-1l9f), [structural biology](https://www.pnas.org/doi/10.1073/pnas.2420158122), [geophysics](https://academic.oup.com/gji/article/241/3/1741/8099925), and many other domains.
And SBI has been applied to [nerve cell models](https://www.nature.com/articles/s41586-022-04428-3), [including the Hodgkin-Huxley model](https://elifesciences.org/articles/56261). Because it returns a distribution rather than a single fit, we can see which parameters are well constrained by the data, where more than one explanation is plausible, and where more dataâand thus another experimentâis most needed.
## The bill, one level up, or how to build models
Before you can constrain a model, you need a model to constrain. The equations of the Hodgkin-Huxley model were not derived from first principles. Instead, the fourth power of the underlying variable emerged *empirically* from the scientistsâ biological insight, and from finding that simpler versions didnât work as well.
For most of the history of science, this is how models have been built. Scientists used their expertise and assumptions to write down a candidate model. Then they tested it, revised it, and tried again. The problem is that the space of possible models is essentially infinite, and a scientist proposing a handful of models from experience will very likely miss models that could have explained the observational data equally well.
AI systems can now help with, or even take over, this step. Given some data and a natural-language description of a system, an LLM-based agent writes code for a candidate model or a set of candidate models. Then it runs the model, constrains its parameters, compares the output to real-world data, and revises it, perhaps by modifying the form of an equation. This loop repeats until the model replicates the data accu