{"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/training-neural-samplers-with-reverse","title":"Training Neural Samplers with Reverse Diffusive KL Divergence","arxiv_id":"2410.12456","date":"2024-10-16","proceeding":null,"authors":["Jiajun He","Wenlin Chen","Mingtian Zhang","David Barber","José Miguel Hernández-Lobato"],"abstract":"Training generative models to sample from unnormalized density functions is an important and challenging task in machine learning. Traditional training methods often rely on the reverse Kullback-Leibler (KL) divergence due to its tractability. However, the mode-seeking behavior of reverse KL hinders effective approximation of multi-modal target distributions. To address this, we propose to minimize the reverse KL along diffusion trajectories of both model and target densities. We refer to this objective as the reverse diffusive KL divergence, which allows the model to capture multiple modes. Leveraging this objective, we train neural samplers that can efficiently generate samples from the target distribution in one step. We demonstrate that our method enhances sampling performance across various Boltzmann distributions, including both synthetic multi-modal densities and n-body particle systems.","url_abs":"https://arxiv.org/abs/2410.12456v1","url_pdf":"https://arxiv.org/pdf/2410.12456v1.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":"training-neural-samplers-with-reverse","repo_url":"https://github.com/jiajunhe98/DiKL","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2410.12456","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2410.12456"}},"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/jiajunhe98/DiKL","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":9,"ran_draft_wrong":2,"ran_fixture":1,"unverified":5},"by_repo_kind":{"official":{"samples":17,"ran":12,"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":"6a4f0d967a8cb434","entry":"cubic_spline","repo":"jiajunhe98/DiKL","repo_kind":"official","path":"DiKL/energy/lj.py","file_url":"https://github.com/jiajunhe98/DiKL/blob/HEAD/DiKL/energy/lj.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6a4f0d967a8cb434"}},{"code_sha256_prefix":"6c7ab62a76e76d23","entry":"get_distance","repo":"jiajunhe98/DiKL","repo_kind":"official","path":"DiKL/evaluation/metric.py","file_url":"https://github.com/jiajunhe98/DiKL/blob/HEAD/DiKL/evaluation/metric.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6c7ab62a76e76d23"}},{"code_sha256_prefix":"a17ca029536b3a01","entry":"get_target_log_prob_marginal_pair_alt","repo":"jiajunhe98/DiKL","repo_kind":"official","path":"DiKL/energy/mw.py","file_url":"https://github.com/jiajunhe98/DiKL/blob/HEAD/DiKL/energy/mw.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a17ca029536b3a01"}},{"code_sha256_prefix":"5cf4b7554f0be361","entry":"lennard_jones_energy_torch","repo":"jiajunhe98/DiKL","repo_kind":"official","path":"DiKL/energy/lj.py","file_url":"https://github.com/jiajunhe98/DiKL/blob/HEAD/DiKL/energy/lj.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5cf4b7554f0be361"}},{"code_sha256_prefix":"b19cfb790c935cfa","entry":"make_beta_schedule","repo":"jiajunhe98/DiKL","repo_kind":"official","path":"DiKL/models/dm_utils.py","file_url":"https://github.com/jiajunhe98/DiKL/blob/HEAD/DiKL/models/dm_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b19cfb790c935cfa"}},{"code_sha256_prefix":"e63616b709d7b674","entry":"remove_mean","repo":"jiajunhe98/DiKL","repo_kind":"official","path":"DiKL/models/dm_utils.py","file_url":"https://github.com/jiajunhe98/DiKL/blob/HEAD/DiKL/models/dm_utils.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e63616b709d7b674"}},{"code_sha256_prefix":"97f8fa3693aa3225","entry":"sample_from_array","repo":"jiajunhe98/DiKL","repo_kind":"official","path":"DiKL/energy/lj.py","file_url":"https://github.com/jiajunhe98/DiKL/blob/HEAD/DiKL/energy/lj.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"97f8fa3693aa3225"}},{"code_sha256_prefix":"99db9eab31a4b281","entry":"target_density_and_grad_fn_full","repo":"jiajunhe98/DiKL","repo_kind":"official","path":"DiKL/sampler/ais.py","file_url":"https://github.com/jiajunhe98/DiKL/blob/HEAD/DiKL/sampler/ais.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"99db9eab31a4b281"}},{"code_sha256_prefix":"c0348b436c7ff544","entry":"total_variation_distance","repo":"jiajunhe98/DiKL","repo_kind":"official","path":"DiKL/evaluation/metric.py","file_url":"https://github.com/jiajunhe98/DiKL/blob/HEAD/DiKL/evaluation/metric.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c0348b436c7ff544"}},{"code_sha256_prefix":"bc66f19be57720e7","entry":"unsorted_segment_mean","repo":"jiajunhe98/DiKL","repo_kind":"official","path":"DiKL/models/egnn.py","file_url":"https://github.com/jiajunhe98/DiKL/blob/HEAD/DiKL/models/egnn.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bc66f19be57720e7"}},{"code_sha256_prefix":"dfdf6dc1a0720e57","entry":"unsorted_segment_sum","repo":"jiajunhe98/DiKL","repo_kind":"official","path":"DiKL/models/egnn.py","file_url":"https://github.com/jiajunhe98/DiKL/blob/HEAD/DiKL/models/egnn.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"dfdf6dc1a0720e57"}},{"code_sha256_prefix":"6f5bee0c5377e751","entry":"wasserstein","repo":"jiajunhe98/DiKL","repo_kind":"official","path":"DiKL/evaluation/optimal_transport.py","file_url":"https://github.com/jiajunhe98/DiKL/blob/HEAD/DiKL/evaluation/optimal_transport.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6f5bee0c5377e751"}},{"code_sha256_prefix":"9d543034eb6d9ec3","entry":"AIS","repo":"jiajunhe98/DiKL","repo_kind":"official","path":"DiKL/sampler/ais.py","file_url":"https://github.com/jiajunhe98/DiKL/blob/HEAD/DiKL/sampler/ais.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":"9d543034eb6d9ec3"}},{"code_sha256_prefix":"37d26b88d3365920","entry":"extract","repo":"jiajunhe98/DiKL","repo_kind":"official","path":"DiKL/models/dm_utils.py","file_url":"https://github.com/jiajunhe98/DiKL/blob/HEAD/DiKL/models/dm_utils.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":"37d26b88d3365920"}},{"code_sha256_prefix":"ff8886e0aa6b6e69","entry":"get_network","repo":"jiajunhe98/DiKL","repo_kind":"official","path":"DiKL/train_utils.py","file_url":"https://github.com/jiajunhe98/DiKL/blob/HEAD/DiKL/train_utils.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":"ff8886e0aa6b6e69"}},{"code_sha256_prefix":"b1acbf2faa52b3e8","entry":"get_sample","repo":"jiajunhe98/DiKL","repo_kind":"official","path":"DiKL/train_utils.py","file_url":"https://github.com/jiajunhe98/DiKL/blob/HEAD/DiKL/train_utils.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":"b1acbf2faa52b3e8"}},{"code_sha256_prefix":"3c1b0fd4fe0ce00b","entry":"get_target","repo":"jiajunhe98/DiKL","repo_kind":"official","path":"DiKL/train_utils.py","file_url":"https://github.com/jiajunhe98/DiKL/blob/HEAD/DiKL/train_utils.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":"3c1b0fd4fe0ce00b"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}