C OMPUTING C OMMITTOR F UNCTIONS FOR THE S TUDY OF R ARE E VENTS U SING D EEP L EARNING WITH I MPORTANCE S AMPLING
Anonymous authors
Paper under double-blind review
A BSTRACT
The committor function is a central object of study in understanding transitions between metastable states in complex systems.
However, computing the committor function for realistic systems at low temperatures is a challenging task, due to the curse of dimensionality and the scarcity of transition data.
In this paper, we introduce a computational approach that overcomes these issues and achieves good performance on complex benchmark problems with rough energy landscapes.
The new approach combines deep learning, importance sampling and feature engineering techniques.
This establishes an alternative practical method for studying rare transition events among metastable states of complex, high dimensional systems.
I NTRODUCTION
Understanding transition events between metastable states is of great importance in the applied sciences.
Well-known examples of the transition events include nucleation events during phase transitions, conformational changes of bio-molecules, dislocation dynamics in crystalline solids, etc.
The long time scale associated with these events is a consequence of the disparity between the effective thermal energy and typical energy barrier of the systems.
The dynamics proceeds by long waiting periods around metastable states followed by sudden jumps from one state to another.
For this reason, the transition event is called rare event.
The main objective in the study of rare events is to understand the transition mechanism, such as the transition pathway and transition states (or bottlenecks).
Some numerical methods have been proposed for this purpose, among which the wellknown ones include the nudged elastic band method (J ´ onsson et al., 1998), the string method (E et al., 2002; 2007;
Ren et al., 2005), the action based method (Olender & Elber, 1996), and the transition path sampling technique (Bolhuis et al., 2002; Dellago et al., 2002), accelerated molecular dynamics (Voter, 1997), etc.
One object that plays an important role in understanding the transition event is the committor function.
This is a function which is deﬁned in the conﬁguration or phase space and describes the progress of the transition.
Most of the interesting information regarding the transition can be extracted from the committor function (E et al., 2005;
Ren et al., 2005; E & Vanden-Eijnden, 2010).
For example, the transition states lie in the region where the committor value is around 1 / 2 ; the transition path ensemble and the transition rate can be computed as well, based on the committor function and the equilibrium probability distribution of the system.
The committor function has a very simple mathematical description - it satisﬁes the backward Kolmogorov equation.
However, it is very difﬁcult to compute in practice, due to the curse of dimensionality.
For example, consider a bio-molecule consisting of N atoms, then the equation needs be solved in the conﬁguration space of dimension 3 N .
Traditional numerical approaches, such as ﬁnite difference or ﬁnite element methods, are computationally prohibited even when N = 2 or 3, and obviously out of the question for realistic physical systems.
Alternative methods have been proposed.
In the transition path sampling technique (Bolhuis et al., 2002; Dellago et al., 2002), the committor function is computed using Monte Carlo methods.
In the ﬁnite-temperature string method (Ren et al., 2005), the problem is reformulated as an equivalent variational form, which is minimized in a particular function space.
In the work of Lai & Lu (2018), the Kolmogorov equation for the committor function is solved using a point cloud discretization.
More recently, it is proposed to compute the committor function using neural networks (Khoo et al., 2018).
They obtained satisfactory numerical results for a model problem in 10 dimensions.
The success of this approach hinges on the availability of data, especially in the transition state region where the committor function changes sharply from 0 to 1.
As the term “rare event” suggests, such data is rarely available.
In Khoo et al.
(2018), the data was generated by solving the underlying Langevin dynamics at the physical temperature.
While this works well when the physical temperature is high in which case transitions are easily observed, it becomes less efﬁcient when the temperature is low, i.e. the case of rare events.
In this work, we propose an importance sampling technique to overcome this difﬁculty.
Speciﬁcally, we generate the data from the Langevin dynamics at an artiﬁcial temperature.
This temperature is high enough so that the transition event between the metastable states becomes less rare or even frequent.
This enables us to collect sufﬁcient amount of data in the transition state region.
The difference between the physical temperature and the artiﬁcial temperature is accounted for by the likelihood ratio in the objective function to be minimized.
Furthermore, we introduce a new method to impose the boundary conditions for the committor function, and employ collective variables as the input features for the neural network.
The rest of the paper is organized as follows.
The background and problem formulation is discussed in Section 2.
In Section 3, we introduce the key ingredients of our method, including the method of imposing the Dirichlet boundary conditions, the importance sampling technique, and the neural network architecture.
Numerical results for two examples are presented in Section 4.
Finally, we draw conclusions in Section 5.
B ACKGROUND
The typical starting point of transition modeling is the speciﬁcation of a potential energy function
V : Ω ⊂ R n → R , which takes as inputs the microscopic conﬁguration x of the system (e.g. the positions of the constituent atoms of a bio-molecule).
The subset Ω is the conﬁguration space under consideration.
Through standard statistical mechanics arguments, the probability density of the system’s conﬁguration is determined by the potential energy function V via the Boltzmann-Gibbs distribution
[Equation]
where β = 1 /k B T is the inverse temperature and Z = (cid:82) Ω
e − βV ( x ) dx is the normalization factor, or partition function.
To study dynamical properties, one may consider the noisy gradient ﬂow induced by V in the form of an over-damped Langevin equation:
[Equation]
where η is a white noise.
One can check that (2) has invariant distribution (1).
Through this dynamical model, it is clear how one can then introduce the notion of stability of the system: local minima, or a collection of local minima, of V correspond to metastable conﬁgurations; at low temperatures (large β ), the system will remain in these conﬁgurations for exponentially long times before making transition to another such conﬁguration.
Our principal goal is to study the transition dynamics between two metastable conﬁgurations.
Consider two distinct metastable regions A, B ⊂ Ω , A ∩ B = ∅ .
Consider the ﬁrst hitting times of set A and B
[Equation]
The committor function q : Ω → [0 , 1] is deﬁned by
[Equation]
It can be shown that much of the vital information regarding transition pathways and rates can be extracted from the committor function (E et al., 2005; E & Vanden-Eijnden, 2010).
Hence, an efﬁcient numerical method to compute it for general systems is an important problem in computational chemistry, structural biology and materials science.
We consider the system in the domain Ω \ ( A ∪ B ) since the deﬁnition of q involves the ﬁrst hitting times of the boundary of A and B .
It can be shown that q satisﬁes the backward Kolmogorov equation with Dirichlet boundary condition (Gardiner, 1985),
[Equation]
where ∇ =
( ∂∂x 1 , ..., ∂∂x n ) is the gradient operator, ∆ =
(cid:80) ni
=1 ∂ 2 ∂x
i is the Laplace operator and ∂A ( ∂B ) denotes the boundary of A ( B ).
In addition, we impose the boundary condition ∇ q · n = 0 on ∂ Ω .
The committor function is also the solution to the variational problem
[Equation]
[Equation]
where Z = (cid:82) Ω \ ( A ∪ B )
e − βV ( x ) dx , subject to the condition
[Equation]
[Equation]
The key challenge in using (5) to compute q is the curse of dimensionality: as the dimension n of the conﬁguration x increases, the computational complexity of classical ﬁnite difference and ﬁnite element methods increase exponentially, thereby prohibiting the use of these methods for realistic models.
Although the variational formulation somewhat ameliorate this issue, at low temperatures (large β ), which is often the regime of interest for studying rare transition events, solving (6) becomes more challenging as the measure Z − 1 e − βV becomes more “singular”.
In the next section, we introduce our proposed method of combining deep learning and importance sampling to efﬁciently compute q for high-dimensional systems and at low temperatures.
M ETHODS
Based on the approach introduced in Khoo et al.
(2018), we use a deep neural network q θ , where { θ } are trainable variables, to parameterize the committor function.
Note that since the range of the committor function is [0 , 1] , we use a sigmoid activation for the output layer.
With this parameterization scheme, the variational problem (6) can be posed as an unsupervised learning problem
[Equation]
with p β ( x ) =
Z − 1 e − βV ( x ) being the equilibrium distribution.
To solve (8), training data following the equilibrium distribution p β are sampled by taking snapshots from long trajectory of the Langevin dynamics (2),
Below, we outline the three main novel aspects of our approach: 1) a network structure that deals naturally with the boundary condition (7); 2) an importance sampling technique that allows for the efﬁcient computation of committor functions at low temperatures, which is important for studying transition events; and 3) Using collective variables as a form of crude feature selection to improve the efﬁciency of learning.
3. B OUNDARY C ONDITIONS
To handle boundary conditions, Khoo et al.
(2018) proposed adding a penalty term enforcing (7) into the functional to be minimized to obtain the augmented problem arg min θ
[Equation]
(9) where λ is a parameter controlling the magnitude of the penalty terms, µ ∂A and µ ∂B are the equilibrium distribution restricted on ∂A and ∂B , respectively.
While this is straightforward to implement, the introduction of an additional penalty parameter may require more tuning.
Instead, we proceed differently by introducing a different parameterization of q θ that naturally satisﬁes the boundary conditions (7).
Concretely, we consider the composite form
[Equation]
Here χ A ( x ) and χ B ( x ) are two given smooth functions such that
[Equation]
where A (cid:15) and B (cid:15) are two sets expanded from A and B ,
[Equation]
Away from ∂A and ∂B , χ A and χ B changes smoothly from 1 to 0 in a region of width (cid:15) , respectively.
The function q ( x ) of the form in (10) strictly satisﬁes the boundary conditions (7) and agrees with ˜ q outside A (cid:15) and B (cid:15) ,
[Equation]
(cid:15)
[Equation]
We then use a deep neural network to parameterize the function ˜ q , hence approximating the committor function q ( x ) as
[Equation]
where { θ } are trainable variables of the neural network.
Thus, the constrained minimization problem (8) reduces to an unconstrained problem
[Equation]
where q θ ( x ) takes the form (14).
Consequently, only the data following the stochastic process (2) is needed to train the neural network.
3. I MPORTANCE S AMPLING
Another challenging problem is the sampling of p β at low temperature T (large β ).
Naive sampling using the dynamics (2) at low temperatures yields very few transition events and hence the distribution p β is not explored well enough to solve (15).
Speciﬁcally, with very few observed transition events, the majority of the sampled data will be clustered near the metastable states A and B , with very few distributed in the region of our interest, i.e. the transition state region which lies in between
A and B .
This will lead to a poor estimate of the committor function.
To address this problem, we consider another form of the problem (15)
[Equation]
(16) where Z (cid:48)
= (cid:82) Ω \ ( A ∪ B )
e − β (cid:48)
V ( x ) dx is the normalization factor and β (cid:48)
= 1 /k B T (cid:48) , with T (cid:48) > T .
Solving the new problem (16) requires sampling of p β (cid:48)
( x ) =
Z (cid:48)− 1 e − β (cid:48)
V ( x ) by simulating the
Langevin dynamics (2) at the high temperature T (cid:48) .
This becomes much more efﬁcient when T (cid:48) is sufﬁciently large, as energy barriers are much easier to cross at higher temperatures.
In essence, this is a form of importance sampling, and the function e − ( β − β (cid:48) )
V ( x ) is the likelihood ratio associated with the change of measure.
Note that the choice of importance sampling measure p β (cid:48) is not arbitrary.
Its purpose is to produce enough sample points in the a priori unknown transition region for us to estimate the committor function at low temperature T .
Generic sampling measures (e.g. uniform) will not achieve this goal in moderately high dimensions.
3. C OLLECTIVE V ARIABLES
Very often, only a few coarse-grained variables, called the collective variables and denoted by ( z 1 ( x ) , z 2 ( x ) , ...,
z m ( x )) with m (cid:28) n , play a major role in the transition event.
For example, in conformational changes of bio-molecules, it is often that only a few torsion or bond angles participate the transitions between metastable states.
In this situation, the committor function, being the reaction coordinate for the transition, depends only on these collective variables
[Equation]
This is a form of dimensional reduction or feature engineering, and the choice of { z i } often allows one to build some degree of physical knowledge into the parameterization of q .
For the alanine dipeptide example to be discussed in the next section, we shall make use of collective variables in the design of the ﬁrst input transformation layer.
The architecture of the network is summarized in Figure 1.
N UMERICAL R ESULTS
We demonstrate the effectiveness of the proposed numerical method using two benchmark problems: one is the Mueller potential extended to high dimensions, the other is the isomerization of alanine dipeptide.
4. E XTENDED M UELLER P OTENTIAL
We ﬁrst consider the Mueller potential embedded in the 10 -dimensional ( 10 D) space (Khoo et al., 2018),
[Equation]
(18) where V m ( x 1 , x 2 ) is the rugged Mueller potential in two dimensions (2D), V m ( x 1 ,
[Equation]
and a harmonic potential is used in each of the other eight dimensions.
The parameters γ and k control the roughness of the energy landscape, and σ controls the scale of the quadratic terms.
In this example, we use γ = 9 , k = 5 , σ = 0 . 05 .
The other parameters are taken from Lai & Lu (2018).
We ﬁrst use the ﬁnite element method (FEM) to solve the backward Kolmogorov equation (5) for the 2D rugged Mueller potential V m on ˜ Ω
= [ − 1 . 5 , 1] × [ − 0 .
5 , 2] by the solver FreeFem++ (Hecht, [Table]
The numerical solution is denoted by q m .
We ignore the discretization error in q m (which is on the order of 10 − 5 ) and treat it as the “exact” solution.
Then the “exact” solution for the committor function in 10 D is given by q ( x ) =
q m ( x 1 , x 2 ) , x ∈ Ω = { x : ( x 1 , x 2 ) ∈ ˜Ω , x ∈ R 10 } .
Figure(left panel) shows the contour plots of the 2 D rugged Mueller potential and the committor function q m at k B T = 10 (the energy barrier from A to B is about 100 ).
Next, we compute the committor function in the 10 D space using the method proposed in section 3.
The Mueller potential (19) has two local minima around a ≈ ( − 0 .
558 , 1 . 441) and b ≈ (0 . 623 , 0 . 028) , respectively.
We take the two metastable sets A and B as the cylinders centered at ( x 1 , x 2 ) = a and ( x 1 , x 2 ) =
b respectively, each with radius r = 0 . 1 .
The function χ A ( x ) is constructed as
[Equation]
with δ = 0 .
02 and similarly for χ B ( x ) .
These two functions satisfy (11) approximately.
We generate the data at the artiﬁcial temperature k B T (cid:48)
= 20 by solving the Langevin equation (2) using the Euler-Maruyama scheme with time step ∆ t = 10 − 5 .
We take one sample for everytime steps, and only keep those data points with coordinates x ∈ Ω \ ( A ∪ B ) .
Of these data, 70% and 30% serve as the training and validation dataset respectively.
The neural network used in this example is fully connected, and the hyperbolic tangent (tanh) function is used as the activation function in the hidden layers.
We take the batch size as 10 5 and use the package Tensorﬂow (Abadi et al., 2016) with Adam optimizer (Kingma & Ba, 2014) to train the network at the physical temperature k B T = 10 .
To quantitatively evaluate our results, we compare the committor function q θ obtained using the neural network with the FEM result q .
For rare events considered here, the committor function near the transition state region (i.e. the region near the minima of V ( x ) on the iso-surface where q ≈ 1 / 2 ) is of our interest, since this region represents the bottlenecks to the transition.
The committor function in this region is also the most difﬁcult to compute, as data here is typically scarce.
Therefore, we shall focus our evaluation of the numerical results in this region.
To this end, we carry out the constrained sampling in the transition state region by simulating the dynamics
[Equation]
[Equation] where the additional potential V q ( x ) = 12 κ ( q θ ( x ) − 12 ) 2 with κ = 3 × 10 4 is to constrain the system on the 1 / 2 -isocommittor surface Γ 1 / 2 = { x ∈ Ω : q θ ( x ) = 1 / 2 } .
After equilibration, we sampled 100 points.
These points, projected on the ( x 1 , x 2 ) plane, are shown in Figure 2 (middle and right panels).
The region where these points are clustered is the transition state region.
Also shown in
Figure 2 (middle and right panels) is a comparison of the 1 / 2 -isosurface of q θ with that obtained from the FEM calculation.
Evidently these two agree well in the transition state region.
Certain discrepancy occurs away from the transition state region, due to the lack of training data there; nevertheless, those regions are irrelevant to the transition events.
We also computed the root-mean-square error (RMSE) and mean-absolute error (MAE) between q θ and the FEM solution at the sampled 100 transition states.
The results are reported in Table 1.
The errors are based on 10 independent computations.
We observe that the numerical results are insensitive to the number of hidden layers, but the accuracy improves for larger set of training data.
−1. −1.
−0.
0.5 x 1 −0.
x
A
B 0.
−1. −1.
−0.
0.5 x 1 −0.
x
A
B
NNFEM −1.
−1.
−0.
0.5 x 1 −0.
x
A
B
NNFEM
[Figure]
4. A LANINE D IPEPTIDE
In this example, we study the isomerization process of the alanine dipeptide in vacuum at T = 300 K .
The isomerization of alanine dipeptide has been the subject of several theoretical and computational studies (Apostolakis et al., 1999; Bolhuis et al., 2000; Ma & Dinner, 2005; Ren et al., 2005), therefore it serves as a good benchmark problem for the proposed method. The molecule has a simple chemical structure, yet it exhibits some of the important features common to biomolecules. Figure 3 shows the stick and ball representation of the molecule (left panel) and its adiabatic energy landscape on the plane of the two backbone torsion angles φ and ψ .
There are two metastable conformers C 7 eq and C ax located at ( − 85 ◦ , 75 ◦ ) and (72 ◦ , − 75 ◦ ) , respectively.
Accordingly, the metastable sets A and B are chosen as
[Equation]
Our goal is to compute the committor function and then sample the transition states at the temperature T = 300 K .
To generate the training data, we raise the temperature to T (cid:48)
= 800 K , and use the parallel molecular dynamics package NAMD (Phillips et al., 2005) to simulate the Langevin dynamics of the molecule.
We run 10 8 steps with the time step ∆ t = 2 fs, and sample one data for every 100 steps.
Figure 4 shows the distribution of the sampled data points on the ( φ, ψ ) plane (right panel).
As a comparison, we also run the dynamics at the physical temperature T = 300 K , and plot the distribution of the sampled data (left panel).
It is seen that at the temperature T = 300 K , no transition from C 7 eq to C ax is observed within the simulation time; consequently, no training data is collected in the transition state region, the region of our interest.
This demonstrate the beneﬁt of the importance sampling technique proposed in this work.
Next, we discuss feature engineering via collective variables.
It is known that, very often the conformational changes of bio-molecules can be adequately described by a few collective variables such as torsion angles.
Using this information, we design the ﬁrst layer of our network to extract 9 such torsion angles from the molecule, whose sines and cosines are then fed into the hidden layers as extracted features.
Note that these include the four torsion angles identiﬁed in Maragliano et al.
(2006) as approximately adequate in describing the transition, but we do not a priori assume that we know this precise information, and a redundant description is supplied.
The results shown below were obtained using two million data points sampled outside A and B at
T (cid:48)
= 800 K .
These data are equally split into the training and validation sets.
We ﬁrst train the network at T (cid:48)
= 800 K by setting the likelihood ratio equal to 1.
Then we use the result as the initial network to compute the committor function at T = 300 K .
The training of the network is done by using the Adam optimizer with batch size 5 × 10 5 .
The computation is terminated when the validation error no longer decreases.
For this high-dimensional problem, we cannot afford to compute the committor function using the
FEM method as we did in the ﬁrst example.
In order to check the accuracy of the numerical results, in particular, whether the 1 / 2 -isocommittor surface really locates the transition states, we carry out the constrained Langevin dynamics simulation on the 1 / 2 -isocommittor surface at T = 300 K .
Following the dynamics, we collect 100 states.
The committor values of these states are computed directly using the Monte Carlo method.
Speciﬁcally, we generate 200 trajectories initiating from each of states with random initial velocities and estimate the probabilities (i.e. committor values) of the system reaching B before A (c.f. (4)).
If adequate accuracy is achieved, we would expect the computed probabilities to cluster around 1 / 2 .
Figure 5 shows the resulting distribution of the committor values, which conﬁrm the efﬁciency and accuracy of our method.
C ONCLUSION
In this paper, we introduced a method of computing the committor function at low temperatures, which characterizes rare transition events between metastable states.
The main idea is to combine deep learning with importance sampling and feature engineering in order to overcome the curse of dimensionality associated with realistic systems and the scarcity of transition events at low temperatures.
Our method is demonstrated to be effective on a relatively simple example involving the rugged Mueller potential, as well as a more complex benchmark example of the alanine dipeptide molecule.
This provides an alternative approach to study complex systems with rough energy landscapes