NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

ACEGEN: Reinforcement learning of generative chemical agents for drug discovery

Albert Bou, Morgan Thomas, Sebastian Dittert, Carles Navarro Ramírez, Maciej Majewski, Ye Wang, Shivam Patel, Gary Tresadern, Mazen Ahmad, Vincent Moens, Woody Sherman, Simone Sciabola, Gianni De Fabritiis

Abstract

In recent years, reinforcement learning (RL) has emerged as a valuable tool in drug design, offering the potential to propose and optimize molecules with desired properties. However, striking a balance between capabilities, flexibility, reliability, and efficiency remains challenging due to the complexity of advanced RL algorithms and the significant reliance on specialized code. In this work, we introduce ACEGEN, a comprehensive and streamlined toolkit tailored for generative drug design, built using TorchRL, a modern RL library that offers thoroughly tested reusable components. We validate ACEGEN by benchmarking against other published generative modeling algorithms and show comparable or improved performance. We also show examples of ACEGEN applied in multiple drug discovery case studies. ACEGEN is accessible at https://github.com/acellera/acegen-open and available for use under the MIT license.

Introduction

The search for new therapeutic compounds is a monumental challenge. The "chemical space" of potential small molecules is estimated to contain approximately $10^{60}$ candidates—a scale far exceeding the capacity for manual or exhaustive computational testing. To navigate this vast landscape, researchers have turned to Generative Artificial Intelligence, particularly Reinforcement Learning (RL). In this paradigm, "agents" are trained to construct molecules—either atom-by-atom or by assembling fragments—while receiving rewards for generating structures with desirable medicinal properties, such as high binding affinity, low toxicity, and favorable pharmacokinetics.

Despite its promise, the field of RL for chemistry has faced a "reproducibility crisis." Many existing tools rely on monolithic, specialized scripts that are difficult to modify, verify, or integrate into broader workflows. This lack of standardization makes it difficult to discern whether performance gains stem from algorithmic innovation or merely superior hyperparameter tuning. ACEGEN addresses these challenges by providing a modular, open-source framework built on industrial-grade foundations.

The ACEGEN Framework

ACEGEN shifts the development paradigm from rigid scripts to reusable building blocks. By leveraging TorchRL, a high-level library within the PyTorch ecosystem, ACEGEN inherits robust, well-tested implementations of essential RL components.

Schematic of the ACEGEN framework architecture, highlighting the data collection and learning phases built on TorchRL.

As illustrated in Figure 1, the architecture is divided into two primary phases:

  1. Data Collection Phase: A customizable Generative Agent (a Chemical Language Model) interacts with a Scoring Function to generate molecular data. The agent typically operates on SMILES (Simplified Molecular Input Line Entry System) strings, a text-based notation for chemical structures.
  2. Learning Phase: The generated data is stored in an Experience Replay Buffer. An RL algorithm then processes this data to update the agent's model weights, which are fed back into the generative process.

This modularity allows researchers to easily swap agents, scoring functions, or RL algorithms (such as REINFORCE, PPO, or A2C) and supports diverse generation modes, including de-novo design, scaffold decoration, and fragment linking.

Training and Evaluation

To provide agents with a foundational understanding of chemistry, they are pre-trained on large-scale datasets of known molecules, including ChEMBL (bioactive molecules), ZINC (commercially available compounds), and Enamine REAL (lead-like compounds).

For performance validation, ACEGEN was evaluated using the MolOpt (Practical Molecular Optimization) benchmark. This suite comprises 23 tasks that range from simple similarity-based searches to complex multi-objective optimization problems, providing a rigorous test of an agent's ability to optimize for specific biological targets.

Key Insights from Modular RL

The modular nature of ACEGEN enabled detailed ablation studies, revealing critical factors for success in molecular RL:

  • The Criticality of Experience Replay: Analysis of the popular REINVENT algorithm showed that the inclusion of an experience replay buffer—allowing the agent to re-learn from past successful molecules—was the most significant contributor to performance improvements.
  • Efficiency of PPOD: The study identified PPOD (Proximal Policy Optimization with experience Replay) as the most sample-efficient algorithm. PPOD reaches high-quality solutions faster than traditional methods, a vital advantage when reward calculations involve computationally expensive physics-based simulations.
  • The Prior as a Chemical Anchor: To prevent agents from collapsing into generating chemically nonsensical but high-reward strings, ACEGEN utilizes a Kullback-Leibler (KL) divergence penalty. This acts as a "tether" to the pre-trained "Prior" model, ensuring the agent remains within the bounds of sensible chemistry.

Performance Benchmarks

ACEGEN’s implementations not only match but often exceed the performance of existing state-of-the-art tools.

Performance comparison of ACEGEN algorithms across 23 MolOpt tasks, with PPOD achieving the highest total score.

As shown in Figure 3, the ACEGEN implementation of PPOD achieved a total score of 15.80 across the MolOpt benchmark, surpassing the previous benchmark leader, REINVENT-MolOpt (15.65). Beyond benchmarks, ACEGEN was applied to a real-world case study: designing ligands for the 5-HT$_{2A}$ receptor while avoiding the D$_2$ receptor. The agents successfully generated novel molecules predicted to be more selective than any existing ligands in the ChEMBL database, with a high "yield" of valid, task-compliant molecules (exceeding 90%).

Limitations and Future Directions

While ACEGEN represents a significant advancement, several avenues for future work remain:

  • Transition to 3D: Currently, ACEGEN focuses on 1D SMILES strings. Future iterations aim to incorporate 3D generative models to better capture the spatial dynamics of protein-ligand interactions.
  • Evolving Benchmarks: The authors suggest that current benchmarks like MolOpt may over-emphasize "exploitation" (finding a single optimal solution). New metrics are needed to reward "exploration" and the generation of diverse chemical series.
  • Computational Bottlenecks: Despite the efficiency of algorithms like PPOD, the computational cost of complex reward functions (e.g., molecular docking) remains a challenge for large-scale optimization.

Summary updated

BibTeX
@article{bou2024acegen,
  author = {Albert Bou and Morgan Thomas and Sebastian Dittert and Carles Navarro Ramírez and Maciej Majewski and Ye Wang and Shivam Patel and Gary Tresadern and Mazen Ahmad and Vincent Moens and Woody Sherman and Simone Sciabola and Gianni De Fabritiis},
  title = {{ACEGEN: Reinforcement learning of generative chemical agents for drug discovery}},
  journal = {Journal of Chemical Information and Modeling},
  year = {2024},
  url = {https://openreview.net/forum?id=JVudbWMA2j},
}
Figure