Part I: Foundations of Discovery AI
Chapter 1: Discovery As Search

1.3 Discovery Workflows

"My workflow had seven stages, twelve decision points, and forty-three possible paths. Then someone added a 'pivot' action and the state space went to infinity."

A Finite State Machine Having an Existential Crisis
The Big Picture

Sections 1.1 and 1.2 treated discovery as choosing among options at a single decision point. Real discovery unfolds over sequences of decisions: form a hypothesis, design an experiment, collect data, analyze results, revise the hypothesis, repeat. This section models these multi-step processes as state transition systems, a formalism that reveals precisely where AI can accelerate each stage. We encode workflows as directed graphs using NetworkX, compute path properties, and identify the bottleneck stages where intelligent automation yields the highest returns.

1. From Single Decisions to Sequential Workflows

A graduate student runs a promising experiment, gets an ambiguous result, redesigns the protocol, waits two weeks for new reagents, reruns the experiment, discovers a confound in the original data, and starts over from scratch: six months consumed, with the finish line no closer than it was on day one. The culprit is not any single slow step but the dependencies between steps. In Section 1.2 we modeled discovery as choosing among options at a single decision point, yet real discovery unfolds as a chain of decisions where each outcome determines which steps become available next. These dependencies create a workflow, a structured sequence of activities with conditional branching.

Without a formal model of the workflow, teams optimize the wrong stage: they pour resources into speeding up a 30-day experiment by 10% while ignoring a 14-day literature review that AI could potentially compress by 90%. The formalism below makes such misallocations visible before a single dollar is spent.

We formalize a discovery workflow as a state transition system (STS):

A state transition system is a mathematical model. It captures every configuration a process can occupy (its states), every action that moves the process between configurations (its transitions), and the rules governing which actions are legal in which states (its transition function). This matters because it converts an informal, ad hoc research process into a precise, analyzable object. Once a workflow is an STS, you can compute its critical path (the longest sequence of dependent transitions that determines the minimum total duration), identify bottlenecks, prove that every state is reachable, and program an AI agent to navigate it automatically. The mechanism is straightforward: at each moment the system occupies exactly one state. When an action fires, the transition function selects the next state (deterministically or stochastically), and the system moves there. Use an STS when the process has discrete, well-defined phases and you need to reason about sequencing, reachability, or cycle detection. For continuous processes without clear phase boundaries, a differential-equation or agent-based model may fit better.

$$ \mathcal{W} = (Q, q_0, \Sigma, \delta, F) $$

where:

This formalism nests inside the discovery tuple from Section 1.1. The discovery-level state space \(S\) describes what has been discovered; the workflow-level state space \(Q\) describes where in the process the discoverer is. A complete description of the discovery at any moment combines both: the knowledge accumulated so far and the current workflow phase. The deterministic transition function used here suffices for structural analysis (critical paths, bottlenecks, reachability); stochastic transitions, where experimental outcomes are uncertain, become central in the simulation and Bayesian methods of Parts III and V.

The structure of that workflow graph, whether it flows in a single line, loops back on itself, or branches into parallel paths, fundamentally shapes how efficiently a discoverer can reach a terminal state. In short: The shape of the workflow constrains discovery more than the intelligence applied at any single step.

2. Three Workflow Topologies

Discovery workflows fall into three broad topologies, each with different implications for how AI can help. Understanding the topology is the first step toward effective automation. Figure 1.3 illustrates all three side by side. Figure 1.3.1 illustrates three discovery workflow topologies.

Three discovery workflow topologies
Figure 1.3.1: Three workflow topologies for scientific discovery. Linear (left) processes stages sequentially; iterative (center) adds feedback loops for hypothesis refinement; branching (right) explores multiple paths in parallel and merges at analysis.
Linear Define Design Execute Each stage completes before the next begins Iterative Hypothesize Test Analyze revise Output feeds back to an earlier stage Branching Explore Path A Path B Merge Parallel paths explored, then merged Predictability Refinement quality Outcome coverage Each topology trades off a different strength
Figure 1.3: Three workflow topologies. Linear workflows proceed in strict sequence; iterative workflows loop back for refinement; branching workflows explore parallel paths and merge. Each topology favors a different AI intervention strategy.

