{"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/linear-combinations-of-latents-in-diffusion","title":"Linear combinations of latents in generative models: subspaces and beyond","arxiv_id":"2408.08558","date":"2024-08-16","proceeding":null,"authors":["Erik Bodin","Alexandru Stere","Dragos D. Margineantu","Carl Henrik Ek","Henry Moss"],"abstract":"Sampling from generative models has become a crucial tool for applications like data synthesis and augmentation. Diffusion, Flow Matching and Continuous Normalising Flows have shown effectiveness across various modalities, and rely on latent variables for generation. For experimental design or creative applications that require more control over the generation process, it has become common to manipulate the latent variable directly. However, existing approaches for performing such manipulations (e.g. interpolation or forming low-dimensional representations) only work well in special cases or are network or data-modality specific. We propose Latent Optimal Linear combinations (LOL) as a general-purpose method to form linear combinations of latent variables that adhere to the assumptions of the generative model. As LOL is easy to implement and naturally addresses the broader task of forming any linear combinations, e.g. the construction of subspaces of the latent space, LOL dramatically simplifies the creation of expressive low-dimensional representations of high-dimensional objects.","url_abs":"https://arxiv.org/abs/2408.08558v7","url_pdf":"https://arxiv.org/pdf/2408.08558v7.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":"linear-combinations-of-latents-in-diffusion","repo_url":"https://github.com/bodin-e/linear-combinations-of-latents","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"jax","reach":null}],"tasks":[{"task_slug":"experimental-design","task_name":"Experimental Design"},{"task_slug":"normalising-flows","task_name":"Normalising Flows"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"},{"method_slug":"normalizing-flows","method_name":"Normalizing Flows"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2408.08558","atlas_url":"https://app.syntology.ai/?focus=2408.08558","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2408.08558"}},"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":"deterministic:regex_extraction","url":"https://github.com/bodin-e/linear-combinations-of-latents","reach":null}],"summary":{"ran_fixture":2,"unverified":1},"by_repo_kind":{"official":{"samples":3,"ran":2,"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":"05f8a360b585d2c6","entry":"_handle_singularity_at_zero","repo":"bodin-e/linear-combinations-of-latents","repo_kind":"official","path":"lolatents/lol_torch.py","file_url":"https://github.com/bodin-e/linear-combinations-of-latents/blob/HEAD/lolatents/lol_torch.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"05f8a360b585d2c6"}},{"code_sha256_prefix":"af5f82a4ca5e8df5","entry":"lol_gaussian","repo":"bodin-e/linear-combinations-of-latents","repo_kind":"official","path":"lolatents/lol_torch.py","file_url":"https://github.com/bodin-e/linear-combinations-of-latents/blob/HEAD/lolatents/lol_torch.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"af5f82a4ca5e8df5"}},{"code_sha256_prefix":"a4a6fec1c2071f78","entry":"_check_larger_than_zero","repo":"bodin-e/linear-combinations-of-latents","repo_kind":"official","path":"lolatents/lol_torch.py","file_url":"https://github.com/bodin-e/linear-combinations-of-latents/blob/HEAD/lolatents/lol_torch.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":"a4a6fec1c2071f78"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}