{"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/arxiv-2605-18055","title":"FLAG: Foundation model representation with Latent diffusion Alignment via Graph for spatial gene expression prediction","arxiv_id":"2605.18055","date":"2026-05-18","proceeding":"ICML","authors":["Qi Si","Penglei Wang","Yushuai Wu","Yifeng Jiao","Xuyang Liu","Xin Guo","Yuan Qi","Yuan Cheng"],"abstract":"Predicting spatial gene expression from routine H\\&E enables large-scale molecular profiling, yet current models treat this as isolated pointwise tasks, thereby overlooking essential biological structures like gene coordination and spatial distribution. To preserve these relationships, we introduce \\textbf{FLAG}, a diffusion-based framework that redefines this task as structured distribution modeling. At the same time, we identify the critical \\textbf{Gene Dimension Curse}, where joint modeling gene expression and their spatial interactions fail in high-dimensional spaces, and FLAG solves this challenge by integrating a spatial graph encoder for topological consistency and utilizing Gene Foundation Model (GFM) alignment for gene-gene fidelity in the generation process. To rigorously assess model performance, we propose a set of novel structural evaluation metrics, including Gene Structural Correlation (\\textbf{GSC}) and Spatial Structural Correlation (\\textbf{SSC}). Our experiments demonstrate that FLAG is highly competitive in traditional accuracy (PCC/MSE) while achieving significantly enhanced structural fidelity in capturing both gene-gene and gene-spatial relationships. The code is available at https://github.com/darkflash03/FLAG.","url_abs":"https://arxiv.org/abs/2605.18055","url_pdf":"https://arxiv.org/pdf/2605.18055","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2605.18055","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2605.18055"}},"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":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/darkflash03/FLAG","reach":null}],"summary":{"ran":8,"unverified":2},"by_repo_kind":{"found_in_text":{"samples":10,"ran":8,"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":10,"samples":[{"code_sha256_prefix":"747ab0177ac7241d","entry":"AdaLayerNorm","repo":"darkflash03/FLAG","repo_kind":"found_in_text","path":"models/graph_dit_repa.py","file_url":"https://github.com/darkflash03/FLAG/blob/HEAD/models/graph_dit_repa.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":"747ab0177ac7241d"}},{"code_sha256_prefix":"72472564c31309c5","entry":"CondEdgeProj","repo":"darkflash03/FLAG","repo_kind":"found_in_text","path":"models/graph_dit_repa.py","file_url":"https://github.com/darkflash03/FLAG/blob/HEAD/models/graph_dit_repa.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"72472564c31309c5"}},{"code_sha256_prefix":"535fb4790a0a7fb7","entry":"CondNodePairProj","repo":"darkflash03/FLAG","repo_kind":"found_in_text","path":"models/graph_dit_repa.py","file_url":"https://github.com/darkflash03/FLAG/blob/HEAD/models/graph_dit_repa.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"535fb4790a0a7fb7"}},{"code_sha256_prefix":"c3dde9e164432a16","entry":"DiTBlock","repo":"darkflash03/FLAG","repo_kind":"found_in_text","path":"models/graph_dit_repa.py","file_url":"https://github.com/darkflash03/FLAG/blob/HEAD/models/graph_dit_repa.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c3dde9e164432a16"}},{"code_sha256_prefix":"99e2d26fbcf322cd","entry":"FinalLayer","repo":"darkflash03/FLAG","repo_kind":"found_in_text","path":"models/graph_dit_repa.py","file_url":"https://github.com/darkflash03/FLAG/blob/HEAD/models/graph_dit_repa.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":"99e2d26fbcf322cd"}},{"code_sha256_prefix":"7610684f2580a32c","entry":"GeneJointEmbedding","repo":"darkflash03/FLAG","repo_kind":"found_in_text","path":"models/graph_dit_repa.py","file_url":"https://github.com/darkflash03/FLAG/blob/HEAD/models/graph_dit_repa.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7610684f2580a32c"}},{"code_sha256_prefix":"1e4e5bf17e85dd12","entry":"GraphTransformerBlock","repo":"darkflash03/FLAG","repo_kind":"found_in_text","path":"models/graph_dit_repa.py","file_url":"https://github.com/darkflash03/FLAG/blob/HEAD/models/graph_dit_repa.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1e4e5bf17e85dd12"}},{"code_sha256_prefix":"1b866122de2b304d","entry":"TimestepEmbedder","repo":"darkflash03/FLAG","repo_kind":"found_in_text","path":"models/graph_dit_repa.py","file_url":"https://github.com/darkflash03/FLAG/blob/HEAD/models/graph_dit_repa.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1b866122de2b304d"}},{"code_sha256_prefix":"c0756efd203531b5","entry":"GraphDitRepa","repo":"darkflash03/FLAG","repo_kind":"found_in_text","path":"models/graph_dit_repa.py","file_url":"https://github.com/darkflash03/FLAG/blob/HEAD/models/graph_dit_repa.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":"c0756efd203531b5"}},{"code_sha256_prefix":"731244e581d10bc7","entry":"GraphModel","repo":"darkflash03/FLAG","repo_kind":"found_in_text","path":"models/graph_dit_repa.py","file_url":"https://github.com/darkflash03/FLAG/blob/HEAD/models/graph_dit_repa.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":"731244e581d10bc7"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.LG","source":"arxiv_2026.jsonl"},"syntology_extracted_results":null}