Inferring Experimental Objectives in Microscopy Experiments from Decision Traces
Authors: 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
Organizations: Department of Materials Science and Engineering, University of Tennessee, Knoxville, TN, USA · Department of Electrical Engineering and Computer Science, University of Tennessee, Knoxville, TN, USA · Department of Civil and Environmental Engineering, University of Tennessee, Knoxville, TN 37996, USA
Modern microscopes can acquire, analyze and act on data far faster than human operators can decide what to measure next. Exploiting this speed in automated experiments requires the instrument to follow the scientific logic of the operator, and one way to encode that logic is through reward functions that become part of the operation process. Here we explore whether such reward functions can be learned from the decision histories of microscope operators. We propose multiple frameworks in which recorded choices among alternative measurement locations serve as comparative evidence about the operator's preferences, and we compare several algorithms for reconstructing the reward including interpretable linear models built on physically meaningful image descriptors, nonlinear functions of the same descriptors, an unsupervised image representation followed by preference modeling, and a preference trained deep kernel inspired model. The result of this analysis is a spatial field of reward functions over the sample that can be used to run the instrument. We also propose a way to benchmark these approaches, based on withheld decisions and on decision histories generated with known objectives. We then examine the possibility that a decision history contains changing priorities throughout the experiment. A hidden Markov model assigns distinct rewards to recurring selection strategies, whereas a continuous-state model tracks smoothly varying preference weights. Controlled sequences generated over real microscopy candidate sets show that both concealed switches and gradual drift can be recovered. These reward functions, learned directly from recorded decisions, provide candidate objectives for future automated microscopy experiments.
Figures & tables
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.
Figure 2: Interpretation and testing of descriptor-based rewards. (a) Standardized values of six image descriptors for a representative patch. (b) Their contributions (descriptor × fitted coefficient) to the linear utility. (c) Standardized coefficients of the 16-descriptor linear model for the six recorded decision histories: GPT 1, GPT 2, HDH 1, HDH 2, P01, and P02. (d, e) Held-out top-1 (d) and top-3 (e) accuracy for each trace and model; dashed lines mark uniform choice (5% and 15%). (f) Rank of the recorded winner among its 20 alternatives for the held-out decisions of a representative trace.
Figure 3: Spatial reconstruction and predictive performance of stationary reward models. (a) Recorded selection locations for GPT 1 overlaid on the original PFM image (red markers). (b–f) Spatial reward maps reconstructed from the same archived image using (b) the 16-descriptor linear model (Linear16), (c) the six-descriptor linear model (Linear6), (d) the generalized additive model (GAM), (e) the random Fourier feature kernel model (GP-RFF), and (f) the iterative reward model. Each reward map is displayed using an independently normalized color scale, with warmer colors indicating higher inferred rewards. Red markers indicate recorded selections, and the reward fields are evaluated over the valid patch-sampling region. (g) Held-out Top-1 accuracy of the five reward models across six decision traces: GPT 1, GPT 2, HDH 1, HDH 2, P01, and P02. (h) Relationship between held-out Top-1 accuracy and negative log-likelihood for all 30 trace–model combinations, illustrating differences between ranking accuracy and probabilistic prediction performance.
Figure 4: Reward reconstruction using a preference-trained deep-kernel-inspired model and variational autoencoder–Gaussian process (VAE–GP) representations. Upper block (a–i): Deep-kernel-inspired reconstruction of decision preferences. (a) Original PFM image with recorded selection locations from HDH 1, color-coded by decision order. (b–e) Spatial reward maps reconstructed for four representative decision histories, with black markers indicating recorded selections. (f–i) Corresponding reward landscapes projected onto the two-dimensional learned feature space, where the color scale represents the predicted reward and outlined markers indicate recorded selections. Panels (e, i) correspond to P02. Reward values are normalized independently for each model. Lower block (j–l): VAE–GP reward reconstruction. (j) Held-out Top-1 and Top-3 selection accuracies across the six decision traces (GPT 1, GPT 2, HDH 1, HDH 2, P01, and P02), with dashed lines indicating random-choice baselines of 5% and 15%, respectively. (k) Predicted reward landscape for P02 visualized in two dimensions of the VAE latent representation. (l) Corresponding spatial reward map projected onto the original PFM image, with black squares marking recorded selection locations.
Figure 5: Preference-trained deep kernel learning (DKL) for reward reconstruction. (a) Learned two-dimensional embedding for HDH 1, showing selected candidates (orange), alternatives (light blue), and held-out winners (black circles). (b) Predicted reward across the same latent space. (c) Spearman correlations between latent coordinates and nine image descriptors. (d) Recorded selection locations for GPT 1, GPT 2, HDH 1, HDH 2, P01, and P02. (e) Corresponding spatial reward maps from independently trained DKL models, each displayed on its own color scale.
Figure 6: Latent preference states in a constructed two-source decision history. (a) Two-state model: a hidden state selects the reward that governs each recorded choice. (b) Filtered state probabilities over 200 decisions; the dashed line marks the concatenation boundary at decision 100, displayed after fitting. (c) State-specific coefficients of the 16 image descriptors. (d) Spatial utilities of the stationary model, the terminal continuously updated model and the two HMM states.
Figure 7: Temporal models on a concatenation of two GPT-generated decision traces. (a) Filtered probabilities of three HMM states; the dashed line marks the known boundary at decision 100, displayed after fitting. (b) Most probable state path over the training prefix (Viterbi). (c) State-specific descriptor coefficients. (d) Cumulative held-out choice NLL of the stationary, HMM and continuously updated models over the chronological test window. (e) Spatial utilities of the stationary model, the terminal continuous model and the three HMM states.
Figure 8: Discrete-state and continuous-state descriptions of a changing preference. (a) Online filtered probabilities of the fitted HMM states after each observed choice in a controlled nonstationary sequence. (b) Continuously updated reward coefficients for the same sequence. Dotted lines in (a) and (b) mark the ends of the training and validation windows. (c) Terminal spatial reward map of a continuously updated model on the archived image.
Autonomous microscopy can turn fast acquisition into scientific progress when it decides not only where to measure, but also what information to acquire, at what scan rate, and when to recalibrate the instrument. We develop a budget constrained framework for such multistep structure-property workflows. It combines explicit scientific rewards, action costs, instrument observation models, transfer of pre experiment knowledge into the online campaign, and evaluation kept independent of the controller. The transferred knowledge includes predictor accuracy and computational cost, empirical learner maturity functions that weight model-derived rewards, and drift characteristics established before controller training. Using a real electron energy-loss spectroscopy dataset, we run two complementary campaigns. In the first, the controller chooses between imaging and spectroscopy, image size, and scan speed. In the second, the instrument drifts and the controller also decides when to recalibrate. The campaigns show that response discovery and structure-property learning favor different surrogate models and acquisition strategies. They also show that simple acquisition rules form strong, practical baselines. Independent error analysis reveals where model uncertainty is and is not a reliable learning signal. In the drift campaign, explicit registration greatly improves positional accuracy, and the framework measures what this costs in spectroscopy throughput. Together, these results provide a reproducible way to design, compare, and audit autonomous experiments, and they define what microscopes must provide for deployment: independently executable actions, characterized scan and detector responses, timestamped registration telemetry, and complete action records.
Sergei V. Kalinin
Department of Materials Science and Engineering, University of Tennessee, Knoxville, TN 37996, USA · Department of Electrical Engineering and Computer Science, University of Tennessee, Knoxville, TN 37996, USA
Automated experimentation is moving from closed-loop optimization toward open decision-making, where human or AI planners must forecast the consequences of candidate actions before executing them. Such forecasts require a model of both sides of the experiment: how the sample is likely to respond and what the instrument is likely to detect. We therefore introduce a coupled digital-twin framework that separates these roles and then links them. In this framework, the sample twin encodes material state inferred from prior knowledge and measurements till the moment. The instrument twin captures signal formation, feedback dynamics, and operating constraints based on prior knowledge. When coupled, the two twins estimate expected outcomes, uncertainty, and risk for candidate microscope operations. For amplitude-modulation scanning probe microscopy, we realize this framework with a physics-informed encoder of force-distance curves, a deterministic scanner model of cantilever and feedback dynamics, and sparse learned residual corrections. The encoder first recovers scanner-driving descriptors with sub-nanometer accuracy. The calibrated scanner then reproduces typical traces within a few nanometers and identifies operating-point noise amplification as the main source of mismatch. Supplementary phase analysis localizes residual error to the phase channel, which clarifies where added physics is needed. Together, these results establish coupled sample and instrument twins as a practical foundation for predictive microscope operation and autonomous experimental planning.
Yu Liu, Boris Slautin, Ian Mercer +2
Department of Materials Science and Engineering, University of Tennessee, Knoxville, Tennessee, 37996, USA · Materials Science and Engineering Department, Materials Research Institute, the Pennsylvania State University, University Park, Pennsylvania, 16802, USA
Modern automated microscopy faces a fundamental discovery challenge: in many systems, the most important scientific information does not reside in the immediately visible image features, but in the target space of sequentially acquired spectra or functional responses, making it essential to develop strategies that can actively search for new behaviors rather than simply optimize known objectives. Here, we developed a deep-kernel-learning BEACON framework that is explicitly designed to guide discovery in the target space by learning structure-property relationships during the experiment and using that evolving model to seek diverse response regimes. We first established the method through demonstration workflows built on pre-acquired ground-truth datasets, which enabled direct benchmarking against classical acquisition strategies and allowed us to define a set of monitoring functions for comparing exploration quality, target-space coverage, and surrogate-model behavior in a transparent and reproducible manner. This benchmarking framework provides a practical basis for evaluating discovery-driven algorithms, not just optimization performance. We then operationalized and deployed the workflow on STEM, showing that the approach can transition from offline validation to real experimental implementation. To support adoption and extension by the broader community, the associated notebooks are available, allowing users to reproduce the workflows, test the benchmarks, and adapt the method to their own instruments and datasets.
Utkarsh Pratiush, Kamyar Barakati, Boris N. Slautin +4
Department of Materials Science and Engineering, University of Tennessee, Knoxville, TN 37996, USA · Department of Chemistry, University of Washington, Seattle, WA 98195, USA · Pacific Northwest National Laboratory, Richland, WA 99354, USA