AI4S in Practice: From Million-Compound Screening to the Clinic
This article examines why the real bottleneck in AI for Science (AI4S) drug discovery is the width of the candidate funnel rather than raw compute speed, and how to address it with large-model-driven biological computing agents. It explains the cost of context loss in traditional serial screening pipelines, then outlines a four-layer reference architecture covering the data and feature layer, agent orchestration layer, and evaluation and feedback layer. The orchestration section details a "deterministic tools first, model reasoning as fallback" strategy with Python examples for metadata structures and screening logic, showing how to keep hallucination risk within acceptable bounds. Readers will learn how to turn implicit research expertise into reusable workflow assets while preserving traceability across data versions and feature snapshots.
1. The Real Problem: A Funnel Too Wide, Not Compute Too Slow
In drug discovery, the true bottleneck is rarely the runtime of a single molecular docking run or one dynamics trajectory. It is the combinatorial explosion of the candidate space. A mid-sized lead optimization project may face anywhere from hundreds of thousands to millions of virtual molecules. Layer in multiple targets, multiple polymorphs, and multiple routes of administration, and the evaluation matrix quickly grows beyond what any team can exhaust manually.
The conventional approach moves through stages sequentially: structure-based screening first, then ligand-based similarity clustering, followed by affinity prediction, druggability assessment, metabolic stability prediction, and initial toxicity screening. Each stage is handled by a different specialist using a different toolchain, with handoffs carried out through spreadsheets and documents. The direct consequence is context loss. Assumptions, failure reasons, and boundary conditions from the previous stage rarely transfer intact to the next one, which produces duplicated work and decision drift.
Connecting large models to biological computing agents does not add value by “replacing a specific compute module.” The value lies in turning scattered judgment criteria into reusable orchestration logic. Consider the scenario in the source material: marker gene computation, ribosomal protein filtering, and biological plausibility assessment are three judgments of fundamentally different natures. The first is deterministic numerical computation, the second is rule-driven set filtering, and the third is fuzzy reasoning that carries prior knowledge. Having an agent schedule all three tasks together amounts to making one researcher’s tacit experience explicit as a process asset.
2. Reference Architecture: Four Layers Carrying the AI4S Workflow
Reproducing the “finished in the time it takes to eat a meal” efficiency gain reliably in engineering requires clear layer separation, and it requires not treating the model as an omniscient black box.
2.1 Data and Feature Layer
This layer organizes raw sequences, structures, omics measurements, and literature conclusions into features that are searchable and versionable. Common practices include using object storage for raw and intermediate artifacts, using a relational or vector retrieval service to build a metadata index, and using a message queue to decouple upstream collection from downstream computation. The key design point is traceability: the conclusion for any candidate molecule should be traceable to a specific data version and feature snapshot.
A schematic metadata structure can be expressed as follows:
candidate_meta = {"candidate_id": "C-000123","sequence_version": "v3","structure_source": "prediction|experiment","features": {"marker_score": 0.82, "rp_flag": False},"lineage": ["stage_structure", "stage_rule", "stage_llm_review"]}
2.2 Agent Orchestration Layer
The orchestration layer is the core of the efficiency gain. The recommended strategy is “deterministic tools first, model reasoning as fallback”: anything that rules or numerical methods can solve is not handed to the model, and the large model is invoked only where semantic understanding and prior-knowledge integration are required. This substantially reduces uncertainty and makes cost accounting easier.
A simplified orchestration pseudocode:
def screen(candidate):if not rule_filter(candidate): # Rule layer: hard constraintsreturn "rejected"score = docking_proxy(candidate) # Numerical layer: fast scoringif score < THRESHOLD:return "rejected"review = agent.evaluate(candidate) # Semantic layer: plausibility reviewreturn "accepted" if review.confident else "manual_queue"
The benefit of this layering is that model output is constrained to the responsibilities of review and explanation rather than directly deciding a molecule’s fate, which keeps hallucination risk within an acceptable range.
2.3 Evaluation and Feedback Layer
The most common reason AI4S projects fail is a missing closed loop. The evaluation layer needs to record three categories of metrics at the same time: screening hit rate, and the elimination reasons at each stage
