Attosecond pulse retrieval from noisy streaking traces with conditional variational generative network

Accurate characterization of an attosecond pulse from streaking trace is an indispensable step in studying the ultrafast electron dynamics on the attosecond scale. Conventional attosecond pulse retrieval methods face two major challenges: the ability to incorporate a complete physics model of the streaking process, and the ability to model the uncertainty of pulse reconstruction in the presence of noise. Here we propose a pulse retrieval method based on conditional variational generative network (CVGN) that can address both demands. Instead of learning the inverse mapping from a streaking trace to a pulse profile, the CVGN models the distribution of the pulse profile conditioned on a given streaking trace measurement, and is thus capable of assessing the uncertainty of the retrieved pulses. This capability is highly desirable for low-photon level measurement, which is typical in attosecond streaking experiments in the water window X-ray range. In addition, the proposed scheme incorporates a refined physics model that considers the Coulomb-laser coupling and photoelectron angular distribution in streaking trace generation. CVGN pulse retrievals under various simulated noise levels and experimental measurement have been demonstrated. The results showed high pulse reconstruction consistency for streaking traces when peak signal-to-noise ratio (SNR) exceeds 6, which could serve as a reference for future learning-based attosecond pulse retrieval.

models demand optimization-based retrieval methods beyond the scope of principle component generalized projections 7 used in FROG-CRAB. Recently, deep neural networks (DNNs) 11,12 have also been applied to learn the inverse mapping of these sophisticated streaking models. However, these methods are insufficient to address the aforementioned challenges, mainly because their output is a deterministic solution given an input streaking trace, and therefore unable to capture the intrinsic pulse variance due to the noise. Moreover, the interaction between photoelectron and the laser field is not fully included in existing models 3 . In this work, we propose a conditional variation generative network (CVGN) to model the distribution of all possible pulses that satisfy a streaking trace corrupted by Poisson noise. We have incorporated a refined streaking model that considers the photoelectron angular distribution 5 and additional phase delay from Coulomb-laser coupling 3 . The results quantitatively demonstrate the uncertainty in the pulse domain, which arises naturally from the experimental noise, and provide an guideline on the required SNR for future streaking experiments. theory Attosecond streaking trace generation. The streaking trace in our experiment is a series of photoelectron spectra τ → y k ( , ) generated from the interaction between an attosecond XUV/X-ray pulse E t ( ) X and a fem- in Helium with various time delays τ. In an attosecond streaking experiment, both XUV/X-ray and IR pulses are polarized along the direction of the time-of-flight (TOF) spectrometer 5 , so the interaction can be calculated as scalar product. Once the gas atoms with photoionization potential I p absorb the energy from an XUV/X-ray pulse, electrons transit from ground state to the excited state (with momentum → k ) with a transition amplitude a described by Eq. (1) in atomic units 5 . Here we apply the Strong-Field Approximation (SFA) 13 that is valid for photoelectron energy larger than 40 eV 6 is a phase gating created by the IR dressing field, , , c os is the vector potential of the IR field, which is also along the direction of TOF spectrometer; θ is the angle between the photoelectron momentum, → k , and the IR field polarization direction. Notice that if → k is approximated by a single value scalar → k 0 corresponding to the central momentum, Eq. (2) reduces to the conventional FROG-CRAB method 2 , which only applies to a phase gating independent on → k and hence reduces the accuracy when retrieving the phase of ultra-broadband XUV/X-ray spectrum 4 .
In atomic unit, the wave packet of the induced photoelectron, Ψ e , is represented by and ϕ X are amplitude and phase of the XUV/X-ray electric field.  is the photon energy that equals the angular frequency in atomic units. Since the power spectrum can be directly measured, the main task of the XUV/X-ray pulse characterization is to determine the spectral phase ϕ X . Some FROG-based phase retrieval methods 2,4 assume a constant transition dipole matrix element d to simplify the streaking model. For broadband pulses, the energy dependency of the magnitude and phase of d must be included. In addition, photoelectron distributions in streaking experiments are angular dependent 14 , and the electron wave packet is subject to additional phase shifts from Coulomb-laser coupling 3,15 . This gives rise to an energy-and angular-dependent dipole matrix element,  θ d( , ), which is expressed as where  denotes the energy;  σ( ) is the photoionization cross-section of Helium obtained from 16 ; is the phase delay from the Coulomb potential 3 , Γ ⋅ [ ] representing the complex gamma function; is the phase delay from IR dressing laser 15 , where π λ = T c 2 / IR c is the oscillating period of the IR field in atomic unit. The angular dependency of the photoelectron , where β is a parameter that accounts for the asymmetry distribution of the photoelectrons ionized from different gas atoms, and β = 1 for Helium gas 17 . The measured spectrogram is the integral of intensity over all the directions of → k , which falls within an angular range of [0, θ max ) against the TOF detector.
In the forward model of the streaking process, y is discretized as a two-dimensional array y.
trace retrieval with conditional variational generative network. The streaking traces y measured from experiments contain statistic noise due to the limited photon flux and data acquisition time, which www.nature.com/scientificreports www.nature.com/scientificreports/ introduces uncertainty to the mapping from the pulse domain, x, to the streaking trace domain, Y. Conditional variational generative network (CVGN) 18 models the distribution of possible XUV/X-ray and IR pulse parameters, x, given a streaking trace, y, via the parameterization of the posterior distribution by the latent variable, z where γ ( ) p z y is the conditional prior distribution of z, given an input streak y. The retrieved pulse parameters, x is sampled from the distribution γ p x z y ( , ) . Both γ p z y ( ) and γ p x z y ( , ) are assumed to be multivariate Gaussians with diagonal covariance matrix.
where the mean and variance parameters µ γ y ( ) are implemented by neural networks with parameter γ 19 , and β is a hyper parameter that determines the covariance of the posterior distribution.
The training process of CVGN maximizes the joint log-likelihood in the dataset. Due to the intractable integral in Eq. (5), a lower bound of the log-likelihood is used as the objective function, , with the introduction of a recognition distribution κ q z x y ( , ) where κ q z x y ( , ) i i captures the latent distribution conditioned on both the streaking trace and pulse parameters. If we whose mean and variance are also implemented by neural networks with parameter κ, the objective function to maximize has a closed form parameters, denoted as the vector x. The first 5 elements describe the XUV/X-ray spectral phase. Because the spectrum of XUV pulse can be measured relatively easily from the experiment, the XUV/X-ray field can be uniquely determined by its spectral phase ϕ ( ) X  , which was expressed as a 5 th order Taylor series in atomic unit,  1-4)). The time-domain XUV/X-ray pulse was constructed directly from the Fourier transform of Eq. (8). In addition, 4 elements representing the carrier envelop phase φ CEP , central wavelength λ 0 , pulse duration τ IR , and peak field strength A IR were used to characterize the IR dressing pulse in the time domain 11 , expressed in Eq. (9) The training data were generated by adding noise to the ideal, noise-free traces from the physics model. We first created 10000 ideal traces with random pulse parameters, x, and normalized their intensities to the range between 0 and 1. Poisson noise was added to each ideal trace y 0 to simulate noisy traces in experiments where the parameter λ is the average peak count of the Poisson distribution. The training data contained a mixture of 5 different Poisson noise levels, λ = 10, 32.5, 55, 77.5 and 100. An additional 1000 ideal traces were used to test the trained model, which consisted of 10 different Poisson noise levels, λ, ranging from 5 to 100. The structure of CVGN used for attosecond streaking trace retrieval was constructed according to that in ref. 19 . It is worth noting that the output (label) of this CVGN x is a vector with the 9 pulse parameters, instead of the real (2020) 10:5782 | https://doi.org/10.1038/s41598-020-62291-6 www.nature.com/scientificreports www.nature.com/scientificreports/ and imaginary part of the XUV spectrum in ref. 19 . After the training, 25 instances of pulse parameters x were retrieved from the distribution γ p x z y ( , ) by sampling = … l z { : 1, , 25} l from the conditional prior distribution | γ p z y ( ). The time-and frequency-domain XUV pulses were then reconstructed from these pulse parameters.

