-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Last-layer prediction rigidity (LLPR)-based uncertainty quantification for MACE #601
base: develop
Are you sure you want to change the base?
Conversation
amazing, thank you! I will have a look:) |
Cheers, Ilyes. For the record, we must have started from the |
------ - move support function to be below forward - remove unused input for the support function - take average ll_feats when energy loss is worked into the covariance
e23b438
to
1a57319
Compare
Ok, done! We need to make sure things are still working |
Our UQ features have been checked to be fine after the rebase. It would be nice for you to take a look and try it out (get in touch with us for a detailed workflow). We are open to any comments or suggestions of our new features, thanks! |
Hey @SanggyuChong, thank you very much for your PR.
|
Hello, all!
Sanggyu from COSMO-EPFL here, together with Filippo (@frostedoyster). We recently had the chance to explore the model uncertainties of MACE-mp-0 and conduct as thorough of an analysis as possible, and would like to contribute the implementation that we used in doing so. Here are a list of main changes:
LLPRModel
: a wrapper that resides withinmodels.py
with all of the utilities involved in computing the uncertainties using the LLPR approach. To use this, the user needs to wrap their original MACE model with this class, compute the covariance matrix, obtain inverse covariance matrix (ideally with calibration), and then from there on, with every inference, the uncertainties will be accessed in the model output.modules/utils.py
: functions needed for proper covariance matrix calculation, namelycompute_ll_feat_gradients
,get_huber_mask
, andget_conditional_huber_force_mask
, were contributed here.tools/llpr.py
: functions needed to calibrate the prediction rigidities to uncertainty estimates were contributed here.I see that our branch has some discrepancies elsewhere with
develop
branch that does not interfere with our newly contributed functionalities, so I will first put this in as a draft PR to do further clean-up. In the mean time, any feedback is more than welcome.Thanks,
Sanggyu and (Filippo)