Large deviation theory
This section applies results of large deviation theory (LDT), particularly action minimization problems for computing most probable transition paths in stochastic dynamical systems driven by weak noise. For a description of the theory, see Freidlin and Wentzell [8] and [9]. An overview of numerical methods applying LDT is given in Grafke and Vanden-Eijnden [10].
The methods in this section apply to $D$-dimensional stochastic dynamical systems of the form
\[\text{d} \mathbf{x} = \mathbf{b} (\mathbf{x}) \text{d}t + \sigma \mathbf{\Sigma} \text{d}\mathbf{W}_t \,,\]
where the drift field $\mathbf{b}$ may be non-gradient but the noise term must consist of Gaussian noise ($\mathbf{W}_t$ is a $D$-dimensional vector of independent standard Wiener processes) and a constant covariance matrix $\mathbf{Q} = \mathbf{\Sigma}\mathbf{\Sigma}^\top$.
This is a special case of the broader class of noise types supported by CoupledSDEs
.
Action minimizers
Several methods have been proposed to calculate transition paths that minimize a given action functional. In the weak-noise limit, this minimum action path (or instanton) corresponds to the most probable transition path. While the minimum action method (MAM) is the most basic version, it is often beneficial to minimize the geometric action via a time-independent version called gMAM. The problem can also be cast in a Hamiltonian form, implemented as simple gMAM (sgMAM), which can have numerical advantages.
These methods apply to non-gradient systems driven by Gaussian noise. In gradient systems, minimum action paths between attractors coincide with heteroclinic orbits, which can be computed via the so-called string method.
To summarize, the following methods are available:
- Minimum action method (MAM)
- Geometric minimum action method (gMAM)
- Simple geometric minimum action method (sgMAM)
- String method
Minimum action method (MAM)
Minimization of the specified action functional using the optimization algorithm of Optimization.jl
. See also E et al. [11].
CriticalTransitions.min_action_method
— Functionmin_action_method(sys::ContinuousTimeDynamicalSystem, x_i, x_f, T::Real; kwargs...)
Minimizes an action functional to obtain a minimum action path (instanton) between an initial state x_i
and final state x_f
in phase space.
This algorithm uses the Optimization.jl
package to minimize the specified action functional (either fw_action
or om_action
) for the system sys
over paths connecting x_i
to x_f
in time T
.
The path is initialized as a straight line between x_i
and x_f
, parameterized in time via N
equidistant points and total time T
. Thus, the time step between discretized path points is $\Delta t = T/N$. To set an initial path different from a straight line, see the multiple dispatch method
min_action_method(sys::ContinuousTimeDynamicalSystem, init::Matrix, T::Real; kwargs...)
.
Returns a MinimumActionPath
object containing the optimized path and the action value.
Keyword arguments
functional = "FW"
: type of action functional to minimize. Defaults tofw_action
, alternative: "OM" forom_action
.N = 100
: number of path points to use for the discretization of the path.noise_strength = nothing
: noise strength for the action functional. Specify only iffunctional = "OM"
.method = Optimisers.Adam()
: minimization algorithm (seeOptimization.jl
)ad_type = Optimization.AutoFiniteDiff()
: type of automatic differentiation to use (seeOptimization.jl
)maxiter = 100
: maximum number of iterations before the algorithm stops.abstol=1e-8
: absolute tolerance of action gradient to determine convergencereltol=1e-8
: relative tolerance of action gradient to determine convergenceverbose = true
: whether to print Optimization information during the runshow_progress = false
: whether to print a progress bar
min_action_method(sys::ContinuousTimeDynamicalSystem, init::Matrix, T::Real; kwargs...)
Minimizes the specified action functional to obtain a minimum action path (instanton) between fixed end points given a system sys
and total path time T
.
The initial path init
must be a matrix of size (D, N)
, where D
is the dimension of the system and N
is the number of path points. The physical time of the path is specified by T
, such that the time step between consecutive path points is $\Delta t = T/N$.
Geometric minimum action method (gMAM)
Minimization of the geometric action following Heymann and Vanden-Eijnden [12] and Heymann and Vanden-Eijnden [13]. gMAM reformulates MAM to avoid double optimization of both the action and the transition time. It achieves this by using a geometric action functional that is independent of the time parametrization of the path. This reparameterization invariance makes the method more robust and computationally efficient, particularly for multiscale systems.
CriticalTransitions.geometric_min_action_method
— Functiongeometric_min_action_method(
sys::ContinuousTimeDynamicalSystem,
x_i,
x_f;
N,
kwargs...
) -> MinimumActionPath{_A, _B, _C, Nothing, Nothing, Nothing, Nothing, Nothing} where {_A, _B<:Real, _C}
Computes the minimizer of the geometric Freidlin-Wentzell action based on the geometric minimum action method (gMAM), using optimizers of OPtimization.jl or the original formulation by Heymann and Vanden-Eijnden[1]. Only Freidlin-Wentzell action has a geometric formulation.
To set an initial path different from a straight line, see the multiple dispatch method
geometric_min_action_method(sys::CoupledSDEs, init::Matrix, arclength::Real; kwargs...)
.
Keyword arguments
maxiter::Int=100
: maximum number of optimization iterations before the algorithm stopsabstol=1e-8
: absolute tolerance of action gradient to determine convergencereltol=1e-8
: relative tolerance of action gradient to determine convergencemethod = Adam()
: minimization algorithm (seeOptimization.jl
)=0.1
: step size parameter in gradient descent HeymannVandenEijnden implementation.verbose=false
: if true, print additional outputshow_progress=true
: if true, display a progress bar
Optimization algorithms
The method
keyword argument takes solver methods of the Optimization.jl
package; alternatively, the option solver = "HeymannVandenEijnden"
uses the original gMAM algorithm[1].
geometric_min_action_method(
sys::ContinuousTimeDynamicalSystem,
init::Matrix;
maxiter,
abstol,
reltol,
method,
AD,
ϵ,
verbose,
show_progress
) -> MinimumActionPath{_A, _B, _C, Nothing, Nothing, Nothing, Nothing, Nothing} where {_A, _B<:Real, _C}
Runs the geometric Minimum Action Method (gMAM) to find the minimum action path (instanton) from an initial condition init
, given a system sys
and total arc length arclength
.
The initial path init
must be a matrix of size (D, N)
, where D
is the dimension of the system and N
is the number of path points.
For more information see the main method, geometric_min_action_method(sys::CoupledSDEs, x_i, x_f, arclength::Real; kwargs...)
.
Simple geometric minimum action method (sgMAM)
Simplified minimization of the geometric action following Grafke et al. [14]. The simple gMAM reduces the complexity of the original gMAM by requiring only first-order derivatives of the underlying Hamiltonian optimization formulation. This simplifies the numerical treatment and computational complexity.
The implementation below performs a constrained gradient descent assuming an autonomous system with additive Gaussian noise.
CriticalTransitions.sgmam
— Functionsgmam(
sys::SgmamSystem,
x_initial::Array{T, 2};
ϵ,
iterations,
show_progress,
reltol
) -> MinimumActionPath{_A, _B, _C, Nothing, Nothing, Matrix{Float64}, Matrix{Float64}, Matrix{Float64}} where {_A, _B<:Real, _C}
Performs the simplified geometric Minimal Action Method (sgMAM) on the given system sys
. Our implementation is only valid for additive noise.
This method computes the optimal path in the phase space of a Hamiltonian system that minimizes the Freidlin–Wentzell action. The Hamiltonian functions H_x
and H_p
define the system's dynamics in a doubled phase. The initial state x_initial
is evolved iteratively using constrained gradient descent with step size parameter ϵ
over a specified number of iterations. The method can display a progress meter and will stop early if the relative tolerance reltol
is achieved.
The function returns a tuple containing the final state, the action value, the Lagrange multipliers, the momentum, and the state derivatives. The implementation is based on the work of Grafke et al. (2019).
CriticalTransitions.SgmamSystem
— TypeA structure representing a system with Hamiltonian functions Hx and Hp.
This system operates in an extended phase space where the Hamiltonian is assumed to be quadratic in the extended momentum. The phase space coordinates x
are doubled to form a 2n-dimensional extended phase space.
MinimumActionPath
(gMAM) and (sgMAM) return their output as a MinimumActionPath
type:
CriticalTransitions.MinimumActionPath
— Typestruct MinimumActionPath{D, T<:Real, V, Phis, Ahis, Lambda, PV, GPV}
The minimum action path between two points in a D-dimensional phase space.
Fields
path::StateSpaceSet{D, T, V} where {D, T<:Real, V}
: The path matrix.action::Real
: The action value associated to the path.path_history::Any
: The history of action of the paths in the optimisation algorithm (optional).action_history::Any
: The history of action of the paths in the optimisation algorithm (optional).λ::Any
: The Lagrange multiplier parameter for the minimum action path (optional).generalized_momentum::Any
: The generalized momentum of the phase space variables (optional).path_velocity::Any
: The path velocity (optional).
Constructors
MinimumActionPath(
path,
action;
path_history,
action_history,
λ,
generalized_momentum,
path_velocity
)
defined at /home/runner/work/CriticalTransitions.jl/CriticalTransitions.jl/src/largedeviations/MinimumActionPath.jl:29
.
Action functionals
Freidlin-Wentzell action
CriticalTransitions.fw_action
— Functionfw_action(sys::CoupledSDEs, path, time) -> Any
Calculates the Freidlin-Wentzell action of a given path
with time points time
in a drift field specified by the deterministic dynamics f = dynamic_rule(sys)
and (normalized) noise covariance matrix covariance_matrix(sys)
.
The path must be a (D x N)
matrix, where D
is the dimensionality of the system sys
and N
is the number of path points. The time
array must have length N
.
Returns a single number, which is the value of the action functional
$S_T[\phi_t] = \frac{1}{2} \int_0^T || \dot \phi_t - f(\phi_t) ||^2_Q \text{d}t$
where $\phi_t$ denotes the path in state space, $b$ the drift field, and $T$ the total time of the path. The subscript $Q$ refers to the generalized norm $||a||_Q^2 := \langle a, Q^{-1} b \rangle$ (see anorm
). Here $Q$ is the noise covariance matrix normalized by $D/L_1(Q)$, with $L_1$ being the L1 matrix norm.
Geometric Freidlin-Wentzell action
CriticalTransitions.geometric_action
— Functiongeometric_action(sys::CoupledSDEs, path) -> Any
geometric_action(sys::CoupledSDEs, path, arclength) -> Any
Calculates the geometric action of a given path
with specified arclength
for the drift field specified by the deterministic dynamics f = dynamic_rule(sys)
and (normalized) noise covariance matrix covariance_matrix(sys)
.
For a given path $\varphi$, the geometric action $\bar S$ corresponds to the minimum of the Freidlin-Wentzell action $S_T(\varphi)$ over all travel times $T>0$, where $\varphi$ denotes the path's parameterization in physical time (see fw_action
). It is given by the integral
$\bar S[\varphi] = \int_0^L \left( ||\varphi'||_Q \, ||f(\varphi)||_Q - \langle \varphi', \, f(\varphi) \rangle_Q \right) \, \text{d}s$
where $s$ is the arclength coordinate, $L$ the arclength, $f$ the drift field, and the subscript $Q$ refers to the generalized dot product $\langle a, b \rangle_Q := a^{\top} \cdot Q^{-1} b$ (see anorm
). Here $Q$ is the noise covariance matrix normalized by $D/L_1(Q)$, with $L_1$ being the L1 matrix norm.
Returns the value of the geometric action $\bar S$.
Onsager-Machlup action
CriticalTransitions.om_action
— Functionom_action(sys::CoupledSDEs, path, time, noise_strength)
Calculates the Onsager-Machlup action of a given path
with time points time
for the drift field f = dynamic_rule(sys)
at given noise_strength
.
The path must be a (D x N)
matrix, where D
is the dimensionality of the system sys
and N
is the number of path points. The time
array must have length N
.
Returns a single number, which is the value of the action functional
$S^{\sigma}_T[\phi_t] = \frac{1}{2} \int_0^T \left( || \dot \phi_t - f(\phi_t) ||^2_Q + \sigma^2 \nabla \cdot f \right) \, \text{d} t$
where $\phi_t$ denotes the path in state space, $b$ the drift field, $T$ the total time of the path, and $\sigma$ the noise strength. The subscript $Q$ refers to the generalized norm $||a||_Q^2 := \langle a, Q^{-1} b \rangle$ (see anorm
). Here $Q$ is the noise covariance matrix normalized by $D/L_1(Q)$, with $L_1$ being the L1 matrix norm.
For convenience, a general action
function is available where the type of functional is set as an argument:
CriticalTransitions.action
— Functionaction(
sys::CoupledSDEs,
path::Matrix,
time,
functional;
noise_strength
) -> Any
Computes the action functional specified by functional
for a given CoupledSDEs sys
and path
parameterized by time
.
String method
The string method is a technique for finding transition paths between two states in a dynamical system. The method represents the path as a "string" of points that connects the states and evolves it to minimize the drift along the path. The resulting tangent path is parallel to the drift of the system, i.e., the string method computes the heteroclinic orbit. For non-gradient systems (detailed -balance is broken), the heteroclinic orbit differs from the transition path, it does correctly predict, it correctly captures the deterministic dynamics from the saddle point onward ("downhill" portion of the path).
CriticalTransitions.string_method
— Functionstring_method(
sys::Union{Function, SgmamSystem},
x_initial::Matrix;
ϵ,
iterations,
show_progress
) -> Any
Compute the string method for a given system using E et al. (2007).
The string method is an iterative algorithm used to find minimum energy path (MEP) between two points in phase space. It works by evolving a discretized path (string) according to the system's drift while maintaining equal arc-length parametrization between points.
This implementation allows for computation between arbitrary points, not just stable fixed points.
Arguments
sys::SgmamSystem
: The doubled phase space system for which the string method is computedx_initial
: Initial path discretized as a matrix where each column represents a point on the pathϵ::Real
: Step size for the evolution stepiterations::Int64
: Maximum number of iterations for path convergenceshow_progress::Bool
: Whether to display a progress meter during computation
Returns
x
: The final converged path representing the MEP
string_method(
sys::ContinuousTimeDynamicalSystem,
init;
kwargs...
) -> Any
Compute the string method for a given system using E et al. (2007).
The string method is an iterative algorithm used to find minimum energy path (MEP) between two points in phase space. It works by evolving a discretized path (string) according to the system's drift while maintaining equal arc-length parametrization between points.
This implementation allows for computation between arbitrary points, not just stable fixed points.
Arguments
sys::CoupledSDEs
: The system for which the string method is computedx_initial
: Initial path discretized as a matrix where each column represents a point on the pathϵ::Real
: Step size for the evolution stepiterations::Int64
: Maximum number of iterations for path convergenceshow_progress::Bool
: Whether to display a progress meter during computation
Returns
x
: The final converged path representing the MEP