Neural-network-powered pulse reconstruction from one-dimensional interferometric cross-correlation traces

Any ultrafast optical spectroscopy experiment is usually accompanied by the necessary routine of ultrashort-pulse characterisation. The majority of pulse characterisation approaches solve either a one-dimensional (e.g. via interferometry) or a two-dimensional (e.g. via frequency-resolved measurements) problem. Solution of the two-dimensional pulse-retrieval problem is generally more consistent due to problem's over-determined nature. In contrast, the one-dimensional pulse-retrieval problem is impossible to solve unambiguously as ultimately imposed by the fundamental theorem of algebra. In cases where additional constraints are involved, the one-dimensional problem may be possible to solve, however, existing iterative algorithms lack generality, and often stagnate for complicated pulse shapes. Here we use a deep neural network to unambiguously solve a constrained one-dimensional pulse-retrieval problem and show the potential of fast, reliable, and complete pulse characterisation using interferometric cross-correlation time traces (determined by the pulses with partial spectral overlap).


Introduction
Optical pulse characterisation is a necessary step of all ultrafast spectroscopy experiments performed prior to any measurement of dynamics in media of interest.The most precise and reliable pulse characterisation techniques are considered those that allow for pulse retrieval from two-dimensional (2D) data-sets acquired, for example, by frequency-resolved optical gating (FROG) [1], multiphoton intrapulse interference phase scan (MIIPS) [2], or dispersion scan (D-Scan) [3].This reliability stems from the over-determination of the corresponding pulse-retrieval problems: a much greater number of points (of the order of ∼ N 2 ) representing a spectrally-and time-resolved 2D data-set is mapped onto a much lesser number of only ∼ N points describing pulse electric field as a one-dimensional (1D) function of time.
It is still, nevertheless, useful to be able to reliably reconstruct electric fields of ultrashort pulses from 1D data-sets due to faster data-acquisition times and potentially simpler experimental settings.Due to the fundamental theorem of algebra, however, this is impossible to achieve, and additional information is required [1,4].Amongst 1D pulse retrieval approaches, spectral phase interferometry for direct electric-field reconstruction (SPIDER) [5] is arguably the most successful technique capable of unambiguous pulse retrieval.In this approach, the additional information needed for solving the 1D pulse-retrieval problem is encoded by using a significantly chirped reference pulse for sum-frequency-generation signal (between the chirped pulse and the two replicas of the pulse to be characterised).The experimental implementation of the SPIDER method, however, is complex, involves two delay stages and requires highly precise alignment.Other methods based on measuring triple intensity correlations [6] also uniquely yield pulse shapes, but also at an expense of increased complexity.
Acquiring 1D time-domain traces of intensity correlations between two pulses only, on the other hand, is very easy to implement experimentally (as only one delay stage is required), and numerous attempts to reconstruct pulse shapes from such traces were previously made [7,8,9,10,11,12,13,14].Peatross et al. [14] were able to reconstruct electric fields of ultrashort pulses from intensity autocorrelation traces using the Gerchberg-Saxton algorithm [15].They note, however, that their approach suffers from non-trivial ambiguities as more than one pair of electric field amplitude and phase can lead to essentially same autocorrelation trace.Moreover, their algorithm does not outperform the iterative FROG algorithm [1] or recently reported common pulse retrieval algorithm (COPRA) [16], and can stagnate.Later, Chung and Weiner [17], numerically proved that significantly different pulse shapes can lead to exactly the same intensity autocorrelation.
It was also shown previously that in cases where different pulse shapes lead to same intensity autocorrelation traces, interferometric autocorrelation traces are similar but not equivalent [17].Thus, interferometric correlations are also sensitive to phase of electric field, which inspired attempts to find sufficient number of constraints to solve the corresponding pulse-retrieval problem.Diels et al. [7,8] suggested that laser-pulse spectrum together with second-order intensity and interferometric autocorrelation traces (acquired, for example, by mixing two pulses in a nonlinear crystal via second-harmonic generation) are sufficient to reconstruct pulse electric field, although no proof was given that their iterative algorithm yielded unique solutions.Later, a technique named as the Femto-nitpicker was introduced [9,13].This technique was capable of retrieving pulse shapes from interferometric autocorrelation traces, which were supplemented by interferometric cross-correlation measurements obtained when a thick glass block was inserted into one of the interferometer's arms.However, the algorithm assumed only broadening effect of the glass block (and, in general, would fail for the case of pulse narrowing) and the accuracy of their iterative algorithm was lower for thinner glass blocks.
Naganuma et al. suggested that for successful 1D pulse retrieval it is sufficient to measure intensity autocorrelation, second-harmonic interferogram, and field (first-order) interferogram [10].Experimentally, they have also supplemented interferometric autocorrelation measurements with those performed with a piece of glass inserted before the interferometer [11] or in one of its arms [12].The iterative algorithm tended, however, to stagnate, and their experimental approach did not find applications [4].
The listed attempts, nevertheless, suggest that such pulse characteristics as the amount of chirp, pulse amplitude time profile and frequency variation within the pulse all leave their fingerprints on interferometric correlation traces.
It is, therefore, desirable to be able to use these fingerprints to reconstruct pulse shapes from measurements with the simplest experimental arrangement.Convolutional neural networks (CNNs) [18,19,20] were proven to be extremely powerful in recognizing fingerprints and patterns in large non-trivially complicated data-sets, and therefore they could also aid pulse retrieval from 1D interferometric correlation traces.
Previously, neural networks were shown to be successful in pulse retrieval from 2D data-sets: FROG traces [21,22,23,24], D-Scan traces [25], speckles at the output of a multi-mode fiber [26], and streak traces characterising attosecond pulses [27].However, neural-network-assisted reconstruction of ultrashort pulses from 1D interferometric cross-correlation data-sets, to the best of our knowledge, have not been demonstrated previously, and our proof-of-principle work aims to fill this gap, as summarized below.Following developments described above, here we investigate, with the help of CNNs, the question of ambiguity of the retrieval of ultrashort pulse shapes from interferometric correlation traces.We consider a more general case of interferometric cross-correlation trace (with an unknown reference pulse) supplemented with spectra of both pulses and an interferometric cross-correlation trace obtained when the pulse to be diagnosed is affected by a glass plate.This supplemental data serves as the set of additional constraints to the 1D pulse retrieval problem.We synthesize a large data-set to train our neural network, and apply the trained model to the experimental data obtained using the dispersionless Michelson interferometer described previously [28].We demonstrate that it is possible to unambiguously retrieve electric fields of ultrashort pulses from the four mentioned 1D data-sets.Importantly, no other knowledge than spectrum (which partially overlaps the spectrum of the pulse to be characterised) is required of the reference pulse; instead, we use the interferometric cross-correlation measurement (without the glass plate) itself as a reference measurement.

