{"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/diffusion-models-are-evolutionary-algorithms","title":"Diffusion Models are Evolutionary Algorithms","arxiv_id":"2410.02543","date":"2024-10-03","proceeding":null,"authors":["Yanbo Zhang","Benedikt Hartl","Hananel Hazan","Michael Levin"],"abstract":"In a convergence of machine learning and biology, we reveal that diffusion models are evolutionary algorithms. By considering evolution as a denoising process and reversed evolution as diffusion, we mathematically demonstrate that diffusion models inherently perform evolutionary algorithms, naturally encompassing selection, mutation, and reproductive isolation. Building on this equivalence, we propose the Diffusion Evolution method: an evolutionary algorithm utilizing iterative denoising -- as originally introduced in the context of diffusion models -- to heuristically refine solutions in parameter spaces. Unlike traditional approaches, Diffusion Evolution efficiently identifies multiple optimal solutions and outperforms prominent mainstream evolutionary algorithms. Furthermore, leveraging advanced concepts from diffusion models, namely latent space diffusion and accelerated sampling, we introduce Latent Space Diffusion Evolution, which finds solutions for evolutionary tasks in high-dimensional complex parameter space while significantly reducing computational steps. This parallel between diffusion and evolution not only bridges two different fields but also opens new avenues for mutual enhancement, raising questions about open-ended evolution and potentially utilizing non-Gaussian or discrete diffusion models in the context of Diffusion Evolution.","url_abs":"https://arxiv.org/abs/2410.02543v2","url_pdf":"https://arxiv.org/pdf/2410.02543v2.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":"diffusion-models-are-evolutionary-algorithms","repo_url":"https://github.com/Zhangyanbo/diffusion-evolution","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"denoising","task_name":"Denoising"},{"task_slug":"evolutionary-algorithms","task_name":"Evolutionary Algorithms"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2410.02543","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2410.02543"}},"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/Zhangyanbo/diffusion-evolution","reach":null}],"summary":{"ran":4,"ran_draft_wrong":2,"ran_violates":1,"ran_fixture":1,"ran_honours":2,"unverified":1},"by_repo_kind":{"official":{"samples":11,"ran":10,"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":"8ba778ff16d2c4f7","entry":"BayesianEstimator","repo":"Zhangyanbo/diffusion-evolution","repo_kind":"official","path":"diffevo/optimizer.py","file_url":"https://github.com/Zhangyanbo/diffusion-evolution/blob/HEAD/diffevo/optimizer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"8ba778ff16d2c4f7"}},{"code_sha256_prefix":"8b585a04523c0a9d","entry":"BayesianGenerator","repo":"Zhangyanbo/diffusion-evolution","repo_kind":"official","path":"diffevo/optimizer.py","file_url":"https://github.com/Zhangyanbo/diffusion-evolution/blob/HEAD/diffevo/optimizer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"8b585a04523c0a9d"}},{"code_sha256_prefix":"a61f6693c4182262","entry":"DDIMScheduler","repo":"Zhangyanbo/diffusion-evolution","repo_kind":"official","path":"diffevo/optimizer.py","file_url":"https://github.com/Zhangyanbo/diffusion-evolution/blob/HEAD/diffevo/optimizer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"a61f6693c4182262"}},{"code_sha256_prefix":"5e3a40fa59c113e0","entry":"Identity","repo":"Zhangyanbo/diffusion-evolution","repo_kind":"official","path":"diffevo/optimizer.py","file_url":"https://github.com/Zhangyanbo/diffusion-evolution/blob/HEAD/diffevo/optimizer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"5e3a40fa59c113e0"}},{"code_sha256_prefix":"0e279a90e8f567ef","entry":"KDE","repo":"Zhangyanbo/diffusion-evolution","repo_kind":"official","path":"diffevo/optimizer.py","file_url":"https://github.com/Zhangyanbo/diffusion-evolution/blob/HEAD/diffevo/optimizer.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"0e279a90e8f567ef"}},{"code_sha256_prefix":"0e088813836b4325","entry":"calculate_dim","repo":"zhangyanbo/diffusion-evolution","repo_kind":"official","path":"experiments/RL/diffRL/experiments.py","file_url":"https://github.com/zhangyanbo/diffusion-evolution/blob/HEAD/experiments/RL/diffRL/experiments.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"0e088813836b4325"}},{"code_sha256_prefix":"fe659543339f194c","entry":"ddim_step","repo":"Zhangyanbo/diffusion-evolution","repo_kind":"official","path":"diffevo/optimizer.py","file_url":"https://github.com/Zhangyanbo/diffusion-evolution/blob/HEAD/diffevo/optimizer.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"fe659543339f194c"}},{"code_sha256_prefix":"0fa9c93146146013","entry":"ddpm_sigma","repo":"Zhangyanbo/diffusion-evolution","repo_kind":"official","path":"diffevo/optimizer.py","file_url":"https://github.com/Zhangyanbo/diffusion-evolution/blob/HEAD/diffevo/optimizer.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"0fa9c93146146013"}},{"code_sha256_prefix":"809084a9f4de7e1f","entry":"distance_matrix","repo":"Zhangyanbo/diffusion-evolution","repo_kind":"official","path":"diffevo/optimizer.py","file_url":"https://github.com/Zhangyanbo/diffusion-evolution/blob/HEAD/diffevo/optimizer.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"809084a9f4de7e1f"}},{"code_sha256_prefix":"cedb8b3d8057d15d","entry":"project_to_1d","repo":"Zhangyanbo/diffusion-evolution","repo_kind":"official","path":"experiments/2d_models/experiment.py","file_url":"https://github.com/Zhangyanbo/diffusion-evolution/blob/HEAD/experiments/2d_models/experiment.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"cedb8b3d8057d15d"}},{"code_sha256_prefix":"007d6f984a8b1791","entry":"DiffEvo","repo":"Zhangyanbo/diffusion-evolution","repo_kind":"official","path":"diffevo/optimizer.py","file_url":"https://github.com/Zhangyanbo/diffusion-evolution/blob/HEAD/diffevo/optimizer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"007d6f984a8b1791"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}