Log-Gaussian processes for AI-assisted TAS experiments

M. Teixeira Parente, G. Brandl, C. Franz, U. Stuhr,
M. Ganeva, and A. Schneidewind
Corresponding author: Lichtenbergstraße 1, 85748 Garching, Germany, m.teixeira.parente@fz-juelich.de.
Jülich Centre for Neutron Science (JCNS) at Heinz Maier-Leibnitz Zentrum (MLZ),
Forschungszentrum Jülich, Garching, Germany
Laboratory for Neutron Scattering and Imaging, Paul Scherrer Institute (PSI), Villigen, Switzerland
Abstract

To understand the origins of materials properties, neutron scattering experiments at three-axes spectrometers (TAS) investigate magnetic and lattice excitations in a sample by measuring intensity distributions in its momentum () and energy () space. The high demand and limited availability of beam time for TAS experiments however raise the natural question whether we can improve their efficiency or make better use of the experimenter’s time. In fact, using TAS, there are a number of scientific questions that require searching for signals of interest in a particular region of - space, but when done manually, it is time consuming and inefficient since the measurement points may be placed in uninformative regions such as the background. Active learning is a promising general machine learning approach that allows to iteratively detect informative regions of signal autonomously, i. e., without human interference, thus avoiding unnecessary measurements and speeding up the experiment. In addition, the autonomous mode allows experimenters to focus on other relevant tasks in the meantime. The approach that we describe in this article exploits log-Gaussian processes which, due to the log transformation, have the largest approximation uncertainties in regions of signal. Maximizing uncertainty as an acquisition function hence directly yields locations for informative measurements. We demonstrate the benefits of our approach on outcomes of a real neutron experiment at the thermal TAS EIGER (PSI) as well as on results of a benchmark in a synthetic setting including numerous different excitations.

Neutron three-axes spectrometers (TAS) [shirane2002neutron] enable understanding the origins of materials properties through detailed studies of magnetic and lattice excitations in a sample. TAS measure intensity distributions in the material’s four-dimensional - space, i. e., in its momentum space () for different energy transfers ([sivia2011elementary], and are globally operated at neutron sources of large-scale research facilities. However, due to the high demand and its limited availability, beam time for using TAS becomes a valuable resource for experimenters. Since, additionally, TAS can only measure at single locations in - space unlike, e. g., time-of-flight instruments [eccleston2006time], it is natural to think about how we can improve the efficiency of TAS experiments or make better use of the experimenter’s time.

In experimental workflows at TAS, there are scenarios where the intensity distribution to be measured is not known and therefore a rapid overview of the same in a particular region of - space is required. So far, experimenters then decide manually where to measure and make intensity observations. In this mode, however, there is a possibility depending on the specific scenario that measurements do not provide any further information and thus waste beam time since they are placed in the so-called background, i. e., regions with either no or parasitic signal. If there were computational approaches that autonomously, i. e., without human interference, place measurements mainly in regions of signal instead of background in order to acquire more information on the intensity distribution in less time, not only the use of beam time gets optimized, but also the experimenters can focus on other relevant tasks in the meantime.

From the field of artificial intelligence and machine learning, active learning [settles2012active, cohn1996active, settles2009active] (also called optimal experimental design in statistics literature) provides a general approach that can be taken into account for this task of autonomous data acquisition in TAS experiments. In our context, an active learning approach sequentially collects intensity data while deciding autonomously where to place the next measurement. In other words, it updates its own source of information that its further decisions are based on.

The approach that we describe in this article regards an intensity distribution as a non-negative function over the domain of investigation and approximates it probabilistically by the mean function of a stochastic process. The primary objective for our choice of a stochastic process is that its approximation uncertainties, i. e., its posterior standard deviations, are largest in regions of signal as this enables us to identify them directly by maximizing the uncertainty as an acquisition function. More concretely, we fit a log-Gaussian process to the intensity observations, i. e., we apply Gaussian Process Regression (GPR) [rasmussen2006gaussian] to logarithmic intensities and exponentiate the resulting process. We will see that it is this log transformation that puts large uncertainties in regions of signal. However, this approach is not only able to detect regions with strong signals, but also those with weak signals. A threshold parameter for intensity values and a background level, both estimated by statistics of an initial set of intensity observations on a particular grid, can control which signals are subject to be detected or neglected. Furthermore, costs for changing the measurement location caused by moving the axes of the instrument are respected as well.

The potential of autonomous approaches for data acquisition was recognized throughout the scattering community in recent years. GPcam, for example, is an approach that is also based on GPR and applicable to any scenario in which users can specify a reasonable acquisition function to determine locations of next measurements [noack2019kriging, noack2020autonomous]. It was originally demonstrated on small-angle X-ray scattering (SAXS) and grazing-incidence small-angle X-ray scattering (GISAXS) applications. However, it was also applied to a TAS setting recently [noack2021gaussian]. In reflectometry, experiments can be optimized by placing measurements at locations of maximum information gain using Fisher information [durant2021determining, durant2022optimizing]. Furthermore, the maximum a posteriori (MAP) estimator of a quantity of interest in a Bayesian setting [bolstad2016introduction, van2021bayesian] can be used to accelerate small-angle neutron scattering (SANS) experiments [kanazawa2019accelerating]. Moreover, neutron diffraction experiments are shown to benefit from active learning by incorporating prior scientific knowledge of neutron scattering and magnetic physics into GPR for an on-the-fly interpolation and extrapolation [mcdannald2022fly]. Materials synthesis and materials discovery were also considered as potential fields of application [ament2021autonomous, kusne2020fly]. Interestingly, log-Gaussian (Cox) processes [moller1998log], the technique that we use as a basis for our approach, are applied in various domains such as epidemiology [vanhatalo2007sparse], insurance [basu2002cox], geostatistics [diggle2013spatial], or forestry [serra2014spatio, heikkinen1999modeling]. The common factor of all those applications is their possibility to model or interpret the corresponding quantity of interest as an intensity.

Since GPcam is the only of the mentioned approaches that was already applied to TAS [noack2021gaussian], it is possible to briefly contrast it with ours. For the TAS setting, we see two major differences. First, GPcam approximates the original intensity function (instead of its logarithm) which violates a formal assumption of GPR. In fact, GPR assumes that the function of interest is a realization of a Gaussian process. Since Gaussian distributions have support on the entire real line, their realizations can, with positive probability, take negative values which is not possible for non-negative intensity functions. This issue does not occur in our methodology because we approximate the logarithm of the intensity function with GPR. Secondly, for identifying regions of signal, GPcam requires users to specify an acquisition function based on a GPR approximation which can be problematic. Indeed, especially at the beginning of an experiment, having no or not much information about the intensity distribution, it can be difficult to find a reasonable acquisition function which leads to an efficient experiment. Moreover, even if users were successful in finding an acquisition function that works for a particular experiment, there is no guarantee that it is also applicable for another experiment with a different setting. Additionally, by mixing the standard deviation and mean function of a Gaussian process for an acquisition function [noack2021gaussian, Eq. (6)], GPcam risks losing some of its interpretability [roscher2020explainable, belle2021principles] in the TAS setting. In contrast, we are able to choose a particular acquisition function that remains the same for each experiment since we identify regions of signal by the methodology itself or, more concretely, by the log transformation of a Gaussian process. On the other hand, we need to introduce a threshold parameter for intensity values to identify regions with strong as well as weak signals. The threshold parameter however is only a scalar value, and not a function. It is directly interpretable and can be estimated using initial measurements in a provably robust manner or set manually.

We demonstrate the applicability and benefits of our approach in two different ways. First, we present outcomes of a real neutron experiment performed at the thermal TAS EIGER [stuhr2017thermal] at the continuous spallation source SINQ of Paul Scherrer Institute (PSI) in Villigen, Switzerland. In particular, we compare with a grid approach and investigate the robustness of the results w.r.t. changes in the estimated background level and intensity threshold. It can be seen that our approach robustly identifies regions of signal, even those of small shape, and hence is able to improve the efficiency of this experiment. Moreover, we challenge our approach with a difficult initial setting and can demonstrate that its behaviour remains reasonable. Secondly, we apply a benchmark with several synthetic intensity functions and make fair comparisons with two competing approaches: an approach that places measurements uniformly at random and again a grid-based approach. In this setting, efficiency is measured by the time to reduce a relative weighted error in approximating the target intensity functions. The results show that our approach significantly improves efficiency for most intensity functions compared to the random and grid approach and is at least as efficient for the remainder. In addition, we can show that the benchmark results of our approach are robust w.r.t. changes in the intensity threshold parameter.

Results

Problem formulation

From a methodological perspective, we aim to discover an intensity function  on a rectangular set , , with coordinates on a certain hyperplane in four-dimensional - space [sivia2011elementary]. As an example, Fig. 1a displays an intensity function defined on , where the two-dimensional hyperplane is spanned by the vector  in  space with offset  and energy transfer ().

a) Example of an intensity function on 
Figure 1: a) Example of an intensity function on  along the direction  with offset  and energy transfer. b) Inefficient experiment with a majority of measurement locations in the background (dark blue area). c) More efficient experiment with most measurement locations in the region of signal.

For directions in  space, we use relative lattice units (r.l.u.), while energy transfer  is measured in micro-electron volts (meV). Note that, due to restrictions of an instrument, the intensity function might only be defined on a subset  consisting of all measurement locations reachable. For more details on the TAS setting, we refer to the Supplementary Information (Sec. S1).

The intensity function  is accessed by counting scattered neutrons on a detector device for a finite number of measurement locations  yielding noisy observations . Note that detector counts are usually normalized by neutron counts on a monitor device, i. e., the corresponding unit of measurement is , . Since Poisson distributions  with a sufficiently large parameter  can be approximated by a normal distribution , we assume that

(1)

where .

In the following, we repeatedly refer to “experiments” which are defined as a sequential collection of intensity observations.

Definition (Experiment).

An experiment  is an -tuple of location-intensity pairs

(2)

where  denotes the number of measurement points, are measurement locations, and  are corresponding noisy observations of an intensity function  at .

Since demand for beam time at TAS is high but availability is limited, the goal of an approach is to perform the most informative experiments at the lowest possible cost. Beam time use can, for example, be optimized when excessive counting in uninformative regions like the background (Fig. 1b) is avoided but focused on regions of signal (Fig. 1c).

We quantify the benefit of an experiment  by a benefit measure  and its cost by a cost measure . For now, it suffices to mention that cost is measured by experimental time (the time used for an experiment) and benefit is defined by reducing a relative weighted error between the target intensity function and a corresponding approximation constructed by the collected intensity observations. Note that, quantifying benefits this way, their computation is only possible in a synthetic setting with known intensity functions (as is our benchmark setting). Real neutron experiments do not meet this requirement and thus must be evaluated in a more qualitative way.

In our setting, an approach attempts to conduct an experiment  with highest possible benefit using a given cost budget , i. e., it aims to maximize  while ensuring that . The steps of a corresponding general experiment are given in Alg. 1.

1:cost measure , cost budget 
2:
3:
4:while  do
5:     Determine next measurement location 
6:     Observe noisy intensity  at 
7:     
8:     
9:end while
Algorithm 1 General experiment

Line 5 is most important and crucial for both cost and benefit of the experiment since it decides where to observe intensities, i. e., count neutrons, next.

From an algorithmic perspective, if we denote the current step of an experiment by , our approach implements the decision for the next measurement location by maximizing an objective function . It balances an acquisition function and a cost function that both depend on the current step  and hence can change from step to step. The acquisition function  indicates the value of any  for improving the benefit of the experiment whereas the cost function  quantifies the costs of moving the instrument axes from the current location  to .

The metric  used for our particular cost function

(3)

is formally specified in the Supplementary Information (Sec. S1, Eq. (10)). Our methodology concentrates on developing a useful acquisition function as the crucial component of our approach making it straightforward to find regions of signal.

Log-Gaussian processes for TAS

We briefly describe here why log-Gaussian processes, our central methodological component, are suitable to identify regions of signal in a TAS experiment. Methodological details can be found in the Methods section.

Although the intensity function is not directly observable due to measurement noise (Eq. (1)), we aim to approximate it by the mean function of a log-Gaussian process

(4)

where  is a Gaussian process. That is, after  steps, we fit logarithmic intensity observations to  yielding its posterior mean and variance function denoted by  and , respectively. The acquisition function is then defined as the uncertainty of  given by its posterior standard deviation, i. e.,

(5)

Observe the crucial detail that  appears exponentially in this function which is the main reason why our approach is based on log-Gaussian processes. A posterior log-Gaussian process is thus able to find regions of signal just through maximizing its uncertainty. As illustration, regard Fig. 2 displaying the posterior of the Gaussian process  together with logarithmic intensity observations (Fig. 2a) and the corresponding posterior of the log-Gaussian process  (Fig. 2b).

Transformation of a Gaussian process (a) to a corresponding log-Gaussian process (b) with observations (blue dots) of a one-dimensional intensity function 
Figure 2: Transformation of a Gaussian process (a) to a corresponding log-Gaussian process (b) with observations (blue dots) of a one-dimensional intensity function . As expected from Eq. (5), maximizing the uncertainty (light blue area) of the log-Gaussian process enables to find regions of signal.

Intensity threshold and background level

Maximizing the acquisition function from Eq. (5) prioritizes regions with high intensities over regions with low intensities. This poses a problem when there are multiple signal regions with intensities of different magnitudes (Extended Data Fig. 6a). Indeed, measurement points are mainly placed in regions with higher intensities whereas regions with less signal are neglected (Extended Data Fig. 6b). In TAS, we are interested in each region of signal no matter of which intensity magnitude. We compensate for this potential problem by introducing an intensity threshold  for observed intensities. That is, we truncate the observed intensities to a maximum of  before fitting (Extended Data Fig. 6c). Consequently, measurement points get more evenly distributed among all signal regions (Extended Data Fig. 6d) since their placement is not biased due to large differences in their intensity values.

