Symbolic Physical Laws DiscoveryFoundations

Module 1From predictive models to scientific laws

Why does science want equations, and not only good predictions? A curve that fits can still be wrong about the world. We trace how mathematics became the language of physics, from Archimedes to quantum mechanics, and how computers joined the search for equations. Then we look inside symbolic regression: the space of formulas it searches, how fast that space grows, the seven decisions between observations and an equation, and what makes an equation useful. A worked example with our own falling-ball data puts it to work, eight failure modes show how discoveries can be fake, and a ladder of five claims says how far an equation has climbed.

By the end you should be able to tell a fitted curve from a candidate law, describe what symbolic regression searches and why its language must be reported, and design the measurement that separates two competing laws.

Key ideas, one per video

  • Video 1A quartic and an exponential fit five minutes of our cooling cup; after an hour the exponential says 20.2 °C and the quartic almost half a million. Prediction is evidence, not the end point.
  • Video 2With four operators and three leaves there are about 1.2 billion formulas with six operators; symbolic regression searches a designed language, so its rules and complexity measure must be reported.
  • Video 3Both drag laws fit the first half second; three seconds in, linear says 19.1 m/s and quadratic 9.1, and the data say 9.0. Measure where candidates disagree, and attack your own equations.

Book: Chapter 1 of Computational Methods for Symbolic Physical Laws Discovery by Teddy Lazebnik (coming soon). The videos and slides follow the chapter’s topics in our own words, figures and simulations; nothing is copied from the book.

The title slide of Module 1: From predictive models to scientific laws

46 slides, written to be read on your own, with worked examples, our own small simulations and check-yourself questions (answers at the end). PDF, 2.3 MB.

Watch

3 videos for this module, each about 8 to 15 minutes. Pick one from the list, and open the transcript to read along: each timestamp plays the video from there. The narration is generated with a voice clone of Teddy, used with his permission.

Video 1 · 12:22

A curve is not a law

Two formulas fit a cooling cup equally well. One of them is a law.

A quartic and an exponential fit five minutes of our cooling cup; after an hour the exponential says 20.2 °C and the quartic almost half a million. Prediction is evidence, not the end point.

TranscriptVideo 1
0:00

Two formulas, one data set. Here are some measurements: the temperature of a cup of coffee, every fifteen seconds, for five minutes. And here are two formulas that fit them. One is a flexible polynomial. The other is a simple exponential. On these points, the polynomial actually fits slightly better. Now ask both formulas the same question. How hot will the cup be in half an hour? The exponential says 23.5 degrees. The polynomial says almost 24,000 degrees. Same data, same quality of fit, very different claims about the world. This whole course lives in the gap between those two formulas. A curve that fits is not yet a law.

0:45

Welcome to the course. Welcome to Symbolic Physical Laws Discovery. I'm Teddy. In this course we'll learn how computers can help us find equations, and how to tell when an equation deserves to be called a law. The course follows my upcoming book, chapter by chapter. There are ten modules and twenty two long videos. Every module also has a slide deck, and a lab you can run in your browser. You don't need the book to follow along. Some calculus, a little statistics, and curiosity are enough. This first video is about the target. Before we search for equations, we should agree on what we're looking for. We'll start with history: how mathematics became the language of physics. Then we'll see where computers joined the story. Then we'll separate prediction from explanation. And we'll finish with a question. What does it take for a formula to earn the word law?

1:29