Linear (waterfall) workflows proceed through a fixed sequence of stages: problem definition, literature review, hypothesis formulation, experiment design, data collection, analysis, interpretation. Each stage completes before the next begins. Linear workflows are easy to manage but fragile: a problem discovered late (e.g., a flawed experimental design revealed during analysis) requires restarting from an earlier stage, wasting all intermediate work.

Iterative (cyclic) workflows contain loops: the output of one stage feeds back into an earlier stage. The hypothesis-experiment-analysis cycle is the canonical example. Iterative workflows are more robust because they allow refinement, but they can get stuck in unproductive loops (testing minor variations of a failing hypothesis instead of abandoning it). The number of iterations is a critical parameter: too few and the discovery is premature; too many and resources are wasted on diminishing returns.

Branching (tree or Directed Acyclic Graph (DAG)) workflows allow multiple parallel paths. After an initial exploration phase, a researcher might pursue three different hypotheses simultaneously, allocating resources to each based on intermediate results. Branching workflows are the most flexible but the hardest to manage: they require decisions about which branches to pursue, when to prune, and how to allocate resources across branches. These are exploration/exploitation decisions at the workflow level, connecting directly to the bandit theory from Section 1.2.

Mental Model

Three workflow topologies as three ways to cook a multi-course dinner: linear, iterative, branching

Think of the three workflow topologies as three ways to cook a multi-course dinner. A linear workflow is like preparing each course strictly in order: you finish the appetizer completely before starting the main course, and any mistake in seasoning discovered at plating means redoing that entire course from scratch. An iterative workflow is like tasting and adjusting a sauce repeatedly: you add salt, taste, add acid, taste, reduce, taste, looping through the same steps until the flavor converges. A branching workflow is like preparing three candidate desserts in parallel because you are unsure which will turn out best, then selecting the winner and discarding the rest. The key mapping: in cooking as in discovery, each topology trades off predictability (linear), refinement quality (iterative), and coverage of the outcome space (branching), and you often mix all three within a single project.

Key Insight: Workflow Topology Determines Where AI Helps Most

In a linear workflow, AI helps most by accelerating the slowest stage (the bottleneck). In an iterative workflow, AI helps most by reducing the number of iterations needed to converge (smarter hypothesis revision). In a branching workflow, AI helps most by making better branching decisions (which paths to explore, when to prune). The same AI technology, applied at the wrong stage or in the wrong topology, may have negligible impact. This is why Chapter 6: Discovery System Architecture begins by analyzing the workflow topology before choosing which components to automate.

3. Encoding Workflows as Graphs

State transition systems are directed graphs, which means we can represent, analyze, and visualize them using graph libraries. We use NetworkX, Python's standard graph analysis library, to encode a discovery workflow and compute properties that reveal its structure.

import networkx as nx

def build_scientific_workflow() -> nx.DiGraph:
    """Build a directed graph representing a typical scientific discovery workflow.

    Nodes are workflow states (phases). Edges are transitions (actions).
    Edge attributes encode the typical duration and whether AI can accelerate
    the transition.
    """
    G = nx.DiGraph()

    # Define workflow states
    states = [
        ("problem",       "Problem Identification"),
        ("lit_review",    "Literature Review"),
        ("hypothesis",    "Hypothesis Formation"),
        ("exp_design",    "Experiment Design"),
        ("data_collect",  "Data Collection"),
        ("analysis",      "Data Analysis"),
        ("interpretation","Interpretation"),
        ("validation",    "Validation"),
        ("publication",   "Publication"),
    ]
    for state_id, label in states:
        G.add_node(state_id, label=label)

    # Define transitions with metadata
    transitions = [
        # (from, to, action, days, ai_speedup_factor)
        ("problem",       "lit_review",     "survey literature",    14, 10.0),
        ("lit_review",    "hypothesis",     "form hypothesis",       7,  3.0),
        ("hypothesis",    "exp_design",     "design experiment",     7,  5.0),
        ("exp_design",    "data_collect",   "run experiment",       30,  1.5),
        ("data_collect",  "analysis",       "analyze data",         14,  8.0),
        ("analysis",      "interpretation", "interpret results",     7,  2.0),
        ("interpretation","validation",     "validate findings",    21,  4.0),
        ("validation",    "publication",    "write and publish",    30,  3.0),
        # Iterative loops (feedback edges)
        ("analysis",      "hypothesis",     "revise hypothesis",     3,  5.0),
        ("interpretation","exp_design",     "redesign experiment",   5,  5.0),
        ("validation",    "hypothesis",     "major revision",        7,  3.0),
    ]

    for src, dst, action, days, speedup in transitions:
        G.add_edge(src, dst, action=action, days=days,
                   ai_speedup=speedup)

    return G


