Accelerating small-angle scattering experiments with simulation-based machine learning

Making material experiments more efficient is a high priority for materials scientists who seek to discover new materials with desirable properties. In this paper, we investigate how to optimize the laborious sequential measurements of materials properties with data-driven methods, taking the small-angle neutron scattering (SANS) experiment as a test case. We propose two methods for optimizing sequential data sampling. These methods iteratively suggest the best target for the next measurement by performing a statistical analysis of the already acquired data, so that maximal information is gained at each step of an experiment. We conducted numerical simulations of SANS experiments for virtual materials and confirmed that the proposed methods significantly outperform baselines.


Introduction
In recent years, Materials Informatics (MI) has gained popularity as a data-driven approach to materials discovery and design [1,2,3,4,5,6,7].While the success of MI hinges on materials datasets with wide coverage and high accuracy, such datasets are not yet sufficiently available in many fields of physics and chemistry.Thus the demand for high-cost manual experiments to garner new data remains high.Precise determination of material properties often requires a sequence of elaborate measurements, and it is highly desired to expedite such experiments in order to reduce the time, money, and effort involved.Thus far, the application of machine learning techniques in MI to the optimization problem of such serial measurements has been rather limited.Even though the use of Bayesian optimization to design sequential material experiments is common [8,9,10,11], the typical goal of such studies is to discover a material with the best property as quickly as possible, in contrast to sequential measurements on a single material sample, where the challenge is to accurately determine material properties by optimally integrating multiple measurement outcomes.
In this paper, we explore optimization strategies for sequential experiments in materials science, taking the small-angle neutron scattering (SANS) experiment [12,13] as a representative example.SANS is widely used to study the microstructures of various materials including alloys, ceramics, and polymers, but the design of an optimal SANS experiment has been left to manual adjustment by experienced researchers.To alleviate this burden, we formulate the design of a SANS experiment as a multi-step decision making problem and introduce two methods that enable adaptive measurement planning.The core idea is to create a database of virtual experiments by means of simulation and then use it adaptively during the real experiment.In the first method, we use simulation to fix the best sampling procedure for each of many virtual samples and record the procedures in a database.During the actual experiment, we send the acquired data into a similarity search over the database and retrieve the best sampling protocol for the most similar sample.In the second method, the outcomes of future measurements during an experiment are predicted in two distinct ways: one uses the database of simulated measurements, while the other does not.The target of the next measurement is then determined through comparison of the two predictions.
To benchmark the proposed methods, we prepared 100 virtual sample materials and simulated SANS experiments on them.The results showed that the experimental duration required to achieve satisfactory accuracy was reduced by 50-65% with these methods, as compared to random sampling with no prior planning.We thus conclude that SANS experiments can be accelerated by a factor of 2-3 with our method.Since the small-angle X-ray scattering (SAXS) [12,13] also shares the same principles with SANS, we believe our methods will work for SAXS experiments as well.
In section 2 of this paper, we summarize the setup of the problem and provide a pedagogical toy example to highlight the methods we propose.In section 3, an overview of a SANS experiment is given and relevant terminology is introduced.In section 4, new methods for planning an optimal SANS experiment are defined and discussed in detail.In section 5, these methods are tested in numerical simulations and compared with baseline methods.We conclude in section 6 with a brief summary and mention of future work.

Problem Setup
Let us consider a class of problems characterized by a relation of the form where y is an observed signal, x is a hidden property that we want to uncover, n is noise, and F(•) is a function of known form.The task is to reconstruct x from a partial observation of y.This class of problems includes a number of interesting applications such as image denoising, where x is a clean image and y is a corrupted image, and compressed sensing, where F is a linear map and x is assumed to be sparse.SANS experiments belong to this class, as explained in section 3.
The question we examine is how to find a policy for sequentially measuring the components of y so as to maximize the efficiency of recovering x.To illustrate key issues clearly, let us consider a toy problem.Suppose we wish to infer a periodic function f (x) defined on the interval x ∈ [−π, π].The allowed operation is to query the value of the integral, which we call a measurement of f .After a set of measurements The discrepancy from true f may be quantified by the mean squared error: When a measurement is either costly or time-consuming, we want δ n to decrease with n as fast as possible so that the measurement can be truncated early.As is evident from (3), the best strategy is then to sequentially measure α k in descending order of magnitude, but this is impossible without knowing f in advance.The challenge is to judge which α k n+1 to measure next on the basis of previous measurements This is a nontrivial multi-step decision making problem.It is crucial to take into account correlations of {α k } properly.We may conceive of two qualitatively different ways to tackle this problem: one is a deductive approach and the other is an inductive approach.They are outlined as follows.
• Method 1 (deductive).To begin with, we assume that f is generated from the probability distribution p(g) ∝ exp −λ π −π dx |∇g(x)| 2 over smooth periodic functions on [−π, π], with λ > 0 a parameter to control the smoothness.This is a working hypothesis posed to model the correlations among {α k }.In the Bayesian sense, p(g) represents the prior distribution of f , i.e., the belief we have for f before any measurement.After the measurements K n , the posterior probability p(g|K n ) can be factored as p(K n |g)p(g) up to an irrelevant constant, based on the Bayes rule [14].We proceed further to modeling p(K n |g) by a Gaussian distribution as Combining this with the prior distribution, we find that the maximum a posteriori (MAP) estimation [14] of f is given by In practice, this can be solved with numerical optimization algorithms.It is then straightforward to expand f n MAP into a Fourier series.The target of the next measurement is given by The essence of this method lies in guessing the outcome of future measurements (α k (f ) for k ∈ K n ) from previous measurements (α k (f ) for k ∈ K n ) by using an analytical Ansatz for the distribution of f .
• Method 2 (inductive).We start by creating a database of periodic functions on [−π, π] and their Fourier coefficients, The data-generating process behind {g } is supposed to be the same or approximately the same as the one that generated f .After the first n measurements K n , we compare the results {α k (f )|k ∈ K n } with those stored in the database {α k (g )|k ∈ K n } and pick out the g that most resembles f .Formally stated, we choose where the similarity is measured by the L 1 norm, but other choices are also possible.
Then we decide on the target of the next measurement as Just like method 1, method 2 also guesses the outcome of future measurements (α k (f ) for k ∈ K n ) from previous measurements (α k (f ) for k ∈ K n ), but this time, instead of making a parametric Ansatz for the distribution of f , we rely on a database and make a purely empirical guess, in a manner analogous to the nearest neighbor algorithm in machine learning [14].
In the above, we outlined two contrasting methods for measurement planning for the simple toy problem.As described in the following sections, the SANS experiment in materials science is technically much more involved than this example, but the basic ideas underlying methods 1 and 2 above can be carried over.Specifically, method 1 for SANS (section 4.1) is purely empirical and is akin to method 2 for the toy problem, whereas method 2 for SANS (section 4.2) is a hybrid of inductive and deductive methods.Why is a hybrid approach useful?To answer this, we modify the setup of the toy problem slightly as follows.Below (2) the estimate of f based on the measurements K n was given by f n (x) = k∈Kn α k (f )e ikx .It amounts to simply dropping the contributions from all the unmeasured Fourier coefficients (α k (f ) for k ∈ K n ).Actually, we can make a better guess of f by making use of the MAP estimate (5) to infer unmeasured coefficients, which results in the estimate This yields the discrepancy where the right-hand side has been modified from ( 3).An ideal choice for k n+1 would be the k for which α k (f ) − α k f n MAP is largest, or in other words, the k for which the MAP estimate of α k is most inaccurate.However, such selection of k n+1 is not feasible when α k (f ) for k ∈ K n are unknown.To bypass this difficulty we return to method 2 above.Namely, we create a catalogue of periodic functions and their Fourier coefficients, and pick out a function g that best matches the measured coefficients, as in (8).The next target of the measurement is decided following This method, combining the MAP estimate and the empirical database method, can be adapted to a SANS experiment very effectively, as described later in section 4.2.

