mir-group / nequip

NequIP is a code for building E(3)-equivariant interatomic potentials
https://www.nature.com/articles/s41467-022-29939-5
MIT License
565 stars 124 forks source link

❓ [QUESTION]Finetuning Validation Error Higher than Pre-training Error in Nequip #398

Closed ruoywang closed 2 weeks ago

ruoywang commented 6 months ago

Hi Nequip Team,

I am currently working with the Nequip framework for a project and have encountered an unexpected issue during the finetuning process. I would appreciate any insights or suggestions you have.

Issue Description: I have been finetuning a model that was previously pre-trained. However, I noticed that the validation error during finetuning is consistently higher than the error observed during the pre-training phase. To investigate further, I set the validation set as the finetuning training set. Surprisingly, even under these conditions, the validation error (especially in the earliest epochs) of new training remains higher than it was in the pre-training.

Intuitively, when the training set is the same as the validation set, the validation error should be lower than the pre-training error.

I would like to understand whether this higher validation error observed during finetuning is a common result inherent to the algorithm itself or if it might be due to some improper settings on my part. If it's the latter, I am willing to provide my input and output files for further analysis.

Thank you very much for your time and assistance.

Best regards, Ruoyu

Linux-cpp-lisp commented 3 days ago

Hi @ruoywang ,

Unfortunately I don't know if this is a typical result for this kind of a setup, but to a certain extent the pre-training and fine-tuning errors are not compatible, in the sense that one dataset may be "harder" than the other. Perhaps it would be informative to see how the errors from fine-tuning compare to those if you train a fresh model on the fine-tuning dataset?