Self-normalized likelihood for directional statistics -- density estimation on spheres and tori.
This repository applies the self-normalized likelihood (SNL) framework to directional distributions, where the normalisation constant is particularly challenging to compute. It includes implementations and experiments for:
- Von Mises distributions (circular data)
- Von Mises-Fisher distributions (spherical data, 2D and 3D)
- Kent distributions (spherical data with anisotropy)
- Bivariate sine von Mises distributions (toroidal data)
- Truncated Gaussians and mixtures
- Application to protein dihedral angles
Related paper: "Learning Energy-Based Models by Self-normalising the Likelihood" (TMLR 2026) [paper]
SNLDirectional/ # Core package (models, distributions, training)
Data/ # Datasets (including protein dihedrals)
tests/ # Unit tests
main_trainer.py # Main training script
test_*.ipynb # Jupyter notebooks for each distribution type
# Run the main trainer
python main_trainer.py
# Or explore individual distribution experiments via the notebooks
jupyter notebook test_von_mises.ipynb@article{senetaire2026snl,
title={Learning Energy-Based Models by Self-normalising the Likelihood},
author={Senetaire, Hugo and Jeha, Paul and Mattei, Pierre-Alexandre and Frellsen, Jes},
journal={Transactions on Machine Learning Research},
year={2026}
}