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.

By the end you should be able to judge whether data are adequate for a discovery claim, diagnose noise and sampling problems, choose between finite differences, smoothing and weak forms, control synthetic data, design the next experiment, and match the validation split to the claim.

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.

The title slide of Module 5: Scientific data, noise and experimental design

30 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.5 MB.

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
0:00

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.

0:57

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.

2:37

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.

4:11

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.

5:15

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.

6:40

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.

7:43

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.

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.

Simple math

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.

Finite differences
a ≈ (xᵢ₊₁ − 2xᵢ + xᵢ₋₁) / Δt²

Simple, and the noise is divided by Δt²: faster cameras make it worse.

Smoothing
local cubic, then differentiate

Less noise, but the window also flattens the swing: a bias.

Weak form
∫ φ·a dt = ∫ φ″·x dt

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.

3 cm
Stiffening k₃, small swings only
–
With the new swing (truth 400)
–

Challenges

Each one is checked as you go.

  1. Find a noise level where finite differences lose the right terms but the weak form keeps them.
  2. Show that a faster camera makes the finite-difference acceleration noisier (same tracking noise, higher frame rate).
  3. Pick a smoothing window that pushes the damping error above 30% while the weak form stays under 5%.
  4. Record one new swing that brings the stiffening coefficient within 3% of 400.