G = build_scientific_workflow()
print(f"Workflow states:      {G.number_of_nodes()}")
print(f"Transitions:          {G.number_of_edges()}")
print(f"Feedback loops:       {len(list(nx.simple_cycles(G)))}")

# Find the critical path (longest path without cycles)
# Use only forward edges for the linear critical path
forward_edges = [(u, v) for u, v, d in G.edges(data=True)
                 if list(G.nodes).index(u) < list(G.nodes).index(v)]
G_forward = nx.DiGraph(forward_edges)
for u, v in forward_edges:
    G_forward[u][v]["days"] = G[u][v]["days"]

longest = nx.dag_longest_path(G_forward, weight="days")
total_days = sum(G_forward[longest[i]][longest[i+1]]["days"]
                 for i in range(len(longest)-1))
print(f"Critical path:        {' -> '.join(longest)}")
print(f"Total duration:       {total_days} days")
Listing 1.6: A scientific discovery workflow encoded as a NetworkX directed graph, with duration and AI speedup metadata on each transition.
Workflow states:      9
Transitions:          11
Feedback loops:       5
Critical path:        problem -> lit_review -> hypothesis -> exp_design -> data_collect -> analysis -> interpretation -> validation -> publication
Total duration:       130 days
Output of Listing 1.6: the linear critical path takes 130 days, and 5 feedback loops create iterative refinement opportunities.

Knowing the critical path tells us how long discovery takes at baseline, but it does not tell us where to intervene; for that, we need to ask which stages yield the greatest time savings when accelerated.

4. Bottleneck Analysis: Where AI Has the Highest Impact

AI acceleration yields unequal returns across workflow stages. The bottleneck stage, the one whose acceleration saves the most total time, depends on both duration and AI speedup factor.

We define the time saved by AI at stage \(i\) as \(\Delta t_i = d_i (1 - 1/\alpha_i)\), where \(d_i\) is the original duration and \(\alpha_i\) is the AI speedup factor. The stage with the largest \(\Delta t_i\) is the most impactful target for automation.

Common Misconception

Readers often assume that the longest stage is automatically the best target for AI acceleration. This is wrong. The bottleneck is the stage with the largest absolute time saved, which depends on both duration and speedup factor. In our model, "run experiment" is tied for the longest stage at 30 days, yet it ranks only fourth in time saved because its AI speedup factor is just 1.5x (physical experiments cannot be sped up much by software). Meanwhile, "validate findings" at 21 days saves more time (15.8 days) because its 4x speedup factor makes the product \(d_i(1 - 1/\alpha_i)\) larger. Always compute \(\Delta t_i\) rather than eyeballing raw duration.

def bottleneck_analysis(G: nx.DiGraph) -> None:
    """Identify the workflow stages where AI provides the greatest time savings.

    For each edge on the critical path, compute the time saved by AI
    and rank by impact.
    """
    stages = []
    for u, v, data in G.edges(data=True):
        days = data["days"]
        speedup = data["ai_speedup"]
        time_saved = days * (1 - 1/speedup)
        ai_days = days / speedup
        stages.append({
            "transition": data["action"],
            "original_days": days,
            "ai_speedup": speedup,
            "ai_days": ai_days,
            "time_saved": time_saved,
        })

    # Sort by time saved (descending)
    stages.sort(key=lambda s: s["time_saved"], reverse=True)

    print(f"{'Transition':<25} {'Original':>8} {'AI':>8} {'Saved':>8} {'Speedup':>8}")
    print("-" * 60)

    total_original = 0
    total_ai = 0
    for s in stages[:6]:  # top 6
        print(f"{s['transition']:<25} {s['original_days']:>6}d  "
              f"{s['ai_days']:>6.1f}d  {s['time_saved']:>6.1f}d  "
              f"{s['ai_speedup']:>6.1f}x")
        total_original += s["original_days"]
        total_ai += s["ai_days"]


