{"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-07048","title":"Unlocking High-Fidelity Molecular Generation from Mass Spectra via Dual-Stream Line Graph Diffusion","arxiv_id":"2605.07048","date":"2026-05-07","proceeding":null,"authors":["Xujun Che","Xiuxia Du","Depeng Xu"],"abstract":"De novo molecular generation from tandem mass spectra is a challenging inverse problem whose core difficulty lies in the circular dependency between atom-level and bond-level reasoning: determining a bond's type requires knowing its endpoint atoms' chemical environment, yet an atom's environment is in turn defined by its incident bonds. Existing graph diffusion methods process atoms and bonds within a single computation stream, where atom-bond information synchronization can only occur implicitly across layers. We argue that this single-stream paradigm, rather than the choice of any particular aggregation kernel, is a key architectural bottleneck. We propose DualLGD (Dual-stream Line Graph Diffusion), which reformulates molecular graph denoising as the alternating solution of two coupled subproblems: atom-level reasoning and bond-level reasoning, each operating in its own dedicated representation space. The line graph provides a natural mathematical construction for the bond space, in which bond angles, dihedrals, conjugation chains, and rings correspond to local topological motifs between bonds. Incidence-constrained bidirectional cross-attention synchronizes the two streams at every layer, ensuring that each atom attends only to its incident bonds and vice versa, respecting the fundamental chemical principle that an atom's environment is determined by its bonding context. On the NPLIB1 and MassSpecGym benchmarks, DualLGD achieves top-1 accuracy of 34.37\\% and 23.89\\%, approximately $3\\times$ the previous state of the art. Ablation studies confirm the architecture as the primary source of improvement: DualLGD without any pre-training already surpasses the previous best fully pretrained model.","url_abs":"https://arxiv.org/abs/2605.07048","url_pdf":"https://arxiv.org/pdf/2605.07048","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":null,"mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2605.07048"}},"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/du-lab-data-science/DualLGD","reach":null}],"summary":{"ran":9,"ran_honours":2,"unverified":5},"by_repo_kind":{"found_in_text":{"samples":16,"ran":11,"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":"7631aefea4a1a618","entry":"ELUPlusOneSelfAttention","repo":"du-lab-data-science/DualLGD","repo_kind":"found_in_text","path":"src/models/duallgd_transformer.py","file_url":"https://github.com/du-lab-data-science/DualLGD/blob/HEAD/src/models/duallgd_transformer.py","link_basis":"first_harvest_node","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":"7631aefea4a1a618"}},{"code_sha256_prefix":"6ce3de746b63cb89","entry":"FeedForward","repo":"du-lab-data-science/DualLGD","repo_kind":"found_in_text","path":"src/models/duallgd_transformer.py","file_url":"https://github.com/du-lab-data-science/DualLGD/blob/HEAD/src/models/duallgd_transformer.py","link_basis":"first_harvest_node","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":"6ce3de746b63cb89"}},{"code_sha256_prefix":"e3aad312f5e73601","entry":"FiLMConditioner","repo":"du-lab-data-science/DualLGD","repo_kind":"found_in_text","path":"src/models/duallgd_transformer.py","file_url":"https://github.com/du-lab-data-science/DualLGD/blob/HEAD/src/models/duallgd_transformer.py","link_basis":"first_harvest_node","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":"e3aad312f5e73601"}},{"code_sha256_prefix":"bffc610dbe3fc42d","entry":"MaskedCrossAttention","repo":"du-lab-data-science/DualLGD","repo_kind":"found_in_text","path":"src/models/duallgd_transformer.py","file_url":"https://github.com/du-lab-data-science/DualLGD/blob/HEAD/src/models/duallgd_transformer.py","link_basis":"first_harvest_node","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":"bffc610dbe3fc42d"}},{"code_sha256_prefix":"455e20737ca978e1","entry":"NodeEdgeBlock","repo":"du-lab-data-science/DualLGD","repo_kind":"found_in_text","path":"src/models/duallgd_transformer.py","file_url":"https://github.com/du-lab-data-science/DualLGD/blob/HEAD/src/models/duallgd_transformer.py","link_basis":"first_harvest_node","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":"455e20737ca978e1"}},{"code_sha256_prefix":"655c597bf5fe6021","entry":"PerformerFeatureMap","repo":"du-lab-data-science/DualLGD","repo_kind":"found_in_text","path":"src/models/duallgd_transformer.py","file_url":"https://github.com/du-lab-data-science/DualLGD/blob/HEAD/src/models/duallgd_transformer.py","link_basis":"first_harvest_node","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":"655c597bf5fe6021"}},{"code_sha256_prefix":"2bfc8f7589e18ce3","entry":"PerformerSelfAttention","repo":"du-lab-data-science/DualLGD","repo_kind":"found_in_text","path":"src/models/duallgd_transformer.py","file_url":"https://github.com/du-lab-data-science/DualLGD/blob/HEAD/src/models/duallgd_transformer.py","link_basis":"first_harvest_node","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":"2bfc8f7589e18ce3"}},{"code_sha256_prefix":"756b84fee8389e11","entry":"SoftmaxSelfAttention","repo":"du-lab-data-science/DualLGD","repo_kind":"found_in_text","path":"src/models/duallgd_transformer.py","file_url":"https://github.com/du-lab-data-science/DualLGD/blob/HEAD/src/models/duallgd_transformer.py","link_basis":"first_harvest_node","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":"756b84fee8389e11"}},{"code_sha256_prefix":"267ec92b6214cdcb","entry":"Xtoy","repo":"du-lab-data-science/DualLGD","repo_kind":"found_in_text","path":"src/models/duallgd_transformer.py","file_url":"https://github.com/du-lab-data-science/DualLGD/blob/HEAD/src/models/duallgd_transformer.py","link_basis":"first_harvest_node","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":"267ec92b6214cdcb"}},{"code_sha256_prefix":"59d4282bb5cdc95d","entry":"_iid_gaussian_random_matrix","repo":"du-lab-data-science/DualLGD","repo_kind":"found_in_text","path":"src/models/duallgd_transformer.py","file_url":"https://github.com/du-lab-data-science/DualLGD/blob/HEAD/src/models/duallgd_transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"59d4282bb5cdc95d"}},{"code_sha256_prefix":"93217a07da57bba8","entry":"_orthogonal_gaussian_random_matrix","repo":"du-lab-data-science/DualLGD","repo_kind":"found_in_text","path":"src/models/duallgd_transformer.py","file_url":"https://github.com/du-lab-data-science/DualLGD/blob/HEAD/src/models/duallgd_transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"93217a07da57bba8"}},{"code_sha256_prefix":"795cd5cd9061fb80","entry":"DualAttentionBlock","repo":"du-lab-data-science/DualLGD","repo_kind":"found_in_text","path":"src/models/duallgd_transformer.py","file_url":"https://github.com/du-lab-data-science/DualLGD/blob/HEAD/src/models/duallgd_transformer.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":"795cd5cd9061fb80"}},{"code_sha256_prefix":"f442cb7661864476","entry":"DualLGD","repo":"du-lab-data-science/DualLGD","repo_kind":"found_in_text","path":"src/models/duallgd_transformer.py","file_url":"https://github.com/du-lab-data-science/DualLGD/blob/HEAD/src/models/duallgd_transformer.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":"f442cb7661864476"}},{"code_sha256_prefix":"11d64ebd668b37b1","entry":"Etoy","repo":"du-lab-data-science/DualLGD","repo_kind":"found_in_text","path":"src/models/duallgd_transformer.py","file_url":"https://github.com/du-lab-data-science/DualLGD/blob/HEAD/src/models/duallgd_transformer.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":"11d64ebd668b37b1"}},{"code_sha256_prefix":"58397444f9e72fe0","entry":"XEyTransformerLayer","repo":"du-lab-data-science/DualLGD","repo_kind":"found_in_text","path":"src/models/duallgd_transformer.py","file_url":"https://github.com/du-lab-data-science/DualLGD/blob/HEAD/src/models/duallgd_transformer.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":"58397444f9e72fe0"}},{"code_sha256_prefix":"bab87e7f0fea40be","entry":"masked_softmax","repo":"du-lab-data-science/DualLGD","repo_kind":"found_in_text","path":"src/models/duallgd_transformer.py","file_url":"https://github.com/du-lab-data-science/DualLGD/blob/HEAD/src/models/duallgd_transformer.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":"bab87e7f0fea40be"}}]},"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":{"kind":"leaderboard_placements","source":"Syntology's leaderboard-shaped extractor over the paper's own arXiv-HTML tables: a model pointed at a cell, the number was read from that cell and checked against the board's metric, dataset, split and scale, and an independent check accepted the entry; not reviewed by the paper's authors or the archive's editors","extractor_model":"global.anthropic.claude-sonnet-4-5-20250929-v1:0","verifier_model":"us.anthropic.claude-sonnet-4-5-20250929-v1:0","prompt_sha":"fa63d4bb9d755694","coverage":{"sentence":"Syntology has checked 6,264 of the 9,581 papers on this site that are newer than the archive; results from the others appear after they are checked.","papers_newer_than_archive":9581,"papers_checked":6264},"entries":[],"not_placed":{"boards":1,"rejected_by_independent_check":1,"refused_by_a_rule":0,"check_did_not_answer":0,"proposed_without_a_cell":0,"declined_by_site":0}}}