Abstract
Generative models in drug discovery often suffer from "reward hacking," where they optimize for mathematical objectives at the expense of chemical feasibility and medicinal chemistry intuition. We present Metis, an open-source Python-based graphical user interface (GUI) designed to facilitate "Human-in-the-loop" (HITL) drug design. Metis allows chemists to provide nuanced, substructure-level feedback on AI-generated molecules. This feedback is then used to refine reward functions and retrain generative models, such as REINVENT, ensuring that the chemical space explored aligns with expert knowledge.
Introduction
In de novo drug design, Reinforcement Learning (RL) is frequently employed to evolve molecular structures toward specific target profiles, such as high potency or favorable ADMET properties. However, these models often act as "reward hackers," producing molecules that satisfy mathematical constraints but are chemically nonsensical or "ugly" to experienced medicinal chemists.
The primary challenge lies in the "implicit" nature of chemical expertise; while a chemist can intuitively identify a promising lead, translating this "gut feeling" into a rigid mathematical reward function is difficult. Existing tools often limit feedback to binary "like/dislike" ratings, which lack the granularity to explain why a molecule is undesirable. Metis addresses this gap by providing a specialized interface for detailed expert feedback.
Methods and Implementation
Metis is built using PySide2 and RDKit, creating a robust framework for molecular visualization and interaction. The core of the tool is a closed-loop Human-in-the-loop (HITL) system.
The workflow consists of four primary stages:
- Molecular Feedback: Chemists can interact directly with molecular structures, clicking on specific atoms to highlight "local liabilities" (problematic substructures) or "favorable features." The UI also supports rating "global liabilities" such as synthetic accessibility, solubility, and permeability.
- Contextual Information: To support informed decision-making, Metis includes an "Explainability" tab that visualizes why a QSAR model predicts specific activity levels. A "Most Similar Active" tab displays known drugs or ligands with high structural similarity to the generated compound.
- Integration Engines: Feedback is converted into actionable data for AI models via two methods: a Reward Model (a machine learning model trained on chemist preferences) and a Heuristic Reward Function (which mathematically penalizes flagged substructures and rewards similarity to "liked" molecules).
- Closed-Loop Training: Metis integrates with the REINVENT generative framework. Feedback is transmitted to a remote server to retrain the model, which then generates a new batch of molecules for further evaluation.
To demonstrate the tool's utility, the authors provided a demonstration project targeting the MAPK10 (JNK3) kinase, including pre-trained QSAR models and configuration files to showcase the UI's customizability.
Key Insights and Results
A significant technical contribution of Metis is its handling of substructure recording. When a chemist flags a specific group (e.g., a ketone), Metis automatically expands the selection to include neighboring atoms, generating a SMARTS pattern. This logic prevents the model from incorrectly flagging similar but distinct groups, such as amides, which share atom types but possess different chemical properties.
Furthermore, Metis moves beyond binary feedback. By allowing chemists to categorize why they dislike a molecule (e.g., "Toxicity" vs. "Stability"), researchers can build specialized models for distinct chemical properties. The tool also distinguishes between project-specific constraints and general medicinal chemistry rules, helping the AI learn both narrow and broad chemical principles.
The paper successfully demonstrates a functional pipeline where real-time human feedback directly influences generative model scoring. The UI's high degree of customizability via YAML files allows researchers to add custom buttons for specific liabilities, such as hERG inhibition or metabolic instability, without modifying the core codebase.
Discussion and Future Work
While Metis represents a significant step forward in HITL drug design, several limitations remain. Currently, the tool must be run as a local Python application because PySide2 does not yet support WebAssembly for web hosting. Additionally, while the authors aim for model-agnosticism, the current implementation is closely tied to the REINVENT framework; adapting it to other architectures like GFlowNets or Diffusion models requires manual modification.
Future work will focus on expanding support to REINVENT 4 and integrating the scikit-mol library to broaden the range of compatible models. The team also aims to better utilize detailed feedback categories (e.g., "too big") within the automated reward functions, which currently rely primarily on simpler similarity metrics.
Summary updated