7
$\begingroup$

I have tried to use VASP's machine learning force field calculation during running molecular dynamics simulation with a supercell including some elements of Ti, O, Cu, etc. It does increase the speed dramatically, but I am wondering if I could use the generated force field in other calculations.
For example, I want to simulate a new supercell including elements of Fe, Ti, O, etc. According to the vasp wiki website, It is permissible to change the number of atoms or even to add new elements, when the training is continued.
My question is:
If I train the force field every time I run a new molecular simulation, no matter what elements I am using. Is it possible to build a force field that suits all elements? Or it is gonna fall into some trap of overfitting?

$\endgroup$
7
  • 4
    $\begingroup$ ML force fields often transfer poorly. Not only between different elements, which often doesn't work at all, but even between different configurations of the same element. If you do simulations which sample vastly different configurations than ones you've already seen, then the ML will likely do very poorly. I assume VASP will fall back to DFT or whatever model you are using as a reference in that case. I don't see any reason why you shouldn't just always keep training the model when you run simulations, but don't expect that your model will transfer well between very different systems. $\endgroup$
    – jheindel
    Commented May 25, 2022 at 16:24
  • 2
    $\begingroup$ Another thing to be aware of is that some ML models have been known to "forget" things over time. That is, if you continue training the same set of weights on vastly different configurations for a very long time, certain types of neural networks will lose accuracy on predictions of configurations it used to predict well. This is dependent on the type of network and lots of other details, so this may or may not be a problem for you, but in principle it could matter. Typically this only happens if the network doesn't have enough parameters to "remember" all the information it's seen. $\endgroup$
    – jheindel
    Commented May 25, 2022 at 16:31
  • $\begingroup$ @jheindel. Is there any open-source project that focuses on the transferability of machine-learned force fields? $\endgroup$
    – Jack
    Commented May 26, 2022 at 3:41
  • 1
    $\begingroup$ The colabfit project (colabfit.github.io/colabfit-tools/html/index.html) aims to provide such a framework. $\endgroup$ Commented May 26, 2022 at 7:39
  • 1
    $\begingroup$ In addition to the previous remarks, you will have scaling issues: you have to represent all the information in your network, and you need a large enough parameter space to do so. ML models scales poorly when you start introducing new chemical environments/elements, so an “all element forcefield” with the present methods is very impractical. $\endgroup$
    – Greg
    Commented May 27, 2022 at 15:20

2 Answers 2

1
$\begingroup$

The comments, especially those by jheindel, seem to be enough of an answer. Tyberius said:

"@jheindel I agree with Nike, I think those comments could reasonably be converted to an answer."

jheindel:

"ML force fields often transfer poorly. Not only between different elements, which often doesn't work at all, but even between different configurations of the same element. If you do simulations which sample vastly different configurations than ones you've already seen, then the ML will likely do very poorly. I assume VASP will fall back to DFT or whatever model you are using as a reference in that case. I don't see any reason why you shouldn't just always keep training the model when you run simulations, but don't expect that your model will transfer well between very different systems."

"Another thing to be aware of is that some ML models have been known to "forget" things over time. That is, if you continue training the same set of weights on vastly different configurations for a very long time, certain types of neural networks will lose accuracy on predictions of configurations it used to predict well. This is dependent on the type of network and lots of other details, so this may or may not be a problem for you, but in principle it could matter. Typically this only happens if the network doesn't have enough parameters to "remember" all the information it's seen."

Raghunathan Ramakrishnan:

"The colabfit project (colabfit.github.io/colabfit-tools/html/index.html) aims to provide such a framework."

Greg:

"In addition to the previous remarks, you will have scaling issues: you have to represent all the information in your network, and you need a large enough parameter space to do so. ML models scales poorly when you start introducing new chemical environments/elements, so an “all element forcefield” with the present methods is very impractical."

$\endgroup$
1
$\begingroup$

Since this question was asked, several all-elements, or "universal", machine-learning force fields have been published. These include M3GNet, CHGNet, and MACE. Several semi-universal force fields encompassing a subset of elements are also published, such as ANI focusing on organics and more recently BAMBOO for liquids. Most of these are pre-trained neural networks of varying complexity and architecture. The field is lively enough that the list is probably not exhaustive.

A few general notes are perhaps worth mentioning with respect to these:

  • While they are trained on a specific DFT functional each, it is possible to fine-tune them to make a switch. For example, CHGNet is based on PBE/PBE+U, but it is possible to fine-tune at the meta-GGA level for a specific system of interest. However, architecture can not be changed within one framework and will likely limit errors within a framework even with perfect and abundant fine-tuning.
  • Like all neural nets, these are not universally stable. For example, CHGNet and MACE (at least) were trained on Materials Project data. They will still break if, for example, a molecular dynamics run takes them far enough out of their training data. Fine-tuning can help.
  • To my knowledge, none of these deal with magnetism; CHGNet can take magnetic moments as input, but includes an absolute value somewhere in the layers, so will not distinguish an antiferromagnetic configuration from a ferromagnetic one.
  • More to the point of the original question, none of these were trained with VASP's engine, which is based, to within reasonable approximation, on Gaussian process regression (GPR). This is because GPR does not scale well with the number or diversity of training structures: its runtime (inference) memory requirements grow with the pool of training structures. For neural nets, that is not a limitation since the weights are fixed for inference once training is completed and only the network size and structure determine inference speed. To my knowledge there has been no implementation, in VASP or elsewhere, of considering the chemical element as an "alchemical" degree of freedom in GPR.
$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .