ML for Science - Lecture 6
Chaos, uncertainty, and the bridge from randomness to determinism
So far:
Today:
"A system where the whole is much more than the sum of its parts."
Key properties:
Physical
Biological
Social/Tech
When applying ML to science, you often encounter:
Fluid heated from below, cooled from above — creates convection cells
Basic mechanism of atmospheric and oceanic circulation
Barry Saltzman (Yale, 1961) developed a 7-equation model for convection.
He showed it to Edward Lorenz at MIT - one solution "refused to settle down."
Lorenz noticed: 4 variables quickly became tiny. Only 3 were "keeping each other going."
Saltzman's 7 equations reduced to 3:
$\sigma = 10$, $\rho = 28$, $\beta = 8/3$
Just 3 coupled ODEs, yet the dynamics are incredibly complex
The trajectory never repeats but stays on this strange "butterfly" shape
Lorenz wanted to extend a simulation. Instead of starting over, he typed in values from a printout:
A difference of about 0.0001 - surely that can't matter?
He goes for coffee, comes back, and...
The two simulations start nearly identical, then completely diverge.
■ Original vs ■ Perturbed by $\varepsilon$
No matter how small $\varepsilon$ is, the trajectories eventually diverge completely.
"Does the flap of a butterfly's wings in Brazil set off a tornado in Texas?"
Lorenz's discovery:
What happens to a distribution of initial conditions in the Lorenz system?
A tight cluster of initial conditions spreads across the entire attractor
100 trajectories starting within $10^{-6}$ — sample at time $t$ to get a distribution
The histogram shows a Probability Mass Function (PMF) — counts in discrete bins
What if $\Delta x \to 0$?
As we use more bins (smaller $\Delta x$), the histogram approaches a smooth curve:
Click to add samples — each gets a Gaussian "kernel", and they sum to form the estimate
(Optional background material)
Key concepts we'll use throughout the course:
A random variable $X$ maps outcomes to numbers:
For discrete random variables:
For continuous random variables, the PDF $f(x)$ gives probability via integration:
The "center of mass" of the distribution
How spread out the distribution is
Two random variables are independent if knowing one tells you nothing about the other:
Independence is a strong assumption — rarely true in real data!
Inverting conditional probabilities:
▶ 3Blue1Brown: Bayes theorem, the geometry of changing beliefs
One of the most important results in probability:
Robert Brown (1827):
Observed pollen grains moving erratically in water under a microscope.
Albert Einstein (1905):
Explained it as evidence for atoms! Tiny molecules randomly bump the particle.
Imagine being pushed randomly by a crowd - you end up doing a "random walk"
At each step, move randomly — left: trajectories, right: density estimate (KDE)
Consider a 1D random walk on a grid with spacing $\Delta x$ and time step $\Delta t$:
Probability at position $x$ at time $t + \Delta t$ comes from neighbors:
Subtracting $p(x, t)$ on both sides:
Taylor expand for small $\Delta x$ and $\Delta t$:
Substituting and simplifying:
The same physics can be written as a Stochastic Differential Equation:
Evolution of probability density
Langevin equation for single particle
This is how we go from randomness at small scales to determinism at large scales.
A profound lesson for modeling:
Many complex systems have a network structure:
The FitzHugh-Nagumo model: a 2D simplification of Hodgkin-Huxley (equivalent to the Van der Pol oscillator circuit)
| $V$ | membrane potential |
| $W$ | recovery variable |
| $I$ | input current |
| $\varepsilon$ | time scale |
Flow field shows state evolution. Cubic shape creates excitability: small push → large spike.
Neurons interact through synaptic connections:
Coupling strength $g_{jk}$ determines influence of neuron $j$ on neuron $k$
Explore how coupling strength affects synchronization:
Artificial neurons are a simplification: