{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/generative-modeling-by-estimating-gradients","title":"Generative Modeling by Estimating Gradients of the Data Distribution","arxiv_id":"1907.05600","date":"2019-07-12","proceeding":"NeurIPS 2019 12","authors":["Yang Song","Stefano Ermon"],"abstract":"We introduce a new generative model where samples are produced via Langevin dynamics using gradients of the data distribution estimated with score matching. Because gradients can be ill-defined and hard to estimate when the data resides on low-dimensional manifolds, we perturb the data with different levels of Gaussian noise, and jointly estimate the corresponding scores, i.e., the vector fields of gradients of the perturbed data distribution for all noise levels. For sampling, we propose an annealed Langevin dynamics where we use gradients corresponding to gradually decreasing noise levels as the sampling process gets closer to the data manifold. Our framework allows flexible model architectures, requires no sampling during training or the use of adversarial methods, and provides a learning objective that can be used for principled model comparisons. Our models produce samples comparable to GANs on MNIST, CelebA and CIFAR-10 datasets, achieving a new state-of-the-art inception score of 8.87 on CIFAR-10. Additionally, we demonstrate that our models learn effective representations via image inpainting experiments.","url_abs":"https://arxiv.org/abs/1907.05600v3","url_pdf":"https://arxiv.org/pdf/1907.05600v3.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"generative-modeling-by-estimating-gradients","repo_url":"https://github.com/ermongroup/ncsn","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"generative-modeling-by-estimating-gradients","repo_url":"https://github.com/Lornatang/PyTorch-NCSN","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"generative-modeling-by-estimating-gradients","repo_url":"https://github.com/PeterZhizhin/HSE-DeepLearning-NCSN","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"generative-modeling-by-estimating-gradients","repo_url":"https://github.com/Xemnas0/NCSN-TF2.0","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"generative-modeling-by-estimating-gradients","repo_url":"https://github.com/ermongroup/ncsnv2","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"generative-modeling-by-estimating-gradients","repo_url":"https://github.com/guillaumeboniface/super_resolution","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"generative-modeling-by-estimating-gradients","repo_url":"https://github.com/henryaddison/score_sde_pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"generative-modeling-by-estimating-gradients","repo_url":"https://github.com/mbordyuh/score_matching","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"generative-modeling-by-estimating-gradients","repo_url":"https://github.com/voxmenthe/ncsn_1","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"GPL-3.0"}},{"paper_slug":"generative-modeling-by-estimating-gradients","repo_url":"https://github.com/xiwei-cheng/chained_ld","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"generative-modeling-by-estimating-gradients","repo_url":"https://github.com/yang-song/score_sde","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"generative-modeling-by-estimating-gradients","repo_url":"https://github.com/yang-song/score_sde_pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"generative-modeling-by-estimating-gradients","repo_url":"https://github.com/soran-ghaderi/torchebm","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"unanswered"}}],"tasks":[{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"image-inpainting","task_name":"Image Inpainting"}],"methods":[{"method_slug":"denoising-score-matching","method_name":"Denoising Score Matching"}],"datasets_introduced":[],"methods_introduced":[{"slug":"denoising-score-matching","name":"Denoising Score Matching","full_name":"Denoising Score Matching"}],"results":[{"leaderboard":"/sota/image-generation-on-cifar-10","task":"Image Generation","dataset":"CIFAR-10","model":"NCSN","rank_in_archive_order":63,"of":78,"metrics":{"FID":"25.32"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1907.05600","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1907.05600"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yang-song/score_sde","reach":null},{"provenance":"deterministic:regex_extraction","url":"https://github.com/ermongroup/ncsn","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ermongroup/ncsnv2","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yang-song/score_sde_pytorch","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/henryaddison/score_sde_pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Lornatang/PyTorch-NCSN","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/guillaumeboniface/super_resolution","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/PeterZhizhin/HSE-DeepLearning-NCSN","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Xemnas0/NCSN-TF2.0","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/soran-ghaderi/torchebm","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/voxmenthe/ncsn_1","reach":{"status":"ok","spdx":"GPL-3.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/mbordyuh/score_matching","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/xiwei-cheng/chained_ld","reach":null}],"summary":{"ran":10,"ran_fixture":2,"ran_draft_wrong":1,"ran_honours":1,"unverified":8},"by_repo_kind":{"listed":{"samples":22,"ran":14,"repositories":8}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":9,"samples":[{"code_sha256_prefix":"a36c0d3f631164cf","entry":"ConditionalBatchNorm2d","repo":"ermongroup/ncsnv2","repo_kind":"listed","path":"models/ncsnv2.py","file_url":"https://github.com/ermongroup/ncsnv2/blob/HEAD/models/ncsnv2.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a36c0d3f631164cf"}},{"code_sha256_prefix":"b67d9759d330f8e9","entry":"ConditionalInstanceNorm2d","repo":"ermongroup/ncsnv2","repo_kind":"listed","path":"models/ncsnv2.py","file_url":"https://github.com/ermongroup/ncsnv2/blob/HEAD/models/ncsnv2.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b67d9759d330f8e9"}},{"code_sha256_prefix":"543e9573790e3f36","entry":"ConditionalInstanceNorm2dPlus","repo":"ermongroup/ncsnv2","repo_kind":"listed","path":"models/ncsnv2.py","file_url":"https://github.com/ermongroup/ncsnv2/blob/HEAD/models/ncsnv2.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"543e9573790e3f36"}},{"code_sha256_prefix":"28b6b8fdea88c99d","entry":"ConditionalNoneNorm2d","repo":"ermongroup/ncsnv2","repo_kind":"listed","path":"models/ncsnv2.py","file_url":"https://github.com/ermongroup/ncsnv2/blob/HEAD/models/ncsnv2.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"28b6b8fdea88c99d"}},{"code_sha256_prefix":"d217a4b1f1925355","entry":"InstanceNorm2dPlus","repo":"ermongroup/ncsnv2","repo_kind":"listed","path":"models/ncsnv2.py","file_url":"https://github.com/ermongroup/ncsnv2/blob/HEAD/models/ncsnv2.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d217a4b1f1925355"}},{"code_sha256_prefix":"f02dfb63731445ee","entry":"NoneNorm2d","repo":"ermongroup/ncsnv2","repo_kind":"listed","path":"models/ncsnv2.py","file_url":"https://github.com/ermongroup/ncsnv2/blob/HEAD/models/ncsnv2.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f02dfb63731445ee"}},{"code_sha256_prefix":"55fdb754c0cda85c","entry":"ResNetScore","repo":"xiwei-cheng/chained_ld","repo_kind":"listed","path":"models/scorenet.py","file_url":"https://github.com/xiwei-cheng/chained_ld/blob/HEAD/models/scorenet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"55fdb754c0cda85c"}},{"code_sha256_prefix":"495f6791fda7d15e","entry":"ResnetBlock","repo":"xiwei-cheng/chained_ld","repo_kind":"listed","path":"models/scorenet.py","file_url":"https://github.com/xiwei-cheng/chained_ld/blob/HEAD/models/scorenet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"495f6791fda7d15e"}},{"code_sha256_prefix":"04ab830c8352fa59","entry":"Score","repo":"Lornatang/PyTorch-NCSN","repo_kind":"listed","path":"models/scorenet.py","file_url":"https://github.com/Lornatang/PyTorch-NCSN/blob/HEAD/models/scorenet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"04ab830c8352fa59"}},{"code_sha256_prefix":"2ceaba81d90f5640","entry":"VarianceNorm2d","repo":"ermongroup/ncsnv2","repo_kind":"listed","path":"models/ncsnv2.py","file_url":"https://github.com/ermongroup/ncsnv2/blob/HEAD/models/ncsnv2.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2ceaba81d90f5640"}},{"code_sha256_prefix":"cff1bdc3f34eb185","entry":"dsm_loss","repo":"Xemnas0/NCSN-TF2.0","repo_kind":"listed","path":"losses/losses.py","file_url":"https://github.com/Xemnas0/NCSN-TF2.0/blob/HEAD/losses/losses.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cff1bdc3f34eb185"}},{"code_sha256_prefix":"7c385bfdbcac9ebc","entry":"generate_noisy_image_batch","repo":"guillaumeboniface/super_resolution","repo_kind":"listed","path":"sr3/noise_utils.py","file_url":"https://github.com/guillaumeboniface/super_resolution/blob/HEAD/sr3/noise_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7c385bfdbcac9ebc"}},{"code_sha256_prefix":"05f3653dd76468d9","entry":"get_norm_layer","repo":"xiwei-cheng/chained_ld","repo_kind":"listed","path":"models/scorenet.py","file_url":"https://github.com/xiwei-cheng/chained_ld/blob/HEAD/models/scorenet.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"05f3653dd76468d9"}},{"code_sha256_prefix":"308c9ffe9425921a","entry":"get_sigmas","repo":"ermongroup/ncsnv2","repo_kind":"listed","path":"models/ncsnv2.py","file_url":"https://github.com/ermongroup/ncsnv2/blob/HEAD/models/ncsnv2.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"308c9ffe9425921a"}},{"code_sha256_prefix":"2985c25add4b01dc","entry":"ConditionalVarianceNorm2d","repo":"ermongroup/ncsnv2","repo_kind":"listed","path":"models/ncsnv2.py","file_url":"https://github.com/ermongroup/ncsnv2/blob/HEAD/models/ncsnv2.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2985c25add4b01dc"}},{"code_sha256_prefix":"9979dc271f83e97a","entry":"NCSNv2","repo":"ermongroup/ncsnv2","repo_kind":"listed","path":"models/ncsnv2.py","file_url":"https://github.com/ermongroup/ncsnv2/blob/HEAD/models/ncsnv2.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9979dc271f83e97a"}},{"code_sha256_prefix":"2149b8836f88ca16","entry":"SDE","repo":"yang-song/score_sde_pytorch","repo_kind":"listed","path":"sde_lib.py","file_url":"https://github.com/yang-song/score_sde_pytorch/blob/HEAD/sde_lib.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2149b8836f88ca16"}},{"code_sha256_prefix":"45b72aead272b1d0","entry":"ToyExperimentDataset","repo":"PeterZhizhin/HSE-DeepLearning-NCSN","repo_kind":"listed","path":"langevin.py","file_url":"https://github.com/PeterZhizhin/HSE-DeepLearning-NCSN/blob/HEAD/langevin.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"45b72aead272b1d0"}},{"code_sha256_prefix":"4208709a6798c6ab","entry":"anneal_langevin","repo":"PeterZhizhin/HSE-DeepLearning-NCSN","repo_kind":"listed","path":"langevin.py","file_url":"https://github.com/PeterZhizhin/HSE-DeepLearning-NCSN/blob/HEAD/langevin.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"4208709a6798c6ab"}},{"code_sha256_prefix":"c0db9b95b0194d7a","entry":"get_normalization","repo":"ermongroup/ncsnv2","repo_kind":"listed","path":"models/ncsnv2.py","file_url":"https://github.com/ermongroup/ncsnv2/blob/HEAD/models/ncsnv2.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c0db9b95b0194d7a"}},{"code_sha256_prefix":"1a2134b893169239","entry":"jacobian","repo":"mbordyuh/score_matching","repo_kind":"listed","path":"model.py","file_url":"https://github.com/mbordyuh/score_matching/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1a2134b893169239"}},{"code_sha256_prefix":"9a46fa84765de343","entry":"score_matching","repo":"mbordyuh/score_matching","repo_kind":"listed","path":"model.py","file_url":"https://github.com/mbordyuh/score_matching/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9a46fa84765de343"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}