RC Prediction: A Python Package for Parameter-Aware Reservoir Computing

Jin-Cheng Rao, Zheng-Meng Zhai, Ying-Cheng LaiarXiv 2026 · arXiv

TL;DR

The new open-source Python package rc_prediction implements Parameter-Aware Reservoir Computing (PARC), a framework that allows data-driven models to generalize across different system settings. By treating system parameters as input channels, the package can predict critical transitions and system collapses even at parameter values that were never observed during training.

What Problem Does This Paper Address?

Nonlinear dynamical systems—ranging from power grids and ecosystems to climate subsystems—are rarely static. Their behavior changes as underlying parameters vary. A system might be stable at one setting but collapse abruptly (a "tipping point" or bifurcation) if a parameter crosses a critical threshold.

Traditional data-driven forecasting models, including standard Reservoir Computing (RC), are typically "parameter-blind." They are trained on time series recorded at a fixed operating condition. Consequently, they cannot predict how the system will behave if the parameters change. To predict behavior at a new parameter value, you usually need new data from that specific regime—data that is often impossible to collect before a catastrophic collapse occurs.

The authors address this gap by providing a dedicated, installable tool for learning a family of dynamics, enabling researchers to interpolate and extrapolate behavior across a parameter space.

Methods

The package is built on the Parameter-Aware Reservoir Computing (PARC) framework. Unlike standard Echo State Networks (ESNs), PARC feeds the bifurcation parameter $p$ into the reservoir through an additional input channel.

The PARC workflow: (1) Training on multiple pre-critical time series, (2) Feeding state and parameter into a fixed reservoir, (3) Predicting collapse at unseen test parameters.

Key technical features include:

  • Hybrid Input: The reservoir state evolves based on both the observed system state $u(t)$ and the scaled parameter $p$.
  • Linear Readout: Only the output weights ($W_{out}$) are trained using ridge regression. The reservoir itself remains a fixed, random recurrent network, making training computationally cheap.
  • Closed-Loop Rollout: For prediction, the model's one-step-ahead output is fed back as its next input, allowing it to evolve autonomously at a user-specified $p_{test}$.
  • GPU Acceleration: The package includes an optional PyTorch backend to offload heavy matrix-vector products to a GPU, which is particularly beneficial for large reservoir sizes ($N > 1000$).

Datasets

The paper demonstrates the package using three classic benchmark dynamical systems:

  1. Ikeda Map: A discrete-time model of light in an optical resonator, used to test the prediction of chaotic escape.
  2. Food Chain Model: A three-species (resource-consumer-predator) continuous-time model used to predict species extinction/collapse.
  3. Kuramoto–Sivashinsky (KS) Equation: A high-dimensional benchmark for spatiotemporal chaos, demonstrating the package's ability to handle complex, extended systems.

Key Insights and Ideas

  • Extrapolation as a "Digital Twin": By training on multiple "safe" (pre-critical) parameter values, the model learns the trend of the dynamics. This allows it to act as a digital twin that can be queried about "what-if" scenarios in regimes where no data exists.
  • The GPU Overhead Threshold: Interestingly, the authors found that GPU acceleration only pays off for very large reservoirs. For $N \le 1000$, the overhead of moving data between the CPU and GPU actually makes the process slower than using NumPy on a CPU.
  • Ensemble Reliability: A single reservoir's prediction of a critical point can be noisy. The authors emphasize using ensembles of independently initialized reservoirs to provide a distribution of predicted lifetimes and transition points, offering a measure of model uncertainty.

Key Results

The authors successfully demonstrate that rc_prediction can anticipate system collapse using only "safe" training data:

  • Ikeda Map: Trained on data where the system was stable ($\mu \in \{0.91, 0.94, 0.97\}$), the model's ensemble correctly identified a rising probability of collapse as $\mu$ approached and crossed the true critical value ($\mu_c = 1.006$).
  • Food Chain: The model accurately bracketed the transition to predator extinction between $K=1.000$ and $1.001$, very close to the true threshold of $K_c \approx 0.99976$.
  • Performance: For a large reservoir of 8,000 units, the GPU implementation provided a 4.5x speedup over the CPU version.
Figure 2: Structure of rc prediction. The model predicts the next state as a trained linear readout of the reservoir features, u(t+∆t) ≈Wout ϕ(r(t+∆t)); each factor of this equation corresponds to one part of the package, which supplies the data u, fits the readout Wout, or generates the reservoir features ϕ(r). The dashed box labeled “Parameter-aware extensions” collects the components added for the parameter-aware framework on top of a standard echo state network.

Limitations and Future Work

While powerful, the authors note several practical constraints:

  • Data Requirements: The current implementation requires training data from at least three distinct parameter values to learn the dependency effectively.
  • Post-Collapse Fidelity: Because the model is never shown post-collapse data, the state it reaches after a predicted collapse is not a physical prediction of the "ruined" system, but rather a signal that the system has left its known attractor.
  • Hyperparameter Sensitivity: The accuracy of the predicted critical point is highly sensitive to hyperparameter tuning, which remains a dominant source of uncertainty.

Future versions of the package may expand to other PARC applications, such as reconstructing full bifurcation diagrams or tracking time-varying parameters in real-time.

Summary updated

Abstract

A nonlinear dynamical system can be characterized by the autonomous evolution of its state in time and its dependence on system parameters. As a parameter varies, the dynamics can change quantitatively and, at bifurcation points, qualitatively. When the governing equations are unknown, a data-driven model should therefore capture both elements from observational data, rather than reproduce the dynamics at a single operating condition only. Parameter-aware reservoir computing (PARC) is a model-free framework for this purpose, where the parameter is supplied to a reservoir computer through an additional input channel. PARC is trained on time series recorded at several parameter values, and the trained reservoir, run in closed loop as an autonomous dynamical system, generates trajectories at parameter values that were never observed. rc_prediction is an open-source Python package that implements this workflow. It provides multi-parameter training of a reservoir, autonomous closed-loop prediction at user-specified parameter values, parameter scans, and a standard echo state network for forecasting at a fixed parameter. Hyperparameter optimization and optional GPU acceleration through PyTorch are also provided. We use three benchmark dynamical systems as examples to demonstrate its usage. As one of the featured applications, here we illustrate the prediction of critical transitions and system collapse: trained only on pre-critical data, the model is queried beyond the training range to predict whether the system collapses, to estimate the critical parameter $p_c^{*}$, and to characterize transient lifetimes.
BibTeX
@misc{rao2026rc,
  author = {Jin-Cheng Rao and Zheng-Meng Zhai and Ying-Cheng Lai},
  title = {{RC Prediction: A Python Package for Parameter-Aware Reservoir Computing}},
  year = {2026},
  eprint = {2610.40984},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.40984},
}
Figure