2 Theory of macroscopic exit rates
In the following, a consistent theory about macroscopic quantities based on a membership function is derived. More precisely, the following quantities of interest are discussed:
-
the definition of a macro state via ,
-
the corresponding position-independent exit rate ,
-
the mean holding time , and
-
the reaction direction proportional to the gradient .
Note that computing reaction directions is possible for sets S, too, as described in the introduction. However, for sets we do not get this simple gradient form . The theory in this section is largely based on [20], [3]. We will extend the theory with statements about consistency and use it to support of the interpretation of χ as macro states, as explained in the introduction. The computation of χ will play an important role in our bio-molecular example; see Section 4.
2.1 Defining macro states via membership functions
The starting point in the introduction is that would be a way to define holding times of macro states from a conceptual point of view to be able to interpret as an exit rate. The choice of χ is not arbitrary, but motivated by the necessity of an invariant subspace projection leading to (4.4). At this point, it is not yet shown that when using the solution χ of (4.4) is consistent with the stochastic meaning of a holding probability. We will now demonstrate that it converges to the established definition if χ becomes the indicator function of a set.
We start by recalling some basic definitions. Let the state space Ω of a molecular system comprising N atoms be given as where the position of each individual atom is described by three Cartesian coordinates. Let denote the probability density distribution of states of the nonlinear stochastic dynamics at time t. More precisely, the dynamics is given as a Markov process for which an infinitesimal generator (a differential operator, e. g., the Fokker–Planck operator) can be constructed that captures this time-dependent stochastic process. This operator is linear and describes the infinitesimal propagation of :
It also gives rise to its adjoint generator , which propagates observables instead of state densities. The partial differential equation (4.4) defining χ is formulated in terms of this adjoint. In this regard, χ can also be interpreted as an observable, that is, the measurement of the macro state. To allow for their interpretation as holding probability, we are interested in solutions with corresponding constants .
Assume such χ and are given. We then define the χ-holding probability as
such that (4.4) becomes
Rearranging results in
Due to the relationship
Equation (4.8) can also be represented as follows:
The solution of the partial differential equation (4.10) together with the initial condition
can be given in terms of the Feynman–Kac formula [20], [3], [5]:
This representation allows us to interpret the solution as an expectation over realizations of the stochastic process and, therefore, builds the bridge from an abstract definition to its interpretation as a probability.
To this end, let us consider the case where . The expectation is to be taken over all trajectories starting in . Once any such trajectory leaves the set S the integral becomes infinite and exponential function evaluates to 0. Otherwise, the exponential stays 1, as well as . We therefore recover the definition of classical holding probability in (4.1), that is, the probability to stay in S for time τ at least; see also (9) and (10) in [20], as well as (3.31) in [15].
We summarize this result in the following proposition.
Proposition 4.1.
Let be a solution to (4.4). Then the χ-holding probability approximates the classical holding probability of S:
With regard to this interpretation, is seen as the holding probability of the macro state χ. Due to the separated term in (4.6), the holding probability decreases exponentially with the decay constant . This means that is the exit rate from χ. Since the function value of is interpreted as a holding probability, it is necessary that χ can only take values in the interval [0,1].
The time integral over the holding probability is the mean holding time , which is proportional to the inverse of the exit rate :
The mean holding time immediately leads to a definition of a reaction direction: Following the gradient of increases the time until “a reaction takes place.” Therefore, by defining the reaction direction ,
we obtain a vector field along which the mean holding time decreases uniformly and which is proportional to . This also means that χ itself can be understood as an order parameter, that is, a reaction coordinate for the system. Note that we obtain this time independent result only as a consequence of the initial time separation ansatz for . By integrating curves tangential to , one can obtain reaction paths in Ω. In Section 3, we will make use of the order parameter interpretation to subsample a representative reactive path from a given pool of simulation data.
The possibility of calculating these quantities of interest from (4.4) is a motivation to develop an efficient method for solving this equation. We will now show how to express these quantities in terms of the Koopman operator, before discussing ISOKANN, an algorithm for their computation.
2.2 Membership functions from Koopman operator
So far, the description of χ was based on the infinitesimal generator but a suitable analytical solution of the corresponding partial differential equation (4.4) is not available. However, it is possible to transform (4.4) into an equation for which a constructive solution is possible. We will now show how we can similarly formulate it in terms of the Koopman operator and how we can switch between the formalisms and work out the relation between χ function and eigenfunctions of . The problem of actually computing χ will then be addressed in the next subsection.
The Koopman operator is the time-integral or solution operator of for some lag-time and can be formally defined as . It can also be defined by its action on observable functions :
where the expectation is taken over independent realizations x of the process, starting in . It can be understood as the expected measurement of an observable f after a lag time τ. Being an expectation value its action can be approximated using Monte-Carlo estimates over simulations, making it particularly suitable for applications.
To transform (4.4) into an equation for , we substitute
to arrive at the following equation:
This shows that acts as a shift-scale operator on χ if and only if χ solves (4.4). Making use of the formal exponential representation of and its series expansion, one obtains [20], [3]
Setting
this becomes
So, just as with equation (4.17), acts as a shift-scale if and only if χ is a solution to (4.4).
Noting that we further see that is an eigenfunction of with eigenvalue :
These findings are summarized in the following proposition.
Proposition 4.2.
Let the parameters satisfy their relations above. The following are equivalent:
-
χ solves the ISOKANN problem (4.4).
-
acts as a shift-scale on χ with scale and shift .
-
acts as a shift-scale on χ with scale and shift .
-
is an eigenfunction of with eigenvalue .
The above identities allow us to switch between the infinitesimal generator and Koopman framework. In particular, we can compute the exit rate from the Koopman parameters and :
This allows to estimate the respective constants, for example, the exit rate , by evaluating χ and at sample points and solving the linear regression problem (4.20).
2.3 ISOKANN for computing membership functions
The ISOKANN (Invariant subspaces of Koopman operators learned by a neural network) method [12], [17], [16] is a fixed-point iteration, which combines the use of a neural network for representing the high-dimensional χ function with the Koopman formalism to enable its training on simulation data.
On convergence, it returns χ that solves (4.4), (4.17), and (4.20). Solving the partial differential equations involving directly is not feasible due to the high dimensionality of molecular systems. Molecular simulations on the other hand enable us to estimate the action of on an observable. For this reason, attempts to solve (4.20) by using the action of for the calculation of , where is the ith iterate of χ and is a training point. It approximates the expectation value
by a Monte Carlo estimate over trajectory simulations x starting in different starting points . The next iterate is then given by the shift-scaled :
which is motivated by inverting the shift and scale of (4.20), such that the solution χ to (4.20) is indeed a fixed point. The initial guess is chosen randomly. ISOKANN is based on the power method, an iterative method used to obtain the dominant eigenfunction of a linear operator. In ISOKANN, additional scaling and shifting in each iteration ensures that it does not converge to the constant function, but against the membership function [17]—similar to targeting the second eigenvalue in the inverse power method. In order to represent the iterates , we approximate them by a neural network. The equality assignment in the iteration (4.24) thus becomes a supervised learning problem at data points with labels given by the corresponding right hand side of (4.24) evaluated on the previous generation of the network. The iterations are then terminated by a stopping criterion, which can be either a high correlation coefficient or a small empirical loss , indicating that we found an approximate solution to (4.20).
Assuming infinite data and perfect representation by the neural network, this iteration indeed converges to the solution χ of (4.20) [17] with the smallest rate . It is spanned by the constant eigenfunction with eigenvalue 0 and the second eigenfunction with eigenvalue closest to 0. This solution is unique, if the corresponding eigenvalue is simple. In practice however, for a cluster of low-lying eigenvalues, this routine can result close to one of multiple possible membership functions (each representing one of these slower processes). In that case, the procedure can be repeated and the resulting membership functions can be used to construct an invariant subspace of .
One of ISOKANN’s main benefits is that it avoids discretizing the state space, which is crucial for the application to high-dimensional systems and avoiding the curse of dimensionality [12]. In the ISOKANN algorithm, it is possible to train artificial neural networks by collecting many short-term trajectories of simulation length τ from different starting points in high-dimensional spaces. Thus, ISOKANN can be applied to many independent short-time trajectories or it can even decide where in Ω to enrich simulation data [17]. In our illustrative example, we will apply it to a small number of medium-length trajectories. The resulting χ function will then be used to subsample a reactive path from the data, which leads us to the next section.