Background and definitions
In this section we provide a minimal overview of a SANS experiment and related data analysis steps, referring the reader to [12,13] for further details.SANS is an experimental technique to investigate the structures of various substances at a scale of about 1-100 nm.The setup of a typical SANS experiment is depicted in Figure 1.A beam of neutrons is directed at a sample, and neutrons scattered at small angles are captured at a detector.The obtained signal is called the neutron scattering intensity and is denoted by I(q), where q is the magnitude of the scattering vector.It is related to the scattering angle θ as q = 4π λ sin(θ/2), with λ the wavelength of the neutrons.I(q) is proportional to the absolute square of a form factor reflecting the geometry of the scatterers in the sample.If a scatterer is a homogeneous sphere of radius r, the form factor is given by [13] F (q, r) = sin(qr) − qr cos(qr) (qr If the ensemble of scatterers consists of spheres of various sizes following a probability distribution p(r), then we have where the overall multiplicative factor on the right hand side has been set to unity for simplicity of exposition (see [13] for full details).After performing an experiment, we acquire the SANS data {I(q n )} N n=1 .The purpose of the experiment is to estimate the distribution p(r) from this data.Unfortunately, this is an ill-posed inverse problem, for it is impossible to uniquely specify a continuous function from a finite number of data points.A traditional approach to obtain a reasonable p(r) is the indirect Fourier transform (IFT) [15,16,17,18].In the IFT approach, p(r) is expanded by a set of basis functions as This expansion is plugged into ( 14) to obtain the scattering intensity I(q).The coefficients {a k } are then fixed in such a way that I(q) closely approximates the observed data: Here, Ω(a) is a penalty term controlling the smoothness of the solution, and λ is a coefficient for tuning the relative importance of the penalty.We note the parallel between ( 5) and ( 16).The obtained {a k } are plugged into (15) to give the estimated size distribution p N (r) based on the N observed data points.As N grows, p N (r) is anticipated to converge to the true distribution p(r).To monitor the convergence, we measure the discrepancy of the two functions by the L 1 distance and the Kullback-Leibler divergence These are the analogs of (3) in the toy problem.The goal of this work is to figure out how to find a sequence of measurements {q 1 , q 2 , • • • , q N } that is optimal in the sense that the discrepancies ( 17) and (18) decrease as fast as possible.In the next section we propose two methods that adaptively suggest the next measurement q n+1 according to the previous measurement results {I(q 1 ), • • • , I(q n )}.Throughout this work, for simplicity, we neglect the noise associated with measurements.In practice the noise can be suppressed by extending the measurement duration to reduce the statistical fluctuation of neutron counts at the detector.

Method 1: Measurement Protocol Retrieval Based on Real-Time Similarity Search
This method is a special kind of case-based planning [19].The main idea of casebased planning is to reuse past successful plans in order to solve new planning problems [19].We adapt this idea to the problem of SANS experiments as follows: we generate many virtual materials and create an optimal measurement plan for each of them via simulation.These plans are saved in a database, together with the profiles of respective materials.In a real SANS experiment, we match the current situation with those in the database and select the plan that best matches the current situation.The next measurement is carried out according to this plan.This procedure is repeated after every measurement until the experiment is terminated.Notably, this method requires preparation of a sufficiently large database before an actual experiment begins.How large it should be depends on the diversity of materials on which SANS experiments are performed.
Let us describe the details.This method starts by stochastically creating many virtual sample materials with a variety of size distributions {p k (r)} K k=1 , where K denotes the number of virtual samples.Let N denote the maximum number of measurements per sample.For each sample, an "optimal" measurement plan Q = {q 1 , • • • , q N } is generated (we shortly describe how to do this), and the scattering intensities {I(q 1 ), • • • , I(q N )} are computed via (14).Next, we create a database where the pair of the scattering intensity and the best plan is stored for every sample.This completes the first step of Method 1.
An optimal plan Q k for a sample k can be generated incrementally as depicted in Figure 2. Let 1 ≤ n ≤ N −1.Given q 1 , • • • , q n , we randomly create many q as candidates for q n+1 .‡ For each candidate q n+1 , we compute p n+1 via the IFT [recall ( 15) and ( 16)] and estimate the discrepancy D(p k , p n+1 ).We then choose the q giving the smallest value of D(p k , p n+1 ) as q n+1 .This process is iteratively repeated for When we have a new sample and want to conduct new measurements on it, the "best" plans stored in D cannot be used immediately, because the plan Q k for a specific sample k is not necessarily suitable for a new sample.The second step of Method 1 fills this gap.Suppose that the data {I(q 1 ), • • • , I(q n )} is obtained from measurements on a new sample.We then conduct a similarity search on D to find M samples whose scattering intensities most resemble the observed data.This allows us to retrieve the where δ is a small positive constant.This means that all qi that are too close to the already measured q are left out to avoid nearly duplicate measurements.Finally, we select the qi ∈ Q with the smallest index i as the next measurement point, q n+1 .This process is iterated until N measurements (q 1 , • • • , q N ) have been performed.The set of M samples is updated after every new measurement.This completes the second step of Method 1. Figure 3 schematically illustrates the overall procedure.
It is intuitively rather clear that {Q 1 , • • • , Q M } should serve as good plans for the new sample, as the observed data indicates that the new sample is similar to those M samples in D.More nontrivial is the fact that letting M > 1 helps to avoid overfitting.This is analogous to the situation in the multi-armed bandit problem [20], which requires balancing exploration and exploitation.Setting M = 1 is akin to pure exploitation, whereas M > 1 allows for exploration.Empirically, we found that M = 3 was most effective, and increasing M further did not bring improvement.‡ We have generated a candidate q n+1 randomly from a log-uniform distribution over a range [q min , q max ].Hence the N • K values of q n that appear in D are likely all distinct.The precise values of q min and q max used in our numerical experiment will be specified in section 5.1.In Method 1 it is essential that the similarity search over D works accurately.This hinges on how the similarity of two scattering data, I 1 (q) and I 2 (q), is defined.A naive definition such as i |I 1 (q i ) − I 2 (q i )| fails severely, because the scattering intensity grows exponentially toward small q, and thus, contributions from the smallest q easily dominate the above sum.We found it most useful to fix an arbitrary reference intensity I 0 (q) and then measure the similarity of I 1 and I 2 by the normalized sum

Experimental device
Note that the performance of Method 1 can be bolstered by making the number of virtual samples K as large as possible, because a new sample would have a higher chance of finding a very similar counterpart within the database.The workload of determining the best plan for all these samples, however, would significantly increase the computational cost.Therefore, K should be carefully decided by considering the available computational resources and time.

Method 2: Surmise of Future Measurements Through Adaptive Database Search
This method is based on a comparison of two independent guesses for future measurement outcomes and is conceptually very similar to the approach discussed at the end of section 2. Let Q all denote the set of all values of q that can be measured.
§ As in Method 1, we again start by creating a database, but it is structurally much simpler than that of (19): it only stores the scattering intensity of K samples, without measurement plans, as § At this stage the continuous variable q has to be discretized.In our numerical experiment in section 5, we first fixed the allowed range of q to [10 −2.5 , 10 0.5 ] and then made a log-uniform grid on it; namely During an experiment on a new sample, we proceed as follows.Suppose that we obtained data I = {I(q) | q ∈ Q obs } as a result of prior measurements.Q obs (with |Q obs | = n) denotes the set of q that have been measured.Then, the set of scattering intensities that are currently unknown and will be obtained in future measurements is given by The core idea of Method 2 is to decide q n+1 by inferring I in two independent ways.
(A) The first approach infers I in a manner analogous to k-nearest-neighbor regression.Specifically, we draw a comparison between D and I to determine which I k is most similar to the data I. Suppose that I a , I b , I c are the samples in D that most resemble I.Then, we can obtain a guess for I by simply taking their average as While we take the average of three samples here, we could vary the number of samples for flexible extraction from D .It is also possible to use a more sophisticated machine-learning method in place of a simple mean.
(B) The second approach, which does not use the database D , proceeds as follows.We first apply the IFT to the data I and estimate the size distribution function p(r).
It is then straightforward to guess I(q) at an arbitrary q by plugging p(r) into ( 14).This enables easy estimation of I .
The reader might ask why we do not apply simple interpolation techniques to I to estimate I .This is an essential question.The key point is that the relation ( 14) imposes quite strong constraints on the allowed form of I(q).Blindly applying techniques such as cubic splines or Gaussian process (GP) regression to I turns out to yield an I(q) showing scattering intensity with quite unrealistic behavior.To make a sensible guess at I , it is mandatory to appropriately incorporate such constraints on I(q).The two methods detailed above address this requirement properly.Now, assume that we have obtained two guesses for I as I (1) and I (2) .Then, we choose the next measurement as where I 0 is a reference scattering intensity that is set before starting the measurements and held fixed throughout the experiment.After measuring I(q n+1 ), we update Q obs and redo the process of deriving I (1) and I (2) .This is iterated until N measurements have been performed.Figure 4 schematically summarizes Method 2. (See also Figure 8 in section 5.2 for a supplementary illustration of Method 2.) Because the validity of Method 2 is less obvious as compared to Method 1, we say a few words about its validity here.Step (B) above obtains a p(r) consistent with the observed data I.In principle, however, there will also be some other distribution functions p α (r), p β (r), • • • that are equally consistent with I.This occurs because the data I is insufficient to uniquely fix the underlying size distribution.What, then, is the best way to discriminate among p α (r), p β (r), • • • and p(r)?As the distributions themselves are not observable, we have to compare their scattering intensities.In practice, it is difficult if not impossible to construct p α (r), p β (r), • • • out of I, so we instead prepare a database of diverse scattering intensities in advance and search for those that resemble I.This is the strategy of Method 2. In evaluating the similarity, we again apply the technique of using normalized intensities rather than raw intensities, as in Method 1 (see ( 20)).

Experimental Settings
We tested the effectiveness of Methods 1 and 2 through numerical simulation of SANS experiments on 100 virtual sample materials.We assumed that all size distributions were supported on the range r ∈ [0, 50] and generated 100 random distributions by the formula Here, N is a normalization factor ensuring that We set the range of q to [10 −2.5 , 10 0.5 ], so that all measurements occur within this range.The maximal number of measurements N was fixed at 50.We set K = 10 2 for Method 1 and K = 10 4 for Method 2. We found that K > 10 2 was computationally too expensive for our available resources, whereas increasing K further was feasible but did not bring any performance improvement.
As a benchmarking test, we compared Methods 1 and 2 with the following three measurement planning methods.
(ii) Sampling based on a Gaussian process (GP).First, we generate 500 random p(r) according to (25) and compute their respective scattering intensities via (14).The resulting dataset, is then used to train a GP regression algorithm with an anisotropic Gaussian kernel (we use the scikit-learn library for Python [21]).After training, the algorithm learns the mapping {I k (q j )} j → {p k (r i )} i (see Appendix A for details) and yields the kernel k(x, y) = exp(− j |x j − y j | 2 / 2 j ), whose parameters are adjusted through automatic relevance determination [22].We set ∀ j = 1 for their initial values.Recalling that the inverse radius 1/ j can be interpreted as the importance of I(q j ) for predicting the size distribution, we align the q j in order of increasing j and perform measurements in this sequence (i.e., the q j with the smallest j is measured first, and the q j with the largest j is measured last).As important q are given higher priority, this strategy is expected to rapidly decrease the discrepancy In the greedy search stage of Method 1 (see Figure 2), 100 different q were randomly generated as a candidate of q n+1 for each n.This was repeated for a total of 50 steps until the end of measurement for a given sample.Repeating this procedure for K = 100 samples amounts to performing the IFT for 100 × 50 × 100 = 5 × 10 5 times in total.Since a single IFT calculation took about 3 seconds on our CPU (Intel Xeon E5-2650 v3 @ 2.30GHz), the total time required was roughly 400 hours.By parallelizing the calculation on 20 cores we could reduce the time to 20 hours, which was still quite demanding.
of p(r), even though the order of measurements is entirely fixed and the same for all samples.
(iii) Sampling based on maximal variance (MV).This method partly resembles Method 2. First, we prepare a database D through simulation.After every single measurement during an experiment, we obtain the measured data I and run a similarity search over D to select the K scattering intensities that most resemble I, where K is a predefined number.The diversity of these intensities represents the degree of remaining uncertainty under the constraint from I. For the next measurement, we choose the q at which the variance of the K scattering intensities is greatest, namely, where I 0 is a reference intensity.By this strategy we can efficiently reduce the uncertainty of the scattering intensity.Because we tested K = 3, 6, 12, 24 and found that K = 12 performed the best, we use K = 12 here.
During a numerical experiment on a virtual sample, we monitor the performance of the five methods as follows.Let 1 ≤ n ≤ 50.When the measurement data {I(q j )} n j=1 is garnered with any of the five methods, we apply the IFT and obtain the estimated size distribution p(r).We then use both (17) and (18) to calculate the discrepancy between the estimate and the true distribution and record it.These steps are repeated after every measurement, until n = 50 is reached.We assume that all methods conduct the first two measurements at q = 10 −2.5 and q = 10 0.5 , i.e., at both ends of the allowed range of q, meaning that the discrepancy at n = 2 is exactly the same for all methods.We repeat the entire experimental process for 100 virtual samples and average their performance.
Note that the IFT setup is common to all five methods to enable comparison of their discrepancies on equal footing.Specifically, for the expansion in (15), we used 80 base functions defined by and the coefficient λ = 10 −3 .We made the latter small to avoid bias due to overly strong regularization.

Results
We now discuss the results of the benchmarking test.Figure 6 shows the decrease in the size distribution discrepancy during an experiment, averaged over 100 virtual samples.(Note that the vertical axis of Figure 6 is on a log scale methods.By contrast, although the GP and MV methods exhibited a rapid initial decrease in the discrepancy, they soon reached a plateau and stagnated.Figure 7 and Table 1 give results for another metric: the number of measurements required for each method to achieve the same discrepancy as random sampling with 40 measurements.Once again Method 2 outperformed the rest, showing roughly 60 ∼ 65% reduction as compared to random sampling, while Method 1 had roughly 50% reduction.These results emphasize that adaptive sampling can solve the measurement optimization problem far more efficiently than non-adaptive sampling can.Finally, note that the performance of Method 1 could be improved further by increasing the value of K, although this would entail a higher computational cost. Why does Method 2 perform better than Method 1 and all other methods?The reason is probably because Method 2 tries to correct the current estimate and push it towards the ground truth far more directly than all the other methods do.For illustration, we display the gist of Method 2 in Figure 8.We start off with measurements of the scattering intensity, collect data and then apply the IFT (cf.section 3) to infer the size distribution p ? (r).Ideally the next measurement should be designed so as to maximally decrease the discrepancy between the true distribution p true (r) and our estimate p ? (r), but the discrepancy cannot be calculated without knowing p true .So we next turn our focus to comparing scattering intensities.It is straightforward to convert p ? (r) to the scattering intensity I ?(q) via ( 14).However, we again stumble on the difficulty that I ?(q) and the true intensity I true (q) cannot be directly compared since the latter is known only after sufficiently many measurements have been performed.Thus we construct a surrogate of I true (q) by utilizing a database of intensities, which is denoted as I(q) in Figure 8 (recall ( 23)).The next measurement is designed so as to maximally decrease the discrepancy between I ?(q) and I(q).One can envisage that it would naturally lead to large reduction of discrepancy between p ? (r) and p true (r) as well.The fact that Method 2 empirically performs best underscores the effectiveness of this surrogate-building idea.The success of Method 2 hinges on the close proximity of I(q) to I true (q), which was warranted through two ingredients.First, the database of size K = 10 4 was large enough for this method to work.Second, the similarity of intensities was measured through the normalized distance as in (20), which proved far more effective than just comparing raw intensities.We think these were keys to the success of Method 2.
In Figure 9 we show the process of data sampling with Method 2 for one sample material.It is observed that the accuracy of the IFT prediction for the size distribution improves rapidly as the number of measured points increases.
As seen above, both Method 1 and 2 make the measurement process more efficient than random sampling, but one may ask how much time was saved overall if one took into account both the time needed to prepare the databases D and D , and the time for similarity search during the adaptive sampling process.As already remarked in the footnote in section 5.1, the preparation of D can take O(10) hours, which is indeed quite huge time investment.However it should be underlined that, once D is prepared, one can repeatedly make use of it for measurements of various sample materials for arbitrarily many times; it will eventually pay off if D was used to expedite sufficiently many experiments.By contrast the preparation of D is computationally much less expensive; it took us less than 1 hour to prepare D of size K = 10 4 , so it is not worrisome.On the other hand, the time for similarity search during sampling is essentially negligible compared to the time for preparation of the databases.In our numerical experiment, it only took a few seconds to finish a search per measurement.(Method 2 needs slightly more time than Method 1 due to the IFT calculation.)Of course this may change in other situations, where for some reason a huge database of size 10 4 is needed; then the time for searching may not be negligible and a separate consideration is required.

Conclusions
To design a new useful material generally requires a repetition of laborious experiments to accurately measure materials properties, and there is high demand for developing tools to minimize the time, cost, and effort involved in sequential high-precision experiments.In this work, we have proposed a new approach to implementing an adaptive policy for multi-step decision making, taking a small-angle neutron scattering (SANS) experiment in materials science as a proving ground.Through numerical experiments we demonstrated that the two methods proposed in this paper can speed up a SANS experiment by a factor of 2-3 as compared to random sampling without prior planning.We expect that our methods can be used to speed up a small-angle Xray scattering (SAXS) experiment as well.Extending our scheme to SANS experiments for non-spherical scatterers is an important future direction of research.Future work will also include addressing general sequential optimization problems beyond SANS

Figure 2 .
Figure 2. Greedy optimization of the measurement plan.

500
dr p(r) = 1, α 1,•••,7 are random variables taken from a uniform distribution over [−1, 1], and β 1,2 are random variables taken from a uniform distribution over [0, 2].By definition, p(r) as generated above is positive definite and vanishes at r = 50.Figure 5 shows the diversity of 10 examples of p(r) and their normalized scattering intensities.

/Figure 5 .
Figure 5.Ten examples of randomly generated size distributions (left) and their scattering intensities normalized by a reference intensity (right).

Figure 7 .Figure 8 .
Figure 7. Average number of measurements required for each method to reach the same discrepancy as that of random sampling with 40 measurements.The discrepancy was measured by (a) L 1 distance and (b) Kullback-Leibler divergence.Each error bar represents one standard deviation.The scores are given in Table1.

Table 1 .
). Method 2 clearly performed the best.Method 1 was slightly inferior to Method 2 but still outperformed the comparison Figure 6.Discrepancy as measured by (a) L 1 distance and (b) Kullback-Leibler divergence for the five methods, averaged over 100 virtual samples."GP" and "MV" indicate the methods based on the Gaussian process and maximal variance, respectively.Each color band represents one standard deviation.Average number of measurements required for each method to reach the same discrepancy as that of random sampling with 40 measurements.The discrepancy is measured by either L 1 distance or KL divergence.The errors represent one standard deviation.The results in bold are the lowest values.