How mathematics became the language of physics. People measured the world long before physics existed. They counted, surveyed land, tracked the seasons, and predicted eclipses. The Greeks added something new: proof. A claim in geometry was not just calculated. It was demonstrated, step by step, from definitions. But for a long time, mathematics described nature without explaining it. Explaining was the job of natural philosophy: causes, purposes, why things change. Archimedes crossed that line. His law of the lever turns a plank, a pivot and two weights into a relation you can prove. Weight times distance on one side equals weight times distance on the other. Astronomy took a different path. Ptolemy built a system of circles riding on circles, and it predicted the positions of the planets remarkably well. This was called saving the phenomena: reproducing what you observe. Whether those circles actually existed up there was a separate question. Keep that distinction in mind, because it's the heart of this course. A model that calculates correctly is not the same as a theory of what is real. The work continued across the Islamic world. Ibn al-Haytham, for example, brought geometry and careful experiments together in the study of light and vision. In the sixteenth century, Copernicus put the Sun at the center, partly because it gave the planets a more coherent mathematical order. Then Kepler took Tycho Brahe's careful observations of Mars seriously. The best circular scheme missed them by about eight minutes of arc. That's about a quarter of the Moon's width in the sky. Kepler refused to ignore that tiny gap. He let the data break the circle, and he found the ellipse. Here is the lesson for us. A compact regularity is powerful because it changes which mechanisms are even plausible. Ellipses demanded a physical cause. In 1623, Galileo wrote that the book of nature is written in the language of mathematics. Mathematics had described nature for centuries. What changed was its job. It was becoming the method for finding the structure of physical processes, like falling bodies and flying cannonballs. In 1687, Newton's Principia completed the move. The same laws describe an apple falling from a tree and the Moon moving in its orbit. After Newton, a theory of motion that wasn't mathematical simply couldn't compete. The next two centuries made the language more abstract, and more portable. Lagrange rewrote mechanics so that one method handled many different machines. Fourier described how heat spreads, with differential equations. Now mathematics followed a whole field through space and time, not just a single body. Maxwell's equations united electricity, magnetism and light. Boltzmann showed that laws can be statistical, describing crowds of molecules rather than one trajectory. Then came relativity and quantum mechanics. Gravity became the geometry of spacetime. Particles became wave functions. Mathematics now shaped what physicists could even imagine nature to be. In 1960, Eugene Wigner called this the unreasonable effectiveness of mathematics. Why should equations invented by mathematicians fit the world so well? Philosophers of science added warnings. Karl Popper said a scientific claim must be testable, and it stays a conjecture however well it's supported. Thomas Kuhn showed that the standards of science change during revolutions. Nancy Cartwright argued that many laws work through idealization, and fit the messy world only approximately. So if a computer prints a short equation, what has it found? A pattern in a finite table? An idealized model? A real mechanism? Or our own assumptions, handed back to us? History is clear on one thing. The great equations didn't become great because they were short. They became great because they organized many phenomena, and kept predicting things correctly.

5:20

Computers join the search. After the Second World War, computers changed what a law means in practice. An equation could be known, and still its consequences were only reachable by simulation. Then came data intensive science. Telescopes, sensors and simulations started producing more data than anyone could read. And people asked a bolder question. Can a computer propose the equations themselves? Starting in the late 1970s, Pat Langley, Herbert Simon and their colleagues built programs called BACON. Given tables of planetary data, one of them rediscovered Kepler's third law. In the 1990s, genetic programming let computers evolve formulas of any shape. That's where symbolic regression grew up as a method. Later work showed that evolutionary search could recover the laws of moving systems, like pendulums, straight from measured motion. Today, deep learning predicts protein structures, proposes new crystals, and even helps control fusion plasmas. Impressive. But a powerful predictor is not automatically an explanation. Symbolic discovery sits in between. It uses computation to search, but it returns something you can read, test and argue with. An equation.

6:30

Prediction is not explanation. Back to the coffee. These measurements come from our own simulation: a cup at ninety degrees, in a twenty degree room, read with a little thermometer noise. The polynomial has five free coefficients. Its typical error on these points is about 0.30 degrees. The exponential has the room temperature built in, plus two numbers: the starting temperature and a rate. Its typical error is about 0.34 degrees. Slightly worse. If predicting these points were the only goal, you'd pick the polynomial and go home. So pause the video for a moment. What do you think each formula predicts after one hour? The exponential settles toward the room. After an hour it says about 20.2 degrees. The polynomial shoots off to almost half a million degrees. The exponential is more than a curve. It says the cup approaches the room temperature, and never passes it. And its rate has units of one over time. It's also the solution of a simple law: the cup cools at a rate proportional to how much warmer it is than the room. That's Newton's law of cooling. The polynomial implies no law at all. It just bends where the data told it to. Here's the standard machine learning recipe. Pick a family of models. Then choose the parameters that make the average loss on your data as small as possible. Notice what's missing. Nothing in that objective asks whether the model matches the process that produced the data. Two models with the same loss count as equally good, even if one respects physics and the other breaks it. That's fine when prediction is the goal. A weather forecast is valuable if it's right tomorrow, even if nobody can read its insides. But if you claim a mechanism, prediction is only one piece of the evidence. So let's separate five modeling goals, from the least demanding to the most demanding. Prediction: estimate outcomes you haven't seen. Explanation: understand why a fitted model behaves the way it does. Careful with that one. Explaining why a neural network made a prediction is not the same as explaining the phenomenon. System identification: recover the structure of a dynamical system, using a vocabulary of terms you chose in advance. Symbolic discovery: search for the equation itself, with its form free to vary. And mechanistic discovery: claim that the equation describes the process that actually produced the data. Each step up asks more of the evidence. Success on one step does not buy you the next. Here's the simplest version of the trap. Measure the sine of x, but only between minus one and one. The polynomial x minus x cubed over six matches it everywhere in that window. The worst miss is less than one hundredth. Now step outside. At x equal to pi, the sine is back at zero. The polynomial says minus two. Inside the window, the two are almost twins. Outside, they disagree completely. Extrapolation exposes the assumptions that interpolation hides. And here's the practical lesson. A hundred more points inside the window tell you almost nothing. A few points where the candidates disagree tell you a lot. For the coffee, a few readings after half an hour beat a hundred more in the first five minutes.

