TipBox
TipBox is a collection of tipping models and empirical observations. It covers bifurcation- and rate-induced tipping in stochastic systems, with early-warning indicators such as lag-1 autocorrelation and variance.
Contents
- Installation
- Generate or load a time series
- Early-warning indicators
- Benchmarking
- Systems
- Notebook examples
- Used in research
- Citation
Installation
pip install tipbox
For development, clone this repository and run pip install -e ..
Generate or load a time series
TipBox provides a common interface to simulate tipping systems and load observations. See the system collection for available models and their documentation.
from tipbox.models import MayHarvesting, SaddleNode
from tipbox.datasets import Microcosm
# Bifurcation-induced tipping
harvesting = MayHarvesting()
bifurcation = harvesting.make_trajectory(num_samples=1200, noise=1.0, seed=43)
bifurcation_control = harvesting.make_trajectory(num_samples=1200, noise=1.0, seed=43, null_simulation=True)
# Rate-induced tipping
rate_model = SaddleNode(epsilon=1.4)
rate = rate_model.make_trajectory(num_samples=2401, noise=0.01, seed=43)
rate_control = rate_model.make_trajectory(num_samples=2401, noise=0.01, seed=43, null_simulation=True)
# Empirical observations: Veraart et al. (2012), chemostats M1 and M2.
observed = Microcosm().load()
Simulation results contain time and trajectory arrays; loaded observations contain time and observations. Equations, parameters, and simulation controls are in the documentation.
Empirical panels: CC BY-NC 4.0.
Compute early-warning indicators
Choose an observable and apply a trailing-window statistic before the fold:
from tipbox.indicators import rolling_ar1, rolling_variance
before_fold = bifurcation.param_values < harvesting.critical_parameter
signal = bifurcation.trajectory[before_fold, 0]
# Get early warning signals
ar1 = rolling_ar1(signal, window=200, detrend="linear")
variance = rolling_variance(signal, window=200, detrend="linear")
The indicator reference also covers autocorrelation, skewness, and kurtosis.
Benchmarking
Evaluate indicator trends on tipping and control trajectories with the area under the ROC curve (AUROC). Each trajectory contributes one score.
Generate a batch
Batches support repeated experiments and indicator comparisons:
from tipbox.models import MayHarvesting
from tipbox.datasets import generate_dataset
from tipbox.indicators import rolling_ar1, rolling_variance
from tipbox.metrics import ensemble_roc, plot_roc
# 50 tipping trajectories + 50 controls; retain 300 samples before each tipping threshold.
batch = generate_dataset(
MayHarvesting(), num_tipping=50, num_controls=50, num_samples=1000,
context_samples=300, noise=1.0, seed=43,
)
signals = batch.observations[:, :, 0] # First observed variable in each trajectory.
indicators = {
"AR1": [rolling_ar1(x, window=100, detrend="linear") for x in signals],
"Variance": [rolling_variance(x, window=100, detrend="linear") for x in signals],
}
Score the indicator trend in each trajectory and plot the ROC curves:
report = ensemble_roc(batch.labels, indicators) # Labels: 0 control, 1 tipping.
ax = plot_roc(report)
See the benchmark guide for labels, trend scores, and evaluation conventions.
Systems
Import model classes from tipbox.models and observation classes from tipbox.datasets.
Model links include equations and defaults; observation links describe .load().
| System | Class / call | Mechanism / observable |
|---|---|---|
| Models | ||
| May harvesting | MayHarvesting |
Fold |
| Rosenzweig–MacArthur | RosenzweigMacArthur |
Transcritical / Hopf |
| Disease and vaccination | SEIRx |
Transcritical |
| Ocean overturning | AMOCFold |
Fold |
| Moving saddle-node | SaddleNode |
Rate-induced |
| Moving Bautin | Bautin |
Rate-induced |
| Compost bomb | CompostBomb |
Rate-induced |
| Ocean overturning | AMOCRate |
Rate-induced |
| Ricker population map | Ricker |
Population decline |
| Combustion oscillator | Thermoacoustic |
Subcritical Hopf |
| Empirical observations | ||
| Microcosm · M1 and M2 | Microcosm().load() |
Light attenuation |
| Voice onset | VoiceOnset().load() |
Subglottal pressure |
| Cellular ATP | CellularATP().load() |
Fluorescence ratio |
| Paleoclimate | Paleoclimate().load() |
CaCO₃ |
| Electrical blackout | ElectricalBlackout().load() |
Frequency |
Full reference: system catalog.
Notebook examples
Used in research
- [In revision] Nathaniel et al. (2026), Koopman early warning signals for bifurcation and rate-induced tipping. Code: KEWS.
- [NeurIPS 2026] Sevinchan, Nathaniel, et al. (2026), In-context learning to predict critical transitions in dynamical systems.
Citation
If you use TipBox's code or datasets, we would appreciate citations to these works:
@article{nathaniel2026koopman,
title={Koopman early warning signals for bifurcation and rate-induced tipping},
author={Nathaniel, Juan and Roesch, Carla and DeSantis, Derek and Kooloth, Parvathi and Fan, Hang and Lucarini, Valerio and Romanou, Anastasia and Gentine, Pierre},
journal={arXiv preprint arXiv:2608.14716},
year={2026}
}
@article{sevinchan2026context,
title={In-context learning to predict critical transitions in dynamical systems},
author={Sevinchan, Yunus and Nathaniel, Juan and Ueltzh{\"o}ffer, Kai and Roesch, Carla and Weber, Tobias and Laschos, Vaios and Fan, Hang and Ramien, Gregor and Haux, Johannes and Gentine, Pierre and others},
journal={arXiv preprint arXiv:2605.12308},
year={2026}
}
Metadata
Release files for tipbox 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tipbox-0.1.0.tar.gz | 50.4 kB | Without provenance | Details for tipbox-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tipbox-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for tipbox-0.1.0-py3-none-any.whl |
Total release size: 114.4 kB
Release files / tipbox-0.1.0.tar.gz
| Download URL | tipbox-0.1.0.tar.gz |
|---|---|
| Size | 50.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e258c17db5b5bf13e017dfaa19dc58f0912e58ab96bef9e9371ebb039479c125
|
|
BLAKE2b-256 checksum How to use checksums |
2c8dfbeabd607960b407c620afec656b6b4ae1b00c9582f7339624e516291ed4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.14
|
Release files / tipbox-0.1.0-py3-none-any.whl
| Download URL | tipbox-0.1.0-py3-none-any.whl |
|---|---|
| Size | 64.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d237f2f629f3d41d7c06968cd7ed358f2caac119a5ba45b030a52b0c726ea193
|
|
BLAKE2b-256 checksum How to use checksums |
c95226b7e46f960c4c90eed71898711d6111acdf78ba5e0de363b5494b061c2b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.14
|
Security for tipbox 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.