1. Introduction
Laser–particle beam collisions have proven an effective tool in the investigation of strong-field quantum electrodynamics (SFQED). Early experiments utilized collisions between a linear accelerator (linac)-accelerated electron beam and a high-power laser[ Reference Burke, Field, Horton-Smith, Spencer, Walz, Berridge, Bugg, Shmakov, Weidemann, Bula, McDonald, Prebys, Bamber, Boege, Koffas, Kotseroglou, Melissinos, Meyerhofer, Reis and Ragg1] to observe non-linear Compton scattering (NLCS)[ Reference Compton2] and the non-linear Breit–Wheeler (BW) process[ Reference Breit and Wheeler3]. More recently, so-called all-optical experiments (in which one laser pulse drives a wakefield accelerator[ Reference Tajima and Dawson4], producing a relativistic electron beam that collides with a second laser pulse) aimed to probe radiation reaction[ Reference Poder, Tamburini, Sarri, Di Piazza, Kuschel, Baird, Behm, Bohlen, Cole, Corvan, Duff, Gerstmayr, Keitel, Krushelnick, Mangles, McKenna, Murphy, Najmudin, Ridgers, Samarin, Symes, Thomas, Warwick and Zepf5, Reference Cole, Behm, Gerstmayr, Blackburn, Wood, Baird, Duff, Harvey, Ilderton, Joglekar, Krushelnick, Kuschel, Marklund, McKenna, Murphy, Poder, Ridgers, Samarin, Sarri, Symes, Thomas, Warwick, Zepf, Najmudin and Mangles6], the recoil experienced by a charge accelerated in an external field upon emitting a photon. A number of initiatives[ Reference Yakimenko, Alsberg, Bong, Bouchard, Clarke, Emma, Green, Hast, Hogan, Seabury, Lipkowitz, O’Shea, Storey, White and Yocky7, Reference Abramowicz, Acosta, Altarelli, Asmann, Bai, Behnke, Benhammou, Blackburn, Boogert, Borysov, Borysova, Brinkmann, Bruschi, Burkart, Büser, Cavanagh, Davidi, Decking, Dosselli, Elkina, Fedotov, Firlej, Fiutowski, Fleck, Gostkin, Grojean, Hallford, Harsh, Hartin, Heinemann, Heinzl, Helary, Hoffmann, Huang, Huang, Idzik, Ilderton, Jacobs, Kämpfer, King, Lahno, Levanon, Levy, Levy, List, Lohmann, Ma, Macleod, Malka, Meloni, Mironov, Morandin, Moron, Negodin, Perez, Pomerantz, Pöschl, Prasad, Quéré, Ringwald, Rödel, Rykovanov, Salgado, Santra, Sarri, Sävert, Sbrizzi, Schmitt, Schramm, Schuwalow, Seipt, Shaimerdenova, Shchedrolosiev, Skakunov, Soreq, Streeter, Swientek, Tal Hod, Tang, Teter, Thoden, Titov, Tolbanov, Torgrimsson, Tyazhev, Wing, Zanetti, Zarubin, Zeil, Zepf and Zhemchukov8] aim to perform high-precision studies of NLCS and non-linear BW pair creation.
The advent of laser facilities capable of attaining
${10}^{21}-{10}^{23}$
W cm−2 intensities[
Reference Willingale, Maksimchuk, Nees, Bayer, Burger, Campbell, Hou, Jovanovic, Kalinchenko, Kuranz, Ma, McKelvey, Thomas, Weinberg, Zhang and Krushelnick9–
Reference Papadopoulos, Zou, Le Blanc, Ranc, Druon, Martin, Fréneaux, Beluze, Lebas, Chabanis, Bonnin, Accary, Garrec, Mathieu and Audebert12] will enable the exploration of SFQED in regimes where quantum effects are predicted to be substantial. Efforts are underway to measure vacuum birefringence in collisions between a high-power laser and a brilliant X-ray source[
Reference Karbstein, Ullmann, Mosman and Zepf13,
Reference Karbstein, Gies, Reuter and Zepf14], while future campaigns propose to use high-power lasers to observe exotic phenomena such as photon–photon splitting[
Reference Adler15] and the self-focusing and self-compression of light in vacuum[
Reference Marklund, Eliasson and Shukla16].
Many SFQED experiments propose to use collisions between high-power lasers and particles beams, or between high-power lasers, and may thus experience difficulties in interpreting data due to shot-to-shot variation in collision parameters. A recent study[
Reference Magnusson, Blackburn, Gerstmayr, Los, Marklund, Ridgers and Mangles17] of the effect of varying collision parameters on model differentiation for radiation reaction studies using electron beam–laser collisions found
$20\%\hbox{--} 30\%$
changes in the mean and
$5\%\hbox{--} 10\%$
changes in the width of the final electron spectrum for typical variations in longitudinal alignment between the electron beam and laser pulse, while variations in the electron beam duration and chirp induced changes of up to
$20\%$
in the final mean electron energy and width. This motivates the development of novel data analysis tools that account for uncertainties due to unknown or measured particle beam, laser and collision parameters self-consistently.
To address this challenge, we have developed a Bayesian inference framework that facilitates parameter inference and model comparison for all-optical NLCS experiments aiming to probe radiation reaction. This framework infers values of collision parameters that directly affect experimental observables but were not measured on-shot, and incorporates knowledge of collision parameters from prior measurements or simulations (in the form of prior distributions). This procedure combines multiple diagnostics into a single, self-consistent analysis and enables a quantitative comparison of three radiation reaction models; the classical, quantum-continuous and quantum-stochastic models outlined in Section 2. While this framework applies to all-optical radiation reaction experiments, some of the techniques used in this work have wider relevance for beam–beam or laser–beam collider experiments.
We identify a number of challenges associated with the implementation of this analysis and propose strategies to address them. Increasing the number of inference (or free) parameters rapidly increases the computational cost of the inference procedure beyond the point where the inference is tractable. For example, in Section 5.3, convergence is achieved for the slowest converging parameter after 8000 steps for the one-dimensional test cases and 31,000 steps for the three-dimensional test cases. On average, the one-dimensional inference procedures conducted for mono-energetic electron spectra required 5 CPUs, 60 GB per CPU and 8 hours of runtime, while the three-dimensional inference procedures typically required 40 CPUs, 60 GB per CPU and 480 hours of runtime.
In addition, an excessive number of free parameters may result in over-fitting. Therefore, a number of collision parameters are assigned fixed values. We assess the impact of fluctuating collision parameters on our experimental observables given their expected shot-to-shot variation. We then demonstrate that degeneracies between free and fixed parameters allow free parameters to replicate the effect on the experimental observables of a fixed parameter having an experimental value that differs from its value in the model. These two considerations inform the selection of free and fixed parameters.
When using this approach, inference parameters should be treated as effective parameters that replicate the collision conditions, rather than physical parameters that accurately represent electron beam and laser properties, or their spatio-temporal alignment. If the experimental value of a fixed parameter deviates from its value in the model by more than a given amount, we find accurate model differentiation is no longer possible. We identify the threshold at which this occurs for transverse misalignments between the electron beam and colliding laser and propose to mitigate this issue by applying the Bayesian analysis to shots with the highest photon yields, for which transverse misalignments are likely to be small.
Finally, we assess the accuracy of model selection and parameter inference using the Bayesian framework via a variety of test cases with electron, laser and collision parameters representative of a recent experiment. We find that, given the experimental uncertainties and the broad, uniform priors we opted for, single-shot model differentiation is infeasible. However, model selection may be achieved by combining model evidences over multiple shots.
2. Theory
Two parameters, namely the electron quantum parameter,
$\eta ={E}_\mathrm{RF}/{E}_\mathrm{s}$
, and the dimensionless intensity parameter,
${a}_0=\frac{\mid {E}_\mathrm{L}\mid e}{\omega_\mathrm{L}{m}_\mathrm{e}c}$
, govern the quantum and non-linear character of electron–photon interactions, respectively[
Reference Gonoskov, Blackburn, Marklund and Bulanov18]. The electron charge and mass are denoted as
$e$
and
${m}_\mathrm{e}$
, respectively,
${\omega}_\mathrm{L}$
and
${E}_\mathrm{L}$
are the frequency and strength of the external electric field in the lab frame, respectively,
${E}_\mathrm{RF}$
is the electric field strength in the electron rest frame and
${E}_\mathrm{s}=1.3\times {10}^{18}\;\mathrm{V}\;{\mathrm{m}}^{-1}$
is the Schwinger field. A classical theory of radiation reaction is expected to be valid when
$\alpha {a}_0\eta \simeq 1$
and
$\eta \ll 1$
[
Reference Di Piazza, Müller, Hatsagortsyan and Keitel19,
Reference Blackburn20], where
$\alpha$
is the fine structure constant, while quantum effects become dominant for
$\alpha {a}_0\simeq 1$
and
$\eta \gtrsim 1$
[
Reference Di Piazza, Müller, Hatsagortsyan and Keitel19,
Reference Blackburn20]. Multi-photon and relativistic effects manifest for
${a}_0>1$
.
Classical radiation reaction is expected to be well-described by the Landau–Liftshitz model[ Reference Landau and Lifshitz21], which treats radiation emission as a continuous process and does not impose an upper bound on the frequency of radiation emitted by an electron. For this reason, classical radiation reaction over-predicts electron energy loss compared to quantum models[ Reference Ridgers, Blackburn, Del Sorbo, Bradley, Slade-Lowther, Baird, Mangles, McKenna, Marklund, Murphy and Thomas22].
For
${a}_0>1$
, quantum models of electron–photon scattering become non-perturbative. An alternative approach is employed (the Furry picture) in which electrons are ‘dressed’ by the background field[
Reference Furry23]. In order to treat arbitrary electromagnetic fields, photon emission is assumed to occur over timescales much smaller than the timeframe of electromagnetic field variation, allowing the electric and magnetic fields to be treated as locally constant and orthogonal (locally constant field approximation, or LCFA)[
Reference Ritus24]. Between photon emissions, electrons propagate classically[
Reference Duclous, Kirk and Bell25–
Reference Kirk, Bell and Arka27]. The quantum model of radiation reaction, here termed the quantum-stochastic model, prohibits the emission of photons with energies exceeding the electron energy and treats photon emission as a stochastic process, which gives rise to spectral broadening[
Reference Ridgers, Blackburn, Del Sorbo, Bradley, Slade-Lowther, Baird, Mangles, McKenna, Marklund, Murphy and Thomas22,
Reference Niel, Riconda, Amiranoff, Duclous and Grech28,
Reference Neitz and Di Piazza29].
We also consider a quantum-continuous model, which incorporates first-order quantum effects in a classical framework. This model treats radiation emission as continuous but applies a correction factor, the Gaunt factor[ Reference Baier, Katkov and Strakhovenko30], to the radiation reaction force term to recover the same rate of change of average electron momentum predicted by the quantum-continuous model[ Reference Ridgers, Blackburn, Del Sorbo, Bradley, Slade-Lowther, Baird, Mangles, McKenna, Marklund, Murphy and Thomas22, Reference Niel, Riconda, Amiranoff, Duclous and Grech28]. Both the classical and quantum-continuous models predict spectral narrowing[ Reference Ridgers, Blackburn, Del Sorbo, Bradley, Slade-Lowther, Baird, Mangles, McKenna, Marklund, Murphy and Thomas22, Reference Niel, Riconda, Amiranoff, Duclous and Grech28].
Throughout this paper, the subscripts
$\mathrm{qs}$
,
$\mathrm{qc}$
and
$\mathrm{cl}$
refer to the quantum-stochastic, quantum-continuous and classical models, respectively.
3. Method
3.1. Bayesian statistics
Bayesian inference is a statistical technique that allows the unknown variables,
$\rho$
, which parameterize a given model,
${M}^x$
, to be inferred. Central to this technique is the approach of using a forward model (which predicts the experimental observables for a set of inputs) to obtain the probability that the model is accurate given the observed data,
$D$
, that is,
$P\left({M}^x|D\right)$
, the posterior probability. Crucially, the forward models, and hence their posterior probability distributions, are functions of the inference parameters. The posterior probability is calculated using Bayes’ theorem:

