Period, length, gravity, mass and angle: five quantities, three units, two numbers.
Symbolic Physical Laws DiscoveryLaws in practice
Module 6Static laws and interpretable surrogates
Many laws are static: one formula from inputs to an output. With pendulums timed on Earth, Mars and the Moon and a cyclist's power against speed, we separate candidate laws, empirical correlations and surrogates, and let units work before any search: five quantities become two numbers, and nine pendulums collapse onto one curve. We search a correlation instead of guessing a template, size it from a Pareto front, and test closures inside the simulation they live in, where two equally good fits stop a coasting bike 15 seconds apart. Then we learn what a theory misses with residual laws, build symbolic surrogates and multi-fidelity models, and declare and attack each formula's validity envelope, side by side with black boxes.
Key ideas, one per video
- Video 12Units turned five quantities into two numbers, and nine pendulums collapsed to within 0.46%. A guessed power law gave a meaningless exponent (2.33); a search found two mechanisms, v and v³, with physical coefficients. Two closures that fit equally well stopped a coasting bike 15 s apart.
- Video 13A residual search next to the small-swing law found 0.0604·θ², against the known 1/16 = 0.0625. The series ran more than a million times faster than our integrator and held within 1% up to 1.8 rad; the cheap law plus three expensive runs gave 1.7% worst error, against 3.6% from the runs alone. State every formula's envelope, then attack it.
Book: Chapter 6 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.
Watch
2 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 12 · 8:16
Scaling laws, correlations and closures
Nine pendulums on three worlds fall on one curve before any search begins.
Units turned five quantities into two numbers, and nine pendulums collapsed to within 0.46%. A guessed power law gave a meaningless exponent (2.33); a search found two mechanisms, v and v³, with physical coefficients. Two closures that fit equally well stopped a coasting bike 15 s apart.
TranscriptVideo 12
Nine pendulums, one curve. We timed pendulums on three worlds, Earth, Mars and the Moon, with three lengths each, at swings from small to very large. The periods spread over a factor of eight. Now plot the period times the square root of g over L, against the swing angle. All nine pendulums fall on one curve. Two lines of algebra did that, before any search began. This module is about static laws: one formula from inputs to an output, with no time derivative. Some are laws, some are correlations, some stand in for a simulator. Knowing which is half the job. This is Module six: static laws and interpretable surrogates. Part one: dimensionless structure. Part two: correlations, searched instead of guessed. Part three: closures that live inside a simulation. Part four: descriptors.
Three kinds of static formula. Three kinds of static formula look alike on paper. A candidate law claims to be part of the mechanism. An empirical correlation summarizes behaviour over a stated range. A surrogate approximates another computer model. The same equation can move between these labels only when new evidence changes the claim. And the label decides the search: units may be non-negotiable for a law, while a surrogate can afford an extra term if it is fast and smooth.
Dimensionless structure. Part one: dimensionless structure. A pendulum's period could depend on its length, gravity, its mass, and the swing angle. Only length, time and mass are involved, and nothing else carries mass, so mass drops out. So the law must read: the period times the square root of g over L equals some function of the angle alone. Five quantities became two numbers, before a single timing. The general rule is the Buckingham pi theorem. Count the quantities, subtract the number of independent units, and you get the number of dimensionless groups. Here: five quantities, three units, two groups. Engineers lean on the same idea every day. Groups like the Reynolds number let one correlation cover pipes of every size, and fluids of every kind. Now the search looks for one function of one variable, and its constants can't quietly depend on whether you measured in metres or in feet. In our data, a small swing takes about 1.1 seconds for a short pendulum on Earth, and about 5.4 seconds for a long one on the Moon. In the new coordinates, the nine pendulums lie on one curve, rising from two pi at small swings. The collapse is also a test. If the points had refused to collapse, something missing from our list, like friction or a heavy string, would be shaping the period. Ours did collapse. The points scatter around one curve by about half a percent, the size of our timing noise. Nothing else is left to explain. But dimensional analysis doesn't pick a unique set of groups. Many valid combinations exist, and some make the remaining search far easier than others. And a perfect collapse is not a mechanism. It shows that the runs share one representation. Why that representation works needs other evidence.
Correlations: guessed or searched. Part two: engineering correlations. A cyclist's power at a steady speed on flat ground. We simulated a hundred rides, most of them fast, with four percent noise. The classic move is to guess a template, power equals C times speed to the power b, and fit C and b. Templates like this are everywhere in engineering, and within a narrow range they can fit well. Here, the best fit gives b equal to 2.33. That exponent means nothing physical. It is a compromise between two mechanisms, and it misses both regimes: by about eight percent at low speed, and six and a half at high speed. Fit only the slow rides, and b drops to 1.8. Fit only the fast ones, and it rises to 2.6. The exponent records which rides you happened to collect. Now search instead: a small library of powers of speed, and thresholded least squares. The search keeps exactly two terms: speed, and speed cubed. Their coefficients are physical. The first gives a rolling coefficient of 0.0051. The second gives a drag area of 0.346 square metres. We simulated 0.005 and 0.35. Search found the structure the template had assumed away: two mechanisms, added. The errors fell to five percent at low speed, and three at high speed. And the search shows its Pareto front. One term, speed cubed, leaves a median error of 9.2 percent. Two terms: 3.2 percent. A third or a fourth term buys only a tenth of a percent. The bend is at two. Build correlations around regimes: weigh slow and fast rides by how the formula will be used, not by how many of each you happened to record. And choose from the front, near its bend.
Closures inside a simulation. Part three: closures. A closure is a formula that lives inside a larger simulation: a stress law, a friction law, a turbulence correction. It must be judged as a regression, and as a component. Back to our cyclist. We fitted the resistance force two ways, on rides between four and fourteen metres per second: the true form, a constant plus a speed squared term, and a cubic polynomial. Both fit the rides equally well. Pause. Put each closure into a simulation of a bike coasting from six metres per second with no pedalling. Will they agree on when it stops? They don't. With the fitted true form, the bike stops after about 83 seconds, close to the 85 of the law we simulated. With the polynomial, after about 98. The polynomial invented a lower resistance at slow speeds it never saw: near zero speed, 2.7 newtons instead of 4.2. Offline accuracy is not closure validity. A limit check would have caught it before any simulation. At zero speed, only rolling resistance is left: the mass, times g, times the rolling coefficient. That is 4.2 newtons, not 2.7. And the simulation went exactly where the data wasn't. After about twenty seconds, the coasting bike is below four metres per second, and it stays there for the rest of the run. Testing a closure on stored data is called a priori testing. Running it inside the solver is a posteriori testing. You need both, and they often disagree. Closures carry constraints too. A correction that must keep a sign can be written as a factor, the exponential of a learned term. And candidates that break physical rules can be filtered before any expensive run.
Descriptors. Part four: descriptors. In materials science the goal is often not a universal law, but a compact combination of properties that organizes a huge space of candidates. A searched descriptor, built from quantities like atomic radii, elastic moduli or energies, can rank materials for screening, and hint at what matters. That is worth a lot. A good descriptor can shrink a long list of candidate materials to a short one worth making in the lab, even before anyone knows why it works. Methods such as SISSO build millions of candidate combinations from basic properties, screen them, and keep a handful with sparse regression. With that many candidates, some will fit by chance. So test on whole families of materials the search never saw. And read a descriptor as a hypothesis about useful coordinates, not as a mechanism, until independent evidence says why it works.
Recap. Let's recap. Decide first whether you want a law, a correlation, or a surrogate. Dimensionless groups shrink the search: for our pendulum, five quantities became two numbers. Searching beat guessing a template: two mechanisms, added, with physical coefficients, chosen at the bend of the front. And closures must pass their limit checks, and be tested inside the simulation they will live in. In the lab, you'll collapse the pendulums yourself. Next video: residuals, surrogates, and the limits of a formula.
Where formulas stop working. The textbook correction for a pendulum's period matches the exact value within one percent, for swings up to 1.8 radians. At 2.9 radians it predicts 1.78 times the small-swing period. The truth is 2.24. Black boxes trained on swings up to two radians do no better. A nearest-neighbour model predicts 1.25 for every larger swing. A degree eight polynomial predicts 7.3 at 2.8 radians. Every formula has a validity envelope. This video is about finding it, and about formulas that live next to a theory, or stand in for a simulator. In this video. Part one: residuals, learning what a theory misses. Part two: symbolic surrogates. Part three: combining cheap and expensive models. Part four: envelopes, stress tests and black boxes.
Residuals: learning what a theory misses. Part one: residuals. When a trusted theory exists, don't throw it away. Learn only what it misses: the measured value minus the theory, or their ratio. For the pendulum, the small-swing law is the theory. We divided each measured period by it, and searched for that ratio as a function of the angle, using swings up to one and a half radians. The theory carries the units and the big picture, so the search only has to find a small, dimensionless number close to one. That is a far easier target than the whole law. We offered only even powers of the angle. A swing to the left takes as long as a swing to the right, so the correction must be symmetric. Symmetry shrank the library before the search began. Here is what the search returned. One, plus 0.0604 times theta squared, plus 0.0049 times theta to the fourth. The known series starts with one, plus one sixteenth theta squared. And one sixteenth is 0.0625. How sure are these numbers? We resampled the data four hundred times. The squared term stayed between 0.056 and 0.064, and one sixteenth sits inside that range. The fourth-power term is far less sure. It ranged from 0.003 to 0.007, and the series value of 0.0036 sits near the lower edge. It soaks up higher terms that the data cannot separate. When we offered theta to the sixth, its coefficient came out at essentially zero. The correction has an immediate meaning: how much a big swing slows the pendulum down. That's the appeal of residual laws: the theory stays, and the new term is small and readable. Choose the form by the suspected error: an added term for a missing process, a ratio or a log ratio for a missing factor. And remember that residuals also hold noise and bias, not only new physics.
Symbolic surrogates. Part two: symbolic surrogates. Our expensive simulator integrates the pendulum's equation numerically: about 5,600 small steps for each period. The series gives a period in a single line. In our Python code it was more than a million times faster: tens of milliseconds for the integrator, tens of nanoseconds for the formula. And it matched the integrator within one percent, up to 1.8 radians. Our own fitted correction, from noisy data, held within one percent up to 2.1 radians, further than the textbook terms, because its larger fourth-power term stands in for the missing ones. Further, but still finite. A surrogate is judged by its purpose: speed and accuracy, for the quantity a downstream calculation needs, over a declared domain. Not by whether it is the law. Surrogates pay off in repeated work: calibration, uncertainty propagation, design, control. A formula is also differentiable, and easy to embed anywhere. Where should the expensive runs go when you build one? We used an even grid. Spending runs where the formula's error is largest is cheaper: the active learning of Module five, aimed at a simulator.
Cheap and expensive models. Part three: multi-fidelity. Cheap models are plentiful but biased. Expensive ones are accurate but rare. Combine them. Here the cheap model is the small-swing law, free everywhere. The expensive one is the integrator, run only three times. We learned a correction to the cheap model from those three runs. Across swings up to 2.3 radians, the combined model's worst error was 1.7 percent. A quadratic through the three expensive runs alone: 3.6 percent. And the correction it learned from three runs was 0.061 times theta squared. Again, that is close to one sixteenth. Why did it work? The cheap law is exactly right at small swings, so the correction must vanish there. Building that in left only two numbers to learn from three runs. The quadratic had to learn everything from the same three. The cheap model supplies the shape, and the expensive runs supply the correction. But a biased cheap model can also mislead, so check the combination on expensive runs it never saw.
Black boxes beyond the data. Pause. The nearest-neighbour model, the polynomial, and a fitted series all match the training swings well. Which one would you trust at 2.5 radians? None of them, fully. At 2.5 radians the truth is 1.64. The fitted series says 1.57. The nearest-neighbour model says 1.25. The polynomial says 2.54. Just past the training edge, at 2.2 radians, the series is off by under two percent, the polynomial by under four, and the nearest-neighbour model by twelve. The black boxes fail silently: one flattens, one explodes. The series fails gradually, and its form tells you why: a polynomial in the angle cannot follow a period that grows without limit as the swing approaches the top. Near the top, the period really does grow without limit. A formula fitted below two radians cannot know that. Declare the envelope.
Validity envelopes and stress tests. Part four: validity envelopes. State where a formula holds: the range of each input, the combinations covered, and the tolerance. Our series holds within one percent up to 1.8 radians. Its first term alone, only to about 1.3. And the envelope depends on the tolerance you declare. At one part in a thousand, the series holds only to about 1.3 radians. At five percent, it holds to about 2.4. Then stress-test it. Push the inputs toward the edges, check the limits, check symmetries, and test points inside the range but far from any data. Our series passes the limit test: at zero swing, the ratio is one. It passes the symmetry test by construction. It fails the edge test: near the top, it stays finite. So the report reads: the period ratio is one, plus theta squared over sixteen, plus eleven theta to the fourth over three thousand and seventy two. Valid within one percent for swings up to 1.8 radians. Checked against a numerical integrator. A formula used outside its envelope isn't a law being tested. It's a guess with good handwriting. Black boxes are often more accurate inside the data. Compare them fairly: the same splits, the same inputs, the same extrapolation tests, and accuracy reported against complexity. Prefer the symbolic model when its behaviour must be checked, embedded, or extrapolated, or when its terms answer a scientific question. Prefer the black box when only accuracy inside the data matters. Black boxes have envelopes too. They just don't print them. Report where the training data lie, and treat every prediction outside them as a guess. And they can work together: a black box can teach a formula. That is a topic for Module ten.
Recap. Let's recap. Residual laws keep the theory and learn what it misses. Here, a correction close to one sixteenth of the angle squared. Symbolic surrogates trade a little accuracy for enormous speed, over a declared domain. Multi-fidelity combines a cheap model's shape with an expensive model's correction. Black boxes and formulas deserve the same tests: the same splits, the same edges, and an honest envelope for each. Every formula has an envelope: find it, state it, and stress-test it. In the lab, you'll draw ours. Next module: ordinary differential equations.
8:16Video 12 · 6.1Scaling laws, correlations and closuresUnits turned five quantities into two numbers, and nine pendulums collapsed to within 0.46%. A guessed power law gave a meaningless exponent (2.33); a search found two mechanisms, v and v³, with physical coefficients. Two closures that fit equally well stopped a coasting bike 15 s apart.
8:37Video 13 · 6.2Residuals, surrogates and the limits of a formulaA residual search next to the small-swing law found 0.0604·θ², against the known 1/16 = 0.0625. The series ran more than a million times faster than our integrator and held within 1% up to 1.8 rad; the cheap law plus three expensive runs gave 1.7% worst error, against 3.6% from the runs alone. State every formula's envelope, then attack it.
Interactive lab
Collapse and envelope
Time nine pendulums on Earth, Mars and the Moon, and choose the axes until they fall on one curve; hang a heavy string and watch the collapse break. Then measure where a formula for the period holds, at the tolerance you choose, and refit it on wider swings.
The pendulums are simulated in your browser (exact periods from the elliptic integral, 0.5% timing noise; the heavy string makes the 1.2 m pendulums physical pendulums). Four challenges are checked as you go.
Nine pendulums, one curve, one envelope
The page times nine simulated pendulums: Earth, Mars and the Moon (g = 9.81, 3.71, 1.62 m/s²), lengths 0.3, 0.6 and 1.2 m, swings from 0.1 to 2.5 rad, with 0.5% timing noise. The exact periods come from the elliptic integral. Everything runs in your browser.
If the points refuse to fall on one curve, something missing from the list shapes the period.
Where a formula holds depends on the tolerance you declare, and on the data it was fitted to.
–
A · Do they collapse?
Green: Earth. Red: Mars. Blue: the Moon. Bigger dots: longer pendulums.
B · Where does the formula hold?
Its error against the exact period, on a log scale. The envelope ends where the error first crosses the tolerance.
–
Challenges
Each one is checked as you go.
- Choose axes that collapse all nine pendulums to within 1%.
- Show that the groups are not unique: collapse them to within 1% with a different horizontal axis.
- Break the collapse with a missing variable: keep collapsing axes and push the scatter above 2%.
- Refit the correction on wider swings until its 1% envelope passes 2.3 rad. What happens at small swings?
