Science Journaling Club Founded 2024

INTERACTIVE COMPANION · VOLUME 1, ISSUE 2 · ORIGINAL RESEARCH

The Tipping Bench

A live model accompanying “Can You Tell a System Is About to Tip Before It Does”

← Read the full article

Two benches sit below. The first drives a system toward a fold bifurcation and draws the early warning indicators underneath the state as they are computed, so you can watch them climb before anything visible happens. The second runs the same experiment a few hundred times and reports the two numbers that decide whether the climb was worth anything: how often the alarm goes off on a system that is genuinely about to tip, and how often it goes off on a system that is not.

Both run the same model as the club's Python analysis, at the same default settings, and the second one is set up to reproduce the article's headline figures within its own Monte Carlo error. Everything is computed in your browser. Nothing is fetched.

Model 1. Watch it happen

The system is one number, \(x\), sliding around in a landscape with two valleys. A control parameter \(\mu\) tilts that landscape. While \(\mu\) is small the valley the system is sitting in is deep and steep, so a kick decays quickly. As \(\mu\) rises the valley becomes shallow, then flattens, then stops being a valley at all, and the system falls into the other one.

$$\mathrm{d}x = \left(-x^3 + x + \mu(t)\right)\mathrm{d}t + \sigma\,\mathrm{d}W, \qquad z_k = x_k + \eta_k$$

The top panel is what you would see. The two lower panels are what an early warning analysis computes from it: lag-1 autocorrelation and variance, both in a sliding window of 100 samples with a straight line removed from each window first. The dashed curve on the autocorrelation panel is the analytic prediction, so you can see the measurement track it.

t: 0.00 μ/μc: 0.000 recovery rate κ: 2.0000 AC1: AC1 predicted: variance: state: on the lower branch
fold at
state at the fold
κ at the start
predicted AC1 at the start
These four are exact, and three of them are printed in the club's raw output, so they are the easiest way to check that this page and the Python agree.

Model 2. Count the false alarms

Watching one run is how people get convinced. Counting many runs is how people find out whether they should have been. This bench runs three ensembles with the same settings.

The first ramps to the fold and tips. The second is the near miss: driven at exactly the same rate, stopped short, held there. The third is flat and never goes anywhere. Every run is analysed identically, with a one-sided Mann-Kendall test on the autocorrelation series using only the data available at the lead time you choose.

power on tipping runs: alarms on the near miss: alarms on the flat control: AUC, tipping vs near miss: critical z used: windows in the test:
Press run. Three ensembles, one detector, and a number at the end that is either reassuring or not.

What the club got, for comparison

The Python analysis ran 3000 replicates per ensemble with the same defaults this page starts on, at a lead time of 40% of the run. Its numbers are below. Yours will differ by roughly the standard error of however many replicates you asked for, and if they differ by much more than that, one of us has a bug and we would like to know.

power on tipping runs
0.2107 ± 0.0074
alarms on the near miss
0.2053 ± 0.0074
alarms on the flat control, calibrated
0.0497
alarms on the flat control, tabulated
0.3017 ± 0.0084
AUC, tipping vs near miss
0.5021
critical z, calibrated, lead 100
4.654
One difference to expect: this page uses a different random number generator from numpy's, so no digit will match exactly. The rates should agree.

Three things on this page are exact rather than sampled, and those should match the club's output to the last digit printed: the fold at \(\mu_c = 0.38490018\), the state at the fold \(x = -0.57735027\), and the recovery rate at the start of the run \(\kappa = 2.000000\). The predicted autocorrelation at the start, 0.369408 at the default observation noise, is exact too, and it is the one worth checking, because it is the number the whole early warning argument is built on.