bottleneck_analysis(G)
Listing 1.7: Bottleneck analysis ranking workflow transitions by the absolute time savings achievable through AI acceleration.
Transition                Original       AI    Saved  Speedup
------------------------------------------------------------
survey literature            14d     1.4d    12.6d    10.0x
write and publish            30d    10.0d    20.0d     3.0x
analyze data                 14d     1.8d    12.2d     8.0x
run experiment               30d    20.0d    10.0d     1.5x
validate findings            21d     5.2d    15.8d     4.0x
design experiment             7d     1.4d     5.6d     5.0x
Output of Listing 1.7: literature survey and publication are the highest-impact targets for AI, saving 12.6 and 20.0 days respectively, despite the experiment itself having the longest raw duration.
Practical Example: AI-Accelerated Drug Discovery Pipeline

Consider a pharmaceutical company's hit-to-lead optimization pipeline. The traditional workflow from target identification to clinical candidate typically spans 3 to 6 years of preclinical work alone (circa 2020). In 2019, Insilico Medicine demonstrated that their AI-driven platform could compress the target-to-candidate phase to 46 days for a DDR1 kinase inhibitor program; by 2022, their anti-fibrotic compound ISM001-055 reached Phase I clinical trials roughly 30 months after target identification, compared to a typical 4 to 5 year preclinical timeline. They applied AI at three bottleneck stages: (1) target identification using knowledge graph reasoning across biomedical literature (10x speedup over manual review), (2) molecular generation using generative models to propose candidate molecules (replacing combinatorial library screening), and (3) Absorption, Distribution, Metabolism, Excretion, and Toxicity (ADMET) prediction using graph neural networks to filter candidates computationally before expensive wet-lab assays (reportedly reducing the number of physical experiments by roughly 80%). The key insight is that they did not try to accelerate every stage; they identified the three stages where AI had the highest time-saved-per-dollar and focused their investment there. We revisit this pipeline in detail in Chapter 49: Discovery AI for Chemistry and Materials.

5. Workflow States and the Discovery Workbench

The workflow formalism does more than analyze processes; it provides the architectural blueprint for the Discovery Workbench, the software platform built incrementally throughout this book. The Discovery Workbench represents a discovery project's current state as a node in the workflow graph. Outgoing edges determine the available actions. Each action triggers an AI-assisted process: a literature review agent, an experiment design optimizer, a data analysis pipeline, or a hypothesis generator.

The Workbench architecture first appears in Chapter 6: Discovery System Architecture, where we design its core components. By Chapter 53: AI Scientists, the Workbench will autonomously navigate the workflow graph, selecting actions using the bandit algorithms from Section 1.2 and transitioning between states without human intervention (with appropriate safety constraints).

For now, we encode the essential abstraction: a workflow manager that tracks the current state, validates transitions, and records the discovery history (where provenance, the complete record of which states were visited and which actions were taken, enables reproducibility and audit).

from typing import Dict, List, Optional, Tuple
import networkx as nx

