Training Stability Issue on Single-Element DFT Dataset (LeMaterials) with Variable Structure Sizes

#4
by NoorAldinAlz - opened

Hi all,

I'm training a machine learning interatomic potential using the LeMaterials dataset, which contains 61 DFT-calculated structures for one element. Each structure has a single frame, with total energy and atomic forces. The number of atoms varies significantly across the structures.

During training, I’m observing significant fluctuations in the energy and force loss , even though all data was generated consistently using the PBE functional.

I’ve already tried:

Lowering the learning rate
Gradually ramping the force and energy weights in the loss function
…but the loss still shows unstable behavior.

I'm looking for best practices or strategies to stabilize training when working with:
Variable-size structures
Total energy per frame

Any insights into how to better handle this type of dataset ? would be greatly appreciated.

Thanks!

LeMaterial org

Hi @NoorAldinAlz ,

Nice to hear that you're training models on LeMat-Bulk! Can you clarify what you mean by training instability? Also is there a specific reason why you're using LeMat-Bulk for training an MLIP? It would be more useful to train a generative model for instance as all structures in this dataset are relaxed by DFT meaning that they have near-0 force norms almost systematically. This might explain difficulty in correctly learning forces during your training. Trajectories datasets are more suitable and designed for this task, you can take a look at LeMat-Traj for example or any other trajectory dataset on bulks.

The instability you're observing might be due to the way you are normalizing the total energy values. Common practice in training MLIPs is to remove the reference energies from the total energy and predict a per-atom formation energy. How you fit those reference energies will depend on you but it is recommended to minimize the formation energy residual (the other alternative is to compute it from the dataset itself and look for single atom structures).

The variable-sized structures should not be an issue for training as long as you're averaging your forces predictions in the loss computation.

Let us know if you have any additional questions!

Hi Ramlaoui, thanks for the helpful insights!

By training instability, I meant that the energy and force losses fluctuate quite a bit during training. The force loss in particular is unstable, probably due to the near-zero forces in LeMat-Bulk, as you mentioned.

You're absolutely right that a trajectory dataset like LeMat-Traj would be more suitable. My original idea was to try transfer learning: taking a potential trained on cheaper data and fine-tuning it on DFT-relaxed structures like LeMat-Bulk to improve energy accuracy.

I’m still learning how to properly handle energy. Since the tool I'm using trains on total energies, atomic forces, and local atomic coordinations, I’ll look into the right way to preprocess the data and normalizing.

Also, Is it possible to filter and download only the structures in the LeMat-Traj dataset that contain a single element and no other elements, while also keeping different structural configurations separated?

Thanks again for pointing me.

Best,
Noor

Sign up or log in to comment