Perspectives for analyzing non-linear photo ionization spectra with deep neural networks trained with synthetic Hamilton matrices

We have constructed deep neural networks, which can map fluctuating photo-electron spectra obtained from noisy pulses to spectra from noise-free pulses. The network is trained on spectra from noisy pulses in combination with random Hamilton matrices, representing systems which could exist but do not necessarily exist. In [Giri et al., Phys. Rev. Lett. 124,113201 (2020)] we performed a purification of fluctuating spectra, that is mapping them to those from Fourier-limited Gaussian pulses. Here, we investigate the performance of such neural-network-based maps for predicting spectra of double pulses, pulses with a chirp and even partially-coherent pulses pulses from fluctuating spectra generated by noisy pulses. Secondly, we demonstrate that along with a purification of a fluctuating double-pulse spectrum, one can estimate the time-delay of the underlying double pulse, an attractive feature for single-shot spectra from SASE FELs. We demonstrate our approach with resonant two-photon ionization, a non-linear process, sensitive to details of the laser pulse.


I. INTRODUCTION
Machine learning (ML) has recently been applied not only in physics [1][2][3], but more specifically also in strongfield physics [4][5][6]. One of the most abundant topic has been the reconstruction of the temporal shape of an ultrashort laser pulse, aided by ML techniques [7][8][9]. The most popular technique for this reconstruction have been different variants of streaking techniques which require normally considerable additional experimental effort, namely a Terahertz laser light source. With its help one can generate a large amount of data -the streaking traces -which can be processed with ML to extract the attosecond pulse shape [7,8]. However, also a direct method from single-shot spectra has been introduced [9].
In a different vein, a trained neural network has been proposed to represent a (semi-)classical path integral for strong-field physics [10], replacing the need to explicitly calculate a large number of classical trajectories to eventually determine the photo-ionization cross section, which is, however, still an approximation as it is constructed semi-classically. To supply training data for a network which can represent the full quantum path integral implies most likely a numerical effort that would be higher than calculating observables directly.
In general, training of a deep neural network needs a very large amount of non-trivial training data. To generate them experimentally requires substantial additional effort (see the streaking example above). To obtain such data without serious approximations within theory is often prohibitively expensive as in the second example.
Acknowledging this situation, we have invented another approach: To calculate exactly and explicitly (with the time-dependent Schrödinger equation) photoelectron spectra with a large number of pulses and artificial systems, for which the calculation can be done very quickly. In this way we are able to supply learning data consisting of about 10 7 spectra. A network, trained with these synthetic systems, is not only able to purify noisy test spectra, unknown to the network but from the same class of synthetic systems the training was performed with. Also "real" spectra can be purified, which could come from experiment, or for this work, from a realistic full calculation with parameters for the helium atom. Moreover, noise is in the context of machine learning applied to non-linear photo-ionization helpful: Photoexcitation and ionization processes are subject to strict angular-momentum selection rules, thereby limiting the coupling of light to matter. If a light pulse contains noise and operates in a non-linear (at least two-photon absorption) regime it will couple to a much larger part of the electron dynamics of the target. This helps to train the mapping better and enlarges the pool of training spectra naturally.
In general, all trained networks we will present map one type of spectrum into another (desired) one for a photo-ionization scenario of which only a few key elements need to be specified: The target system should have an excited state around the photon energy ω * above the ground state and intensities of the light pulse should be such that two-photon processes dominate. It is not necessary to know more about the target system as ideally all target systems accessible by the light as specified are covered by the learning space of the SHM. Therefore, one can apply a trained network also to an experimental spectrum from noisy pulses without detailed knowledge of the target system.
Once the design for training such networks with synthetic Hamilton matrices (SHMs) is set up, that is, the spectra for learning have been computed, it is not difficult to construct other maps with new networks, as the major effort is to supply the learning data which do not have to be changed, while training new networks is computationally relatively cheap. This allows us to provide several mappings in the following to predict spectra for ideal double, chirped and even highly structured partially coherent pulses from noisy spectra. Finally, we will introduce a network based mapping for a typical SASE FEL arXiv:2010.06016v1 [physics.atom-ph] 12 Oct 2020 situation: There, single-shot noisy spectra are recorded which depend on further, not explicitly known parameters, e.g., the geometrical orientation of the sample or the time-delay of double pulses used. Considering the latter situation, we reconstruct from noisy spectra simultaneously the noise-free spectra and the time-delay of the double pulse. While we cannot do this with the accuracy of the designated algorithms as described in the context of streaking above, we do not need any additional information but the spectrum itself.
The paper is organized as follows: In Sect. II we give details on the representation of the noisy pulses, explain how to construct the SHMs and describe our fast propagation scheme to solve the electronic Schrödinger equation to obtain the photo-ionization spectra. Section III details how the network is trained and set up, including measures how to quantify errors in the reconstruction of spectra and a convenient way to parameterize them. In Sect. IV we present the predictions of the photoionization spectra for various pulse forms. Section V discusses the single-shot FEL scenario. The paper ends with conclusions in Sect. VI.