As another problem, intensity observations, in neutron experiments, contain background which is not part of the actual signal, i. e., even if there is no actual signal at a certain location, we might nonetheless observe a positive intensity there. If our approach does not compensate for regions of background, it might not recognize them as parasitic and hence consider them as regions of weak signal which potentially yields uninformative measurement points being placed there. Therefore, we subtract a background level  from already threshold-adjusted intensity observations while ensuring a non-negative value.

Ultimately, the log-Gaussian process actually aims to approximate the modified intensity function

(6)

Observe that, by regarding adjusted intensity observations, the assumption of their noise being normally distributed is violated in general as their noise distribution is asymmetric. In particular, if  substantially exceeds the intensity threshold , the distribution gets rather concentrated at  and thus small in variance. We, however, do assume noise on adjusted intensities as if they were observed so without adjusting. This does not change the expected behaviour of getting a useful acquisition function but even ensures numerical stability since noise regularizes the computational problem of solving linear systems in GPR.

It remains to explain how we seek to compute suitable values for the background level  and the intensity threshold  without knowing the intensity function. We estimate  and  by statistics of initial measurement points

(7)

collected to initialize our approach. The arrangement of initial measurement locations (Extended Data Fig. 7) is specified later in the Methods section. While also the estimation of the background level  is described later, we define the estimation of the intensity threshold already at this point. This is necessary to understand the results of the benchmark, for which we set  manually due to its synthetic setting anyway. We define

(8)

where  is the median of all intensity observations larger than their -th decile and  is a parameter controlling the distinction between regions of strong and weak signals that needs to be set before starting an experiment. Note that this definition is, by the meaning of , robust to outliers in .

Neutron experiment

At SINQ (PSI), we investigated a sample of SnTe (tin telluride) in a real neutron experiment performed at the thermal TAS EIGER [stuhr2017thermal]. Our general aim is to reproduce known results from [li2014phonon, Fig. 1b] using our approach. Furthermore, we assess the robustness of the experimental result w.r.t. changes in the parameters for the background level and the intensity threshold (scenario 1) as well as challenge our approach using a coarser initialization grid on a modified domain  with no initial measurement locations directly lying in a region of signal (scenario 2).

The software implementation of our approach communicates with the instrument control system NICOS (nicos-controls.org) which was configured on site. For the experimental setting at the instrument, we refer to the Supplementary Information (Sec. S2).

As mentioned, the benefit measure used for benchmarking, involving a known target intensity function, is not computable in this setting of a neutron experiment due to experimental artefacts like background and noise. We therefore evaluate the results of our approach in a more qualitative way for this experiment. Also, although the costs for moving the instrument axes contribute to the total experimental time, we do not consider them here for optimizing the objective function since they are approximately constant across the domain .

For scenario 1, we adopt the setting from the original results [li2014phonon, Fig. 1b] which, in our context, means to investigate intensities on  along the vector  in  space with offset  and energy transfer. Initially, we performed measurements in a conventional mode for reference, i. e., we mapped  with a grid of 11 columns containing 27 measurement points each (bottom row in Fig. 3).

Results for scenario 1.
Each row displays the results of a certain approach.
The columns indicate the four stages (I-IV) of the grid approach (top row).
Rows 2-4 correspond to results of our approach in three different settings.
Triangles represent the initialization grid and dots show locations of intensity observations autonomously placed by our approach.
Row 2 corresponds to the default setting (
Figure 3: Results for scenario 1. Each row displays the results of a certain approach. The columns indicate the four stages (I-IV) of the grid approach (top row). Rows 2-4 correspond to results of our approach in three different settings. Triangles represent the initialization grid and dots show locations of intensity observations autonomously placed by our approach. Row 2 corresponds to the default setting ( and  were computed automatically). Manually changing the intensity threshold to  (with ) leads to results depicted in row 3. Row 4 shows results after changing the background level to (with ). The bottom row shows the mapping in its conventional order for completeness.

These measurements were arranged in columns from bottom to top, i. e., from low to high energies, and from left to right, i. e., from small to large values for the coordinate along the vector in  space.

A direct comparison with our approach would put this mapping mode in disadvantage since its total experimental time could have been spent more efficiently. For this reason, the approach that we eventually take for comparison, the grid approach (top row in Fig. 3), takes the measurement points from the mapping mode but changes their order into four stages I-IV (Extended Data Fig. 8a-d). The first stage is from bottom to top and from left to right but only consists of every other grid point on both axes. The second stage is again from bottom to top but from right to left and also consists only of every other grid point on both axes. The third and fourth stage are analogous but consist of the remaining grid points that were skipped in the first two stages. With this order, the grid approach can observe intensities on each region of  already after the first stage and hence can acquire more information in a faster way as with the conventional order.

We ran our approach in the default setting (Tab. 1), i. e., with automatically computed background level and intensity threshold, as well as with two alternative pairs of corresponding parameter values manually set in order to study the robustness of the results. In the default setting (row 2 in Fig. 3), the background level and intensity threshold were computed to  and , respectively. To study the robustness of these results w.r.t. changes in the intensity threshold, the parameters for the first alternative (row 3 in Fig. 3) were set to  and . The second alternative (row 4 in Fig. 3), for studying the robustness w.r.t. changes in the background level, was configured with  and . Eventually, the cost budget  for each instance of our approach was determined by the total experimental time of the grid approach which was  hours. Each respective initialization with the same grid of 61 measurement points took  hours of experimental time. The results displayed in Fig. 3 show that, after initialization, our approach places measurement points mainly in regions of signal in all three settings. The grid approach, in contrast, has observed intensities at a considerable amount of uninformative measurement locations.

In scenario 2, we tried to challenge our approach with a more difficult initial setting. The initialization grid in scenario 1 (triangles in Fig. 3) indeed beneficially lies on an axis of symmetry of the intensity function. Also, partly as a consequence, some initial measurements points are already located in regions of signal. From a methodological perspective, it is interesting to investigate how our approach behaves after unfavorable initialization, i. e., if almost all initial intensity observations are lying in the background and hence almost no useful initial information is available. Hence, we reduced the number of initial measurement points from 61 to 25 and set  to break the axis of symmetry and measure larger energy transfers (Fig. 4a).

Results for scenario 2.
a) Reduced number of initial measurement points (triangles) in a shifted and enlarged domain providing almost no initial information about the intensity function.
b) Intensity observations following the uninformative initialization (dots).
Figure 4: Results for scenario 2. a) Reduced number of initial measurement points (triangles) in a shifted and enlarged domain providing almost no initial information about the intensity function. b) Intensity observations following the uninformative initialization (dots).

Estimating the background level and intensity threshold is not reasonable in this setting since the amount of initial information is too little. Therefore, we manually set  and , respectively. The cost budget  for our approach was not set explicitly here. In fact, we stopped the experiment manually after  hours of total experimental time, with  hours spent on initialization with the modified grid. The result is depicted in Fig. 4b. It shows that, even in this challenging situation, our approach keeps making reasonable decisions on measurement locations.

Benchmark

