Aligning Molecular Graph Explanations with Chemical Identity via InChIfied Invariants

Emanuele Guidotti, Sara Puglioli · 2026

Read Aligning Molecular Graph Explanations with Chemical Identity via InChIfied Invariants by Emanuele Guidotti, Sara Puglioli (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2605-24742.txt.

Introduction

Emanuele Guidotti and Sara Puglioli align molecular graph explanations with chemical identity through InChIfied Invariants. Drawings of one compound can yield other representations, scrambling predictions. Their traits rest on the InChI standard and stay stable under such changes. On one million PubChem graphs, they give same results for equivalent graphs in 99.62 percent of cases, against under one percent for standard Daylight ones. Across MoleculeNet tasks they preserve performance while making attributions match by design.

Catalog record

CREATOREmanuele Guidotti, Sara Puglioli
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE60218
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2605.24742

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Aligning Molecular Graph Explanations with Chemical Identity via InChIfied Invariants Emanuele Guidotti, Sara Puglioli Abstract Obtaining consistent explanations for machine learning on molecular graphs requires predictions and attributions to be aligned with chemical identity. However, chemically equivalent drawings of the same molecule can induce different molecular representations, leading to inconsistent predictions and explanations. Here, we introduce Inchified Invariants , a class of node, edge, and graph features based on the International Chemical Identifier (InChI) and designed to be invariant under transformations that preserve chemical identity. Using one million molecular graphs from PubChem Substances, we show that Inchified Invariants produce identical representations for chemically equivalent graphs in 99.62% of cases, whereas standard Daylight invariants do so in only 0.35% of cases. Across MoleculeNet tasks, Inchified Invariants preserve predictive performance while significantly improving prediction consistency across alternative graph depictions of the same molecules. We further perform a quantitative attribution analysis and show that explanations produced with standard molecular featurization methods vary substantially across chemically equivalent graphs, while Inchified Invariants enforce consistent attributions by construction. We release open-source software implementing Inchified Invariants , which can be used as a drop-in replacement for standard molecular graph features. 1 1 1 Code will be made publicly available upon publication. 1 Introduction Molecular graphs are a central representation in machine learning for chemistry, where atoms are modeled as nodes and bonds as edges. As predictive power increases, there is a growing emphasis on making these models explainable jimenez2020drug ; vamathevan2019applications . Experimental chemists are often skeptical of black-box predictions wellawatte2025human and can prioritize explainability over accuracy, demanding explanations that are aligned with chemical intuition and domain knowledge chen2022machine . Consequently, obtaining reliable explanations is now seen as a key requirement for machine-learning models in chemistry jimenez2020drug ; vamathevan2019applications . Explanation systems should satisfy two broad criteria: explanations should (i) make sense to human users and (ii) accurately reflect the behavior of the predictive model dasgupta2022framework . Since the first criterion is difficult to formalize and evaluate, much of the existing literature has focused on the second, with metrics such as faithfulness becoming standard. However, whether explanations make sense to domain experts remains comparatively underexplored. This paper addresses this first criterion in molecular machine learning. We argue that a minimal requirement for an explanation to make sense to a chemist is consistency across chemically equivalent graph representations: two drawings of the same molecule should not yield different chemical explanations. We therefore study explanation consistency across chemically equivalent graphs as a prerequisite for chemical meaningfulness. This property is necessary but not sufficient, since a meaningful explanation must be consistent, but a consistent explanation may not be chemically meaningful. Nevertheless, in the absence of widely accepted ground-truth benchmarks for chemical meaningfulness at scale, enforcing consistency with chemical identity provides a necessary first step towards more reliable explanations in molecular machine learning. We introduce Inchified Invariants : node, edge, and graph features designed to be invariant under transformations of a molecular graph that preserve chemical identity. Our construction leverages the International Chemical Identifier (InChI), a chemical structure identifier developed by the International Union of Pure and Applied Chemistry (IUPAC) to provide a standard representation of molecular identity heller2015inchi . InChI is designed so that alternative depictions of the same molecule map to the same identifier. We construct Inchified Invariants so that graphs with the same InChI produce the same features, while graphs with different InChIs generally produce different features. Consequently, models built on Inchified Invariants can produce predictions and attributions that are invariant across chemically equivalent graph representations. Figure 1 reports three examples ( a. metal disconnection; b. tautomerism; c. zwitterions) where two different input graphs with the same chemical identity yield divergent attributions when using standard featurization methods. For instance, this is evident on the carbon connected to Mg atom that bears a radical electron after MgCl disconnection (panel a. ), on the two tautomers for the primary thioamide \text{CSNH}{\vphantom{\text{X}}}_{\smash[t]{\text{2}}} (panel b. ), and on the carboxylic acid COOH and primary amine \text{NH}{\vphantom{\text{X}}}_{\smash[t]{\text{2}}} moieties that can be written in a zwitterionic form (panel c. ). Inchified Invariants resolve these inconsistencies and yield identical attribution maps across alternative graph representations with the same chemical identity, as they enforce explanation invariance by construction. Overall, this work contributes to the development of novel featurization methods for molecular machine learning, a direction advocated by recent benchmarking work as underexplored yet instrumental to advancing the field liu2024welqrate . Figure 1 : Attribution maps. Each panel reports attributions for two graphs with the same InChI generated by models trained with benchmark features (left) and Inchified Invariants (right). The models are neural graph fingerprints as described in Section 3.2 , and attributions are generated as described in Section 3.3 . The colormap indicates the contribution of nodes to the final prediction for regression tasks and to the logits for classification tasks. The tasks are: a. BACE; b. BBBP; c. Lipo. Contributions. Our contributions are as follows. • We introduce a new featurization method for machine learning on molecular graphs: Inchified Invariants are node, edge, and graph features designed to be invariant under transformations of the molecular graph that preserve chemical identity. • We validate Inchified Invariants on a large dataset from PubChem: they produce identical molecular representations for graphs with the same InChI in more than 99\% of cases, whereas standard Daylight invariants do so in fewer than 1\% of cases. • We evaluate predictive performance on MoleculeNet benchmark tasks: Inchified Invariants preserve predictive performance while improving consistency across alternative graph depictions with the same chemical identity. • We perform a quantitative analysis of attribution consistency: attributions generated with standard features vary substantially across chemically equivalent graphs, whereas attributions generated with Inchified Invariants achieve almost perfect consistency. • We release open-source software implementing Inchified Invariants : they can be seamlessly integrated into existing workflows as a replacement for standard molecular graph features. Related work. InChI was developed by IUPAC as a canonical identifier for molecular identity and is widely used for database indexing and structure curation heller2015inchi ; bento2020open , but its use in machine learning has largely been limited to textual descriptors rather than node- and edge-level graph features handsel2021translating ; wojtuch2023extended ; wang2025recent . Recent work has also explored chemically motivated invariances in molecular representations: most closely, RIGR enforces resonance invariance by mapping different resonance forms of a molecule to a common graph representation zalte2025rigr , while data augmentation has been used to encourage selected invariances such as tautomeric invariance ulrich2021exploring . However, RIGR targets a specific class of Lewis-structure ambiguity, whereas augmentation-based approaches require generating multiple equivalent graph representations for each molecule, which can be computationally expensive and may be infeasible when the relevant equivalence class is large or difficult to enumerate. In contrast, Inchified Invariants use InChI to define the target equivalence relation and derive node-, edge-, and graph-level features reflecting a broader set of chemical standardization operations, including resonance/charge normalization, proton relocation, tautomerism, fragment handling, metal disconnection, and stereochemical conventions. Thus, Inchified Invariants provide a featurization framework aligned with an international chemical identity standard. Existing molecular graph models and fingerprints are typically invariant to atom ordering or graph isomorphism rogers2010extended ; duvenaud2015convolutional ; huang2022going , and some architectures incorporate equivariance or

Read the complete text