Richard B.
Canty
,
Brent A.
Koscher
,
Matthew A.
McDonald
and
Klavs F.
Jensen
*
Department of Chemical Engineering, Massachusetts Institute of Technology, Cambridge, USA. E-mail: kfjensen@mit.edu
First published on 22nd September 2023
Integrating automation and autonomy into self-driving laboratories promises more efficient and reproducible experimentation while freeing scientists to focus on intellectual challenges. In the rapid advances being made towards self-driving laboratories, automation and autonomy techniques are often convoluted due to similarities between them and ambiguous language, leaving the trade-offs between them overlooked. In this perspective, we address differences between making a process occur without human intervention (automation) and providing agency and flexibility in action (autonomy). We describe the challenges of autonomy in terms of (1) orchestration, how tasks are organized and coordinated; (2) facilitation, how devices are connected and brought under automated control; and (3) scripting languages, how workflows are encoded into digital representations. Autonomous systems require advanced control architectures to handle a reactive, evolving workflow, involving control abstractions and scheduling beyond what current automation approaches provide. The specification of an autonomous system requires goal-oriented commands and context awareness, whereas automation needs exact, unambiguous instructions for reproducibility and efficiency. We contend that this contrast in design creates a need for improved standards in automation and a set of guiding principles to facilitate the development of autonomy-enabling technologies.
Previous discussions concerning automation and autonomy have included: (a) a theoretical basis for comparing the degree of cognitive automation in chemical design14 and in holistic experimental design and interpretation,15 (b) prior demonstrations of automated research in the chemical, materials, and life sciences,16–20 (c) the interplay between the components of automation and improved artificial intelligence,5,21–31 (d) the practical considerations of developing automated platforms,32,33 and (e) the associated data-management of automated workflows.34–36 In this perspective, we address the requirements and consequences of designing for autonomy in contrast to automation and discuss the challenges with its implementation and the community adoption of autonomy-enabling tools. In the discussion of design, control, and encoding of autonomy, we include our approach2 as an example of designing autonomy-supporting tools for a self-driving experimental platform, comprising multiple autonomous agents.
In prior publications on autonomy, the definition of autonomy has been flexible: automation coupled with machine learning for cognitive processes,12–14,37 the extent to which the automation's research is indistinguishable from that of a human researcher,15 a paradigm where automation is goal-oriented,32 the extent to which a system can achieve a set of goals in a given context,38 or as a synonym of automation.34 To avoid ambiguity, we define automation herein as the act of making a process occur without human intervention and autonomy as a paradigm where feedback and adaptive decision-making afford the system agency over the manner of its actions. This self-determinism is often reflected in a change from instruction-oriented to goal-oriented automation—two design patterns that have different needs and have similar, but distinct, effects on self-driving laboratories (Table 1).†
Automation | Autonomy | ||
---|---|---|---|
Design. What is required and what is the objective? | Goal | Robust process | System actively learns robustness |
Exact reproducibility | Adaptive operation (agency) | ||
Consequence | Process facilitation and orchestration requires input/output validation | Process facilitation and orchestration must support planning, analysis, and learning tasks | |
Orchestrator manages concrete tasks | Orchestration needs to handle both abstract and concrete instructions | ||
Scripts require specific imperatives | Designer needs to provide a means for control architecture to evolve | ||
Designer needs to explicitly account for every (reasonable) eventuality | |||
Facilitation & orchestration. How are interfaces designed? What controls scheduling and coordination? | Goal | Expedite platform setup | |
Improve software and hardware maintainability | |||
Manage material and information throughput | |||
Maintain platform operation | |||
Consequence | Standardized interfaces for control | Standardized interfaces for control and feedback | |
Unidirectional/Hierarchical control-flow | Bidirectional/Collaborative control-flow | ||
Records of performance (logs) may be pass/fail (process is already fully specified) | Process control (feed-back/-forward) | ||
Precise logs must be generated during operation | |||
Scripting. How are processes codified and to what end? | Goal | Full and exact specification of process | High-level specification of process |
Expressive power (generalizability) | |||
Consequence | Scripts concern tasks and workflows (well-defined) | Scripts concern goals and objectives (vague) | |
Porting scripts between systems is pass/fail (the recipient system either has the capability to run the script or not) | Porting scripts between systems is adaptive, but potentially lossy (the recipient system may modify the workflow) |
The design of an automatic and autonomous system starts with the goals of the system and how these are codified. These objectives cascade into requirements and consequences for facilitation and orchestration then into scripting (Table 1). For automation, the goals of robustness and precision result in a direct control architecture and rigorous instructions, which in turn yield scalable, portable, and transparent workflows. Conversely, for autonomy, the goals of adaptability and expressive power result in a highly context-aware control architecture and underspecified but powerful instructions, which in turn yield robust workflows with few discarded experiments. In this sense, the design pattern of autonomy trades efficiency in in-domain automation for the flexibility to make out-of-domain processes possible. Notably, autonomy is not the pinnacle of automation: an autonomous platform can have human agents, and a fully automatized, perfectly specified process leaves no degrees of freedom for there to be autonomy.38
Our platform accounts for the uncertainties that arise from model-driven chemical synthesis, by utilizing workflow-level adaptivity and task-level operational insights. To this end, each agent is treated as a “robotic expert”42—afforded the ability to determine how best to accomplish its goals and, if it cannot, the ability to modify the workflow itself by changing or adding tasks to rectify obstacles. This provides a means for both automatic error recovery and reactive processing.
Rectifications make the platform more robust in executing workflows. Similarly, the ability to expand the workflow (e.g., adding isolation steps for each successful reaction in a batch) allows for actions to be planned which could not be known at the inception of the workflow. While the mutability of the workflow greatly increases the autonomy of the platform, it comes at the cost of transparency as a completed workflow may be substantially different from one proposed by the experimental designer.
We suggest that robotic experts should be decoupled from their tools. This would allow a robotic expert to inspect all functionality available to it, including equipment shared between agents. This expands capability and reduces the chance of breaking workflows when modules are modified. Such separation of the decision logic from the agent also decouples the sharable aspect of the robotic expert (its decision logic) from the hardware- and software-specific implementation details, and allows the expert to be portable to other systems with minimal overhead.
While the first generations of (semi)autonomous platforms have used hard-coded logic, with standardized data capture goal-oriented platforms may learn from past experiments and self-optimize experimental protocols. For such fully autonomous agents to proliferate, their training data would need to be accessible to others. This will require publishing experimental logs or precise summaries of decision logic such that others do not have to train their robotic experts from scratch.
To achieve active learning in these robotic experts, data capture and formatting for autonomous systems need richer and more structured information than existing paradigms like FAIR43 alone can manage.36,41 To ensure adequate logging for scientific rigor, standardized loggers will need to capture information on the sample, hardware, and platform levels. Fortunately, there exist bases for (meta)data capture and formatting in the ORD,44 CRIPT,45 HELAO,41 ESCALATE,34 and ESAMP46 approaches which can augment FAIR logging.
Challenges with such log mining include the question of how to capture complex interactions (e.g., the previous workflow left a residue on a pipette) and how to share these observations with other platforms as these observations are highly contextual and can become too large to be sensibly utilized. Existing commercial automation hardware does not possess the level of logging detail required, often requiring supplementation with cameras or other sensors3,8,11,39,47—forestalling the development of such a standard until auditing features are sufficient.
Ultimately, the degree of autonomy appropriate for a system depends on its purpose. Autonomy comes at the cost of increased management complexity, more difficult scalability, and decreased raw throughput, but provides improved experimental fidelity and the ability to explore unfamiliar chemical spaces.
The creation of a universal controller (applicable to any workflow, in any domain, on any platform) is challenged by the trade-off between structure (ease) and freedom (power) and how the nature of the application limits adaptability. Even within a single domain, the scalability of a controller to more intricate workflows or larger experimental platforms can be a challenge. Complexity and additional control layers may worsen latency, risk leaks in modularity (making code harder to modify for new applications), and hinder data capture and organization.34,41 The structure that makes a flow-chemistry controller easy to use may preclude adaptations to batch-chemistry applications, and vice versa; and providing the power to handle both risks being too convoluted to be generally useful. Second, reproducible research requires rigorous data management (material provenance, detailed records of measurables and observations, transparent data processing, etc.); however, modifying how controllers handle data can often break other controller functionality. A final challenge to controller universality is human interaction and its variability. Humans, as administrators or agents, require user-interfaces and protocols to ensure experiments are not corrupted.
There are a few facilitators which were designed to be adopted by other laboratories, notably ChemOS48,49 (commercially as Atinary), Hierarchical Experimental Laboratory Automation and Orchestration7,41 (HELAO), Experiment Specification, Capture and Laboratory Automation Technology34 (ESCALATE), Materials Acceleration Operation System50 (MAOS) (and its in-cloud version MAOSIC51), LeyLab,8 BlueSky + Ophyd,52 and Autonomous Research System Operating System4 (ARES OS). These facilitators reduce coding burdens, as they automate many of the integration steps, and can tutor the development of automated platforms through the analysis of their scaffolding; however, none are universal, and the nature of an application may require creating a new controller in-house.
Our application required the independent (and potentially concurrent) execution of workflows comprising batch-synthesis, isolation, and characterization experiments grouped into 96-well plates. Moreover, networked control was required as a single computer was insufficient to handle all the equipment. After reviewing available controllers at the time, we decided to design our controller in-house.
Traditional unidirectional control structures (Fig. 1A and B) do not lend themselves to agents which may need to construct or adapt their own methods on the fly. Our collaborative architecture uses minimal signals, and the bulk of information transfer is relegated to database queries (Fig. 1C). Commands specify only enough information to look-up and validate information from the design database (Fig. 1C, minimal signal). Responses specify enough information to guide how the orchestrator should proceed—if the operation succeeded, the system was already busy, there was a recoverable error, or there was an error requiring human intervention—along with some logging details (Fig. 1C, response).
These minimal, standardized signals helped keep the controller flexible and expandable despite the poor standardizations of low-level labware commands and application programming interfaces (APIs). The lack of commercial automation standards meant that instrument-specific details for each operation on the platform had to be manually coded. These could be organized and contained within each agent, since the minimal signal structure meant that changes to agents would not affect the controller.
This use of multiple independent agents is shared between many controllers—owing to how modularity eases the modification and implementation of new capabilities and protects networks of systems from cascading crashes (e.g., one agent going offline does not crash other agents or halt the controller). Paradigms that improve containment will likely guide the design of future controllers. Importantly, it makes substituting systems easier; for example, simulated and user-mediated operations are invaluable for development, maintenance, and minimizing downtime. While it would seem antithetical to implement a mode where a human can seamlessly perform tasks on an autonomous platform, an autonomous platform need not be completely automated—sometimes a task is more efficiently performed by a human.
While the interfaces of goal-oriented agents and their networks are crucial for both automated and autonomous systems, the adaptability of autonomous systems imposes a unique burden on orchestration, particularly on scheduling. When a system can modify its own workflow in response to feedback, which may be delayed by multiple steps (e.g., a reaction's success or failure is not known until after analysis), it risks scheduling conflicts and resource mismanagement. Absent parallelized, autonomous agents, previous schedulers could rely on (prioritized) first-come first-served algorithms3,41,49,51 and ready-checks.37,53
To overcome the challenges of nondeterministic workflows, our orchestrator supports the dynamic allocation of resources, performs safety checks for agent operation and potential congestion of resource traffic on the platform, and a scheduling algorithm that has both a planning horizon extending beyond one task and handles temporal constraints between tasks. When planning multiple, non-identical workflows in parallel, the scheduler does not perform scheduling optimization as workflows frequently change and the appropriate optimization algorithms require significant computational effort. We generate a satisfactory schedule with an algorithm that selects the best option at each decision point which does not risk a future scheduling conflict (Fig. 2).
Orchestration is constrained by the inherent ordering of the workflow and the capabilities of each instrument requested. In addition, we imposed that partially completed tasks cannot be suspended to run another task and that tasks may contain scheduling constraints. Supported temporal constraints include (a) no relation, (b) a defined wait period between two tasks, and (c) a minimum wait period between two tasks. For constraints requiring a maximum allowable time between tasks, the window of opportunity was assumed to be zero seconds. Such windows are often contextual (e.g., before significant evaporation or hydration of solvent) and would require sensors not currently present on our platform. Each task's specification requires a record of start and end times as well as time estimates that can be adjusted by agents during execution to provide the scheduler with up-to-date information. This temporal information is then used to detect timeout errors and conflicts when scheduling new tasks.
Scheduling is accomplished by building and filtering a pool of candidate workflows. The design database is pulled for all complete, underway, and idle workflows (Fig. 2A). Idle workflows are filtered based on the completion of prerequisites, and the first incomplete task is identified. The last complete and first incomplete operations are inspected for scheduling constraints. This inspection cascades forward, and any group of constrained tasks is considered as one block (Fig. 2B). Candidate blocks are then screened to ensure all agents are operational. Each candidate block is evaluated against underway task blocks using a conflict matrix (Fig. 2C), and intersections of both agent and expected operational time are identified. The traffic of items on the platform is simulated with the candidate block to check for gridlocks with the existing, underway blocks (Fig. 2D). The remaining candidates are scored on the age of their workflow and their time overdue for a scheduled operation. There is a penalty for workflows that report recoverable errors without initiating a recovery protocol or have a status discrepancy, such as a human using a system without proper check-out. The highest-ranked task is selected for execution.
In reflecting on this scheduler, it became clear that the inclusion of sample monitoring would be advantageous for an autonomous platform. Given a means to oversee samples not undergoing an operation (such as tracking evaporation or exposure), an autonomous system could adjust scheduling constraints or insert operations to better preserve/restore samples32 (also known as “parking” samples19). Moreover, the requisite sensors and models could provide a way to afford meaningful estimates for maximum allowable times between operations.
The design of autonomy-supporting facilitation and orchestration software remains a challenge. Interfaces need to transmit sufficient and properly formatted streams of information for adaptive control at the task and workflow levels, and orchestrators must be accommodating to flexibility in the workflows. With the differences in workflows between fields and applications, it becomes difficult to select a single architecture that can meet all potential application needs while also minimizing overhead and remaining accessible to the scientists using it.
As developments in chemistry automation integrate the chemical, material, robotic, and software sciences, laboratories could collaborate with skilled software engineers to ensure the necessary support is present for developing these projects. This would address a critical gap in current self-driving laboratory software: the depth of software development skill required to make such automata functional and accessible is daunting to those who would benefit most from its general use. Such in-house expertise would balance the power of autonomous chemistry software and establish its accessibility to future researchers. Eventually, it is possible that commercial or community projects can be shared to increase the accessibility of software tools without the need for software experts for deployment or further development. Laboratories could then either use a software package wholesale or build their own system piece-wise from standardized modules to accommodate new research domains.
χDL and Autoprotocol are human- and machine-readable prescriptive languages that aim to be hardware agnostic and computationally unambiguous for reproduction between laboratories. Languages may make assumptions about the basic conceptual unit of the platform (e.g., an experiment, a reaction template, a batch, a laboratory vessel, etc.). The scripting language employed may affect the adaptability of workflows. Autoprotocol only supports fixed workflows (lacking runtime evaluations and branching logic). χDL does allow monitoring steps and loops with dynamic feedback control, but not branching workflows. Another challenge of prescriptive scripting languages is the disconnect between instructed and realized actions and quantities. More descriptive languages, such as CRIPT, can capture the full history of reagents, materials, and processes—though often at the cost of facile human interpretability.
Any scripting language will require some level of compilation to be translated into instructions for a physical platform. More concise languages, such as χDL, require more interpolation to fill in gaps whereas highly descriptive languages, such as CRIPT, require more interpretation to discern which details are relevant. While individual versions of each language may be modified to meet the goals of a single project, a consistent community standard improves the transferability of scripts between laboratories and can accelerate collaborative projects.
Scripting languages highlight the difference between automatic and autonomous design. An automatic workflow requires fully specified actions that can be reproduced without interpolation or interpretations, whereas an autonomous workflow is conducted entirely through interpolation and interpretation of goals and contexts. Languages that attempt to handle both risk being too vague for automation and too restrictive for autonomy.
Two fundamental challenges with scripting languages for autonomy are (a) accounting for new operations and adaptations required by an ever advancing scientific field and by evolving autonomous agents and (b) balancing abstraction with reproducibility. The inclusion of a means for incorporating new base directives‡ in a scripting language inhibits the shareability and reproducibility of a workflow as implementation details become required to translate or compile the script. Similarly, the adaptability required by autonomous workflows contradicts a community goal for automation whereby scripting languages act as a standard to help laboratories develop, share, and reproduce experiments as any adaptations are context-dependent and may be governed by stochastic or unpredictable events (e.g., network connectivity, nucleation events, etc.).
We required a language for batch chemistry in well plates that was dynamic and could be interpreted by a human in both its planned and ultimate form. We encoded workflows and their metadata in dictionaries and hosted them in a local database. These digitized workflows were constructed by extending and filling templates based on the required steps and reaction conditions for batches of multistep syntheses, organized by well plate. The data representation of the workflow serves to support adaptability, and human readability, through three primary choices:
Firstly, steps in the workflow document are high-level, well-plate-oriented commands, such as “prepare_wellplate” or “hplc_semiprep”. While the abstraction of multiple subtasks into a single task is utilized by most orchestrators, these are either fixed abstractions34,41 or are defined at compile-time.54 By separating the directive (workflow specifications) from the details (databases), the agent, acting as the robotic expert, can fill in and implement these high-level commands using live data.
Secondly, the well plates are referenced by a semantic alias in the workflow (e.g., “reaction_plate” or “filtrate_plate”). This improves human readability and allows any compatible, available well plate to be used and linked to the given alias at runtime—a useful feature when managing resources between multiple workflows in parallel.
Finally, the workflow itself is mutable, allowing agents to modify the workflow, typically by inserting new steps, and convey information to other agents, typically by adding new wellplates or updating step or well detail fields. The actual actions performed on each well or well plate (as applicable) are logged or can be recovered from either the workflow document or the scripts generated for hardware execution.
Concerning automation, the improvement of APIs, both vendor- and user-made, would facilitate the development of automated and autonomous platforms—a list of needs for control and reporting is provided in Table 2. When published, APIs should have minimal technical debt.60,61 Exposing low-level functionality allows platforms the power to accomplish tasks beyond the well-structured methods often exposed to users for ease. Moreover, rich reporting allows more robust, responsive operation and provides the details required for a platform to learn. The construction of a public repository of these APIs, where all submissions are cleaned of stylistic and programmatic errors, and versioned (both for their own features and for what they control), would greatly facilitate laboratory automation. However, this may represent an opportunity cost and a potential threat to the intellectual property of industry. It is also difficult to justify the development cost of an industry standard when it would limit market opportunities to license proprietary automation software packages/expansions. A government program or consortium of academic and industrial laboratories collaboratively pushing for the realization of chemical and material automation software and hardware standards may be best equipped to realize this goal.
Control | Reporting |
---|---|
(1) Publicly accessible and thorough documentation | |
(2) Safe changes of state | (2) Confirmation of receipt responses |
(3) Method generation & validation, as applicable | (3) Report current system state |
(4) Validate current system state | (4) Non-proprietary data export |
(5) Perform any operation accessible via the user interface, as applicable | (5) Rich, meaningful operational responses |
(6) Unrestricted changes of state | (6) Logging and data-capture integration |
Any singular automation research laboratory is ill-suited to drive standards in automation as its role is to push boundaries and develop new technologies. Existing frameworks, without considerable modification, may not meet the needs of novel automated chemistry platforms. Individual laboratories are likely to create their own code and autonomy frameworks (intra-laboratory standards), applicable to the focus areas of the laboratory, to facilitate expansion and cross-generational use. However, collective action for the standardization of automation between laboratories would make it easier to expand self-driving laboratories into new research areas in chemical and materials sciences, enabling new discoveries. In the meantime, sharing intra-laboratory standards can help accelerate standardization. By providing publicly accessible and thorough documentation, other groups can better learn from, deploy, and adapt existing technologies.
While there are many automated chemistry systems, spanning discovery to optimization, platforms capable of autonomous experimentation are much less common. Few of the latter exhibit much beyond process-level autonomy. Despite their scarcity, each demonstrates different architectures for autonomous research. This journey toward autonomy in chemistry is still in its infancy. It may be best, for the time being, to embrace the diversity of ideas and architectures presented in existing and future automated systems before attempting to establish standards for autonomy. Considering the field of computation, a field to which chemical automation has been routinely compared,61 despite its age and maturity, there exists a thriving ecosystem of coding paradigms, languages (e.g., Python, C++, Rust, MATLAB), operating systems (e.g., Windows, macOS, Unix), and architectures. If chemistry automation is similar, then it is likely that multiple application standards will arise, each suited for a general use-case or experimental architecture, as will a more general set of guidelines or principles for automation and autonomy which are multidisciplinary.
Footnotes |
† Similar to computer programming, it is possible to achieve any functionality using any design paradigm; different designs exist to make achieving desirable functionality easier and more extensible. |
‡ This is distinct from the composition of existing base directives into a higher-order directive, often called a macro or method, which exists as a means of organizing and simplifying code. |
This journal is © The Royal Society of Chemistry 2023 |