Abstract
Clinical trial failure remains a central bottleneck in drug development, where minor protocol design flaws can irreversibly compromise outcomes despite promising therapeutics. Although cutting-edge AI methods achieve strong performance in predicting trial success, they are inherently reactive for merely diagnosing risk without offering actionable remedies once failure is anticipated. To fill this gap, this paper proposes ClinicalReTrial, a self-evolving AI agent framework that addresses this gap by casting clinical trial reasoning as an iterative protocol redesign problem. Our method integrates failure diagnosis, safety-aware modification, and candidate evaluation in a closed-loop, reward-driven optimization framework. Serving the outcome prediction model as a simulation environment, ClinicalReTrial enables low-cost evaluation of protocol modifications and provides dense reward signals for continuous self-improvement. To support efficient exploration, the framework maintains hierarchical memory that captures iteration-level feedback within trials and distills transferable redesign patterns across trials. Empirically, ClinicalReTrial improves 83.3% of trial protocols with a mean success probability gain of 5.7%, and retrospective case studies demonstrate strong alignment between the discovered redesign strategies and real-world clinical trial modifications.
Introduction
Clinical trials are often described as the "valley of death" for drug development. With average costs reaching $2.6 billion per drug and failure rates hovering between 80% and 90%, the stakes are immense. Crucially, many failures are not the result of ineffective therapeutics but are instead caused by "minor" protocol flaws—such as overly restrictive eligibility criteria, suboptimal dosing, or poorly defined endpoints.
While current AI models have become adept at predicting trial failure (a reactive approach), they generally fail to provide guidance on how to rectify these issues (a proactive approach). Stakeholders require actionable remedies rather than simple binary predictions. ClinicalReTrial addresses this gap by treating clinical trial optimization as an iterative, generative redesign problem.
Methodology
The ClinicalReTrial framework operates as a multi-agent, closed-loop system, functioning as a "digital twin" for trial design. The architecture is built upon three core pillars:
- The Agent Pipeline: This includes an Analysis Agent that diagnoses failure modes (e.g., poor enrollment or safety risks), an Augmentation Agent that generates protocol variants using domain-specific logic, and an Exploration Orchestrator that employs beam search to evaluate these modifications within a simulation environment.
- Hierarchical Memory System: To ensure efficient exploration, the system utilizes Local Memory to track feedback within a single trial run and Global Memory to distill successful redesign patterns across different trials.
- The Simulator and Safety Validation: The "reward" for the agent is derived from a high-performance Gradient Boosted Decision Tree (GBDT) model trained on multi-modal data (text, molecular graphs, and disease hierarchies). To maintain medical safety, an LLM-as-a-Judge mechanism prunes clinically invalid modifications by cross-referencing databases like DrugBank and PubMed.
Results and Discussion
The framework was evaluated using TrialBench, a standardized dataset of over 20,000 Phase I–IV clinical trials. ClinicalReTrial successfully improved 83.3% of the failed trial protocols it attempted to redesign, achieving a mean success probability gain ($\Delta p$) of 5.7%.
A key strength of the system is its strategic alignment with human clinical expertise. In retrospective case studies, the agent demonstrated the ability to identify specific failure causes and propose fixes that mirrored real-world successful follow-up trials. For instance, in the case of trial NCT01298752, the agent correctly identified enrollment friction and proposed modifications to inclusion/exclusion criteria that aligned with subsequent successful redesigns.
Despite these gains, a "tactical gap" remains. While the agent excels at high-level strategy, it occasionally favors complex biomarker requirements over simpler pragmatic fixes like increasing sample size. Furthermore, the system's performance is inherently tied to the accuracy of its underlying simulator.
Conclusion
ClinicalReTrial represents a significant step toward proactive AI in drug development. By transforming predictive models into low-cost simulation "sandboxes," the framework enables iterative protocol optimization at a negligible cost—approximately $0.12 per trial. Future work will focus on adaptive convergence criteria and prospective validation in collaboration with clinical trial sponsors to bridge the gap between AI-generated designs and real-world implementation.
Summary updated