{"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/learning-normalized-image-densities-via-dual","title":"Learning normalized image densities via dual score matching","arxiv_id":"2506.05310","date":"2025-06-05","proceeding":null,"authors":["Florentin Guth","Zahra Kadkhodaie","Eero P Simoncelli"],"abstract":"Learning probability models from data is at the heart of many machine learning endeavors, but is notoriously difficult due to the curse of dimensionality. We introduce a new framework for learning \\emph{normalized} energy (log probability) models that is inspired from diffusion generative models, which rely on networks optimized to estimate the score. We modify a score network architecture to compute an energy while preserving its inductive biases. The gradient of this energy network with respect to its input image is the score of the learned density, which can be optimized using a denoising objective. Importantly, the gradient with respect to the noise level provides an additional score that can be optimized with a novel secondary objective, ensuring consistent and normalized energies across noise levels. We train an energy network with this \\emph{dual} score matching objective on the ImageNet64 dataset, and obtain a cross-entropy (negative log likelihood) value comparable to the state of the art. We further validate our approach by showing that our energy model \\emph{strongly generalizes}: estimated log probabilities are nearly independent of the specific images in the training set. Finally, we demonstrate that both image probability and dimensionality of local neighborhoods vary significantly with image content, in contrast with traditional assumptions such as concentration of measure or support on a low-dimensional manifold.","url_abs":"https://arxiv.org/abs/2506.05310v1","url_pdf":"https://arxiv.org/pdf/2506.05310v1.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":"learning-normalized-image-densities-via-dual","repo_url":"https://github.com/florentinguth/dualscorematching","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"BSD-3-Clause"}}],"tasks":[{"task_slug":"denoising","task_name":"Denoising"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2506.05310","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2506.05310"}},"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/florentinguth/dualscorematching","reach":{"status":"ok","spdx":"BSD-3-Clause"}}],"summary":{"unverified":9},"by_repo_kind":{"official":{"samples":9,"ran":0,"repositories":1}},"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":0,"samples":[{"code_sha256_prefix":"6c6da9ea7c016c5e","entry":"add_colorbar","repo":"florentinguth/dualscorematching","repo_kind":"official","path":"plotting.py","file_url":"https://github.com/florentinguth/dualscorematching/blob/HEAD/plotting.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"6c6da9ea7c016c5e"}},{"code_sha256_prefix":"bb35f291c2876f00","entry":"arrange_images","repo":"florentinguth/dualscorematching","repo_kind":"official","path":"plotting.py","file_url":"https://github.com/florentinguth/dualscorematching/blob/HEAD/plotting.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"bb35f291c2876f00"}},{"code_sha256_prefix":"36c431e1b95004d4","entry":"complex_to_str","repo":"florentinguth/dualscorematching","repo_kind":"official","path":"networks/modules.py","file_url":"https://github.com/florentinguth/dualscorematching/blob/HEAD/networks/modules.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"36c431e1b95004d4"}},{"code_sha256_prefix":"2e0fab041b95348d","entry":"disk_memoize","repo":"florentinguth/dualscorematching","repo_kind":"official","path":"memoize.py","file_url":"https://github.com/florentinguth/dualscorematching/blob/HEAD/memoize.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"2e0fab041b95348d"}},{"code_sha256_prefix":"7167adafa1598b8b","entry":"handle_img","repo":"florentinguth/dualscorematching","repo_kind":"official","path":"plotting.py","file_url":"https://github.com/florentinguth/dualscorematching/blob/HEAD/plotting.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"7167adafa1598b8b"}},{"code_sha256_prefix":"64250e9000a98cb0","entry":"memory_memoize","repo":"florentinguth/dualscorematching","repo_kind":"official","path":"memoize.py","file_url":"https://github.com/florentinguth/dualscorematching/blob/HEAD/memoize.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"64250e9000a98cb0"}},{"code_sha256_prefix":"19bbbeb6b9e5ba8f","entry":"short_hash","repo":"florentinguth/dualscorematching","repo_kind":"official","path":"memoize.py","file_url":"https://github.com/florentinguth/dualscorematching/blob/HEAD/memoize.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"19bbbeb6b9e5ba8f"}},{"code_sha256_prefix":"4c92e09a24bb5b40","entry":"sinusoidal_embedding","repo":"florentinguth/dualscorematching","repo_kind":"official","path":"networks/conditioning.py","file_url":"https://github.com/florentinguth/dualscorematching/blob/HEAD/networks/conditioning.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"4c92e09a24bb5b40"}},{"code_sha256_prefix":"3e50c15785ebb3d7","entry":"type_to_str","repo":"florentinguth/dualscorematching","repo_kind":"official","path":"networks/modules.py","file_url":"https://github.com/florentinguth/dualscorematching/blob/HEAD/networks/modules.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"3e50c15785ebb3d7"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}