Wristband Gaussian Loss: From to
Story
Mikhail Parakhin (CTO of Shopify) published the Wristband Gaussian Loss. A training regularizer that forces a neural encoder's outputs to be exactly distributed as a standard Gaussian. Available on Github.
Work
This is a continuation from: Wristband Gaussian Loss: Formalization and Proof. The original work used pairwise computations for the repulsion term, to measure true uniformity. By rearranging equations I was able to compute the repulsion term via spectral decomposition of the Wristband Space. The original equation separated the computation in two parts, the angular term and the radial term.
where , are points on the wristband space. With the kernel energy to be minimized being,
In my work I re-wrote the kernel computation, 'merging' the angular and radial kernels:
where is the latent space dimension and is the truncation term for the spectral approximation.
This means going from a pairwise energy computation to , much faster even for small . This work was also proven with Lean, making sure that this computation was also minimal at the uniform distribution (the main purpose of the kernel).
To-do: expand the full theoretical derivation
Notes
All theoretical ideas for the Wristband Space and the original implementation are Mikhail Parakhin's.
My contribution here is in improving the kernel computation step.