This section shows results of a benchmark on several two-dimensional (i. e., ) test case intensity functions (Extended Data Fig. 9) as a quantitative proof of concept. The benchmarking procedure quantifies the performance of an approach by how much benefit it is able to acquire for certain cost budgets in the context of predefined test cases. We briefly describe its setting in the following paragraph. For more details, we refer to the original work [teixeiraparente2022benchmarking].

A test case mainly includes an intensity function defined on a certain set  and a synthetic TAS used for moving on  with certain velocities and observing intensities. As mentioned, the cost measure is chosen to be the experimental time used, i. e., the sum of cumulative counting time and cumulative time for moving instrument axes. The benefit measure is defined by a relative weighted  approximation error between the target intensity function and a linear interpolation  using observed intensities from experiments . It encodes the fact that a TAS experimenter is more interested in regions of signal than in the background which suggests to use  itself as a weighting function. However, an important constraint, which is controlled by a benchmark intensity threshold  truncating weights to

(9)

as similarly described for the intensity threshold of our approach, is that separate regions of signal with different magnitudes of intensity might be equally interesting. Formally, we define

(10)

where for the weighting function

(11)

For each test case, benefits are measured for several ascending cost budgets, called “milestone values”, to demonstrate the evolution of performance over time. We note that this synthetic setting includes neither background nor measurement noise as both are artefacts of real neutron experiments.

We run the benchmarking procedure with three approaches for comparison:

  1. random approach,

  2. grid approach,

  3. our approach with different values for the intensity threshold parameter .

The random approach places intensity observations uniformly at random in . The grid approach is adopted from the section on the neutron experiment but using a square grid of dimension , .

For our approach, we set a zero background level, i. e.,  , manually since background is not included in this synthetic setting. Our approach is run with four variations of the intensity threshold parameter  (Eq. (8)) in order to study corresponding sensitivities of the benchmark results.

The specific benchmarking procedure involves four milestone values according to the four stages (I-IV) of the grid approach, i. e., the -th milestone value represents the experimental time needed to complete stage . Observe that they depend on the particular test case. The specific milestone values used are indicated in the Supplementary Information (Sec. S4). The number of columns/rows  for the grid approach is chosen to be the maximum number such that the corresponding experimental time for performing an experiment in the described order does not exceed  hours.

Since both the random and our approach contain stochastic elements, we perform a number of 100 repeated runs with different random seeds for each test case in order to see the variability of their results.

The results for each test case along with its corresponding intensity function are shown in Fig. 5.

