{"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/latent-graph-diffusion-a-unified-framework","title":"Unifying Generation and Prediction on Graphs with Latent Graph Diffusion","arxiv_id":"2402.02518","date":"2024-02-04","proceeding":null,"authors":["Cai Zhou","Xiyuan Wang","Muhan Zhang"],"abstract":"In this paper, we propose the first framework that enables solving graph learning tasks of all levels (node, edge and graph) and all types (generation, regression and classification) using one formulation. We first formulate prediction tasks including regression and classification into a generic (conditional) generation framework, which enables diffusion models to perform deterministic tasks with provable guarantees. We then propose Latent Graph Diffusion (LGD), a generative model that can generate node, edge, and graph-level features of all categories simultaneously. We achieve this goal by embedding the graph structures and features into a latent space leveraging a powerful encoder and decoder, then training a diffusion model in the latent space. LGD is also capable of conditional generation through a specifically designed cross-attention mechanism. Leveraging LGD and the ``all tasks as generation'' formulation, our framework is capable of solving graph tasks of various levels and types. We verify the effectiveness of our framework with extensive experiments, where our models achieve state-of-the-art or highly competitive results across a wide range of generation and regression tasks.","url_abs":"https://arxiv.org/abs/2402.02518v2","url_pdf":"https://arxiv.org/pdf/2402.02518v2.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":"latent-graph-diffusion-a-unified-framework","repo_url":"https://github.com/zhouc20/latentgraphdiffusion","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"all","task_name":"All"},{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":"graph-learning","task_name":"Graph Learning"},{"task_slug":"regression-1","task_name":"regression"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2402.02518","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.02518"}},"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":"deterministic:regex_extraction","url":"https://github.com/zhouc20/LatentGraphDiffusion","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zhouc20/latentgraphdiffusion","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_violates":1,"ran_draft_wrong":2,"ran":2,"unverified":8},"by_repo_kind":{"official":{"samples":13,"ran":5,"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":"4cb732f513d69dfd","entry":"disabled_train","repo":"zhouc20/LatentGraphDiffusion","repo_kind":"official","path":"lgd/ddpm/LGD.py","file_url":"https://github.com/zhouc20/LatentGraphDiffusion/blob/HEAD/lgd/ddpm/LGD.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4cb732f513d69dfd"}},{"code_sha256_prefix":"b888018e8acd3f1d","entry":"get_activation","repo":"zhouc20/latentgraphdiffusion","repo_kind":"official","path":"lgd/layer/Exphormer.py","file_url":"https://github.com/zhouc20/latentgraphdiffusion/blob/HEAD/lgd/layer/Exphormer.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b888018e8acd3f1d"}},{"code_sha256_prefix":"1bb331bf70a78136","entry":"get_final_pretrained_ckpt","repo":"zhouc20/latentgraphdiffusion","repo_kind":"official","path":"lgd/finetuning.py","file_url":"https://github.com/zhouc20/latentgraphdiffusion/blob/HEAD/lgd/finetuning.py","link_basis":"harvester_set","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":"1bb331bf70a78136"}},{"code_sha256_prefix":"585566394225e457","entry":"new_optimizer_config","repo":"zhouc20/latentgraphdiffusion","repo_kind":"official","path":"pretrain.py","file_url":"https://github.com/zhouc20/latentgraphdiffusion/blob/HEAD/pretrain.py","link_basis":"harvester_set","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":"585566394225e457"}},{"code_sha256_prefix":"d48d8354986e3b0e","entry":"uniform_on_device","repo":"zhouc20/LatentGraphDiffusion","repo_kind":"official","path":"lgd/ddpm/LGD.py","file_url":"https://github.com/zhouc20/LatentGraphDiffusion/blob/HEAD/lgd/ddpm/LGD.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d48d8354986e3b0e"}},{"code_sha256_prefix":"ae56bcfaae96da3c","entry":"apply_chunking_to_forward","repo":"zhouc20/latentgraphdiffusion","repo_kind":"official","path":"lgd/layer/bigbird_layer.py","file_url":"https://github.com/zhouc20/latentgraphdiffusion/blob/HEAD/lgd/layer/bigbird_layer.py","link_basis":"harvester_set","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":"ae56bcfaae96da3c"}},{"code_sha256_prefix":"7267dc7d02fa739e","entry":"create_model_custom","repo":"zhouc20/latentgraphdiffusion","repo_kind":"official","path":"pretrain.py","file_url":"https://github.com/zhouc20/latentgraphdiffusion/blob/HEAD/pretrain.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":"7267dc7d02fa739e"}},{"code_sha256_prefix":"b8ea7231e959f164","entry":"init_model_from_pretrained","repo":"zhouc20/latentgraphdiffusion","repo_kind":"official","path":"lgd/finetuning.py","file_url":"https://github.com/zhouc20/latentgraphdiffusion/blob/HEAD/lgd/finetuning.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":"b8ea7231e959f164"}},{"code_sha256_prefix":"c98a702be0660ac9","entry":"is_seed","repo":"zhouc20/latentgraphdiffusion","repo_kind":"official","path":"lgd/agg_runs.py","file_url":"https://github.com/zhouc20/latentgraphdiffusion/blob/HEAD/lgd/agg_runs.py","link_basis":"harvester_set","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":"c98a702be0660ac9"}},{"code_sha256_prefix":"438635c08adfe2aa","entry":"is_split","repo":"zhouc20/latentgraphdiffusion","repo_kind":"official","path":"lgd/agg_runs.py","file_url":"https://github.com/zhouc20/latentgraphdiffusion/blob/HEAD/lgd/agg_runs.py","link_basis":"harvester_set","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":"438635c08adfe2aa"}},{"code_sha256_prefix":"40e98e1ecbf39f34","entry":"join_list","repo":"zhouc20/latentgraphdiffusion","repo_kind":"official","path":"lgd/agg_runs.py","file_url":"https://github.com/zhouc20/latentgraphdiffusion/blob/HEAD/lgd/agg_runs.py","link_basis":"harvester_set","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":"40e98e1ecbf39f34"}},{"code_sha256_prefix":"28028986fdd293d2","entry":"load_pretrained_model_cfg","repo":"zhouc20/latentgraphdiffusion","repo_kind":"official","path":"lgd/finetuning.py","file_url":"https://github.com/zhouc20/latentgraphdiffusion/blob/HEAD/lgd/finetuning.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":"28028986fdd293d2"}},{"code_sha256_prefix":"a7aa470daf7aba0e","entry":"random_mask","repo":"zhouc20/latentgraphdiffusion","repo_kind":"official","path":"utils.py","file_url":"https://github.com/zhouc20/latentgraphdiffusion/blob/HEAD/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":"a7aa470daf7aba0e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}