{"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/resampling-gradients-vanish-in-differentiable","title":"Resampling Gradients Vanish in Differentiable Sequential Monte Carlo Samplers","arxiv_id":"2304.14390","date":"2023-04-27","proceeding":null,"authors":["Johannes Zenn","Robert Bamler"],"abstract":"Annealed Importance Sampling (AIS) moves particles along a Markov chain from a tractable initial distribution to an intractable target distribution. The recently proposed Differentiable AIS (DAIS) (Geffner and Domke, 2021; Zhang et al., 2021) enables efficient optimization of the transition kernels of AIS and of the distributions. However, we observe a low effective sample size in DAIS, indicating degenerate distributions. We thus propose to extend DAIS by a resampling step inspired by Sequential Monte Carlo. Surprisingly, we find empirically-and can explain theoretically-that it is not necessary to differentiate through the resampling step which avoids gradient variance issues observed in similar approaches for Particle Filters (Maddison et al., 2017; Naesseth et al., 2018; Le et al., 2018).","url_abs":"https://arxiv.org/abs/2304.14390v1","url_pdf":"https://arxiv.org/pdf/2304.14390v1.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":"resampling-gradients-vanish-in-differentiable","repo_url":"https://github.com/jzenn/dsmcs","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2304.14390","atlas_url":"https://app.syntology.ai/?focus=2304.14390","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2304.14390"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/jzenn/dsmcs","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_violates":1,"unverified":5},"by_repo_kind":{"official":{"samples":6,"ran":1,"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":"4cb6d71f93380cec","entry":"log_mean_exp","repo":"jzenn/dsmcs","repo_kind":"official","path":"src/sampling/dais.py","file_url":"https://github.com/jzenn/dsmcs/blob/HEAD/src/sampling/dais.py","link_basis":"plan_row","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4cb6d71f93380cec"}},{"code_sha256_prefix":"3c9e87fd6dac22b8","entry":"get_betas","repo":"jzenn/dsmcs","repo_kind":"official","path":"src/sampling/betas.py","file_url":"https://github.com/jzenn/dsmcs/blob/HEAD/src/sampling/betas.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":"3c9e87fd6dac22b8"}},{"code_sha256_prefix":"7939c162c5154ba4","entry":"get_deltas","repo":"jzenn/dsmcs","repo_kind":"official","path":"src/sampling/deltas.py","file_url":"https://github.com/jzenn/dsmcs/blob/HEAD/src/sampling/deltas.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":"7939c162c5154ba4"}},{"code_sha256_prefix":"add30648a72dc33b","entry":"get_log_ess_from_log_particle_weights","repo":"jzenn/dsmcs","repo_kind":"official","path":"src/sampling/resampling.py","file_url":"https://github.com/jzenn/dsmcs/blob/HEAD/src/sampling/resampling.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":"add30648a72dc33b"}},{"code_sha256_prefix":"53d7289bea977ba2","entry":"get_resampling_callable","repo":"jzenn/dsmcs","repo_kind":"official","path":"src/sampling/resampling.py","file_url":"https://github.com/jzenn/dsmcs/blob/HEAD/src/sampling/resampling.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":"53d7289bea977ba2"}},{"code_sha256_prefix":"ea779105d2353cf8","entry":"no_resampling","repo":"jzenn/dsmcs","repo_kind":"official","path":"src/sampling/resampling.py","file_url":"https://github.com/jzenn/dsmcs/blob/HEAD/src/sampling/resampling.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":"ea779105d2353cf8"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}