class WorkflowManager:
    """Manages traversal of a discovery workflow graph.

    Tracks the current state, validates transitions, and maintains
    a full history of the discovery path for provenance tracking.
    """
    def __init__(self, graph: nx.DiGraph, initial_state: str):
        self.graph = graph
        self.current = initial_state
        self.history: List[Tuple[str, str, str]] = []  # (from, action, to)

    @property
    def available_actions(self) -> List[Dict]:
        """Return the actions available from the current state."""
        actions = []
        for _, target, data in self.graph.out_edges(self.current, data=True):
            actions.append({
                "target": target,
                "action": data.get("action", "transition"),
                "estimated_days": data.get("days", 0),
                "ai_speedup": data.get("ai_speedup", 1.0),
            })
        return actions

    def take_action(self, action_name: str) -> str:
        """Execute a named action and transition to the next state.

        Returns the new state name.
        Raises ValueError if the action is not available.
        """
        for _, target, data in self.graph.out_edges(self.current, data=True):
            if data.get("action") == action_name:
                self.history.append((self.current, action_name, target))
                self.current = target
                return target
        available = [d["action"] for d in self.available_actions]
        raise ValueError(
            f"Action '{action_name}' not available from '{self.current}'. "
            f"Available: {available}"
        )

    def path_summary(self) -> str:
        """Return a human-readable summary of the discovery path taken."""
        if not self.history:
            return f"At initial state: {self.current}"
        lines = []
        for src, action, dst in self.history:
            lines.append(f"  {src} --[{action}]--> {dst}")
        return f"Discovery path ({len(self.history)} steps):\n" + "\n".join(lines)


# Demo: walk through the scientific workflow
wf = WorkflowManager(G, initial_state="problem")
print(f"Starting at: {wf.current}")
print(f"Available:   {[a['action'] for a in wf.available_actions]}\n")

# Execute a sequence of actions
steps = ["survey literature", "form hypothesis", "design experiment",
         "run experiment", "analyze data", "revise hypothesis",
         "design experiment", "run experiment", "analyze data",
         "interpret results", "validate findings", "write and publish"]

for step in steps:
    wf.take_action(step)

print(wf.path_summary())
print(f"\nFinal state: {wf.current}")
print(f"Total steps: {len(wf.history)} (including 1 iteration loop)")
Listing 1.8: A WorkflowManager class that validates transitions, records provenance of every state change, and walks a discovery workflow graph from start to publication.
Starting at: problem
Available:   ['survey literature']

Discovery path (12 steps):
  problem --[survey literature]--> lit_review
  lit_review --[form hypothesis]--> hypothesis
  hypothesis --[design experiment]--> exp_design
  exp_design --[run experiment]--> data_collect
  data_collect --[analyze data]--> analysis
  analysis --[revise hypothesis]--> hypothesis
  hypothesis --[design experiment]--> exp_design
  exp_design --[run experiment]--> data_collect
  data_collect --[analyze data]--> analysis
  analysis --[interpret results]--> interpretation
  interpretation --[validate findings]--> validation
  validation --[write and publish]--> publication

Final state: publication
Total steps: 12 (including 1 iteration loop)
Output of Listing 1.8: the workflow traversal shows one hypothesis-revision cycle (steps 5 through 9) before reaching publication in 12 total transitions.
Right Tool: Workflow Orchestration with Prefect and Airflow

The WorkflowManager above illustrates the concept, but production discovery workflows need fault tolerance, parallel execution, logging, and scheduling. Two libraries handle this:

Real-World Application: Materials Discovery at LBNL
Real-World Application: Materials Discovery at LBNL
# Prefect: modern Python-native workflow orchestration
# pip install prefect
from prefect import flow, task

@task
def literature_review(topic: str) -> dict:
    """AI-assisted literature review using RAG."""
    ...  # calls the retrieval pipeline from Chapter 37

@task
def form_hypothesis(literature: dict) -> str:
    """Generate candidate hypotheses from literature."""
    ...  # calls the hypothesis generator from Chapter 39

@flow
def discovery_pipeline(topic: str):
    lit = literature_review(topic)
    hyp = form_hypothesis(lit)
    # Prefect handles retries, caching, logging, and scheduling
    return hyp
Listing 1.9: A Prefect flow wrapping two discovery tasks (literature review and hypothesis generation) with automatic retry, caching, and scheduling support.

Prefect reduces the WorkflowManager to a decorated function with automatic state tracking, retry logic, and a web dashboard. As of 2024, Prefect 3 is the current major release, featuring a refined task-runner API and native async support. Apache Airflow provides similar capabilities with a more ops-focused orientation. The from-scratch version above is 50 lines; Prefect achieves the same in 15, plus production features.

6. Where AI Accelerates Search

Specific AI capabilities map to specific workflow stages.