where
$P\left(D|{M}^x\right)$
is the likelihood of observing the data given
${M}^x$
. The prior probability,
$P\left({M}^x\right)$
, incorporates known information about the inference parameters prior to measuring D, and the probability of observing the data,
$P(D)$
, is a normalization constant. Two models, here demarcated by ‘a’ and ‘b’, may be compared quantitatively using a Bayes factor,
$r$
, defined as follows:

where
$P\left(D|{\rho}_\mathrm{a},{M}^\mathrm{a}\right)$
is the probability of observing data,
$D$
, given that
${M}^\mathrm{a}$
and
${\rho}_\mathrm{a}$
are both observed. Table 1 provides guidelines for the interpretation of Bayes factors. Note that for
${r}_\mathrm{a,b}>1$
,
${M}_\mathrm{a}$
is favoured over
${M}_\mathrm{b}$
, while for
${r}_\mathrm{a,b}<1$
, the reverse is true and the Bayes factor interpretation is given by the reciprocal of the first column in Table 1.
Table 1 Guidelines for Bayes factor interpretation[ Reference Kass and Raftery31].

The Bayes factor may be challenging to compute as it requires integrals over
$f$
-dimensional space, where
$f$
is the number of fit parameters. For this reason,
$r$
is often approximated numerically. We used leave-one-out cross-validation with Pareto-smoothed importance sampling[
Reference Vehtari, Gelman and Gabry32], available in the Python package ArviZ[
Reference Kumar, Carroll, Hartikainen and Martin33], to compute Bayes factors.
A Markov chain Monte Carlo (MCMC)[ Reference Hoeting and Givens34] algorithm, implemented using the emcee library in Python[ Reference Foreman-Mackey, Hogg, Lang and Goodman35], was used to perform the inference.
3.2. Implementation of Bayesian inference
The Bayesian inference procedure is summarized in Figure 1. It was not possible to measure the pre-collision electron spectrum for successful collision shots. Furthermore, the pre-collision spectrum for a given shot may not be well-represented by a summary statistic such as the mean electron spectrum for shots with no colliding laser (null spectra) due to substantial shot-to-shot variation in the electron spectrum. For this reason, null spectra were used to train a neural network, which was used to predict pre-collision electron spectra for successful collision shots. The construction, training and testing of this neural network are discussed by Streeter et al. [ Reference Streeter, Colgan, Cobo, Arran, Los, Watt, Bourgeois, Calvin, Carderelli, Cavanagh, Dann, Fitzgarrald, Gerstmayr, Joglekar, Kettle, Mckenna, Murphy, Najmudin, Parsons, Qian, Rajeev, Ridgers, Symes, Thomas, Sarri and Mangles36]. The neural network consisted of an encoder followed by a translator stage and subsequently a decoder. The former compressed information from four diagnostics (the plasma density, laser energy and pointing and the recombination light emitted by the plasma) into the minimum number of parameters that allowed the key features of the inputs to be re-constructed. The decoder performed a similar function but in reverse, reconstructing a full pre-collision electron spectrum from a small number of inputs. The translator section provided a mapping between the outputs and inputs of the encoder and decoder, respectively. Once trained, the encoder, translator and decoder were used to predict an ensemble of pre-collision electron spectra. This was used to estimate the uncertainty due to the availability of training data for each collision shot analysed using the Bayesian inference procedure. The near-median and standard deviation of the predicted distribution (the former is defined as the spectrum closest in shape to the median spectrum of the distribution) were used to approximate the pre-collision electron spectrum and its uncertainty.

Figure 1 The stages of the Bayesian analysis procedure are summarized. Initially, a distribution of pre-collision electron spectra is predicted by a neural network (for simplicity only one pre-collision spectrum is shown). The pre-collision spectrum is decomposed into a sum of Gaussian sub-bunches that are fed into the inference procedure. The MCMC returns three inference parameters, the laser
${a}_0$
, longitudinal displacement of the collision from the laser focus,
${Z}_\mathrm{d}$
, and the electron beam duration,
${\tau}_\mathrm{e}$
, which are used to reconstruct the pre-collision phase space of the electron beam and the laser electric field it experiences at the collision. This information is supplied to the forward model (in this case the classical, quantum-continuous or quantum-stochastic model), which predicts the post-collision electron spectrum and photon spectrum for each sub-bunch. The full post-collision electron and photon spectra are obtained by performing a charge-weighted sum over the sub-spectra predicted for each sub-Gaussian. The model predictions, measured post-collision electron and photon spectra and their uncertainties are used to compute the posterior probability, which allows the MCMC algorithm to predict the subsequent region of the posterior to sample. Once the MCMC has converged, model comparison is performed using Bayes factors computed for the different models.

Figure 2 A collision between an electron beam (red) and a tightly focused, counter-propagating laser (normalized field strength shown in blue) is depicted. The electron beam charge is normally distributed both spatially and temporally, with duration
${\tau}_\mathrm{e}$
, source size
${\sigma}_\mathrm{r}$
and energy-dependent divergence
${\theta}_\mathrm{e}$
. The laser intensity, which is proportional to the square of the normalized intensity parameter,
${a}_0$
, has Gaussian spatial and temporal dependence. The laser waist,
${w}_0$
, and duration,
${t}_\mathrm{L}$
, are indicated. The collision is longitudinally and transversely offset from the laser focus (yellow cross) by
${Z}_\mathrm{d}$
and
${r}_\mathrm{d}$
, respectively.
In the following section, curled variables, such as
$\mathcal{N}$
, denote post-collision variables and pre-collision variables are italicized. The superscripts – and ′ demarcate properties of the gamma spectrum and measured (as opposed to predicted) observables, respectively.
The pre-collision electron spectra were complex and varied significantly from shot to shot, necessitating an analysis procedure capable of treating arbitrary electron spectra. To this end, a routine was developed that decomposed pre-collision electron spectra into a sum over Gaussian sub-spectra, with mean and standard deviation Lorentz factors,
${\left\langle \gamma \right\rangle}_k$
and
${\Theta}_k$
, respectively, where the subscript
$k$
iterates over the number of sub-spectra,
${n}_{\left\langle \gamma \right\rangle }$
. The sub-spectra were fed into the MCMC algorithm, which sampled three inference parameters from their prior distributions, namely the laser
${a}_0$
, the longitudinal offset of the collision from the laser focus,
${Z}_\mathrm{d}$
, and the electron bunch duration,
${\tau}_\mathrm{e}$
, illustrated in Figure 2. Given
${\tau}_\mathrm{e}$
, the electron beam phase-space distribution was obtained by assuming the longitudinal electron beam distribution was Gaussian. The spatio-temporal distribution of the laser intensity at the collision was derived using
${a}_0$
and
${Z}_\mathrm{d}$
, assuming the laser is well-described by the fundamental transverse electromagnetic mode solution to the paraxial Helmholtz equation. The laser phase is described by the Gouy term and the transverse offset of the collision from the laser focus is assumed to be zero. The laser
${a}_0$
and electron beam phase-space distribution comprised the inputs for the forward model, that is, the parameterized model of radiation reaction.
Table 2 Measured laser parameters a .

