{'fraction_non_alphanumeric': 0.028208363374188895, 'fraction_numerical': 0.009102379235760634, 'mean_word_length': 4.814252030390359, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Neural networks for a quick access to a digital twin of scanning physical properties measurements

For performing successful measurements within limited experimental time, efficient use of preliminary data plays a crucial role. This work shows that a simple feedforward type neural networks approach for learning preliminary experimental data can provide quick access to simulate the experiment within the learned range. The approach is especially beneficial for physical properties measurements with scanning on multiple axes, where derivative or integration of data are required to obtain the objective quantity. Due to its simplicity, the learning process is fast enough for the users to perform learning and simulation on-the-fly by using a combination of open-source optimization techniques and deep-learning libraries. Here such a tool for augmenting the experimental data is proposed, aiming to help researchers to decide the most suitable experimental conditions before performing costly experiments in real. Furthermore, this tool can also be used from the perspective of taking advantage of reutilizing and repurposing previously published data, accelerating data-driven exploration of functional materials.

the experiment itself but also its preparation can be time-consuming as sometimes one has to start from optimization of the sample synthesis process, a typical aspect for physics and materials science measurements.
Such a costly-in-real situation is even more serious in industrial fields, where a large amount of money has to be spent for the production of "real" items. To overcome this issue, there an idea called "digital twin" was produced, where one builds a simulation model that takes account of the data in real space and tries to optimize the parameters in the cyber space before real synthesis [7]. For being beneficial, the model has to correspond enough to the objective, and the cost for the simulation both in money and time has to be lower than the actual production. Here again, the application of machine-learning methods has greatly reduced the duration required for the execution of simulation as compared to that for performing conventional simulation algorithms. Recently, the use cases of such a digital-twin approach aided by machine learning are becoming popular also in academic research. For instance, machine-learning was used for approximating time-consuming simulation results for fluid dynamics, allowing researchers to perform a quick optimization of the growing condition of objective crystals [8].
In this context, such a digital-twin approach is expected to be effective and highly useful also for physics and materials science measurements, where the objective properties are sometimes deduced from experimental data by applying mathematical operations such as derivatives or integration. Especially in physics, the development of new approaches or ideas to data analysis, creates an opportunity to revisit or reanalyze previously published data, allowing researchers to draw new insights from this previous knowledge. However, it is quite often that the data are non-evenly spaced along multiple axes due to experimental confinements, and it may contain non-linear responses that cannot be interpolated easily. In such a case, it is quite difficult to estimate the target quantity from preliminary data. On the other hand, artificial neural networks are known to have high flexibility and adaptivity in principle [9,10]. It has been also discussed [11] that neural networks learning can be as efficient as other approximation methods from a viewpoint of minimizing loss using the number of parameters as low as possible. They have proved to be even useful when the objective has inhomogeneity in smoothness [12], or when the objective has several discontinuities [13].
Thus, approximation using this method is expected to be suitable for materials science and physics experimental data that tend to contain discrete change due to first-order transition and/or multiple peak structures.
In this article, we show that learning preliminary data of materials science by neural networks provides us a way to quickly build a model that can describe the target property dependencies on scanning axes (treated as features). In order to ensure the accuracy of the model that can be built on-the-fly during the experiment, several open python libraries have been used in combination, as well as several tools for efficient learning. Once the model is built, the simulation within the learned feature range can be done instantly, which enables researchers to evaluate the experimental plan as well as its cost (Figure 1(a)). We propose that such an approach of data augmentation helps researchers to use preliminaryor deposited data effectively for performing the data-driven search of functional materials.   [14], shown in Figure 1(b). As a machinelearning body, we built fully-connected feedforward neural networks, using Keras with Tensorflow backend (v.2.x) [15,16]. Keras has several optimizers by default, and among them, we tried stochastic gradient descent, Nesterov accelerated gradient [17], root mean square propagation [18], and adaptive moment estimation (Adam) [19] for several times to our data shown in Section 3. For our data, Adam tended to be the most stable and fast for minimizing loss of mean squared error between predicted values and training data (not shown). We set the number of layers, nodes, learning rate, and batch size as hyperparameters to be optimized. Once those hyperparameters are suggested, random weights and biases are given as initial values in Keras and they are tuned by the optimizer as the epoch proceeds in a single training run. Thus the learned result in a single run varies by the initial random values, even though there could be a general trend for obtaining a moderate set of hyperparameters for example the case in learning rate and batch size [20][21][22]. To be quick, we confined the search space of the hyperparameters in the following range: 2 ≤ number of layers ≤ 10, 50 ≤ number of nodes ≤ 200, 1e −5 ≤ learning rate ≤ 1e −4 , and 16 ≤ batch size ≤ 1024 varying on the data size. To obtain the best possible learned result in a fixed time, we used the Bayesian optimization package Optuna [23]. By combining a relational database provided by MySQL [24], Optuna receives each training result with a set of hyperparameters running in parallel, so that it can determine a set of hyperparameters for the next run based on Tree Parzen Estimator [25]. Typically, the best set of hyperparameters is found by at most ∼30 runs. After many trials, we found that overfitting is welcome for our purpose to learn the detail of the real experimental data (including noise level and characteristics of experimental machines), and that cross-validation simply increases the required time for training. Thus we used the whole data for training. For visualization of data and controlling multiple Optuna runs in parallel, we used the Streamlit library [26] to construct a graphical user interface (GUI) that works on the web browser.
To obtain the best model during the hyperparameter search, we used three functions equipped in the above libraries. First, is early stopping implemented in Keras, with the option of saving the best model in the run, where the maximum epoch number is 500. The second is the learning rate scheduler implemented in Keras, where we change the learning rate to be 10 times smaller value from its initial value after 100 epochs. The third is pruning with the Asynchronous Successive Halving algorithm [27] implemented in Optuna, where it examines if each run shall be pruned based on the comparison of current score with those of running parallel by 25 n epochs where n is an integer greater than or equal to zero.
The approach used here might be primitive as compared to recent state-of-the-art combinations of neural networks architectures, optimizers, and other techniques, but we tried to keep the system simple, fast, and easy to use as much as possible, considering that the target users are not specialist of data science but materials scientists like us. As a result, we could quickly finish learning small datasets typical for physical property measurements (number of data ∼ a few thousand) shown in the next section, even without using graphics processing units (GPUs). More detail on case studies for the duration and used computers are in Supporting Information. A tutorial for how to get ready and perform the neural networks learning and simulation shown in this paper will be available at https://www.github.com/kensei-te/mat interp.

III. RESULTS AND DISCUSSION
In this section, we show 4 typical use cases as an example. The first is the magnetization curve of a well-known magnetocaloric material ErCo 2 , where 1 st order transition occurs that accompanies a steep change in the magnetization as a function of temperature and the transition temperature migrates by application of an external magnetic field. The second example is the magnetization curve and estimation of magnetocaloric effect in another magnet Fe 3 Ga 4 that shows 1 st order transition but its transition temperature changes more drastically by applied field than in the first example of ErCo 2 . The third example is the resistance data of the PdH superconductor which is relatively noisy as compared to above examples. The fourth example is a mapping data of angle-resolved photoelectron spectroscopy (ARPES) intensity on Fermi energy of La(O,F)BiS 2 superconductor taken above superconducting temperature (T c ) as a demonstration of the application of the method for two-dimensional intensity map, consisting of a number of peak structures.

A. M (T, H) of ErCo 2 magnet and estimation of its magnetocaloric effect
First, we show a case for physical property data that have 1 st order transition, namely a steep change in the observed value. ErCo 2 is known to be a ferrimagnet with its ordering temperature T Curie of ∼ 35 K [28]. It exhibits a 1 st order magnetic transition accompanied by magnetostriction, and the material is one of the most popular materials for magnetic refrigeration [29][30][31]. To evaluate the magnitude of magnetic entropy change |∆S M |, one of the most common ways [30] is to measure the magnetization of the sample as a function of temperature and applied magnetic field change ∆H(from 0 to H) either isothermal or isofield, and deduce |∆S M | by applying following Maxwell's equation for the observed magnetization data: The equation includes an integration along the applied field (H). Practically, with such discrete experimental data, trapezoidal integration can be applied for a numerical integration, which corresponds to a linear interpolation along the H-axis. However, if we estimate |∆S M | in this manner from the experimental data shown in Figure 2 To avoid this extrinsic effect for estimation of the target property, one has to use a finer magnetic field step, so that linear interpolation starts to work well since ∂M/∂T | H between two steps has a finite overlap each other. This means one has to know the proper measurement step before the measurement itself. In such a case, neural networks simulation based on preliminary data works efficiently as it can perform a non-linear interpolation. Here we show the case of another magnet Fe 3 Ga 4 and evaluation of its magnetocaloric property, to show the possibility of applying neural networks study for analyzing literature data. The magnetic property and magnetization as a function of temperature and magnetic field have been reported [32], while |∆S M | of this material has not been reported yet. Figure   3(a) shows our preliminary experimental data that corresponds well to the literature data [32], but both of them do not have fine enough experimental steps to evaluate |∆S M | of this material. As shown in Figure 3 Next, we show the case for data with a lower signal-to-noise ratio. For this purpose, we used a part of our resistance data of PdH [33] as train data (Figure 4(a)). As can be seen in Figure 4(b), the model does not necessarily capture the ultrafine structure coming from noise, however it grabs not only the overall tendency of the lineshape but also several fine structures that might be influenced by noise. The inability of tracking the full noise is because of the fact that the number of layers and nodes in the model is limited and lower than the number of total train data points. Indeed, neural networks are sometimes used for denoising purposes [34,35]. On the other hand, our intention here is to simulate the experiment as it is, including the extrinsic effect such as noise and unique characteristics of the measurement apparatus, based on the non-evenly spaced preliminary data. Comparing the experimental data in Figure 4(c) with simulated data in Figure 4(d), it can be said that the model in the current approach can tell us how the expected lineshapes can be affected by the noise level appeared in the train data, with a finite inevitable denoising effect. As a last example, we show that our quick and simple approach is also applicable to twodimensional intensity map, namely, ARPES intensity map at Fermi energy in La(O,F)BiS 2 superconductor on normal state (above T c ). ARPES intensity at fixed energy tends to be high in angular area where corresponding electronic state exists, thus the data consists of a number of peak structures (see Supporting Information for lineshape of each cut). In Figure   5, the ARPES intensity is shown as a function of two-dimentional angles with respect to the normal angle to the sample surface, that corresponds to two-dimentional wave vectors in reciprocal space [36]. For constructing such a mapping data, it is quite often that one measurement is performed with fixing one of the axis (for instance θ 2 in the figure) and keep concatenating data with different angle of θ 2 . Therefore a preliminary measurement with coarse angle step of θ 2 ( Figure 5(a)) can be performed before a serious measurement with fine angular steps and better statistics ( Figure 5(c)), so that one can determine the objective measurement area of angles. With help of neural networks learning, we can simulate how data would become with specific measurement area and steps as in Figure 5(d), thus the simulation helps researchers to make a decision for planning the experiment. Here we note that the simulated pattern captures characteristics of the measurement apparatus, namely high sensitivity at edge and detection limit in certain angle, so it is suitable for estimating the effect of such instrumental conditions as well. However, the simulated pattern is affected by the presence of sizable noise, hence the pre-processing of train data with other noise reduction method might help further though such process may take longer time. Alternatively, it is also possible to take an avarage of predictions by several models found during learning process. We also note that although our simple approach is applicable on-the-fly to such a mapping data including non-evenly spaced ones, other sophisticated methods such as super resolution convolutional neural networks-based approach [37][38][39] would perform certainly better especially for evenly spaced data such as photographs if one can spare enough time for training and has an access to powerful GPUs.

E. Scope and limitation of current approach
Here we note the applicability/inability of our approach. The code is available at https://www.github.com/kensei-te/mat interp including how to get ready to use GUI, which runs in Linux and Mac OS (see Supporting Information for details). It can learn quickly the data so that one can perform the simulation during the experiment, especially when the total number of data points kept up to a few tens of thousands. For this reason, it is preferred to keep the dimension of data (i.e. number of feature columns) low, even though it can deal with multidimensional data. The approach would be useful mainly for two Aligning and augmentation of repository data: there is an increasing number of accessible materials data sets, that have been published in the past. It is quite often that one encounters such problems that despite the material being of interest, there is a mismatch or lack in the experimental conditions as compared to what is required in order to perform additional analysis. As the current method can adapt readily to non-evenly spaced data with a non-linear response, it will help researchers to judge whether the material is worthy to be examined further by reusing this data for the simulation method proposed here, to spare a certain amount of experimental cost as shown in Section 3.2.
On the other hand, the method is ultimately a mere interpolation, thus the signal that is skipped in the train data with too coarse step will never be predicted in the simulation.
For the same reason, though the simulation helps researchers to plan the experiment, the simulated results and estimated values of physical properties themselves should be clearly distinguished from experimental data and be taken with care since it is not certain what will come out in reality until verified by experiment. Also, the prediction by learned models includes how the data will be affected by unique characteristics of experimental apparatus (sensitivity, detection limit, and so on) and noise, as has been shown in Section 3.3 and 3.4. The effect of noise could be examined by comparing several simulated results in different runs (see Supporting Information for details). If the researcher aims to suppress the effect of noise rather than simulating it, other noise reduction methods may work better.

IV. CONCLUSION
In this work, we present a simple and quick method to simulate experimental data by learning preliminary data using fully-connected feedforward neural networks. The approach is shown to be suitable for materials science experimental data with typical examples. Such a tool would help researchers to deal with preliminary-or past repository data efficiently, supporting decision-making during the experimental research. A tutorial on how to get ready and perform the neural networks learning and simulation shown in this paper will be available at https://www.github.com/kensei-te/mat interp.

A. Sample Synthesis and Preparation
ErCo 2 sample was obtained by arc-melting of Er and Co rocks in a vacuum chamber of Ar atomosphere, followed by a 21 hour annealing on 850 • C and quenching by water.
Fe 3 Ga 4 sample was obtained by arc-melting of Fe and Ga chunks. The synthesis procedure of PdH sample is provided in [33], while the synthesis procedure of La(O,F)BiS 2 sample is in [40].

Magnetization of samples has been measured using Magnetic Properties Measurement
System (Quantum Design), in field cooling process. Resistance of sample under 2.6 GPa has been measured by four probe method using diamond anvil cell with boron-doped diamond electrodes [33] and Physical Properties Measurement System (Quantum Design). ARPES measurements have been performed at BL28A [41] in

Supporting Information for
Neural networks for a quick access to a digital twin of scanning physical properties measurements Trapezoidal integration is a numerical method to often used to obtain the an approximation of the area of interest below the curve of a function f (x) and between the a given set of desired points a and b, assuming , that corresponds to a summation of linearly-interpolated values of f (x) between starting point a and end point b. Sometimes, for some datasets this linear interpolation method can fail. Figure SM1 shows a typical example of such a failure in linear interpolation. Suppose there are data for y(x 1 , x 2 ) taken in x 2 = a and b, where peak position of y migrates by changing x 2 value, as in Figure SM1(a). If one performs bilinear interpolation as in Figure SM1(b), it does not succeed to reproduce what is desired (as in Figure SM1 We also note here that the situation is also valid for isothermal cuts for M (T, H). In case of isothermal cuts, |∆S M | can be deduced by ∆S in case of using forward differential), which corresponds to the gray shaded area as depicted in Figure   SM2(a). As can be seen in Figure SM2(a) in case of coarse step of H, linear interpolation along H-direction (corresponds to dotted line in the Figure) creates an extrinsic oscillation of area between two subsequent measured temperatures. Figure SM2

OPERATING SYSTEM AND INSTALLATION GUIDE
The current proposed method have been tested only on Linux and MacOS (Intel) systems.
We currently do not support Windows systems, however it might be possible to run using virtual machines, altough not recommended. In more details, the following OSes were tested by the authors: Ubuntu LTS 20.04 and 18.04, CentOS 7, and MacOS 11 and 12 (both Intel).
A tutorial for how to get ready and perform the neural networks learning and simulation shown in this paper will be available at https://www.github.com/kensei-te/mat interp.

STABILITY OF LEARNED AND SIMULATED RESULTS
Here we show how much the learning curves and the resultant simulated value would differ among each 30 trials. Two examples are shown, one for the data presented in Section 3.1 in the main text ( Figure SM3), and another for the data presented in Section 3.3 ( Figure   SM4), where the latter is more influenced by noise. Here each trial is allowed to keep running until it reachs a maximum epoch number of 500, unless it is stopped by either pruning or earlystopping. After 30 trials of Bayesian optimization (initial 10 trials are random), both the R 2 score for training and simulated values show a convergence to some extent. and PdH (bottom) data. For each material, case#1 corresponds to the data in the main text.
Left: Learning curves. Colors represent different trials. Center: Simulation by learned models that acquired the best R 2 score in each case. Gray lines show train data. Right: Simulation by models. of main text. Gray lines correspond to train data, while colored lines correspond to simulated ones by learned model.