AI4S Drug Discovery: Engineering the Multi-Stage Funnel for Screening Thousands of Candidate Molecules

    This article examines how AI for Science (AI4S) is reshaping candidate molecule discovery and explains why fast generation does not guarantee clinical success. It reconstructs the six-layer screening funnel—target credibility, druggability, potency and selectivity, safety and toxicology, manufacturability, and clinical feasibility—from a technical perspective. It covers the data foundation, layered evaluation metrics, agent orchestration, and the cloud engineering architecture needed to process thousands of candidates in parallel, along with common pitfalls and a phased adoption roadmap.

    As the reasoning capabilities of large models are transferred to biology, chemistry, and pharmaceutical research, AI for Science (AI4S) is changing how candidate molecules are discovered. Work that researchers once performed sequentially—annotation, filtering, and plausibility assessment—can now be executed in parallel across thousands of candidates in a very short time. But computing fast is not the same as surviving long. What really determines whether a molecule reaches the clinic is whether it can pass through a multi-stage funnel defined by target credibility, druggability, safety, manufacturability, and clinical feasibility. This article reconstructs that process from a technical perspective and discusses the data foundation, evaluation metrics, agent orchestration, and engineering architecture, offering a practical framework for implementation.

    1. Reframing the Problem: From Generation to Selection

    Early large-model applications focused mainly on code generation, text understanding, and structured extraction, with relatively clear evaluation criteria: whether code compiles, whether tests pass, and whether answers are correct. Evaluation in scientific research is far more complex. A conclusion must not only be logically consistent but also align with existing experimental data, physicochemical laws, and biological mechanisms.

    This introduces a key shift: scientific scenarios place higher demands on a model’s reasoning depth and verifiability. Take candidate molecule screening as an example. The model must process heterogeneous data from multiple sources—sequences, structures, activity, physicochemical properties, and toxicology signals—and make ranking and elimination decisions under uncertainty. In other words, the core of AI4S is not generating more candidates, but eliminating wrong candidates faster and more reliably.

    2. Thousands of Molecules Entering Preclinical Work: Funnel Structure and Technical Priorities

    Pushing thousands of molecules toward the clinic is unrealistic. Real R&D is a funnel that narrows stage by stage. Understanding the decision logic of each layer is a prerequisite for building an AI4S system.

    1. Target credibility layer
      Assess whether the target is strongly associated with disease mechanisms and whether there is genetic evidence, expression-specificity evidence, and evidence of pathway modifiability. This layer eliminates directional errors; if the target does not hold, all subsequent optimization is wasted.

    2. Druggability and physicochemical properties layer
      This covers standard druggability dimensions such as solubility, permeability, stability, molecular weight, and polar surface area, as well as structural alerts such as reactive groups and metabolically labile sites. The goal is to exclude candidates that are not physically and chemically druggable.

    3. Potency and selectivity layer
      Evaluate potency at the biochemical and cellular levels, along with selectivity against homologous proteins and related family members. Insufficient selectivity often translates into off-target toxicity later on.

    4. Safety and toxicology layer
      This includes signals such as genotoxicity, hepatotoxicity, cardiovascular risk, and drug-drug interactions. Data at this layer is the scarcest and noisiest, and it relies most heavily on prior knowledge and uncertainty modeling.

    5. Manufacturability and drug form layer
      Synthetic route complexity, cost and scale-up feasibility, and the difficulty of polymorph and formulation development determine whether a candidate can enter the clinic within an acceptable time and cost.

    6. Clinical feasibility layer
      Route of administration, exposure, biomarker detectability, and patient stratification feasibility determine whether an executable clinical trial can be designed.

    A common engineering mistake is collapsing all six layers into a single score. A more robust approach is to model and eliminate layer by layer, while preserving a traceable evidence chain between layers.

    3. The Data Foundation: The First-Order Constraint of AI4S

    No matter how capable the model, it cannot compensate for defects in the data foundation. In practice, four issues deserve particular attention:

    • Data alignment: Activity data from different sources varies greatly in measurement conditions, endpoint metrics, and units. A unified semantic mapping and unit normalization must be established.
    • Label noise: Low-throughput experimental data is sparse and severely distribution-shifted, and training directly on it easily overfits to a few chemical series.
    • Missing negative samples: R&D data is naturally biased toward success cases and lacks clear failure samples, causing models to overestimate candidate quality.
    • Data compliance and isolation: In a multi-tenant environment, data boundaries must be clear, and access control, auditing, and anonymization processes for training and inference data must be designed upfront.

    Engineering can combine a feature platform, versioned datasets, and lineage tracking: the feature platform standardizes definitions, dataset versioning ensures experimental reproducibility, and lineage tracking allows every elimination decision to be traced back to specific data and rules.

    4. From Models to Agents: Task Orchestration Rather Than Single-Point Q&A

    A single model call cannot cover the entire funnel. A more reasonable form is agent orchestration: breaking retrieval, computation, rule validation, experiment design, and result aggregation into composable tool calls.

    The illustrative orchestration logic is as follows (pseudocode, expressing only the flow structure):

    1. # Pseudocode: layered screening orchestration for candidate molecules
    2. def screen(candidates, target):
    3. stage1 = [c for c in candidates if target_evidence(c, target) > TH_EVIDENCE]
    4. stage2 = [c for c in stage1 if druglikeness(c) and not has_structural_alert(c)]
    5. stage3 = rank_by_potency_and_selectivity(stage2)
    6. stage4 = flag_toxicity_signals(stage3, priors=tox_knowledge_base)
    7. stage5 = assess_synthesizability(stage4)
    8. stage6 = clinical_feasibility(stage5)
    9. return build_evidence_report(stage6) # retain evidence and elimination reasons at each step

    Three key design principles apply:

    1. Tools take priority over free generation. Computational conclusions must come from deterministic tools, with the model organizing and explaining them.
    2. Every step is reversible. Elimination decisions must include reasons and confidence levels, allowing humans to review and roll back.
    3. Results must be structured. Output should conform to a verifiable schema so that downstream systems can consume and audit it.

    5. Evaluation: Determining Who Survives to the End

    The success of an AI4S project depends on whether evaluation is close to real R&D. A three-layer evaluation is recommended:

    • Task-level metrics: accuracy, recall, and ranking correlation of layered elimination, as well as extrapolation ability across chemical series.
    • System-level metrics: end-to-end latency, parallel throughput, tool-call success rate, and the effectiveness of retry and fallback strategies.
    • Business-level metrics: reduction in cycle time from candidate to the next stage, experimental validation hit rate, and compute and labor cost per candidate.

    It is important to emphasize that strong offline metrics do not guarantee online effectiveness. A closed loop of predict, experiment, and feedback must be established: experimental results are written back into the dataset to drive the next round of training and rule refinement. Without a closed loop, an AI4S system quickly degrades into a one-off demonstration.

    6. Engineering Architecture: Combining General Capabilities to Support Parallel Processing at Scale

    Turning the processing of thousands of candidates into a stable service typically requires a combination of general cloud capabilities rather than a single-point product:

    • Object storage: storing molecular structures, experiment records, and model artifacts, with lifecycle policies to control costs.
    • Container platform: hosting compute-intensive screening tasks and scaling elastically by queue.
    • Message queue: decoupling task submission from execution, smoothing peaks and valleys, and ensuring long-running tasks are not lost.
    • Logging, monitoring, and alerting: tracking every tool call and elimination reason, and locating anomalies quickly.
    • Data and model version management: ensuring reproducibility and auditability.

    In related practices at Baidu AI Cloud, such needs are typically implemented with a standard combination of storage, containers, queues, and observability, with the focus on resource isolation, permission boundaries, and full-chain tracing rather than stacking single-point features.

    7. Common Pitfalls and How to Avoid Them

    1. Treating ranking as a conclusion. Model output is a probabilistic ranking and cannot replace experimental validation; humans and experiments must retain the final say.
    2. Ignoring distribution shift. Differences in chemical distribution between the training set and the real candidate pool can inflate metrics, so out-of-distribution detection should be introduced.
    3. Over-automating elimination. Excessive elimination early on loses potentially strong candidates; early layers should be permissive and later layers strict.
    4. Lacking uncertainty expression. All conclusions should carry confidence intervals or evidence strength to avoid misleading false certainty.
    5. Ignoring compliance and auditing. Research data involves intellectual property and privacy, so permissions, anonymization, and auditing must be built into the architecture from day one.

    8. Adoption Roadmap: From Pilot to Scale

    • Phase 1 (2–4 weeks): Select a single disease direction and a clear target, connect data ingestion and standardize definitions, and establish a baseline evaluation set.
    • Phase 2 (1–2 months): Implement agent orchestration for layered screening, integrate deterministic computational tools, and produce structured evidence reports.
    • Phase 3 (2–3 months): Establish an experimental feedback loop, calibrate models and rules with real experimental data, and build a reusable feature platform.
    • Phase 4 (ongoing): Expand to multiple targets and chemical series, improve cost, latency, and compliance governance, and form a screening pipeline at scale.

    Conclusion

    The real dividing line for AI4S is not whether it can generate thousands of candidates in the time it takes to have a meal, but whether it can build an engineering system that eliminates wrong candidates quickly, explainably, and traceably. When every layer of the funnel has clear criteria, every elimination has an evidence chain, and every round of experiments feeds back into data assets, the question of who survives to the end turns from suspense into a measurable, optimizable, and reproducible R&D capability.