{"paper_id":"4519daa4-1d15-4e5f-8f58-806c8bb2e41d","body_text":"Structured Chemical Reaction Modeling with Multitask Graph Neural Networks | bioRxiv /* */ /* */ <!-- <!-- /*! * yepnope1.5.4 * (c) WTFPL, GPLv2 */ (function(a,b,c){function d(a){return\"[object Function]\"==o.call(a)}function e(a){return\"string\"==typeof a}function f(){}function g(a){return!a||\"loaded\"==a||\"complete\"==a||\"uninitialized\"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){(\"c\"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){\"img\"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),\"object\"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height=\"0\",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),\"img\"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||\"j\",e(a)?i(\"c\"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName(\"script\")[0],o={}.toString,p=[],q=0,r=\"MozAppearance\"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&\"[object Opera]\"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?\"object\":l?\"script\":\"img\",v=l?\"script\":u,w=Array.isArray||function(a){return\"[object Array]\"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split(\"!\"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split(\"=\"),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(\".\").pop().split(\"?\").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split(\"/\").pop().split(\"?\")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&\"css\"==i.url.split(\".\").pop().split(\"?\").shift()?\"c\":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0];var j=d.createElement(s);var dl=l!='dataLayer'?'&l='+l:'';j.src='//www.googletagmanager.com/gtm.js?id='+i+dl;j.type='text/javascript';j.async=true;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-M677548'); Skip to main content Home About Submit ALERTS / RSS Search for this keyword Advanced Search New Results Structured Chemical Reaction Modeling with Multitask Graph Neural Networks View ORCID Profile Maryam Astero , View ORCID Profile Anchen Li , View ORCID Profile Elena Casiraghi , View ORCID Profile Juho Rousu doi: https://doi.org/10.1101/2025.10.13.682169 Maryam Astero 1 Aalto University Find this author on Google Scholar Find this author on PubMed Search for this author on this site ORCID record for Maryam Astero For correspondence: maryam.astero{at}aalto.fi Anchen Li 1 Aalto University Find this author on Google Scholar Find this author on PubMed Search for this author on this site ORCID record for Anchen Li Elena Casiraghi 2 University of Milan Find this author on Google Scholar Find this author on PubMed Search for this author on this site ORCID record for Elena Casiraghi Juho Rousu 3 Aalto University & Tufts University Find this author on Google Scholar Find this author on PubMed Search for this author on this site ORCID record for Juho Rousu Abstract Full Text Info/History Metrics Preview PDF Abstract Modeling chemical reactions requires connecting fine-grained atom–bond edits with broader semantic categories. Yet, most machine learning approaches model these aspects in isolation: atom mapping, reaction center identification, and reaction classification are treated as separate problems. This separation limits accuracy, interpretability, and generalization. In this work, we argue that multitask learning provides a natural and powerful framework for reaction modeling. By jointly predicting mappings, centers, and classes within a single graph neural network, models can leverage structural dependencies between tasks. We proposed MARCC (Mapping-Assisted Reaction Center and Classification), a multitask architecture that achieves state-of-the-art performance on the USPTO-50K benchmark. MARCC demonstrates that multitask supervision not only improves accuracy across all tasks but also provides a structured representation of reaction mechanisms. 1 Introduction Chemical reactions are multi-scale phenomena. At the local level , atoms rearrange bonds; at the intermediate level , reactive centers define where changes occur; and at the global level , transformations fall into semantic classes (e.g., substitution, elimination). Capturing all three perspectives is critical for reaction understanding, template discovery, and mechanistic inference. Most existing approaches, however, treat these tasks separately. Atom mapping algorithms rely on graph matching or specialized attention modules [ 1 , 2 ]. Reaction center prediction has been cast as rule-based extraction or subgraph labeling [ 3 , 4 ]. Reaction classification typically uses fingerprints or graph embeddings [ 5 , 6 ]. While each area has advanced, the lack of integration overlooks important dependencies: atom mappings, scaffold center prediction, and both local edits and mappings constrain classification. We argue that multitask learning provides a natural and effective framework for reaction modeling. By jointly predicting mappings, centers, and classes, a multitask approach can exploit structural dependencies between tasks and improve generalization. Beyond performance, it also enhances interpretability by producing a unified structural narrative of the reaction. First, atom mapping, center prediction, and classification are inherently interdependent. Knowing which atoms align across reactants and products helps pinpoint the true reaction center, which in turn constrains the possible reaction class. Conversely, global reaction type guides which edits are chemically plausible. Ignoring these couplings forces models to rediscover the same signals separately, often inconsistently. Second, multitask supervision acts as a form of regularization. By learning multiple objectives simultaneously, models avoid overfitting to one narrowly defined task. For example, a classifier trained only on reaction classes may exploit dataset biases, whereas coupling it with atom- and bond-level predictions discourages shortcut learning. Finally, multitask outputs support interpretability. By producing mappings, centers, and classes together, the model yields evidence chains: why a bond edit was chosen, how it relates to atom correspondence, and which global class explains the transformation. This structured output aligns naturally with how chemists reason about reactions. In the following, we introduce MARCC (Mapping-Assisted Reaction Center and Classification), a multitask graph neural framework that operationalizes these ideas by jointly predicting atom mappings, reaction centers, and reaction classes within a unified architecture. 2 The MARCC Framework To study the value of multitask learning in reaction modeling, we introduce MARCC (Mapping- Assisted Reaction Center and Classification), a graph neural network that jointly predicts atom mappings, reaction centers, and reaction classes. Instead of treating these tasks separately, MARCC integrates them into a unified architecture where each task supports the others ( Fig. 1 ). Download figure Open in new tab Figure 1: Overview of the MARCC framework. Reactant ( G R ) and product ( G P ) graphs are encoded with a shared GINE encoder, producing embeddings H R and H P . An Atom Mapper estimates soft atom correspondences via dot-product similarity and Sinkhorn normalization, refined with Weisfeiler–Lehman (WL) symmetry checks. These alignments guide a cross-attention layer that enriches product embeddings , which are then used by task-specific heads for Reaction Center Identification and Reaction Classification . 2.1 Design Principles MARCC is based on three key ideas: Shared representation: Reactant and product molecules are encoded by a common GNN, ensuring that all tasks operate over consistent embeddings. Cross-graph alignment: A differentiable atom-mapping module aligns product atoms to their most likely reactant counterparts. These correspondences are used to guide attention, allowing local edits to be interpreted in the context of structural changes. Task coupling: Atom mapping provides alignment for reaction center prediction, and both mapping and centers constrain the global reaction class. All tasks share parameters and are optimized jointly with adaptive weighting. 2.2 Architecture Overview MARCC consists of three stages. First, a GNN encoder processes reactant and product graphs into atom- and bond-level embeddings. Second, an atom mapping head estimates soft correspondences between atoms, using Sinkhorn normalization to enforce one-to-one alignment. These alignments inform a cross-attention module that enriches product embeddings with mapped reactant context. Finally, task-specific heads make predictions: binary classifiers label reactive atoms and bonds, while pooled embeddings predict the reaction class. 3 Experiments 3.1 Experimental Setup We evaluate MARCC on the USPTO-50K dataset [ 4 , 7 , 8 ], a benchmark with 50k atom-mapped reactions in 10 classes. Canonicalization and remapping [ 4 , 9 ] ensure index invariance. The dataset is split 8:1:1 into training, validation, and test sets. Molecular graphs are built from SMILES using RDKit [ 10 ], with atom (atomic number, charge, chirality, hybridization, aromaticity, etc.) and bond (bond type, conjugation, stereochemistry) features encoded categorically. We evaluate three tasks: (i) reaction center prediction (Top- n Edit Accuracy), (ii) reaction classification (Top-1 Accuracy), and (iii) atom mapping (symmetry-aware accuracy [ 11 ]). Hyperparameters were optimized with Optuna [ 12 , 13 ], balancing objectives with uncertainty-based weighting [ 14 ]. Training used AdamW (lr=10 − 4 , wd=5×10 − 5 ), batch size 32, early stopping, and a single NVIDIA V100 GPU. 3.2 Impact of Multitask Learning Table 1 shows the effect of single-task, dual-task, and full multitask configurations. View this table: View inline View popup Download powerpoint Table 1: Effect of multitask supervision on MARCC. Note: “–” indicates that the corresponding metric was not applicable for the given configuration. Single-task training achieves narrow competence, while dual-task supervision provides partial transfer. The full multitask setup consistently delivers the strongest results, confirming that classification provides global context, reactivity sharpens local edits, and mapping regularizes alignment. 3.3 Comparison with State-of-the-Art We next compare MARCC with leading methods for reaction understanding and atom mapping. Reaction Center and Classification Table 2 compares MARCC against retrosynthesis baselines (GraphRetro [ 4 ], RetroXpert [ 15 ], RCSearcher [ 16 ]) and classifiers (MolBERT [ 17 ], RXGL [ 6 ]). We also report a products-only variant of MARCC that omits reactants and disables alignment for reaction center prediction, whereas classification always uses both reactants and products. View this table: View inline View popup Download powerpoint Table 2: Comparison with prior methods on USPTO-50K. Note: “–” indicates that the corresponding metric was not reported in the original study or is not applicable to that method. Results show that MARCC (Full) far outperforms retrosynthesis-focused baselines, achieving near- perfect edit localization and strong classification. The products-only variant, which excludes reactants for center prediction, performs comparably to other product-only baselines. These results suggest that while classification can be solved reliably with both reactants and products, uncovering the true reaction center demands alignment signals, underscoring the benefit of multitask training. Atom Mapping We further benchmark MARCC’s auxiliary mapping head against dedicated mapping models: RXNMapper [ 2 ], GraphormerMapper [ 18 ], and SAMMNet [ 11 ]. View this table: View inline View popup Download powerpoint Table 3: Atom mapping accuracy on USPTO-50K. MARCC achieves 98.2% mapping accuracy, on par with specialized systems, while also excelling in center prediction and classification. This demonstrates the strength of multitask learning, where all three tasks are interdependent and jointly improve one another. 4 Conclusion We demonstrated that multitask learning provides a principled framework for reaction modeling by jointly integrating atom mapping, reaction-center prediction, and reaction classification. Rather than treating these as isolated objectives, MARCC shows that learning them together yields higher accuracy and stronger interpretability. The three tasks reinforce one another: mapping provides alignment, center prediction captures local edits, and classification supplies global semantic context. This synergy not only advances predictive performance but also offers structured, chemically meaningful explanations. Our results highlight multitask learning as a unifying approach to chemical reaction understanding, with broad potential in biochemical and molecular applications. Funder Information Declared Jenny ja Antti Wihurin Rahasto, https://ror.org/01gpyzq83 Jane and Aatos Erkko Foundation, https://ror.org/03vxy9y38 Research Council of Finland, https://ror.org/05k73zm37 Footnotes maryam.astero{at}aalto.fi anchen.li{at}aalto.fi elena.casiraghi{at}unimi.it juho.rousu{at}aalto.fi References [1]. ↵ J. W. Raymond and P. Willett , “ Maximum common subgraph isomorphism algorithms for the matching of chemical structures ,” Journal of computer-aided molecular design , vol. 16 , pp. 521 – 533 , 2002 . 1 OpenUrl CrossRef PubMed Web of Science [2]. ↵ P. Schwaller , B. Hoover , J.-L. Reymond , H. Strobelt , and T. Laino , “ Extraction of organic chemistry grammar from unsupervised learning of chemical reactions ,” Science Advances , vol. 7 , no. 15 , p. eabe4166 , 2021 . 1, 4 OpenUrl FREE Full Text [3]. ↵ C. W. Coley , L. Rogers , W. H. Green , and K. F. Jensen , “ Computer-assisted retrosynthesis based on molecular similarity ,” ACS central science , vol. 3 , no. 12 , pp. 1237 – 1245 , 2017 . 1 OpenUrl PubMed [4]. ↵ V. R. Somnath , C. Bunne , C. Coley , A. Krause , and R. Barzilay , “ Learning graph models for retrosynthesis prediction ,” Advances in Neural Information Processing Systems , vol. 34 , pp. 9405 – 9415 , 2021 . 1, 3 OpenUrl [5]. ↵ N. Schneider , D. M. Lowe , R. A. Sayle , and G. A. Landrum , “ Development of a novel fingerprint for chemical reactions and its application to large-scale reaction classification and similarity ,” Journal of chemical information and modeling , vol. 55 , no. 1 , pp. 39 – 53 , 2015 . 1 OpenUrl CrossRef PubMed [6]. ↵ A. Li , E. Casiraghi , and J. Rousu , “ Chemical reaction enhanced graph learning for molecule representation ,” Bioinformatics , vol. 40 , no. 10 , p. btae558 , 2024 . 1, 3 OpenUrl PubMed [7]. ↵ D. M. Lowe , “ Extraction of chemical structures and reactions from the literature ,” Ph.D. dissertation, University of Cambridge , 2012 . 3 [8]. ↵ N. Schneider , N. Stiefl , and G. A. Landrum , “ What’s what: The (nearly) definitive guide to reaction role assignment ,” Journal of chemical information and modeling , vol. 56 , no. 12 , pp. 2336 – 2346 , 2016 . 3 OpenUrl PubMed [9]. ↵ M. Astero and J. Rousu , “ Learning symmetry-aware atom mapping in chemical reactions through deep graph matching ,” Journal of Cheminformatics , vol. 16 , no. 1 , p. 46 , 2024 . 3 OpenUrl PubMed [10]. ↵ G. Landrum et al. , “Rdkit: Open-source cheminformatics,” 2006 . 3 [11]. ↵ M. Astero and J. Rousu , “ Enhancing atom mapping with multitask learning and symmetry-aware deep graph matching ,” Journal of Cheminformatics , vol. 17 , no. 87 , 2025 . 3, 4 [12]. ↵ J. Bergstra , R. Bardenet , Y. Bengio , and B. Kégl , “ Algorithms for hyper-parameter optimization ,” Advances in neural information processing systems , vol. 24 , 2011 . 3 [13]. ↵ T. Akiba , S. Sano , T. Yanase , T. Ohta , and M. Koyama , “ Optuna: A next-generation hyperparameter optimization framework ,” in Proceedings of the 25th ACM SIGKDD international conference on knowledge discovery & data mining , 2019 , pp. 2623 – 2631 . 3 [14]. ↵ A. Kendall , Y. Gal , and R. Cipolla , “ Multi-task learning using uncertainty to weigh losses for scene geometry and semantics ,” in Proceedings of the IEEE conference on computer vision and pattern recognition , 2018 , pp. 7482 – 7491 . 3 [15]. ↵ C. Yan , Q. Ding , P. Zhao , S. Zheng , J. Yang , Y. Yu , and J. Huang , “ Retroxpert: Decompose retrosynthesis prediction like a chemist ,” Advances in Neural Information Processing Systems , vol. 33 , pp. 11 248 – 11 258 , 2020 . 3 OpenUrl [16]. ↵ Z. Lan , Z. Zeng , B. Hong , Z. Liu , and F. Ma , “ Rcsearcher: Reaction center identification in retrosynthesis via deep q-learning ,” Pattern Recognition , vol. 150 , p. 110318 , 2024 . 3 OpenUrl [17]. ↵ B. Fabian , T. Edlich , H. Gaspar , M. Segler , J. Meyers , M. Fiscato , and M. Ahmed , “ Molecular representation learning with language models and domain-relevant auxiliary tasks ,” arXiv preprint arXiv: 2011.13230 , 2020 . 3 [18]. ↵ R. Nugmanov , N. Dyubankova , A. Gedich , and J. K. Wegner , “ Bidirectional graphormer for reactivity understanding: neural network trained to reaction atom-to-atom mapping task ,” Journal of Chemical Information and Modeling , vol. 62 , no. 14 , pp. 3307 – 3315 , 2022 . 4 OpenUrl PubMed View the discussion thread. Back to top Previous Next Posted October 14, 2025. Download PDF Email Thank you for your interest in spreading the word about bioRxiv. NOTE: Your email address is requested solely to identify you as the sender of this article. Your Email * Your Name * Send To * Enter multiple addresses on separate lines or separate them with commas. You are going to email the following Structured Chemical Reaction Modeling with Multitask Graph Neural Networks Message Subject (Your Name) has forwarded a page to you from bioRxiv Message Body (Your Name) thought you would like to see this page from the bioRxiv website. Your Personal Message CAPTCHA This question is for testing whether or not you are a human visitor and to prevent automated spam submissions. Share Structured Chemical Reaction Modeling with Multitask Graph Neural Networks Maryam Astero , Anchen Li , Elena Casiraghi , Juho Rousu bioRxiv 2025.10.13.682169; doi: https://doi.org/10.1101/2025.10.13.682169 Share This Article: Copy Citation Tools Structured Chemical Reaction Modeling with Multitask Graph Neural Networks Maryam Astero , Anchen Li , Elena Casiraghi , Juho Rousu bioRxiv 2025.10.13.682169; doi: https://doi.org/10.1101/2025.10.13.682169 Citation Manager Formats BibTeX Bookends EasyBib EndNote (tagged) EndNote 8 (xml) Medlars Mendeley Papers RefWorks Tagged Ref Manager RIS Zotero Tweet Widget Facebook Like Google Plus One Subject Area Bioinformatics Subject Areas All Articles Animal Behavior and Cognition (7619) Biochemistry (17642) Bioengineering (13865) Bioinformatics (41862) Biophysics (21409) Cancer Biology (18547) Cell Biology (25436) Clinical Trials (138) Developmental Biology (13358) Ecology (19863) Epidemiology (2067) Evolutionary Biology (24288) Genetics (15587) Genomics (22467) Immunology (17703) Microbiology (40301) Molecular Biology (17142) Neuroscience (88445) Paleontology (666) Pathology (2825) Pharmacology and Toxicology (4815) Physiology (7634) Plant Biology (15109) Scientific Communication and Education (2042) Synthetic Biology (4285) Systems Biology (9812) Zoology (2268)","source_license":"CC-BY-4.0","license_restricted":false}