a FWHM, full width at half maximum.
Table 3 Measured or estimated electron beam parameters a .

a
Simulated parameters are indicated with an asterisk. The electron beam source size has been estimated from previous measurements[
Reference Schnell, Sävert, Landgraf, Reuter, Nicolai, Jäckel, Peth, Thiele, Jansen, Pukhov, Willi, Kaluza and Spielmann37], while the electron beam duration was obtained from particle-in-cell simulations using the code FBPIC. The constants
${b}_1$
and
${b}_2$
were
${b}_1={1.30}_{-0.19}^{+0.26}\ \mathrm{mrad}$
,
${b}_2={0.26}_{-0.28}^{+0.24}\ \mathrm{mrad}\kern0.22em {\mathrm{GeV}}^{-0.5}$
. FWHM, full width at half maximum.
Various collision parameters (see Tables 2–4) affect the energy loss of the electron beam and hence the measured post-collision electron and photon spectra. The interpolation procedure used in the forward models scales poorly with the number of inference parameters, and thus the maximum number of inferred parameters is largely limited by the computational expense associated with an increasing number of interpolation dimensions. For this reason, we selected three parameters to infer and fixed the remaining parameters. The choice of inference parameters was contingent upon a number of factors, including the expected impact of the collision parameters on the post-collision observables, data sub-selection and degeneracy. (That is, two or more parameters that cause similar changes in the post-collision observables. If one such parameter is fixed in the forward model but takes a different value experimentally, the inference procedure can change the value of the free, degenerate parameter to accurately recover the post-collision observables.) As a consequence of the use of degeneracy, the inference parameters should be treated as effective parameters that collectively represent the collision distribution of
$\eta$
to the first order, rather than physical characteristics of the electron beam and laser pulse.
Table 4 The expected transverse and temporal alignment of the electron beam and the colliding laser and the expected shot-to-shot jitter in the above parameters a .

a
$U$
and
$N$
denote uniform and normal distributions, respectively.
Each forward model consisted of five four-dimensional interpolation tables produced using a Monte Carlo code written in C++ (see Appendix B). Three of these tables parameterize the post-collision electron spectrum for a Gaussian pre-collision electron spectrum or sub-spectrum as a Weibull distribution (as indicated by simulations), providing its location,
$\mu$
, scale,
$\lambda$
, and shape,
$\kappa$
:

The two remaining interpolation tables returned the photon number,
$A$
, and the normalized critical energy,
${\overline{\epsilon}}_\mathrm{c}$
, of the photon spectrum:

where
$\overline{\epsilon}=\frac{\mathrm{\hslash}\omega }{m_\mathrm{e}{c}^2}$
.

Figure 3 (a) The decomposition of a pre-collision electron spectrum predicted by a neural network (cyan) into Gaussian sub-spectra (purple), the sum over which (black) reproduces the original spectrum. (b) The phase-space projection (centre) of a single Gaussian sub-spectrum with the mean,
${\left\langle \gamma \right\rangle}_k$
, and standard deviation,
${\Theta}_k$
, Lorentz factor demarcated by continuous and dashed vertical black lines, respectively. The location,
${Z}_\mathrm{d}$
, and width,
$c{\tau}_\mathrm{e}$
, of its longitudinal distribution are indicated by continuous and dashed horizontal black lines, respectively. The longitudinal (left) and spectral (bottom) distributions of the Gaussian sub-spectrum (obtained by integrating its phase-space distribution over the spectral and longitudinal axes, respectively) are shown in cyan. (c) Decomposition of the phase-space distribution in (b) into femto-bunches (magenta) with varying numbers of electrons,
${g}_{k,l}$
, evenly spaced mean longitudinal positions,
${z}_{k,l}$
, and 0.85 fs durations, where the latter two properties are indicated for a single femto-bunch by continuous and dashed black horizontal lines. The sum over the femto-bunches yields the spectral (bottom) and longitudinal (left) distributions shown in cyan.

Figure 4 Overview of the forward models used to predict the post-collision electron and photon spectra. Once the phase-space decomposition has been performed, the mean and standard deviation Lorentz factor and mean longitudinal position of each femto-bunch are fed into five interpolation tables together with the laser
${a}_0$
. Each interpolation table generates a single output, three of which describe the post-collision electron spectrum location,
$\mu$
, scale,
$\lambda$
, and shape factor,
$\kappa$
, while the remaining tables output the critical factor,
${\overline{\epsilon}}_\mathrm{c}$
, and photon number,
$A$
, of the photon spectrum. The interpolation table outputs are used to obtain the post-collision electron and gamma spectra for each femto-bunch, which are then weighted by the number of electrons in the pre-collision femto-bunch and summed, yielding the full post-collision electron and photon spectra, respectively.
Pre-collision electron spectra input into the Bayesian inference procedure were decomposed into
${n}_{\left\langle \gamma \right\rangle }$
Gaussian sub-spectra that re-created the full spectra when summed, as illustrated in Figure 3(a):

where
${\left\langle \gamma \right\rangle}_k$
,
${\Theta}_k$
and
${h}_k$
denote the mean, standard deviation and electron number of the kth bunch, where k denotes decomposition along spectral axis, and
$0\le k\le {n}_{\left\langle \gamma \right\rangle }$
.
Given the longitudinal displacement of the collision from the laser focus,
${Z}_\mathrm{d}$
, and the electron bunch duration,
${\tau}_\mathrm{e}$
, sampled by the Bayesian inference procedure, the phase space of the pre-collision electron spectrum, obtained under the assumption that each sub-spectrum has a Gaussian longitudinal distribution as indicated in Figure 3(b), is given by the following:

where
$Z$
denotes the longitudinal co-ordinate. The interpolation tables were produced using electron beams with Gaussian temporal profiles and standard deviation durations
$2/{\omega}_\mathrm{L}=0.85\kern0.22em \mathrm{fs}$
. To enable the inference procedure to construct electron beams of arbitrary duration without requiring the addition of a fifth dimensional interpolation table for
${\tau}_\mathrm{e}$
, a second Gaussian decomposition was performed on the electron spectrum input into the Bayesian analysis, in which each sub-bunch was split into
${n}_z$
femto-bunches of 0.85 fs duration, as shown in Figure 3(c). This second, longitudinal decomposition is denoted by the index
$l$
. In order to perform this longitudinal decomposition, it is assumed that the electron beam is well-described by the sum over many short, Gaussian, non-interacting femto-bunches of equal duration situated at different longitudinal positions. The longitudinal position of each femto-bunch will depend on the duration and longitudinal offset of the full electron beam from the laser focus at the collision. Given the longitudinal displacement of each of these sub-bunches from the laser focus, the interpolation tables were used to obtain the post-collision electron and photon spectrum of each longitudinal sub-bunch. These post-collision sub-bunches were recombined with appropriate weights to obtain predictions for the full post-collision electron and photon spectrum. The longitudinal position of each femto-bunch,
${Z}_\mathrm{d}-3c{\tau}_\mathrm{e}\le {z}_{k,l}\le {Z}_\mathrm{d}+3c{\tau}_\mathrm{e}$
. The electron number in each femto-bunch,
${g}_{k,l}$
, is given by the following:

Together,
${a}_0$
,
${g}_{k,l}$
,
${\Theta}_k$
and
${\left\langle \gamma \right\rangle}_k$
comprise the inputs for the interpolation tables, which constitute the forward model.
The forward model for the post-collision electron spectrum consists of three interpolation tables that each generate one output for the four inputs that parameterize each femto-bunch. The three outputs, namely
$\mu$
,
$\lambda$
and
$\kappa$
, are fed into Equation (3) to obtain each post-collision femto-spectrum,
$\frac{\mathrm{d}{\mathrm{\mathcal{F}}}_{k,l}}{\mathrm{d}\gamma }$
. This procedure is illustrated in Figure 4.
As the interpolation tables returned normalized electron spectra, the post-collision electron femto-bunches are weighted by the number of electrons in the corresponding pre-collision femto-bunch and then summed over to obtain the full post-collision electron spectrum,
$\frac{\mathrm{d}\mathcal{N}}{\mathrm{d}\gamma }$
:

