Using an Autoencoder for Dimensionality Reduction in Quantum Dynamics

. A key step in performing quantum dynamics for a chemical system is the reduction of dimensionality to allow a numerical treatment. Here, we introduce a machine learning approach for the (semi)automatic construction of reactive coordinates. After generating a meaningful data set from trajectory calculations, we train an autoencoder to ﬁnd a low-dimensional set of non-linear coordinates for use in molecular quantum dynamics. We compare the wave packet dynamics of proton transfer reactions in both linear and non-linear coordinate spaces and ﬁnd signiﬁcant improvement for physical properties like reaction timescales.


Introduction
Quantum dynamics is a powerful computational tool to study (photo)chemical processes happening on a femto-to picosecond timescale. The time-dependent Schrödinger equation (TDSE) describes the quantum mechanical motion of the atomic nuclei, where the Hamil-tonianĤ acting on the wave function Ψ contains the kinetic and the potential energy of the system. The TDSE is commonly solved on a discrete spatial grid which is constructed by displacing a molecular geometry along predefined reactive coordinates. Including more and more degrees of freedom, the number of grid points scales exponentially, a challenge known as the curse of dimensionality. Without serious approximations, this means for example that a full-dimensional quantum mechanical representation of the internal motion of a small organic molecule is already out of reach in terms of computational effort. This issue can be addressed by transitioning from full dimensionality to a low-dimensional subspace of internal coordinates that cover a large proportion of the process in question. The prevalent way to construct such a subspace is the manual selection of either pure normal modes or linear combinations thereof. Although tried and tested [2,4], this procedure relies heavily on the chemical intuition of the researcher and requires a high amount of a priori knowledge of the molecular system. The first step to automate this process is the generation of a data set based on semiclassical trajectories. We introduce two coordinate reduction schemes [5,6] to evaluate these data sets and provide an automatic alternative to manual coordinate construction.

Data Set Generation
The preparation of a meaningful data set is always a challenge in a machine learning project. There are many different approaches to produce the training data set for chemical problems. Since we are interested in the temporal evolution of the system, one possible way is to use semiclassical trajectories to sample the accessible space for the process in question. The trajectories are started from the intrinsic reaction coordinate (IRC) or in general from any minimum energy path (MEP). Using the IRC/MEP has the advantage, that it is one of the most easily available sources of information about a chemical reaction. To generate data points, we cannot simply let trajectories run along the IRC/MEP, because they will follow its descent and not explore the space orthogonal to it. Using a constraint algorithm, the motion along a certain direction can be restricted. These constraints can introduce spurious rotations and translations, which must be removed. For an efficient sampling the trajectories are initialized from points along the IRC/MEP with random momentum orthogonal to this path. In order to avoid redundancy in the data set, a minimum full-dimensional Euclidean distance between the points is enforced. With this approach [5,6] we ensure that the sampling covers both the desired reaction path itself as well as its vicinity in all accessible dimensions. Figure 1 shows a projection of trajectory data points (corresponding to different geometries) produced by the described procedure together with the IRC of an example reaction. The orthogonality of the trajectories to the IRC is clearly visible.

Coordinate Construction
The obtained data set can be used directly by dimensionality reduction algorithms. In this work, we present both the construction of linear coordinates [5] by means of a principal component analysis (PCA) and the generation of nonlinear coordinates [6] with an autoencoder.
For the former, the basic idea is to apply a PCA to the data set and extract the degrees of freedom with the largest molecular motion. PCA is already being employed in molecular dynamics to extract so called essential dynamics of larger systems, in particular proteins. Here, the dimensionality reduction is a helpful tool for interpretation and allows a reduction of computational cost [1,3]. One of the drawbacks of linear coordinates is that chemical processes often involve complex deformations which would require a large number of purely linear coordinates to resolve. Non-linear coordinate spaces typically allow the use of fewer dimensions to investigate the same reactions. In this context, an autoencoder (Fig. 2) provides a convenient way to reduce the dimensionality of a chemical problem to a small number of the most relevant non-linear coordinates. The autoencoder is trained to reproduce the Cartesian coordinates of the trajectory data set. After training is completed, an equidistant grid is constructed in the low-dimensional space of the code layer. Using the decoder part of the neural network, this latent grid is projected onto the Cartesian space to generate a grid of molecular coordinates. The amount of non-linearity contained in the resulting grid can be tuned by employing different activation functions in the neural network. Both the potential and the kinetic energy are evaluated on this resulting grid, enabling the numerical solution of the TDSE (1). To compare both approaches for automatic coordinate construction, we focus on proton transfer reactions in small organic molecules. Figure 3 illustrates two-dimensional potential energy surfaces for the proton transfer reaction in (Z)-Chloromalonaldehyde, constructed in a linear and a non-linear coordinate space. It is discernible from the compressed shape of the left potential that two linear coordinates cover less of the reactive space than two non-linear coordinates. In this case, a third linear coordinate would be necessary to yield a potential comparable to that in a two-dimensional non-linear subspace.
Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.