{"id":20063157,"url":"https://github.com/alan-turing-institute/memorization","last_synced_at":"2025-05-05T17:32:19.951Z","repository":{"id":73568278,"uuid":"373311045","full_name":"alan-turing-institute/memorization","owner":"alan-turing-institute","description":"Code for \"On Memorization in Probabilistic Deep Generative Models\"","archived":false,"fork":false,"pushed_at":"2022-02-01T00:07:30.000Z","size":53,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-09T01:51:18.891Z","etag":null,"topics":["deep-learning","generative-model","memorization","probabilistic-models","pytorch","reproducibility","reproducible-paper","reproducible-research","reproducible-science"],"latest_commit_sha":null,"homepage":"https://papers.nips.cc/paper/2021/hash/eae15aabaa768ae4a5993a8a4f4fa6e4-Abstract.html","language":"Python","has_issues":false,"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/alan-turing-institute.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-02T21:46:53.000Z","updated_at":"2023-10-26T13:52:08.000Z","dependencies_parsed_at":"2023-07-08T20:30:36.117Z","dependency_job_id":null,"html_url":"https://github.com/alan-turing-institute/memorization","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/alan-turing-institute%2Fmemorization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alan-turing-institute%2Fmemorization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alan-turing-institute%2Fmemorization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alan-turing-institute%2Fmemorization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alan-turing-institute","download_url":"https://codeload.github.com/alan-turing-institute/memorization/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252542373,"owners_count":21764956,"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","generative-model","memorization","probabilistic-models","pytorch","reproducibility","reproducible-paper","reproducible-research","reproducible-science"],"created_at":"2024-11-13T13:40:45.313Z","updated_at":"2025-05-05T17:32:19.945Z","avatar_url":"https://github.com/alan-turing-institute.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# On Memorization in Probabilistic Deep Generative Models (NeurIPS 2021)\n\nThis repository contains the code necessary to reproduce the experiments in \n[On Memorization in Probabilistic Deep Generative Models][neurips-link]. You \ncan also use this code to measure memorization in other types of probabilistic \ndeep generative models. If you use our code in your own work please cite the \npaper using, for instance, the following BibTeX entry:\n\n```bibtex\n@inproceedings{van2021memorization,\n  title={On Memorization in Probabilistic Deep Generative Models},\n  author={{Van den Burg}, G. J. J. and Williams, C. K. I.},\n  booktitle={Advances in Neural Information Processing Systems},\n  volume={34},\n  year={2021}\n}\n```\n\nIf you have any questions or encounter an issue when using this code, please \nsend an email to ``gertjanvandenburg at gmail dot com``.\n\n## Introduction\n\nThe files in the ``scripts`` directory are needed to reproduce the experiments \nand generate the figures in the paper. The experiments are organized using the \n``Makefile`` provided. To reproduce the experiments or recreate the figures \nfrom the analysis, you'll have to install a number of dependencies. We use \n[PyTorch](https://pytorch.org) to implement the deep learning algorithms. If \nyou don't wish to re-run all the models, you can download the result files \nused in the paper ([see below](#result-files)).\n\nThe scripts are all written in Python, and the necessary external dependencies \ncan be found in the ``requirements.txt`` file. These can be installed using:\n\n```\n$ pip install -r requirements.txt\n```\n\nTo recreate the figures the following system dependencies are also needed: \n``pdflatex``, ``latexmk``, ``lualatex``, and ``make``. These programs are \navailable for all major platforms.\n\n## Reproducing the results\n\nTo train the models on the different data sets, you can run:\n\n```\n$ make memorization\n```\n\nNote that depending on your machine this may take some time, so it might be \neasier to simply download the result files instead. It is also worth \nmentioning that while we have made an effort to ensure reproducibility by \nsetting the random seed in PyTorch, platform or package version differences \nmay result in slightly different output files (see also [PyTorch \nReproducibility](https://pytorch.org/docs/stable/notes/randomness.html)).\n\nAll figures in the paper are generated from the raw result files using Python \nscripts. First, the ``summarize.py`` script takes the raw result files and \ncreates summary files for each data set. Next, the analysis scripts are used \nto generate the figures, most of which are LaTeX files that require \ncompilation using PDFLaTeX or LuaLaTeX. Simply run:\n\n```\n$ make analysis\n```\n\nto create the summaries and the output files. When using the result files \nlinked below this will give the exact same figures as shown in the paper.\n\n## Result files\n\nDue to their size, the raw result files are not contained in this repository, \nbut can be downloaded separately from [this link][result-link] (about 2.6GB). \nAfter downloading the ``results.zip`` file, unpack it and move the ``results`` \ndirectory to where you've cloned this repository (so adjacent to the \n``scripts`` directory). Below is a concise overview of the necessary commands:\n\n```bash\n$ git clone https://github.com/alan-turing-institute/memorization\n$ cd memorization\n$ wget https://gertjanvandenburg.com/projects/memorization/results.zip # or download the file in some other way\n$ unzip results.zip\n$ touch results/*/*/*          # update modification time of the result files\n$ make analysis                # optionally, run ``make -n analysis`` first to see what will happen\n```\n\nAfter unpacking the zip file, you can optionally verify the integrity of the \nresults using the SHA-256 checksums provided:\n\n```bash\n$ sha256sum --check results.sha256\n```\n\n## License\n\nThe code in this repository is licensed under the MIT license. See the \n[LICENSE file](LICENSE) for further details. Reuse of the code in this \nrepository is allowed, but should cite [our paper][neurips-link].\n\n## Notes\n\nIf you find any problems or have a suggestion for improvement of this \nrepository, please [let me know](mailto:gertjanvandenburg@gmail.com) as it \nwill help make this resource better for everyone. \n\n[neurips-link]: https://papers.nips.cc/paper/2021/hash/eae15aabaa768ae4a5993a8a4f4fa6e4-Abstract.html\n[result-link]: https://gertjanvandenburg.com/projects/memorization/results.zip\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falan-turing-institute%2Fmemorization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falan-turing-institute%2Fmemorization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falan-turing-institute%2Fmemorization/lists"}