{"id":13869737,"url":"https://github.com/VincentStimper/resampled-base-flows","last_synced_at":"2025-07-15T18:31:54.465Z","repository":{"id":53841625,"uuid":"289021143","full_name":"VincentStimper/resampled-base-flows","owner":"VincentStimper","description":"Normalizing Flows with a resampled base distribution","archived":false,"fork":false,"pushed_at":"2022-09-07T15:49:44.000Z","size":1414,"stargazers_count":47,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-11T12:34:32.889Z","etag":null,"topics":["normalizing-flows","pytorch","resampled-base-distribution"],"latest_commit_sha":null,"homepage":"https://proceedings.mlr.press/v151/stimper22a","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VincentStimper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-20T14:00:52.000Z","updated_at":"2025-05-20T14:20:50.000Z","dependencies_parsed_at":"2022-08-22T08:31:00.322Z","dependency_job_id":null,"html_url":"https://github.com/VincentStimper/resampled-base-flows","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/VincentStimper/resampled-base-flows","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VincentStimper%2Fresampled-base-flows","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VincentStimper%2Fresampled-base-flows/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VincentStimper%2Fresampled-base-flows/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VincentStimper%2Fresampled-base-flows/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VincentStimper","download_url":"https://codeload.github.com/VincentStimper/resampled-base-flows/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VincentStimper%2Fresampled-base-flows/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265451443,"owners_count":23767768,"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":["normalizing-flows","pytorch","resampled-base-distribution"],"created_at":"2024-08-05T20:01:14.571Z","updated_at":"2025-07-15T18:31:53.825Z","avatar_url":"https://github.com/VincentStimper.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Resampling Base Distributions of Normalizing Flows\n\n## Overview\n\nNormalizing flows are a popular class of models for approximating probability \ndistributions. However, their invertible nature limits their ability to model \ntarget distributions with a complex topological structure, such as Boltzmann \ndistributions. Several procedures have been proposed to solve this problem \nbut many of them sacrifice invertibility and, thereby, tractability of the \nlog-likelihood as well as other desirable properties. To address these limitations, \nwe introduce a base distribution for normalizing flows based on learned rejection \nsampling in our article\n[Resampling Base Distributions of Normalizing Flows](https://proceedings.mlr.press/v151/stimper22a),\nallowing the resulting normalizing flow to model complex topologies without giving\nup bijectivity. In this repository, we implemented this class of base distributions\nand provide the script for various experiments comparing them to other commonly used\nbase distributions. Some results of applying our method to 2D distributions are shown\nbelow.\n\n![Normalizing flows with different base distributions](https://github.com/VincentStimper/resampled-base-flows/blob/master/images/2d_distributions.png \"Normalizing flows with different base distributions\")\n\nThis packages builds upon the normalizing flow library \n[`normflows`](https://github.com/VincentStimper/normalizing-flows). The Boltzmann \ngenerator experiments are realized via the \n[`boltzgen`](https://github.com/VincentStimper/boltzmann-generators) library.\n\n## Methods of Installation\n\nThe latest version of the package can be installed via pip\n\n```\npip install --upgrade git+https://github.com/VincentStimper/resampled-base-flows.git\n```\n\nIf you want to use a GPU, make sure that PyTorch is set up correctly by\nby following the instructions at the\n[PyTorch website](https://pytorch.org/get-started/locally/).\n\nTo run the Boltzmann generator experiments it is necessary to install OpenMM.\nInstructions on how to do this can be found \n[here](http://docs.openmm.org/7.0.0/userguide/application.html#installing-openmm).\n\n## Citation\n\nIf you use our code in your own research, please cite our paper:\n\n\u003e Vincent Stimper, Bernhard Schölkopf, José Miguel Hernández-Lobato. Resampling Base \n\u003e Distributions of Normalizing Flows. In Proceedings of The 25th International Conference \n\u003e on Artificial Intelligence and Statistics, volume 151, pp. 4915–4936, 2022.\n\n**Bibtex**\n```\n@inproceedings{Stimper2022,\n  title = \t {Resampling {B}ase {D}istributions of {N}ormalizing {F}lows},\n  author =       {Vincent Stimper and Bernhard Sch{\\\"o}lkopf and Jos{\\'e} Miguel Hern{\\'a}ndez-Lobato},\n  booktitle = \t {Proceedings of The 25th International Conference on Artificial Intelligence and Statistics},\n  pages = \t {4915--4936},\n  year = \t {2022},\n  volume = \t {151}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVincentStimper%2Fresampled-base-flows","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FVincentStimper%2Fresampled-base-flows","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVincentStimper%2Fresampled-base-flows/lists"}