Growth and crowding, drift, spread, transport that depends on cover, and a wave term.
Symbolic Physical Laws DiscoveryLaws in practice
Module 8PDEs, fields and graphs
Many laws live in space as well as time: a temperature in a solid, a concentration in a fluid, a plant spreading along a coast. With our own simulations of a plant on a 100-km coast (the Fisher–KPP equation) we see why second derivatives from noisy sensors fail, and how the weak form in space and time avoids them; read initial and boundary conditions as evidence, since one front sliding through a window looks like drift; check conservation without derivatives; and choose among plausible laws with an experiment the fit never saw. Then the plant moves to forty ponds with no grid at all: spread becomes a sum over neighbours on a graph, the edges become part of the model, a delay offered to the search turns out to come from the noise, the law transfers to a new map, and a beetle that eats the plant shows what coupled fields need from the data.
Key ideas, one per video
- Video 16At 1 km spacing the true curvature of the cover profile was five times smaller than the noise of its three-point estimate; finite differences never found the law, while the weak form found it in 20, 20 and 19 of 20 draws at 0.2, 0.5 and 1% noise, and in none at 2%. Total cover matched summed growth within 0.6%, and on two merging releases the true three-term law forecast best; a cubic term fit slightly better and forecast worse.
- Video 17On forty ponds the lowest fit error came from the graph we simulated with in 20 of 20 draws; it forecast a new introduction within a median 0.75 weeks, while nearest-neighbour graphs missed by 11.5 and 14.5 weeks. A one-week delay improved the fit and was chosen every time at 1% noise, never with cleaner data, and forecast 3.25 weeks off. The law transferred to a new map within 0.75 weeks, and the coupled plant and beetle laws went from 11 and 12 of 20 draws to 20 and 20 with a second run.
Book: Chapter 8 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 16 · 8:36
Laws in space and time
Watching one front pass a 40-km stretch of coast, a law-finding search wrote a drift that isn't there. A release in the middle gave the true law.
At 1 km spacing the true curvature of the cover profile was five times smaller than the noise of its three-point estimate; finite differences never found the law, while the weak form found it in 20, 20 and 19 of 20 draws at 0.2, 0.5 and 1% noise, and in none at 2%. Total cover matched summed growth within 0.6%, and on two merging releases the true three-term law forecast best; a cubic term fit slightly better and forecast worse.
TranscriptVideo 16
A plant on the coast. A plant is spreading along a hundred kilometres of coast. Sensors every kilometre report how much of the ground it covers, four times a week. We simulated it, added one percent noise, and gave a law-finding search the readings from a forty-kilometre stretch while one front passed through. It wrote five terms, including a drift, as if a wind were pushing the plant along the coast. Nineteen noise draws out of twenty included that drift. Then we released the same plant in the middle of the coast and gave the search the whole coast from the start. Three terms: growth, crowding and spread. The law we simulated, in nineteen draws out of twenty. Same plant, same law, same noise. What changed was what the data saw. This video is about laws in space and time. This is Module eight: partial differential equations, fields and graphs. Part one: fields and their noisy derivatives. Part two: libraries and the weak form in space and time. Part three: initial and boundary conditions as evidence. Part four: conservation. Part five: choosing among plausible laws.
A field and its law. A field is a quantity with a value at every place and every time. Here, u is the fraction of ground the plant covers, between zero and one, at each point along the coast, in each week. The law we simulated is a classic. The rate of change of u equals 0.5 times u times one minus u, plus 4 times the second derivative of u in space. The first part is growth that slows as the ground fills up. The second is spread: plant moves from crowded stretches into empty ones. Laws like this make fronts that travel. Theory says the front's speed settles at 2.8 kilometres a week. Over our 24 weeks, the front averaged 2.5, still speeding up toward that limit. Before any search, look at what the field shows. The release flattens and widens. Two fronts move apart at the same speed. And after about twenty-one weeks, they reach the closed ends of the coast, where nothing leaves. Where does 2.8 come from? At the leading edge, the plant is sparse, so crowding hardly matters yet. There, growth and spread alone set the pace, and the speed works out to twice the square root of the growth rate times the spread rate: twice the square root of 0.5 times 4.
Derivatives in a field. Part one: derivatives in a field. The law needs the second derivative in space, the curvature of the cover profile. With a sensor every kilometre, the simplest estimate takes three neighbouring readings: left plus right, minus twice the middle. At week twelve, the largest true curvature anywhere on the coast was 0.005 per square kilometre. With one percent noise, the error of that three-point estimate was 0.023. The noise is five times the biggest signal. The signal is small because the profile bends gently over many kilometres, while the noise of three readings adds up. Finite differences failed at every noise level we tried, even at 0.2 percent. In a field, the derivative problem from Module five comes back stronger: more derivatives, and higher ones.
Libraries and the weak form. Part two: libraries and the weak form. Our library has seven candidate terms. Cover, its square and its cube, for growth and crowding. The first derivative in space, for drift. The second, for spread. Cover times its first derivative, for transport that depends on cover. And a third derivative, which appears in some wave equations. The weak form now works in two directions. Take a window, twelve kilometres by three weeks. Multiply the law by a smooth bump that vanishes at the window's edges, and integrate. Integration by parts moves every derivative, in space and in time, onto the bump, which we know exactly. On the middle release at one percent noise, it returned the growth term, 0.50 u; the crowding term, minus 0.50 u squared; and 3.99 times the second derivative, for the spread. Each weight within one percent of the truth. What's left are integrals of the readings themselves, which average the noise. Across twenty noise draws, the weak form found the law every time at 0.2 percent noise, every time at 0.5 percent, and nineteen times at one percent. It has a limit. At two percent noise it failed too, every time. Past that point, the fix is better data: more sensors, or more frequent readings. A weak form doesn't make noise disappear. It moves the derivatives to where we know them exactly. There's a second gift. Every window gives one equation, and a coast watched for twenty-four weeks holds many windows, so the search sees the same law tested in many places and times at once.
Initial and boundary conditions as evidence. Part three: initial and boundary conditions are evidence. Back to the opening puzzle. Why did one front, crossing a forty-kilometre stretch, produce a drift? Pause and predict. A front that keeps its shape and moves at a steady speed: which law explains it, growth with spread, or pure drift? Both. A shape sliding at a steady speed satisfies the drift law exactly. Inside that window, the front was close to sliding, so drift and spread could explain the same readings, and the search mixed them. The release in the middle broke the tie. A bump of plant spreads both ways at once, and no single drift can explain that. Two fronts moving apart, a peak that flattens, and closed ends where nothing leaves: each is a place where the candidate laws disagree. Where an experiment starts, and where its edges are, are part of the data. Choose them so that the laws you're comparing must disagree. In practice, ask for the parts of an experiment that look boring: how it starts, what happens at the edges, the moment two fronts meet. Those are where a wrong law gets caught.
Conservation. Part four: conservation. Many field laws share one shape: the change at a place equals what flows in, minus what flows out, plus what's made there. Spread is a flow. Growth is making. That gives a check that needs no derivative of the field at all. With closed ends, flow only moves plant around. So the total cover along the coast can change only through growth. We checked it on the middle release. At every reading but the first and the last, the rate of change of the total matched the growth summed along the coast to within 0.6 percent of its peak. This splits the library in two. Terms that only move plant should be written as differences of a flow, so they sum to zero over a closed coast. Only growth terms may change the total. Building that split into the library removes candidates before the search begins. Conservation is a law about the law. Check it on the data, then build it into the library.
Choosing among plausible laws. Part five: choosing among plausible laws. We fitted four candidates to the middle release, then asked each to predict a new experiment: two releases, at 25 and 75 kilometres, whose fronts run into each other. Growth with spread: fit error 0.046, forecast error 0.002 of cover. Add a cubic growth term, and the fit gets slightly better, 0.045, while the forecast gets slightly worse, 0.003. Drift with growth fits four times worse, and misses the merger by 0.6. Spread with growth that never slows misses by about as much: 0.6 again. The cubic term's weight was 0.01, small enough to look harmless. It bought a better fit and a worse forecast. Choose among laws with experiments they haven't seen, designed where they disagree. Fit error alone always rewards an extra term.
Recap. Let's recap. A field law needs derivatives in space and time, and the higher ones drown in noise. The weak form moves them onto a bump we know exactly. Initial and boundary conditions decide which laws the data can tell apart. One front sliding through a window can't separate drift from spread. Conservation gives a check without derivatives, and a cleaner library. And between plausible laws, held-out experiments decide, not the fit. In the lab, you'll choose the experiment, the noise and the method, and see which laws survive. Next video: what if there's no grid at all? Laws on graphs.
A delay nobody put in. We gave a law-finding search one extra option: a delay. Spread between ponds could depend on what the neighbours looked like a week earlier. The search took that option in twenty noise draws out of twenty, and the fit improved. There is no delay in the simulation we made. In part three, you'll see where it came from, and how a forecast caught it when the fit didn't. This video is about laws without a grid: laws on graphs. This is Module eight, video two. Part one: from grids to graphs. Part two: building the graph. Part three: edges in time. Part four: one law, many maps. Part five: coupled fields. And part six: benchmarks you can trust.
From grids to graphs. Our plant now lives in forty ponds, scattered over a landscape sixty kilometres on a side. Seeds travel between ponds. There's no coastline and no x axis, so there's no second derivative to take. On a graph, spread is a sum over neighbours: each neighbour's cover minus mine, times the weight of the edge between us. It's the graph's version of the second derivative, and it's called the graph Laplacian. We simulated growth at 0.5 per week, as before. Spread runs at the same rate, along edges whose weight fades with distance, falling by a factor of e every five kilometres, with no edges beyond fifteen. Two introductions, one in a corner and one in the middle. Readings four times a week, with one percent noise. Each pond gives its own time series, so the weak form works in time only. The library: cover, cover squared, and the graph term. Why does a sum over neighbours act like a second derivative? On a line of sensors, the sum over the two neighbours, left minus me plus right minus me, is exactly the three-point estimate from the last video: left plus right, minus twice the middle. A graph just lets the neighbours be anywhere.
Building the graph. Part two: building the graph. A law on a graph doesn't come with edges. We choose them, and the choice is part of the model. We tried seven: three or six nearest neighbours, every pond within eight or within fifteen kilometres, and weights that fade over two and a half, five or ten kilometres. Pause and predict. Which graph will forecast better: each pond linked to its six nearest neighbours, or every pond within fifteen kilometres, counted equally? The fit first. In all twenty noise draws, the lowest fit error came from the graph we simulated with, fading over five kilometres. Nearest-neighbour graphs fit worst. Then the real test: a third introduction, near another corner, and the week each pond reaches half cover. The five-kilometre graph missed by a median of 0.75 weeks. Within fifteen kilometres: 1.25. Six nearest neighbours: eleven and a half weeks. And within eight kilometres, the graph broke into islands, and the forecast reached three ponds out of thirty-nine. A nearest-neighbour graph gives a pond in a tight cluster the same number of links as an isolated pond, however far its neighbours are. In our landscape, spread depends on distance, not on how many neighbours a pond has. One honest caveat. Weights fading over ten kilometres forecast as well: a median of half a week. Forecasts couldn't separate those two graphs, while the fit preferred five kilometres every time. Report both. A useful habit: when the edges are a choice, keep the rejected graphs in the report. A reader who sees that six nearest neighbours missed by eleven and a half weeks learns how much the edge rule matters.
Edges in time. Part three: edges in time. Some processes really do have delays, like seeds that take a week to sprout. A temporal edge links the neighbours' cover a week ago to a pond's change now. So we added a week-old copy of the graph term to the library. The fit error dropped to 0.133, down from 0.147. And sparse regression kept the week-old copy and dropped the instant one, in all twenty draws. Then the forecast: arrival weeks off by a median of 3.25 weeks, instead of 0.75. A better fit, and a worse law. Where did the delay come from? The noise. With clean data, the search never picked it. At 0.2 and 0.5 percent noise, never. At one percent, every time. Noise also bends the instant term. On clean data, the spread rate comes out at 0.50. At one percent noise, it comes out at 0.42. A likely reason the week-old copy won: its noise is independent of today's readings, so it escapes part of that bias. So before believing a delay, run the same pipeline on simulated data with no delay and your noise level. If a delay appears there too, it's the pipeline talking, not the system.
One law, many maps. Part four: one law, many maps. A law written per pond and per edge isn't tied to these forty ponds. It's a rule for any map of ponds. So we drew a new landscape, forty other ponds, and ran the laws found on the first map, each with its own rule for edges. The five-kilometre law forecast arrival weeks within a median of 0.75 weeks, at all forty ponds. Within fifteen kilometres: 1.5 weeks. Six nearest neighbours reached thirty-five ponds of forty, and missed by eleven weeks. In machine learning, models that learn maps from one whole field to another, whatever the grid, are called neural operators. A symbolic law on a graph is a small, readable relative. It transfers because the edge rule is part of the law. An irregular domain isn't an obstacle for a graph law. The test is whether the law, edge rule included, works on a map it has never seen.
Coupled fields. Part five: coupled fields. Back to the coast, now with a beetle that eats the plant. There are two fields now, each with its own law. The plant grows, spreads, and is eaten, at a rate of u times v. The beetle spreads, grows by eating, 0.6 u v, and dies at 0.2 per week. Each law gets a library of seven terms: u and v, their squares, their product, and both second derivatives. One run: plant everywhere at 0.9 cover, beetles released in the middle. The plant's law came out right in eleven draws out of twenty, the beetle's in twelve. Here's a wrong beetle law: the right three terms, and two extras. Plus 0.01 u. And minus 0.01 u squared. Two tiny terms that nearly cancel. With the plant near 0.9 almost everywhere, u and u squared move together; their correlation was 0.994. The library can't tell them apart. The fix is the one that worked for the chemical clock: data where each field varies on its own. We added a second run that starts with sparse cover, five percent along the coast plus a dense patch at the west end, so the plant ranges from 0.05 to full cover. With both runs, both laws came out right in all twenty draws. In a coupled system, every field must move on its own somewhere in the data, or the search can swap a term for a look-alike.
Benchmarks you can trust. Part six: benchmarks you can trust. Every number in this module came with its noise level and its number of draws: twenty noise draws for each search, ten for each forecast. We reported the failures with the successes: the weak form at two percent noise, nearest-neighbour graphs, the eight-kilometre graph, the delay. And every claim was tested on an event the fit never saw: merging fronts, a third introduction, a new landscape. One more thing made these numbers checkable: we knew the true law, because we simulated it. With real data you won't. So before trusting a pipeline on real fields, run it on simulated fields with your sensors, your sampling and your noise, and see what it finds. A benchmark you can trust says what was tried, how often it worked, how it failed, and what it was tested on.
Recap. Let's recap. On a graph, spread becomes a sum over neighbours, and the edges are part of the model: choose them with the fit and with forecasts. A delay that appears in a found law may come from the noise. A negative control on simulated data tells you. A law with an edge rule transfers to new maps. Coupled fields need data where each field varies on its own. And benchmarks report draws, failures and held-out tests. In the lab, you'll choose the data, the method and the threshold, and test the law you find on an experiment it hasn't seen. Next module: trustworthy discovery. How sure can we be of a law we found?
8:36Video 16 · 8.1Laws in space and timeAt 1 km spacing the true curvature of the cover profile was five times smaller than the noise of its three-point estimate; finite differences never found the law, while the weak form found it in 20, 20 and 19 of 20 draws at 0.2, 0.5 and 1% noise, and in none at 2%. Total cover matched summed growth within 0.6%, and on two merging releases the true three-term law forecast best; a cubic term fit slightly better and forecast worse.
8:39Video 17 · 8.2From grids to graphsOn forty ponds the lowest fit error came from the graph we simulated with in 20 of 20 draws; it forecast a new introduction within a median 0.75 weeks, while nearest-neighbour graphs missed by 11.5 and 14.5 weeks. A one-week delay improved the fit and was chosen every time at 1% noise, never with cleaner data, and forecast 3.25 weeks off. The law transferred to a new map within 0.75 weeks, and the coupled plant and beetle laws went from 11 and 12 of 20 draws to 20 and 20 with a second run.
Interactive lab
Field discovery
Choose an experiment on the coast, the noise, the pipeline and the threshold, and run sparse regression on seven candidate field terms. See a window that watches one front invent a drift, find where the weak form stops working, and test the law you find on two releases that merge, an experiment the fit never saw.
The plant is simulated in your browser with the Fisher–KPP equation (sensors every 1 km, four readings a week for 24 weeks, Gaussian noise, closed ends). Four challenges are checked as you go.
A plant on the coast, one field law
The page simulates a plant spreading along 100 km of coast with the Fisher–KPP equation: ∂u/∂t = 0.5·u·(1 − u) + 4·∂²u/∂x², where u is the fraction of ground covered. Sensors every 1 km read u four times a week for 24 weeks, with the noise you choose; the ends of the coast are closed. Everything runs in your browser.
A smooth bump on windows 12 km × 3 weeks takes every derivative; the readings are only integrated.
The found law runs on an experiment it never saw; the error is in cover, 0 to 1.
–
The law found
Sparse regression on the readings the search saw (map below: green is more cover; time runs down).
–
A test the fit never saw
Two releases, at 25 and 75 km, whose fronts merge. Dashed: the true plant. Orange: the found law from the same start.
Challenges
Each one is checked as you go.
- Find the plant’s three-term law at 1% noise or more. Hint: the pipeline matters.
- Watch one front through the 40-km window and get a law with a drift term; then find the plant’s law from the middle release, with the same noise and method.
- Find where the weak form stops working on the middle release: the law found at 1% noise and missed at 2%.
- Forecast the merging fronts to within 0.005 of cover (RMS) with a law found at 1% noise or more.
