Fragment-Level Graph Encoding: A New Approach to Interpretability in Molecular Property Prediction

Fragment-level graph encoding lets GNNs give stable explanations at the functional group level, shrinking graphs fivefold without accuracy loss.
This study addresses the mismatch between GNN atom-level explanations and chemists' functional group thinking by changing only the input representation: using BRICS decomposition to encode molecules as fragment-level graphs, where nodes are synthetically interpretable fragments and features are sums of atom features. Since the model and interpreter remain unchanged, any message-passing GNN and post-hoc attribution method can directly output functional group-level explanations. Experiments across four GNNs, four tasks, and two interpreters show that fragment-level encoding achieves test accuracy comparable to atom-level encoding while reducing graph size by approximately fivefold; Integrated Gradients attribution recovers known pharmacophores at 1.5x and 3.2x random level on BACE and PTR1 targets, respectively. Compared to the volatility of atom-level post-hoc aggregation, fragment-level training provides a single stable attribution without performance loss, offering a lightweight and pragmatic solution for interpretable molecular prediction.
Title
Fragment-Level Graph Encoding: A New Approach to Interpretability in Molecular Property Prediction
Meta Description
Fragment-level graph encoding represents molecules as BRICS fragment nodes, grounding GNN prediction explanations at the functional group level, shrinking graph size fivefold without sacrificing accuracy, and effectively recovering pharmacophores on BACE and PTR1 targets.
Article Content
Molecular property prediction is a key task in drug discovery, and graph neural networks (GNNs) have become the standard tool in this domain. However, the atom-level explanations provided by GNNs are often difficult for medicinal chemists to use directly—after all, chemists think in terms of functional groups, not individual atoms. A recent study proposed a simple yet effective idea: don't change the model, just change the input representation. By encoding molecules as fragment-level graphs, any message-passing GNN and post-hoc attribution method can provide explanations at the functional group level.

