기본 정보
- 저자
- DOI
- 10.1103/q18f-yrm2
- 저널
- Physical review. E
- 발행년도
- 2025
- 발행기관
- American Physical Society
- 피인용수
- 1
- 라이선스
- cc-by
- 논문 유형
- –
- 언어
- –
- 원문 페이지
- https://doi.org/10.1103/q18f-yrm2
- 토픽
- Thermal properties of materials
- OpenAlex ID
- W4411057287
평가 내용
- 관련도
- 사업분야
- 수소연료전지 · (6) PEM(고분자전해질막)
- 부 분야
- –
- R&D 측면
- –
- 확신도
- –
- 근거 용어
- –
- 판단 근거
- 임베딩 유사도 기반 평가로 '수소연료전지 > PEM(고분자전해질막)' 분야에 선정된 논문입니다.
- R&D 활용 포인트
- –
- 평가 입력
- –
초록
We present a method to design driving protocols that achieve fast thermal equilibration of a system of interest using techniques inspired by machine learning training algorithms. For example, consider a Brownian particle manipulated by optical tweezers. The force on the particle can be controlled and adjusted over time, resulting in a driving protocol that transitions the particle from an initial state to a final state. Once the driving protocol has been completed, the system requires additional time to relax to thermal equilibrium. Designing driving protocols that bypass the relaxation period is of interest so that, at the end of the protocol, the system is either in thermal equilibrium or very close to it. Several studies have addressed this problem through reverse engineering methods, which involve prescribing a specific evolution for the probability density function of the system and then deducing the corresponding form of the driving protocol potential. Here we propose a new method that can be applied to more complex systems where reverse engineering is not feasible. We simulate the evolution of a large ensemble of trajectories while tracking the gradients with respect to a parametrization of the driving protocol. The final probability density function is compared to the target equilibrium one. Using machine learning libraries, the gradients are computed via backpropagation and the protocol is iteratively adjusted until the optimal protocol is achieved. We demonstrate the effectiveness of our approach with several examples.
본문 90,817자
본문 펼치기
A machine learning approach to fast thermal equilibration
Diego Rengifo <sup>_∗_</sup>
_Departamento_ _de_ _F´ısica,_ _Universidad_ _de_ _los_ _Andes,_ _Bogot´a,_ _Colombia_ _and_
_Institut_ _f¨ur_ _Physik_ _und_ _Astronomie,_ _Technische_ _Universit¨at_ _Berlin,_ _Hardenbergstraße_ _36,_ _D-10623_ _Berlin,_ _Germany_
Gabriel T´ellez <sup>_†_</sup>
_Departamento_ _de_ _F´ısica,_ _Universidad_ _de_ _los_ _Andes,_ _Bogot´a,_ _Colombia_
We present a method to design driving protocols that achieve fast thermal equilibration of a system
of interest using techniques inspired by machine learning training algorithms. For example, consider
a Brownian particle manipulated by optical tweezers. The force on the particle can be controlled
and adjusted over time, resulting in a driving protocol that transitions the particle from an initial
state to a final state. Once the driving protocol has been completed, the system requires additional
time to relax to thermal equilibrium. Designing driving protocols that bypass the relaxation period
is of interest so that, at the end of the protocol, the system is either in thermal equilibrium or
very close to it. Several studies have addressed this problem through reverse engineering methods,
which involve prescribing a specific evolution for the probability density function of the system and
then deducing the corresponding form of the driving protocol potential. Here, we propose a new
method that can be applied to more complex systems where reverse engineering is not feasible. We
simulate the evolution of a large ensemble of trajectories while tracking the gradients with respect
to a parametrization of the driving protocol. The final probability density function is compared
to the target equilibrium one. Using machine learning libraries, the gradients are computed via
backpropagation and the protocol is iteratively adjusted until the optimal protocol is achieved. We
demonstrate the effectiveness of our approach with several examples.
An important branch of physics and engineering is control theory [1], whose objective is to design protocols to
control the evolution of a given system and drive it to the desired final state. Often, these protocols must also satisfy
certain constraints, such as optimizing energy costs. In recent decades, technology has advanced to the point where
we can manipulate microsized systems [2–4], such as colloidal particles with optical tweezers, micro-oscillators, and
microscopic active matter. Due to their small size, significant thermal fluctuations affect these systems. As a result,
effectively controlling such systems often requires oversight not only of the average state but also of the fluctuations.
This has given rise to a research area where the statistical description of the system (e.g., the density matrix or the
probability density function in phase space) becomes the central object of control.
Under time-dependent control, the probability distributions of these systems evolve according to the Fokker-Planck
equation. Once the control protocol is completed, the system remains out of equilibrium and requires time to relax
to its new equilibrium state. In many cases, rapid control of the system is desirable to bypass the relaxation period.
Such protocols are known as engineered swift equilibration (ESE) [5] when targeting thermal equilibrium, shortcuts
to isothermality [6], or generally as swift state-to-state transformations. For a review, see Ref. [7].
Most methods that achieve this control are based on reverse engineering: one imposes a given evolution for the
system’s probability density function and then deduces the form of the driving protocol potential. This method is
effective for single-particle systems. Theoretically, one can replace the proposed probability density function in the
Fokker-Planck equation to obtain the form for controlling the external potential. However, it is not clear how to
extend this method to many-particle systems. One can use the controlling potential deduced for a single particle as a
starting point for many interacting particles, but this does not guarantee full control of all particles [8]. In this work,
we propose a method for numerically designing control protocols. We perform stochastic numerical simulations of the
system of interest and employ machine learning techniques—in particular, automatic differentiation [9]—to evaluate
how changes in control potential affect the statistical state of the system and drive it to the desired final state. This
method has some similarities to the image generative diffusion models [10, 11] whose objective is to recreate a complex
probability distribution from a simple one (normal distribution), although the exact implementation has some key
differences. Similar techniques have been used to design protocols that optimize the work done on the system [12].
Here, however, we are interested in controlling the final state of the system. A similar goal in the realm of active
matter has been explored in Ref. [13] using evolutionary algorithms, which offer a complementary approach to the
present work.
The remainder of this article is organized as follows. In Sec. I, we explain in detail our numerical technique. Then,
in Sec. II we apply it to the control of a Brownian particle under a variable harmonic potential. This serves as a
_∗_ [d.rengifo@uniandes.edu.co](mailto:d.rengifo@uniandes.edu.co)
_†_ [gtellez@uniandes.edu.co](mailto:gtellez@uniandes.edu.co)
test of our method as its performance can be compared to analytical methods. In Sec. III, we apply our method to
achieve swift state-to-state transformations of a Brownian particle when the control potential is not harmonic, as an
illustration of a situation where analytical methods are more difficult to implement.
I. NUMERICAL DESIGN OF CONTROL PROTOCOLS
To explain our method clearly, we consider a simple system consisting of a Brownian particle with position _X_ that
experiences thermal fluctuations at temperature _T_ and is driven by a controlling force _F_ ( _X, λ_ ( _t_ )), which depends on
the position of the particle and a set of external, time-dependent parameters _λ_ ( _t_ ). The particle is in a viscous fluid
that exerts a drag force, characterized by a friction coefficient _γ_ . We assume that the inertial timescale is much shorter
than both the relaxation time and the duration of the controlling protocol; therefore, we operate in the overdamped
regime. We describe the stochastic dynamics of the particle using a Langevin equation
_<u>dX</u>_
_dt_ <sup>=</sup> <sup>_F_</sup> <sup>(</sup> <sup>_X, λ_</sup> <sup>(</sup> <sup>_t_</sup> <sup>))</sup> <sup>_/γ_</sup> <sup>+</sup>
_√_ 2 _Dξ_ ( _t_ ) _,_ (1)
where _D_ = _kBT/γ_ is the diffusion coefficient, _kB_ denotes the Boltzmann constant, and we model _ξ_ ( _t_ ) as a Gaussian
white noise satisfying _⟨ξ_ ( _t_ ) _⟩_ = 0 and _⟨ξ_ ( _t_ ) _ξ_ ( _t_ <sup>_′_</sup> ) _⟩_ = _δ_ ( _t −_ _t_ <sup>_′_</sup> ). In the rest of this paper, we work with dimensionless
quantities defined as follows. We first identify a time scale _τ_, which can represent the relaxation time of the system
(for a fixed _λ_ ), the duration of the controlling protocol, or <u>the</u> total simulation time. Then, the time is expressed
in dimensionless units as _t_ <sup>ˆ</sup> = _t/τ_, the position as _x_ ˆ = _x/√_
_Dτ_, the gaussian noise as _ξ_ <sup>ˆ</sup> ( _t_ <sup>ˆ</sup> ) = <sup>_√_</sup> _<u>τξ</u>_ ( _t_ ), and the force
in dimensionless units as _t_ <sup>ˆ</sup> = _t/τ_, the position as _x_ ˆ = _x/√_
_Dτ_, the gaussian noise as _ξ_ <sup>ˆ</sup> ( _t_ <sup>ˆ</sup> ) = <sup>_√_</sup> _<u>τξ</u>_ ( _t_ ), and the force
as _F_ <sup>ˆ</sup> = _F_ _√Dτ/_ ( _kBT_ ). The forces derives from a potential energy: _F_ = _−∂xU_ ( _x, λ_ ), and the potential energy is
_√_
_√_
as _F_ <sup>ˆ</sup> = _F_ _√Dτ/_ ( _kBT_ ). The forces derives from a potential energy: _F_ = _−∂xU_ ( _x, λ_ ), and the potential energy is
expressed in dimensionless units as _U_ <sup>ˆ</sup> = _U_ ( _x, λ_ ) _/_ ( _kBT_ ). With these definitions, the Langevin equation reads
_<u>dX</u>_ <sup>ˆ</sup>
_dt_ <sup>ˆ</sup> <sup>=</sup> <sup>_F_</sup> <sup>ˆ( ˆ</sup> <sup>_X,_</sup> <sup>ˆ</sup> <sup>_λ_</sup> <sup>(ˆ</sup> <sup>_t_</sup> <sup>)) +</sup>
_√_ 2 _ξ_ <sup>ˆ</sup> ( _t_ <sup>ˆ</sup> ) _._ (2)
For simplicity, we drop the hat in what follows. An equivalent description of the system is through the Fokker-Planck
equation for the position probability density function _P_ ( _x, t_ ), which reads
_∂tP_ ( _x, t_ ) = _−∂x_ [ _F_ ( _x, λ_ ( _t_ )) _P_ ( _x, t_ )] + _∂x_ <sup>2</sup> <sup>_P_</sup> <sup>(</sup> <sup>_x, t_</sup> <sup>)</sup> <sup>_._</sup> (3)
We now state the problem we want to solve. Assume that the system starts at _t_ = 0 in equilibrium with probability
density _P_ ( _x,_ 0) = _Pi_ <sup>eq(</sup> <sup>_x_</sup> <sup>) =</sup> _Z_ <u>1</u> _i_ <sup>_e−U_</sup> <sup>(</sup> <sup>_x,λi_</sup> <sup>) for an initial control parameter</sup> <sup>_λi_</sup> <sup>.</sup> <sup>Here,</sup> <sup>_Zi_</sup> <sup>=</sup> - _e_ <sup>_−U_</sup> <sup>(</sup> <sup>_x,λi_</sup> <sup>)</sup> _dx_ is the correspond
_i_ <sup>eq(</sup> <sup>_x_</sup> <sup>) =</sup> _Z_ <u>1</u> _i_ <sup>_e−U_</sup> <sup>(</sup> <sup>_x,λi_</sup> <sup>) for an initial control parameter</sup> <sup>_λi_</sup> <sup>.</sup> <sup>Here,</sup> <sup>_Zi_</sup> <sup>=</sup>
density _P_ ( _x,_ 0) = _Pi_ <sup>eq(</sup> <sup>_x_</sup> <sup>) =</sup> _Z_ <u>1</u> _i_ <sup>_e−U_</sup> <sup>(</sup> <sup>_x,λi_</sup> <sup>) for an initial control parameter</sup> <sup>_λi_</sup> <sup>.</sup> <sup>Here,</sup> <sup>_Zi_</sup> <sup>=</sup> - _e_ <sup>_−U_</sup> <sup>(</sup> <sup>_x,λi_</sup> <sup>)</sup> _dx_ is the correspond
ing initial partition function. A control protocol _λ_ ( _t_ ) of duration _tf_ is applied to the system and at _t_ = _tf_ we wish
the system to be in a new thermal equilibrium state corresponding to a final value _λf_ of the controlling parameters:
_Pf_ <sup>eq(</sup> <sup>_x_</sup> <sup>) =</sup> _Z_ <u>1</u> _f_ <sup>_e−U_</sup> <sup>(</sup> <sup>_x,λf_</sup> <sup>)</sup> <sup>with</sup> <sup>_Zf_</sup> <sup>=</sup> - _e_ <sup>_−U_</sup> <sup>(</sup> <sup>_x,λf_</sup> <sup>)</sup> _dx_ . For an arbitrary control protocol _λ_ ( _t_ ), even when we set _λ_ (0 <sup>_−_</sup> ) = _λi_
_f_ <sup>eq(</sup> <sup>_x_</sup> <sup>) =</sup> _Z_ <u>1</u> _f_ <sup>_e−U_</sup> <sup>(</sup> <sup>_x,λf_</sup> <sup>)</sup> <sup>with</sup> <sup>_Zf_</sup> <sup>=</sup>
_Pf_ <sup>eq(</sup> <sup>_x_</sup> <sup>) =</sup> _Z_ <u>1</u> _f_ <sup>_e−U_</sup> <sup>(</sup> <sup>_x,λf_</sup> <sup>)</sup> <sup>with</sup> <sup>_Zf_</sup> <sup>=</sup> - _e_ <sup>_−U_</sup> <sup>(</sup> <sup>_x,λf_</sup> <sup>)</sup> _dx_ . For an arbitrary control protocol _λ_ ( _t_ ), even when we set _λ_ (0 <sup>_−_</sup> ) = _λi_
and _λ_ ( _t_ <sup>+</sup> _f_ <sup>)</sup> <sup>=</sup> <sup>_λf_</sup> <sup>,</sup> <sup>the</sup> <sup>system</sup> <sup>lags</sup> <sup>behind</sup> <sup>the</sup> <sup>instantaneous</sup> <sup>Boltzmann</sup> <sup>distribution</sup> <sup>_∝_</sup> <sup>_e−U_</sup> <sup>(</sup> <sup>_x,λ_</sup> <sup>(</sup> <sup>_t_</sup> <sup>)).</sup> <sup>Consequently,</sup> <sup>at</sup>
and _λ_ ( _t_ <sup>+</sup> _f_ <sup>)</sup> <sup>=</sup> <sup>_λf_</sup> <sup>,</sup> <sup>the</sup> <sup>system</sup> <sup>lags</sup> <sup>behind</sup> <sup>the</sup> <sup>instantaneous</sup> <sup>Boltzmann</sup> <sup>distribution</sup> <sup>_∝_</sup> <sup>_e−U_</sup> <sup>(</sup> <sup>_x,λ_</sup> <sup>(</sup> <sup>_t_</sup> <sup>)).</sup> <sup>Consequently,</sup> <sup>at</sup>
_t_ = _tf_, the system is not in thermal equilibrium and requires additional time to relax to the new equilibrium state.
Our goal is to design the protocol _λ_ ( _t_ ) so that _P_ ( _x, tf_ ) approximates the desired equilibrium _Pf_ <sup>eq(</sup> <sup>_x_</sup> <sup>)</sup> <sup>=</sup> _Z_ <u>1</u> _f_ <sup>_e−U_</sup> <sup>(</sup> <sup>_x,λf_</sup> <sup>)</sup>
as closely as possible. We base our method on numerical simulations of the system and on systematic adjustments to
the control protocol.
_f_ <sup>eq(</sup> <sup>_x_</sup> <sup>)</sup> <sup>=</sup> _Z_ <u>1</u> _f_ <sup>_e−U_</sup> <sup>(</sup> <sup>_x,λf_</sup> <sup>)</sup>
A. Numerical training algorithm
To achieve this, we begin with an arbitrary protocol _λ_ ( _t_ ). For example, we choose a linear interpolation between
_λ_ equation, _i_ and _λf_ Eq., possibly(2), onaddinga graphicssomeprocessingrandom values.unit (GPU)We performusing the _Ns_ initial _∼_ 100 000protocolparallel _λ_ ( _t_ ).simulationsThese simulationsof the Langevinproduce
a large ensemble of trajectories _{xn_ ( _t_ ) _}n∈{_ 1 _,...,Ns}_ from which we compute the final probability density function
_P_ ( _x, tf_ ). We then compare the calculated _P_ ( _x, tf_ ) with the desired equilibrium distribution _Pf_ <sup>eq(</sup> <sup>_x_</sup> <sup>).</sup> <sup>Initially,</sup> <sup>these</sup>
_P_ ( _x, tf_ ). We then compare the calculated _P_ ( _x, tf_ ) with the desired equilibrium distribution _Pf_ <sup>eq(</sup> <sup>_x_</sup> <sup>).</sup> <sup>Initially,</sup> <sup>these</sup>
two distributions differ significantly. We quantify the difference between _P_ ( _x, tf_ ) and _Pf_ <sup>eq(</sup> <sup>_x_</sup> <sup>)</sup> <sup>using</sup> <sup>a</sup> <sup>_loss_</sup> <sup>function,</sup>
two distributions differ significantly. We quantify the difference between _P_ ( _x, tf_ ) and _Pf_ <sup>eq(</sup> <sup>_x_</sup> <sup>)</sup> <sup>using</sup> <sup>a</sup> <sup>_loss_</sup> <sup>function,</sup>
which we will define later on. Thus, we will need adjust the protocol _λ_ ( _t_ ) to minimize the loss function. However,
it will be very inefficient to blindly do arbitrary changes to _λ_ ( _t_ ) and rerun the simulations to find how the final
distribution has changed. To do this effectively, we will use techniques from machine learning, in particular automatic
differentiation [9], which allows us to know in advance in which directions the changes on the protocol will make
smaller the loss function between the final distribution and the desired one.
Although automatic differentiation is a well-known technique in the realm of machine learning, we briefly review its
key concepts to ensure completeness and clarify the technical challenges we overcame. In a single pass of the system
simulation, the final probability density function _P_ ( _x, tf_ ) and the loss function result from numerous elementary
operations, such as sums and multiplications, performed throughout. Although we cannot analytically compute
_P_ ( _x, tf_ ), the loss function, or its gradient with respect to _λ_, we know the partial derivatives of each elementary
operation with respect to its inputs. Throughout the simulation, these operations form a computational tree. We
store the partial derivatives of each elementary operation along with each intermediate result. Then, the computational
tree is traced backward and the chain rule is applied to compute the gradient of the loss function with respect to the
control protocol _λ_ . This technique is known as backpropagation in automatic differentiation.
For example, a single step of the resolution of the Langevin equation, using the Euler-Maruyama method, in the
Itˆo discretization, can be written as
_dt_ (4)
_x_ 1 = _x_ 0 _−_ _k_ 0 _x_ 0 _dt_ + _ζ_ 0
_√_
for a force _F_ = _−k_ 0 _x_ and where _ζ_ 0 _∼N_ (0 _,_
time _dt_ . Figure 1 shows the computational
_√_
for a force _F_ = _−k_ 0 _x_ and where _ζ_ 0 _∼N_ (0 _,_ 2). The particle moves from an initial position _x_ 0 to a position _x_ 1 in a
time _dt_ . Figure 1 shows the computational tree for this operation. From the initial set of parameters ( _x_ 0, _k_ 0, etc.),
the values are calculated forward, and the gradients are calculated backward. Suppose that the stiffness _k_ 0 is one
of the adjustable parameters. In Fig. 1, we choose _k_ 0 = 1, _x_ 0 = 2 and _dt_ = 0 _._ 001 as inputs. Multiplications, sums
and square root operations are performed as shown in the computational graph to obtain the value of the output
_x_ 1 = 1 _._ 982. To compute the gradient of the output of Eq. (4), _x_ 1, with respect to _k_ 0, <sup>_<u>∂x</u>_</sup> _∂k_ 0 <sup><u>1</u></sup> <sup>,</sup> <sup>we</sup> <sup>analyze</sup> <sup>how</sup> <sup>changes</sup> <sup>in</sup>
_x_ 1 = 1 _._ 982. To compute the gradient of the output of Eq. (4), _x_ 1, with respect to _k_ 0, <sup>_<u>∂x</u>_</sup> _∂k_ 0 <sup><u>1</u></sup> <sup>,</sup> <sup>we</sup> <sup>analyze</sup> <sup>how</sup> <sup>changes</sup> <sup>in</sup>
_k_ 0 propagate through the computational tree in the backward direction. We start in the last box of the computational
tree in Fig. 1 where the value of _x_ 1 is reported and the gradient _∂x_ 1 _/∂x_ 1 = 1 is stored. The previous operation is a
respectsum. Theto partial _−k_ 0 _x_ 0 _dt_ derivati + _ζ_ 0 _√_ <u>ve</u> _dt_ ofis the1 asoutputshown ofinthethesumprecedingwith respectbox. to each of its inputs is 1, so the gradient of _x_ 1 with
_√_
respect to _−k_ 0 _x_ 0 _dt_ + _ζ_ 0 _dt_ is 1 as shown in the preceding box.
Continuing the backward pass, we encounter another sum, again with a gradient of 1. We arrive at a multiplication
between _dt_ and _−k_ 0 _x_ 0. The partial derivative of the result of this multiplication with respect to _−k_ 0 _x_ 0 is simply
_dt_, the other factor in the multiplication. In this example, we choose _dt_ = 0 _._ 001, therefore the gradient of _x_ 1 with
respect to _−k_ 0 _x_ 0 is now 0 _._ 001 as shown in the box labeled _−k_ 0 _x_ 0. Continuing backwards, we reach a multiplication
between _−k_ 0 by _x_ 0. The partial derivative _−k_ 0 _x_ 0 with respect to _−k_ 0 is _x_ 0 = 2. Applying the chain rule, we
multiply this partial derivative, 2, with the accumulated gradient, 0 _._ 001, to obtain the gradient of _x_ 1 with respect to
_−k_ 0: 2 _×_ 0 _._ 001 = 0 _._ 002. The last operation is a multiplication of _−_ 1 by _k_ 0, which finally gives the desired gradient
_∂x_ 1 _/∂k_ 0 = _−_ 0 _._ 002. The backpropagation process efficiently tracks these contributions by multiplying local derivatives
along the computational path, demonstrating how automatic differentiation captures the sensitivity of _x_ 1 to small
changes in _k_ 0. This method is significantly more efficient than naive finite differences, which require recomputing _x_ 1
for each perturbation of _k_ 0.
In this previous example, _k_ 0 appears only in one branch of the computational tree which simplifies the analysis
of the backward propagation of the gradient. When a parameter appears on more branches, one needs to add each
gradient contribution when they merge. For example, in the _x_ 0 box, we obtain _∂x_ 1 _/∂x_ 0 = 0 _._ 999 by adding the
gradient contributions from two branches: 1 and _−_ 0 _._ 001.
For a review of automatic differentiation, see Ref. [9]; an excellent tutorial appears in [14]. In practice, we did
not implement automatic differentiation ourselves; instead, we used an existing machine learning library optimized
for parallel GPU computing. We used `pytorch` [15], however our algorithm could also be easily ported to other
frameworks such as `tensorflow` [16] or `jax` [17].
In this previous example, _k_ 0 appears only in one branch of the computational tree which simplifies the analysis
of the backward propagation of the gradient. When a parameter appears on more branches, one needs to add each
gradient contribution when they merge. For example, in the _x_ 0 box, we obtain _∂x_ 1 _/∂x_ 0 = 0 _._ 999 by adding the
gradient contributions from two branches: 1 and _−_ 0 _._ 001.
After making the necessary changes in the control protocol _λ_ ( _t_ ) in the direction provided by the gradients (gradient
descent method), the algorithm starts over to perform a new set of simulations, evaluates again the loss function,
and adjusts the protocol until the loss function converges to the smallest possible value. Each pass of simulations,
computing the gradients and adjusting the protocol is called an epoch following the machine learning terminology.
This algorithm is very similar to the one on which neural network training is based; therefore, the use of a dedicated
library such as `pytorch` is very convenient. In a sense, it is a particular form of a neural network composed of
_NT_ = _tf_ _/dt_ layers, each of which performs a single step in the simulation:
2 _dW_ ( _t_ ) (5)
_x_ ( _t_ + _dt_ ) = _x_ ( _t_ ) + _F_ ( _x_ ( _t_ ) _, λ_ ( _t_ )) _dt_ +
_√_
with _W_ ( _t_ ) a Wiener process. The network parameters are encoded in _λ_ ( _t_ ). This neural network takes as input
the initial samples _{xn_ (0) _}n∈{_ 1 _,...,Ns}_ sampled from a Boltzmann distribution _e_ <sup>_−U_</sup> <sup>(</sup> <sup>_x,λi_</sup> <sup>)</sup> _/Zi_ . In parallel, each sample
goes through the layers performing the calculations given by Eq. (5) to obtain after _NT_ layers the final samples
_{xn_ ( _tf_ ) _}n∈{_ 1 _,...,Ns}_ . Note that, at this stage, each sample is independent of the rest. Then a final layer takes all the
samples and combines them to compute the loss function _L_ (see Sec. I B for details). The gradients _∂λ_ ( _t_ ) _L_ of the loss
_~~<u>√</u>~~_
_<u>k</u>_ <u>0</u>
<u>1.000</u>
grad -0.002
<u>-1</u>
grad 0.000
_<u>x</u>_ <u>0</u>
<u>2.000</u>
grad 0.999
_<u>−k</u>_ <u>0</u>
<u>-1.000</u>
grad 0.002
_<u>dt</u>_
<u>0.001</u>
grad -9.906
_<u>−k</u>_ <u>0</u> _<u>x</u>_ <u>0</u>
- <u>-2.000</u>
grad 0.001
_<u>−k</u>_ <u>0</u> _<u>x</u>_ <u>0</u> _<u>dt</u>_
- <u>-0.002</u>
grad 1.000
_~~<u>√</u>~~_
+
+
_<u>−k</u>_ <u>0</u> _<u>x</u>_ <u>0</u> _<u>dt</u>_ <u>+</u> _<u>ζ</u>_ <u>0</u>
<u>0</u> _<u>x</u>_ <u>0</u> _<u>dt</u>_ <u>+</u> _<u>ζ</u>_ <u>0</u> _<u>dt</u>_
<u>-0.018</u>
grad 1.000
_<u>x</u>_ <u>1</u>
<u>1.982</u>
grad 1.000
_√_
_~~<u>√</u>~~_ _<u>dt</u>_
<u>0.032</u>
grad -0.500
_<u>ζ</u>_ <u>0</u>
<u>-0.500</u>
grad 0.032
_<u>ζ</u>_ <u>0</u>
_<u>ζ</u>_ <u>0</u> _<u>dt</u>_
<u>-0.016</u>
grad 1.000
FIG. 1: Computational graph for a single step of the Langevin equation, Eq. (4), and its corresponding gradients. In
this example, we used numerical <u>values</u> _x_ 0 = 2, _k_ 0 = 1, _dt_ = 0 _._ 001, and _ζ_ 0 = _−_ 0 _._ 5 (a particular realization drawn
from a normal distribution _N_ (0 _,_ _√_ 2)). The graph is composed of boxes (rectangles) and operations (ellipses). Each
_√_
from a normal distribution _N_ (0 _,_ 2)). The graph is composed of boxes (rectangles) and operations (ellipses). Each
box has three subdivisions indicating the variable, its value, and the gradient of _x_ 1 with respect to the variable in
the actual box, respectively.
function with respect to the parameters _λ_ ( _t_ ) are computed using backpropagation, and the parameters are updated
accordingly:
_λ_ ( _t_ ) _←_ _λ_ ( _t_ ) _−_ _η∂λ_ ( _t_ ) _L,_ (6)
where _η_ is the learning rate. The precise meaning of _∂λ_ ( _t_ ) _L_ and Eq. (6) depends on the way the protocol is
parametrized, see Sec. I C for details. This process is repeated until the loss function converges to a minimum.
B. Choice of the loss function
Let us now discuss in more detail some important technical aspects of the algorithm, starting with the choice of
the loss function. A first natural choice would be to use the Kullback-Leibler divergence
_<u>P</u>_ <u>(</u> _<u>x, tf</u>_ <u>)</u>
_Pf_ <sup><u>eq(</u></sup> <sup>_x_</sup> <sup>)</sup>
_D_ ( _P_ ( _x, tf_ ) _||Pf_ <sup>eq) =</sup>
_P_ ( _x, tf_ ) ln
_dx._ (7)
This will require computing _P_ ( _x, tf_ ) from the set of samples _{x_ ( _tf_ ) _}_ obtained from the simulation at the final time
_tf_ . Numerically, this could be done by building a histogram. Unfortunately, creating histograms requires selecting
bin sizes, a step that is not differentiable and lacks support for automatic differentiation. For example, in `pytorch`,
the `torch.histogram` function does not have a backward method implemented to compute the gradients. Therefore,
a different choice of loss function is needed.
For the case where the force exerted on the particle derives from a harmonic potential (Sec. II), one can show that if
the initial probability distribution is Gaussian, it will remain Gaussian at all times. In this case a simple loss function
can be chosen by comparing the average value of the position
�2
_,_ (8)
_L_ mean =
_f_
_⟨x_ ( _tf_ ) _⟩−⟨x⟩_ <sup>eq</sup>
and/or its variance
_−_
�∆ _x_ <sup>2�eq</sup>
_f_
�∆ _x_ <sup>2�eq</sup>
_f_
�2
_._ (9)
_L_ var =
��∆ _x_ ( _tf_ ) <sup>2�</sup>
Here, the average
_⟨x_ ( _tf_ ) _⟩_ =
_xP_ ( _x, tf_ ) _dx_ (10)
_≃_ _N_ <sup><u>1</u></sup> _s_
_Ns_
- _xn_ ( _tf_ ) (11)
_n_ =1
is computed from the set of samples of the simulation, and the equilibrium one
_⟨x⟩f_ <sup>eq</sup> <sup>=</sup>
_xPf_ <sup>eq(</sup> <sup>_x_</sup> <sup>)</sup> <sup>_dx_</sup> (12)
is known directly from the analytic expression of _Pf_ <sup>eq</sup>
is known directly from the analytic expression of _Pf_ <sup>eq(</sup> <sup>_x_</sup> <sup>).</sup> <sup>For</sup> <sup>the</sup> <sup>variance,</sup> <sup>we</sup> <sup>have</sup> <sup>defined</sup> <sup>∆</sup> <sup>_x_</sup> <sup>(</sup> <sup>_tf_</sup> <sup>) =</sup> <sup>_x_</sup> <sup>(</sup> <sup>_tf_</sup> <sup>)</sup> <sup>_−⟨x_</sup> <sup>(</sup> <sup>_tf_</sup> <sup>)</sup> <sup>_⟩_</sup>
and ∆ _x_ = _x −⟨x⟩f_ <sup>eq.</sup> <sup>These</sup> <sup>loss</sup> <sup>functions</sup> <sup>defined</sup> <sup>in</sup> <sup>Eqs.</sup> <sup>(8)</sup> <sup>and</sup> <sup>(9)</sup> <sup>are</sup> <sup>differentiable</sup> <sup>and</sup> <sup>can</sup> <sup>be</sup> <sup>used</sup> <sup>to</sup> <sup>adjust</sup> <sup>the</sup>
control protocol.
and ∆ _x_ = _x −⟨x⟩f_ <sup>eq.</sup> <sup>These</sup> <sup>loss</sup> <sup>functions</sup> <sup>defined</sup> <sup>in</sup> <sup>Eqs.</sup> <sup>(8)</sup> <sup>and</sup> <sup>(9)</sup> <sup>are</sup> <sup>differentiable</sup> <sup>and</sup> <sup>can</sup> <sup>be</sup> <sup>used</sup> <sup>to</sup> <sup>adjust</sup> <sup>the</sup>
control protocol.
However, beyond the harmonic case, it is not enough to verify that the final average and variance converge to the
expected values. One could compare higher order cumulants, or better yet, compare the characteristic functions of
the final distribution
(13)
_P_ ˜( _k, tf_ ) =
- _e_ <sup>_ikx_</sup> <sup>(</sup> <sup>_tf_</sup> <sup>)�</sup>
with the expected one
_P_ ˜ _f_ <sup>eq(</sup> <sup>_k_</sup> <sup>) =</sup>
_Pf_ <sup>eq(</sup> <sup>_x_</sup> <sup>)</sup> <sup>_eikxdx._</sup> (14)
Contrary to the non-differentiable computation of _P_ ( _x, tf_ ) by building a histogram, the computation of the characteristic function is a differentiable operation from the samples _{xn_ ( _tf_ ) _}n∈{_ 1 _,...,Ns}_ as it involves computing the
exponential function and summing over
_P_ ˜( _k, tf_ ) _≃_ _N_ <sup><u>1</u></sup> _s_
_P_ ˜( _k, tf_ ) _≃_ _N_ <sup><u>1</u></sup>
_Ns_
_n_ =1
_e_ <sup>_ikxn_</sup> <sup>(</sup> <sup>_tf_</sup> <sup>)</sup> _._ (15)
For this more general case, the loss function is
_L_ char =
2
���� _P_ ˜( _k, tf_ ) _−_ _P_ ˜ _f_ eq <sup>(</sup> <sup>_k_</sup> <sup>)</sup> ��� _dk._ (16)
Numerically, this is approximated by choosing an appropriate range of values for _k_ and replacing the integral by a
sum over those values of _k_ .
C. Parametrization of the protocol
The control protocol _λ_ ( _t_ ) can be parametrized in many ways. For example, _λ_ ( _t_ ) can be a piecewise linear function,
a polynomial, a rational function, etc. The choice of the parametrization will depend on the specific problem at hand.
For example, if the control protocol is expected to be smooth, a polynomial or a rational function parametrization
could be a good choice. In our examples, we explore a few possibilities: a piecewise linear parameterization, a
polynomial parametrization, and a neural network to approximate _λ_ ( _t_ ).
The piecewise linear parametrization is the most intuitive one. The duration of the protocol [0 _, tf_ ] is divided into
_Np_ time intervals of equal duration: 0 = _t_ 0 _<_ _t_ 1 _<_ _. . ._ _<_ _tNp_ = _tf_, with _tj_ = _j_ ∆ _t_ where ∆ _t_ = _tf_ _/Np_ . The value
of _λ_ ( _tj_ ) = _λj_ at the beginning of each interval is a parameter of the protocol. Between times _tj_ and _tj_ +1, _λ_ ( _t_ ) is a
linear interpolation between _λj_ and _λj_ +1. The total number of parameters is _Np_ . The protocol is then defined by
the set of parameters _{λ_ 1 _, . . ., λNp}_ that are the variables to be adjusted to minimize the loss function. After each
simulation, the gradients of the loss function _L_ with respect to the parameters _λj_ are calculated and the new values
of Inthea parameterspolynomial areparametrization,updated accordingly _λ_ ( _t_ ) is atopolynomial _λj_ _←_ _λj_ _−_ function _η∂λj_ _L_ whereof time: _η_ is the learning rate.
_λ_ ( _t_ ) =
_P_
_n_ =0
_ant_ <sup>_n_</sup> _._ (17)
The coefficients _an_ are the variables that the algorithm will optimize. After each simulation, these are updated using
gradientFinally,descent:based on _an_ the _←_ _a_ universal _n −_ _η∂anL_ approximation. theorem [18], we also explored a neural network parametrization of
_λ_ ( _t_ ). We selected a feedforward neural network architecture, which can be implemented using `PyTorch` . The input
layer consists of a single neuron representing time, _t_ . This neuron processes _t_ through an activation function and
passes the result to the next layer, which contains _n_ neurons. Each neuron in this layer applies an activation function
to the input it receives and forwards the output to subsequent layers. This process continues until the final layer
whose output is of dimension one determining the output of the model _λ_ ( _t_ ). An example of this neural network
parametrization of the protocol is shown in subsection II B 1.
D. Relation with previous works
In recent years, there has been a growing interest in applying machine learning techniques in statistical physics,
from the control and design of self-assembling materials [19, 20], train feedback protocols (Maxwell demons) to
extract work and absorb entropy [21], do memory erasure [22, 23], and to optimize the control of non-equilibrium
systems [12, 13, 24]. This interplay has been fruitful both ways, as concepts from statistical physics have open the
way for new techniques in machine learning, for example in diffusion generative models [10, 11, 25, 26] or training
neural networks using Monte Carlo methods [27].
Our method is inspired by previous work [12] on optimal control of non-equilibrium systems. In that work, stochastic
simulations of a system of interest are performed in a differentiable way to compute the gradients of a loss function
with respect to the control protocol. The loss function used in Ref. [12] was the entropy production or the work done
on the system. Our goal here is different; the loss function we use is to minimize the difference between the final
probability density function of the system and the desired equilibrium distribution. Our algorithm implementation is
independent from [12] using `pytorch` instead of `jax` .
The optimal control of stochastic systems and driving them from an initial state to a target final state can also be
solved by deterministic optimal transport techniques as shown in Ref. [28], where the stochastic thermodynamics optimization of heat or work problem is mapped into a Burgers equation. Then standard optimal transport techniques [29]
can be used to find optimal control protocols [30–32]. Our present work is an alternative to those methods.
In the realm of machine learning, there has been recent interest in neural ordinary differential equations [33], where
the dynamics _{x_ ( _t_ ) _}_ of a system is given by an ordinary differential equation
_<u>dx</u>_
_dt_ <sup>=</sup> <sup>_f_</sup> <sup>(</sup> <sup>_x_</sup> <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>_, t, λ_</sup> <sup>)</sup> <sup>_,_</sup> (18)
and _f_ is described by a neural network, with parameters _λ_ that are to be optimized such that the system is in a
desired final state _x_ ( _tf_ ). In Ref. [33], a method was devised to compute the gradients of the loss function without
backpropagating through all the intermediate _NT_ steps. The method is known as the adjoint sensitivity method [34]
and is quite memory efficient of _O_ (1) instead of _O_ ( _NT_ ) for the backpropagation method. Unfortunately, it is not
clear how to apply this method to stochastic differential equations such as the one we are solving. However, a promising proposal to extend the adjoint sensitivity method to deal with gradient computations for stochastic differential
equations in a memory efficient manner of order _O_ (1) was proposed in Ref. [35], at the expense of a longer time
computation _O_ ( _NT_ log _NT_ ). However, we did not need to implement this method, as the backpropagation method
through all intermediate computations was enough for our purposes. Since our objective is to find a control protocol
to achieve fast thermalization in a short time duration, the number of steps _NT_ is not very large, and the memory
bottleneck was not reached in our simulations.
II. BROWNIAN PARTICLE UNDER HARMONIC POTENTIALS
In this section, we examine an overdamped Brownian particle subject to a harmonic potential, the general expression
for which is
_U_ ( _x, λ_ ( _t_ )) = 2 <sup><u>1</u></sup> <sup>_k_</sup> <sup>(</sup> <sup>_t_</sup> <sup>)(</sup> <sup>_x −_</sup> <sup>_c_</sup> <sup>(</sup> <sup>_t_</sup> <sup>))2</sup> <sup>_._</sup> (19)
The external control parameter _λ_ ( _t_ ) can represent here either the potential center _c_ ( _t_ ) or the stiffness _k_ ( _t_ ), or both.
The core concept of optimal control involves determining a form of _λ_ that allows the system to optimize or reduce a
specific desired property. In the following, the focus is on control protocols that speed up the equilibration time or
optimize the work performed on the particle, or aim at both goals simultaneously.
A. Changing the stiffness of the harmonic potential
First, we analyze a system with a fixed center, _c_ ( _t_ ) = 0, and a time-dependent stiffness, _k_ ( _t_ ), subject to the boundary
conditions _k_ (0 <sup>_−_</sup> ) = _ki_ and _k_ ( _t_ <sup>+</sup> _f_ <sup>) =</sup> <sup>_kf_</sup> <sup>.</sup> <sup>We</sup> <sup>express</sup> <sup>the</sup> <sup>system</sup> <sup>in</sup> <sup>dimensionless</sup> <sup>units</sup> <sup>based</sup> <sup>on</sup> <sup>the</sup> <sup>natural</sup> <sup>relaxation</sup>
time _τ_ = _γ/kf_, which depends on the final stiffness _kf_, as outlined in Sec. I. This is the relaxation time if an abrupt
quench, where the potential transforms instantaneously from the initial to the final potential is performed. We seek
a control protocol that satisfies the boundary conditions while ensuring that _tf_ _< τ_ .
Researchers have proposed several analytical protocols to accelerate thermal equilibration in this system [5, 7, 36].
These protocols provide a theoretical framework for optimizing control strategies that reduce relaxation times beyond
what passive equilibration allows. Thus, replicating these well-known results provides a valuable starting point to
validate our approach before applying it to more complex problems.
_1._ _One_ _parameter_ _protocol:_ _the_ _two-step_ _protocol_
The simplest and most intuitive protocol is likely the two-step protocol (TSP) [36], where the stiffness changes
abruptly from _ki_ to some value _km_ at _t_ = 0 and then from _km_ to _kf_ at _t_ = _tf_ . The value of _km_ is increased sufficiently
to ensure that the particle relaxes faster to the new equilibrium state at _tf_ .
Using the Fokker-Planck equation (3) with the potential Eq. (19), one can obtain the evolution equation for all
cumulants _χm_ of the probability density function of the position. From there, one can show that if the system starts
with an initial probability density function that is Gaussian and the driving protocol is harmonic, all cumulants except
the second one (the variance) will be null at all times. This means that the probability density function will remain
Gaussian at all times, with a time-dependent variance _χ_ 2( _t_ ) satisfying
_<u>dχ</u>_ <u>2(</u> _<u>t</u>_ <u>)</u>
+ 2 _k_ ( _t_ ) _χ_ 2( _t_ ) = 2 _._ (20)
_dt_
To achieve thermalization, the variance at the final time _tf_ must be _χ_ 2( _tf_ ) = 1 _/kf_ so that _P_ ( _x, tf_ ) = _Pf_ <sup>eq</sup>
_e_ <sup>_−kf x_</sup> <sup>2</sup> <sup>_/_</sup> <sup>2</sup> _/_
_f_ <sup>eq(</sup> <sup>_x_</sup> <sup>)</sup> <sup>=</sup>
_e_ <sup>_−kf x_</sup> <sup>2</sup> <sup>_/_</sup> <sup>2</sup> _/_ �2 _π/kf_ . Since the stiffness is constant in the time interval (0 _, tf_ ), _x_ ( _t_ ) is an Ornstein-Uhlenbeck process
whose probability density function _P_ ( _x, t_ ) is a Gaussian with zero mean and variance
_−_ _k_ <sup><u>1</u></sup> _m_
_χ_ 2( _t_ ) = <sup><u>1</u></sup>
_km_
_e_ <sup>_−_</sup> <sup>2</sup> <sup>_kmt_</sup> _._ (21)
+
- <u>1</u>
_ki_
Using _χ_ 2( _tf_ ) = 1 _/kf_, we obtain the following transcendental equation for _km_ (for details see Ref. [36])
_−_ _k_ <sup><u>1</u></sup> _m_
<u>1</u>
_kf_
= <sup><u>1</u></sup>
_km_
_e_ <sup>_−_</sup> <sup>2</sup> <sup>_kmtf_</sup> _._ (22)
+
- <u>1</u>
_ki_
This analytic solution of the problem can be used as a test of our numerical training algorithm. We use a parametrization of _κ_ ( _t_ ) with a constant value _km_ between (0 _, tf_ ) and discontinuous at _t_ = 0 and _t_ = _tf_ . This protocol has only
one adjustable parameter which is _km_ . The loss function can be either the variance loss function, Eq. (9), or the
characteristic function loss function, Eq. (16).
For numerical calculations, we used the values _ki_ = 0 _._ 05 and _kf_ = 1 _._ 0, for which the relaxation time _τ_ = 1 _/kf_ = 1 _._ 0.
We aim to achieve equilibration at time _tf_ = 0 _._ 1, an order of magnitude faster than the natural relaxation. We trained
this one-parameter model during 30 epochs with a learning rate of _η_ = 100 _._ 0. This large value (compared to the
traditional values used in machine learning of order 10 <sup>_−_</sup> <sup>2</sup> ) is understood because there is only one parameter to adjust.
For training, we used the characteristic function loss function in Eq. (16). In Fig. 2, we show the training results for
the stiffness as a function of time after some epochs. This plot also includes the probability density function (PDF)
of the position, at the initial time, the target PDF, and the position histogram after simulating the system with
the protocol given by the respective epoch. During the first 10 epochs, the system lags behind the final equilibrium
distribution at _tf_ . But after epoch 10, the adjustment made to _km_ drives the system faster and closer to the expected
final equilibrium distribution. By epoch 30, the final probability density is indistinguishable from the expected one,
where the loss function was of order 10 <sup>_−_</sup> <sup>5</sup> . The value obtained from _km_ with this training was _km_ = 15 _._ 27, while the
theoretical value from Eq. (22) is _km_ = 15 _._ 30. This corresponds to a precision of 0 _._ 20% relative to the expected value.
15
7
0
0 _._ 4
0 _._ 2
~~<mark>0</mark>~~ _<mark>.</mark>_ <mark>0</mark>
epoch 0
0 0.05 _tf_
_t_
initial
target
simulation
_−_ 5 0 5
_x_
epoch 10
0 0.05 _tf_
_t_
_−_ 5 0 5
_x_
epoch 15
0 0.05 _tf_
_t_
_−_ 5 0 5
_x_
epoch 30
0 0.05 _tf_
_t_
_−_ 5 0 5
_x_
FIG. 2: Training progress over 30 epochs for the two-step protocol applied to the stiffness parameter, utilizing the
loss function defined in Eq. (16) and a learning rate of _η_ = 100. The initial (dashed) and target (solid) probability
distributions are displayed, alongside a histogram generated from the model trained up to the specified epoch. The
system parameters are set to _ki_ = 0 _._ 05, _kf_ = 1 _._ 0 and _tf_ = 0 _._ 1.
_2._ _Linear_ _interpolation_ _protocols_
We now consider a more general case where the protocol _k_ ( _t_ ) is not constant in the interval (0 _, tf_ ) and is continuous
at the boundary. In this case, we can parameterize _k_ using piecewise linear parameterization with _Np_ = 10 parameters.
It is important to recall that the time interval [0 _, tf_ ] is divided into _Np_ subintervals and the adjustable parameters
are the values of _k_ ( _tj_ ) at the beginning of each subinterval as explained in Sect. I C. For the training process, we
took the initial and final stiffness to be _ki_ = 0 _._ 5 and _kf_ = 1, respectively. These values lead to a relaxation time
_τ_ = 1 and we set the duration of the protocol to be _tf_ = 1 _/_ 30. Figure 3 shows results for two trained protocols
and the TSP for reference. The protocol represented by the red curve was obtained through optimization with the
characteristic function loss Eq. (16), during 60 epochs. Notice that this protocol has a very fast variation at the
initial _ti_ = 0 and final times _tf_, and does not change much during the rest of the time interval. It quite resembles
the corresponding two-step protocol shown in green. There are an infinite number of solutions to the thermalization
problem; nevertheless, this shows that in the training algorithm the two-step protocol plays an important role as it
exhibits a strong and stable attraction for the algorithm.
In a practical implementation of the protocol, it might not be desirable to have very large variations in the stiffness
in a short time or discontinuities in it. To achieve a smoother protocol, we controlled the variations of _k_ ( _t_ ) between
successive time intervals by adding to the loss function a term penalizing strong variations:
_L_ grad _k_ =
_Np−_ 1
_j_ =0
(23)
( _k_ ( _tj_ +1) _−_ _k_ ( _tj_ )) <sup>2</sup> _._
Then, as a loss function, we can adopt the combination _L_ = (1 _−_ _α_ ) _L_ char + _αL_ grad _k_, where _α_ is a mixture parameter
which we initially fixed at _α_ = 10 <sup>_−_</sup> <sup>4</sup> for 60 epochs, then turned it off at _α_ = 0 for another 60 epochs of training. This
procedure results in much smoother stiffness as shown in blue in Fig. 3. Introducing restrictions or desirable properties
into the loss function is a crucial tool, as it enables the customization of control protocols to exhibit convenient and
tailored properties.
It can be observed that all three protocols in Fig. 3 require a large increase in the mean value of _k_ ( _t_ ) to shorten the
effective relaxation time of the protocol. This is a common feature of all protocols that has been analyzed in Ref. [36].
The average value of _k_ ( _t_ ) during the duration of the protocol is of the order 21 _tf_ <sup>ln</sup> <sup>_<u>k</u>_</sup> _k_ <sup>_<u>f</u>_</sup> _i_ <sup>for</sup> <sup>_tf_</sup> <sup>_≪_</sup> <sup>1.</sup>
15
10
5
0
variations control
no variations control
TSP protocol
0 0.016 _tf_
_t_
FIG. 3: Stiffness as a function of time designed to accelerate equilibration. The red curve represents a 10-parameter
protocol trained using the characteristic function loss, Eq. (16). The blue curve also corresponds to a 10-parameter
protocol but includes an additional penalty term in the loss function to suppress large variations in stiffness, as
given in Eq. (33). For reference, the green curve depicts the corresponding two-step protocol. The initial and final
stiffness values are set to _ki_ = 0 _._ 5 and _kf_ = 1, respectively, with a protocol duration of _tf_ = 1 _/_ 30.
_3._ _Polynomial_ _parametrization_
The piecewise linear parametrization model might initially seem restrictive due to its reliance on linear interpolation. However, during the optimization of the loss function, non-linearities are inherently accounted for. In addition,
increasing the number of parameters can improve the model’s ability to reproduce more complex protocols. Alternatively, models can be defined to incorporate non-linearities from the outset. For instance, in our system, the stiffness
can be parameterized using a polynomial, with its coefficients serving as trainable parameters.
Consider a polynomial parametrization for the stiffness given by
_k_ ( _t_ ) = _ki_ + _s_ ( _kf_ _−_ _ki_ ) + _s_ (1 _−_ _s_ ) _p_ ( _s_ ) (24)
where _s_ = _t/tf_, and _p_ ( _s_ ) is a polynomial
_p_ ( _s_ ) =
_Np−_ 1
_n_ =0
_ans_ <sup>_n_</sup> _._ (25)
The coefficients _an_ are the parameters that the algorithm will optimize. The form proposed for the stiffness, Eq. (24),
ensures continuity at _t_ = 0 and _t_ = _tf_ . Figure 4 shows two trained protocols, one with a single coefficient (1-parameter,
_p_ has degree 0) and the other with three coefficients (3-parameters, _p_ has degree 2). The initial and final stiffnesses
are _ki_ = 0 _._ 5 and _kf_ = 1, and the duration of the protocol is _tf_ = 1 _/_ 30. Both protocols were trained for 60 epochs
and the loss function used was the characteristic loss function Eq. (16), which at the end of training was of the order
10 <sup>_−_</sup> <sup>5</sup> . For the one-parameter protocol, the parameter value was _a_ 0 = 61 _._ 69, and for the three-parameter protocol:
_a_ 0 = 45 _._ 84, _a_ 1 = 23 _._ 51, and _a_ 2 = 14 _._ 54.
Although the number of parameters _Np_ can be chosen arbitrarily, for this particular problem, with a harmonic
potential, one can restrict the search of a solution to a one-dimensional space. This is so because the probability
density function remain gaussian at all times, with a time-dependent variance _χ_ 2( _t_ ) that satisfies Eq. (20). To achieve
a fast thermalization, the variance at the final time _tf_ needs to be 1 _/kf_ . Therefore, one can parametrize _κ_ ( _t_ ) with
only one parameter that get fixed by the condition _χ_ 2( _tf_ ) = 1 _/kf_ . However, for more complex potentials, such as the
quartic potential discussed in Sec. III, the search space must be expanded, necessitating an increase in the number of
parameters. This is because additional cumulants, _χm_, become nonzero, and their evolution is governed by a hierarchy
of coupled differential equations that must be solved simultaneously.
15
10
5
0
1- parameter polynomial
3- parameter polynomial
0 0.016 _tf_
_t_
FIG. 4: Results for stiffness _k_ ( _t_ ) after training two models using the polynomial parameterization defined in
Eq. (24). The red curve represents the model trained with a single parameter, while the blue curve corresponds to
the model trained with three parameters. The initial and final stiffness values are _ki_ = 0 _._ 5 and _kf_ = 1, respectively,
with a protocol duration of _tf_ = 1 _/_ 30.
B. Fast thermal protocol that optimize work
_1._ _Optimizing_ _work_ _alone_
In the previous examples, we focused on demonstrating how to train an algorithm capable of achieving fast thermalization. Now, we aim to show that the same algorithm also performs exceptionally well in identifying protocols
that optimize the work done on the system. In the realm of stochastic thermodynamics [37], the work done on a
system is a random variable described by
- _tf_
_W_ =
_tf_ _λ_ ˙ ( _t_ ) <sup>_<u>∂U</u>_</sup>
0 _∂λ_
<sup>_<u>∂U</u>_</sup> _∂λ_ <sup>(</sup> <sup>_x, λ_</sup> <sup>(</sup> <sup>_t_</sup> <sup>))</sup> <sup>_dt,_</sup> (26)
where _λ_ <sup>˙</sup> ( _t_ ) represents the time derivative of the control parameter _λ_ ( _t_ ). The average work done on the system can be
used as a loss function
2
_,_ (27)
_LW_ = _⟨W_ _⟩_ =
- _tf_
_dtλ_ <sup>˙</sup> ( _t_ )
0
- _<u>∂U</u>_
_∂λ_ <sup>(</sup> <sup>_x, λ_</sup> <sup>(</sup> <sup>_t_</sup> <sup>))</sup>
- = <sup><u>1</u></sup>
- _tf_
_dtk_ <sup>˙</sup> ( _t_ )
0
- _x_ <sup>2�</sup>
where the average _⟨·⟩_ is taken over the initial distribution and noise realizations. The last equality is valid only for the
harmonic oscillator with _λ_ ( _t_ ) = _k_ ( _t_ ). The problem of determining the optimal work protocol was addressed in [38],
where mathematical expressions were derived for the optimal stiffness and center protocols. For reference, we include
their results here. The optimal stiffness protocol within the interval 0 _< t < tf_ is given by:
_kopt_ ( _t_ ) = <sup>_<u>ki −</u>_</sup> <sup>_<u>A</u>_</sup> <sup><u>(1 +</u></sup> <sup>_<u>At</u>_</sup> <sup><u>)</u></sup> _,_ (28)
(1 + _At_ ) <sup>2</sup>
and the optimal work is
where the constant _A_ is
_⟨W_ _⟩opt_ = <sup><u>(</u></sup> <sup>_<u>At</u>_</sup> _kit_ <sup>_<u>f</u>_</sup> _f_ <sup><u>)2</u></sup>
_−_ ln (1 + _Atf_ ) + 2 <sup><u>1</u></sup>
_<u>kf</u>_
2 <sup><u>1</u></sup> _ki_
_ki_
(1 + _Atf_ ) <sup>2</sup> _−_ 2 <sup><u>1</u></sup> <sup>_,_</sup> (29)
_A_ =
�1 + 2 _kitf_ + _kikf_ _t_ <sup>2</sup> _f_
_<u>−</u>_ 1 _<u>−</u>_ _kf_ _tf_ +
_._ (30)
_tf_ (2 + _kf_ _tf_ )
To reproduce this result, a piecewise linear parametrization model with _Np_ = 10 learnable parameters was trained
over 60 epochs and a learning rate of _η_ = 10 _._ 0. For the numerical simulation, the parameters were _ki_ = 1 _._ 0, _kf_ = 5 _._ 0,
and _tf_ = 1 _._ 0. From equation (29), the expected work is _⟨W_ _⟩opt_ = 1 _._ 0565. The value obtained after 60 epochs of
training is _⟨W_ _⟩_ = 1 _._ 0594, corresponding to a relative error of 0 _._ 27%. This shows that the model accurately reproduces
the optimal protocol for stiffness using average work as the loss function. The trained protocol and the analytical
solution Eq. (28) as well as the loss function are shown in Fig. 5.
0 30 60
epoch
5
3
1
trained _k_
analitycal _k_
0 0.25 _tf_
_t_
1 _._ 15
1 _._ 10
1 _._ 05
FIG. 5: Stiffness as a function of time for the optimal work protocol (red curve), given by Eq. (28), and the trained
protocol (blue curve) consisting of a piecewise linear interpolation with 10 learnable parameters. The initial and
final stiffness values were _ki_ = 1 _._ 0 and _kf_ = 5 _._ 0, respectively, with a final time of _tf_ = 1 _._ 0 and a fixed center at
_c_ = 0 _._ 0. The inset depicts the evolution of the loss function during training, with the horizontal line representing the
optimal work value, _⟨W_ _⟩opt_ = 1 _._ 0565.
We can also work with parametrizations that involve neural networks. The protocol described in Eq. (28) can be
reproduced by a neural network whose architecture is as follows. The input _t_ is first normalized by dividing it by
the time duration parameter _tf_ . The normalized input is then passed through the first fully connected layer, which
maps it to a space of dimension _n_ = 30, followed by the application of the `ReLU` activation function. The output of
this layer is fed into a second layer, where a `Tanh` activation is applied. A third layer follows, utilizing `Leaky` `ReLU`
for handling small negative gradients. These deep layers have the same number of neurons _n_ = 30. The fourth and
final layer produces a scalar output using a modified `Tanh` to constrain the result within the range of _ki_ to _kf_, see
[39]. The neural network was trained for 100 epochs with a learning rate of _η_ = 0 _._ 7. The results are shown in Fig. 6.
The left panel corresponds to the parameter set _ki_ = 1 _._ 0, _kf_ = 5 _._ 0 and _tf_ = 0 _._ 1 from which the optimal work is
_⟨W_ _⟩_ opt = 1 _._ 6937 (Eq. (28)). The final value of the loss function was _LW_ = 1 _._ 6945 representing a relative error of
0 _._ 04%. In the right panel of Fig. 6, the parameters were _ki_ = 1 _._ 0, _kf_ = 2 _._ 0, _tf_ = 1 _._ 0, with an optimal work of
_⟨W_ _⟩_ opt = 0 _._ 4029. The last value of the loss function was _LW_ = 0 _._ 4053 corresponding to a relative error of 0 _._ 60%.
These results demonstrate that the network accurately reproduces the optimal stiffness protocol for both cases.
_2._ _Optimizing_ _work_ _and_ _equilibration_ _time_
Accelerating a system’s equilibration through external control carries an energetic cost. Thus, a fundamental
question is whether it is feasible to devise a control protocol that both accelerates equilibration and optimizes the
work performed. This question holds significance not only from an experimental standpoint but also from a theoretical
perspective. This issue has been solved in Ref. [40] where the optimal control protocol is the same Eq. (28); however,
the constant _A_ now is given by
_−_ 1 _,_ (31)
_A_ = <sup><u>1</u></sup>
_tf_
- _<u>ki</u>_
_kf_
5
3
1
1 _._ 8
1 _._ 7
0 50 100
<u>epoch</u>
0 0.5 _tf_
_t_
trained _k_
analitycal _k_
... ... ... ...
_~~t~~_ _~~k~~_
... ... ... ...
...
...
...
...
...
...
0 _._ 45
0 _._ 40
0 50 100
<u>epoch</u>
2 _._ 0
1 _._ 5
1 _._ 0
0 0.05 _tf_
_t_
FIG. 6: Results after training a neural network to reproduce the stiffness that minimizes the work done on the
system. The blue curve represents the trained model, while the red curve corresponds to the analytical solution
given by Eq. (28). The insets display the evolution of the mean work (loss function) during training. The left panel
corresponds to parameters _ki_ = 1 _._ 0, _kf_ = 5 _._ 0 and _tf_ = 0 _._ 1 whereas the right panel corresponds to _ki_ = 1 _._ 0, _kf_ = 2 _._ 0,
_tf_ = 1 _._ 0.
and the fast thermal (FT) optimal work is
�2
_−_ 1
- _<u>kf</u>_
_⟨W_ _⟩opt_ = 2 <sup><u>1</u></sup> <sup>ln</sup> _ki_
- <u>1</u>
+
_kitf_
- ~~�~~
_<u>ki</u>_
_kf_
_._ (32)
Observe that the quasi-static expression is reached ifmodification of the boundary conditions that ensures _t_ that _f_ _→∞_ the. finalSee Ref. [40].state is anThe change in the constantequilibrium state, as required _A_ is due to aby rapid
thermal equilibration. To replicate this protocol, we now require a loss function that encompasses the two conditions
to be optimized. Consequently, we propose a loss function _LF T W_
_LF T W_ = (1 _−_ _α_ ) _Lchar_ + _αLW ._ (33)
This is a convex linear combination of _Lchar_ and _LW_ of Eqs. (16) and (27). The blend parameter _α_ works as a
hyperparameter that is introduced by the user. The model used was _Np_ = 10 piecewise linear parametrization. The
training was more challenging than the previous ones because the minimization of _LF T W_ represents a compromise
between minimizing the work done on the system and reducing the distance to the target equilibrium state. Depending
on the value of _α_ one can give more importance to one of these objectives. The training was performed in batches of
30 epochs, with a variable learning rate of _η_ in the range 15000 to 30000 and a variable blending _α_ . We started with
_α_ = 0 to let the algorithm find a fast thermal equilibration protocol, regardless of the work done. From there, we
evaluated the average work _LW_ to be able to compare it with _Lchar_ and choose an appropriate blend _α_ so that both
contributions to _LF T W_ are weighted equally. This resulted in choosing _α_ in the range from 10 <sup>_−_</sup> <sup>5</sup> to 10 <sup>_−_</sup> <sup>4</sup> for batches
of 30 epochs and adjusting accordingly after each batch.
Finally, we obtained an acceptable optimal protocol, as depicted in Fig. 7. The theoretical value provided by
Eq. (32) is _⟨W_ _⟩opt_ = 5 _._ 4937, whereas the simulation yields a value of _LW_ = _⟨W_ _⟩_ = 5 _._ 5030. The relative error is
0 _._ 17%, and the final loss function _Lchar_ value was noted of order 10 <sup>_−_</sup> <sup>6</sup>, indicating that the equilibrium state has
been reached. Note that the trained protocol _k_ ( _t_ ) in Fig. 7 is smaller from the theoretical one in the last time steps.
This shows the compromise mentioned earlier between optimizing the work (smaller values of _k_ ( _t_ )) and reaching the
equilibrium step at _tf_ which requires larger values of _k_ ( _t_ ).
C. The center of the harmonic potential as a control parameter
In the previous sections, we have focused on the case where the stiffness varies over time. However, the same
protocol parametrization techniques apply when the stiffness is constant at _k_ = 1, while the center position varies
12
6
0
trained _k_
analitycal _k_
0 0.016 _tf_
_t_
FIG. 7: Stiffness _k_ as a function of time designed to accelerate equilibration and minimize work done on the system.
The red curve represents the optimal protocol Eq. (28) with _A_ given by Eq. (31), see Ref. [40]. Meanwhile, the blue
curve illustrates the trained protocol. The parameters were _ki_ = 0 _._ 5, _kf_ = 1 _._ 0, and _tf_ = 1 _/_ 30.
with time. To demonstrate that our machine learning approach is adaptable in this context as well, this section explores
rapid thermal equilibration and work optimization by treating the center as a control parameter and employing a
piecewise-linear parametrization.
The harmonic force in this case is
_F_ ( _x, λ_ ( _t_ )) = _−k_ ( _x −_ _c_ ( _t_ )) _,_ (34)
where _λ_ ( _t_ ) is now playing the role of the center of the harmonic potential _c_ ( _t_ ). Initially, we consider the case with
a single learnable parameter _Np_ = 1, denoted as _cm_ . This scenario resembles a two-step protocol for stiffness, but is
now applied to the center. Let _ci_ and _cf_, the initial and final values of the center, respectively. Then, the two-step
protocol for the center is
(35)
_c_ ( _t_ ) =
_ci,_ if _t ≤_ 0 _,_
_cm,_ if 0 _< t < tf_ _,_
_cf_ _,_ if _t ≥_ _tf_ _._
For the force Eq. (34) and initial condition _P_ ( _x,_ 0) = _e_ <sup>_−k_</sup> <sup>(</sup> <sup>_x−ci_</sup> <sup>)2</sup> <sup>_/_</sup> <sup>2�</sup> _k/_ (2 _π_ ), the Fokker-Planck equation admits a
solution
<u>1</u>
_P_ ( _x, t_ ) = _e_ <sup>_−_</sup> <sup>_<u>k</u>_</sup> 2 <sup>(</sup> <sup>_x−⟨x_</sup> <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>_⟩_</sup> <sup>)2</sup> (36)
<u>�2</u> _π/k_
with
_⟨x_ ( _t_ ) _⟩_ = _cm_ + ( _ci −_ _cm_ ) _e_ <sup>_−kt_</sup> (37)
for 0 _<_ _t_ _<_ _tf_ . The adjustable parameter _cm_ is determined assuming equilibrium at _t_ = _tf_, that is, the average
position, _⟨x_ ( _t_ ) _⟩_, is _cf_ at _tf_ . This gives rise to the value of
_cm_ = <sup>_<u>cf</u>_</sup> <sup>_<u>−</u>_</sup> <sup>_<u>cie−ktf</u>_</sup> _._ (38)
1 _−_ _e_ <sup>_−ktf_</sup>
If the duration of the protocol _tf_ is shorter than the natural relaxation time, we achieve a fast thermal equilibration.
Using a piecewise linear model with a single adjustable parameter _Np_ = 1 and training the model using the loss
function defined in Eq. (16), we can compare the value of the adjustable parameter to the solution of Eq. (38) to
evaluate the predictive accuracy of the algorithm. The training process was carried out with the following parameters:
_ci_ = 0, _cf_ = 3 _._ 0, _tf_ = 0 _._ 5 for 30 epochs with a learning rate of _η_ = 10. For this set of parameters, the characteristic
relaxation time _τ_ = 1 _/k_ = 1 _._ 0. We choose a protocol duration _tf_ = 0 _._ 5 smaller than the relaxation time. The
results of training are depicted in Fig. 8. This figure shows the initial and final probability density functions after
each epoch. After time _tf_, the system reaches the required equilibrium state. During training, the loss function
was approximately 10 <sup>_−_</sup> <sup>2</sup> at epoch 15, and the training continued until epoch 30, when the loss function decreased
to approximately 10 <sup>_−_</sup> <sup>5</sup> . The trained value of _cm_ obtained through this process was _cm_ = 7 _._ 6241, compared to the
expected value of _cm_ = 7 _._ 6245. This results in a deviation of approximately 0 _._ 004% from the expected value.
7 _._ 0
3 _._ 5
0 _._ 0
0 _._ 4
0 _._ 2
~~0~~ _~~.~~_ ~~0~~
epoch 0
0 0.25 _tf_
_t_
initial
target
simulation
0 5
_x_
epoch 10
0 0.25 _tf_
_t_
0 5
_x_
epoch 15
0 0.25 _tf_
_t_
0 5
_x_
epoch 30
0 0.25 _tf_
_t_
0 5
_x_
FIG. 8: Training of a single-parameter model to replicate the two-step protocol for the center for fast thermal
equilibration, with _ci_ = 0 _._ 0, _cf_ = 3 _._ 0 and _tf_ = 0 _._ 5. The initial and target probability distributions are displayed,
alongside a histogram generated from the model trained up to the despicted epoch.
Now, we consider the general case where the center is an arbitrary function of time. In this situation, no analytical
solution exists in general. The center is parameterized using a piecewise linear function with _Np_ = 10 learnable
parameters. This model assumes that _c_ ( _t_ ) is a continuous function in _t_ = 0 and _t_ = _tf_ . The model is trained with
a loss function that is a convex linear combination of _Lchar_ and a penalty term _Lgradc_ . The term _Lgradc_ penalizes
strong variations in _c_ ( _t_ ) and has the same structure as Eq. (23) for _k_ ( _t_ ). The model underwent two training stages.
The first stage, which lasted for 50 epochs, used a blend parameter of _α_ = 10 <sup>_−_</sup> <sup>3</sup> . The second stage, which lasted for 40
epochs, used _α_ = 0. Both stages used a learning rate of _η_ = 50. The training process for selected epochs is illustrated
in Fig. 9, which displays the probability density functions at various epochs. At epoch 50, the loss function was about
10 <sup>_−_</sup> <sup>3</sup>, and training continued until epoch 90, when the loss function reached the order of 10 <sup>_−_</sup> <sup>6</sup>, indicating that the
system is in the final equilibrium state. As shown in Fig. 9, the model achieves high precision and the probability
density function at the end aligns with the expected equilibrium distribution.
We now examine the scenario where the loss function is characterized by the average work, as defined in Eq. (27).
As demonstrated in Ref. [38], the optimal protocol _c_ <sup>_∗_</sup> 0 <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>and</sup> <sup>the</sup> <sup>optimal</sup> <sup>work</sup> <sup>_⟨W_</sup> <sup>_⟩_</sup> _opt_ <sup>are</sup>
_c_ <sup>_∗_</sup> 0 <sup>(</sup> <sup>_t_</sup> <sup>) =</sup> <sup>_<u>cf</u>_</sup> <sup><u>(</u></sup> <sup>_<u>t</u>_</sup> <sup><u>+ 1)</u></sup>
_tf_ + 2 <sup>_,_</sup> _⟨W_ _⟩_ opt =
_c_ <sup>2</sup> _<u>f</u>_
(39)
_tf_ + 2
for 0 _<_ _t_ _<_ _tf_ . It is evident that the protocol _c_ <sup>_∗_</sup> 0 <sup>(</sup> <sup>_t_</sup> <sup>)</sup> <sup>exhibits</sup> <sup>discontinuities</sup> <sup>in</sup> <sup>_t_</sup> <sup>=</sup> <sup>0</sup> <sup>_._</sup> <sup>0</sup> <sup>and</sup> <sup>_t_</sup> <sup>=</sup> <sup>_tf_</sup> <sup>.</sup> <sup>As</sup> <sup>indicated</sup> <sup>in</sup>
Fig. 10, the precision in determining the optimal protocol is notably high in just 10 epochs and a learning rate of
_η_ = 10. For the set of parameters _ci_ = 0, _cf_ = 3 _._ 0 and _tf_ = 1 _._ 0, the theoretical value of the optimal work given
by equation (39) is _⟨W_ _⟩_ opt = 3 _._ 0, while the result obtained through training after 10 epochs and a learning rate of
_η_ = 10 was _⟨W_ _⟩_ = 3 _._ 0060. These results imply a relative error of 0 _._ 2%.
D. The center and stiffness of the harmonic potential as a control parameter
In this section, we consider the simultaneous adjustment of both the center and stiffness, which influence the
system’s dynamics through a non-linear coupling described by the force in Eq. (34). As an initial example, we analyze
10
5
0
0 _._ 4
0 _._ 2
~~0~~ _~~.~~_ ~~0~~
epoch 0
0 _._ 0 0 _._ 2 0 _._ 4
_t_
initial
target
simulation
0 5
_x_
epoch 20
0 _._ 0 0 _._ 2 0 _._ 4
_t_
0 5
_x_
epoch 40
0 _._ 0 0 _._ 2 0 _._ 4
_t_
0 5
_x_
epoch 90
0 _._ 0 0 _._ 2 0 _._ 4
_t_
0 5
_x_
FIG. 9: Training for the center for fast thermal equilibration using a 10 parameter model and the loss function
include the penalty term _Lgradc_ . The initial (solid), target(dashed), and histogram of the trained model are
displayed after some epochs. The parameters were _ci_ = 0, _cf_ = 3 _._ 0 and _tf_ = 0 _._ 5.
3 _._ 0
1 _._ 5
0 _._ 0
trained _c_
analitycal _c_
3 _._ 2
3 _._ 0
0 5 10
<u>epoch</u>
0 0.5 _tf_
_t_
FIG. 10: Center position as a function of time to optimize the work done on the system. The red curve is the
analytical solution Eq. (39), and the blue line is the trained protocol. The inset illustrates the loss function Eq. (27)
during the training, while the dotted line indicates the optimal work, as in Eq. (39). The initial and final positions
were _ci_ = 0 _._ 0 and _cf_ = 3 _._ 0, respectively. The final time was fixed at _tf_ = 1 _._ 0, and the stiffness was set to _k_ = 1 _._ 0.
a TSP for both parameters, where the stiffness _km_ is determined by Eq. (22) and the center _cm_ by Eq. (38) with
_k_ = _km_ .
The stiffness and center are modeled using a piecewise linear parameterization with _Np_ = 1 for each. Given that
these parameters contribute differently to the dynamics—where _k_ multiplies _x_ while _c_ ( _t_ ) does not—their gradients
affect the optimization process differently. Consequently, different learning rates are required for each parameter.
For numerical simulations, we set _ci_ = 1 _._ 0, _ki_ = 0 _._ 5, _cf_ = _−_ 1 _._ 0, and _kf_ = 1 _._ 0. Based on these parameters, the
simulations suggest a relaxation time of order _τ_ = 4 _._ 0. We aim to accelerate thermal equilibration in a final time
_tf_ = 0 _._ 1. The theoretical values for _km_ and _cm_, obtained as solutions to Eqs. (22) and (38), are _km_ = 4 _._ 1931 and
_cm_ = _−_ 4 _._ 8394.
1
_−_ 2
_−_ 5
4 _._ 0
2 _._ 0
0 _._ 5
0 _._ 4
0 _._ 2
0 _~~.~~_ ~~0~~
epoch 0
0 0.05 _tf_
_<u>t</u>_
0 0.05 _tf_
_<u>t</u>_
initial
target
simulation
_−_ 2 _._ 5 0 _._ 0 2 _._ 5 5 _._ 0
_x_
epoch 10
0 0.05 _tf_
_<u>t</u>_
0 0.05 _tf_
_<u>t</u>_
_−_ 2 _._ 5 0 _._ 0 2 _._ 5 5 _._ 0
_x_
epoch 20
0 0.05 _tf_
_<u>t</u>_
0 0.05 _tf_
_<u>t</u>_
_−_ 2 _._ 5 0 _._ 0 2 _._ 5 5 _._ 0
_x_
epoch 100
0 0.05 _tf_
_<u>t</u>_
0 0.05 _tf_
_<u>t</u>_
_−_ 2 _._ 5 0 _._ 0 2 _._ 5 5 _._ 0
_x_
FIG. 11: Evolution of training of a model to reproduce the TSP for stiffness and center simultaneously. The initial
(solid) and target (dashed) distributions correspond to equilibrium states, each described by Gaussian distributions
with center _c_ and variance 1 _/√k_ . The histogram was generated with the trained model until the epoch shown. The
_√_
_/_ _k_ . The histogram was generated with the trained model until the epoch shown. The
parameters were _ci_ = _−cf_ = 1 _._ 0, _kf_ = 1 = 2 _ki_, and _tf_ = 0 _._ 1.
The model was trained for 100 epochs using learning rates _ηc_ = 10 _._ 0 for the center and _ηk_ = (2 _/_ 3) _ηc_ for stiffness,
resulting in a TSP solution with _km_ = 4 _._ 1218 and _cm_ = _−_ 4 _._ 9733. The corresponding relative errors are 1 _._ 69% and
2 _._ 76%, respectively. The results presented in Fig. 11, confirm that the equilibrium state is successfully reached at _tf_
by the final epoch.
The more general case is where the stiffness and center are not constant in [0 _, tf_ ]. To address this scenario, we
parameterize each variable using a piecewise linear model with _Np_ = 10, ensuring that the control variables remain
continuous in [0 _, tf_ ]. Given that strong variations are expected at the beginning and end of the protocol, we introduce
a penalty term in the loss function, _L_ grad _k_ + _L_ grad _c_, to mitigate abrupt changes in _k_ and _c_ over the time interval [0 _, tf_ ].
The model was initially trained for 100 epochs using the total loss function with a blend of _α_ = 10 <sup>_−_</sup> <sup>2</sup>, followed by an
additional 10 epochs trained exclusively with _Lchar_ . Representative epochs are depicted in Fig. 12, which illustrates
that both _k_ and _c_ exhibit smooth variations and continuity. The final epoch confirms that the system successfully
reaches equilibrium at _t_ = _tf_ .
Through these examples, we have demonstrated that the algorithm successfully finds optimal protocols within the
harmonic framework, effectively reproducing established analytical results. Furthermore, its applicability extends to
the discovery of more complex protocols, as explored in the following section.
III. BROWNIAN PARTICLE UNDER NONHARMONIC POTENTIALS
With minimal modifications, our piecewise linear parameterization model can be adapted to tackle more complex
problems where analytical methods provide limited or no insight. As discussed in Ref. [38], solving optimization
problems for non-harmonic potentials presents significant challenges, often rendering analytical solutions impractical
and necessitating numerical techniques from optimal transport theory [28, 30].
In this section, we demonstrate how our algorithm extends beyond the harmonic potential to address fastthermalization problems. Specifically, we investigate the design of fast thermal protocols for transforming a fourthdegree polynomial potential energy at _t_ = 0 into a quadratic potential at _tf_ . Given the importance of double-well
potentials and their deformation into quadratic potentials in the context of memory erasure [41, 42], we consider an
initial potential with a double-well shape. The final state can be any confining potential; as an illustrative example,
we select a quadratic potential obtained from the Taylor expansion of the initial potential around one of its minima
(e.g., the right minimum). However, alternative final states can also be chosen. See Fig. 13 for details. Similar to the
harmonic case, there exist infinitely many possible paths connecting the initial and final states. Thus, our goal is to
identify an external protocol that accelerates equilibration relative to the natural relaxation time.
1
_−_ 2
_−_ 5
4 _._ 0
2 _._ 0
0 _._ 5
0 _._ 4
0 _._ 2
~~0~~ _~~.~~_ ~~0~~
epoch 0
0 0.05 _tf_
_t_
0 0.05 _tf_
_t_
initial
target
simulation
_−_ 2 _._ 5 0 _._ 0 2 _._ 5 5 _._ 0
_x_
epoch 5
0 0.05 _tf_
_t_
0 0.05 _tf_
_t_
_−_ 2 _._ 5 0 _._ 0 2 _._ 5 5 _._ 0
_x_
epoch 20
0 0.05 _tf_
_t_
0 0.05 _tf_
_t_
_−_ 2 _._ 5 0 _._ 0 2 _._ 5 5 _._ 0
_x_
epoch 110
0 0.05 _tf_
_t_
0 0.05 _tf_
_t_
_−_ 2 _._ 5 0 _._ 0 2 _._ 5 5 _._ 0
_x_
FIG. 12: The training evolution of a fast thermal equilibration model incorporating 10 parameters for stiffness and
10 parameters for center is shown. The loss function employed is a convex linear combination of _Lchar_ and
_L_ grad _k_ + _L_ grad _c_ . The system is initially trained for 100 epochs using a blend parameter of 10 <sup>_−_</sup> <sup>2</sup>, followed by an
additional 10 epochs with the loss function _Lchar_ to emphasize the fast thermal process. The parameter values were
set as _kf_ = 2 _ki_ = 1 _._ 0 and _cf_ = _−ci_ = _−_ 1 _._ 0, with a learning rate of _ηc_ = (3 _/_ 2) _ηk_ = 100.
We consider a time-dependent potential energy of the form:
_U_ ( _x, λ_ ( _t_ )) = _a_ 4( _t_ ) _x_ <sup>4</sup> + _a_ 3( _t_ ) _x_ <sup>3</sup> + _a_ 2( _t_ ) _x_ <sup>2</sup> + _a_ 1( _t_ ) _x_ + _a_ 0( _t_ ) _,_ (40)
where the coefficients _λ_ = _{a_ 0 _, a_ 1 _, a_ 2 _, a_ 3 _, a_ 4 _}_ are functions of time and serve as control parameters. A straightforward
approach would be to parameterize each coefficient and train the model to minimize _Lchar_ . However, this method
presents challenges. During training, the parameters are updated following Eq. (6), which can result in a repulsive
potential energy, causing the particle to escape to infinity. This issue not only affects numerical simulations but also
poses a fundamental obstacle to the experimental realization of the protocol. This can be understood in the following
way. The force act during the training is
(41)
_F_ ( _x, λ_ ( _t_ )) = _−_ (4 _a_ 4( _t_ ) _x_ <sup>3</sup> + 3 _a_ 3( _t_ ) _x_ <sup>2</sup> + 2 _a_ 2( _t_ ) _x_ + _a_ 1( _t_ )) _._
If the algorithm updates the parameter _a_ 4 to be negative for some time (or times), the force tends to move the
particle to the _|x| →∞_ directions, then the algorithm diverge. If the parameter _a_ 4 is very close to zero by the positive
numbers and the coefficient _a_ 3 _>_ 0, the coefficient _a_ 3 makes the main contribution to the force. Therefore, if the
particle is located in _x <_ 0, it has a tendency to move to the left, that is, it moves away from the expected final position
distribution, which in this case is around _x_ = 1 _._ 0. This behavior leads to instabilities and convergence problems. Thus,
we impose an additional constraint, given by _a_ 3( _t_ ) _<_ 0, a constraint motivated purely by the numerical convergence.
In summary, our model included _a_ 4( _t_ ) _>_ 0 and _a_ 3( _t_ ) _<_ 0 in _t ∈_ (0 _, tf_ ) as restrictions. To address this, the model must
incorporate constraints that ensure that the potential remains confining and converge. This can be achieved either
by explicitly enforcing confinement conditions within the model or by introducing a penalty term in the loss function
to discourage nonphysical solutions. We used a model with the restrictions incorporated.
To find the fast-thermalization protocol while ensuring confinement, we trained a model with two different loss
functions. In both approaches, we modeled each coefficient with a piecewise linear parametrization with _Np_ = 20
parameters and including the restriction _a_ 4( _t_ ) _>_ 0 and _a_ 3( _t_ ) _<_ 0 in (0 _, tf_ ). In addition, we chose the potential
at _t_ = 0 to have two symmetric minima at _x_ = _−_ 1 _._ 0 and _x_ = 1 _._ 0 with energy 0, a maximum at _x_ = 0 _._ 0 with a
separation barrier _U_ (0 _,_ 0) = 4 _._ 0. At the end of the protocol, we selected the potential at _t_ = _tf_ to be a harmonic
potential with minimum centered at _x_ = 1 _._ 0 corresponding to the Taylor expansion to second order of the initial
quartic potential around _x_ = 1 _._ 0. To determine the system’s relaxation time, we proceed as in the harmonic case,
FIG. 13: Illustration of the externally controlled deformation of a fourth-degree potential at _t_ = 0 into a parabolic
potential at _t_ = _tf_ . Multiple pathways _λ_ ( _t_ ) exist to achieve this transformation.
that is, the initial potential is abruptly switched to the final one (step protocol), and the time required for the system
to reach equilibrium is observed. For this set states, the relaxation time was _τ_ = 0 _._ 6. Hence, we established the value
of _tf_ as 0 _._ 06, making the protocol approximately 10 times faster than the relaxation time.
It is important to note that in this section we employed the Adam optimizer rather than stochastic gradient descent
(SGD). This choice was motivated by the observation that the coefficients in the quartic potential play different roles
in ensuring the boundedness of the potential. Consequently, it is essential to exercise precise control over the manner
in which these parameters are updated during the training process. Adam proved to be more robust in this context
because it utilizes adaptive learning rates and incorporates momentum, allowing for individualized parameter updates
[43]. This adaptive mechanism is particularly beneficial when dealing with parameters that vary in importance, as it
facilitates efficient convergence and helps mitigate the risk of stagnation during training.
This model was trained for 120 epochs with the loss function Eq. (16) and a learning rate of _η_ = 0 _._ 5. The histogram
of the trained model is shown in Fig. 14 (a). At the end of the training process, the loss function reaches a value on
the order of 10 <sup>_−_</sup> <sup>4</sup> (inset plot of Fig. 14 (a)), which means that the system has reached equilibrium. As illustrated
in Fig. 14 (b), the potential evolves to significantly higher values compared to its initial state, as highlighted in the
inset. This increase in _|U_ _|_ reflects the high probability that the particle will be found in these regions, with the
external potential effectively guiding it toward the final equilibrium configuration. Despite the fact that this protocol
is fast thermal, the figure 14 (c) shows abrupt changes in the coefficients, a feature that is not desirable from the
experimental point of view.
This behavior mirrors that observed in the harmonic case. Following the same ideas as those for the harmonic
case, we introduced a penalty term in the loss function to discourage large variations in the coefficients. The training
process was divided into two stages. In the first stage (up to epoch 100), we employed the loss function:
_L_ = (1 _−_ _α_ ) _Lchar_ + _αLgrad_ a _,_ (42)
_Lgrad_ a =
4
_i_ =0
_Np−_ 1
_n_ =0
( _ai_ ( _tn_ +1) _−_ _ai_ ( _tn_ )) <sup>2</sup> (43)
where the blend parameter was set to _α_ = 10 <sup>_−_</sup> <sup>3</sup> and the learning rate to _η_ = 0 _._ 5. At the end of this stage, the loss
function was of order 10 <sup>_−_</sup> <sup>3</sup> .
In the second stage, the model was further trained for 50 epochs using only the loss function _Lchar_ (i.e., setting
_α_ = 0) to focus entirely on optimizing fast-thermal equilibration, the final value of the loss function was 10 <sup>_−_</sup> <sup>5</sup> .
Figure 15 resumes the results for this case. Figure 15 (a) presents the histogram obtained with the trained model,
and the inset describes the evolution of the loss function. In figure 15 (b) selected snapshots of the optimized
potential were plotted, but remarkably, the variations in _U_ are two orders of magnitude less than in the case without
the penalty term (see the inset of Fig. 15 (c)). In the figure 15 (c) is plotted the temporal evolution of the trained
potential coefficients, demonstrating the expected smoothing effect introduced by the penalty term. The gradual
variation of the coefficients ensures a more stable and controlled evolution of the potential, which is particularly
advantageous for experimental implementations, where abrupt parameter changes can be challenging to realize.
Both implementations successfully achieve the desired transformation, although the penalty-based approach offers
a more feasible solution. These findings highlight the flexibility of our framework in adapting to different physical
(a)
_a_ 0 (c)
_a_ 1
_a_ 2
_a_ 3
_a_ 4
0 0.03 _tf_
_t_
1 _._ 0
0 _._ 5
0 _._ 0
_L_ char
0 _._ 1
0 _._ 0
0 60 120
epoch
initial
final
simulation
_−_ 4 _−_ 2 0 2
_x_
30
0
_−_ 30
0
_−_ 1
_t_ =0 (b)
_t_ = 10 <sup>_<u>tf</u>_</sup>
_t_ = <sup><u>3</u></sup> 4 <sup>_<u>tf</u>_</sup>
_t_ = <sup><u>9</u></sup> 10 <sup>_<u>tf</u>_</sup>
_t_ = _tf_
_<u>×</u>_ <u>10</u> <sup>3</sup>
0 20
20
0
_−_ 20
_−_ 4 0 4
_x_
FIG. 14: Fast thermal protocol that transforms a quartic potential into a harmonic potential without smoothing the
parameters changes. (a) Histogram of the trained model in the last epoch, i.e., epoch 120. The dotted line
represents the initial quartic potential, while the solid line corresponds to the final harmonic potential. The inset
shows the loss function as a function of epochs. (b) Some snapshots of the potential energy of the trained model. (c)
Coefficients of the trained model as a function time.
_−_ 2 0 2
_x_
_a_ 0
_a_ 1
_a_ 2
_a_ 3
_a_ 4
0 0.03 _tf_
_t_
5
0
_−_ 5
20
0
_−_ 25
(c)
1 _._ 0
0 _._ 5
0 _._ 0
(a)
_L_
0 _._ 1
0 _._ 0
0 75 150
epoch
initial
final
simulation
_−_ 4 _−_ 2 0 2
_x_
3 <sup>_<u>×</u>_</sup> <sup><u>101</u></sup>
0
(b)
_t_ =0
_t_ = 10 <sup>_<u>tf</u>_</sup>
_t_ = <sup><u>3</u></sup> 4 <sup>_<u>tf</u>_</sup>
_t_ = <sup><u>9</u></sup> 10 <sup>_<u>tf</u>_</sup>
_−_ 4
10
_<u>−</u>_ 3 0 3 _t_ = _tf_
FIG. 15: Fast thermal protocol that transforms a quartic potential into a harmonic potential with smoothing the
parameters changes. (a) Histogram of the trained model in the last epoch, i.e., epoch 120. The dotted line
represents the initial quartic potential, while the solid line corresponds to the final harmonic potential. The inset
shows the loss function as a function of epochs. (b) Some snapshots of the potential energy of the trained model. (c)
Coefficients of the trained model as a function time.
constraints, paving the way for practical implementations in experimental settings.
IV. CONCLUSIONS
In this study, we demonstrated how to apply machine learning tools to find control protocols that optimize conditions
such as mean work or protocols that achieve equilibrium faster than the relaxation time, or both conditions taken
simultaneously. From the practical point of view, we have shown the flexibility that this numerical approach offers. It
is possible to parametrize protocols in different ways or include restrictions in the models that achieve a specific goal.
These restrictions cannot be arbitrary but motivated from physical reasons. Otherwise, a machine learning algorithm
could find solutions that lack physical meaning.
We reproduced the well-established results for the stiffness of the harmonic oscillator in the overdamped limit.
These results have been reproduced using different model parametrizations to recall the flexibility of our approach. In
addition, we showed that our method is also suitable for dealing with the center of the harmonic potential, indicating
independence of the parameters used to perform the control on the stochastic system. Furthermore, we studied
non-harmonic potential, and we concluded that our approach is perfectly well adapted to more complex potentials.
This is one of the most important results of this work. The scalability and adaptability of machine learning for
stochastic systems offer a new numerical tool to deal with the complexities of stochastic control theory and stochastic
thermodynamics.
While our approach offers several advantages, it also has certain limitations. Perhaps the most significant challenge
is extending the framework to systems with multiple interacting particles. This requires solving coupled stochastic differential equations, often with different external control parameters, where analytical methods are virtually
nonexistent. In addition, our approach is currently limited to the overdamped regime, and the inclusion of inertia
represents some challenges [23, 30, 32, 44]. Developing generalized algorithms capable of handling interactions and
the underdamped regime remains an important direction for future work.
Another limitation is the lack of direct physical interpretation for some parameters, particularly those emerging
from the neural network approach. The internal parameters of the network do not always correspond to physically
meaningful quantities, which can make the results less intuitive. Additionally, there is considerable flexibility in
selecting functions such as _Lchar_ and the penalty terms, which introduces an element of arbitrariness.
Despite these challenges, our results provide a foundation for exploring how machine learning techniques can be
effectively applied to stochastic control dynamics and thermodynamics. Future work in this direction could lead to
more refined and physically interpretable models, further bridging the gap between machine learning and statistical
physics.
The code we developed in this work is open source and it is available at [45] as a `python` library which can be used
to reproduce our results, train new protocols and extend it for more complex potentials. The documentation of the
code can be found at [46].
V. ACKNOWLEDGMENTS
We gratefully acknowledge the support of Universidad de los Andes, Facultad de Ciencias, projects number INV2025-205-3271 and INV-2023-176-2951, and its High Performance Computing center (HPC). We acknowledge support
from ECOS Nord project C24P01 and Minciencias, Patrimonio Aut´onomo Fondo Nacional de Financiamiento para la
Ciencia, la Tecnolog´ıa y la Innovaci´on, Francisco Jos´e de Caldas. We thank the Deutscher Akademischer Austauschdienst (DAAD) for financial support. We also thank Sabine Klapp and her research group for inspiring discussions
and hospitality at Technical University Berlin, Germany.
[1] J. Bechhoefer, _Control_ _[Theory](https://doi.org/10.1017/9780511734809)_ _for_ _Physicists_ (Cambridge University Press, 2021).
[2] G. M. Wang, E. M. Sevick, E. Mittag, D. J. Searles, and D. J. Evans, Phys. Rev. Lett. [89](https://doi.org/10.1103/PhysRevLett.89.050601), 050601 (2002).
[3] C. Gonzalez-Ballestero, M. Aspelmeyer, L. Novotny, R. Quidant, and O. Romero-Isart, Science 374, [eabg3027](https://doi.org/10.1126/science.abg3027) (2021),
[https://www.science.org/doi/pdf/10.1126/science.abg3027.](https://arxiv.org/abs/https://www.science.org/doi/pdf/10.1126/science.abg3027)
[4] D. Raynal, T. de Guillebon, D. Gu´ery-Odelin, E. Trizac, J.-S. Lauret, and L. Rondin, Phys. Rev. Lett. [131](https://doi.org/10.1103/PhysRevLett.131.087101), 087101 (2023).
[5] I. Mart´ınez, A. Petrosyan, D. Gu´ery-Odelin, E. Trizac, and S. Ciliberto, Nat. Phys. 12, 843–846 (2016).
[6] G. Li, H. T. Quan, and Z. C. Tu, Phys. Rev. E [96](https://doi.org/10.1103/PhysRevE.96.012144), 012144 (2017).
[7] D. Gu´ery-Odelin, C. Jarzynski, C. A. Plata, A. Prados, and E. Trizac, Rep. Prog. Phys. [86](https://doi.org/10.1088/1361-6633/acacad), 035902 (2023).
[8] S. Dago, B. Besga, R. Mothe, D. Gu´ery-Odelin, E. Trizac, A. Petrosyan, L. Bellon, and S. Ciliberto, SciPost [Phys.](https://doi.org/10.21468/SciPostPhys.9.5.064) 9, 064
[(2020).](https://doi.org/10.21468/SciPostPhys.9.5.064)
[9] A. G. Baydin, B. A. Pearlmutter, A. A. Radul, and J. M. Siskind, Journal of Machine [Learning](https://doi.org/10.48550/arXiv.1502.05767) Research 18, 1–43 (2018).
[10] J. Sohl-Dickstein, E. Weiss, N. Maheswaranathan, and S. Ganguli, in _Proceedings_ _of_ _the_ _32nd_ _[International](https://doi.org/10.48550/arXiv.1503.03585)_ _Conference_
_on_ _[Machine](https://doi.org/10.48550/arXiv.1503.03585)_ _Learning_, Proceedings of Machine Learning Research, Vol. 37, edited by F. Bach and D. Blei (PMLR, Lille,
France, 2015) pp. 2256–2265.
[11] J. Ho, A. Jain, and P. Abbeel, 34th Conference on Neural Information Processing Systems (NeurIPS 2020), Vancouver,
Canada [10.48550/arXiv.2006.11239](https://doi.org/10.48550/arXiv.2006.11239) (2020).
[12] M. Engel, J. A. Smith, and M. P. Brenner, Phys. Rev. X 13, 041032 (2023).
[13] C. Casert and S. Whitelam, Nature [Communications](https://doi.org/10.1038/s41467-024-52878-2) 15, 9128 (2024).
[14] A. Karpathy, The spelled-out intro to neural networks and backpropagation: building micrograd, `[https://www.youtube.](https://www.youtube.com/watch?v=VMj-3S1tku0)`
`[com/watch?v=VMj-3S1tku0](https://www.youtube.com/watch?v=VMj-3S1tku0)` (2022).
[15] Pytorch, `[https://pytorch.org/](https://pytorch.org/)` .
[16] Tensorflow, `[https://www.tensorflow.org/](https://www.tensorflow.org/)` .
[17] Jax: High-performance array computing, `[https://jax.readthedocs.io/](https://jax.readthedocs.io/)` .
[18] K. Hornik, M. Stinchcombe, and H. White, Neural Networks [2](https://doi.org/10.1016/0893-6080%0x2889%0x2990020-8), 359–366 (1989).
[19] S. Whitelam and I. Tamblyn, Physical Review E 101, 052604 (2020).
[20] C. P. Goodrich, E. M. King, S. S. Schoenholz, E. D. Cubuk, and M. P. Brenner, Proceedings of the [National](https://doi.org/10.1073/pnas.2024083118) Academy of
Sciences 118, [e2024083118](https://doi.org/10.1073/pnas.2024083118) (2021).
[21] S. Whitelam, Phys. Rev. X [13](https://doi.org/10.1103/PhysRevX.13.021005), 021005 (2023).
[22] S. Whitelam, Physical Review E 108, 044138 (2023).
[23] N. Barros, S. Whitelam, S. Ciliberto, and L. Bellon, Physical Review E 111, 044114 (2025).
[24] S. A. M. Loos, S. Monter, F. Ginot, and C. Bechinger, Phys. Rev. X [14](https://doi.org/10.1103/PhysRevX.14.021032), 021032 (2024).
[25] G. Biroli and M. M´ezard, Journal of Statistical Mechanics: [Theory](https://doi.org/10.1088/1742-5468/acf8ba) and Experiment 2023, 093402 (2023).
[26] G. Biroli, T. Bonnaire, V. de Bortoli, and M. M´ezard, Nature [Communications](https://doi.org/10.1038/s41467-024-54281-3) 15, 9957 (2024).
[27] S. Whitelam, V. Selin, I. Benlolo, C. Casert, and I. Tamblyn, Machine Learning: [Science and Technology](https://doi.org/10.1088/2632-2153/aca6cd) 3, 045026 (2022).
[28] E. Aurell, C. Mej´ıa-Monasterio, and P. Muratore-Ginanneschi, Phys. Rev. Lett. [106](https://doi.org/10.1103/PhysRevLett.106.250601), 250601 (2011).
[29] C. Villani, _Topics_ _in_ _Optimal_ _Transportation_, Graduate Studies in Mathematics (American Mathematical Society, 2003).
[30] J. Sanders, M. Baldovin, and P. Muratore-Ginanneschi, Phys. Rev. E [111](https://doi.org/10.1103/PhysRevE.111.034127), 034127 (2025).
[31] J. Klinger and G. M. Rotskoff, Physical Review E 111, 014114 (2025).
[32] P. Muratore-Ginanneschi and K. Schwieger, Physical Review E 90, 060102 (2014).
[33] R. T. Q. Chen, Y. Rubanova, J. Bettencourt, and D. Duvenaud, Neural ordinary [differential](https://doi.org/10.48550/arXiv.1806.07366) equations, `[http://arxiv.](http://arxiv.org/abs/1806.07366)`
`[org/abs/1806.07366](http://arxiv.org/abs/1806.07366)` (2018).
[34] L. S. Pontryagin, V. G. Boltyanskii, R. V. Gamkrelidze, and E. F. Mishchenko, _The_ _Mathematical_ _Theory_ _of_ _Optimal_
_[Processes](https://doi.org/10.1201/9780203749319)_ (Interscience Publishers, 1962).
[35] X. Li, T.-K. L. Wong, R. T. Q. Chen, and D. Duvenaud, Scalable Gradients for Stochastic Differential Equations, `[http:](http://arxiv.org/abs/2001.01328)`
`[//arxiv.org/abs/2001.01328](http://arxiv.org/abs/2001.01328)` (2020), [2001.01328.](https://arxiv.org/abs/2001.01328)
[36] D. Rengifo and G. T´ellez, Phys. Rev. E 109, 014145 (2024).
[37] L. Peliti and S. Pigolotti, _Stochastic_ _[Thermodynamics:](https://press.princeton.edu/books/hardcover/9780691201771/stochastic-thermodynamics)_ _An_ _Introduction_ (Princeton University Press, 2021).
[38] T. Schmiedl and U. Seifert, Phys. Rev. Lett. [98](https://doi.org/10.1103/PhysRevLett.98.108301), 108301 (2007).
[39] The `Leaky` `ReLU` function is stepwise that returns _x_ if _x_ _≥_ 0 and _−ϵx_ if _x_ _<_ 0, where epsilon is a positive small value, by
default in PyTorch, _ϵ_ = 10 <sup>_−_</sup> <sup>2</sup> . If _ϵ_ = 0, the function is called `ReLU` . The function `Tanh` is the usual hyperbolic tangent.
[40] T. Schmiedl and U. Seifert, Europhysics [Letters](https://doi.org/10.1209/0295-5075/81/20003) 81, 20003 (2007).
[41] K. Proesmans, J. Ehrich, and J. Bechhoefer, Phys. Rev. Lett. [125](https://doi.org/10.1103/PhysRevLett.125.100602), 100602 (2020).
[42] S. Dago, J. Pereda, N. Barros, S. Ciliberto, and L. Bellon, Phys. Rev. Lett. [126](https://doi.org/10.1103/PhysRevLett.126.170601), 170601 (2021).
[43] D. P. Kingma and J. Ba, Adam: A method for [stochastic](https://doi.org/10.48550/arXiv.1412.6980) optimization, `[http://arxiv.org/abs/1412.6980](http://arxiv.org/abs/1412.6980)` (2014).
[44] A. Gomez-Marin, T. Schmiedl, and U. Seifert, The Journal of Chemical [Physics](https://doi.org/10.1063/1.2948948) 129, 024114 (2008).
[45] Langesim optim library, `[https://github.com/GabrielTellez/langesim_optim](https://github.com/GabrielTellez/langesim_optim)` (2025).
[46] Langesim optim documentation, `[https://gabrieltellez.github.io/langesim_optim](https://gabrieltellez.github.io/langesim_optim)` (2025).
섹션 본문
섹션 본문이 없습니다.
참고문헌 36건
- Topics in Optimal Transportation Graduate studies in mathematics · American Mathematical Society · 2003 10.1090/gsm/058
- Automatic differentiation in machine learning: a survey arXiv (Cornell University) · Cornell University · 2015 10.4230/lipics.ecoop.2019.25
- How nanomechanical systems can minimize dissipation Physical Review E · American Physical Society · 2014 10.1103/physreve.90.060102
- Optimal protocols for minimal work processes in underdamped stochastic thermodynamics The Journal of Chemical Physics · American Institute of Physics · 2008 10.1063/1.2948948
- Optimal Protocols and Optimal Transport in Stochastic Thermodynamics Physical Review Letters · American Physical Society · 2011 10.1103/physrevlett.106.250601
- Experimental Demonstration of Violations of the Second Law of Thermodynamics for Small Systems and Short Time Scales Physical Review Letters · American Physical Society · 2002 10.1103/physrevlett.89.050601
- Optimal Finite-Time Processes In Stochastic Thermodynamics Physical Review Letters · American Physical Society · 2007 10.1103/physrevlett.98.108301
- Efficiency at maximum power: An analytically solvable model for stochastic heat engines EPL (Europhysics Letters) · Institute of Physics · 2007 10.1209/0295-5075/81/20003
- Multilayer feedforward networks are universal approximators Neural Networks · Elsevier BV · 1989 10.1016/0893-6080(89)90020-8
- Engineered swift equilibration of a Brownian particle Nature Physics · Nature Portfolio · 2016 10.1038/nphys3758
- Shortcuts to isothermality and nonequilibrium work relations Physical review. E · American Physical Society · 2017 10.1103/physreve.96.012144
- Proceedings of The 32nd International Conference on Machine Learning 2015
- Engineered swift equilibration of brownian particles: consequences of hydrodynamic coupling SciPost Physics · SciPost.org · 2020 10.21468/scipostphys.9.5.064
- Learning to grow: Control of material self-assembly using evolutionary reinforcement learning Physical review. E · American Physical Society · 2020 10.1103/physreve.101.052604
- Finite-Time Landauer Principle Physical Review Letters · American Physical Society · 2020 10.1103/physrevlett.125.100602
- Engineered swift equilibration of brownian particles: consequences of hydrodynamic coupling SciPost Physics · SciPost.org · 2020 10.21468/scipostphys.9.5.064
- Control Theory for Physicists 2021 10.1017/9780511734809
- Information and Thermodynamics: Fast and Precise Approach to Landauer’s Bound in an Underdamped Micromechanical Oscillator Physical Review Letters · American Physical Society · 2021 10.1103/physrevlett.126.170601
- Designing self-assembling kinetics with differentiable statistical physics models Proceedings of the National Academy of Sciences · National Academy of Sciences · 2021 10.1073/pnas.2024083118
- Stochastic Thermodynamics: An Introduction 2021
- Levitodynamics: Levitation and control of microscopic objects in vacuum Science · American Association for the Advancement of Science · 2021 10.1126/science.abg3027
- Driving rapidly while remaining in control: classical shortcuts from Hamiltonian to stochastic dynamics Reports on Progress in Physics · IOP Publishing · 2022 10.1088/1361-6633/acacad
- The Mathematical Theory of Optimal Processes OR · JSTOR · 1965 10.2307/3006724
- Training neural networks using Metropolis Monte Carlo and an adaptive variant Machine Learning Science and Technology · IOP Publishing · 2022 10.1088/2632-2153/aca6cd
- Demon in the Machine: Learning to Extract Work and Absorb Entropy from Fluctuating Nanosystems Physical Review X · American Physical Society · 2023 10.1103/physrevx.13.021005
- Shortcuts to Equilibrium with a Levitated Particle in the Underdamped Regime Physical Review Letters · American Physical Society · 2023 10.1103/physrevlett.131.087101
- Generative diffusion in very large dimensions Journal of Statistical Mechanics Theory and Experiment · Institute of Physics · 2023 10.1088/1742-5468/acf8ba
- How to train your demon to do fast information erasure without heat production Physical review. E · American Physical Society · 2023 10.1103/physreve.108.044138
- Optimal Control of Nonequilibrium Systems through Automatic Differentiation Physical Review X · American Physical Society · 2023 10.1103/physrevx.13.041032
- Analytical results and universal behavior in fast thermal equilibration protocols Physical review. E · American Physical Society · 2024 10.1103/physreve.109.014145
- Universal Symmetry of Optimal Control at the Microscale Physical Review X · American Physical Society · 2024 10.1103/physrevx.14.021032
- Learning protocols for the fast and efficient control of active matter Nature Communications · Nature Portfolio · 2024 10.1038/s41467-024-52878-2
- Dynamical regimes of diffusion models Nature Communications · Nature Portfolio · 2024 10.1038/s41467-024-54281-3
- Universal energy-speed-accuracy trade-offs in driven nonequilibrium systems Physical review. E · American Physical Society · 2025 10.1103/physreve.111.014114
- Minimal work protocols for inertial particles in nonharmonic traps Physical review. E · American Physical Society · 2025 10.1103/physreve.111.034127
- Learning efficient erasure protocols for an underdamped memory Physical review. E · American Physical Society · 2025 10.1103/physreve.111.044114