II. PREREQUISITES
To determine the photo-ionization dynamics we need two elements, the noisy pulses and an efficient way to describe the electron dynamics. In the end we will specify the process we are interested in, namely two-photon absorption.

A. Pulses
We distinguish between the "noisy pulses" which lead to fluctuating spectra and the "reference pulses" for which we want to predict spectra.
There are many different possibilities how to incorporate noise into a signal. We choose the partial-coherence method [11,12]. With this method one can create noisy pulses whose average over an ensemble has a well-defined pulse shape. As experimentally demonstrated [12] these kind of pulses represent pulses from SASE FELs well. In the following, we will use the pulse parameterisation where F and F −1 are the Fourier transform and its inverse, and ω * is the carrier frequency. Noise is introduced through random spectral phases φ, uniformly distributed in the interval −π ≤ φ ≤ +π. The time scale of the fluctuations is given by the coherence time τ , while the Gaussian G T (t) limits the typical pulse duration to T . Otherwise, the pulse duration could grow beyond all limits due to the presence of random spectral phases.
A specific (deterministic) noise realization we will label with φ l (ω). If not stated otherwise, we use T = 3 fs and τ = 0.5 fs in the following. In order to deal with comparable pulses, we use the normalisation constant N to fix the pulse energy E p , which would otherwise fluctuate from realisation to realisation. Any reasonable pulse can serve as a reference pulse, for which the map created by the network can predict the spectrum. Reasonable means in the present context that the reference pulse's frequency spectrum is covered by the learning space of fluctuating spectra. The simplest choice is the Gaussian G T (t) in (1) itself rendering the prediction equivalent to removing the fluctuations from the spectrum. Therefore, we call this type of map "purification" [6]. In Sect. V we will purify fluctuating spectra from double pulses.
B. Paradigmatic 1-dimensional strong-field electron dynamics Although the subsequent scheme to construct SHMs is general, for the sake of clarity we will describe it for the processes we will consider as an example, namely two-photon absorption in a helium atom. Thereby, the carrier frequency ω * of the laser is chosen to be quasiresonant with the transition energy to the first optically allowed excited state.
A simple and convenient way to realize this concept is to consider 1-dimensional dynamics with a soft-core potential. The corresponding active one-electron Hamiltonian for helium is given by with the soft-core parameter a = 1/ √ 2 which gives a ground-state energy E 0 = −24.2 eV, close to the ionization potential of real helium (24.6 eV). We represent the Hamiltonian on a grid x j = j ∆x, with ∆x = 0.067 a.u. and x max = 500 a.u. and determine by diagonalization the eigenenergies H 0 |α = |α E α from the ground state up to E α ≤ E max ≈ 48 eV, resulting in 600 eigenstates.
With these eigenstates we calculate the matrix of the time-dependent Hamiltonian H(t) = H 0 + A(t)p in velocity gauge with the vector potential A(t) = A f (t), A being the field amplitude.

