particleflow icon indicating copy to clipboard operation
particleflow copied to clipboard

improved loss function

Open jpata opened this issue 3 years ago • 2 comments

One of the fundamental questions is the computation of the loss function between two sets of particles of different multiplicity.

For example, given the true set, with no natural ordering:

id=211 pt=123.0 eta=... charge=... 
id=130 pt=... ...
id=22 ...

and a predicted set

id=22 pt=29.0 eta=... 
id=22 ...

how to compute a differentiable loss function? The loss must also be computationally efficient, as we have O(10k) particles in the true and predicted sets.

For the moment, we use the object condensation approach, assigning the true particles to some particular "seed" input element, thus converting the problem to multi-classification with a "no-particle" class.

Other options to investigate include:

  • optimal transport, see earlier thread https://github.com/jpata/particleflow/issues/13#issue-556665298
  • sliced wasserstein distance
  • maximum mean discrepancy
  • GAN loss
  • ...

jpata avatar Apr 01 '22 15:04 jpata

https://github.com/FlorentinCDX/Fast-Approx-SW/blob/master/sw_approx.py

jpata avatar Aug 11 '22 07:08 jpata

Sliced n-dimensional Wasserstein was added here: https://github.com/jpata/particleflow/pull/123. So far, it did not drastically change the performance. Other options listed above are still on the table.

jpata avatar Aug 26 '22 10:08 jpata

basically, swd, genjet loss, MET loss have been implemented

jpata avatar Jan 24 '23 08:01 jpata