Inferring Experimental Objectives in Microscopy Experiments from Decision Traces

Kamyar Barakati, Boris N. Slautin, Aditya Raghavan, Babita Babita, Surya Prakash Reddy, Jordan Marshall, Munireach Nannory, Stephen Puplampu, Alla Slautina, Faith M. Hines, Newsha Javanmardi, Sergei V. Kalinin

Imagine you’re at the controls of a multi-million dollar electron microscope. You’re scanning a sample of a new ferroelectric thin film, looking for something interesting—maybe a specific type of domain wall or a unique stripe pattern. You see a dozen potential spots to zoom in on, and in a split second, your brain picks one. Why? You might say it’s "intuition" or "years of experience," but to a computer, that’s just a black box.

The problem is that modern microscopes can now acquire and analyze data far faster than you can decide where to look next. To truly automate science, we need to bridge this "human bottleneck." This paper by Barakati et al. explores a fascinating way to do just that: by eavesdropping on the decision-making process of scientists to reverse-engineer their "gut feelings" into mathematical reward functions.

TL;DR

By analyzing the "decision traces" of microscope operators—the history of which image patches they chose over others—researchers can train AI models to mimic a scientist’s specific search logic. This allows an autonomous microscope to scan a sample at machine speed while hunting for the exact features a human expert would find valuable.

What Problem Does This Paper Address?

We are entering the era of the "self-driving laboratory," where AI agents plan and execute experiments. However, an agent is only as good as its objective. While we can easily tell a robot to "minimize error," it’s much harder to encode the nuanced, tacit knowledge of a senior researcher who can spot a scientifically significant anomaly at a glance.

Usually, we try to write down these objectives as explicit "reward functions" beforehand. But what if the scientist can't quite put their criteria into words? This paper tackles the inverse problem: instead of writing the reward function, can we infer it just by watching what a scientist chooses to measure?

Methods

The researchers set up a "choice protocol." At each step, an operator (human, heuristic, or even a Large Language Model like GPT) is presented with 20 random candidate patches from a microscopy image and must pick the "best" one.

Figure 1. Retrospective preference reconstruction from microscopy decision traces. (a) Workflow: an archived image supplies limited candidate sets, the recorded choice and its alternatives constrain an inferred reward, and the frozen reward is projected over the same image. (b) Spatial distribution of recorded selections, color-coded by decision order. (c) One recorded set of 20 candidate patches; the winner is outlined. (d) Pearson correlations among the 16 image descriptors across the experimental decision traces. (e–j) Spatial distributions of 100 recorded selections for (e) GPT 1, (f) GPT 2, (g) HDH 1, (h) HDH 2, (i) P01, and (j) P02. Red markers indicate selected locations on the original PFM image.

To turn these choices into a model, they tested several "flavors" of AI:

  1. Interpretable Linear Models: These use 16 physically meaningful descriptors (like contrast, "anisotropy" or graininess, and "Laplacian" responses for edge detection) and assign a weight to each.
  2. Non-linear Models: Using Generalized Additive Models (GAMs) and kernel methods to capture more complex preferences (e.g., "I like medium contrast, but not too high or too low").
  3. Deep Learning: Using Variational Autoencoders (VAEs) and Deep Kernel Learning (DKL) to let the neural network decide which image features are important, rather than relying on pre-defined physics descriptors.
  4. Temporal Models: Recognizing that scientists change their minds, they used Hidden Markov Models (HMMs) to detect discrete shifts in strategy and continuous-state models to track gradual "drifts" in preference.

Datasets

The study focused on Piezoresponse Force Microscopy (PFM) images of a $PbTiO_3$ thin film. They generated six distinct 100-decision histories:

  • P01 & P02: Two human participants.
  • HDH 1 & 2: Two human-defined heuristics (hard-coded rules).
  • GPT 1 & 2: Two traces where a GPT-based model acted as the evaluator.

They also created "controlled" synthetic traces where they knew the ground truth to test if their models could accurately recover hidden changes in objective.

Key Insights and Ideas

  • The Power of Comparison: You don't need to know how much a scientist likes a patch; you just need to know they liked it more than the 19 other options. This "comparative evidence" is a robust signal for preference learning.
  • Simplicity is Often Sufficient: Surprisingly, simple linear models built on basic image statistics often performed as well as, or better than, complex deep learning models. This is great news for "explainable AI"—we can actually see that a scientist is prioritizing "high-frequency stripe patterns" by looking at the model weights.
  • Detecting the "Aha!" Moment: Scientists aren't static. They might start by looking for standard features to calibrate the tool and then switch to hunting for rare defects. The HMM approach successfully identified these "strategy switches" in the decision history.
How different image features contribute to the final reward score.

Key Results

  • Predictive Accuracy: The models achieved Top-1 accuracies (predicting the exact winner out of 20) ranging from 40% to 70%. Given that a random guess would only be 5%, this shows the models captured a significant portion of the underlying logic.
  • Heuristic Recovery: The models were most successful at reconstructing the "Heuristic" traces, proving they can effectively recover explicit, rule-based logic from raw choices.
  • Temporal Recovery: In controlled tests, the HMM achieved 61.9% accuracy in identifying which of two recurring strategies was being used at any given time, significantly outperforming stationary models.
Recovering hidden shifts in preference using a two-state HMM.

Limitations and Future Work

The authors are careful to note that this isn't a "mind-reading" device.

  • Omitted Context: If a scientist makes a choice based on something they saw ten minutes ago (and isn't in the current image patch), the model will be confused.
  • Circular Logic: You can't validate a model by asking it to grade itself. Future work needs to test these learned rewards on entirely new samples and have experts "blind-test" the results.
  • Generalization: Does a reward function learned for one material work for another? This remains an open empirical challenge.

Ultimately, this work suggests that the next generation of microscopes won't just be tools we use; they will be apprentices that learn our scientific style just by watching us work.

Summary updated

BibTeX
@misc{barakati2026inferring,
  author = {Kamyar Barakati and Boris N. Slautin and Aditya Raghavan and Babita Babita and Surya Prakash Reddy and Jordan Marshall and Munireach Nannory and Stephen Puplampu and Alla Slautina and Faith M. Hines and Newsha Javanmardi and Sergei V. Kalinin},
  title = {{Inferring Experimental Objectives in Microscopy Experiments from Decision Traces}},
  year = {2026},
  eprint = {2611.29814},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.29814},
}
Figure