C. Synthetic Hamilton Matrices (SHMs)
Since we want to train our network such that it recognizes almost arbitrary systems, which only need to have a (quasi-)resonant transition energy for the first absorbed photon, we create SHMs by randomly changing energies E α and matrix elements V αβ about the 1-dimensional example system defined in Eqs. (2) and (3) through the variation of four parameters in Here, ξ i=1...4 = [−1, +1] are four uniform random numbers which lead to a large variety of artifical systems with different bound-state energies (4a) and couplings between ground and bound states (4b), as well as between bound and free states (4c) and among free states (4d), respectively. Finally, with the parameter γ the condition of resonant first-photon absorption can be met. In the present case the energy difference between ground and the excited state is equal to the central laser frequency ω * , i. e., E 1 − E 0 = ω * if γ = 0.891 and ξ 1 = 0. Note, that γ does normally not hamper the application to experimental situations, as one typically knows the binding energy and the central photon frequency. Finally, we construct SHM H αβ (t) inserting E α , and V αβ into Eq. 3. The idea of SHM is an essential part of our approach which serves two purposes: (i) it allows us to supply a sufficient number of theoretical learning data for the network and (ii) it represents a large variety of systems which could exist in nature but not necessarily do so. The SHM should be "dense enough" in the parameter space such that always the Hamilton matrix of a real system one is interested in can be interpolated between SHMs, as interpolation capability is a strength of neural networks (in contrast to extrapolation). Of course, one can formulate more sophisticated SHMs with more parameters, but for the present case the four random parameters are sufficient.
Yet, we need to overcome one final obstacle, and that is the calculation of the spectra based on the SHMs. To obtain those spectra for arbitrary pulse forms A(t) requires to solve the time-dependent Schrödinger equation (TDSE) which in turn implies that we need an extremely fast propagation scheme to be able to solve of the order of 10 7 TDSEs in a reasonable time.

D. Fast solution of the TDSE with SHMs
To achieve high propagation efficiency we make use of the fact that the Hamilton matrix (3) depends explicitly on time only through the vector potential A = A(t). Hence, instead of discretizing the time equidistantly, we discretize the vector potential With the time-independent Hamiltonian H j = H 0 + A jp we can construct a short-time propagator which is valid over a time span δt j short enough such that a fixed A j is a reasonable approximation. Therefore, the unitary short-time propagator can be obtained by direct integration, The full propagator U (t f , t i ) = k U j k , is now simply a concatenation of the short-time propagators over respective time spans δt k (with k = 1, . . . , k max ) over which the discretised A j hold, where To make efficient use of the SHMs, it is imperative that we use the matrix elements from (4) as they do not require explicit integration over wave functions. Hence, we diagonalise α|H j |β = E α δ αβ + j δA V αβ in the basis of H 0 to give its eigenenergies E j γ and eigenfunctions φ j γ = α W j γα φ α leading to the short-time propagator for fixed vector potential A j . Note, that over the entire pulse A(t) certain A j may occur more than once with different time intervals over which they are valid (if the local derivative dA(t)/dt| Aj is large, the time interval will be small and vice versa). Therefore it is worthwhile to compute the U j αβ beforehand and keep them stored. They can be used for all pulses (the fluctuating ones as well as the reference one) for a Hamilton matrix specified by the elements (4). Furthermore, we do not calculate the full matrix of the propagator which would involve many matrix products. It is sufficient to propagate the vector |0 of the initial state (the ground state of the system) which requires only the computation of matrix-vector products. Only in this way we were able to calculate millions of spectra, necessary to train the network.