where
${D}_\mathrm{e}={\sum}_{k=1}^{n_z}{g}_{k,l}{\Theta}_k$
. The post-collision photon spectrum was obtained using a similar procedure, where the forward model returns two parameters per femto-bunch,
$A$
and
${\overline{\epsilon}}_\mathrm{c}$
, which are inserted into Equation (4) to obtain
$\frac{\mathrm{d}{\overline{\mathrm{\mathcal{F}}}}_{k,l}}{\mathrm{d}\overline{\epsilon}}$
. As with the electron spectrum, a weighted sum is performed to obtain the full photon spectrum,
$\frac{\mathrm{d}\overline{\mathcal{N}}}{\mathrm{d}\overline{\epsilon}}$
.
4. Calculation of posterior probability
The calculation of the uncertainties on the measured and predicted post-collision electron and photon spectra, and the derivation of the posterior probability, up to a constant, are discussed in this section. The neural network that predicted the pre-collision electron spectra returned
${n}_\mathrm{P}=100$
distinct spectra,
$\frac{{\mathrm{d}{N}}_j}{\mathrm{d}\gamma }$
, where
$j$
enumerates each prediction. At each iteration of the Bayesian inference procedure, this pre-collision distribution is used to obtain the corresponding post-collision electron spectra for a set of collision parameters, as discussed in Section 3.2. The near-median of the distribution of post-collision spectra,
$\frac{\mathrm{d}{\mathcal{N}}_{\mathrm{nm}}}{\mathrm{d}\gamma }$
, approximates the post-collision spectrum. The uncertainty on the predicted post-collision electron spectrum,
$\zeta \left(\gamma \right)$
, is the root mean squared (rms) deviation of the distribution of predicted post-collision spectra from the near-median spectrum. The uncertainty in the measured post-collision electron spectrum due to the uncertainties in the magnet, lanex screens and gas jet positions,
${\zeta}^{\prime}\left(\gamma \right)$
, is as follows:

where
${\sigma}_{\gamma}={C}_\mathrm{e}{\left(\gamma {m}_\mathrm{e}\left[\mathrm{MeV}\right]\right)}^2/{m}_\mathrm{e}\left[\mathrm{MeV}\right]$
and
${C}_\mathrm{e}=32.45\times {10}^{-6}\;{\mathrm{MeV}}^{-1}$
. The log likelihood for the electron spectrum is given by Equation (10) where
$\frac{\mathrm{d}{\mathcal{N}}^{\prime }}{\mathrm{d}\gamma }$
is the measured post-collision electron spectrum:

The uncertainty,
${\overline{\zeta}}_\mathrm{pre}$
, in the predicted post-collision gamma spectrum,
$\frac{\mathrm{d}\overline{\mathcal{N}}}{\mathrm{d}\overline{\varepsilon }}$
, due to the uncertainty in the predicted pre-collision electron spectrum is given by the standard deviation of the distribution of predicted post-collision gamma spectra.
A separate Bayesian inference routine was used to fit Equation (4) given the measured gamma spectrometer signal. This procedure yielded
${n}_{\mathcal{Y}}$
-valued distributions of
${\overline{\epsilon}}_\mathrm{c}$
and
$A$
that yielded the best fit, as discussed in Appendix A. These values of
${\overline{\epsilon}}_\mathrm{c}$
and
$A$
were used to generate a distribution of
${n}_{\mathcal{Y}}$
gamma spectra,
$\frac{\mathrm{d}{\mathcal{N}}_v^{\prime }}{\mathrm{d}\overline{\epsilon}}$
, where
$v$
, which denotes the vth spectrum in the distribution, has values
$0\le v\le {n}_{\mathcal{Y}}$
. The mean,
$\left\langle \frac{\mathrm{d}{\overline{\mathcal{N}}}^{\prime }}{\mathrm{d}\overline{\epsilon}}\right\rangle$
, and standard deviation,
${\overline{\zeta}}^{\prime}\left(\overline{\epsilon}\right)$
, of the distribution indicate the most probable gamma spectrum and its corresponding uncertainty. The log likelihood,
$\left\langle \log \left(p\left(\left.\frac{\mathrm{d}{\overline{\mathcal{N}}}^{\prime }}{\mathrm{d}\overline{\epsilon}}\right|{M}^x\right)\right)\right\rangle$
, for the gamma spectrum is then as follows:

where
$\overline{\zeta}\left(\overline{\varepsilon}\right)=\sqrt{{\overline{\zeta}}_{\mathrm{pre}}^2\left(\overline{\varepsilon}\right)+{{\overline{\zeta}}^{\prime}}^2\left(\overline{\epsilon}\right)}$
and
$\Delta \overline{\epsilon}$
is the interval size for
$\overline{\epsilon}$
. Assuming
$P\left(\frac{\mathrm{d}{\overline{\mathcal{N}}}^{\prime }}{\mathrm{d}\overline{\epsilon}}|{M}^x\right)$
and
$P\left(\frac{\mathrm{d}{\mathcal{N}}^{\prime }}{\mathrm{d}\gamma }|{M}^x\right)$
are independent, the probability of observing both the electron and photon spectra for a given model,
$P\left({D}_\mathrm{T}|{M}^x\right)$
, is given by their product, or equivalently:

where
${D}_\mathrm{T}$
denotes the measured electron and gamma spectra.
The prior distribution,
$P\left({a}_0,{Z}_\mathrm{d},{\tau}_\mathrm{e}\right)$
, is given by the sum over the log priors for
${a}_0$
,
$P\left({a}_0\right)$
and
${z}_{k,l}$
,
$P\left({z}_{k,l}\right)$
:

where
$P\left({a}_0\right)$
,
$P\left({z}_{k,l}\right)$
are uniform priors that reflect the ranges of the interpolation tables for
${a}_0$
and
${z}_{k,l}$
, respectively:


The quantity optimized by the MCMC,
$\log \Big(p\left({M}^x|{D}_\mathrm{T}\Big)\right)$
, was calculated using the following:

Here,
$p\left({M}^x|{D}_\mathrm{T}\right)$
is proportional to the posterior probability,
$P\left({M}^x|{D}_\mathrm{T}\right)$
, up to a normalization constant,
$P\left({D}_\mathrm{T}\right)$
;
$P\left({D}_\mathrm{T}\right)$
is calculated by integrating the posterior probability over the parameter space. If this integral has no analytic solution and is multi-dimensional, as is the case in this work, it can be extremely challenging to compute
$P\left({D}_\mathrm{T}\right)$
accurately. However, as
$P\left({D}_\mathrm{T}\right)$
is constant, it does not affect the results of the inference procedure. Therefore,
$p\left({M}^x|{D}_\mathrm{T}\right)$
may be used to perform the inference instead without loss of accuracy. The MCMC optimized the log posterior as this enabled the inference procedure to treat extremely small probabilities. The
$\log \Big(P\left({M}^x|{D}_\mathrm{T}\Big)\right)$
obtained for a given set of
${a}_0$
,
${Z}_\mathrm{d}$
and
${\tau}_\mathrm{e}$
determined the subsequent region of the parameter space to be explored by the MCMC. This procedure was continued iteratively until the MCMC converged. The degree of convergence and the point at which convergence was reached were calculated as described by Sokal[
Reference Sokal38] and the emcee module documentation[
39], respectively.
The full forward models were benchmarked using the Monte Carlo code QEDCASCADE[ 40, Reference Watt41], as illustrated in Figures 5(a) and 5(b).

Figure 5 (a) The post-collision electron spectrum obtained from a Monte Carlo simulation for a collision between an electron beam with initial
$\left\langle \gamma \right\rangle =2550$
and
${\Theta}_k=263.4$
and a laser with
${a}_0=35$
where
${Z}_\mathrm{d}=0$
. The reconstructed electron spectrum obtained using the interpolation tables (magenta) shows good agreement with the simulated post-collision spectrum. (b) The photon spectrum simulated using a Monte Carlo code for the parameters provided in Figure 5 is shown alongside the fit thereto (with Equation (4)) and the photon spectrum constructed using the interpolation tables.
The interpolation tables that comprised the forward models were produced using a Monte Carlo code written in C++. Appendix B details the computational implementation of each model of radiation reaction.
5. Results
A number of difficulties arise when implementing Bayesian inference in a context such as this, where many parameters affect the observables, are poorly constrained and their effects on the observables are correlated. If the latter statement holds, a change in one parameter may be partially compensated for by a change in another parameter. If the prior is insufficiently restrictive, many regions of the parameter space may exist that optimize the posterior: a unique solution may not exist. This problem is known as degeneracy. There is also a risk of over-fitting; if the number of inference parameters (i.e., the degrees of freedom of the forward model) is increased, the inference procedure will return progressively larger hyper-volumes of the f-dimensional parameter space which optimize the posterior probability. Without sufficiently constraining priors, additional diagnostics or smaller uncertainties, increasing the number of free parameters may not increase the quantity of meaningful information that can be extracted from the data. Furthermore, if an excessive number of poorly constrained free parameters are used, these parameters may compensate for inaccuracies in the models, allowing any model of radiation reaction to be made compatible with the data. This may be avoided by applying strong priors; however, such priors require measurements of the unknown parameters or must otherwise be physically motivated, and many parameters in collider experiments lack either constraint.
We employ three approaches to address these challenges, as discussed below.
Parameter selection The collision parameters whose expected variations have the highest and lowest impact on the post-collision electron and gamma spectra are identified. The latter are assigned fixed values in the forward models.
Degeneracy Degeneracies between the parameters that have the greatest impact on the observables are identified, if present. These degeneracies are used to further reduce the number of free parameters; two degenerate parameters may be replaced by one, so long as it is able to accurately reproduce the underlying physics of the collision. This inference parameter is then treated as an effective parameter. As such, its inferred value will not reflect a physical property of the electron beam or laser, but rather will reproduce, to first order, the distribution of
$\eta$
at the collision. This is because
$\eta$
indicates the importance of the correction to the electron energy due to photon emission, which in turn indicates the expected impact of radiation reaction on the post-collision observables. From the definition of
$\eta$
given in Section 2, the expression
$\eta =2{\tilde{a}}_0\gamma \frac{\lambda_\mathrm{C}}{\lambda_\mathrm{L}}$
may be derived, where
${\lambda}_\mathrm{C}=\frac{h}{m_\mathrm{e}c}$
is the Compton wavelength. Thus, the distribution of the inferred effective laser
${a}_0$
,
${\tilde{a}}_0\left({a}_0,{Z}_\mathrm{d},{\tau}_\mathrm{e}\right)$
, and the electron spectrum can be used to obtain the distribution of
$\eta$
at the collision.