Results and discussions
In this section, the retrieved XUV/X-ray pulses from both test dataset and experimental streaking traces using a trained CVGN are presented to show the accuracy at various noise levels. Figure 1(a1-a3) shows three simulated streaking traces from the same noise-free test trace with λ = 5, 21 and 100. For each trace, 25 instances of the pulse parameter set, x, were retrieved from the posterior distribution | γ p x y z ( , ). The frequency ( Fig. 1(b1-b3)) and time-domain ( Fig. 1(c1-c3)) XUV pulses, along with the time-domain envelop of IR pulses (Fig. 1(d1-d3)), were reconstructed from these retrieved pulse parameters. Streaking traces (Fig. 1(e1-e3)) were then generated from the retrieved XUV and IR pulses using the physical model in Eqs. (1-4). Error bars on Fig. 1(b-d) represent the variance of the 25 instances of retrieved XUV pulse.
The reconstructed streaking traces and the full-width-at-half-maximum (FWHM) of the time-domain XUV pulse were compared with the ground truth. The mean squared error (MSE) of the 25 reconstruction instances was used as the error metric to evaluate the performance under various noise levels. The reconstructed and ideal streaking traces were both normalized to facilitate the comparison among various λ. For the errors on pulse duration, the MSE was normalized by the FWHM of the XUV ground truth, which was 209as in the simulation. Figure 2(a,b) plot the MSE on the reconstructed streaking traces and pulse FWHM with respect to λ, averaged over the whole test dataset.
The results show that as the average peak count, λ, exceeds 32.5, the MSE of the reconstructed streaking trace decreased and remained below 3.5 × 10 −4 . The MSE of pulse duration also decreased from ~80% (λ = 5) down to 6% (λ = . 32 5). The results suggest an average peak Poisson SNR of at least 6 to achieve satisfactory pulse retrieval. It is worth noting that for low photon count (5 counts), the retrieved XUV field exhibits increased bias in pulse profile, which is an indication of strong regularization 21 . This is the effect of using the training data with mixed noise level, which can be reduced by training with traces with same noise level or implementing additional   www.nature.com/scientificreports www.nature.com/scientificreports/ mechanism to adjust the posterior distribution based on noise level. The retrieved time-domain IR envelop, on the other hand, is less affected by the noise. This is because IR envelop is represented by a Gaussian function with relatively few parameters, and is oversampled by 20 delays per cycle in the streaking measurements. Because of CVGN's flexibility in capturing the distribution of solutions satisfying a physical model, it is not necessary to restrict the IR envelop to a Gaussian shape. We envision a complex IR envelop (amplitude and phase chirp) can be retrieved by using more parameters in describing the IR field.
To characterize the reconstruction performance under a realistic photon flux, we tested the trained variational generative network with experimentally measured streaking traces (Fig. 3(a)) in previous studies 22,23 , and retrieved 10 instances of pulse parameters from the posterior distribution γ ( ) p x y z , given each trace y. The time and frequency domain of the XUV pulse were reconstructed from these pulse parameters, and streaking traces were simulated for each retrieved pulse. Figure 3(b) shows the average of 10 reconstructed streaking traces generated from retrieved XUV pulses. Compared with the experimental trace (both traces were normalized to 0~1), the MSE was 0.0116 ± 0.0001 for trace 1, and 0.0140 ± 0.0003 for trace 2. The mean and standard deviation of retrieved pulse in the time and frequency domain are shown in Fig. 3(c,d). The average FWHM of the 10 retrieved pulses was 324 ± 67as for trace 1, and 56 ± 2 as for trace 2. The reconstructed pulses agree with previously reported PROOF results 22,23 within the error margin.

conclusion
We have demonstrated the application of CVGN for phase retrieval from noisy streaking traces. The retrieved XUV pulse from a trained CVGN agrees with previously reported experimental results obtained from iterative PROOF method. The advantage of CVGN over deterministic ultrafast pulse retrieval DNNs lies in the flexibility to capture the pulse retrieval errors and uncertainties under various noise levels. Simulations using a refined streaking generation process and CVGN retrieval have demonstrated a Poisson peak SNR of over 6 can generate accurate pulse retrieval, which is indicative for SNR requirement in attosecond streaking experiments.