III. TRAINING THE NETWORK
Through training with fluctuating spectra from the SHMs, the deep neural network encodes the dynamics of two-photon absorption spectra with the central photon frequency ω * for all target systems covered by the SHMs. If the network "sees" during training a specific class of spectra much more often than representatives of other classes, it will be biased towards those often found spectra once trained. Hence, we have to fill the learning space of spectra (available for training, validating and testing the network) as homogeneously as possible.
A. Generating spectra Synthetic Hamilton matrices which nearly satisfy the resonance condition, i. e., ξ 1 = 0 in Eq. (4), are particularly sensitive to the pulse shape and therefore generate more structured and diverse spectra through nonlinear processes, here resonant two-photon ionization, than SHMs with ξ 1 = 0. To sample the space of input spectra as homogeneously as possible, 50% of the spectra come from SHMs with ξ 1 ≈ 0 and the other 50% spectra are from SHMs with uniform ξ 1 , randomly selected in the range [−1, +1]. After training on these spectra the network is not biased for ξ 1 around zero but works equally well for all ξ 1 in the specified range.
We calculate n mat = 40, 000 reference spectra from the same number of SHMs. For each reference spectrum, we calculate n pul = 200 spectra ("fluctuating spectra") from noisy pulses obtained with the partial-coherence method [11] using a different noise realization for each SHM. Since solving the TDSE for a single spectrum takes only a few seconds thanks to the highly-optimized propagation scheme outlined in section II D, this procedure can be executed despite the need to solve about 10 7 TDSEs.
For each SHM, we average over all fluctuating spectra P k (E) = 1 n pul l P kl (E) instead of using the individual fluctuating spectra P kl (E) computed from H kl (t), where k labels the Hamilton matrix and l the noisy pulse. We normalize all averaged fluctuating and reference spectra, i. e., dE P (E) = 1.
The resulting set of 40, 000 averaged fluctuating spectra constitutes a major part of the learning space to train the networks in section 4 for the prediction of spectra from different pulse shapes.

B. Parameterization of spectra and cost functions
For efficient representation we parameterize each spectrum P k (E) in a basis of harmonic oscillator eigenfunctions {χ κ }, with the vector C ≡ {C 1 . . . C n bas } of coefficients. A basis size of n bas = 100 is required for the averaged fluctuating spectra, while for the noise-free spectra n bas = 60 is sufficient.
The network maps the coefficients of the fluctuating spectra to those of the predicted underlying noise-free spectrum, {C k } → {C k }. Goal of the training is to minimize the difference between the predicted vector C k for the noise-free spectrum and C ref k of the expected reference spectrum. The coefficients allow us to define a difference familiar from vector spaces as which we use for the cost function in the network training. As a measure for the difference of two (normalized) spectra i and j we define their "distance" and the average mutual distance within a set of n Ω spectra. With one can quantify the error in terms of the distance (8b) of the spectrum k from the reference spectrum k ref , where ε ≤ 2. The label Ω stands for the set of data the error is calculated for and can assume the values "train", "val", or "test" for training, validation or test data, respectively.

C. The training setup
The full set of learning data contains n mat = 40,000 pairs of spectra. Each pair consists of an averaged noisy spectrum with its respective reference spectrum for the same SHM. The full learning data set with n mat pairs is split into training (80 %), validation (10 %) and test (10 %) data, respectively. Training corresponds mathematically to minimizing the cost function (8a) with Ω = train. Figure 1 provides a sketch of what goes into training and prediction.
Implemented with the deep-learning library Keras [13], a fully connected feed-forward artificial neural network is used to establish the mapping. It contains 5 layers with 60 neurons on each and was trained at a learning rate of 0.001 with 100 epochs, a batch size of 200 and a learning patience of 25. Each hidden layer neuron contains ReLU activation function [14]. The Adam optimizer [15] is used to minimize the cost function (8a). The training success is quantified with the error functions (8a) and (8d), which both decay logarithmically with the size of the learning data, typical for deep learning [16,17].