Hypothesis generation (Chapters 39 and 29): Large Language Models (LLMs) and reasoning models can propose novel hypotheses by combining patterns across vast literatures that no human could read in a lifetime. The AI does not replace human creativity; it expands the hypothesis space by surfacing non-obvious connections.

Experiment design (Chapter 46): Bayesian optimization and active learning (where the model selects the most informative data points to label or test next, rather than processing data passively) select the most informative experiments, reducing the number of iterations in the hypothesis-experiment-analysis loop. This is the bandit problem from Section 1.2 applied at the workflow level: each candidate experiment is an arm, running it consumes resources and yields information, so the same explore-or-exploit tension applies.

Analysis, Review, and Validation

Data analysis (Chapters 25-35): Machine learning models detect patterns in high-dimensional data that resist human analysis. From anomaly detection to symbolic regression (a technique that searches for mathematical equations fitting the data, covered in Chapter 35), AI converts raw data into interpretable insights faster and more comprehensively than manual analysis.

Checkpoint

So far in this section: AI maps to specific workflow stages, with hypothesis generation expanding the search space, experiment design reducing iterations via Bayesian optimization, and data analysis detecting patterns in high-dimensional data; the next two stages (literature review and validation) complete the picture.

Literature review (Chapter 36 and 37): Retrieval-Augmented Generation (RAG) systems can survey thousands of papers, extract key findings, and synthesize the state of knowledge on a topic. This stage shows the highest AI speedup factor (10x in our model) because it is primarily an information retrieval task. (This means a single RAG pipeline can reclaim more calendar days than months of robotic lab automation.)

Validation (Chapter 41): AI systems can cross-check findings against existing knowledge, identify potential confounds, and run computational validation experiments before committing to expensive wet-lab validation.

Fun Note: The Speed of Light for Discovery

Even with perfect AI at every stage, some workflow transitions have hard physical limits. You cannot run a 30-day cell culture in 3 days (biology does not speed up on request), and you cannot accelerate radioactive decay for isotope tracer experiments. These "speed of light" constraints create an irreducible floor on discovery time that no amount of AI can break. The AI value proposition is not "instant discovery" but rather "eliminate all the time that is currently wasted on tasks that do not require physical reality." In many workflows, such non-physical overhead may account for 70-80% of the total time, as the bottleneck analysis above suggests.

Research Frontier: Autonomous Workflow Navigation

A frontier area (2024-2026) is autonomous workflow navigation: AI systems that not only execute individual workflow stages but decide which stage to enter next. The AI Scientist system (Lu et al., 2024) demonstrated end-to-end autonomous research by navigating a simplified scientific workflow (idea generation, experiment design, coding, execution, paper writing, peer review) without human intervention. The Coscientist system (Boiko et al., 2023) autonomously navigated a chemistry workflow, planning and executing multi-step syntheses by interacting with robotic lab equipment. More recently, the DISCOVERYWORLD benchmark (Jansen et al., 2024) introduced a suite of 120 simulated discovery tasks across eight scientific domains, providing a standardized environment for evaluating how well AI agents navigate complete discovery workflows, including forming hypotheses, designing experiments, interpreting results, and iterating. Initial results showed that even the strongest LLM agents completed fewer than 30% of tasks fully autonomously, highlighting the gap between current capabilities and the vision of fully self-directed scientific discovery. These systems treat the workflow graph itself as a decision problem, using LLM-based planning to select transitions. We build toward this capability across Parts IV through VII, with the full autonomous discovery system appearing in Chapter 53.

Try It: Build and Analyze Your Own Research Workflow