Data preparation for neural-network training
Numerical interferometric intensity cross-correlation traces (I IXC ) are generated via the expression where E ref (t) is the electric field of the arbitrary reference pulse passed through the first arm of an interferometer; E ?(t) is the electric field of the pulse to be characterised, passed through the second arm of the interferometer; τ is the delay between the two pulses; m is the order of the cross-correlation signal, which we set to be equal to 2 (as second-order correlation measurements are most feasible to realise experimentally).The electric fields E ref (t) and E ?(t) are obtained from randomly generated electric field amplitudes and phases defined in the frequency domain (see Supplementary material, Section S1, for more details).An example of a simulated interferometric correlation trace is given in In our work, we exploit sensitivity of machine-learning models to the presence of ambiguities in training data-sets [29,30]: a simple neural network, for example, will converge well if the data-set used for its training is unambiguous, and the same neural network will not be able to make good predictions if the data-set contains ambiguities.Therefore, we make sure that all ambiguities are completely eliminated from the data-set.
During simulations, we avoid all trivial ambiguities that may be present in correlation traces [1]: (i ) the direction-of-time ambiguity is intrinsically absent by the nature of cross-correlation measurements, where time symmetry is broken; (ii ) the addition-of-constant-spectral-phase ambiguity is eliminated by shifting spectral phase so that it would correspond to 0 radians at the spectral peak; (iii ) the time-shift ambiguity is avoided by making peaks of the pulse electric-field amplitudes to be located at 0-fs time and by subtracting the linear components of the spectral phases from overall phase profiles.
After having eliminated the trivial ambiguities, the only possible ambiguities left are those referred to as non-trivial.In order to avoid non-trivial ambiguities and characterise the second pulse unambiguously (without the knowledge of the reference pulse), we influence its spectral phase in a predictable way by making it propagate through a glass plate (e.g., fused silica) of certain thickness d, dispersion of which is well-documented [31].As a result of such propagation, additional phase kd is added to the overall spectral phase of the pulse, with the wave vector defined as k = n(ω)ω/c, where n(ω) is the frequency-dependent refractive index of the glass, ω is the angular frequency, and c is the speed of light.The dispersion n(ω) of the refractive index was estimated with the help of the Sellmeier equation for fused silica (see Supplementary material, Section S2) [31,32].The resultant electric field of the modified second pulse in the frequency domain was then Fourier-transformed to yield the electric field in the time domain affected by the glass plate (Figure 1f).The corresponding cross-correlation trace obtained with this stretched pulses is shown in Figure 1g As clearly indicated previously [10,17], minimum three measurements are required to retrieve the pulses from 1D data-sets, and adding extra information can only lead to a better convergence of an iterative algorithm and a higher level of its reliability.Here, four 1D data-sets -spectra of both pulses and two  -d).
In the stacking procedure, we concatenate these four images along the third dimension forming the depth of the 3D data-structure, which we refer here to as the number of channels C following convention in the machine-learning community.Structurally, a single data-sample, therefore, is a 3D data-cube of size W × H × C with the number of channels C representing the amount of one-dimensional data-sets used to retrieve pulses.Each such 3D data-sample is supplemented by the corresponding electric field of the pulse of interest (e.g. the one shown in Figure 1d), which is referred to as "label" and serves as a guide for the neural network during the learning period.
In our machine-learning experiments, we used overall 20000 such data-samples.
We split this data into three parts: (i ) training data-set consisting of 19000 datasamples, (ii ) development data-set consisting of 600 data-samples, and (iii ) test data-set consisting of 400 data-samples.We used training data-set to train the neural network, and the accuracy of the prediction of the labels from the development data-set as a feedback parameter to improve our network's predicting ability, as will be discussed in more detail in the next section.

