Controlling transient chaos in the Lorenz system with machine learning
Eur. Phys. J. Spec. Top.
https://doi.org/10.1140/epjs/s11734-025-01589-w
THE EUROPEAN
PHYSICAL JOURNAL
SPECIAL TOPICS
Regular Article
Controlling transient chaos in the Lorenz system
with machine learning
David Vallea , Rubén Capeansb , Alexandre Wagemakersc , and Miguel A. F. Sanjuánd
Nonlinear Dynamics, Chaos and Complex Systems Group, Departamento de Fı́sica, Universidad Rey Juan Carlos, Tulipán
s/n, Móstoles, Madrid 28933, Spain
Received 28 January 2025 / Accepted 14 March 2025
© The Author(s) 2025
Abstract This paper presents a novel approach to sustain transient chaos in the Lorenz system through
the estimation of safety functions using a transformer-based model. Unlike classical methods that rely
on iterative computations, the proposed model directly predicts safety functions without requiring finetuning or extensive system knowledge. The results demonstrate that this approach effectively maintains
chaotic trajectories within the desired phase space region, even in the presence of noise, making it a viable
alternative to traditional methods. A detailed comparison of safety functions, safe sets, and their control
performance highlights the strengths and trade-offs of the two approaches.
1 Introduction
Chaos theory has long captivated researchers due to its intricate dynamics and wide-ranging implications across
fields such as meteorology, engineering, and biology [1]. Among its foundational models, the Lorenz system stands
out as a key representation of chaotic behavior [2]. Originally developed to model atmospheric convection, the
Lorenz system comprises three coupled nonlinear differential equations, showing sensitivity to initial conditions
and the presence of invariant structures like chaotic attractors.
Transient chaos is a notable phenomenon in chaos theory, characterized by systems temporarily exhibiting
chaotic behavior before settling into a final state. In many cases, transient chaos can be beneficial. For instance,
chaotic vibrations can enhance the efficiency of energy harvesters [3]. Similarly, chaotic dynamics in ecological
models can stabilize populations and prevent collapse [4]. To address the challenge of managing transient chaos,
researchers have developed techniques like partial control, which rely on safe sets and safety functions [4], to confine
chaotic trajectories within desired regions of phase space [5, 6].
The safety function is an essential tool for confining chaotic transients in systems described by difference equations. By determining the minimal control needed to keep trajectories within a specified phase-space region over
a certain number of iterations [7, 8], it provides a robust method for chaos control. While controlling noise-free
systems is relatively simple, achieving low control efforts in noisy scenarios presents a greater challenge. However, computing the safety function is resource-intensive, particularly for high-dimensional systems or real-time
applications. This computational complexity limits its broader application in scenarios where rapid solutions are
critical.
Recent advances in machine learning have introduced efficient alternatives for estimating safety functions [9].
Transformer-based models, in particular, have shown great promise in estimating the convergence behavior of the
safety function for a wide range of dynamical systems without the need for fine-tuning. These models significantly
improve computational efficiency and bypass the requirement of a physical model by relying solely on samples of
trajectories from the dynamical system.
a
e-mail:
e-mail:
c
e-mail:
d
e-mail: (corresponding author)
b
0123456789().: V,-vol
123
Eur. Phys. J. Spec. Top.
In this paper, we explore the application of the transformer-based model proposed in [9] for estimating safety
functions and safe sets in the one-dimensional Lorenz system, a simplified yet representative model of the threedimensional Lorenz system. This approach leverages machine learning to provide accurate predictions without
requiring extensive system knowledge or iterative computations, offering a novel perspective on controlling chaotic
systems. By comparing the machine learning-based safety functions with those obtained from classical methods,
we demonstrate the potential of this approach to enhance control strategies and provide new insights into transient
chaos management.
The paper is organized as follows: Sect. 2 provides an overview of the Lorenz system, detailing its dynamics
and the construction of the one-dimensional map used for control. Section 3 outlines the computation of safety
functions using both classical and machine learning-based methods. Section 4 presents the results, including a
detailed comparison of the safety functions and their derived safe sets, control efforts, and trajectory behaviors for
both approaches. Finally, Sect. 5 discusses the key findings, limitations of the study, and potential directions for
future research.
2 The Lorenz system
The Lorenz system, introduced by Edward Lorenz in 1963 [2], is a canonical example of chaotic dynamics in
nonlinear systems. It consists of three coupled nonlinear differential equations:
ẋ = σ(y − x),
ẏ = x(r − z) − y,
ẋ = xy − bz.
(1)
Here, the dot notation (e.g., ẋ) indicates differentiation with respect to time. Depending on σ, r , and b values,
the system can exhibit periodic solutions, chaotic attractors, or transient chaos. For this study, we set σ = 10,
b = 8/3, and r = 20, a regime known to produce transient chaos [10, 11].
For this choice of parameters, transient chaos in the Lorenz system is characterized by chaotic trajectories that
eventually decay into one of two fixed-point attractors, denoted as C + and C − . Figure 1 illustrates this behavior,
where the green lines represent transient chaotic orbits that eventually escape into either the red or blue fixed-point
attractors. Our goal is to utilize the safety function to prevent trajectories from settling into attractors, ensuring
they remain within the transient chaotic regime.
Regarding the integration of the orbits, we performed numerical simulations of the Lorenz system using a fourthorder Runge–Kutta integrator. Initial conditions for 2000 trajectories were randomly sampled within the range x,
y, z ∈ [−30, 30], with an integration step size of h = 0.001 over a total duration of t = 50 units of time.
To incorporate
√ noise effects, we added a stochastic term χh at each integration step. The noise term was modeled
as χh = η · h · N (0, 1), where η is the noise intensity parameter, h is the integration time step, and N (0, 1)
Fig. 1 Illustration of
transient chaos and the
convergence to fixed-point
attractors in the Lorenz
system for σ = 10.0,
b = 2.67, and r = 20.0.
Panel (a) highlights the
transient chaotic regime
transitioning to the stable
orbit near C − (blue), while
panel (b) shows the
transition to the stable
orbit near C + (red). Green
curves indicate the
transient chaotic
trajectories
123
Eur. Phys. J. Spec. Top.
Fig. (...truncated)