Pick a research or engineering process you know well (debugging a production outage, writing a grant proposal, onboarding a new dataset) and model it as a state transition system. The following steps use only NetworkX and basic Python.

  1. Define states and transitions. List 5 to 8 phases of your chosen process as node names. For each transition, estimate a duration (hours or days) and an AI speedup factor between 1.0 (no speedup possible) and 10.0 (almost fully automatable). Build the graph with nx.DiGraph() and add edges with days and ai_speedup attributes, following the pattern in Listing 1.6.
  2. Identify feedback loops. Add at least one back-edge (an edge pointing from a later node to an earlier one, creating a cycle in the graph) representing an iteration (e.g., "code review reveals a bug, return to implementation"). Run nx.simple_cycles(G) and verify your graph has the cycles you expect.
  3. Compute the critical path. Extract the forward-only subgraph (edges whose source appears before their target in your node list), then call nx.dag_longest_path(G_forward, weight="days") to find the slowest route through the workflow.
  4. Run bottleneck analysis. For each edge, compute \(\Delta t = d \times (1 - 1/\alpha)\) and sort by descending time saved. Print a table like Listing 1.7. Which stage is the highest-impact target for automation? Does it match your intuition?
  5. Simulate a traversal. Instantiate the WorkflowManager from Listing 1.8 with your graph and walk through a realistic path that includes at least one feedback loop. Print the path summary and compare the number of steps with and without the loop.

Exercise 1.3.1

Given the workflow graph from Listing 1.6, suppose a new AI tool doubles the speedup factor for "run experiment" from 1.5x to 3.0x (e.g., through robotic lab automation). Recompute \(\Delta t\) for that transition and determine whether "run experiment" now becomes the highest-impact bottleneck stage, or whether another transition still saves more time.

Hint

Recall \(\Delta t = d \times (1 - 1/\alpha)\). With \(d = 30\) and \(\alpha = 3.0\), compute \(\Delta t = 30 \times (1 - 1/3) = 20.0\) days. Compare this against the original leader in the bottleneck table: "write and publish" also saves 20.0 days. They tie, meaning the new AI tool makes physical experimentation equally impactful to automate as publication.

Step-Through: Bottleneck Calculation for Three Transitions

Trace through the \(\Delta t\) formula for three transitions from Listing 1.6 to see why raw duration alone is misleading:

Step 1: "survey literature" (\(d = 14\), \(\alpha = 10.0\)).
\(\Delta t = 14 \times (1 - 1/10.0) = 14 \times 0.9 = 12.6\) days saved. AI time: \(14 / 10.0 = 1.4\) days.

Step 2: "run experiment" (\(d = 30\), \(\alpha = 1.5\)).
\(\Delta t = 30 \times (1 - 1/1.5) = 30 \times 0.333 = 10.0\) days saved. AI time: \(30 / 1.5 = 20.0\) days.

Step 3: "design experiment" (\(d = 7\), \(\alpha = 5.0\)).
\(\Delta t = 7 \times (1 - 1/5.0) = 7 \times 0.8 = 5.6\) days saved. AI time: \(7 / 5.0 = 1.4\) days.

Result: the 30-day experiment saves only 10.0 days (third place) because its 1.5x speedup barely compresses it. The 14-day literature survey saves 12.6 days (first place among these three) because the 10x speedup eliminates nearly all the original time. The ranking is \(\Delta t_{\text{lit}} > \Delta t_{\text{exp}} > \Delta t_{\text{design}}\), which does not match the raw duration ordering \(d_{\text{exp}} > d_{\text{lit}} > d_{\text{design}}\).

Real-World Application: Materials Discovery at LBNL

Lawrence Berkeley National Laboratory's A-Lab uses a branching workflow topology to discover new inorganic materials autonomously. The system maintains a DAG of candidate compositions, where a Bayesian optimizer selects which branches to synthesize next, a robotic arm runs the physical experiments, and an X-ray diffraction analysis module decides whether to prune the branch or extend it. In its first 17 days of continuous operation (2023), A-Lab attempted 355 synthesis recipes across 58 target compounds and successfully produced 41 novel materials, demonstrating that explicit workflow-graph navigation compresses months of traditional materials screening into days.

Lab: Mapping and Optimizing Your Own Workflow Graph

