Repository navigation
Replies: 1 comment
|
Old thread, but I've been going through On the correlations: say the per-atom energy errors each have variance σ² and a pairwise correlation ρ. Then With ρ = 0 that's N σ², so your The forces make the difference bigger. The force term is a mean over every force component in the batch, while the energy term is a mean over configs. So in a mixed batch a config's share of the force loss goes like N, and its share of the energy loss is 1/(number of configs). With uncorrelated errors the energy/force balance for one config goes like 1/N² in MACE, against 1/N in GAP. That's your "twice as many forces, same E/N". Virials get the same treatment as the energy, There's no switch for it today, but you can get the GAP scaling for the energy through the per-config weights, because
On unifying the losses: that's more or less what the v1 rewrite is doing in TRN-2 (#1576). The loss terms are generated from the declared observables, the weights and things like On doing everything as huber: torch's huber is |
Uh oh!
There was an error while loading. Please reload this page.
We should figure out how to scale the loss with number of atoms. For GAP and ACE, we've settled on
for both energy and virial (extensive). From what I can tell, MACE uses `
In addition to a (trivial) square on the magnitude of the weight, these do not scale the same with number of atoms. They can be mapped to each other through
The former assumes that the energy errors are uncorrelated. The latter assumes something else, but I'm not sure how to define it in terms of correlations. But, for example, if you double the system size you get twice as many forces, but the same scale E/N, so same contribution from the energy.
Maybe the scaling should be selectable by the user?
Also, in general, there are many possibly duplicative loss functions coded up, and it would be very nice if they were unified. I can even imagine all of them being implemented as huber, and recover the quadratic ones by setting the threshold to infinity.
All reactions