IV. PREDICTION OF SPECTRA FOR DIFFERENT PULSE SHAPES
To assess the quality of the mapping achieved with the trained networks on the basis of the SHM learning data, we will discuss scenarios with three different reference pulses for which we predict spectra: (i) double pulses with different time delays T d and peak amplitude ratios A 1 : A 2 , (ii) chirped pulses with chirp parameter β, and (iii) partially coherent reference pulses with different coherence times τ according to (1). We have used the network setup for all three scenarios as described in the previous section with the same set of fluctuating spectra for training but paired for each SHM with reference spectra which differ corresponding to the above reference pulses. The fluctuating spectra used as input of the network have been generated with the pulses from (1) with a pulse length of T = 3 fs, a coherence time of τ = 0.5 fs, central photon frequency of ω * = 21 eV and intensities between 8 × 10 15 W fs/cm 2 and 8 × 10 16 W fs/cm 2 . For further reference and to give an overview how successfully the trained networks can predict spectra for the different pulse shapes from the fluctuating spectra, we show to begin with in Fig. 2 the absolute distance errors ( ≤ 2) of all predicted spectra. Note that for double pulses, the error decreases with increasing time-delay which is probably to be expected since it is easier to identify the time delay if it is larger. The smallest one T d = 4 fs basically corresponds to a single pulse (recall that the width of each individual pulse is T = 3 fs). Interestingly, the sensitivity to the amplitude ratios of the double pulses is even larger than to the time delay: The spectrum from a 1st pulse which is is stronger than the 2nd one is easier to predict than vice versa with pulses of equal strength taking the middle position in terms of the error.
The strongest sensitivity occurs for spectra from chirped pulses where the ones with the most positive chirp (β = +3) are twice as difficult to predict than ones with β = −3. We will come back to this point later. Finally, it is surprising that a spectrum from a partially-coherent pulse, which is naturally very "busy", can be identified and therefore predicted from the (averaged) fluctuating spectra, even if the coherence time is shorter than that of the noise (τ = 0.5 fs) with similar accuracy as for longer coherence times of the reference spectrum. We will discuss the spectra from the different pulse forms now in detail.

A. Prediction of spectra from double pulses
The reference pulse is here given by where T d is the delay between the maxima of the two pulses with shape G T from (1b) and respective amplitudes A i . The normalization constant N d is used in the same manner as in Eq. (1). Figure 3 shows predicted spectra for exemplary double pulses with pulse shapes indicated in gray. Comparison of black and blue curves also helps to develop a sense for what the quantitative distance errors in Fig. 2 mean for the quality of the predictions. The generally good agreement proves that the training of the network was successful and has generated an accurate map.
However, the test data, although not used for training, belong to the same class of SHM used for training. A more realistic test is the prediction of a 3D helium spectrum as shown in Fig. 3 (middle), as this is similar to predicting spectra from experimental fluctuating pulses. In general, the prediction works very well, as one can see -only small details of the spectral structures are sometimes not resolved. This is remarkable, as the shapes of the spectra from the same reference pulses are quite different for the 1D system used for training and the 3D helium (compare the individual equivalent panels of the left and middle Fig. 3). This confirms the transferability of the network and underlines its interpolation capability.
Predictions become worse for increasing pulse energy as shown in the right part of Fig. 3. This is also true for the test data (not shown) but to a slightly lesser extent. While features are still reproduced, the predicted spectra are in general slightly too wide compared to the reference spectra.

B. Prediction of spectra from chirped pulses
The chirped reference pulses are parameterised by β and read ϕ β (t) = ω * t + 2 ln 2 β + 1/β t 2 T 2 , T β = 1 + β 2 T , (10b) with the Gaussian from (1b) and T = 3 fs. Again we normalize the pulse energy, here by means of N β , as before in Eqs. (1) and (9) in Fig. 4. They do not exhibit detailed structure, mostly a single peak with different form of the shoulders and reconstruction seems to work well with the exception of large positive chirp, where the position of the spectral peak is systematically red shifted in the predicted spectrum consistent with the largest error (see Fig. 2) the positively chirped spectra have.   (10). The reference 3D helium spectra are shown in blue.

C. Prediction of spectra from partially-coherent pulses
We finally will predict spectra from pulses which are themselves "noisy", i.e., partially coherent and generated according to (1) but for different coherence times τ , typical for SASE FELs. The motivation for such reference spectra was to see where the prediction breaks down since we had the expectation that, at least for spectra from pulses with coherence times much shorter than the ones used for the learning space of fluctuating spectra, the trained network would loose its predictive capability, even more so as the spectra have quite detailed features, see Fig. 5. However, to our surprise this is not the case, as also revealed by the errors given in Fig. 2.

