LabCompiler improves reliable lab workflows from imperfect protocols

LabCompiler: A Framework for Verifiable Human-Machine Laboratory Execution from Imperfect Protocols

Artificial Intelligence

Summary

Laboratory experiments often start with instructions written in natural language, which can have errors or unclear steps. The authors developed LabCompiler, a system that detects and fixes these errors automatically before turning the instructions into steps that humans and machines can follow together. LabCompiler works across many types of lab devices by separating the experiment’s meaning from the hardware controls, making it easier to reuse and verify workflows. The authors tested their system on various errors and found it better at fixing them than leading language models, enabling smoother cooperation between humans and machines in real labs.

What this means in practice

Authors

Jingyuan Li, Dongzhan Zhou, Minting Pan, Yujie Liu, Yuan Gao, Yankai Jiang, Xinyu Gu, Zhe Liu, Yang Li, Bo Zhang, Lei Bai, Tong Si, Weinan Zhang

Abstract

Closing the loop of AI-driven science requires reliably translating natural-language protocols into executable laboratory workflows despite protocol defects and heterogeneous hardware. Existing approaches often couple scientific interpretation with device-specific code generation, making errors difficult to localize and limiting reuse across laboratory platforms. We introduce LabCompiler, a robust protocol-to-execution framework that transforms imperfect natural-language protocols into verifiable human-machine workflows. Its protocol firewall diagnoses and repairs defects before compilation while preserving unaffected content, guided by troubleshooting knowledge accumulated through perturbation-guided self-evolution. A two-level, device-agnostic graph representation separates experimental semantics from hardware-specific implementation and supports capability-based device assignment with coordinated human execution. We further introduce a protocol recovery benchmark covering four controlled perturbation types and naturally occurring errors collected from protocols written by iGEM participants. Experiments show that LabCompiler outperforms frontier LLMs in protocol error correction while enabling coordinated human-machine execution across heterogeneous, partially automated laboratory settings.