Briefing Document: Explainable Deep Learning for Molecular Discovery
Citation: Wong, F., Omori, S., Li, A. et al. An explainable deep learning platform for molecular discovery. Nat Protoc (2024).
https://doi.org/10.1038/s41596-024-01084-x Dates: Received - 11 March 2024 | Accepted - 26 September 2024 | Published - 09 December 2024
Source: Excerpts from "An explainable deep learning protocol for de novo molecular discovery" (s41596-024-01084-x.pdf)
Executive Summary
This briefing document summarizes a research protocol for leveraging explainable deep learning (DL) to accelerate the discovery of novel molecules with desired properties, particularly focusing on antibiotic discovery as a case study. The protocol utilizes Graph Neural Networks (GNNs) and a software package called Chemprop to build predictive models of molecular properties based on experimental data. A key innovation is the integration of Monte Carlo Tree Search (MCTS) to provide "rationales" – specific chemical substructures that explain the model's predictions. This explainability contrasts with traditional "black box" DL approaches and allows researchers to gain chemical insights, efficiently narrow chemical spaces, and prioritize compounds with promising structural features for experimental validation. The protocol encompasses data generation, model training and benchmarking, rationale analysis, and experimental validation, and is designed to be accessible even without extensive coding expertise or specialized hardware.
Main Themes and Important Ideas
1. The Power and Limitation of Deep Learning in Molecular Discovery
- DL approaches have demonstrated significant success in modeling compounds, leading to increased true discovery rates and the identification of drug candidates across various therapeutic areas.
- "DL approaches have accurately modeled compounds, with increased true discovery rates, and resulted in the discovery of drug candidates including antibiotics7,17–22, senolytics23 and anticancer and antiviral combinations24,25."
- However, a major drawback of many DL models is their "black box" nature, lacking transparency in how they arrive at predictions.
- "However, a major limitation to DL approaches is that they are typically black box in nature or unable to provide reasoning behind model predictions."
2. Explainable Deep Learning (xDL) as a Solution
- Explainable DL is an emerging field focused on providing the reasoning behind DL model predictions, contrasting with interpretable DL which aims to reveal the decision-making steps.
- "Explainable DL is an emerging field that aims to open up the black box by providing this reasoning7,34–37. Explainable DL contrasts with interpretable DL, which aims to reveal patterns of decision-making steps the models perform to arrive at their predictions38 (see Box 2 for further comparison)."
- In the context of molecular discovery, xDL identifies chemical substructures ("rationales") with positive predictive value for a property of interest.
- "As applied to molecular discovery, explainable DL identifies patterns of chemical atoms and bonds—chemical substructures—that have positive predictive value for a property of interest."
- This enables generalization beyond individual compounds to classes of compounds sharing these substructures, leading to specific chemical insights and efficient narrowing of chemical spaces.
- "By enabling models to predict structural classes directly, explainable DL can produce specific chemical insights, efficiently narrow chemical spaces and lead researchers toward effective chemical scaffolds."
- Explainability and interpretability are driving research towards increased comprehension, trustworthiness, and accountability of AI/ML models (Box 2).
3. The Proposed Explainable DL Platform and Protocol
- The protocol introduces a general-purpose explainable DL platform for molecular discovery, using GNNs as the DL model architecture.
- "In this protocol, we present an explainable DL platform for molecular discovery (Fig. 1)."
- "The platform uses graph neural networks (GNNs) as a DL model architecture. GNNs model chemical structures as collections of nodes (chemical atoms) and edges (chemical bonds) and perform computations that pool together information from neighboring atoms and bonds16,39–42."
- The protocol provides a practical guide to Chemprop, a user-friendly software package implementing GNNs, specifically directed Message Passing Neural Networks (MPNNs).
- "We provide a practical introduction to Chemprop16,43–45, a software package implementing GNNs..."
- "Chemprop is a software package implementing a variant of MPNNs, in which messages are associated with directed edges in contrast to nodes16,45."
- The protocol covers experimental data generation (using high-throughput screening as an example), model implementation, model explainability (using MCTS), evaluation, and experimental validation.
- "This protocol includes both computational and experimental components, and it does not require coding proficiency or specialized hardware. Starting from data generation and ending in the testing of model predictions, this protocol can be executed in as little as 1–2 weeks, depending on dataset size and the time required for experiments."
- The protocol is exemplified through antibiotic discovery, but its applicability extends to discovering molecules with other biological or chemical properties.
4. Key Components of the Protocol
- Graph Neural Networks (GNNs) and Message Passing Neural Networks (MPNNs): GNNs process molecular structures represented as graphs (atoms as nodes, bonds as edges) through message passing between neighboring atoms and bonds. Chemprop implements directed MPNNs.
- "GNNs are a type of ANN designed to operate on input data represented as graphs. Graphs are mathematical objects that consist of nodes and edges. For molecular discovery, these nodes and edges represent chemical atoms and bonds, respectively."
- "To incorporate local connectivity information, message passing—a step where embeddings from a node or edge’s neighbors are pooled with its preexisting embeddings—is often incorporated into a GNN layer’s update function, resulting in an architecture called MPNNs."
- Chemprop: A user-friendly, constantly maintained software package implementing MPNNs with diverse functionalities and customization options. It was successfully used in the discovery of halicin as an antibacterial compound.
- "Key features of Chemprop are that it is user friendly, possesses diverse functionalities and customization options and, since its development in 2019, has been constantly maintained. Its application to antibiotic discovery, resulting in the identification of halicin as an antibacterial compound17, was reported by our laboratory in 2020."
- Monte Carlo Tree Search (MCTS) for Explainability: For molecules predicted to be active ("hits"), MCTS is used to identify the smallest substructure ("rationale") that still results in a high predicted activity. This provides an explanation for the model's prediction.
- "For each molecule with a suitably high prediction score (‘hit’), we aim to determine the smallest substructure resulting in the molecule being classified as active (the molecule’s ‘rationale’)."
- "The MCTS algorithm solves the discrete optimization problem of finding the rationale of a molecule... each state in the search tree is a substructure (subgraph) resulting from a sequence of bond or ring deletions."
- "In Chemprop, MCTS is implemented as part of the built-in ‘interpret’ function, which outputs rationales for input hit molecules."
- Rationale Groups and Chemical Scaffolds: Due to the stochastic nature of MCTS, similar hits might yield slightly different rationales. Identifying common scaffolds among these rationales helps define "rationale groups" that broadly represent the model's prediction of structural classes.
- "Thus, calculating the chemical scaffolds shared between similar rationales, for instance, by using RDKit’s FindMCS function, provides ‘rationale groups’ that most generally describe the models’ predictions of structural classes."
5. Protocol Stages
The protocol is divided into three main stages:
- Stage 1: Data Generation: Involves generating experimental data for the property of interest, such as through high-throughput screening. The protocol uses antibacterial activity and cytotoxicity screening as an example, generating training data in CSV format with SMILES strings and activity values. Existing datasets can also be used.
- Stage 2: Model Training and Benchmarking: This stage focuses on training Chemprop models using the generated data. It involves defining model parameters, performing hyperparameter optimization (optional), training an ensemble of models, and benchmarking their performance on withheld data using appropriate metrics.
- Stage 3: Rationale Analysis and Filtering: Once satisfactory model performance is achieved, the models are used to predict activity on larger chemical spaces. High-scoring compounds ("hits") are then subjected to rationale analysis using Chemprop's "interpret" function (MCTS). The identified rationales provide explanations and can be used to filter and prioritize compounds based on desirable substructures. Further filtering based on physicochemical properties, removal of undesirable substructures (e.g., PAINS), and structural novelty can also be performed.
6. Applications and Advantages
- The protocol enables researchers to focus on salient chemical scaffolds and directly predict structural classes of compounds with activity.
- Automating the identification of structural motifs is valuable for mining large databases.
- The method provides a source of chemical novelty and suggests specific chemical spaces to explore.
- Model explainability allows for efficient down-sampling of large chemical spaces by focusing on key scaffolds.
- The protocol has been successfully applied in the discovery of antibiotics (halicin), senolytics, and antiviral drug combinations.
- It can be adapted for discovering molecules with diverse properties and can leverage existing training data.
- The protocol contrasts with black box models, which lack explainability, and interpretable models, which focus on the model's decision steps rather than direct chemical insights.
7. Chemical Libraries for In Silico Screening
The document provides an overview of various organic and inorganic compound databases, including purchasable chemical spaces (e.g., ZINC22, MolPort), large virtual libraries (e.g., Enamine REAL Space), fragment libraries, and databases of inorganic materials. The choice of library should consider chemical diversity and the feasibility of experimental testing.
8. Practical Considerations and Troubleshooting
The protocol includes detailed step-by-step procedures, timing estimations, critical steps, pause points, and troubleshooting guidance for potential issues during data generation, model training, and rationale analysis. It also lists required biological materials, reagents, and equipment.
Key Quotes
- "Explainable DL aims to understand and articulate why a model makes specific predictions..." (Box 2)
- "...rationales are guaranteed by construction to result in at least a baseline prediction score when inputted into their models. In this way, the models have ‘explained’ their predictions."
- "This protocol provides a source of chemical novelty that can suggest specific chemical spaces to explore and augment discovery pipelines."
- "Despite the name, Chemprop’s ‘interpret’ function does not make models interpretable in the sense described above and in Box 2. Instead, it aids in making models explainable by identifying chemical substructure rationales of interest."
Conclusion
This protocol presents a valuable framework for accelerating molecular discovery by integrating explainable deep learning. By combining the predictive power of GNNs with the chemical insights provided by MCTS-driven rationale generation, researchers can move beyond simple predictions to a deeper understanding of the structural features driving molecular activity. This approach promises to enhance the efficiency and effectiveness of drug discovery and materials science efforts across various domains.