  Understanding and accurately predicting hydrogen diffusion in materials is
challenging due to the complex interactions between hydrogen defects and the
crystal lattice. These interactions span large length and time scales, making
them difficult to address with standard ab initio techniques. This work
addresses this challenge by employing accelerated machine learning (ML)
molecular dynamics simulations through active learning. We conduct a
comparative study of different ML-based interatomic potential schemes,
including VASP, MACE, and CHGNet, utilizing various training strategies such as
on-the-fly learning, pre-trained universal models, and fine-tuning. We obtain
an optimal hydrogen diffusion coefficient value of \(2.1 \cdot 10^{-8}\)
m\(^2\)/s at 673 K in MgH\(_{0.06}\), which aligns exceptionally well with
experimental results, underlining the efficacy and accuracy of ML-assisted
methodologies in the context of diffusive dynamics. Particularly, our procedure
significantly reduces the computational effort associated with traditional
transition state calculations or ad-hoc designed interatomic potentials. The
results highlight the limitations of pre-trained universal solutions for
defective materials and how they can be improved by fine-tuning. Specifically,
fine-tuning the models on a database produced during on-the-fly training of
VASP ML force field allows the retrieving of DFT-level accuracy at a fraction
of the computational cost.