Goal: Build a state transition system for a process you know, then quantify where AI acceleration would help most.
Tools: Python 3, NetworkX (pip install networkx), and optionally Matplotlib for visualization.
Procedure (20 minutes):

  1. Choose a multi-step process (debugging a bug, writing a grant, processing a dataset). Define 5 to 8 states and 6 to 10 transitions, including at least one back-edge (feedback loop).
  2. For each transition, estimate a duration in hours and an AI speedup factor (1.0 = no help, 10.0 = near-full automation).
  3. Build the graph with nx.DiGraph(), compute nx.simple_cycles(G) to verify your loops, and extract the forward-only subgraph to compute nx.dag_longest_path(G_forward, weight="hours").
  4. Run the bottleneck analysis from Listing 1.7. Record the top-3 transitions by \(\Delta t\).
  5. What to vary: Double one speedup factor at a time and recompute the ranking. Observe how sensitive the bottleneck identity is to your estimates. Try halving the duration of the top bottleneck; does a new stage become dominant?
  6. What to observe: (a) Does the highest-impact stage match your intuition? (b) How many stages account for 80% of the total time savings (the "Pareto ratio")? (c) Does adding a second feedback loop change the critical path length?

Exercises

  1. (Conceptual) Draw the workflow graph for a software debugging process: problem report, reproduction, hypothesis about root cause, code inspection, fix implementation, testing, code review, deployment. Identify which transitions are iterative (might loop back) and classify the overall topology (linear, iterative, or branching). Where would AI have the highest speedup factor?
  2. (Coding) Extend the build_scientific_workflow function to include a branching topology: after "hypothesis," the workflow can split into two parallel paths (computational simulation and wet-lab experiment), which merge at "analysis." Use NetworkX to find all paths from "problem" to "publication" and compute the duration of each.
  3. (Analysis) Using the AI speedup factors from Listing 1.7, compute the total critical-path duration with AI at every stage. What is the overall speedup? Now compute the speedup if AI is applied to only the top 3 stages by time saved. What fraction of the maximum speedup does this partial deployment achieve? What does this tell you about the diminishing returns of automating every stage?

What's Next

We have the full conceptual toolkit: the discovery tuple (Section 1.1), the exploration/exploitation trade-off (Section 1.2), and the workflow formalism (this section). In Section 1.4: Building a Discovery Simulator, we bring everything together in a hands-on recipe. You will build a complete discovery simulator that pits random search, greedy search, UCB, and Thompson Sampling against each other on a synthetic landscape, visualize their search trajectories and regret curves, and develop intuition for when each strategy shines.

Bibliography

Lu, C., et al. (2024). The AI Scientist: Towards fully automated open-ended scientific discovery. arXiv:2402.06845.

An end-to-end autonomous research system that navigates a scientific workflow without human intervention.

Boiko, D. A., MacKnight, R., Kline, B., & Gomes, G. (2023). Autonomous chemical research with large language models. Nature, 624, 570-578.

Coscientist: an LLM-driven system that autonomously plans and executes chemical synthesis workflows.

Jansen, P., et al. (2024). DISCOVERYWORLD: A virtual environment for developing and evaluating automated scientific discovery agents. arXiv:2408.06292.

A benchmark of 120 simulated discovery tasks for evaluating how well AI agents navigate complete scientific workflows.

Hagberg, A. A., Schult, D. A., & Swart, P. J. (2008). Exploring network structure, dynamics, and function using NetworkX. Proceedings of SciPy 2008.

The NetworkX library for graph analysis in Python, used throughout this section for workflow modeling.

Prefect Technologies (2024). Prefect: Workflow orchestration for data pipelines.

A modern Python-native workflow orchestration framework, a production alternative to the from-scratch WorkflowManager.

Zhavoronkov, A., et al. (2019). Deep learning enables rapid identification of potent DDR1 kinase inhibitors. Nature Biotechnology, 37, 1038-1040.

Insilico Medicine's AI-driven drug discovery pipeline, demonstrating AI acceleration at bottleneck stages.

Russell, S. & Norvig, P. (2020). Artificial Intelligence: A Modern Approach, 4th edition. Pearson.

Chapter 4 covers search in complex environments, including online search and iterative algorithms.

Gil, Y., et al. (2024). AI for scientific discovery: A research agenda. Artificial Intelligence, 328, 104075.

A community research agenda mapping AI capabilities to stages of the scientific workflow.

Wang, H., et al. (2023). Scientific discovery in the age of artificial intelligence. Nature, 620, 47-60.

A review connecting AI technologies to specific stages of scientific discovery workflows.