Neural-network architecture and training
The neural-network architecture used in this work was implemented in Python with the help of the PyTorch machine-learning framework [33], and, as mentioned above, is based on convolutional neural networks (CNNs) [18,19,20].
We adopted the simplest conceptual design of CNN with the two main parts: an encoder and a decoder.The encoder (consisting of convolutional layers) encodes features contained in the training data-set, and during the training stage tries to generalise trends observed in this data-set.The decoder (consisting of fullyconnected layers) uses the information from the output of the encoder in order to retrieve particular information of interest (electric fields in our case).As mentioned earlier, this particular information of interest is represented as labels in the data-set.As the neural network learns, it compares its current predictions with these labels, and tries to adjust its learnt parameters by means of the (mini-batch) gradient-descent algorithm [18,19] (we used the Adam optimization algorithm [34] as the corresponding gradient-descent-based optimisation routine).As a feedback for this parameter adjustment procedure, at each iteration the squared L 2 -norm (L) over the development data-set is calculated as where N is the number of data-samples in the development data-set; n l is the number of elements of a 1D array of numbers representing pulse electric field (E ?,i,j or Ê?,i,j ) in a data-sample from the development data-set; E ?,i,j is the ground-truth electric field (label); Ê?,i,j is the corresponding electric field predicted by the neural network at the current learning stage; L dev is also referred to as the objective function; fields are normalised so that |E ?,i,j | ≤ 1 and | Ê?,i,j | ≤ 1.This feedback is used to adjust parameters of the neural network such as weights and biases as well as other parameters referred to as hyperparameters.The last serve as "tuning knobs" allowing to increase the neural-network's overall performance (see Supplementary Material, Section 4, for more details on both the architecture of our neural network, the training procedure, and the hyperparameter optimisation procedure).
We trained our neural network on a computer equipped with the Titan RTX graphic processing unit (GPU) with up to 130 teraFLOPS (floating-point operations per second) and 24-gigabyte memory.Training-time rate is estimated to be ∼83.3sec/epoch, while the pulse retrieval takes as short as ∼1.1 milliseconds.To test the robustness of our neural-network architecture to the presence of noise we added white Gaussian noise (see details in Supplementary material, Section S6) to the simulated data-set, and retrained the network over 2000 epochs using the noisy data-sets with two different noise levels.Figures 3b,c show the predicted electric fields when the training data-set was augmented by noise yielding signal-to-noise ratio (SNR) of 20 (Figure 3b) and 10 (Figure 3c).

