Simple, and the noise is divided by Δt²: faster cameras make it worse.
Symbolic Physical Laws DiscoverySearch and data
Module 5Scientific data, noise and experimental design
The data decide which laws can be told apart. With a weight on a spring filmed by a phone, we ask whether data are adequate for a claim (quantity, coverage, resolution, signal to noise, observability, excitation), sort the kinds of noise and sampling trouble from aliasing to gaps with geometry, and follow positions into velocities and accelerations: finite differences turn a millimetre of tracking noise into acceleration noise more than twice the real signal, smoothing trades noise for bias, and weak forms move the derivative onto a known test function. The second video separates new evidence from synthetic data, chooses the next experiment where candidate laws disagree, matches validation splits to the claim, and locks the data decisions in a readiness protocol before the search.
Key ideas, one per video
- Video 10With 1 mm of tracking noise at 30 frames per second, finite differences gave accelerations with about 2 m/s² of noise against a real signal below 0.8, and lost the damping; filming at 120 frames per second made it about 17 times worse. Smoothing found the right terms with damping 13% too small; the weak form found −16.1·x − 0.40·v.
- Video 11Over 40 noise draws, a model-generated 8 cm swing turned the stiffening coefficient (truth 400) into about −59 every time, while one real 8 cm recording gave about 402. Random-row and whole-recording splits could not tell a flexible polynomial from the law's form (7% vs 7%); an amplitude split could (58% vs 7%).
Book: Chapter 5 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 10 · 8:35
Is the data ready?
One phone video of a weight on a spring, three careful pipelines, three different laws. The difference is everything before the search.
With 1 mm of tracking noise at 30 frames per second, finite differences gave accelerations with about 2 m/s² of noise against a real signal below 0.8, and lost the damping; filming at 120 frames per second made it about 17 times worse. Smoothing found the right terms with damping 13% too small; the weak form found −16.1·x − 0.40·v.
TranscriptVideo 10
One video, three laws. We film a weight bouncing on a spring with a phone, at thirty frames per second. The tracking is good to about a millimetre. From that one video, three careful pipelines return three different laws. Finite differences say: a equals minus 17.8 x. The damping has vanished. Smoothing says: minus 15 x, minus 0.35 v. A weak form says: minus 16.1 x, minus 0.40 v. The law we simulated is minus 16 x, minus 0.4 v. Same data, same search. The difference is everything that happened before the search. This video is about that part. This is Module five: scientific data, noise, and experimental design. Part one: is the data adequate? Part two: noise and sampling. Part three: derivatives, and how to avoid them.
Is the data adequate?. A camera never returns the state of a system. It returns a measurement of it: a function of the state, the settings and the calibration, plus error. So every discovery depends on three things: the law, the experiment, and the measurement. Ask six questions before any search. Quantity: enough independent observations? Coverage: do they reach the states where candidate laws differ? Resolution: are the fast scales resolved? Signal to noise. Observability: are the needed variables measured at all? And excitation: was the system pushed hard enough? More data is not a universal remedy. Measuring somewhere new often beats measuring the same place again. Here's an example. Suppose our spring stiffens when it is stretched far: an extra term, minus four hundred x cubed. At a two centimetre swing, that term is about one percent of the force. At eight centimetres, it is sixteen percent. We estimated the cubic coefficient from small swings, two hundred times, with fresh noise each time. The estimates scattered widely. Some were negative. Some were three times the truth. From eight centimetre swings, every estimate landed within five percent of four hundred. No optimizer can create information the experiment never collected. The problem here isn't noise. It's support. Two more questions are about the experiment itself. Observability: if the mechanism needs a variable you never measured, the search will invent complicated stand-ins built from the variables you did measure. And excitation: a coefficient on something that barely changes is barely identified. Different starts, forcings or amplitudes are what separate one candidate term from another.
Noise and sampling. Part two: noise. The textbook picture is independent noise added to the response. Real data are messier. Error in the inputs, not just the outputs. Noise that grows with the signal. Errors that are correlated in time. An instrument that slowly drifts. Values clipped at a sensor's limit. And gaps that are not random. Each one does its own damage. Input error biases coefficients. Correlated errors make a sample look bigger than it is. Drift invents terms that depend on time. Clipping creates fake plateaus. And measurement noise is not the same as a random system. If the system itself is random, that randomness is part of the law you are looking for. Report noise against a scale. Five percent of what? For our camera: about one millimetre on a five centimetre swing, so two percent of the amplitude. Sampling decides which scales you can see at all. Our spring swings with a period of about 1.6 seconds. Sample it about every 1.4 seconds, and the points trace a slow wave with a period of almost 16 seconds. That's aliasing. The samples look smooth, convincing, and completely wrong. A search would happily fit a law for a slow oscillator that doesn't exist. Gaps have geometry too. Losing a random fifth of the frames thins the data. Losing the end of the recording removes the slow decay, exactly where damping shows itself. And dense is not the same as independent. A camera at a thousand frames per second does not give a thousand independent observations per second of a slow swing.
Derivatives amplify noise. Part three: derivatives. The camera gives positions. The law is about acceleration. Somewhere, positions must become velocities and accelerations. The simplest way is finite differences: the change between neighbouring frames, divided by the time step. For acceleration, a second difference, divided by the time step squared. And that's where noise explodes. With one millimetre of tracking noise at thirty frames per second, the noise in the computed acceleration is about two metres per second squared. The real acceleration never exceeds 0.8. Pause. Should we film in slow motion, at a hundred and twenty frames per second, to get better accelerations? Decide before we show you. It gets worse, about seventeen times worse: from about two, to about thirty four. Dividing by a smaller time step squared amplifies the same millimetre more. Finer sampling shrinks the approximation error, and multiplies the noise.
Smoothing and weak forms. The usual fix is smoothing: fit a smooth curve through the noisy positions, then differentiate the curve. Here, a local cubic fitted over half a second of frames. The acceleration noise drops from about two to about four hundredths. And the search now finds the right two terms. But look at the numbers: minus 15 x, and minus 0.35 v. Both are too small. Smoothing is a modelling choice. It decides what counts as signal. A wider window removes more noise, and more of the oscillation. With a quarter second window, the damping was off by four percent. With a second and a half, by sixty two percent. Or avoid differentiating the data at all. Multiply the law by a smooth bump that is zero at both ends of a window, and integrate. Integration by parts moves the derivatives from the noisy data onto the bump, which we know exactly. Acceleration times the bump becomes position times the bump's second derivative. No noisy derivative is ever computed. On the same video, the weak form gives minus 16.1 x, minus 0.40 v. Over forty noise draws, its damping stayed within about one percent, up to two millimetres of noise. But the window is a choice too. Narrow windows keep detail and average little noise. Wide windows average more, and can blur different regimes together. The window is part of the scientific design.
A sweep, and many recordings. Here's the whole sweep, with forty noise draws at each level. Finite differences recover the right two terms up to a quarter of a millimetre of noise, and never from half a millimetre on. Smoothing and the weak form keep the right terms much longer. At eight millimetres, smoothing still found them in nineteen draws of forty, and the weak form in all forty. But up to four millimetres, smoothing's damping stays about thirteen percent too small, because that error comes from the window, not from the noise. Right terms with wrong numbers, or good numbers with an extra term: structure and coefficients are separate questions. Report both. One recording rarely explores a whole system. Several starts, amplitudes or forcings cover more of the states where candidate laws differ. But keep the grouping. Frames from one recording are close cousins. When you test, split recordings, not rows. And before pooling experiments, ask whether the same law should hold in all of them. Pool different regimes, and you get an average law that fits none of them.
Recap. Let's recap. Adequacy depends on the claim: quantity, coverage, resolution, signal to noise, observability, and excitation. Small swings could not see the stiffening term at all. Noise comes in many shapes, so report it against a scale. Sampling can alias a fast swing into a slow one. And derivatives amplify noise: smoothing trades noise for bias, and weak forms move the derivative onto a function we know. In the lab, you'll damage our spring's data yourself. Next video: making better data, from synthetic enrichment to experiments chosen on purpose.
A swing nobody measured. Our spring stiffens at large swings, but we only measured swings up to four centimetres. So we let a model fill in an eight centimetre swing, and gave the search real and synthetic data together. Over forty noise draws, the search reported a stiffening coefficient near minus 59, every time. The true value is 400. With one real recording at eight centimetres instead, it found about 402. The synthetic swing looked smooth and physical. It carried the assumptions of the model that made it, and nothing new about the spring. In this video. Part one: what synthetic data can and cannot do. Part two: choosing the next experiment. Part three: validation splits that match the claim. Part four: a data-readiness protocol.
What synthetic data can and cannot do. Separate two things: choosing where to measure, and producing the value there. If a method picks a new swing and you then run that experiment, you have new evidence. If a model supplies the value as well, the point is synthetic. Synthetic data can still help. It can fill sparse regions, stabilize derivatives, or test a search under conditions you control. But every synthetic point is a descendant of a model. Enrichment can add numerical resolution without adding any structural information. Ten thousand generated points can reinforce a distortion more strongly than a hundred careful measurements. Even inside the measured range, support can be thin. Measurements bunched around two settings leave a gap between them. A generated point in that gap is inside the range, and still far from any real observation. Synthetic points also flatter the error bars. Each one counts like a measurement, so the fit looks more certain, while no new information has arrived. Generators differ in what they assume: small perturbations or interpolation, a statistical copy of the data, a model of outputs given inputs, a mechanistic simulator, or a learned generator with physics built in. Each one brings a prior. If a reconstruction enforces energy conservation, finding a law that conserves energy afterwards is not a discovery. It was built in upstream. And a law fitted only to simulator output is a law of the simulator. That can be very useful, as a compact surrogate. But testing it against nature needs measurements the simulator never saw. Pretrained generators carry a prior too: millions of training formulas decide which shapes feel familiar. Report the training distribution, so readers can tell prior exposure from evidence. The strongest use of synthetic data is the honest one: a controlled test, where the truth is known and the difficulty is turned up on purpose. Every number in this module came from exactly that kind of test. So every use of synthetic data needs a control: rerun without it, keep a flag on every generated point, and report the share of synthetic to real. For our spring, that control catches the problem at once. Real data alone gave about 400, with a wide spread. The synthetic swing flipped the sign, in all forty draws. The spread tells the same story. Across the draws, real data alone scattered widely around 400. With the one new recording added, the scatter shrank more than six times.
Choosing the next experiment. Part two: choose the next experiment on purpose. Fit the competing candidate laws, then ask where they disagree the most. From our small swings we have two candidates: a plain spring, and a stiffening one. Up to about three centimetres, they predict almost the same force. Beyond that, they pull apart faster and faster. So we run one swing at the largest amplitude we can safely reach. One recording settles a question that more small swings never could. The rule depends on the goal. Uncertainty for prediction. Disagreement between candidate laws for choosing a mechanism. Novelty for coverage. And you can choose more than x: starts, forcing, sensor positions, sampling times. Record the rule that chose each experiment. Otherwise nobody can tell whether the law was robust, or steered into the data. And when the procedure itself steers where to measure, the record has to say so, or a reader may credit the law with a robustness that was really the design. And notice the cost. More small swings would add more frames, but every one of them would sit where the two candidates already agree.
Splits that match the claim. Pause. A flexible model and the true law's form both score about seven percent error on frames held out at random. Which one would you trust at a bigger swing? Hold out a random fifth of the frames: 7.0 and 6.8 percent. Hold out a whole recording: 6.6 and 6.1 percent. Neither test tells them apart. Now train on swings up to four centimetres, and test on eight. The law's form: seven percent. The flexible polynomial: fifty eight percent. These are medians over forty noise draws. The split decides which question you answered. Random rows test interpolation. Whole recordings test new starts. Held-out amplitudes test extrapolation. Match the split to the claim. And keep preprocessing on the training side. Smoothing windows, normalization and synthetic points must never be tuned on the test data. Validation has three layers. Predictive: does the law forecast measurements? Structural: when the truth is known, are the right terms recovered? Scientific: does the law survive tests that played no part in finding it? These layers can disagree. A wrong expression can predict well over a narrow range, while a plausible one can lose a little accuracy inside the data, and extrapolate far better. Our spring shows all three. On random frames, the flexible polynomial predicted as well as the law. Its terms were not the spring's terms, so it failed the structural test. And at the bigger swing, it failed the scientific one.
A data-readiness protocol. Part four: a data-readiness protocol. Its job is simple: fix the data decisions before the search, so they cannot drift toward a favourite equation. Start with the claim, stated precisely. For example: one law for this spring, for swings up to eight centimetres, that predicts recordings from new starts. Then the measurement chain: what was measured, and what was derived. An acceleration computed twice from video is not a measurement with the same uncertainty as position. Then the rest: support, uncertainty from repeated measurements rather than from residuals, at least two derivative pipelines, splits fixed in advance, and a flag on every value: measured, derived, interpolated, or simulated. If the law changes whenever one reasonable preprocessing choice changes, the honest conclusion is that the data do not yet identify a stable law. The protocol is not a cage. If the first search reveals a missing variable or an unstable derivative, revise the protocol in the open, and start a new analysis. Never replace the old one silently. Here's our spring through the protocol. The claim: one law for swings up to eight centimetres. Measured: position only, with about a millimetre of noise. Derived: velocity and acceleration, three ways. Finite differences lost the damping. Smoothing found the right terms with numbers that were too small. The weak form found both. When pipelines agree on structure but not on numbers, that is itself a finding to report. Splits by recording and by amplitude, fixed in advance. No synthetic points in the final fit, and the enriched run reported as a warning. So what we would report is narrow, and honest: a stiffening spring, with a coefficient near 400 once the large swing was measured, valid for swings up to eight centimetres, from new starts.
Recap. Let's recap. Synthetic data adds computation, not evidence: control it, flag it, and report its share. Pretraining is a prior. Choose new experiments where candidate laws disagree: one well-placed recording beat many repeats. Splits must match the claim. And lock the data decisions before the search. In the lab, you'll choose the next swing yourself. Next module: static laws and interpretable surrogates.
8:35Video 10 · 5.1Is the data ready?With 1 mm of tracking noise at 30 frames per second, finite differences gave accelerations with about 2 m/s² of noise against a real signal below 0.8, and lost the damping; filming at 120 frames per second made it about 17 times worse. Smoothing found the right terms with damping 13% too small; the weak form found −16.1·x − 0.40·v.
8:19Video 11 · 5.2Making better dataOver 40 noise draws, a model-generated 8 cm swing turned the stiffening coefficient (truth 400) into about −59 every time, while one real 8 cm recording gave about 402. Random-row and whole-recording splits could not tell a flexible polynomial from the law's form (7% vs 7%); an amplitude split could (58% vs 7%).
Interactive lab
Noisy derivatives
Film a weight on a spring with a simulated phone: change the tracking noise, frame rate and windows, and watch finite differences, smoothing and a weak form recover (or lose) the law. Then choose the amplitude of the next swing to pin down a stiffening term.
The spring and the camera are simulated in your browser (a = −16·x − 0.4·v, made up). Four challenges are checked as you go.
A weight on a spring, filmed by a phone
The page simulates four recordings of 6 seconds (starts of 2 to 5 cm) from a = −16·x − 0.4·v, our own made-up spring. The camera sees the position x only, with tracking noise. Every pipeline searches the same library (1, x, v, x², x·v, x³, x²·v) with thresholded least squares. Everything runs in your browser.
Less noise, but the window also flattens the swing: a bias.
A bump φ that vanishes at both ends takes the derivatives; no noisy derivative is computed.
–
A · Three pipelines, one video
The true law is a = −16·x − 0.4·v. Damping error compares the coefficient of v with 0.4.
Dashed: the true acceleration. Grey: finite differences. Orange: smoothing.
B · The next swing
Now the spring stiffens: a = −16·x − 0.4·v − 400·x³. We have swings of 1, 1.5 and 2 cm (σ = 0.5 mm). The curve shows where a plain spring and a stiffening one, both fitted to those swings, disagree.
Challenges
Each one is checked as you go.
- Find a noise level where finite differences lose the right terms but the weak form keeps them.
- Show that a faster camera makes the finite-difference acceleration noisier (same tracking noise, higher frame rate).
- Pick a smoothing window that pushes the damping error above 30% while the weak form stays under 5%.
- Record one new swing that brings the stiffening coefficient within 3% of 400.
