{"id":13869967,"url":"https://github.com/nicola-decao/s-vae-pytorch","last_synced_at":"2025-07-15T20:30:50.158Z","repository":{"id":44428028,"uuid":"139118855","full_name":"nicola-decao/s-vae-pytorch","owner":"nicola-decao","description":"Pytorch implementation of Hyperspherical Variational Auto-Encoders","archived":false,"fork":false,"pushed_at":"2020-03-21T16:06:50.000Z","size":28,"stargazers_count":346,"open_issues_count":0,"forks_count":58,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-08-06T21:22:48.905Z","etag":null,"topics":["deep-learning","hyperspherical-vae","machine-learning","manifold-learning","pytorch","vae","variational-autoencoder","von-mises-fisher"],"latest_commit_sha":null,"homepage":"http://arxiv.org/abs/1804.00891","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nicola-decao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-29T07:52:11.000Z","updated_at":"2024-08-04T07:18:36.000Z","dependencies_parsed_at":"2022-09-25T11:55:59.314Z","dependency_job_id":null,"html_url":"https://github.com/nicola-decao/s-vae-pytorch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicola-decao%2Fs-vae-pytorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicola-decao%2Fs-vae-pytorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicola-decao%2Fs-vae-pytorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicola-decao%2Fs-vae-pytorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicola-decao","download_url":"https://codeload.github.com/nicola-decao/s-vae-pytorch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226068091,"owners_count":17568700,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","hyperspherical-vae","machine-learning","manifold-learning","pytorch","vae","variational-autoencoder","von-mises-fisher"],"created_at":"2024-08-05T20:01:23.687Z","updated_at":"2024-11-23T16:30:53.187Z","avatar_url":"https://github.com/nicola-decao.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Hyperspherical Variational Auto-Encoders\n### Pytorch implementation of Hyperspherical Variational Auto-Encoders\n\n## Overview\nThis library contains a Pytorch implementation of the hyperspherical variational auto-encoder, or S-VAE, as presented in [[1]](#citation)(http://arxiv.org/abs/1804.00891). Check also our blogpost (https://nicola-decao.github.io/s-vae).\n\n* Don't use Pytorch? Take a look [here](https://github.com/nicola-decao/s-vae-tf) for a **tensorflow** implementation!\n\n## Dependencies\n\n* **python\u003e=3.6**\n* **pytorch\u003e=0.4.1**: https://pytorch.org\n* **scipy**: https://scipy.org\n* **numpy**: https://www.numpy.org\n\n## Installation\n\nTo install, run\n\n```bash\n$ python setup.py install\n```\n\n## Structure\n* [distributions](https://github.com/nicola-decao/s-vae-pytorch/tree/master/hyperspherical_vae/distributions): Pytorch implementation of the von Mises-Fisher and hyperspherical Uniform distributions. Both inherit from `torch.distributions.Distribution`.\n* [ops](https://github.com/nicola-decao/s-vae-pytorch/tree/master/hyperspherical_vae/ops): Low-level operations used for computing the exponentially scaled modified Bessel function of the first kind and its derivative.\n* [examples](https://github.com/nicola-decao/s-vae-pytorch/tree/master/examples): Example code for using the library within a PyTorch project.\n\n## Usage\nPlease have a look into the [examples folder](https://github.com/nicola-decao/s-vae-pytorch/tree/master/examples). We adapted our implementation to follow the structure of the [Pytorch probability distributions](https://pytorch.org/docs/stable/distributions.html).\n\nPlease cite [[1](#citation)] in your work when using this library in your experiments.\n\n## Sampling von Mises-Fisher\nTo sample the von Mises-Fisher distribution we follow the rejection sampling procedure as outlined by [Ulrich, 1984](http://www.jstor.org/stable/2347441?seq=1#page_scan_tab_contents). This simulation pipeline is visualized below:\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://i.imgur.com/aK1ze0z.png\" alt=\"blog toy1\"/\u003e\n\u003c/p\u003e\n\n_Note that as ![](http://latex.codecogs.com/svg.latex?%5Comega) is a scalar, this approach does not suffer from the curse of dimensionality. For the final transformation, ![](http://latex.codecogs.com/svg.latex?U%28%5Cmathbf%7Bz%7D%27%3B%5Cmu%29), a [Householder reflection](https://en.wikipedia.org/wiki/Householder_transformation) is utilized._\n\n## Feedback\nFor questions and comments, feel free to contact [Nicola De Cao](mailto:nicola.decao@gmail.com) or [Tim Davidson](mailto:itimrd@gmail.com).\n\n## License\nMIT\n\n## Citation\n```\n[1] Davidson, T. R., Falorsi, L., De Cao, N., Kipf, T.,\nand Tomczak, J. M. (2018). Hyperspherical Variational\nAuto-Encoders. 34th Conference on Uncertainty in Artificial Intelligence (UAI-18).\n```\n\nBibTeX format:\n```\n@article{s-vae18,\n  title={Hyperspherical Variational Auto-Encoders},\n  author={Davidson, Tim R. and\n          Falorsi, Luca and\n          De Cao, Nicola and\n          Kipf, Thomas and\n          Tomczak, Jakub M.},\n  journal={34th Conference on Uncertainty in Artificial Intelligence (UAI-18)},\n  year={2018}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicola-decao%2Fs-vae-pytorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicola-decao%2Fs-vae-pytorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicola-decao%2Fs-vae-pytorch/lists"}