Prediction using simulated data
In both cases, accuracy of the predictions is reasonably high, with the L 2 -norm (Equation ( 2)) of the order of 10 −4 (and the average rms of the order of 10 −3 ).
In the case of SNR = 20, the L 2 -norm over the training, development and test data-sets was achieved to be as low as 8.9 data.The data was acquired with a table-top spectrometer (Avantes) and the recently-reported fully-symmetric Michelson interferometer [28].The measured data was used to form the neural-network input data-sample and is shown in Figures 4a-c.We used the same spectrum (Figure 4a) for the first two channels of our input experimental data-sample, as the pulses come from the same laser source (lab-built non-collinear optical parametric amplifier).The interferometric auto-correlation trace used to form the third channel of the data-sample is shown in Figure 4b.For interferometric cross-correlation measurements with a phase-modulated pulse to be diagnosed we break the symmetry of our interferometer by inserting a 1-mm-thick fused-silica glass plate in front of the spherical mirror in the interferometer's second arm (see Supplementary material, Section S7, for more details).The interferometric cross-correlation trace obtained in this case was used to form the fourth channel of the data-sample and is shown in Figure 4c.The pulse in the second arm of the interferometer passes through the fused-silica glass plate twice and should therefore be affected as if it passed a 2-mm glass plate similarly to simulation of the numerical data-set.
The 1D interferometric cross-correlation traces were derived from 2D interferometric FROG (iFROG) traces by integrating the last along the frequency axis.We acquired iFROG traces (instead of 1D correlation traces) to be able to compare the neural-network retrieval results with those obtained using recently reported COPRA pulse retrieval algorithm [16] (which operates on frequencyresolved data).The iFROG traces were acquired by recording second-harmonic signal generated in a 5-µm-thick beta barium borate (BBO) crystal.The traces were recorded over the 600-fs range of time delays (between the two pulses in the two interferometer's arms), with 0.1 fs time step and 50 ms integration When recording both the fundamental spectrum of the pulses and the secondharmonic-generation spectra during iFROG measurements, the spectrometer was placed after the position of the nonlinear crystal.The recorded experimental data was pre-processed to match the standard for inputs that the neural network accepts, as defined above.
Figure 4d shows the pulse field retrieved using our CNN and the COPRA [16].We derived second-harmonic-generation FROG (SHG-FROG) by filtering out (along the time axis) first and second harmonics from the measured iFROG trace, and used the SHG-FROG trace to feed the COPRA algorithm.Although the two retrieval results exhibit small mismatches, the general pulse shape is captured very well: both retrieval approaches show pulses of similar duration and carrier frequency.The apparent mismatches between the two pulse-retrieval results likely have multiple reasons.First of all, we notice that in the measured auto-correlation trace (Figure 4b) the background-to-peak ratio deviates from the theoretical value of 1:8 likely due to small alignment imperfections.This effect was not present in the simulated data-set and therefore may fall slightly outside of the statistical distribution of the numerical data-set used for training the neural network.In addition, to achieve a better match of the experimental data to statistical distribution of simulated data-set, the presence of fine structure (wiggles on the low-energy side) observed in the measured spectrum could be better taken into account by a refined data-generation procedure.Further, the insertion of the glass plate in the second arm of the interferometer relaxes otherwise-ideal 4f-imaging of the pulses back onto the grating-based beam-splitter, and therefore the interferometric cross-correlation trace may not exactly correspond to the ideal case of pulse propagation through the 2-mm glass plate.Finally, filtering the static component as well as the first and second harmonics constituting 1D correlation traces from surrounding noise may have contributed to distortions related to a particular filtering window shape.
All of these possible reasons could be taken into account in the process known as the data-engineering and will be the ground for our future work.
Nevertheless, despite all of these reasons, the demonstrated neural-network retrieval result indicates that it is possible to characterise ultrashort pulses rapidly and reliably from 1D interferometric traces.The neural network is capable of predicting variations in the pulse shape capturing such details as multiple amplitude peaks if any, and minor oscillations at the tails of the electric field envelopes, although this could be further improved by larger training data-sets and comprehensive data-engineering taking into account the sources of experimental imperfections.Our approach is also scalable: various glasses (e.g.BK7) of various thicknesses can be used as well as other frequency ranges and pulse durations, which all could be considered within the statistical distribution of the training data-samples.

Conclusions
In conclusions, here we demonstrate the proof-of-principle approach to ultrashortoptical-pulse characterisation from 1D interferometric cross-correlation time traces using a deep neural network.We show that it is enough to measure interferometric cross-correlation between the two pulses, interferometric crosscorrelation between the pulses with one of them propagating through a dispersive element, and spectra of both pulses.Generally, no knowledge about the reference pulse other than its spectrum is needed.All of this implies a simple experimental setup with only one delay stage and a single-channel detector, which together with milliseconds-long pulse retrieval makes ultrashort pulse characterisation a fast procedure.This could be further improved up to real-time pulse characterisation technique by smart design of the experimental setup where both cross-correlation traces are acquired together and in a real-time acquisition using sweeping-mode of the delay stages [35].

Figure 1 :
Figure 1: Figures 1a,b show the spectra and the corresponding spectral phases of the two pulses used to simulate the correlation trace; the corresponding electric fields of the pulses are shown in Figure 1c,d; the resultant cross-correlation trace obtained using the two pulses is shown in Figure 1e.

Figure 1 :
Figure 1: Generated spectra and spectral phases of (a) the reference pulse and (b) the pulse to be characterised; time-domain electric fields of (c) the reference pulse, (d) the pulse to be characterised, and (e) the pulse to be characterised passed through a 2-mm fused silica glass plate; interferometric cross-correlation (IXC) traces with the 2-mm fused silica plate (f) out and (g) in.

Figure 2 :
Figure 2: Spectra of the reference pulse (a), and of the pulse to be characterised (c), reshaped into 2D images with dimensions W × H (see the text for details); interferometric cross-correlation traces with the 2-mm fused silica plate out (b) and in (d), reshaped into 2D images with dimensions W × H. (e) Reshaped one-dimensional traces, stacked to form a three-dimensional data-sample of size W × H × C with W = H = 40 and C = 4.The colormap in (a,c) is the same as in (b,d) with white color corresponding to 0 and the darkest shade of red corresponding to 1.

Figure 3
Figure3illustrates the results of neural-network predictions on the simulated data.Figure3ashows an example of the neural-network-predicted electric field from the test data-set (see more examples in Supplementary material, Section S5).It is clear that the electric field envelope and phase are captured by the neural network with high accuracy, even though the shape of the pulse is not trivial, with multiple peaks in the electric field amplitude.After 6000 epochs of training, the L 2 -norm (Equation (2)) over the training, development and test data-sets was achieved to be as low as 4.6 • 10 −5 , 4.7 • 10 −5 , and 9.2 • 10 −5 , respectively.These numbers reflect the prediction error integrated over 1600 time-points and averaged over the development data-set so that the average root-mean-square (rms) error per time-point per data-sample is estimated to be of the order of 10 −4 .Considering the normalization of the total pulse electric field (|E ?,i,j | ≤ 1) this level of rms-error is very small and underlines high prediction accuracy, which in turn signifies that there are no ambiguities present in the generated data-set.This high prediction accuracy is expected as all trivial ambiguities are eliminated by the construction of the data-set and by the nature of cross-correlation traces facilitating unambiguous mapping of the input data to the corresponding pulse electric field.If there were ambiguities in the generated data-set, it would not be possible to achieve with the current neural-network architecture by design.Figures3d,e(orange curve) show the error calculated from the predictions over the development data-set, which the neural network has not seen during training.There is a steeply-decaying learning curve during the first five epochs of training when the network learns high-amplitude part of the pulse shape, followed by a gradual decay of the error over the rest of the epochs during which low-amplitude parts (such as wings) are learned.

Figure 3 :
Figure 3: Actual (solid line) and neural-network-predicted (dashed line) electric field in the case of the training data-set (a) without addition of noise, (b) with SNR = 20, and (c) with SNR = 10.(d,e) Convergence curves of the prediction error versus the number of epochs when the data-set was without noise (orange), with SNR = 20 (green), and with SNR = 10 (blue).Red dots mark newlyachieved minima of the error convergence curve (in the case of the training dataset without noise).The horizontal and vertical axes are given in logarithmic scale.

Figure 4
Figure 4 summarizes the result of application of the CNN model to measured

Figure 4 :
Figure 4: (a-c) The experimental data used as input to the neural network: (a) spectrum of both pulses in the two arms of the interferometer; (b,c) interferometric cross-correlation trace obtained with the fused silica glass plate (b) out of and (c) in the beam (in the second arm of the interferometer).The traces in (b,c) were obtained from corresponding frequency-resolved data by integrating along the frequency axis.(d) Pulses retrieved with the neural network (red) and with COPRA [16] (green).