9:38

From curve to law. Data alone rarely pin down one explanation. Scientific knowledge does the rest of the work. Units, for example. If x is a length and y is a speed, then y equals x plus x squared adds things that simply can't be added. Symmetry: a law shouldn't depend on where you put the origin of your coordinates. Conservation: some quantities can't appear from nothing. Limits: a formula should behave sensibly when a variable gets very small, or very large. And shape. If a response must rise with pressure, prefer formulas that keep rising, between the data points and beyond them. These aren't checks you run at the very end. The best methods build them into the search itself. Suppose a search returns y equals a x over b plus x. It's compact, and it fits. Now look at the questions it lets you ask. Does y level off as x grows? Must a and b be positive? What units do they carry? Does the mechanism you believe in predict that leveling off? That's the real value of an equation. The algorithm proposed an object to reason about. It didn't finish the reasoning for you. So there's no magic error threshold where a fit becomes a law. Instead, there's a ladder of claims. At the bottom, a formula that predicts the data you have. Then an empirical regularity: it still holds when you repeat the experiment. Then a scientific hypothesis: it respects known constraints and survives a change of regime. Then a mechanism: it beats credible alternatives in experiments designed to tell them apart. And only at the top, a law, within a stated domain. Not at the moment an optimizer first prints an equation. Here's the working definition for this course. Computational symbolic discovery uses search, optimization and scientific constraints to produce explicit equations, as candidate descriptions of a phenomenon. The equation is a hypothesis. Its status depends on evidence beyond the search.

11:31

Recap and lab. Let's recap. Mathematics became the language of physics over two thousand years, and computers have now joined the search for equations. Prediction is evidence, not the end point. A curve that fits can still be wrong about the world, and the place to catch it is outside your data. In this module's lab, you'll fit a polynomial and a law to falling ball data, stretch the time window, and watch which one survives. Next video: what symbolic regression actually searches, and why that space is so astonishingly big. See you there.

Interactive lab

Curve versus law

Fit a polynomial and two drag laws to a falling ball's speed, stretch the window, and see which one survives. Then predict Uranus with Kepler's third law.

The data are simulated in your browser (quadratic drag, k₂ = 0.12 per metre, made up). Four challenges are checked as you go.

Simple math

A light ball falls through air

Its speed is logged every 0.05 s for 3.5 s. The truth in this simulation is quadratic drag with k₂ = 0.12 per metre (made up, roughly a ping-pong ball). You only see noisy readings. Everything runs in your browser.

A flexible curve
v(t) = c₀ + c₁t + … + c_d t^d

Least squares on the readings inside the window. More degrees, more freedom.

Linear drag
dv/dt = g − k₁ v

Solved exactly and fitted by one number, k₁, in units of one over seconds.

Quadratic drag
dv/dt = g − k₂ v|v|

Also one number, k₂, in units of one over metres. Its curve levels off at √(g/k₂).

k₁ (linear)
–
k₂ (quadratic)
–
Polynomial: in / after
– / –
Linear: in / after
– / –
Quadratic: in / after
– / –

Running…

Speed and the three fits

Shaded: the fit window. Filled dots were used; hollow dots are the future. Orange: polynomial; grey dashed: linear drag; blue: quadratic drag.

Kepler's third law, with Uranus held out

Fit the six classical planets, then predict Uranus. Blue: a power law T = c·a^p; orange: a polynomial in a.

2
Power p
–
Law predicts Uranus
–
Polynomial predicts
–

Challenges

Each one is checked on your current settings.

  1. With a window of 1 s or less, find a polynomial that fits the window better than quadratic drag, yet misses the future by more than ten times as much.
  2. With sensor noise of at least 0.10 m/s, get the fitted k₂ within 5% of the true 0.12 per metre.
  3. Make the polynomial predict impossible physics: a negative speed, or more than 30 m/s, somewhere in the 3.5 s.
  4. Kepler: find a polynomial that fits the six planets to within 1%, yet misses Uranus by more than 20%, while the power law stays within 2%.