Figure 6 The mean Lorentz factor of the post-collision electron spectrum predicted by the classical and quantum-stochastic models varies with the deviation of a given collision parameter from its mean value, normalized by the standard deviation. This choice of normalization factor illustrates the probability that a parameter will deviate from its mean value by a given amount.

Figure 7 Similar to Figure 6, where the standard deviation of the post-collision electron spectrum is shown along the y-axis.

Figure 8 The effect of electron beam divergence and source size on the relative transverse sizes of the electron beam and colliding laser is shown as a function of longitudinal displacement from the electron beam source and the laser focus, respectively.
Shot selection We propose to perform the analysis on shots selected to minimize the potential impact of collision parameters excluded from the forward model. For these shots, degeneracies between included and excluded parameters enable the inference procedure to compensate for any contributions to the change in electron beam energy and spectral shape from parameters not included in the forward model.
5.1. Effect of laser, electron and collision parameters on post-collision observables
The laser, electron and collision parameters that were measured, estimated or inferred from previous measurements are summarized alongside their assigned values in the forward models in Tables 2–4, respectively. These parameters are illustrated in Figure 2 for clarity. The temporal displacement of the collision from the focus provided in Table 4 combines the shot-to-shot variation in the timing between the two laser pulses with the additional delay due to the unknown injection point of the electron beam. As the electron beam is accelerated to velocities exceeding the group velocity of the laser in the plasma,
${v}_\mathrm{g}$
, if injection occurs earlier, the colliding beam would need to arrive earlier for the electron beam to interact with the peak laser intensity.
Figures 6 and 7 illustrate the effect of varying the laser, electron beam and collision parameters on the mean energy and width of the post-collision electron spectrum, respectively. This allows the collision parameters with the highest impact on the experimental observables to be identified. We have chosen to neglect spatio-temporal coupling terms such as pulse front tilt and chirp in the laser, as these higher-order effects are expected to have a significantly lower impact on the post-collision observables compared to the parameters considered here. The variation in the number of emitted photons,
$A$
, with these parameters has not been shown as this trend is merely the inverse of the trend shown in Figure 6. The variation in the critical energy of the photon spectrum,
${\overline{\epsilon}}_\mathrm{c}$
, is not shown as this is much less sensitive to fluctuations in the collision parameters than the properties of the electron spectrum, which are shown.
Figure 6 indicates that, given the expected uncertainties in the collision parameters, the transverse offset has the most significant effect upon the electron beam energy loss, followed by the laser energy, the longitudinal offset of the collision from focus and the source size of the electron beam. By comparison, the effect of changing the electron beam chirp and duration and the laser duration are negligible. The effect of changing the electron beam divergence also appears insignificant; however, this is because the longitudinal offset of the collision from the laser focus was set to 0, and thus the effect of the changing energy-dependent divergence of the electron beam on its transverse size (and hence the average laser intensity during the collision) is negligible.
In Figure 7, the expected transverse jitter also has the highest expected impact on the electron spectrum; however, the most impactful parameters following this are the electron source size, the longitudinal offset and the electron beam duration. In Figures 6 and 7, the quantum-continuous model has been omitted as it exhibits trends similar to the classical model.
The laser,
${a}_0$
, longitudinal offset of the collision from the laser focus,
${Z}_\mathrm{d}$
, and the electron beam duration,
${\tau}_\mathrm{e}$
, were chosen to be free parameters in the inference procedure. As the laser duration and waist at focus remained constant, a change in laser
${a}_0$
indicates a change in the laser energy. The laser
${a}_0$
was chosen as its expected effect on the electron energy losses was larger than any other parameter, barring the transverse jitter. This also allowed an arbitrary number of shots with differing laser energies to be analysed using the same forward model. The longitudinal offset was selected due to the significance of its impact on both the mean and width of the post-collision electron spectrum. Finally, the electron beam duration was chosen over the source size, which has a greater effect on the width of the post-collision electron spectrum, as degeneracy allowed the effect of changing source size to be compensated for by varying
${Z}_\mathrm{d}$
and
${a}_0$
, as will be discussed in Section 5.2. Finally, only the shots with the highest photon yields were analysed to reduce the probability of analysing a collision transversely offset from the laser focus. For this reason, the transverse offset in the forward models was fixed at 0. This is discussed in greater detail in Section 5.2.
5.2. Degeneracy
A change in source size alters the relative transverse sizes of the laser and electron beam. However, as illustrated in Figure 8, when the longitudinal position of the collision relative to the laser focus varies, the energy-dependent electron beam divergence, which is included in the forward models as a fixed parameter, changes the relative transverse sizes of the electron beam and laser pulse. Thus, if the electron beam source size is fixed in the forward model but varies in the experiment, the transverse distribution of laser intensity experienced by the electron beam during the collision can be recovered in the inference procedure by varying
${a}_0$
and
${Z}_\mathrm{d}$
, if the electron beam divergence in the forward model is non-zero. Here, the relative size of the electron beam and laser is varied by changing
${Z}_\mathrm{d}$
, and corresponding change in laser intensity due to the change in the laser waist at the collision is compensated for by varying
${a}_0$
. This is further supported by Figures 9 and 10, which indicate that degeneracies exist between
${Z}_\mathrm{d}$
and the initial source size for both
$\left\langle {\gamma}_\mathrm{f}\right\rangle$
and
${\Theta}_\mathrm{f}$
.

Figure 9 The location of the post-collision electron Lorentz factor,
$\left\langle {\gamma}_\mathrm{f}\right\rangle$
, as a function of electron beam source size and longitudinal displacement of the collision from the laser focus for the classical and quantum-stochastic models.

Figure 10 The scale of the electron spectrum,
${\Theta}_\mathrm{f}$
, predicted by the classical and quantum-stochastic models of radiation reaction as the electron beam source size and the longitudinal displacement of the collision from the laser focus are varied.
The transverse jitter is by far the most impactful collision parameter. The combination of the large shot-to-shot variation in the electron beam pointing and the steep radial dependence of the intensity of the colliding laser ensure that the electron beam energy loss becomes negligible if the transverse offset is even
$0.5\sigma$
from perfect alignment for
${Z}_\mathrm{d}=0$
. As the transverse offset was expected to affect the electron beam energy loss more severely than any other parameter, both in terms of the magnitude of its effect on the electron beam energy loss and the high probability of a transverse misalignment due to large shot-to-shot variations in the electron beam pointing, the shots that produced the highest gamma yield out of a dataset of successful collisions were more likely to be well-aligned transversely than longitudinally. For this reason, we propose that the Bayesian analysis should be applied to shots that produce the highest photon yields. This increases the probability that the transverse offset is small for the selected shots, and can thus be compensated for by exploiting the degeneracy between the laser
${a}_0$
,
${Z}_\mathrm{d}$
and
${\tau}_\mathrm{e}$
and the transverse offset. Note that while this is true for laser pulses with steep transverse intensity profiles (e.g., Gaussian beams), for laser pulses that vary more gradually transversely (i.e., pulses with Airy rings), it may be necessary to include transverse offset as a free model parameter as shot selection will not guarantee a small transverse offset. This would substantially increase the complexity and computational expense of the forward model.
Figures 11 and 12 demonstrate the existence of degeneracies between
${Z}_\mathrm{d}$
and transverse offset, as was the case for source size and
${Z}_\mathrm{d}$
. However, while degeneracies are evident in
$\left\langle {\gamma}_\mathrm{f}\right\rangle$
and
${\Theta}_\mathrm{f}$
when these observables are considered separately, for the inference framework to exploit the degeneracies between free and fixed parameters, it must identify a combination of
${a}_0$
,
${Z}_\mathrm{d}$
and
${\tau}_\mathrm{e}$
that reproduces these observables simultaneously.

Figure 11 The location,
$\left\langle {\gamma}_\mathrm{f}\right\rangle$
, of the post-collision electron Lorentz factor distribution predicted by the classical and quantum-stochastic models of radiation reaction is shown with varying longitudinal and transverse displacement of the collision from the laser focus.

Figure 12 The scale of the post-collision electron Lorentz factor distribution,
${\Theta}_\mathrm{f}$
, predicted by the classical and quantum-stochastic models of radiation reaction for varying transverse and longitudinal alignment between the electron beam and the colliding laser.
5.3. Bayesian test cases
We investigated whether the Bayesian inference procedure treats free parameters as effective parameters, that is, uses free parameters to reproduce the effects on post-collision observables of fixed parameters that differ from their set values in the forward models. To this end, the procedure was performed on a series of simulated post-collision electron and gamma spectra for each model of radiation reaction. In these simulations, the longitudinal offset, transverse offset or the electron beam source size was varied. Each inference procedure then fitted the simulated data using the corresponding forward model (i.e., the data simulated using the classical model were fitted using the classical inference procedure). For each inference procedure, the parameters fixed in the forward models had the values given in Tables 2–4. The inference results are summarized in Figure 13.