D. Prediction errors for different pulse shapes
Now, we are in the position to understand details of the distance errors ε test in Fig. 2 for reference spectra from different pulse shapes. As one can see from Fig. 6 as a rule of thumb, the smaller the ionization probability P ion , the smaller is the diversity of spectra the pulses generate including reference spectra. All spectra in this section have been analyzed with networks trained with a learning data set of the same size and a common set of input averaged fluctuating spectra. Therefore, one would expect that the average mutual distance D Ω , defined in Eq. (8c), of reference spectra is larger for a more extended space of highly diverse spectra as compared to a smaller space of less diverse spectra. This is indeed the case as D test shown with red points in Fig. 6 reveal: They follow the trend of P ion for the test data. Since it is more difficult for the network to interpolate if the available reference spectra are more distant, one would expect larger errors which explains the trend of the distance errors in Fig. 2.
In particular striking is the change for chirped pulses [18]: negative chirp produces small P ion and in turn a moderate diversity of spectra with relatively small D test and therefore also the smallest test . For positive chirp, the exact opposite holds. One cannot expect that ionization yield, distance of spectra and errors are directly proportional, as the physical process leading from the pulses to the spectra is still non-linear. For instance, long timedelays in double pulses give rise to more diverse spectra than short time-delays. Moreover, the test are for predictions from noisy spectra. Yet, the causal chain of P ion → D test → ε test holds. This section has shown that the trained networks can predict spectra from widely varying pulse forms well. The effort one has to invest into the deep neural networks for the prediction of the spectra depends on the diversity of spectra a certain pulse form is capable to generate. The analysis of the previous section has prepared us for the final goal of this work, namely purifying the spectra while simultaneously extracting the correct time-delay from spectra recorded with noisy double pulses which have an unknown time-delay within a certain interval. This scenario is motivated by SASE XFEL pulses [19], where the pulse is split by a chicane for the relativistic electron bunch which creates the light pulse, or by situations where an XFEL pulse and a time-delayed strong laser pulse are used together whereby the delay between the two pulses is characterized by a jitter from shot to shot.
We model fluctuating double pulses with noise-free double pulses and admixture of noisy double pulses, where q = 0.32, τ = 0.3 fs, G T and F τ are from (1) and the time-delays T d vary between 2 fs and 14 fs. Hence, for this task we have to create a new learning space of fluctuating spectra as input for the network based on fluctuating double pulses. And again, the normalization factor N dq ensures the required pulse energy.
Since so far we have not extracted the time-delay of the pulses from the spectra, we verify in section V A, that it is possible to identify the time-delay of double pulses from noise-free spectra generated by those pulses. In section V B we will address fluctuating spectra. We first determine the pulses' time-delay T d encoded in singleshot spectra generated with noisy double pulses. Subsequently, we average the single-shot spectra with identified T d over small intervals of time-delay (1fs) and purify these averaged spectra. Recall, that purifying means that we remove the fluctuations from spectra by predicting the spectra generated from the respective noise-free pulse forms, in the present case from the noise-free double pulses.
A. Extraction of time-delay from spectra generated with double pulses Here, we aim at constructing a network-based map to extract the time-delays T d of double pulses from the (noise-free) spectra the pulses f d0 from (11) generate. To this end we have generated a learning data set of spectra from 20,000 SHMs, each paired with a single double pulse f d0 (t) with delays between 2 and 14 fs. The learning data is distributed into training, validation and test data as before (see Sect. III C), and the network is also that of Sect. III C, but the number of neurons on each layer is 50, the learning rate is 0.008 and the number of epochs is 200. Figure 7 shows the training success with the SHMs as well as the transfer of the network to unknown 3D helium spectra. The trained network reproduces well the delays (results scatter along the ideal red line with an error give in the inset).  shows the corresponding 3D helium spectra. Given the similarity of these spectra for different time-delays it is remarkable that the trained network can reliably extract the time-delays. We may conclude that we can map out the delay of the pulse from the spectrum it has produced with the help of the trained network.
B. Purification of single-shot spectra and simultaneous extraction of the time-delay of the generating double pulse Finally, we analyze noisy single-shot spectra with the goal to purify them as in Sect. IV and to extract the time delay of the generating double pulse as in Sect. V A simultaneously. In order to have a reasonable statistics for the map and also for having reasonably different spectra for different time delays, we reconstruct from each noisy single-shot spectrum (all for the same SHM) the time-delay but average the spectra afterwards over small intervals (1 fs) of time-delays. Subsequently, the averaged spectra are passed through another trained network to purify them. The result is shown in Fig. 8. The scattered points are reconstructed time-delays coloured with the reference time-delays. The monotonous change in colors demonstrates that the reconstruction of timedelays for the test data has been successful. The spectra within 1 fs intervals of reconstructed time-delays are averaged and subsequently purified. They are shown on the right in red along with reference spectra (black), averaged over the same interval of time-delays. The generally good agreement demonstrates that reconstruction of time-delays and purification of the single-shot spectra is possible without additional information but the singleshot spectra. FIG. 8. Simultaneous reconstruction of time-delay and purification of noisy spectra for a single Hamilton matrix taken from test data. Single-shot fluctuating spectra for random time-delays are passed through a network to reconstruct the underlying time delays which are shown as scattered points where the color represents the reference time-delay. We consider 12 intervals of time delay in the range 2-14 fs with interval length of 1 fs. All single-shot spectra which fall into on interval of time-delay are averaged. The averaged spectra are passed through an another network which maps averaged noisy spectra to purified ones. The predicted purified spectra (red) are compared to reference spectra (black).
The last step is to proof that the reconstruction and purification can be transferred to spectra unknown to the networks. To this end we take noisy single-shot spectra of 3D helium with three well-defined time-delays and pass them through the trained network for reconstruction of the time-delay. The scattered points in Fig. 9 show the reconstructed time-delays. We average the corresponding spectra over 1 fs about the three peak time-delays in the scattered points and pass the averaged spectra through the purification network to arrive at the three spectra on the right in red. They agree well with the corresponding reference spectra, averaged over the same intervals of time-delay (black). Hence, the trained networks should be able to reconstruct the time-delay and purify the corresponding fluctuating experimental spectra as they are produced by SASE FELs.