Why Aren't Atom-Level Explanations Sufficient?
GNNs excel at molecular property prediction tasks, but most of their interpretability research focuses on atom-level attribution. The problem is that there is a gap between atom-level explanations and the actual decision units of chemists. A highlighted atom may span two different functional groups, or multiple atoms within a functional group may be scattered across annotations, making it difficult to translate explanations into actionable chemical insights.
Post-processing aggregation of atom-level attributions seems like a natural remedy, but this study points out that the choice of aggregation method itself is arbitrary, leading to unstable results. In other words, post-hoc aggregation is not a reliable substitute.
Core Method: Building Fragment Graphs with BRICS Decomposition
The researchers' approach uses BRICS decomposition to break molecules into synthetically meaningful fragments, with each fragment serving as a node in the graph, and node features being the element-wise sum of the features of its constituent atoms. This dramatically reduces the size of the molecular graph while preserving chemical semantics.
The key advantage is that since only the input representation is changed, any standard message-passing GNN architecture and any post-hoc attribution method can be applied directly, without modifying the model or interpreter. Explanations naturally fall at the functional group level, aligning with how medicinal chemists think.
BRICS (Breaking of Retrosynthetically Interesting Chemical Substructures) is a molecular fragmentation method based on retrosynthetic rules, proposed by Degen et al. in 2008. It defines a set of chemically reasonable bond cleavage patterns (such as amide bonds, ester bonds, sulfonamide bonds, etc.), simulating the process by which chemists identify cleavable units during retrosynthetic analysis. Unlike simple ring or chain splitting, BRICS fragments typically correspond to building blocks that can be independently obtained or constructed in real synthesis, and therefore have clear chemical semantics. In molecular graph learning, BRICS is often used to build hierarchical representations or graph coarsening, with the advantage of controllable and reproducible fragment sizes, facilitating the reuse of fragment vocabularies across different molecules.
Experimental Results: Smaller Graphs, Comparable Accuracy
The study conducted a systematic evaluation across four GNN architectures, four prediction tasks, and two interpreters, using scaffold splits to ensure rigorous generalization testing. The results show that fragment-level encoding achieves test accuracy comparable to atom-level encoding while reducing graph size by approximately fivefold. This means the improvement in computational efficiency comes without a cost to prediction performance.
In terms of explanation quality, the researchers used Integrated Gradients attribution to examine the recovery rate of known pharmacophores on two enzyme targets. On the BACE target, the fragment model achieved a hit rate 1.5 times that of random level; on the PTR1 target, it reached 3.2 times. This demonstrates that fragment-level explanations can capture chemically meaningful patterns.
Scaffold split is a rigorous generalization evaluation protocol in molecular machine learning. It groups molecules based on their Murcko scaffolds (i.e., the core ring system structure after removing side chains), ensuring that molecules in the training and test sets have different scaffold types. Compared to random splits, scaffold splits better reflect the model's ability to generalize to novel chemical space, because under random splits, test molecules often share similar scaffolds with training molecules, which can easily overestimate performance. This protocol is widely adopted in drug discovery benchmarks (such as MoleculeNet) and is particularly suitable for evaluating whether property prediction models have learned transferable chemical rules rather than memorizing specific scaffolds.
Integrated Gradients (IG) is a gradient-based attribution method proposed by Sundararajan et al. in 2017. It attributes prediction results to input features by integrating gradients along a straight-line path from a baseline (such as an all-zero vector) to the input sample. IG satisfies axioms such as sensitivity and implementation invariance, and provides more stable feature contribution reflections compared to raw gradients or simple product accumulation. In molecular graph scenarios, IG can attribute to atoms or fragment nodes, outputting contribution scores for each node to the prediction, thereby supporting interpretability evaluations such as pharmacophore recovery rates.
Comparison with Atom-Level Aggregation Baselines
A noteworthy comparison is the stability difference between fragment-level training and atom-level post-hoc aggregation. The researchers conducted a like-for-like comparison: aggregating attribution results from atom-level models, the BACE hit rate fluctuates with two arbitrary aggregation choices, sometimes higher and sometimes lower than the fragment model. In contrast, fragment-level training provides a single attribution result that requires no agreed-upon choices and incurs no loss in prediction performance. This stability is crucial for trustworthiness in practical applications.
Implications for Drug Discovery Workflows
The value of this work lies in lowering the barrier to using interpretable molecular predictions. Medicinal chemists don't need to understand the inner workings of GNNs or accept atom-level heatmaps; instead, they directly see functional group-level contribution analyses. Since the method is not tied to a specific model architecture, teams can replace the input representation at low cost within existing GNN pipelines to obtain more communicable explanation results.
Of course, fragment-level representations also have their limitations: the BRICS decomposition rules themselves may not be applicable to all molecule types, and some fragments may be too large or too small, affecting the granularity of explanations. But as a lightweight path that "only changes the representation, not the model," it provides a pragmatic foothold for interpretable molecular property prediction. The code has been open-sourced on GitHub for community reproduction and extension.
Key Takeaways
- Fragment-level graph encoding represents molecules as BRICS fragment nodes, with features being the sum of atom features, reducing graph size by approximately fivefold without sacrificing accuracy.
- Any message-passing GNN and attribution method can be used directly, with explanations naturally falling at the functional group level.
- Integrated Gradients attribution recovers known pharmacophores at 1.5x and 3.2x random level on BACE and PTR1 targets, respectively.
- Atom-level post-hoc aggregation hit rates fluctuate with aggregation choices, offering less stability than fragment-level training.
- The method is open-source and suitable as a lightweight replacement for existing GNN pipelines.
One-line Summary
Fragment-level graph encoding enables GNNs to provide stable explanations at the functional group level, shrinking graphs fivefold without sacrificing accuracy.
Paragraph Summary
This study addresses the mismatch between GNN atom-level explanations and chemists' functional group thinking by proposing to change only the input representation: using BRICS decomposition to encode molecules as fragment-level graphs, where nodes are synthetically interpretable fragments and features are sums of atom features. Since the model and interpreter remain unchanged, any message-passing GNN and post-hoc attribution method can directly output functional group-level explanations. Experiments across four GNNs, four tasks, and two interpreters show that fragment-level encoding achieves test accuracy comparable to atom-level encoding while reducing graph size by approximately fivefold; Integrated Gradients attribution recovers known pharmacophores at 1.5x and 3.2x random level on BACE and PTR1 targets, respectively. Compared to the volatility of atom-level post-hoc aggregation, fragment-level training provides a single stable attribution without performance loss, offering a lightweight and pragmatic solution for interpretable molecular prediction.
Related articles

Amphibious Transforming Drone: Beyond 100x Power Savings, What Are the Real Needs?
Is the amphibious transforming drone just a gimmick? Starting from the 100x power difference of the M4 Morphobot, explore real application scenarios and thesis topic ideas, analyzing boundary conditions where pure drones and pure ground robots both fail.

Warhound Raises $200 Million: Genetically Engineered "War Dogs" Paired with Anduril Gear
Warhound raises $200M, backed by Ben Lamm and Palmer Luckey, to genetically engineer dogs for military and law enforcement use and equip them with Anduril gear. This article analyzes its technology direction, funding logic, and ethical controversy.

Claude API Comes to Google Cloud: IAM Integration and SDK Access Guide
Anthropic hosts the full Claude API on Google Cloud with IAM-controlled permissions and unified billing. This guide covers the Vertex AI and Anthropic-hosted entry points, IAM role configuration, and SDK access.