Figure 13 The percentage difference between the simulated and inferred values for the average,
$\left\langle {\gamma}_\mathrm{f}\right\rangle$
, and standard deviation,
${\Theta}_\mathrm{f}$
, of the post-collision electron Lorentz factor distribution, and the average energy of the photon distribution,
$\left\langle {\overline{\epsilon}}_\mathrm{f}\right\rangle$
, are shown as the longitudinal and transverse offset of the collision from the laser focus and the electron beam source size are varied. The total error is given by the root mean squared deviation of the inferred
$\left\langle {\gamma}_\mathrm{f}\right\rangle$
,
${\Theta}_\mathrm{f}$
and
$\left\langle {\overline{\epsilon}}_\mathrm{f}\right\rangle$
from the simulated values.
Degeneracies between electron beam duration and longitudinal offset of the collision from focus allow the quantum-stochastic model to recover the post-collision electron and gamma spectra with a total error (which combines the error in the inferred mean and standard deviation of the electron spectrum with the mean photon energy), which is typically at the few percent level, and is always less than
$10\%$
. The maximum total error in the classical model is
$25\%$
; however, for the majority of the parameter values considered in Figure 13, the uncertainty is less than
$10\%$
. For both models, the uncertainty in the inferred spectra for varying source size (a fixed parameter) is only a few percent higher than the inferences performed for varying longitudinal offset (a fitted parameter), confirming the high degree of degeneracy between these parameters and motivating the decision to include the latter but not the former. The effect of the transverse offset is harder to replicate: this motivates our decision to down-select our data to reduce the probability that a large transverse offset was present for the collisions we analysed using the Bayesian framework. As the gamma radiation yield scales as
$\propto {\tilde{a}}_0Q{\gamma}^2$
[
Reference Poder, Tamburini, Sarri, Di Piazza, Kuschel, Baird, Behm, Bohlen, Cole, Corvan, Duff, Gerstmayr, Keitel, Krushelnick, Mangles, McKenna, Murphy, Najmudin, Ridgers, Samarin, Symes, Thomas, Warwick and Zepf5], where
$Q$
is the total electron beam charge, by selecting shots with the high gamma yield normalized by
$Q{\gamma}^2$
, the probability that the collision is transversely offset from the laser focus for the selected shots is minimized.

Figure 14 The quantum-stochastic model of radiation reaction was used to simulate a collision between a focusing, Gaussian laser pulse with
${a}_0=16$
,
${Z}_\mathrm{d}=30\kern0.1em \mathrm{fs}$
and
${\tau}_\mathrm{e}=14\kern0.22em \mathrm{fs}$
(the remaining laser and electron beam parameters are provided in Tables 2 and 3, respectively) and the pre-collision electron spectrum. Simulated data and classical, quantum-continuous and quantum-stochastic inferences are shown in red, green, blue and magenta, respectively. This colour scheme will be used consistently for the remaining figures in this section. (a) The simulated post-collision electron spectrum, predicted pre-collision electron spectra (orange), and its median (black), alongside the inferred post-collision electron spectra. (b) The simulated and inferred responses of the photon spectrometer as a function of photon propagation depth.

Figure 15 Inference parameters obtained for the first test case, where the quantum-stochastic model was used to simulate the collision. The collision parameters inferred by the classical (green), quantum-continuous (blue) and quantum-stochastic (magenta) models are compared to the simulation input parameters (red star). (a)
$\left\langle {\tilde{a}}_0\right\rangle$
, the average effective collision
${a}_0$
that the electron beam interacts with during the collision. The collision distribution of
$\left\langle {\tilde{a}}_0\right\rangle$
stems from the finite size of the electron beam, the spatio-temporal dependence of laser intensity and their overlap. Hence,
$\left\langle {\tilde{a}}_0\right\rangle$
is a function of all three inference parameters. (b) The mean and standard deviation of the collision distribution of
$\eta$
due to the broadband electron spectrum and the range of
${\tilde{a}}_0$
the electron beam experiences during the collision.
A set of inference procedures was run for mono-energetic electron beams with mean energy 1 GeV, in which the transverse offset in the simulated collision was progressively increased, for the following collision parameters:
${a}_0=21.38$
,
${Z}_\mathrm{d}=0$
,
${\tau}_\mathrm{e}=20\kern0.22em \mathrm{fs}$
. It was found that model differentiation was no longer possible for a transverse offset of
$1.5{w}_0=3.3\;\unicode{x3bc} \mathrm{m}$
, at which the reduction in the effective collision
${a}_0$
and the spectral broadening induced by the transverse offset rendered model selection infeasible.
Three further test cases were performed to determine whether the inference procedure is able to extract the correct (input) model of radiation reaction and the correct collision parameters for pre-collision electron spectra and uncertainties representative of experimental data, as these spectra are broadband and have complex, non-normal charge distributions. To achieve this, the post-collision observables were simulated for collisions characterized by different parameters in each test case. Three inferences were then performed on the data produced by each simulation – one per model.
For the first test case, described as ‘ideal’, the stochastic model was used to simulate the collision and the simulation parameters have identical values to their fixed counterparts in the forward models. This means that in both the simulation and the forward model, the transverse offset of the collision from the laser focus is zero, the electron beam source size is 0.68 μm, etc. This test case probes the ability of the inference procedure to retrieve the collision parameters and perform model comparison accurately for an ideal scenario, where the collision conditions are fully described by the forward model. The inferred post-collision electron spectra and photon spectrometer responses for this test case are compared to the simulated data in Figure 14.
In Figure 15, the quantum-stochastic and quantum-continuous models retrieve
$\left\langle {\tilde{a}}_0\right\rangle$
,
$\left\langle \eta \right\rangle$
and
${\sigma}_{\eta }$
within
$1\sigma$
of the input parameters. None of the models infer
${\tau}_\mathrm{e}$
within
$1\sigma$
of the input value. For the classical and quantum-continuous models, this indicates that
${\tau}_\mathrm{e}$
has been treated as an effective parameter. Rather than reflecting the true electron beam duration, the inferred value of
${\tau}_\mathrm{e}$
allows the distribution of effective
${a}_0$
and
$\eta$
to be most closely reproduced. Of the three models, the quantum-stochastic model infers the value of
${\tau}_\mathrm{e}$
most accurately, but fails to recover the correct value within
$1\sigma$
, indicating that the uncertainty in the pre-collision electron spectrum and the lack of sensitivity of the post-collision electron spectrum to small variations in
${\tau}_\mathrm{e}$
inhibit accurate inferences of this parameter. The classical and quantum-continuous inferences both retrieve
${\tau}_\mathrm{e}$
considerably greater than the true value, thereby increasing the range of
${\tilde{a}}_0$
with which the electron beam interacts and hence the range of energy losses it experiences. This allows the classical and quantum-continuous models to reproduce the spectral broadening induced by the quantum-stochasticity inherent in the quantum-stochastic model, which the classical and quantum-continuous models do not predict. As the classical model predicts higher energy losses than the quantum-stochastic model for equivalent collision parameters, it infers a lower
$\left\langle {\tilde{a}}_0\right\rangle$
to produce comparable energy losses.

Figure 16 The classical model of radiation reaction was used to simulate a collision between a focusing, Gaussian laser pulse with
${a}_0=21.38$
,
${Z}_\mathrm{d}=30\kern0.1em \mathrm{fs}$
,
${\tau}_\mathrm{e}=14\kern0.22em \mathrm{fs}$
and an electron beam, which were offset transversely by 1.05 μm (the remaining laser and electron beam parameters are provided in Tables 2 and 3, respectively). (a) The simulated post-collision electron spectrum, predicted pre-collision electron spectra (orange), and its median (black), alongside the inferred post-collision electron spectra. (b) The simulated and inferred responses of the photon spectrometer as a function of photon propagation depth.
The
$\left\langle {\tilde{a}}_0\right\rangle$
and standard deviation
${\tilde{a}}_0$
(the latter results from the spatial and temporal overlap of the electron beam and laser) are reflected in the mean,
$\left\langle \eta \right\rangle$
, and standard deviation,
${\Sigma}_{\eta }$
, of the distribution of
$\eta$
, which characterizes the collision.
When comparing the quantum-stochastic and classical models,
${r}_{\mathrm{qs},\mathrm{cl}}=1.2$
, while the quantum-continuous and classical models yield
${r}_{\mathrm{qc},\mathrm{cl}}=1.3$
, and the quantum-stochastic and quantum-continuous model comparison gives
${r}_{\mathrm{qc},\mathrm{qs}}=1.1$
, indicating there is insufficient evidence to differentiate among the quantum-stochastic, quantum-continuous and classical models for the simulated collision conditions, given the uncertainties on the predicted pre-collision electron spectrum and the measured post-collision electron and gamma spectra.
For the second test case, the results of which are shown in Figure 16, the classical model was used to simulate a collision that was transversely offset from the laser propagation axis by 1.05 μm. Three inference procedures, one for each radiation reaction model, were performed on the simulated electron and photon spectra. The presence of a finite transverse offset between the electron beam and laser focus at the collision induces electron spectral broadening, which resembles the spectral broadening predicted by the quantum-stochastic model. This test case illustrates the extent to which the inference procedure is able to perform model selection accurately (i.e., select the classical model) if the collision parameters with fixed values in the forward models differ from those values. This is particularly pertinent if the classical model is accurate and the additional collision parameters induce spectral broadening, an effect also predicted by the quantum-stochastic model. This test case also indicates whether and how inference procedures use degeneracy to compensate for collision parameters that differ from the fixed values in the forward model.
The inferred and input collision parameters for the second test case in Figure 17 indicate that only the classical model is able to infer the mean effective
${a}_0$
of the collision and the mean
$\eta$
within
$1\sigma$
. However, all models, including the classical model, over-estimate the electron beam duration and
${\sigma}_{\eta }$
. This contrasts with the first test case in which the correct model (i.e., the quantum-stochastic model) also inferred
${\Sigma}_{\eta }$
within
$1\sigma$
of its true value. In the second test case, all models treat
${\tau}_\mathrm{e}$
as an effective parameter, stretching the electron beam longitudinally to replicate (in so far as possible) the broad distribution of
${a}_0$
with which the electron beam interacted due to the finite transverse offset. This is also reflected in the overly large
${\Sigma}_{\eta }$
inferred. For the second test case (see Figure 16), each of the models appears to infer the post-collision electron and gamma spectra with comparable accuracy. This is substantiated by the Bayes factors; we obtain
${r}_{\mathrm{cl},\mathrm{qs}}=1.0$
, while
${r}_{\mathrm{cl},\mathrm{qc}}=1.4$
and
${r}_{\mathrm{qs},\mathrm{qc}}=1.4$
, and thus there is insufficient evidence to favour any of the models.

