  We introduce a machine learning-based approach called ab initio generalized
Langevin equation (AIGLE) to model the dynamics of slow collective variables in
materials and molecules. In this scheme, the parameters are learned from
atomistic simulations based on ab initio quantum mechanical models. Force
field, memory kernel, and noise generator are constructed in the context of the
Mori-Zwanzig formalism, under the constraint of the fluctuation-dissipation
theorem. Combined with deep potential molecular dynamics and electronic density
functional theory, this approach opens the way to multi-scale modeling in a
variety of situations. Here, we demonstrate this capability with a study of two
mesoscale processes in crystalline lead titanate, namely the field-driven
dynamics of a planar ferroelectric domain wall, and the dynamics of an
extensive lattice of coarse-grained electric dipoles. In the first case, AIGLE
extends the reach of ab initio simulations to a regime of noise-driven motions
not accessible to molecular dynamics. In the second case, AIGLE deals with an
extensive set of collective variables by adopting a local approximation for the
memory kernel and retaining only short-range noise correlations. The scheme is
computationally more efficient than molecular dynamics by several orders of
magnitude, and mimics the microscopic dynamics at low frequencies where it
reproduces accurately the dominant far-infrared absorption frequency.
