Symbolic Physical Laws DiscoveryTrust and beyond

Module 9Trustworthy equation discovery

A found law is a claim, and a claim needs its uncertainty, its tests and its record. With our own simulations of a tank draining through a small hole (Torricelli's law) we separate four sources of uncertainty; check whether error bars are calibrated by repeating the experiment in simulation; meet parameters the data can never separate and a short experiment where 79 different formulas fit; and count one law written 61 ways as one. Then we test like we mean it: 21 pipelines, splits that match the claim, a polynomial that summarises but can't predict, a bigger hole and a syrup, strong baselines, negative and positive controls and ablations. Finally we design the experiment that falsifies rival laws, close the loop, put physical sense and stability on the Pareto front, record what reproducibility needs, and keep people in the loop.

By the end you should be able to name and check the four sources of uncertainty, test calibration, recognise structural and practical non-identifiability and equivalent formulas, run many pipelines and splits that match the claim, use shift tests, baselines, controls and ablations, design discriminating experiments, and report results that others can reproduce.

Key ideas, one per video

  • Video 18Nominal 90% intervals for the power covered the truth in 12.5% of 200 experiments with finite differences, 20% after smoothing, and 90% when fitting whole trajectories. Only the combination c = Cd·(a/A)·√(2g) reaches the data; a 40-second drain leaves the power anywhere from 0.19 to 0.84, and 79 different functions fit it. On a full drain, 61 formulas fit as well as the truth, all of them √h written differently.
  • Video 19Across 21 pipelines the power stayed within 0.05 of 1/2, 19 within 0.02. Held out by range, the law missed by 1.3 mm and a polynomial by 59; with a bigger hole the polynomial blew up in 12 of 20 tries. A syrup gave p = 1.0001; shuffled readings still gave the log-log pipeline a power, while the trajectory fit's error rose to 229 mm.
  • Video 20From 10 cm, the rivals' forecasts missed by 28 and 25 mm, Torricelli's by 1.4. A closed loop needed one experiment every time; random choices needed two on average and up to eight. One changed default moved the power from 0.500 to 0.531, more than ten noise seeds did.

Book: Chapter 9 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 9: Trustworthy equation discovery

25 slides, written to be read on your own, with worked examples, our own small simulations and check-yourself questions (answers at the end). PDF, 1.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 18 · 8:49

How sure are we?

A tank's law came with error bars. In 200 simulated experiments, the usual pipeline's 90% bars held the truth only 12.5% of the time.

Nominal 90% intervals for the power covered the truth in 12.5% of 200 experiments with finite differences, 20% after smoothing, and 90% when fitting whole trajectories. Only the combination c = Cd·(a/A)·√(2g) reaches the data; a 40-second drain leaves the power anywhere from 0.19 to 0.84, and 79 different functions fit it. On a full drain, 61 formulas fit as well as the truth, all of them √h written differently.

TranscriptVideo 18
0:00

Error bars that aren't. A tank of water drains through a small hole, and a sensor reads the level every two seconds, to the millimetre. A fit gives the law: the level falls at a rate proportional to the level to a power. The fitted power is 0.5005, give or take 0.0006. But how sure is that? We repeated the experiment two hundred times in simulation, with fresh noise each time, and checked how often the ninety-percent error bars of three common pipelines contained the true power, one half. Finite differences with a log-log fit: twelve percent of the time. Smoothing first: twenty percent. Fitting whole trajectories: ninety percent, as promised. Same data, same tank. Only the pipeline differed. An error bar is a claim too, and it can be wrong. This video is about how sure we can be. This is Module nine: trustworthy equation discovery. Part one: the sources of uncertainty. Part two: calibrating error bars. Part three: identifiability, when the data can't decide. Part four: when different formulas mean the same thing.

1:09

A draining tank. Our tank is a cylinder with a cross-section of five hundred square centimetres, draining through a one-centimetre hole. Torricelli worked out the law in the sixteen-forties: water leaves the hole as fast as if it had fallen from the surface, so the level drops at a rate proportional to the square root of the level. From a full metre, our tank empties in about eight minutes. We simulated three drains, from one metre, seventy centimetres and forty centimetres, with one millimetre of sensor noise. The sensor stops below two centimetres, so a drain from one metre gives two hundred and six readings, one every two seconds. We wrote the law as: the rate of fall equals a constant c times the level to a power p, and let the fit find both. The truth is p equals one half. The constant c depends on the hole and on the tank. We'll come back to it in part three. One consequence you can see by eye: the tank slows down as it empties. From a full metre, the level falls to half a metre in only about thirty percent of the drain time. The last half metre takes the other seventy.

2:13

Sources of uncertainty. Part one: where uncertainty comes from. First, noise: the sensor's millimetre. Second, the parameters: the same data allow a range of constants. Third, the structure: other formulas may fit as well. And fourth, the pipeline: how we estimate derivatives, which library, which threshold. Each needs its own check. Noise and parameters give error bars. Structure needs competing laws. And the pipeline needs the same analysis run several ways, which is the next video's subject. Many reports give only the second. A trustworthy one names all four, and says which were checked. For our tank: the noise is one millimetre. The error on the power, fitted on three drains, is 0.0006. One rival law, a rate that is a straight line in the level, fits the first minute and a half as well as Torricelli's law. And changing the pipeline alone moved the power by three hundredths. A single number with a single error bar covers only the first two.

3:10

Calibrating error bars. Part two: calibration. A ninety-percent interval should contain the truth in nine experiments out of ten. That's checkable, if you can repeat the experiment, or simulate it. The finite-difference pipeline takes differences of neighbouring readings, then fits a straight line on a log-log plot. Its power came out at 0.53, biased, and its intervals contained one half in only twelve percent of the experiments. Smoothing first removed the bias, but the intervals were far too narrow, because the fit treats smoothed derivatives as independent measurements, which they're not. Twenty percent. Why does independence matter so much? Smoothing makes neighbouring derivatives share most of their noise. A fit that believes it has two hundred independent readings thinks it knows more than it does, and its interval shrinks to match. Fitting the solution of the law directly to the readings, where the noise really is independent, gave intervals that covered the truth in ninety percent of the experiments, and they were the narrowest of the three. The trajectory intervals were 1.8 thousandths wide. The smoothing ones were wider, 3.1 thousandths, and still too narrow: their estimates scattered over 16 thousandths, on both sides of one half. If you can't repeat the real experiment, simulate it: use your fitted law and your noise level to make many synthetic copies, refit each one, and count how often the intervals cover the law you simulated. Check your error bars the way you'd check a law: on data where you know the answer.

4:40

Identifiability. Part three: identifiability. The law's constant depends on three physical quantities: the discharge coefficient of the hole, the hole's area, and the tank's area. Only their combination reaches the data. Take three holes. The first has a coefficient of 0.6. The second has 0.8, and a slightly smaller diameter. The third has 0.48, and a larger one. The three tanks drain identically, to the last digit. No amount of level data can separate them. You'd need another measurement, like the size of the hole. The fix isn't a better fit. Either add a measurement that separates them, or report only the combination the data can see: here, the constant c, 0.0042. This is common in real systems. A rate constant and a concentration that only ever appear as a product, or a mass and a stiffness seen only through their ratio: the data see the combination, never the parts. That's structural non-identifiability. There's a practical kind too. Watch the tank for only forty seconds, a drop of sixteen centimetres, and the power could be anything from 0.19 to 0.84: from about a fifth to over four fifths. In that short window, the constant and the power trade against each other: a bigger power with a bigger constant draws almost the same curve. Their estimates were correlated at 0.96. Watch the whole drain, and the range shrinks to 0.499 to 0.501. Practical non-identifiability can be fixed with data: a longer drain, or drains from several levels, each pinning down the trade-off from a different side. When parameters trade off, the data haven't decided. Report the trade-off, or design data that break it.

6:20

When formulas mean the same thing. Part four: when different formulas mean the same thing. We asked a small search to try every formula of up to five symbols, built from the level, one, two, square roots, logs, exponentials and the four operations, each with one fitted constant: 1,629 formulas. Sixty-one of them fit the full drain as well as Torricelli's law, within two percent. All sixty-one are Torricelli's law: the square root of h, h over the square root of h, the square root of h plus h, the square root of the log of e to the h. One law, written sixty-one ways. Counting them as sixty-one discoveries would be wrong. Simplify, or compare the formulas numerically at many points, before you count. A practical test: after fitting their constants, evaluate two formulas at a few hundred random points, inside and outside the data range. If they agree everywhere to many digits, they are one law. A computer algebra system can often confirm it symbolically. The best formula that was really different, h plus the fourth root of h, fit 4.2 times worse than the truth. On the full drain, the data chose clearly. That's the pattern to look for. A wide gap between the best fit and the next different formula means the data have chosen. A crowd of near-ties means they haven't. Now the short, forty-second drain. Five hundred and ninety-two formulas fit it as well as the truth, and they are seventy-nine different functions. Near the bottom of the tank, at three centimetres, they disagree wildly: some even predict the level rising. Remember that the next time a search returns a surprising formula from a short experiment. Many formulas fitting the same data isn't a surprise. It's a measurement of how little the data say.

7:57

Recap. Let's recap. Uncertainty has four sources: noise, parameters, structure and pipeline. Each needs its own check. Error bars must be calibrated: on repeated or simulated experiments, a ninety-percent interval should cover the truth nine times in ten. Some combinations of parameters can never be separated by the data, and some only by better data. And formulas must be compared as functions, not as strings. In the lab, you'll stress-test a tank law yourself. Next video: robustness and honest validation.

Interactive lab

Stress-test bench

Fit a draining tank's law with different pipelines and data, check whether the error bars are calibrated on 100 simulated experiments, run a negative control with shuffled readings and a positive control with a syrup, and choose the next experiment where three rival laws disagree most.

The tank drains through a small hole (Torricelli's law), simulated in your browser: a level sensor reads every 2 s with the noise you choose. Four challenges are checked as you go.

Simple math

A draining tank on the test bench

The page simulates a tank draining through a 1 cm hole. Torricelli’s law says the level falls at a rate proportional to its square root: dh/dt = −c·√h. A sensor reads the level every 2 seconds with the noise you choose and stops below 2 cm. You fit dh/dt = −c·h^p and test the fit the way Module 9 does. Everything runs in your browser.

The law and a power to find
dh/dt = −c·h^p, truth p = 1/2

A syrup through a long thin outlet drains by a different law: p = 1.

Calibration
does the 90% interval contain the truth 90% of the time?

Rerun the same analysis on 100 simulated experiments and count.

A discriminating experiment
run where rival laws disagree most

A law whose forecast misses by more than 5 noise widths is falsified.

–

The fit, and how sure it is

Grey: readings. Blue: the fitted law. The 90% interval comes from the pipeline’s own error estimate.

Power p
–
90% interval
–
Truth inside?
–
Trajectory error
–

Intervals that contained the truth: not checked yet

Choose the next experiment

Three rival laws fitted on your data: a power law (Torricelli), a straight-line rate, an exponential. Where would a 60-second run from a new level tell them apart?

–

–

Challenges

Each one is checked as you go.

  1. Find p within 0.01 of 1/2, with a 90% interval that contains 1/2, at 1 mm of noise or more.
  2. Check calibration twice: find a pipeline whose intervals contain the truth in fewer than half of the experiments, and one that reaches 85% or more.
  3. Run the negative control: with shuffled readings, see a log-log pipeline still report a power, while the trajectory fit’s error goes above 50 mm.
  4. Watch only the top of the tank (1 m to 60 cm), then falsify both rival laws with a single 60-second experiment.