Figure 17 Similar to Figure 15, where the input and inferred parameters pertain to the transversely offset classical test case.

Figure 18 The quantum-stochastic model of radiation reaction was used to simulate a collision between a focusing, Gaussian laser pulse with
${a}_0=21.38$
,
${Z}_\mathrm{d}=30\kern0.22em \mathrm{fs}$
,
${\tau}_\mathrm{e}=20\kern0.22em \mathrm{fs}$
and transverse offset of 2.1 μm (the remaining laser and electron beam parameters are provided in Tables 2 and 3, respectively) and the pre-collision electron spectrum. Simulated data and classical, quantum-continuous and quantum-stochastic inferences are shown in red, green, blue and magenta, respectively. (a) The simulated post-collision electron spectrum, predicted pre-collision electron spectra (orange), and its median (black), alongside the inferred post-collision electron spectra. (b) The simulated and inferred responses of the photon spectrometer as a function of propagation depth.

Figure 19 Similar to Figure 15, where the input and inferred parameters pertain to the transversely offset stochastic test case.
In the third test case, the collision was simulated using the quantum-stochastic model and was transversely offset by 3.2 μm from the laser propagation axis. This allowed the model selection capability of the Bayesian analysis to be verified for a collision with parameters that differed from their fixed values in the forward model, in which the quantum-stochastic model was used to produce the test data. The results for the third test case are provided in Figures 18 and 19. For the third test case, the Bayes factor obtained when comparing the quantum-stochastic and classical models,
${r}_{\mathrm{qs},\mathrm{cl}}=1.8$
, the quantum-continuous and classical models yield
${r}_{\mathrm{qc},\mathrm{cl}}=1.7$
while a comparison of the quantum-stochastic and quantum-continuous inferences yields
${r}_{\mathrm{qc},\mathrm{qs}}=1.0$
, and thus there is insufficient evidence to differentiate among the quantum-stochastic, quantum-continuous and classical models.
Each test case yielded
$0.33<r<3.2$
, indicating model selection could not be performed for a single shot given the collision conditions and uncertainties considered for each test case. However, for both test cases in which the quantum-stochastic model was used to generate the test data,
${r}_{\mathrm{qs},\mathrm{cl}}>1.0$
, indicating model selection would be feasible if evidence were combined across multiple shots. For the ideal test, assuming model evidence is consistent for each shot, seven shots would be required to allow model differentiation.
For the test case in which the classical model was used to generate the test data,
${r}_{\mathrm{cl},\mathrm{qs}}=1.0$
and
${r}_{\mathrm{cl},\mathrm{qc}}>1.0$
, indicating that if the collision parameters induce spectral broadening, the stochastic model would not be unduly favoured over the classical model.
We have ascertained that the quantum-stochastic model retrieves
$\left\langle {\tilde{a}}_0\right\rangle$
,
$\left\langle \eta \right\rangle$
and
${\Sigma}_{\eta }$
within
$1\sigma$
of the input parameters when this model is used to generate the simulated test data and the forward model accurately describes the full complexity of the collision. As illustrated in the classical test case, if additional collision parameters that are not present in the forward model are present in the simulated data, the correct model (i.e., the classical model) infers
$\left\langle {\tilde{a}}_0\right\rangle$
and
$\left\langle \eta \right\rangle$
within
$1\sigma$
of the simulation values, but significantly over-estimates
${\tau}_\mathrm{e}$
and hence
${\sigma}_{\eta }$
. This indicates that while the distributions of
$\eta$
and
$\left\langle {\tilde{a}}_0\right\rangle$
are inferred accurately to the first order, there are insufficient degrees of freedom in the models to accurately infer higher-order moments (i.e.,
${\sigma}_{{\tilde{a}}_0}$
,
${\sigma}_{\eta }$
) if collision parameters that are fixed in the forward models differ significantly from these values.
6. Conclusion
We have developed a novel Bayesian framework that infers values of unknown collision parameters and predicts corresponding experimental observables for the classical, quantum-continuous and quantum-stochastic models of radiation reaction. We identify challenges associated with the application of a Bayesian approach to this problem, such as over-fitting and insufficiently constraining priors. We address these issues by down-selecting the number of free parameters and the data to be analysed and by exploiting degeneracies between free and fixed parameters. This has motivated the choice of
${a}_0$
,
${Z}_\mathrm{d}$
and
${\tau}_\mathrm{e}$
as fitting parameters and the decision to fix the remaining parameters.
We demonstrate that the Bayesian framework consistently infers
$\left\langle {\tilde{a}}_0\right\rangle$
,
$\left\langle \eta \right\rangle$
,
${\sigma}_{\eta }$
accurately (within
$1\sigma$
) for the highest-performing model. The
$1\sigma$
criterion has been used to provide a rule-of-thumb indication of the accuracy of the inferred parameters. Quantitative comparisons of the relative performance of these models for a single shot yield insubstantial evidence in favour of the correct model over other models, indicating that while model discrimination may not be feasible at the single-shot level, this may be accomplished by combining evidence across multiple shots. For the test cases we have considered, model evidence combined over seven shots or fewer would yield substantial evidence favouring the correct model, assuming each shot produces the same Bayes factor. We find that when the transverse offset differs from its fixed value in the forward models, the standard deviations of the distributions of
$\left\langle {\tilde{a}}_0\right\rangle$
and
$\eta$
are inferred less accurately; however, accurate model selection with this framework is still robust for transverse offsets up to 3.3 μm, roughly 2.4 times the laser waist, for the electron beam and laser parameters considered.
The inclusion of free parameters such as the transverse offset would be facilitated if the computational expense (and runtime) of the Bayesian analysis were reduced. This could be accomplished if the electron spectra were mono-energetic and if strong priors could be applied to restrict the available parameter space and avoid over-fitting. Strong priors would also facilitate the inference of parameters that accurately represent laser and electron beam parameters, rather than effective parameters that reproduce the collision distribution of
$\eta$
. Another route to increase the number of free parameters in the forward model or decrease the computational cost of the procedure could involve substituting the interpolation with a machine learning technique (e.g., a neural network) with a lower associated computational cost. However, it should be noted that a large number of simulations would be required to train a neural network to accurately predict electron and photon spectra for many possible combinations of different collision parameters, which could be computationally expensive to generate. In addition, care would need to be taken to ensure the training dataset fully represented the neural network inputs during the inference procedure.
From an experimental perspective, improved laser stability would facilitate a greater fraction of collisions with good spatial-temporal overlap between the electron beam and colliding laser, increasing the number of collisions for which quantum effects are expected to be substantial.
We anticipate that Bayesian inference will prove to be a powerful analysis tool for the interpretation of future strong-field QED experiments involving colliding lasers and particle beams, and have demonstrated the feasibility and utility of such an analysis for an all-optical radiation reaction experiment.
Appendix A: Bayesian inference of the photon spectrum
The photon spectrum was measured using a stack of
${n}_\mathrm{c}$
CsI crystals as described by Behm et al. [
Reference Behm, Cole, Joglekar, Gerstmayr, Wood, Baird, Blackburn, Duff, Harvey, Ilderton, Kuschel, Mangles, Marklund, McKenna, Murphy, Najmudin, Poder, Ridgers, Sarri, Samarin, Symes, Warwick, Zepf, Krushelnick and Thomas42].
A Bayesian inference routine, implemented using the emcee package in Python[
Reference Foreman-Mackey, Hogg, Lang and Goodman35], was used to fit Equation (4) to the measured photon spectrometer signal under the assumption that inverse Compton scattering produces a photon spectrum with a shape given by Equation (4)[
Reference Behm, Cole, Joglekar, Gerstmayr, Wood, Baird, Blackburn, Duff, Harvey, Ilderton, Kuschel, Mangles, Marklund, McKenna, Murphy, Najmudin, Poder, Ridgers, Sarri, Samarin, Symes, Warwick, Zepf, Krushelnick and Thomas42]. Following convergence, the inference procedure yields distributions of
$A$
and
${\overline{\epsilon}}_\mathrm{c}$
, which correspond to the posterior optimum. By substituting the values of
${\overline{\epsilon}}_\mathrm{c}$
and
$A$
that correspond to the posterior optimum into Equation (4), a distribution of photon spectra is obtained. The most likely photon spectrum and its uncertainty are given by the mean and standard deviation of this distribution.
The posterior distribution for the photon spectrum,
$P\left(\frac{\mathrm{d}{\overline{\mathcal{N}}}^{\prime }}{\mathrm{d}\overline{\epsilon}}|Y\right)$
is obtained by multiplying the likelihood,
$P\left(Y|\frac{\mathrm{d}{\overline{\mathcal{N}}}^{\prime }}{\mathrm{d}\overline{\epsilon}}\right)$
, and prior,
$P\left(\frac{\mathrm{d}{\overline{\mathcal{N}}}^{\prime }}{\mathrm{d}\overline{\epsilon}}\right)$
, probability distributions in accordance with Bayes’ theorem (see Equation (1)). The fitted photon spectrum,
$\frac{\mathrm{d}{\overline{\mathcal{N}}}^{\prime }}{\mathrm{d}\overline{\epsilon}}$
, is parameterized by
$A$
and
${\overline{\epsilon}}_\mathrm{c}$
as discussed previously, and
$Y$
is the signal measured by the photon spectrometer. Under the assumption that the noise on the measurement,
$s$
, is normally distributed, the likelihood distribution is as follows:

