{"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/sequential-monte-carlo-for-inclusive-kl","title":"Sequential Monte Carlo for Inclusive KL Minimization in Amortized Variational Inference","arxiv_id":"2403.10610","date":"2024-03-15","proceeding":null,"authors":["Declan McNamara","Jackson Loper","Jeffrey Regier"],"abstract":"For training an encoder network to perform amortized variational inference, the Kullback-Leibler (KL) divergence from the exact posterior to its approximation, known as the inclusive or forward KL, is an increasingly popular choice of variational objective due to the mass-covering property of its minimizer. However, minimizing this objective is challenging. A popular existing approach, Reweighted Wake-Sleep (RWS), suffers from heavily biased gradients and a circular pathology that results in highly concentrated variational distributions. As an alternative, we propose SMC-Wake, a procedure for fitting an amortized variational approximation that uses likelihood-tempered sequential Monte Carlo samplers to estimate the gradient of the inclusive KL divergence. We propose three gradient estimators, all of which are asymptotically unbiased in the number of iterations and two of which are strongly consistent. Our method interleaves stochastic gradient updates, SMC samplers, and iterative improvement to an estimate of the normalizing constant to reduce bias from self-normalization. In experiments with both simulated and real datasets, SMC-Wake fits variational distributions that approximate the posterior more accurately than existing methods.","url_abs":"https://arxiv.org/abs/2403.10610v1","url_pdf":"https://arxiv.org/pdf/2403.10610v1.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":"sequential-monte-carlo-for-inclusive-kl","repo_url":"https://github.com/declanmcnamara/smc-wake","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"variational-inference","task_name":"Variational Inference"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2403.10610","atlas_url":"https://app.syntology.ai/?focus=2403.10610","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.10610"}},"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/declanmcnamara/smc-wake","reach":{"status":"ok"}}],"summary":{"ran":4,"unverified":7},"by_repo_kind":{"official":{"samples":11,"ran":4,"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":11,"samples":[{"code_sha256_prefix":"386eeb10aa3dd7b3","entry":"generate_data","repo":"declanmcnamara/smc-wake","repo_kind":"official","path":"high_dim_gaussian/generate.py","file_url":"https://github.com/declanmcnamara/smc-wake/blob/HEAD/high_dim_gaussian/generate.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"386eeb10aa3dd7b3"}},{"code_sha256_prefix":"a310c92b15102f02","entry":"get_imp_weights","repo":"declanmcnamara/smc-wake","repo_kind":"official","path":"normalized_mnist/losses.py","file_url":"https://github.com/declanmcnamara/smc-wake/blob/HEAD/normalized_mnist/losses.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a310c92b15102f02"}},{"code_sha256_prefix":"9a18356627203e56","entry":"vector_gather","repo":"declanmcnamara/smc-wake","repo_kind":"official","path":"normalized_mnist/modules.py","file_url":"https://github.com/declanmcnamara/smc-wake/blob/HEAD/normalized_mnist/modules.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9a18356627203e56"}},{"code_sha256_prefix":"68f90104b4f18de7","entry":"wake_loss","repo":"declanmcnamara/smc-wake","repo_kind":"official","path":"normalized_mnist/losses.py","file_url":"https://github.com/declanmcnamara/smc-wake/blob/HEAD/normalized_mnist/losses.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"68f90104b4f18de7"}},{"code_sha256_prefix":"aa299603db06b256","entry":"get_imp_weights","repo":"declanmcnamara/smc-wake","repo_kind":"official","path":"high_dim_gaussian/losses.py","file_url":"https://github.com/declanmcnamara/smc-wake/blob/HEAD/high_dim_gaussian/losses.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":"aa299603db06b256"}},{"code_sha256_prefix":"1cff35685264e784","entry":"get_smc_items","repo":"declanmcnamara/smc-wake","repo_kind":"official","path":"provabgs/losses.py","file_url":"https://github.com/declanmcnamara/smc-wake/blob/HEAD/provabgs/losses.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":"1cff35685264e784"}},{"code_sha256_prefix":"807835256b2c088b","entry":"get_smc_items","repo":"declanmcnamara/smc-wake","repo_kind":"official","path":"two_moons/losses.py","file_url":"https://github.com/declanmcnamara/smc-wake/blob/HEAD/two_moons/losses.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":"807835256b2c088b"}},{"code_sha256_prefix":"75a44364541f9fb7","entry":"smc_wake_loss","repo":"declanmcnamara/smc-wake","repo_kind":"official","path":"high_dim_gaussian/losses.py","file_url":"https://github.com/declanmcnamara/smc-wake/blob/HEAD/high_dim_gaussian/losses.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":"75a44364541f9fb7"}},{"code_sha256_prefix":"b89e7522304e0814","entry":"smc_wake_loss2","repo":"declanmcnamara/smc-wake","repo_kind":"official","path":"normalized_mnist/losses.py","file_url":"https://github.com/declanmcnamara/smc-wake/blob/HEAD/normalized_mnist/losses.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":"b89e7522304e0814"}},{"code_sha256_prefix":"d140ff0ac707ea7b","entry":"smc_wake_loss_a","repo":"declanmcnamara/smc-wake","repo_kind":"official","path":"provabgs/losses.py","file_url":"https://github.com/declanmcnamara/smc-wake/blob/HEAD/provabgs/losses.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":"d140ff0ac707ea7b"}},{"code_sha256_prefix":"0ea3634072abc018","entry":"smc_wake_loss_naive","repo":"declanmcnamara/smc-wake","repo_kind":"official","path":"two_moons/losses.py","file_url":"https://github.com/declanmcnamara/smc-wake/blob/HEAD/two_moons/losses.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":"0ea3634072abc018"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}