Benchmark results.
For each approach, every subfigure plots the decay of a relative approximation error (Eq. (
Figure 5: Benchmark results. For each approach, every subfigure plots the decay of a relative approximation error (Eq. (10)) between the target intensity function of the corresponding test case (top right corners) and a linear interpolation of collected intensity observations for four milestone values which are determined by the four stages (I-IV) of the grid approach. The solid lines show medians of the resulting benefit values, whereas the light color areas indicate the range between their minimum and maximum to visualize their variability caused by stochastic elements.

Our approach has, on median average, performed significantly better than the random and grid approach in most test cases. Furthermore, its mostly thin and congruent shapes of variability (light color areas) demonstrate its reproducibility and its robustness w.r.t. changes in the intensity threshold parameter . Examples of particular experiments performed by our approach are additionally provided in Extended Data Fig. 10 for each test case.

Discussion

The results of the neutron experiment demonstrate the benefits of our approach. Indeed, in scenario 1 (Fig. 3), our approach identifies regions of strong as well as of weak signal in each setting and even finds isolated relevant signals of small shape at the edge repeatedly. Therefore, for this experimental setting, the results are shown to be robust w.r.t. changes in the estimated background level and intensity threshold, which we view as an important outcome of this experiment. The choice of these parameters is however directly reflected in the placement of measurement points which indicates a certain aspect of interpretability and explainability [roscher2020explainable, belle2021principles] of our approach. An intensity threshold higher in value namely leads to measurement points that are placed on a thinner branch of signal (row 3 in Fig. 3), whereas as a lower background level yields more exploratory behaviour, with a risk to measure in regions of background from time to time (row 4 in Fig. 3). Additionally, note that a smaller intensity threshold results in measurement points also being placed in regions of high intensity gradient.

Furthermore, in each setting, our approach (rows 2-4 in Fig. 3) has significantly fewer measurement points in the background compared to the grid approach (top row in Fig. 3) as expected and thus uses experimental time more efficiently. The grid approach additionally does not cover small signal regions at the edge. A simulated intensity between the two regions of signal on the right [li2014phonon, Fig. 1c] is not seen by our approach which is, however, in agreement with the original experiment [li2014phonon, Fig. 1b]. In situations like this, a human experimenter can focus on such details and place additional measurement points manually, if necessary.

When applying GPR, we use a common Gaussian kernel as detailed in the Methods section. The (logarithm of the) intensity function from Fig. 3 however violates the stationarity of this kernel. Indeed, using a stationary kernel assumes homogeneous statistical behaviour of the intensity function across the entire domain  which is not the case for our particular scenario. The length scale along the axis, for instance, is differing for different values on the  axis. In the middle of the  axis, the length scale is certainly larger than near its edges. Note that the length scale along the  axis is also non-stationary. These discrepancies are one of the main reasons for our choice of the material SnTe and the setting mentioned above since it provides an opportunity to demonstrate that a stationary kernel, which is computationally substantially cheaper than non-stationary kernels, is sufficient for identifying regions of signal and hence for performing efficient experiments.

In scenario 2 (Fig. 4), we challenged our approach with a difficult setting. Although the initialization grid and the domain were organized such that no initial measurement point is located in a region of signal, and hence the approach is initialized with little useful information, its behaviour stays reasonable. It namely keeps placing measurements in regions of signal and can still identify the small region with strong signal on the bottom right. However, the signal region in the middle of the domain is not fully identified, which can be explained by the relatively short experimental time ( hours) as well as by the stationarity of the kernel since the sparse data suggest a short length scale along the  axis leading to the assumption of lower function values in an actual region of signal.

Note that the reduced amount of initial measurement points in scenario 2 is only applied for the purpose of challenging our approach and a demonstration of its robustness. In productive operation, however, we stay with the larger initialization grid from scenario 1 since placing some measurements in regions of background for a proper determination of the same is a valuable step during an experiment providing relevant information for the experimenter. Fortunately, this mostly leads to a sufficiently good initialization of our approach, despite using a common stationary kernel.

For further results of neutron experiments in the setting from scenario 1 as well as from an additional scenario (scenario 3) that investigated another phonon of SnTe in the default setting of our approach, we refer to the Supplementary Information (Sec. S3).

The benchmark results (Fig. 5), as a proof of concept, confirm the outcomes of the neutron experiment quantitatively in a synthetic setting. Our approach shows a better performance, measured by a relative weighted approximation error (Eq. (10)) between a target intensity function and a linear interpolation of collected intensity observations, compared to the random and grid approach for all test cases. The improvements are especially substantial for target intensity functions with smaller regions of signal (Fig. 5a-q). For intensity functions that cover a substantial part of the domain  (Fig. 5r-t), the competing approaches are also able to place intensity observations in regions of signal early during the experiment and hence it is difficult for any approach to demonstrate its benefit in these scenarios.

The variability in the results of our approach containing stochastic elements, quantified by the median of benefit values and the range between their minimum and maximum, is shown to be small for most test cases and acceptable for the remainder. Our approach can thus be considered reliable with reproducible results despite starting with a different sequence of pseudo-random numbers for each run.

Moreover, the benchmark results indicate that our approach is robust w.r.t. changes in the intensity threshold. The four variations of the corresponding controlling parameter  (Eq. (8)) yield similar results for most test cases. It should be noted, however, that the use of a reasonable value for  in real neutron experiments is nevertheless important. Indeed, it not only eliminates the effect of outliers in initial intensities but also, recall, allows to control the width of signal branches on which the measurement points are placed, and thus the extent to which regions of high gradient are preferred over those of peak intensity.

Finally, in addition to the results of the neutron experiment, the particular experiments performed by our approach in the benchmark setting (Extended Data Fig. 10) confirm that it, after initialization, autonomously places the majority of measurements in regions of signal for a variety of different intensity distributions.

Conclusions

In the previous sections, we demonstrated that our approach indeed improves the efficiency of TAS experiments and allows to make better use of the experimenter’s time. It maximizes an acquisition function given by approximation uncertainties of a log-Gaussian process in order to find informative measurement points and not waste experimental time in regions such as the background. Our robust and reproducible results suggest that it is in fact capable of autonomously obtaining a rapid overview of intensity distributions in various settings.

In a real neutron experiment at the thermal TAS EIGER, our approach repeatedly demonstrated its ability to identify regions of signal successfully leading to a more efficient use of beam time at a neutron source of a large-scale research facility. It was additionally shown that it keeps making reasonable decisions even when being initialized with little information. Furthermore, substantial performance improvements, in comparison with two competing approaches, and their robustness were quantified in a synthetic benchmark setting for numerous test cases.

Nevertheless, we feel that the automated estimation of algorithmic parameters (background level and intensity threshold) from statistics of initial measurements, despite its good performance in each of the settings discussed, needs to be confirmed in future experiments.

Our approach, so far, solves the problem of where to measure. However, an interesting topic of future research is the major question of how to measure at a certain location. Counting times were assumed to be constant in this work and thus promise to be another possibility to save experimental time if determined autonomously in an advantageous way. Indeed, large counting times in regions of high intensities and background are actually not needed since the necessary information can also be collected in less time. Experimenters, in contrast, are often more interested in weaker signals and their comprehensive measurement to reduce corresponding error bars.

Finally, although using a common stationary kernel for GPR has proven to be sufficient for identifying regions of signal, we regard the application of non-stationary kernels with input-dependent hyperparameters [paciorek2003nonstationary, plagemann2008nonstationary, heinonen2016non, tolvanen2014expectation], e. g., length scales, also modelled by log-Gaussian processes, as another interesting option for future research.

Methods

Our approach is methodologically based on Gaussian Process Regression (GPR) [rasmussen2006gaussian], a Bayesian technique for estimating and approximating functions from pointwise data that allows to quantify uncertainties on the approximation itself in the form of normal distributions. We fit a Gaussian process to logarithmic intensity observations and exponentiate the resulting posterior process yielding a log-Gaussian process. As mentioned, this transformation causes approximation uncertainties to be higher in regions of signal which in turn can be exploited for the definition of a useful acquisition function.

Gaussian Process Regression

We generally intend to approximate a function of interest , which becomes the logarithm of the intensity function later. Using GPR for this, we have to assume that  is a realization of a Gaussian process .

Definition (Gaussian process).

A Gaussian process

(12)

with (prior) mean function and parameterized kernel function is a collection of random variables  such that for any finite amount of evaluation points , , , the random variables  follow a joint normal distribution, i. e.,

(13)

where

(14)

Note that, for each , it particularly holds that

(15)

where is the (prior) variance function.

The kernel function  is an important component in GPR since it describes the correlation structure between random variables . Hence, it enables to include assumptions on realizations of  and determines function properties like regularity, periodicity, symmetry, etc. In practice, it is crucial to choose a kernel function that matches with properties of the function of interest .

We acquire knowledge on  through noisy observations  at locations  (Eq. (2)) in our context. Therefore, for , we set

(16)

where are i. i. d. random variables independent of  and denotes the noise standard deviation at . Note that  is a normally distributed random variable.

For clear notation, we define

(17)

and let

(18)

for any function .

After observations have been made, we are interested in the posterior, i. e., conditional, Gaussian process. It holds that

(19)

with the posterior mean function

(20)

and the posterior variance function

(21)

If necessary, the hyperparameters  of the kernel function  can be optimized using data . For this, we compute  such that the logarithm of the so-called marginal likelihood, i. e.,

(22)

is maximized. A suitable optimizer is specified below. Note that the analytical expression for the integral in Eq. (22) is only feasible due to the Gaussian distributions involved. However, the computational cost of GPR is often hidden in this kernel optimization step since it requires solving linear systems and computing determinants [rasmussen2006gaussian, Sec. 2.3]. An appropriate criterion for stopping kernel optimizations that detects stagnant hyperparameters during an experiment is therefore provided below. Furthermore, observe that, for a fixed non-optimized kernel, does not depend on observations  but only on locations  they have been made at.

The posterior mean function , incorporating knowledge on  noisy observations of the function of interest , can now be used as an approximation to , whereas the posterior variance function  quantifies the corresponding uncertainties (Extended Data Fig. 11). Note that for each  since is positive-definite. Since we have later, we can further simplify Eq. (20) to

(23)

Log-Gaussian processes

The Gaussian process, which is fitted to logarithmic intensity observations in our approach, is exponentiated to the original linear scale in this section to become log-Gaussian. It is this transformation that directly yields a useful acquisition function.

Before we describe the details, we need to define a log-normal random variable and prove a technical detail that becomes important below.

Definition (Log-normal distribution [mathworld2021lognormal]).

Let . Then, for parameters  and , the random variable

(24)

is said to follow a log-normal distribution, denoted by -.

The mean and variance of a log-normal random variable  are given by

(25)

Below, we look at the noise distribution of log-Gaussian processes in order to satisfy our assumption on intensity observations to contain normally distributed noise (Eq. (1)). The following result is fundamental for this and proved in the Supplementary Information (Sec. S5). It investigates the behaviour of log-normal random variables in the small variance limit.

Proposition (Small variance limit of normalized log-normal random variables).

Let - as in Eq. (24) and define the corresponding normalized random variable

(26)

Then, the random variable  converges pointwise to  as , i. e.,

(27)

for each , where  denotes the sample space.

Our result for single log-normal random variables gives pointwise convergence. However, convergence in distribution can also be proven for sums of log-normal random variables [dufresne2004log].

As mentioned, the exponentiation of a Gaussian process is log-Gaussian, by definition.

Definition (Log-Gaussian process).

Let  be a Gaussian process. Then, the random process  with

(28)

is called a log-Gaussian process.

Using Eqs. (20) and (21), it immediately follows for the posterior log-Gaussian process that

(29)

In particular, its posterior mean function is

(30)

and its posterior variance function becomes

(31)

Application to TAS

In the context of our methodology from the previous sections, we choose the function of interest to be the logarithm of the intensity function from the TAS setting (Supplementary Information, Sec. S1), i. e.,

(32)

If we define

(33)

relating to Eq. (28), i. e., , Eq. (16) gives

(34)

for measurement locations . Note that, in contrast to the process  containing additive normally distributed noise (Eq. (16)), the noise of  is multiplicative and log-normal, i. e.,

(35)

However, referring to Eq. (1), the physical assumption on the noise of intensity observations  is to be additive and normally distributed, i. e.,

(36)

where and . Fortunately, the actual deviation of the two different noise distributions is negligible for sufficiently large intensities  as the following explanations demonstrate.

As a first step, let us determine from Eq. (34) such that the variances of both noise distributions are equal, i. e.,

(37)

which yields

(38)

Note that the intensity term  in Eq. (38) is not known in practice but can be replaced by the corresponding observation .

Since we aim to apply the small variance limit for log-normal random variables from above (Eq. (27)), we set

(39)

with

(40)

Observe that

(41)

Furthermore, note that the term  also depends on the limit  and hence on , in contrast to the setting above, but disappears in the calculations due to cancellations (see proof in Supplementary Information, Sec. S5). Using the small variance limit, we immediately get the following result (Extended Data Fig. 12).

Proposition.

The normalization of the noise random variable  converges pointwise to  as . In particular, it converges in distribution to a standard normal distribution.

If we set

(42)

the acquisition function  of our approach can now be defined as

(43)

which eventually gives Eq. (5) through Eq. (31).

Consumed areas

As placing measurement points too close to each other has limited benefit for an efficient experiment, we mark areas around each measurement location  as “consumed” and ignore them as potential locations for new measurement points. Since the resolution function of a TAS yields ellipsoids in - space, it is natural to consider consumed areas in  as ellipses. An ellipse with center point  is defined as

(44)

for a matrix-valued function

(45)

where  is a rotation matrix and with . Then, the union of all ellipses at step  is denoted by

(46)

It is included in the objective function  which is part of the final algorithm.

Final algorithm

Incorporating all of the discussed methodological components, the steps for the final algorithm are listed in Alg. 2.

1:initial measurement locations , function  for computing background level, function  for computing intensity threshold, kernel  and optimizer for hyperparameters  (Eq. (22)), cost measure , cost budget , matrix-valued function  for elliptic consumed areas (Eq. (45)), objective function , stopping criterion for kernel optimizations 
2:Observe noisy intensities  at initial locations 
3:
4:Optimize hyperparameters  of kernel 
5:Compute background level  and intensity threshold 
6:
7:
8:while  do
9:     Determine next measurement location 
10:     Observe noisy intensity  at 
11:     if kernel optimizations stopped then
12:         
13:     else
14:         Optimize hyperparameters  of kernel 
15:         if  then
16:              Stop kernel optimizations
17:         end if
18:     end if
19:     
20:     
21:end while
Algorithm 2 Final algorithm

Its requirements are specified in the next paragraphs. The values used for required parameters are specified below.

The initial measurement locations  are deterministically arranged as a certain grid. It is chosen to be a variant of a regular grid in which every other row (or column) of points is shifted to the center of surrounding points (Extended Data Fig. 7). The intensity observations start in the bottom left corner of  and then continue row by row. Initial locations not reachable by the instrument, i. e., outside of , are skipped. If all initial locations are reachable, we use a total number of

(47)

where is the odd number of rows in the grid.

For computing the background level , we divide the initial intensity observations sorted in ascending order into 10 buckets

(48)

where , , denotes the -th decile of initial intensity observations, , and . The relative and absolute differences of the bucket medians, i. e.,

(49)

with , , are taken to select the first bucket median which has a sufficiently large (relative and absolute) difference to its successor provided the corresponding decile does not exceed a maximum decile. That is, we define

(50)

for parameters , , and and set the function for computing the background level to

(51)

The function for computing the intensity threshold is already given above (Eq. (8)). It is selected as a value between the background level  and the maximum bucket median  on a linear scale by the parameter .

The cost measure  is chosen to represent experimental time, i. e., the total time needed to carry out an experiment . Experimental time consists of the cumulative counting time and the cumulative time for moving the instrument axes. The cumulative counting time is measured by

(52)

where  denotes the single counting time, i. e., the time spent for a single intensity observation, at . The cost measure for the cumulative time spent to move the instrument axes is defined as

(53)

where  is a metric representing the cost for moving from  to . For details, we refer to Supplementary Information (Sec. S1). Eventually, we set

(54)

For simplicity, the single counting times are assumed to be constant on the entire domain , i. e.,  yielding

(55)

Although NICOS is able to consider an instrument’s resolution function for the computation of ellipse matrices  from Eq. (45), we decided to use ellipses fixed over  for both, the neutron experiment and the benchmark. The details for the matrix-valued function  are given below.

The parameterized kernel  is chosen to be the Gaussian (or radial basis function, RBF) kernel, i. e.,

(56)

where  and for length scales . Hence, the vector of hyperparameters is

(57)

Recall that the kernel is needed for GPR to fit a Gaussian process to the logarithm of intensity observations. As mentioned above, we compute optimal hyperparameters by maximizing the logarithm of the marginal likelihood (Eq. (22)). Since this optimization problem is non-convex in general, it might have several local maxima. Instead of a global optimizer, we run local optimizations starting with  different initial hyperparameter values distributed uniformly at random in a hypercube  and choose the one with the largest local maxima. Note that this introduces stochasticity into our approach.

Recall that the objective function , which is supposed to indicate the next measurement location, is composed of the acquisition function  from Eq. (43) and the cost function  from Eq. (3). In order to avoid distorting the objective function with physical units of time, we use the normalized cost function

(58)

where  is a normalizing cost value and set to the maximum distance between two initial measurement locations w.r.t. the metric , i. e.,

(59)

The objective function is then defined as

(60)

Observe that  excludes consumed areas in  as potential locations for new observations. Outside , it reflects the fact that the objective function should increase if the cost function decreases and vice versa. Also, if there were no costs present, i. e., , then  outside .

Finally, as kernel optimizations are computationally the most expensive part of our methodology, it is reasonable to stop them once a certain criterion is met. The stopping criterion  is formalized as a predicate, i. e., a boolean-valued function, depending on step . If denotes the number of kernel optimizations performed up until step , it is defined as

(61)

for parameters  such that

(62)

and . Informally, this predicate indicates that kernel optimizations should be stopped as soon as  exceeds a given maximum number  or if, provided that  exceeds a given minimum number , the average relative difference of the last  hyperparameters falls below a given threshold value , i. e., the hyperparameters stagnate and do no longer change substantially. Note that, in Eq. (61), the expressions  for the vector of kernel hyperparameters  from Eq. (57) are meant componentwise, i. e.,

(63)

Degenerate cases

An intensity function that is nearly constant along a certain coordinate  in , i. e., an intrinsically lower-dimensional function, might cause problems for the Gaussian kernel from Eq. (56) as the corresponding optimal length scale hyperparameter would be . Also, the initial observations  from Eq. (7) might not resolve the main characteristics of the intensity function sufficiently well and hence pretend it to be lower-dimensional.

Most degenerate cases can be identified by kernel optimizations resulting in one or more length scales that are quite low or high relative to the dimensions of . In general, we assess a length scale parameter  as degenerate if it violates

(64)

for two parameters , where  and  denote the limits of the rectangle  in dimension . If, after kernel optimization at a certain step, a length scale parameter is recognized to be degenerate, we regard the intensity function on a coordinate system rotated by  in order to avoid the mentioned problems. Of course, the rotation is performed only internally and does not affect the original setting.

In  dimensions, a crystal field excitation, for example, might induce a lower-dimensional intensity function (Extended Data Fig. 13a). After rotating the coordinate system, the intensity function becomes full-dimensional (Extended Data Fig. 13b) allowing non-degenerate kernel optimizations.

Algorithmic setting

All experiments described in this article are performed in  dimensions, i. e., . If not specified otherwise, we use rows corresponding to 61 measurements in the initialization grid (Eq. (47)). For scenario 2 of the neutron experiment, we use  rows corresponding to 25 initial measurements. The default parameter values used for Alg. 2 in both experimental settings, i. e., the neutron experiment and the benchmark, are specified in Tab. 1.

Parameter
Value 11 0.5 15 6 0.5
Table 1: Default parameter values used for Alg. 2.

The matrix-valued function  (Eq. (45)), defining ellipses as consumed areas, is chosen to give circles with fixed radius  on a normalized domain, i. e.,  and

(65)

We set  for the neutron experiment and  for the benchmark.

Code availability

The software implementation of our approach is based on the GaussianProcessRegressor class from the Python package scikit-learn [pedregosa2011scikit]. All results can be reproduced using our code from the repository jugit.fz-juelich.de/ainx/ariane (commit SHA: 6ed7de50). The benchmark results can be reproduced by using code from the repository jugit.fz-juelich.de/ainx/base-ariane-fork (commit SHA: a7eb3dc9). It is a fork, adjusted to our approach, of the benchmark API from jugit.fz-juelich.de/ainx/base which is part of the mentioned original work on the benchmarking procedure [teixeiraparente2022benchmarking].

\printbibliography

Acknowledgements

We thank Yuliia Tymoshenko (KIT) for providing simulations on ZnCrSe and FeP as well as Anup Bera and Bella Lake (both HZB) for the same on SrCoVO. Furthermore, we gratefully thank Frank Weber (KIT) who provided the SnTe sample and related information for the neutron experiment at EIGER. Eventually, we acknowledge the discussions and collaborations with Marcus Noack (LBNL) and Martin Boehm (ILL).

Funding

This work was supported through the project Artificial Intelligence for Neutron and X-ray scattering (AINX) funded by the Helmholtz AI cooperation unit of the German Helmholtz Association.

Author contributions

M.G. and A.S. initiated and supervised the research. M.T.P. developed the methodology. M.T.P. and G.B. designed and developed the software components. M.T.P, G.B., C.F., U.S., and A.S. performed the experiments. M.T.P. wrote the first draft of the manuscript. All authors revised drafts of the manuscript.

Extended Data

a) Intensity function 
Extended Data Figure 6: a) Intensity function  with two signal regions of different intensity magnitudes. b) An ad hoc use of corresponding intensity observations for conditioning the log-Gaussian process might place the majority of measurement points in the high intensity region. c) To solve this problem, the intensity observations are truncated to a threshold  such that the process can be thought of as fitted to . d) Using threshold-adjusted intensity observations yields measurement points that are more evenly distributed among the two different signal regions. Note that b) and d) contain the same number of 200 measurement points.
Initial measurement locations arranged as a certain grid.
Observations start at the bottom left corner (orange dot) and then continue row by row (dashed blue line).
Extended Data Figure 7: Initial measurement locations arranged as a certain grid. Observations start at the bottom left corner (orange dot) and then continue row by row (dashed blue line).
Four stages I-IV of the grid approach.
The arrows indicate the order of the intensity observations.
Extended Data Figure 8: Four stages I-IV of the grid approach. The arrows indicate the order of the intensity observations.
Intensity functions of benchmark test cases.
a),b) Crystal field excitations.
c) Superposition of a crystal field excitation and a phonon.
d) Two separate regions of signal with different intensity magnitudes.
e) Transverse optical phonon in SnTe 
Extended Data Figure 9: Intensity functions of benchmark test cases. a),b) Crystal field excitations. c) Superposition of a crystal field excitation and a phonon. d) Two separate regions of signal with different intensity magnitudes. e) Transverse optical phonon in SnTe [weber2021snte]. f)-o) Spin wave spectrum of YbTiO (see tutorial 20 of SpinW [toth2015linear]). p),q) Spin waves in ZnCrSe [cameron2016magnetic]. r),s) Spin waves in FeP [sukhanov2022frustration]. t) Spinon continuum in SrCoVO [bera2017spinon].
Examples of particular experiments performed by our approach for each benchmark test case.
Triangles represent the initialization grid and dots show locations of intensity observations autonomously placed by our approach.
After initialization, measurement points are mainly placed in regions of signal for each test case.
Extended Data Figure 10: Examples of particular experiments performed by our approach for each benchmark test case. Triangles represent the initialization grid and dots show locations of intensity observations autonomously placed by our approach. After initialization, measurement points are mainly placed in regions of signal for each test case.
Transition from a prior (a) to a posterior process (b) illustrated for
Extended Data Figure 11: Transition from a prior (a) to a posterior process (b) illustrated for on  (dashed orange line). The solid blue lines display the mean functions of the processes and the light blue areas show their uncertainties as a 95% credible region between the 2.5% and 97.5% quantile. The blue dots mark collected noisy data points.
For increasing intensities 
Extended Data Figure 12: For increasing intensities , the noise random variable (light blue stripe) converges in distribution to (dashed blue line), i. e., to a normal distribution.
a) An intensity function might be lower-dimensional in the original coordinate system potentially yielding degenerate length scale hyperparameters.
b) After rotating the coordinate system by 
Extended Data Figure 13: a) An intensity function might be lower-dimensional in the original coordinate system potentially yielding degenerate length scale hyperparameters. b) After rotating the coordinate system by , the intensity function gets full-dimensional and allows non-degenerate length scales.