where
$i$
denotes the ith row in the spectrometer. The reconstructed spectrometer response,
$\overline{Y}$
, is as follows:

where
${D}_i\left(\overline{\epsilon}\right)$
, the energy deposition in each row of the spectrometer as a function of incoming photon energy, and
${C}_i$
, a calibration factor, are obtained as described by Behm et al. [
Reference Behm, Cole, Joglekar, Gerstmayr, Wood, Baird, Blackburn, Duff, Harvey, Ilderton, Kuschel, Mangles, Marklund, McKenna, Murphy, Najmudin, Poder, Ridgers, Sarri, Samarin, Symes, Warwick, Zepf, Krushelnick and Thomas42].
Here,
$A$
and
${\overline{\epsilon}}_\mathrm{c}$
were assigned the following priors:

where
${A}_\mathrm{B}$
, the scaling constant obtained for a bremsstrahlung calibration, is far larger than the scaling constant obtained for inverse Compton scattering.
The exponential terms in Equation (A1) tend rapidly towards
$\infty$
or
$0$
for small or large exponents, which can inhibit convergence. To avoid this, the MCMC algorithm optimizes the log of the posterior distribution:

Appendix B: Radiation reaction modelling
A quantum treatment of radiation reaction in a strong field requires a direct calculation of the scattering matrix for an electron interacting with an arbitrary electromagnetic field, as the expansion describing the interaction of the charge with the field becomes non-perturbative, and thus all higher-order terms must be retained[
Reference Fedotov, Ilderton, Karbstein, King, Seipt, Taya and Torgrimsson43]. For fields with spatial and temporal structure, such calculations are not tractable. To surmount this difficulty, the Furry picture is utilized, in which the interaction of an electron with a classical background field is integrated into its basis state. Perturbation theory may then be applied to these states to describe quantum photon scattering processes. We also use the LCFA[
Reference Nikishov and Ritus44], expected to be valid for
${a}_0\gg 1$
and
$\frac{a_0^3}{\eta}\gg 1$
[
Reference Niel, Riconda, Amiranoff, Duclous and Grech28]. The photon emission rates derived under the LCFA are used to formulate the equations of motion for an electron interacting with a strong external field. Between photon emissions, electron motion is classical. The equations of motion are propagated in time using a fourth-order Runge–Kutta algorithm in C++[
Reference Duclous, Kirk and Bell25–
Reference Kirk, Bell and Arka27].
The classical theory of radiation reaction predicts that the reaction force manifests as a higher-order correction term in the relativistic equation for the Lorentz four-force[ Reference Landau and Lifshitz21]:

where
${P}_0=\frac{m_\mathrm{e}{c}^5{e}^2}{6{\pi \varepsilon}_0\mathrm{\hslash}}$
,
${m}_\mathrm{e}$
,
$e$
and
${u}_{\alpha }$
are the electron mass, charge and four-velocity, respectively,
${F}^{\alpha \beta}$
is the electromagnetic tensor,
$c$
is the speed of light in vacuum,
$\mathrm{\hslash}$
is the reduced Planck’s constant,
${\epsilon}_0$
is the permittivity of free space and
$\eta$
, the electron quantum parameter, is defined in Section 1.
Photon emission is accounted for as follows. The classical rate of photon emission[ Reference Hoeting and Givens34],

is integrated over time,
$t$
. Here, the quantum photon parameter,
$\chi \approx \frac{\overline{\epsilon}b}{2}$
,
$b=\frac{1}{\alpha {E}_\mathrm{s}}\sqrt{{\left(\overrightarrow{E}+\overrightarrow{v}\times \overrightarrow{B}\right)}^2-{\left(\overrightarrow{E}\cdot \overrightarrow{v}/c\right)}^2}$
,
$\overrightarrow{E}$
and
$\overrightarrow{B}$
are the electric and magnetic fields, respectively,
$\overrightarrow{v}$
is the electron velocity vector and
$\alpha$
is the fine structure constant. A photon is emitted when
${T}^\mathrm{cl}\ge -\ln \left(1-{\Lambda}^\mathrm{cl}\right)$
, where
${\Lambda}^\mathrm{cl}$
is sampled randomly from a uniform distribution,
$U\left[0,1\right]$
[
Reference Arber, Bennett, Brady, Lawrence-Douglas, Ramsay, Sircombe, Gillies, Evans, Schmitz, Bell and Ridgers26].
The polar angle,
$\theta$
, at which the photon was emitted was sampled from the differential rate of photon emission
$\frac{\partial \dot{\overline{N}}}{\partial z}$
with respect to
$z={\left(2{\gamma}^2\left(1-\beta \cos \theta \right)\right)}^{3/2}$
[
Reference Blackburn, Gerstmayr, Mangles and Marklund45]:

where
$\beta =\mid \overrightarrow{v}\mid /c$
. This closely resembles the approach employed by Duclous et al. [
Reference Duclous, Kirk and Bell25] and Arber et al. [
Reference Arber, Bennett, Brady, Lawrence-Douglas, Ramsay, Sircombe, Gillies, Evans, Schmitz, Bell and Ridgers26] where the photon energy is obtained by sampling from the differential rate of emission with respect to energy.
Given
$z$
, the photon energy is computed from the differential probability of photon emission,
$\frac{\partial^2\dot{\overline{N}}}{\partial u\partial z}$
[
Reference Blackburn, Gerstmayr, Mangles and Marklund45]:

where
$u=\frac{\overline{\epsilon}}{\gamma -\overline{\epsilon}}$
,
$\overline{\varepsilon}=\frac{\mathrm{\hslash}\omega }{m_\mathrm{e}{c}^2}$
and
${R}_{\frac{1}{3}}$
is a modified Bessel function of the second kind[
Reference Ternov46]. The azimuthal angle,
$\phi$
, is sampled from a uniform distribution,
$U\left[0,2\pi \right]$
.
Under the quantum-continuous model, the reaction force term in Equation (B1) is modified by the Gaunt factor,
$g\left(\eta \right)$
[
Reference Baier, Katkov and Strakhovenko30]:

where
$g\left(\eta \right)$
is defined as[
Reference Kirk, Bell and Arka27,
Reference Niel, Riconda, Amiranoff, Duclous and Grech28]

and is well-approximated by[ Reference Ridgers, Blackburn, Del Sorbo, Bradley, Slade-Lowther, Baird, Mangles, McKenna, Marklund, Murphy and Thomas22]

The rate of photon emission is sampled from the quantum differential rate,
${\dot{\overline{N}}}^\mathrm{st}$
[
Reference Kirk, Bell and Arka27,
Reference Blackburn, Gerstmayr, Mangles and Marklund45],

where
${K}_{2/3}$
is a Bessel function of the second kind.
The photon energy is sampled from the quantum differential rate,
$\frac{\mathrm{d}\dot{\overline{N}}}{\mathrm{d}\overline{\epsilon}}$
[
Reference Niel, Riconda, Amiranoff, Duclous and Grech28]:

Given
$\overline{\epsilon}$
, the polar angle at which the photon is emitted is sampled from[
Reference Blackburn, Gerstmayr, Mangles and Marklund45]

As with the classical model,
$\phi$
is sampled from a uniform distribution,
$U\left[0,2\pi \right]$
.
The equation of motion for an electron under the quantum-stochastic model of radiation reaction in between emission events is merely the Lorentz force with no additional reaction term[ Reference Duclous, Kirk and Bell25]:

As in the quantum-continuous model, the rate of photon emission is sampled from Equation (B8), the photon energy and polar angle are sampled from Equations (B9) and (B10), respectively, and
$\phi$
is sampled from a uniform distribution,
$U\left[0,2\pi \right]$
. However, unlike the quantum-continuous approach, the effect of the recoil on the electron energy and trajectory is then calculated using Equation (B12)[
Reference Duclous, Kirk and Bell25]:

where
${p}^{\alpha }$
and
${p^{\prime}}^{\alpha }$
are electron four-momenta before and after the emission and
${q}^{\alpha }$
is the photon four-momentum.