AI4S Molecular Funnel: Screening Engineering from Millions of Candidates to the Clinic
Drug discovery faces a huge gap between virtual chemical space and experimental throughput. This article describes a narrowing molecular funnel, the bottlenecks of glue code, tacit filter rules, and biological plausibility, and how an LLM agent should act as an orchestration and explanation layer rather than a compute engine. It covers a four-layer architecture, evaluation metrics, risk boundaries, and a staged rollout.
1. The Core Problem: A Funnel That Narrows by Orders of Magnitude
The central tension in drug discovery is the gap between candidate space and experimental throughput. A mid-sized virtual compound library easily reaches millions to billions of molecules, while only a handful typically advance into preclinical work. Between those ends there has to be a funnel that narrows stage by stage:
- Virtual library (10^6–10^9). Sources include commercial library enumeration, reaction enumeration, and generative-model sampling. The criteria are synthesizability plus structural diversity.
- Coarse screen (10^4–10^5). Filters are mainly pharmacophore matching, similarity clustering, and physicochemical properties such as drug-likeness, solubility, and permeability. The goal is high recall at low cost per molecule.
- Fine screen (10^2–10^4). Molecular docking, molecular dynamics, binding free-energy estimates, and ADMET prediction. The goal is ranking quality.
- Experimental validation (10^1–10^2). Biochemical activity, cellular activity, selectivity, and early toxicology.
- Clinical candidates (1–3). A joint decision on developability, patentability, synthetic route and cost, and the competitive landscape.
Each layer is not a pure computation problem. It mixes computation, interpretation, and decision-making. What usually slows the process is not raw compute, but manual interpretation in the middle layers and orchestration across tools.
2. Where the Bottlenecks Are: Three Recurring Failure Points
Failure point 1: The glue cost of annotation and feature calculation. Going from sequence or structure to usable features means chaining heterogeneous packages: sequence alignment, structure prediction, pocket detection, physicochemical property calculation, and quantum-chemistry fragment optimization. Each step has its own input format, failure modes, and version dependencies. A researcher with domain knowledge often spends more than 60% of their time making the pipeline run rather than interpreting results.
Failure point 2: Filter rules are too knowledge-dense. Transmembrane, disordered, and low-complexity regions of a receptor are usually poor druggable targets. Ribosome-related proteins and housekeeping genes are noise sources in most phenotypic screens. Marker genes need cross-checks against expression profiles and functional annotation. These rules are scattered across papers, internal SOPs, and senior experience, and they are hard to standardize.
Failure point 3: No single way to judge biological plausibility. It is common for a candidate set to look good on computed scores but fail mechanistically: the binding site contradicts a known activation or inhibition direction, the off-target profile conflicts with expression, or metabolite activity is unknown. That judgment needs a traceable evidence chain from the model, not an isolated score.
3. Three Entry Points for Agents
The safer role for a general-purpose large language model is an orchestration and explanation layer, not a compute engine. It is good at turning a natural-language goal into a tool-call sequence, folding heterogeneous outputs into a structured conclusion, and turning error logs into actionable suggestions.
Entry point A: Workflow orchestration and automatic annotation. The agent builds an execution plan from the task description, calls deterministic operators registered at the tool layer, and writes structured results back.
# Sketch: tool registry + budget guard + idempotent cacheTOOLS = {"seq_annotate": seq_annotate, # sequence annotation (deterministic)"structure_pred": structure_pred, # structure prediction (deterministic)"pocket_scan": pocket_scan, # pocket detection"physchem": physchem, # physicochemical properties"ligand_screen": ligand_screen, # docking / scoring}def run_plan(plan, budget):ctx = {}for step in plan.steps:key = cache_key(step) # idempotent: same input is not recomputedif key in CACHE:ctx[step.out] = CACHE[key]; continuebudget.charge(step.est_cost) # trip the breaker when over budgettry:ctx[step.out] = TOOLS[step.tool](**step.args)except ToolError as e:ctx[step.out] = {"error": str(e), "retryable": e.retryable}CACHE[key] = ctx[step.out]return ctx
Entry point B: Make rule-based filtering explicit. Write tacit experience as a versioned rule set. The agent selects rules and explains why they fired. The rules themselves stay deterministic and testable.
rules:- id: R-TRANSMEMBRANEwhen: target.topology.transmembrane_ratio > 0.6action: flag # mark as low-druggability risk; do not drop outrightreason: "Targets with a high transmembrane fraction often lack an accessible pocket"- id: R-HOUSEKEEPINGwhen: target.annotation.housekeeping == trueaction: downweight
Entry point C: Evidence-chain plausibility review. Require the model to output conclusion, evidence, counterexamples, confidence, and experiments still needed. Unverifiable claims stay visible and go to a human review gate.
4. Reference Architecture: Four Decoupled Layers
- Tool layer. All computation is wrapped as deterministic services or command-line tools, with a shared input/output schema and mandatory recording of version numbers and random seeds.
- Orchestration layer. DAG scheduling, idempotent caching, retries, and budget circuit breakers. The agent emits a plan; it does not edit data directly.
- Reasoning layer. A general-purpose model handles semantic understanding, plan generation, and result summarization, with low temperature, structured output, and self-consistency voting when needed.
- Data and governance layer. Object storage keeps raw artifacts. Logging and monitoring cover task success rate and latency distribution. A metadata store records lineage from input fingerprint to parameters to artifacts.
In a cloud deployment, a container platform runs stateless operators, a message queue absorbs spikes and applies backpressure, object storage archives artifacts, and logging plus monitoring close the observability loop. These are generic capability categories. When choosing them, reproducibility and auditability come first.
5. Evaluation: How to Show It Is Actually Faster and Better
Do not stop at “hours saved.” Use three metric layers:
- Offline benchmark. Fix 200–500 labeled samples and compare the agent pipeline with a human baseline on recall, ranking correlation (for example NDCG), and agreement on rule hits.
- Process metrics. Task success rate, average retries, compute cost per candidate, and end-to-end latency (P50/P95).
- Online effect. Use hit rate among candidates that enter experimental validation as the north-star metric in an A/B test, plus human spot-check agreement (a sample of at least 5% is a reasonable floor).
The key principle is layered attribution: split gains across orchestration automation, explicit rules, and evidence-based review. Otherwise you cannot tell where to optimize next.
6. Risks and Boundaries
- Hallucination. The model will confidently invent database fields or parameters that do not exist. Countermeasures are a tool allowlist, schema validation, and refusal when the request cannot be grounded.
- Data compliance. Sequences and compound structures may be intellectual property. Keep data in-boundary or apply a defined de-identification policy.
- Explainability. Any score that enters a decision chain must trace back to a specific operator and version.
- Accountability. The agent is a copilot. Clinical conclusions must be signed off by a qualified team.
7. A Practical Rollout Path
Stage one is a read-only assistant: explanation, summarization, and anomaly alerts, with no compute triggered. Stage two allows automatic execution of low-risk operators such as annotation and physicochemical properties. Stage three opens high-cost fine-screening operators only under budget limits and a review gate. Each stage is released only after the offline benchmark and human spot checks pass.
Conclusion. The value of AI for science on the molecular funnel is not replacing physics-based calculation with a larger model. It is collapsing scattered tools, tacit experience, and fragmented judgment into an engineering pipeline that is reproducible, auditable, and costed. What lasts is clear criteria at every layer, traceable evidence, and a budget you can actually plan—not how impressive a single demo looked.