Supplementary Information

S1 TAS setting

In TAS experiments, intensities are observed at a certain point in the - space of the investigated material by counting scattered neutrons on a detector device. The momentum space  is the Fourier transform of an initial periodic spatial lattice depending on the material and provides wavevector coordinates (Miller indices) in relative lattice units (r.l.u.) to move within it. The one-dimensional energy space  provides a coordinate , mostly measured in units of micro-electron volts (meV), to describe energy transfer. Neglecting units, - space can be thought of as a four-dimensional real space, i. e., , .

TAS experiments are, however, often not carried out in full-dimensional - space but on a lower-dimensional (often two-dimensional) hyperplane. The coordinates on the corresponding hyperplane in - space are denoted by , , and the transformation is defined as

(66)

for a full-rank transformation matrix  and an offset . Most often, the transformation matrix has the shape

(67)

meaning that a two-dimensional hyperplane is spanned by a certain direction in  space and energy transfer. The re-transformation , an orthogonal projection onto the hyperplane, is then given by

(68)

Note that  for each , but only for .

The rectangular set , becoming the domain of the intensity function, is defined as

(69)

for given limits of investigation , . For example, in Fig. 1, we have .

In order to observe intensities at a certain location in - space, a TAS needs to move its axes to six related angles. However, since there exist dependencies among the axes, it is enough to regard a subset of four angles and their corresponding angular velocities . For the connection between points in - space and their respective angles of the instrument axes, we formally use an angle map