VI. CONCLUSIONS
To summarize, we have devised a strategy to create maps through deep neural networks between fluctuating nonlinear photo-ionization spectra and noise-free spectra and between fluctuating single-shot spectra and pulse FIG. 9. Same as Fig. 8 but for 3D helium for which the network was not trained. The distribution of predicted timedelays shows three main peaks at 4, 8, 12 fs. The single-shot spectra are averaged over all spectra with time-delays in an interval of 1 fs about the three peaks. The averaged spectra are passed through the trained network to obtain the corresponding purified spectra shown on the right (red). The three averaged reference spectra (black) are obtained in the same way.
properties. A crucial part of this strategy is the formulation of synthetic Hamilton matrices which describe artificial systems, similar to ones existing in reality. We use the SHM to generate a sufficient amount of spectra for training the network. In a first application [6] we purified fluctuating spectra as typically produced by SASE FELs through a neural-network-based map.
Here, we have taken this mapping capability to a new level by predicting from fluctuating spectra -which should come ultimately from experiment -the spectra which would be obtained with specific noise-free pulses, namely double pulses, chirped pulses and chaotic (partially-coherent) pulses. While generally the prediction works as well as the purification (prediction) for simple Gaussian pulses before, the error analysis has revealed interesting differences for the different pulse shapes.
In a second application we have constructed a neuralnetwork-based map which can extract the time-delay of double pulses from fluctuating single-shot spectra generated by those noisy double pulses. Finally, we could demonstrate that suitably trained networks can achieve both, purification and extraction of the time-delay, from fluctuating single-shot spectra as typically produced by SASE FELs. Clearly, neural networks open promising new ways to analyze in particular noisy data with a potential which has been by far not exhausted.