Unexpected Performance of L=2 Model in Liquid Water Training #859
-
Hi, I've been training a model for liquid water using the following parameters, varying srun -n 4 mace_run_train \
--name="L1_3" \
--train_file="../../dataset/train_configs.xyz" \
--valid_file="../../dataset/test_configs.xyz" \
--test_file="../../dataset/test_configs.xyz" \
--config_type_weights='{"Default":1.0}' \
--model="MACE" \
--E0s='{1:-13.4131335925908, 8:-429.4668907468319}' \
--max_L=1 \
--r_max=5.0 \
--num_interactions=2 \
--correlation=3 \
--max_ell=3 \
--valid_batch_size=4 \
--batch_size=4 \
--max_num_epochs=200 \
--energy_key='energy' \
--forces_key='forces' \
--swa \
--start_swa=160 \
--ema \
--ema_decay=0.99 \
--amsgrad \
--num_workers=1 \
--restart_latest \
--device=cuda \
--seed=3926 \
--distributed I trained four equivalent models with different seeds for both Best L=1 Model Performance:
Best L=2 Model Performance:
While Do you have any insights into why this might be happening? Best, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 12 replies
-
Dear @cesaremalosso, the performance improvement between L=1 and L=2 is system dependent. Usually we see more performance gain for systems that are quite hard to fit. Your system seems quite easy to fit looking at your errors, so I am not too surprised. To rule out any other potential problems, can you share the log files for the two model training so I can check everything is working at intended. |
Beta Was this translation helpful? Give feedback.
-
Your models both look quite good. The fact that your validation error is so much lower than your training error suggests that your validation set is not representative or that it is quite small. The validation set (and the error on it) is used to select the best model to save, so I recommend that you make your validation set bigger (you can even set up a separate file with more configs than your training set). Your force errors look excellent. You might also want to play around with the energy weights in the second stage of the training (swa), making those weights higher will give you better energies. where does your training set come from? if it's all md with an ab initio or force field model, then I also recommend doing a round of iterative training, i.e. run an md with your mace model and collect some configurations from that and add them to the training. finally, your cutoff radius is 5, which is fine, but you will get a better water model (e.g. better densities) if you use 6. Remember that the current version of mace is a short range model, altogether the receptive field is num_interaction*cutoff so all the electrostatics that you are capturing is implicit in that. you will find that raw energy and force errors although are important, aren't the only thing that signify a good or bad model. look at the predicted density for example. |
Beta Was this translation helpful? Give feedback.
Dear @cesaremalosso, the performance improvement between L=1 and L=2 is system dependent. Usually we see more performance gain for systems that are quite hard to fit. Your system seems quite easy to fit looking at your errors, so I am not too surprised.
To rule out any other potential problems, can you share the log files for the two model training so I can check everything is working at intended.