(70)

with domain  containing points in - space for which  is well-defined, i. e., points reachable by the instrument. Translating this domain to the lower-dimensional coordinates, we define

(71)

as the set of points  such that, by abuse of notation, the map

(72)

is well-defined. We assume that the limits of investigation are set such that becomes an injective function.

The sample and its orientation induce a scattering function  describing intensities theoretically present. For , we define again

(73)

The scattering function is not directly accessible due to limits in the instrument resolution. If we denote the resolution function by  and again define

(74)

for , we eventually get the intensity function  as the convolution of  with , i. e.,

(75)

Finally, the cost for moving the instrument axes, i. e., changing their angles, from a certain location  to another  is formalized by the metric  defined as

(76)

where  are components of the angle map from Eq. (70) and  denote the corresponding angular velocities of the instrument. It indicates the maximum time needed changing all angles in parallel. Note that  is indeed a metric in the mathematical sense since the angle map is chosen to be injective.

S2 Setup for neutron experiment

To prepare the workflow for a neutron experiment at a TAS, we tested real space movements of instrument axes as well as the communication between the software implementation of our approach and the instrument control system NICOS during dry runs, i. e., without neutrons, at the cold TAS PANDA (MLZ) [schneidewind2015panda] for several excitations. Having a lack of neutron beam time in Europe currently, we are grateful for the granted beam time at the thermal TAS EIGER (PSI) [stuhr2017thermal] making a real experiment possible to finally demonstrate the usefulness and benefits of our approach.

