Loss, Metrics, and Uncertainty#
Training objectives and validation scores are configured separately but should use consistent unit weighting.
Loss types#
Registered in enerzyme/models/loss.py:
rmse/mse— root mean square error per targetmae— mean absolute errorcrps— continuous ranked probability score (useful with shallow ensembles)nll— negative log-likelihood where supportedArchitecture-specific terms (e.g. PhysNet
nh_penalty)
Example:
loss:
crps:
E: 1
rmse:
Fa: 0.91656181
M2: 0.32731016
Q: 0.1
Metrics and early stopping#
Per-model Metric blocks define the validation judge_score — a weighted sum of metric terms. Early stopping uses Trainer.patience on this score.
Metric:
E:
rmse: 1
Fa:
rmse: 0.91656181
Global Metrics in older configs may still appear; per-model Metric in Modelhub is preferred in current train.yaml.
Shallow ensemble uncertainty#
ShallowEnsembleReduce with shallow_ensemble_size > 1 in Core trains multiple forward passes. Configure variance outputs:
- name: ShallowEnsembleReduce
params:
reduce_mean: [E, Fa, Qa, M2, Q]
var: [E, Fa]
eval_only: true
At predict time, request non-target features:
Trainer:
non_target_features:
- E_var
- Fa_var
- Qa_var
Committee training#
Set Trainer.committee_size > 1 to train independent models (FF_committee). Uncertainty comes from disagreement across committee members rather than a single shallow ensemble. Used heavily in active_learning_train.yaml.
UDD at simulation time#
Hybrid simulation can apply uncertainty-driven debiasing via uncertainty_calculator: UDD in Simulation (see uma.yaml and Enhanced Sampling and PLUMED). This is separate from training-time E_var / Fa_var.
Unit weights#
See Units and Standard Fields. Mismatched force weights are a common cause of poor force accuracy despite good energy loss.