Skip to main content
QUICK REVIEW

[Paper Review] A Note on Learning Rare Events in Molecular Dynamics using LSTM and Transformer

Wenqi Zeng, Siqin Cao|arXiv (Cornell University)|Jul 14, 2021
Machine Learning in Materials ScienceMaterials Science20 references15 citations
TL;DR

This paper investigates the limitations of LSTM and Transformer models in learning rare events from high-dimensional molecular dynamics (MD) trajectories. It shows that temporal resolution and state partitioning are critical: coarse-graining conformational space into metastable states and removing recrossing events significantly improve slow dynamics prediction, while both models fail to disentangle fast from slow dynamics without such preprocessing.

ABSTRACT

Recurrent neural networks for language models like long short-term memory (LSTM) have been utilized as a tool for modeling and predicting long term dynamics of complex stochastic molecular systems. Recently successful examples on learning slow dynamics by LSTM are given with simulation data of low dimensional reaction coordinate. However, in this report we show that the following three key factors significantly affect the performance of language model learning, namely dimensionality of reaction coordinates, temporal resolution and state partition. When applying recurrent neural networks to molecular dynamics simulation trajectories of high dimensionality, we find that rare events corresponding to the slow dynamics might be obscured by other faster dynamics of the system, and cannot be efficiently learned. Under such conditions, we find that coarse graining the conformational space into metastable states and removing recrossing events when estimating transition probabilities between states could greatly help improve the accuracy of slow dynamics learning in molecular dynamics. Moreover, we also explore other models like Transformer, which do not show superior performance than LSTM in overcoming these issues. Therefore, to learn rare events of slow molecular dynamics by LSTM and Transformer, it is critical to choose proper temporal resolution (i.e., saving intervals of MD simulation trajectories) and state partition in high resolution data, since deep neural network models might not automatically disentangle slow dynamics from fast dynamics when both are present in data influencing each other.

Motivation & Objective

  • To investigate the performance of LSTM and Transformer models in learning rare events from molecular dynamics (MD) trajectories.
  • To identify key factors affecting the accuracy of deep learning models in capturing slow dynamics in complex stochastic systems.
  • To evaluate the impact of reaction coordinate dimensionality, temporal resolution (saving interval), and state partitioning on model performance.
  • To compare the effectiveness of LSTM and Transformer in handling high-dimensional MD data with mixed fast and slow dynamics.
  • To propose preprocessing strategies—such as kinetic lumping and recrossing removal—that enhance model learning of rare events in MD simulations.

Proposed method

  • Projected MD trajectories of alanine dipeptide onto 2D reaction coordinates (φ, ψ) and used RMSD-based clustering for high-dimensional state partitioning.
  • Trained LSTM and Transformer models on sequential state transitions using cross-entropy loss to learn path entropy and kinetics.
  • Varied saving intervals (0.1 ps, 1 ps, 2 ps, 10 ps) to assess temporal resolution effects on model performance.
  • Applied kinetic lumping and recrossing removal to reduce noise from fast dynamics and enhance slow dynamics signal in state-space representations.
  • Used bidirectional and unidirectional encoding in Transformers, with triangular masking to simulate unidirectional behavior.
  • Evaluated models using mean first passage time (MFPT), first passage time distribution, and implied timescale (ITS) comparisons against reference MD data.

Experimental results

Research questions

  • RQ1How does the temporal resolution (saving interval) of MD trajectories affect LSTM and Transformer performance in learning slow dynamics?
  • RQ2What role does the dimensionality of the reaction coordinate play in the ability of deep learning models to capture rare events?
  • RQ3Can state partitioning and recrossing removal improve the accuracy of slow dynamics prediction by LSTM and Transformer?
  • RQ4Does the attention mechanism in Transformers provide a performance advantage over LSTM in learning long-term dynamics from high-dimensional MD data?
  • RQ5To what extent can LSTM and Transformer models automatically disentangle slow dynamics from fast dynamics in raw MD trajectories?

Key findings

  • LSTM performance degrades significantly at 0.1 ps saving interval due to mixing of fast and slow dynamics, despite accurate free energy landscapes.
  • At 10 ps saving interval, insufficient data volume limits model learning, leading to poor prediction of slow dynamics.
  • LSTM successfully predicts free energy landscapes and dynamics at 1 ps and 2 ps intervals, but fails at 0.1 ps and 10 ps due to noise and data scarcity, respectively.
  • Transformer models do not outperform LSTM in slow dynamics prediction, even with bidirectional attention, due to limited sequence length (100 tokens) and inability to handle long-range dependencies effectively.
  • Removing recrossing events and applying kinetic lumping to state partitions significantly improve both LSTM and Transformer performance on high-dimensional RMSD-based data.
  • The combination of proper temporal resolution and state partitioning is essential—deep learning models cannot automatically disentangle slow from fast dynamics without such preprocessing.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.