The experimental setup at EIGER was as follows. We oriented a SnTe sample (space group 225) in the (hhl) scattering plane and mounted it in a closed cycle cryostat for background decrease, even though we have been measuring at room temperature. EIGER was operated in constant- mode ( Å) with a PG filter on , a double-focusing PG002 monochromator, and a horizontally focusing PG002 analyzer. In scenarios 1 and 2, we counted neutrons on the detector device at each measurement location in - space until  neutrons were counted on the monitor device, whereas in scenario 3, we counted for (initialization) and (after initialization) monitor counts, respectively.

For scenarios 1 and 2, due to the coupling of LA and TO, with an additional TA mode, the intensity distribution provides an ideal setting including real background, strong and weak signals, and symmetry breaking in intensity along the  direction.

S3 Further results from neutron experiment

We have additionally tested our approach in the setting of scenario 1 with different values for the background level and intensity threshold. The results (Supplementary Fig. 14) further support the claim that our approach identifies regions of signal successfully and that a change in the intensity threshold (from  to , both with ) does not have significant influence on the final outcome.

Further results for scenario 1 in two additional settings of our approach.
Rows and columns have the same meaning as for Fig. 3 (except the last column of the top row since the corresponding total experimental time did not reach the final time of stage IV).
The top row corresponds to 
Supplementary Figure 14: Further results for scenario 1 in two additional settings of our approach. Rows and columns have the same meaning as for Fig. 3 (except the last column of the top row since the corresponding total experimental time did not reach the final time of stage IV). The top row corresponds to  and  and the bottom row to  and .

On the contrary, we can see again that the particular value of the intensity threshold influences the width of the branches the measurements are placed on, which additionally substantiates our claim of interpretability and explainability (see Discussion).

In scenario 3, we have investigated the material SnTe on  along the direction  again but with offset  (instead of ) and energy transfer. As the corresponding intensity distribution in this setting has been unknown to us, we have had a scenario that required searching for signals of interest and thus a typical situation for the productive application of our approach in the future. Note that we used our approach in the default setting (Tab. 1) for this scenario, i. e., with an automated estimation of the background level () and the intensity threshold (). The results (Supplementary Fig. 15) demonstrate again that, after initialization, the majority of measurement points is placed in the only region of signal.

Results for scenario 3.
a) Initial measurement points (triangles).
b) Autonomously placed intensity observations (dots).
Supplementary Figure 15: Results for scenario 3. a) Initial measurement points (triangles). b) Autonomously placed intensity observations (dots).

In particular, although the signals vary greatly in magnitude, the measurement points are evenly distributed in this region, which is due to a well-estimated intensity threshold.

S4 Milestone values for benchmark

The milestone values used for the benchmark are given in Supplementary Table 2. Recall that, for each test case, they are determined by the four stages (I-IV) of the grid approach (Extended Data Fig. 8). The intensity functions for all test cases are displayed in Extended Data Fig. 9a)-t).

Test case Milestone values in hours
I II III IV
a) 2.28 4.28 6.27 8.02
b) 2.27 4.27 6.25 8.00
c) 2.23 4.45 6.66 8.90
d) 2.37 4.46 6.53 8.34
e) 2.17 4.27 6.42 8.57
f) 2.21 4.41 6.61 8.82
g) 2.18 4.37 6.55 8.73
h) 2.19 4.38 6.57 8.76
i) 2.21 4.42 6.63 8.84
j) 2.17 4.34 6.50 8.67
k) 2.18 4.36 6.53 8.71
l) 2.21 4.43 6.64 8.85
m) 2.16 4.32 6.48 8.64
n) 2.23 4.47 6.70 8.93
o) 2.17 4.34 6.51 8.69
p) 2.15 4.30 6.45 8.60
q) 2.36 4.44 6.48 8.28
r) 2.33 4.36 6.38 8.15
s) 1.80 3.58 5.36 7.13
t) 2.26 4.24 6.20 7.93
Table 2: Milestone values for each benchmark test case.

S5 Proof of Proposition on small variance limit for log-normal random variables

Lemma.

For each , it holds that

(77)
Proof.

Let . Note that

(78)

using the Taylor expansion of . With this in mind, we compute

(79)

Cancelling from both, the numerator and the denominator, gives

(80)

Proof of Proposition.

First, we compute

(81)
(82)
(83)
(84)
(85)
(86)

and

(87)
(88)

yielding

(89)

Applying the lemma above to Eq. (89) for  yields the result. ∎

Hence, as a corollary, the distribution of  converges to a standard normal distribution (as ).