Unlocking photodetection for quantum sensing with Bayesian likelihood-free methods and deep learning Mateusz Molenda, Lewis A. Clark ID, Marcin Płodzień ID, Jan Kołodyński ID Abstract To operate quantum sensors at their quantum limit in real time, it is crucial to identify efficient data inference tools for rapid parameter estimation. In photodetection, the key challenge is the fast interpretation of click-patterns that exhibit non-classical statistics—the very features responsible for the quantum enhancement of precision. We achieve this goal by comparing Bayesian likelihood-free methods with ones based on deep learning (DL). While the former are more conceptually intuitive, the latter, once trained, provide significantly faster estimates with comparable precision and yield similar predictions of the associated errors, challenging a common misconception that DL lacks such capabilities. We first verify both approaches for an analytically tractable, yet multiparameter, scenario of a two-level system emitting uncorrelated photons. Our main result, however, is the application to a driven nonlinear optomechanical device emitting non-classical light with complex multiclick correlations; in this case, our methods are essential for fast inference and, hence, unlock the possibility of distinguishing different photon statistics in real time. Our results pave the way for dynamical control of quantum sensors that leverage non-classical effects in photodetection. I Introduction The observation that non-classical resources, specifically, entanglement and squeezing Giovannetti et al. 2001 ; Giovannetti et al. 2006 ; Dowling 2008 ; Giovannetti et al. 2011 ; Pezzè et al. 2018 , allow for measurement precision significantly surpassing the classical limit has ignited a wave of breakthroughs in quantum sensing. Over the past two decades, quantum-enhanced metrology has enabled significant advances across a variety of platforms, including optical clocks Leroux et al. 2010 ; Hosten et al. 2016 ; Pedrozo-Peñafiel et al. 2020 ; Colombo et al. 2022 , magnetometers Sewell et al. 2012 ; Martin Ciurana et al. 2017 ; Wu et al. 2025 ; Gao et al. 2025 , interferometers Gross et al. 2010 ; Demkowicz-Dobrzański et al. 2015 ; Bongs et al. 2021 , and gravitational-wave detectors Tse et al. 2019 ; Ganapathy et al. 2023 . The quantum sensors demonstrated in these works predominantly employ interferometric or homodyne detection architectures Wieczorek et al. 2015 ; Rossi et al. 2019 ; Magrini et al. 2021 ; Tebbenjohanns et al. 2021 , where the physical signal is linearly encoded as a phase shift and extracted by interference with a strong local oscillator or reference field Braginsky and Khalili 1995 ; Wiseman and Milburn 2009 . This often allows the system degrees of freedom, as well as the measurement outcomes, to be described by employing the Gaussian formalism Ferraro et al. 2005 ; Weedbrook et al. 2012 . Crucially, this enables the integration of fast signal-processing solutions in real time for both estimation, e.g., Kalman or Wiener filters Wieczorek et al. 2015 ; Rossi et al. 2019 , and feedback, e.g., linear-quadratic-Gaussian (LQG) control Magrini et al. 2021 ; Tebbenjohanns et al. 2021 . In contrast, time-resolved photodetection Hadfield 2009 —ubiquitous in time-correlated single-photon counting (TCSPC) Bec 2005 and widely employed across quantum platforms Cohen et al. 2015 ; Riedinger et al. 2018 ; Galinskiy et al. 2020 ; Fiaschi et al. 2021 ; Ortolano et al. 2021 ; Galinskiy et al. 2024 —remains uncommon in sensing applications. This is because real-time parameter estimation from photoclick patterns poses a major challenge Kiilerich and Mølmer 2014 . The complexity of the quantum dynamical description—including environmental noise, detection imperfections, and the stochastic nature of the measurement process Plenio and Knight 1998 —renders direct likelihood evaluation computationally prohibitive Clark and Kołodyński 2025 . Except for systems of very small dimension Rinaldi et al. 2024 ; Radaelli et al. 2024a ; Anteneh 2025 ; Khan et al. 2025 , standard Bayesian inference becomes then intractable in real time Gebhart et al. 2023 . In particular, established techniques such as particle filters (sequential) or Markov-Chain Monte Carlo (batch) Gilks et al. 1995 ; Murphy 2012 ; Granade et al. 2017 , which rely on frequent likelihood evaluations, fail to bypass the underlying computational bottleneck. In this work, we show that this bottleneck can be overcome via two distinct approaches: (i) avoiding likelihood computation by resorting to likelihood-free Bayesian inference, specifically Approximate Bayesian Computation (ABC) Sisson et al. 2018 ; Turner and Van Zandt 2012 ; Beaumont et al. 2002 ; and (ii) employing pre-trained deep learning (DL) models Goodfellow et al. 2016 . While ABC was only recently proposed for quantum inference Clark and Kołodyński 2025 —following earlier applications in Hamiltonian learning Granade et al. 2012 ; Sergeevich et al. 2011 ; Wiebe and Granade 2016 —DL has emerged as a powerful framework in quantum metrology for developing estimation Khanahmadi and Mølmer 2021 ; Nolan et al. 2021 ; Huerta Alderete et al. 2022 and control Khalid et al. 2023 ; Nikoloska et al. 2025 ; Zhou et al. 2024 strategies. These include techniques for maximising the Quantum Fisher Information Xu et al. 2021 ; Xiao et al. 2022 and implementing adaptive Bayesian parameter estimation Fiderer et al. 2021 in photonic interferometry Lumino et al. 2018 ; Cimini et al. 2019 ; Cimini et al. 2023 . Here, we demonstrate that both ABC and DL methods can extract informative representations from fixed-length photoclick trajectories. In particular, they exploit quantum correlations embedded in such patterns, thereby enabling real-time quantum enhancement in photodetection-based quantum sensors. The manuscript is organised as follows. In Sec. II , we describe a general quantum sensing scheme that involves a driven quantum system being measured via photodetection. In Sec. III , we detail the inference methods employed (ABC in Sec. III.2 and DL in Sec. III.3 ); we verify these techniques using a two-level atomic model before focusing on a nonlinear optomechanical system. Section IV presents the main results of our work, and we offer concluding remarks and an outlook in Sec. V . Figure 1: Quantum sensing scheme with photodetection. A quantum system is governed by a Hamiltonian \hat{H}(\bm{\varphi},\bm{\mu}) , where \bm{\varphi} and \bm{\mu} are vectors of estimated and control parameters, respectively. The system is driven by an external (classical, blue ) field (e.g., strong light-beam) of strength \Omega and dissipates through multiple (quantum, red ) channels with rates \gamma_{i} . Photon emission constitutes a separate dissipation process, being further divided into detected and lost channels with rates \kappa^{\mathrm{d}}_{j} and \kappa^{\mathrm{l}}_{j} , respectively. Upon registering \ell photons, the most accurate estimator of parameters \bm{\tilde{\varphi}} should be constructed based on the recorded photoclick pattern D_{\ell} —a vector of waiting times between consecutive clicks. II Quantum sensing with photodetection The relevant sensing scenario is depicted in Fig. 1 , in which a quantum sensor is monitored by probing the light it emits; in particular, the arrival times of photons being continuously detected. By \bm{\varphi}=\{\varphi_{1},\varphi_{2},\dots,\varphi_{d}\} we denote the vector containing the estimated parameters , whose values shall be inferred from a particular photoclick pattern , i.e., a vector D_{\ell}\coloneqq\{\Delta t_{1},\Delta t_{2},\dots,\Delta t_{\ell}\} which contains time intervals (waiting times) between consecutive \ell photoclicks. However, within the framework we allow other control parameters \bm{\mu} , whose value is known but should be adjusted for best estimation performance. Moreover, the sensor is considered to be classically driven by some external field of strength \Omega . As a result, although the sensing process is modelled dynamically, the instantaneous and steady-state behaviour of the sensor, given a particular form of its dissipation ( \gamma -channels) and detection ( \kappa -channels), can be modified by varying \Omega . The goal is to estimate most accurately parameters \bm{\varphi} based on the detected photoclick data D_{\ell} . In the idealistic scenario, this should be performed in real time as the successive clicks are recorded. On one hand, this opens door for sensing parameters \bm{\varphi} that change in time, with their time-variation being then tracked “on the fly”. On the other, this allows for adjusting the control parameters \bm{\mu} in between clicks, so that the sensing performance is optimised. All this, however, takes for granted that the inference part can be done sufficiently fast. Here, we make the first important step by proposing necessary estimation methods and test their accuracy when sensing constant parameters \bm{\varphi} for a photoclick trajectories of fixed length D_{\ell} . Our work lays the groundwork for developing real-time estimation protocols that can be implemented in future photodetection experiments, eventually allowing for the integration of feedback and control. II.1 Quantum system with driving and dissipation Considering a general Hamiltonian describing the system used as a sensor, see Fig. 1 , which depends on the estimated \bm{\varphi} and control \bm{\mu} parameters, we may decompose it into its free and driving parts, i.e.: \hat{H}\equiv\hat{H}(\bm{\varphi},\bm{\mu})=\hat{H}_{\mathrm{free}}+\hat{H}_{\mathrm{drive}}(\Omega) (1) with the latter depending explicitly on the driving strength \Omega . Although the form of each is unspecified (and may arbitrarily depend on \bm{\varphi} and \bm{\mu} ), we are motivated by scenarios in which \hat{H}_{\mathrm{free}} carries nonlinear interactions that allow to engineer the statistics of emitted photons Chang et al. 2014 ; Aspelmeyer et al. 2014 , i.e., control their quantum bunching or anti-bunching properties Paul 1982 ; Lee 1993 . Furthermore, to incorporate dissipation of the quantum sensor, we consider its evolution to be described by the Gorini-Kossakowski-Sudarshan-Lindblad (GKSL) master equation Chruściński and Pascazio 2017 : \displaystyle\frac{\mathrm{d}\hat{\rho}}{\mathrm{d}t} \displaystyle=-\frac{i}{\hbar}[\hat{H},\hat{\rho}]+\sum_{i}\gamma_{i}\left(\hat{L}_{i}\hat{\rho}\hat{L}_{i}^{\dagger}-\frac{1}{2}\{\hat{L}_{i}^{\dagger}\hat{L}_{i},\hat{\rho}\}\right) (2) where \gamma_{i} are the dissipation rates, and \hat{L}_{i} are the corresponding Lindblad operators. As a result, we obtain a broad description of sensor dynamics, incorporating both the unitary evolution, which contains the estimated and control parameters, and arbitrary irreversible processes that take a semigroup (Markovian) form ( 2 ) Chruściński and Pascazio 2017 . II.2 Photodetection measurement and unravellings In order to incorporate the photodetection measurement into the dynamical description, we resort to the continuous measurement theory Plenio and Knight 1998 ; Wiseman and Milburn 2009 and, as depicted also in Fig. 1 , account for distinct detection channels (light modes) labelled by j , via which the information is extracted from the quantum sensor. In particular, each of their outputs is measured at a rate \kappa^{\mathrm{d}}_{j} with a photodetector, whose finite efficiency in turn increases \kappa^{\mathrm{l}}_{j} —the effective rate of photon loss in each channel. Assuming that the continuous measurement does not alter the form of Eq. ( 2 ) 1 1 1 Alternatively, one may consider Eq. ( 3 ) as a starting point to describe system dynamics. , we arrive at a stochastic master equation that describes the true evolution of the system in Fig. 1 when conditioned on a particular photoclick record (trajectory) Carmichael 2008 : \displaystyle\mathrm{d}\hat{\rho} \displaystyle=-\frac{i}{\hbar}[\hat{H},\hat{\rho}]+\sum_{i}\gamma_{i}\left(\hat{L}_{i}\hat{\rho}\hat{L}_{i}^{\dagger}-\frac{1}{2}\{\hat{L}_{i}^{\dagger}\hat{L}_{i},\hat{\rho}\}\right)\mathrm{d}t (3a) \displaystyle\quad+\sum_{j}\kappa^{\mathrm{l}}_{j}\!\left(\hat{c}_{j}\hat{\rho}\hat{c}_{j}^{\dagger}-\frac{1}{2}\{\hat{c}_{j}^{\dagger}\hat{c}_{j},\hat{\rho}\}\right)\!\mathrm{d}t+\mathcal{J}_{\kappa^{\mathrm{d}}_{j}}[\hat{\rho}], (3b) where \hat{c}_{j} is the photonic annihilation operator in the j th detection channel, and each phototodetection superoperator \mathcal{J}_{\kappa^{\mathrm{d}}_{j}} is defined as: \mathcal{J}_{\kappa^{\mathrm{d}}_{j}}[\hat{\rho}]\coloneq\kappa^{\mathrm{d}}_{j}\operatorname{Tr}(\hat{c}_{j}^{\dagger}\hat{c}_{j}\hat{\rho})\hat{\rho}\,\mathrm{d}t+\left(\frac{\hat{c}_{j}\hat{\rho}\hat{c}_{j}^{\dagger}}{\operatorname{Tr}(\hat{c}_{j}^{\dagger}\hat{c}_{j}\hat{\rho})}-\hat{\rho}\right)\mathrm{d}N_{t}^{\kappa^{\mathrm{d}}_{j}}, (4) where \mathrm{d}N_{t}^{\kappa^{\mathrm{d}}_{j}} denotes a Poisson increment taking values 0 or 1 Gardiner 1985 , depending whether a photon was detected or not within a time increment \mathrm{d}t . The mean of a Poisson increment, or equivalently P(\mathrm{d}N_{t}^{\kappa^{\mathrm{d}}_{j}}=1) , is given by \left\langle\mathrm{d}N_{t}^{\kappa^{\mathrm{d}}_{j}}\right\rangle=\kappa^{\mathrm{d}}_{j}\operatorname{Tr}(\hat{c}_{j}^{\dagger}\hat{c}_{j}\hat{\rho})\,\mathrm{d}t for a given time t . In particular, the photoclick pattern D_{\ell} shown in Fig. 1 describes a particular detection trajectory for the channel j , along which the system evolves according to Eq. ( 3 ) with \mathrm{d}N_{t}^{\kappa^{\mathrm{d}}_{j}} taking value zero at all times apart from the moments at which each of the \ell clicks is registered. Although we allow multiple detection channels for generality—each photoclick within a pattern D_{\ell} also carries information about its type (label j )—note that in the extreme case when all the photons are lost within some channel j , i.e., \kappa^{\mathrm{d}}_{j}=0 , \kappa^{\mathrm{l}}_{j}>0 , then, as it introduces solely dissipation, it can be equivalently included as another \gamma_{i}=\kappa^{\mathrm{l}}_{j} with \hat{L}_{i}=\hat{c}_{j} in Eq. ( 3a ). We also consider the full unravelling of the master equation ( 2 ), which governs the conditional evolution of the system state under the unphysical assumption that all the processes yielding quantum jumps are monitored Dalibard et al. 1992 ; Mølmer et al. 1993 ; Hegerfeldt 1993 : \displaystyle\mathrm{d}\hat{\rho}= \displaystyle-\frac{i}{\hbar}\left(\hat{H}_{\mathrm{cond}}\hat{\rho}-\hat{\rho}\hat{H}_{\mathrm{cond}}^{\dagger}\right)\mathrm{d}t+\sum_{i}\,\mathcal{J}_{\gamma_{i}}[\hat{\rho}] \displaystyle+\sum_{j}\,\mathcal{J}_{\kappa^{\mathrm{l}}_{j}}[\hat{\rho}]+\,\mathcal{J}_{\kappa^{\mathrm{d}}_{j}}[\hat{\rho}], (5) where the conditional (non-Hermitian) Hamiltonian is defined as \hat{H}_{\mathrm{cond}}\coloneq\hat{H}-\frac{i\hbar}{2}\sum_{i}\gamma_{i}\hat{L}_{i}^{\dagger}\hat{L}_{i}-\frac{i\hbar}{2}\sum_{j}\kappa_{j}\hat{c}_{j}^{\dagger}\hat{c}_{j} (6) with \kappa_{j}\coloneqq\kappa^{\mathrm{l}}_{j}+\kappa^{\mathrm{d}}_{j} for each j . In particular, when evolving \hat{\rho} only according to the first term in Eq. ( II.2 ), the special conditional trajectory is recovered that corresponds to no jumps occurring and, hence, none of them being registered. Although such system dynamics is trace non-preserving, the state norm at time t directly provides the probability of no-jump occurring until the given t . Importantly, in Eq. ( II.2 ) not only jumps associated with unobserved photons are accounted for, but also ones arising due to each dissipative processes labelled by i , i.e.: \mathcal{J}_{\gamma_{i}}[\hat{\rho}]\coloneqq\gamma_{i}\operatorname{Tr}(\hat{L}_{i}^{\dagger}\hat{L}_{i}\hat{\rho})\hat{\rho}\,\mathrm{d}t+\left(\frac{\hat{L}_{i}\hat{\rho}\hat{L}_{i}^{\dagger}}{\operatorname{Tr}(\hat{L}_{i}^{\dagger}\hat{L}_{i}\hat{\rho})}-\hat{\rho}\right)\mathrm{d}N_{t}^{\gamma_{i}} (7) with the stochastic Poisson increment now satisfying \left\langle\mathrm{d}N_{t}^{\gamma_{i}}\right\rangle=\gamma_{i}\operatorname{Tr}(\hat{L}_{i}^{\dagger}\hat{L}_{i}\hat{\rho})\,\mathrm{d}t , which may not possess physical interpretation despite reproducing the correct dissipative dynamics when averaged over. Although the conditional evolution of the system that is based only on physical observations has to be computed using Eq. ( 3 ), Eq. ( II.2 ) proves to be useful, as it describes a pure-state evolution along each trajectory. Hence, it is much less demanding computationally, as it involves only the wavefunction description instead of the density matrix Dalibard et al. 1992 ; Mølmer et al. 1993 ; Hegerfeldt 1993 . In particular, if one is interested in generating examples of photoclick patterns, D_{\ell} , and not the actual evolution of the system, one may generate these with help of Eq. ( II.2 ) by disregarding the inaccessible (unphysical) clicks (events) in a record—these arise when any of \mathrm{d}N_{t}^{\gamma_{i}} or \mathrm{d}N_{t}^{\kappa^{\mathrm{l}}_{j}} takes the value 1. This does not conflict the fact that averaging over inaccessible events—specifically, all the state trajectories generated with Eq. ( II.2 ) that yield the same record of accessible detection events—consistently recovers the conditional state dynamics ( 3 ). Furthermore, by averaging over all potential trajectories without fixing the pattern of detection events ( \mathrm{d}N_{t}^{\kappa^{\mathrm{d}}_{j}} ), the reduced dynamics described by the original master equation ( 2 ) is reproduced. Figure 2: Interpreting photodetection as a temporal point process (TPP). (a) Renewal TPP : Waiting times X=\{X_{1},X_{2},\dots,X_{\ell}\} are independently and identically distributed (i.i.d.), sampled from a stationary waiting-time distribution w(\tau) ; (b) History-dependent TPP : Waiting times are not i.i.d. and cannot be described by a single distribution. As illustrated, specific records may exhibit hierarchical temporal correlations—such as three-click patterns nested within larger five-click sequences. Any such multi-time correlations require a non-renewal framework to account for quantum effects like photon (anti)bunching Paul 1982 , which are essential for quantum-enhanced sensing tasks. II.3 Photoclick pattern as a temporal point process The record of a photodetection process constitutes a realisation of a stochastic temporal point process (TPP), where the recorded data D_{\ell} consists of a sequence of photon waiting times \{X_{i}\}_{i=1}^{\ell} —see Fig. 2 (a). Broadly speaking, TPPs are categorised as either renewal or history-dependent Daley and Vere-Jones 2005 . In a renewal process, the probability of an event depends solely on the time elapsed since the most recent event. Such processes are characterised by independent and identically distributed (i.i.d.) waiting times, with their statistics thus being fully captured by a single waiting-time distribution w(\tau) , e.g., the one sketched in Fig. 2 (a). In contrast, a history-dependent TPP cannot be described by a single distribution, as the statistics of subsequent events are conditioned on the history of prior detections in a non-trivial manner. In the quantum setting, a two-level system (TLS) serves as the paradigmatic renewal source; because the system resets to its ground state upon emission, the memory of prior events is effectively erased Carmichael et al. 1989 ; Kiilerich and Mølmer 2014 . Conversely, most quantum systems possess complex energy-level structures that generate short- or long-lived memory dependencies. These are manifested as temporal correlations in the photoclick pattern that cannot be described by a single distribution Landi et al. 2024 , as illustrated in Fig. 2 (b). Crucially, it is these multi-time correlations that facilitate quantum-enhanced sensing, as they possess significant additional information about estimated parameters beyond what is available in lower-order statistics Burgarth et al. 2015 ; Kiilerich and Mølmer 2016 ; Clark et al. 2019 ; Clark et al. 2022 . As shown in Fig. 2 (b), non-renewal photoclick patterns can exhibit hierarchical correlations—where fast three-click clusters are nested within broader five-click sequences emergent at larger timescales. Formally, this corresponds to the regime where higher-order correlation functions, specifically third-order g^{(3)}(\tau_{1},\tau_{2}) or higher Mandel and Wolf 1995 , exhibit non-classical signatures. This is in stark contrast to the renewal framework, where the i.i.d. nature of the waiting times ensures that the second-order g^{(2)}(\tau) -function, being the Laplace transform of w(\tau) , completely determines all higher-order correlations; in such cases, g^{(n)} provides no information beyond what is already captured by the second-order statistics Teich et al. 1984 ; Cao 2006 . Consequently, while renewal processes may exhibit non-classical features like antibunching Paul 1982 , they are fundamentally limited for quantum-enhanced estimation as they cannot exploit the higher-order dependencies that typically drive significant sensitivity gains. However, extracting this higher-order information poses a formidable challenge; the likelihood functions for history-dependent processes are computationally intensive to evaluate, making parameter estimation significantly more difficult than for renewal processes Radaelli et al. 2024a ; Clark and Kołodyński 2025 . This overhead currently precludes the use of non-renewal TPPs in real-time applications, such as active feedback or closed-loop quantum control, where estimation must occur on timescales faster than the system dynamics. III Efficient inference from photoclick patterns Under the Bayesian paradigm, the d parameters to be estimated, \bm{\varphi}\in\mathbb{R}^{d} , are treated as random variables rather than fixed constants. Their prior distribution, p(\bm{\varphi}) , represents then the a priori knowledge about their potential values before any measurements are taken. Given a set of measurement data D , the optimal parameter estimator, \tilde{\bm{\varphi}}(D) , is typically constructed by minimising the average Mean Squared Error (MSE) Kay 1993 : \textrm{MSE}[\tilde{\theta}]\coloneqq\int\!\mathrm{d}\bm{\varphi}\,p(\bm{\varphi})\int\!\mathrm{d}D\;p(D|\bm{\varphi})\,||\bm{\tilde{\varphi}}(D)-\bm{\varphi}||^{2}, (8) where p(D|\bm{\varphi}) is the likelihood distribution—describing probability of obtaining data D given specific parameter values \bm{\varphi} —and ||\cdot|| denotes the Euclidean norm between the true parameter vector \bm{\varphi} and its estimate \bm{\tilde{\varphi}}(D) . The optimal estimator that minimises the MSE ( 8 ) is generally the mean of the posterior distribution Kay 1993 : \bm{\hat{{\varphi}}}_{\textrm{optim}}\coloneqq\mathbb{E}_{p(\bm{\varphi}|D)}[\bm{\varphi}]=\int\!\mathrm{d}\bm{\varphi}\,\bm{\varphi}\,p(\bm{\varphi}|D), (9) where the posterior distribution, representing the updated belief about the parameters \bm{\varphi} after observing the data D ( a posteriori ), is given by the Bayes’ rule Kay 1993 : p(\bm{\varphi}|D)=\frac{p(D|\bm{\varphi})p(\bm{\varphi})}{p(D)}=\frac{p(D|\bm{\varphi})p(\bm{\varphi})}{\int\!\mathrm{d}\bm{\varphi}\,p(D|\bm{\varphi})p(\bm{\varphi})}. (10) However, computing Eq. ( 10 ) is typically intractable, even numerically. While exhaustive integration or sampling over the \bm{\varphi} -parameter space can often be avoided using methods like particle filters (sequential) or Markov-Chain Monte Carlo (batch) Gilks et al. 1995 ; Murphy 2012 ; Granade et al. 2017 , these techniques remain insufficient if computing the likelihood p(D|\bm{\varphi}) itself is infeasible. This is particularly relevant for quantum systems with states spanning high-dimensional Hilbert spaces Clark and Kołodyński 2025 . In real-time scenarios, such as the photodetection scheme of Fig. 1 , calculating the likelihood requires the system state to be continuously updated in response to real-time measurement data—accounting for every individual click in the photoclick pattern in Fig. 1 . Given the complexity of non-renewal quantum systems, recall Fig. 2 (b), the challenge is not merely to optimise likelihood evaluation, but to bypass it entirely during the inference stage. In what follows, we explore likelihood-free inference methodologies that shift the computational burden away from real-time execution. First, we describe a Bayesian approach to estimation based on ABC, which circumvents the likelihood bottleneck by comparing observed data with simulated samples Clark and Kołodyński 2025 . We then present an alternative approach using DL, where the same simulated data is used to train Deep Neural Networks (DNNs) offline. While ABC naturally provides estimation errors and a reconstructed posterior, we demonstrate that DNNs can be similarly configured to provide these metrics. This allows us to use both methods as a mutual benchmark for performance in real-time quantum parameter estimation. III.1 Data preprocessing and sufficient statistics Effective data preprocessing can significantly improve the accuracy and computational efficiency of estimation tasks. Here, we treat preprocessing as the construction of summary statistics —a mapping \mathcal{S} that transforms the raw data into a lower-dimensional representation capturing its key features: \bar{D}\coloneq\mathcal{S}(D), (11) where in case of photodetection D represents a general TPP trajectory of a finite length ( D_{\ell} in Fig. 2 ) and \bar{D} denotes the preprocessed data. Within this framework, we define sufficient summary statistics as a special preprocessing \mathcal{S} that retains all information about the parameters \bm{\varphi} contained in the original data; formally, this occurs if the posterior can be expressed as: p(\bm{\varphi}|\mathcal{S}(D))=p(\bm{\varphi}|D). (12) Selecting an adequate sufficient summary statistic is non-trivial and relies heavily on the physical intuition of the problem. For instance, in any renewal TPP of Fig. 2 (a), the histogram of waiting times serves as a sufficient summary statistic. Because the waiting-time distribution, w(\tau) in Fig. 2 (a), uniquely and completely defines a renewal process, its empirical representation—the histogram—captures all the information available for estimation Clark and Kołodyński 2025 . Figure 3: Deep learning (DL) inference frameworks considered. The input of a neural network, X=\{X_{1},X_{2},\dots,X_{\ell}\} , is set to the sequence of inter-event waiting times for a given photoclick pattern D_{\ell} . The output Y is adapted to a specific statistical task: (a) Within the regression framework, the network provides point estimates of the parameter vector \tilde{\bm{\varphi}} by minimising the Mean Squared Error (MSE). (b) In the probabilistic regression framework, the network is assumed to yield a Gaussian posterior; thus, the Negative Log-Likelihood (NLL) is employed as the loss function, with the output providing both the parameter estimates and the corresponding errors covariance matrix, \Sigma_{\tilde{\bm{\varphi}}} . (c) In the classification framework, which uses Cross-Entropy (CE) as the loss function, the output directly provides a discrete grid-representation of the posterior distribution. III.2 Approximate Bayesian Computation To overcome the bottleneck of likelihood computation, we turn our attention first to likelihood-free inference, specifically Approximate Bayesian Computation (ABC). This framework bypasses direct evaluation of the likelihood function by leveraging data simulations Turner and Van Zandt 2012 ; Sisson et al. 2018 . The core logic of ABC is straightforward: rather than constructing p(D|\bm{\varphi}) from the model, we use the model as a generative engine. We draw parameter values \bm{\varphi} from the prior distribution p(\bm{\varphi}) and, for each \bm{\varphi} , simulate a synthetic trajectory D^{\prime} (or draw it from a precomputed library). We then compare the simulated dataset D^{\prime} with the observed data D using a predefined distance measure. If D^{\prime} is close enough to D to meet a set tolerance \epsilon , we retain the specific parameters \bm{\varphi} used to generate it. By aggregating these accepted parameter values, we construct an empirical distribution that faithfully approximates the posterior—provided that the number of simulated trajectories is large enough and the distance criterion is sufficiently stringent Turner and Van Zandt 2012 ; Sisson et al. 2018 . Mathematically, ABC yields an approximation of the posterior distribution in the form: q_{\epsilon}(\bm{\varphi}|D)\propto p(\bm{\varphi})\int\!\mathrm{d}D^{\prime}\;\mathbb{I}[\rho(D,D^{\prime})\leq\epsilon]\;p(D^{\prime}|\bm{\varphi}), (13) where \rho(D,D^{\prime})\geq 0 is a proper distance function quantifying dissimilarity between datasets, and \mathbb{I}[\cdot] is an indicator function that equals 1 when the condition is met and 0 otherwise. As \epsilon\to 0 , the approximation converges to the true posterior, albeit at the cost of diminishing acceptance rate—requiring more and more samples D^{\prime} to be drawn with less and less of them being accepted. In practice, it is usually infeasible to compare entire datasets directly, especially when they are high-dimensional or continuous. Instead, we identify summary statistics, \bm{\mathcal{S}}=\{\mathcal{S}_{i}\}_{i} each corresponding to a particular preprocessing in Eq. ( 11 ), designed together to be nearly sufficient such that p(\bm{\varphi}|\bm{\mathcal{S}}(D))\approx p(\bm{\varphi}|D) . As a result, Eq. ( 13 ) can be rewritten as q_{\epsilon}(\bm{\varphi}|D)\propto p(\bm{\varphi})\int\!\mathrm{d}D^{\prime}\;\mathbb{I}[\delta(\bm{\mathcal{S}}(D),\bm{\mathcal{S}}(D^{\prime}))\leq\epsilon]\;p(D^{\prime}|\bm{\varphi}), (14) where \delta is now the measure quantifying overall distance between multiple summary statistics evaluated for the two datasets, D and D^{\prime} . As before, for a sufficiently small \epsilon , the results remain accurate within a marginal error. By employing summary statistics—which can be precomputed and cached for each dataset D^{\prime} stored—the computation time of \delta(\bm{\mathcal{S}}(D),\bm{\mathcal{S}}(D^{\prime})) becomes negligible. Furthermore, as relevant summary statistics may be shared across multiple datasets, the acceptance rate is improved, thereby accelerating the sampling process. Balancing the acceptance rate against approximation accuracy is a central challenge in any ABC implementation Clark and Kołodyński 2025 . Note that acceptance criteria can be applied either to each summary statistic individually or jointly through a common, weighted threshold, as in Eq. ( 14 ). In this work, however, we set the thresholds individually for convenience whenever multiple summary statistics are used. In particular, we replace the joint indicator in Eq. ( 14 ) with a product of individual ones, \mathbb{I}[\delta(\bm{\mathcal{S}}(D),\bm{\mathcal{S}}(D^{\prime}))\leq\epsilon]\to\prod_{i}\mathbb{I}[\delta(\mathcal{S}_{i}(D),\mathcal{S}_{i}(D^{\prime}))\leq\epsilon_{i}] , allowing us to calibrate each \epsilon_{i} separately Clark and Kołodyński 2025 . III.3 Deep learning inference frameworks In recent years, the rapid evolution of Deep Learning (DL) algorithms has enabled their successful deployment across a wide spectrum of problems in quantum physics Dawid et al. 2025 , ranging from quantum state reconstruction Palmieri et al. 2024 to phase classification and anomaly detection Huembeli et al. 2018 ; Kottmann et al. 2020 , as well as in real-time estimation tasks Khanahmadi and Mølmer 2021 ; Fallani et al. 2022 ; Vaidhyanathan et al. 2024 ; Duan et al. 2025 . Here, we investigate the performance of three specific DL inference frameworks based on both regression and classification architectures Goodfellow et al. 2016 . While regression is utilised for direct point-parameter estimation and uncertainty quantification, the classification framework allows for a non-parametric reconstruction of the full posterior distribution. A comparative analysis of these schemes allows us to assess the trade-offs between computational efficiency and the fidelity of the inferred statistics in the quantum scenarios considered. As presented in Fig. 3 , here the input to the neural network is always a TPP trajectory D_{\ell} . To ensure compatibility with the ABC and enhance learning efficiency, we allow for preprocessing the raw data via a summary statistic, i.e., \bar{D}_{\ell}=\mathcal{S}(D_{\ell}) . Such a transformation can significantly improve DL performance if \mathcal{S} is chosen to distil the key dynamical features of photoclick patterns D_{\ell} . For instance, in scenarios where D_{\ell} follow a renewal process, constructing a histogram of waiting times can be highly beneficial Kiilerich and Mølmer 2014 ; Radaelli et al. 2024a ; Rinaldi et al. 2024 , as it provides a sufficient statistic for the data representation. III.3.1 MSE-based estimation as a regression problem Regression , a fundamental task in supervised machine learning, involves learning a mapping from input features to continuous-valued target variables Goodfellow et al. 2016 . The general model description is depicted in Fig. 3 (a). The model is trained by minimising the MSE between the predicted and true values across a training set \mathcal{T}=\{D^{(k)}\}_{k=1}^{\nu} of \nu independent realisations: \mathcal{L}_{\textrm{MSE}}\coloneqq\frac{1}{\nu}\sum_{k=1}^{\nu}\left|\left|\tilde{\bm{\varphi}}(D^{(k)})-\bm{\varphi}^{(k)}\right|\right|^{2}, (15) where \bm{\varphi}^{(k)} refers to the vector of true parameter values for the k -th sample and \tilde{\bm{\varphi}}(D^{(k)}) are the corresponding model’s predictions based on the input photoclick dataset D^{(k)} . Here, ||\cdot|| denotes the Euclidean distance between them. The MSE loss penalises larger errors more heavily and is standard in regression tasks due to its smoothness and convexity properties. Moreover, as demonstrated in Ref. Mingard et al. 2021 , for Stochastic Gradient Descent (SGD)-based Deep Neural Networks (DNNs), the probability of converging to a generalising function f given a training set \mathcal{T} , denoted P_{\textrm{SGD}}(f|\mathcal{T}) , closely approximates the Bayesian posterior over functions P(f|\mathcal{T}) , particularly in the overparametrised regime. This similarity also holds for variants of SGD, such as Adam, Adagrad, Adadelta, and RMSprop. In cases where the Bayesian posterior is highly biased toward simple functions, SGD-like optimisers tend to sample these simple, better-generalising functions with high probability, behaving—to first order—like Bayesian samplers. This behaviour is consistent across various architectures, including Multi-Layer Perceptrons (MLP), Convolutional Neural Networks (CNN), and Long Short-Term Memory (LSTM) networks Goodfellow et al. 2016 . Consequently, the output of a regression DNN, \tilde{\bm{\varphi}}(D)=f(D) , can be interpreted as an estimate derived from a learned mapping that structurally reflects the Bayesian posterior distribution over the function space. Hence, given that the MSE ( 8 ) is used as the training objective ( 15 ), the network converges to a point estimator that, as discussed around Eqs. ( 8 - 10 ), effectively approximates the posterior mean. III.3.2 Probabilistic regression under Gaussian approximation While standard regression models provide point estimates, typically corresponding to the posterior mean, they do not capture the structure of the posterior distribution. As a result, these models cannot quantify uncertainty or provide error estimates. A natural approach to address this limitation is through probabilistic regression methods Kneissl et al. 2025 , in which the network is forced to output also other parameters of the posterior distribution, whose form is assumed to belong to a particular class. A common and often effective way is to model the posterior distribution as approximately Gaussian Nix and Weigend 1994 ; Lakshminarayanan et al. 2017 . Under this assumption, the network can be trained to predict both the parameters \bm{\varphi} and their covariance \Sigma_{\bm{\varphi}} , as shown in Fig. 3 (b), by using the Negative Log-Likelihood (NLL) as loss function, which encourages the model to output not only the best-fit prediction but also an estimate of the associated uncertainty: \displaystyle\mathcal{L}_{\textrm{NLL}} \displaystyle\coloneqq\frac{1}{\nu}\sum_{k=1}^{\nu}\biggl[\bigl(\tilde{\bm{\varphi}}(D^{(k)})-\bm{\varphi}^{(k)}\bigr)^{T}(\Sigma^{(k)})^{-1}\times \displaystyle\qquad\times\bigl(\tilde{\bm{\varphi}}(D^{(k)})-\bm{\varphi}^{(k)}\bigr)+\frac{1}{2}\,\ln\bigl|\Sigma^{(k)}\bigr|\biggr], (16) where \tilde{\bm{\varphi}}(D^{(k)}) are the predicted parameters for the k -th data point D^{(k)} , and \Sigma^{(k)} is their predicted covariance matrix. The true value of the parameter is denoted \bm{\varphi}^{(k)} , and \nu is the total number of samples. In order to efficiently compute the loss function, the Cholesky decomposition for the covariance is used, \Sigma=AA^{T} , where A is a lower triangular matrix that can be parametrised by d(d+1)/2 values. Thus, strictly speaking, the network outputs the vector of predicted parameter values, \tilde{\bm{\varphi}} , and the predicted entries of A , from which the covariance matrix, \Sigma_{\tilde{\bm{\varphi}}} , is straightforwardly reconstructed. Figure 4: Simultaneous estimation of the driving frequency \Omega and the laser detuning \Delta for a two-level atom. We compare overall RMSEs, \sqrt{\textrm{MSE}[\tilde{\Omega}]+\textrm{MSE}[\tilde{\Delta}]} , achieved by the DL and ABC methods considered with the true RMSE ( red frame ) computed analytically, as well as the errors predicted by the methods. In each case a 2D plot of error (RMSE) is shown as a function of estimated parameter values \Delta,\Omega\in[0,2] (in units of \kappa ). Top row (from left to right) : RMSEs attained by the histogram-based regression network, Negative Log-Likelihood (NLL) histogram-based network, CNN classification network and by the ABC method. Bottom row : The true RMSE (in red) evaluated based on the waiting-time distribution followed by ( from left to right ) the error predicted by the NLL histogram-based network, CNN classification network and by the ABC method. III.3.3 Posterior reconstruction by means of classification Finally, to enable the DL model to reconstruct the posterior distribution directly without prior assumptions regarding its functional form (e.g., Gaussianity), we employ the supervised classification framework Goodfellow et al. 2016 . In this setting, the continuous parameter space is discretised into a d -dimensional grid of potential values. During training, each input photoclick pattern D^{(k)} is associated with a discrete class label corresponding to its ground-truth parameters \bm{\varphi}^{(k)} ; however, the trained network predicts a probability distribution across the entire grid, providing a discrete approximation of the full posterior, as illustrated in Fig. 3 (c) (shown in one dimension for simplicity). The model is trained using the Cross-Entropy (CE) loss: \mathcal{L}_{\textrm{CE}}\coloneqq-\sum_{k=1}^{\nu}\sum_{n=1}^{\#\textrm{nbin}}\delta_{\bm{\varphi}^{(k)},\bm{\varphi}_{n}}\log\left[q(\bm{\varphi}_{n}|D^{(k)})\right] (17) where q(\bm{\varphi}_{n}|D^{(k)}) is the output of the DNN associated with the bin labelled by n evaluated for the input D^{(k)} , whereas \bm{\varphi}_{n} are the parameter values corresponding to that bin. In App. A , we show explicitly that minimisation of the CE ( 17 ) is equivalent to minimising the Kullback-Leibler (KL) divergence between the true posterior p(\bm{\varphi}|D) and the DL-based estimate q(\bm{\varphi}|D) . Consequently, the resulting network output is a discrete probability mass function over the parameter grid, which directly approximates the posterior distribution. Importantly, this scheme bypasses the intractable evidence integral in Eq. ( 10 ), as the posterior is learned directly from a synthetic dataset sampled from the joint distribution p(D,\bm{\varphi}) (recall Sec. II.2 ). III.3.4 Neural network architectures used We evaluated several neural network architectures to identify the optimal configuration for each estimation task; further technical details are provided in App. B . For regression applied to renewal TPPs, we implement an architecture similar to that in Ref. Rinaldi et al. 2024 with preprocessing, where the initial layer computes an empirical histogram of the input waiting times. For history-dependent TPPs, we employ a network composed of LSTM layers Hochreiter and Schmidhuber 1997 , followed by a fully connected network. The LSTM cells are a form of recurrent neural network (RNN) architecture specifically designed to process sequential data Goodfellow et al. 2016 . By maintaining an internal memory that enables the model to learn complex temporal dependencies, they are well-suited for analysing history-dependent TPP trajectories. For point estimation using the MSE loss, the output layer provides a single prediction for each parameter. In the case of probabilistic regression (NLL loss), the output layer includes additional neurons to parametrise the covariance matrix. Finally, for the classification framework, we use one-dimensional convolutional layers (CNN) with max-pooling, followed by a fully connected network. The output layer represents a probability mass function over the discretised parameter grid, from which we derive point estimates by calculating either the mode or the mean of the resulting posterior distribution. III.4 Verification: Multiparameter sensing with a two-level atom To verify the ABC and DL approaches to estimation, we first test them in the simple setting of a laser-driven two-level atom, described by the Hamiltonian Breuer and Petruccione 2007 : H^{\text{atom}}=-\hbar\Delta\hat{\sigma}^{+}\hat{\sigma}^{-}+\frac{\hbar\Omega}{2}(\hat{\sigma}^{-}+\hat{\sigma}^{+}), (18) where \hat{\sigma}^{+}(\hat{\sigma}^{-}) is the atomic raising (lowering) operator. Our goal is to estimate both the laser detuning \Delta and the driving frequency \Omega . For the purpose of verification, we assume a single light detection channel of unit efficiency, as described in Sec. II.2 , with the j -index being redundant and \kappa^{\mathrm{l}}=0 . Crucially, as the atom resets to the ground state after every emission event, photoclick trajectories form a renewal TPP; hence, their statistics are fully characterised by the waiting-time distribution Carmichael et al. 1989 . Consequently, in this special case, both the likelihood and the posterior distribution can be determined analytically Kiilerich and Mølmer 2014 ; Clark and Kołodyński 2025 , providing an ideal benchmark to verify the accuracy of our likelihood-free methods. in Fig. 4 , we present the two-parameter estimation performance for the methods introduced. Since we are dealing with a renewal process, we can simplify the inference problem by incorporating data preprocessing that converts a photoclick trajectory into a histogram without losing information. We compute the relevant RMSEs attained (top row of Fig. 4 ), which should be compared with the analytical solution (bottom-left of Fig. 4 ). Moreover, we present the error predictions for the relevant methods (bottom row of Fig. 4 ). When implementing ABC (fourth column in Fig. 4 ), we include the total time as an additional summary statistic alongside the histogram to improve the efficiency of the acceptance criteria Clark and Kołodyński 2025 . In the case of classification (third column in Fig. 4 ) and its CNN implementation, we do not preprocess the data, as the network relies on convolution filters applied directly to the photoclick pattern. All tested methods show good agreement with the analytical results, for both the estimation of parameters and the prediction of errors, which underlines the multiparameter estimation capabilities of the likelihood-free ABC and DL approaches. Figure 5: Schematic of a generic optomechanical sensor. An external laser drive populates the optical cavity mode, which couples to a mechanical resonator (e.g., a vibrating mirror, a levitated nanoparticle, or a photonic crystal mode) via radiation pressure. This interaction imprints the mechanical dynamics onto the cavity field, which is then probed by monitoring the photons leaking out via photodetection. The resulting photoclick patterns provide the data for our likelihood-free inference methods. IV Results: nonlinear optomechanical sensor We now focus on the main application motivating our work, depicted schematically in Fig. 5 : a laser-driven optomechanical device Aspelmeyer et al. 2014 whose output light is measured by photodetection. Crucially, when operated in the non-linear regime—when the coupling between its optical (cavity) and mechanical (phonons) degrees of freedom is significant—the system yields non-classical multiclick correlations that can be leveraged for sensing. Moreover, these correlations can be directly controlled by varying the detuning \Delta of the laser driving the cavity Kronwald et al. 2013 ; Clark et al. 2022 . This allows us to study the capabilities of both ABC and DL inference frameworks in capturing correlations in photoclick patterns that must be described by history-dependent TPPs, as introduced in Sec. II.3 . However, in contrast to the case of the two-level atom which yields a renewal TPP, an analytic form for the likelihood or the posterior distribution—and, by extension, the minimal MSE ( 8 ) or the optimal estimator ( 9 )—is here intractable. Furthermore, the numerical complexity involved in computing these precludes a direct analysis of optimal estimation performance, as it would require evaluating averages over a vast number of photoclick trajectories. In this regard, the two likelihood-free approaches, ABC and DL, offer the first practical solutions. Applications of optomechanical devices range from external force and acceleration sensing Guha et al. 2020 ; Hälg et al. 2021 to broadband displacement and force measurements at and below the standard quantum limit Kampel et al. 2017 ; Mason et al. 2019 . More recently, schemes involving multiple sensors for distributed force sensing were demonstrated Xia et al. 2023 and proposed for dark-matter field searches Brady et al. 2023 . These applications are implemented across various platforms, including optically levitated nanoparticles Hebestreit et al. 2018 ; Tseng et al. 2025 and integrated photonic crystals Krause et al. 2012 ; Guo et al. 2017 , the latter of which frequently rely on discrete photodetection and photon-correlation statistics Cohen et al. 2015 ; Hong et al. 2017 . Typically, these scenarios involve estimating parameters ( \bm{\varphi} in Fig. 1 ) that enter the mechanical Hamiltonian in a linear fashion, while control parameters ( \bm{\mu} in Fig. 1 ) are properties of the driving laser. However, to evaluate the capacity of ABC and DL for extracting information from multiphoton correlations, we test them in a scenario where the drive detuning, \Delta , is the parameter to be estimated. While \Delta could be estimated in the absence of mechanics, its variations here directly translate into higher-order correlations emerging via the non-linear interaction with the mechanics—features we intend to capture using ABC and DL inference frameworks. IV.0.1 Optomechanical dynamics The generic optomechanical Hamiltonian relevant for the setup of Fig. 5 is given by Aspelmeyer et al. 2014 : \displaystyle\hat{H} \displaystyle=-\hbar\Delta\,\hat{a}^{\dagger}\hat{a}+\hbar\omega_{M}\,\hat{b}^{\dagger}\hat{b} (19) \displaystyle\quad+\frac{\hbar\Omega}{2}(\hat{a}+\hat{a}^{\dagger})+\hbar g\,\hat{a}^{\dagger}\hat{a}(\hat{b}+\hat{b}^{\dagger}), where \hat{a} and \hat{b} are the bosonic annihilation operators corresponding to the photonic and phononic modes, respectively. The parameter \Delta is the laser detuning, \omega_{M} is the mechanical oscillator frequency, \Omega is the laser driving strength, and g characterises the optomechanical coupling. To capture decoherence effects, we model dissipation through several decay channels. Photons leak out of the optical cavity at a rate \kappa , while the mechanical oscillator is thermally coupled to a bath, with a damping rate \gamma , allowing phonons to be spontaneously created or annihilated. The resulting evolution is described by the GKSL master equation Breuer and Petruccione 2007 : \displaystyle\frac{\mathrm{d}\hat{\rho}}{\mathrm{d}t}= \displaystyle-\frac{i}{\hbar}[\hat{H},\hat{\rho}]+\kappa\left(\hat{a}\hat{\rho}\hat{a}^{\dagger}-\frac{1}{2}\{\hat{a}^{\dagger}\hat{a},\hat{\rho}\}\right) (20) \displaystyle+\gamma(\bar{m}+1)\left(\hat{b}\hat{\rho}\hat{b}^{\dagger}-\frac{1}{2}\{\hat{b}^{\dagger}\hat{b},\hat{\rho}\}\right) \displaystyle+\gamma\bar{m}\left(\hat{b}^{\dagger}\hat{\rho}\hat{b}-\frac{1}{2}\{\hat{b}\hat{b}^{\dagger},\hat{\rho}\}\right), where \bar{m}=\left[\exp\left(\hbar\omega_{M}/k_{B}T\right)-1\right]^{-1} is the mean phonon occupation number, dictated by the mechanical frequency \omega_{M} and the temperature T of the bath. IV.0.2 Simulating photoclick patterns Following the unravelling procedure described in Sec. II.2 , we define the conditional Hamiltonian with multiple decay channels: \hat{H}_{\mathrm{cond}}=\hat{H}-\frac{i\hbar}{2}(\kappa\hat{a}^{\dagger}\hat{a}+\gamma(\bar{m}+1)\hat{b}^{\dagger}\hat{b}+\gamma\bar{m}\hat{b}\hat{b}^{\dagger}). (21) This leads to the full unravelling stochastic master equation ( II.2 ) of the form: \displaystyle\mathrm{d}\hat{\rho} \displaystyle=-\frac{i}{\hbar}[\hat{H}_{\mathrm{cond}}\hat{\rho}-\hat{\rho}\hat{H}^{\dagger}_{\mathrm{cond}}]\ \mathrm{d}t (22) \displaystyle\qquad+\mathcal{J}_{\kappa^{\mathrm{d}}}(\hat{\rho})+\mathcal{J}_{\kappa^{\mathrm{l}}}(\hat{\rho})+\mathcal{J}_{\gamma_{-}}(\hat{\rho})+\mathcal{J}_{\gamma_{+}}(\hat{\rho}), where we partition loss into detected ( \kappa^{\mathrm{d}} ) and undetected ( \kappa^{\mathrm{l}} ) channels ( \kappa^{\mathrm{d}}+\kappa^{\mathrm{l}}=\kappa ), and obtain also the jump processes, as defined in Eq. ( 7 ), responsible for phonon creation ( \gamma_{+} ) and annihilation ( \gamma_{-} ). We generate waiting-time trajectories D_{\ell} by simulating click patterns until \ell photon detections are registered, while ignoring jumps of other types. In the analysis that follows, we generate photoclick patterns by setting the optomechanical parameters to values consistent with Ref. Clark and Kołodyński 2025 , as summarised in Table 1 . These values correspond to operation in the sideband-resolved regime Aspelmeyer et al. 2014 . However, we stress that while sideband-resolved dynamics are not strictly required for the inference tasks considered Clark et al. 2022 , they provide a realistic framework for generating the non-renewal photoclick patterns analysed herein. Furthermore, this regime and the choice of red (negative) detuning, see below, align with the standard physical intuition from linear optomechanics: such a configuration is typically required in sensing applications to avoid heating the mechanical resonator during the measurement process Aspelmeyer et al. 2014 . Parameter Symbol Value Units Cavity decay rate \kappa 1 (scaled) Photon detection rate \kappa^{\mathrm{d}} 0.9 \kappa Mechanical frequency \omega_{M} 4\sqrt{2} \kappa Mechanical damping \gamma 10^{-3}\omega_{M} \kappa Optomechanical coupling g 4 \kappa Mean phonon number \bar{m} 1 — Laser driving strength \Omega 0.3\omega_{M} \kappa Detuning range \Delta [-10,0] \kappa Dark count rate (DCR) \lambda_{\text{DCR}} 10^{-2} \kappa Table 1: Optomechanical parameters assumed in photoclick pattern simulations following Ref. Clark and Kołodyński 2025 . IV.0.3 Controlling statistics of emitted photons In the non-linear regime, radiation pressure induces an energy shift proportional to the square of the cavity photon number, n_{\textrm{cav}} . This shift is reflected in the system’s energy spectrum Kronwald et al. 2013 ; Aspelmeyer et al. 2014 : E(n_{\textrm{cav}},n_{\textrm{mech}})=-\hbar\Delta\,n_{\textrm{cav}}+\hbar\omega_{M}n_{\textrm{mech}}-\hbar\frac{g^{2}}{\omega_{M}}n_{\textrm{cav}}^{2}, (23) where n_{\textrm{cav}} and n_{\textrm{mech}} are the cavity and mechanical occupation numbers, respectively. By selecting specific detuning regimes, \Delta_{n}=-n\frac{g^{2}}{\omega_{M}} (where n\in\mathbb{Z} ), one can cancel the non-linear term for a target photon number n . For n=1 , single-photon transitions are energetically favoured. For higher integers n\geq 2 , the cavity resonance is restored specifically for the n -photon manifold, forcing photons to be emitted in correlated groups of size n , resulting in bunched light in the form of pairs ( n=2 ), triplets ( n=3 ), or larger n -photon clusters Aspelmeyer et al. 2014 . These cases are a direct manifestation of photoclick patterns constituting a history-dependent TPP. The delayed mechanical response ensures that once an initial photon is emitted, the cavity remains in a favourable state for n-1 subsequent emissions. This mechanism generates the temporal multiclick correlations that contain the information about system parameters we aim to capture using ABC and DL inference frameworks. Figure 6: Root Mean Squared Error (RMSE) attained with ABC and DL-regression frameworks as a function of the true detuning \Delta . In the main plot , the ABC estimator is constructed as the mean of the reconstructed posterior ( red ), while the regression framework relies on an LSTM architecture trained on raw waiting-time trajectories ( blue ). The performance of the LSTM regressor when applied to randomly permuted input trajectories is also shown ( green ). Vertical dashed grey lines indicate the special detuning regimes ( n=1,2,3 ) associated with resonance photon statistics. The right panels display one-to-one plots of the estimated values \tilde{\Delta}_{\text{ABC}} (top) and \tilde{\Delta}_{\text{LSTM}} (bottom) against the true parameter \Delta , where colour intensity represents prediction density. The regression framework demonstrates superior accuracy, particularly in the n=3 regime; here, the performance degradation under permutation confirms the model’s ability to exploit history-dependent temporal correlations. IV.1 Estimation performance The performance of our inference frameworks—Approximate Bayesian Computation (ABC) and Deep Learning (DL) regression—is compared in Fig. 6 . Our primary objective is to minimise the average MSE ( 8 ), so we evaluate all models on their ability to approximate the posterior mean. To ensure a consistent and fair comparison, we assume a uniform (flat) prior over the parameter range, matching the distribution used to generate the training data. Crucially, the same dataset of waiting-time trajectories serves both as the training set for the neural networks and as the reference library for the ABC algorithm. We quantify the precision of our predictions using the Root (Average) Mean Squared Error (RMSE) and by inspecting one-to-one estimation plots in Fig. 6 . We observe the emergence of plateaus in one-to-one estimation and aim to reduce them through bias compensation. IV.1.1 Approximate Bayesian Computation We perform estimation over the range \Delta\in(0,10) by constructing the ABC posterior for each dataset D_{\ell} and extracting its mean as the parameter estimator. The ABC algorithm utilises two summary statistics applied to each dataset D^{\prime}_{\ell} (each consisting of \ell=80 photoclicks) drawn from the precomputed library: the average waiting time \bar{t}_{\ell}=\frac{1}{\ell}\sum_{i=1}^{\ell}t_{i} , and the L^{2} -norm between waiting-time histograms: \delta(\mathcal{S}(D_{\ell}),\mathcal{S}(D^{\prime}_{\ell}))=\sqrt{\sum_{i}(x_{i}-x^{\prime}_{i})^{2}}, (24) where \mathcal{S}(D_{\ell}) and \mathcal{S}(D^{\prime}_{\ell}) are the time-binned histograms of the waiting times for the observed and library-drawn datasets, respectively, with x_{i} and x^{\prime}_{i} denoting the corresponding bin counts. As seen in Fig. 6 (red), the RMSE attained by ABC exhibits distinct dips near all resonance values. Although the average waiting time statistic is sufficient for the n=1 regime, in the n=2 and n=3 regimes, rapid successive emissions manifest as a shift in the histogram density toward shorter intervals Clark and Kołodyński 2025 . Notably, the RMSE dip for n=3 is significantly higher than for n=1 or n=2 . This limitation suggests that while the chosen summary statistics extract relevant physical information, their reliance on aggregated data fails to capture the information contained within the temporal ordering of photon emissions that becomes critical at n\geq 3 . Detuning Regime ABC DL Summary Statistics Sufficiency Explanation Summary Statistics Learnt Verification n=1 total time \checkmark Effectively a renewal TPP. total time PCA analysis, see App. C . n=2 total time + histogram \checkmark Photon-pair emission captured by the histogram. total time + histogram Invariance to random permutations, see Fig. 6 . n=3 total time + histogram ✗ A history-dependent TPP with third order correlations. beyond histogram Strong sensitivity to trajectory ordering, see Fig. 6 . Table 2: Summary statistics crucial to each of the n=1,2,3 detuning regimes . The sufficiency of the summary statistics employed by the ABC algorithm is verified. These are compared with ones learnt by the DL model for each n . IV.1.2 Neural Network Regression To evaluate the DL-based regression approach, we trained and evaluated models based on LSTM, CNN, and Transformer architectures. Here, we present results only for the architecture that achieved the highest performance: the LSTM regressor. Further details regarding the network hyperparameters and training procedures are provided in App. B . The LSTM regressor (Fig. 6 , blue) operates directly on raw trajectories without prior physical knowledge. Its performance matches that of ABC at lower \Delta , particularly in the n=1 and n=2 regimes, but it significantly outperforms ABC at n=3 , where it yields an RMSE dip comparable to the other resonances. The equivalence at n=1 is clarified by the Principal Component Analysis (PCA) in App. C , which demonstrates that the total arrival time is the most informative feature for the network to learn in this regime. To explicitly study the role of the temporal structure learned by the LSTM, we evaluate its performance on randomly permuted trajectories (Fig. 6 , green). Comparing the blue (raw) and green (permuted) curves reveals the extent to which the network extracts information from higher-order temporal correlations. While the improvement near n=2 is negligible—confirming that the histogram statistic is largely sufficient for pair-bunching—the LSTM achieves significantly lower RMSE in the n=3 regime. Here, random permutations destroy the specific ordering critical to the n=3 manifold, where the LSTM (blue) exploits history-dependent correlations that the ABC summary statistics discard. Conversely, since the LSTM under random permutations (green) is only mildly outperformed by the ABC (red) at n=3 , this suggests that the neural network successfully captures the detuning information contained within the histogram statistics even when temporal ordering is lost. These results are summarised in Table 2 , which lists the summary statistics used by the ABC algorithm alongside those deduced for the LSTM regressor. It evaluates their respective sufficiency for the n=1,2,\text{ and }3 detuning regimes, providing an explanation for whether the chosen features are adequate to capture the underlying photoclick dynamics. IV.1.3 Mitigating Estimation Bias The right panels of Fig. 6 show the one-to-one comparison between estimated and true parameters. Both frameworks exhibit plateau-like behaviour, though the spread is markedly smaller for the LSTM. The significant degradation of ABC near n=3 highlights the limitation of histogram-based statistics in capturing high-order temporal structures. These plateaus arise because RMSE minimisation inherently prioritises low estimator variance over low bias. While this bias can be reduced—either by weighting the loss function or by using the posterior mode as the estimate—such improvements generally come at the cost of increased overall RMSE, as discussed in App. D . Figure 7: Root Mean Squared Errors (RMSEs) attained with ABC, DL-based probabilistic regression, and classification frameworks, presented alongside their predicted uncertainties as a function of the true detuning \Delta . Vertical dashed grey lines indicate the special detuning regimes ( n=1,2,3 ). Solid lines represent the RMSE for: ABC ( red , same curve as in Fig. 6 ), the LSTM regressor trained with NLL loss ( green ), and the CNN classifier ( blue ). Dashed lines indicate the predicted uncertainty for each method. The CNN classifier consistently provides the lowest RMSE while maintaining high calibration across the entire parameter range; in particular, at n=2 —where all three methods achieve comparable RMSE—the ABC framework ( red ) heavily overestimates its RMSE. Similarly, the LSTM regressor based on NLL also fails to accurately predict its error in this regime, albeit less severely, whereas the CNN continues to provide a reasonable self-estimate of its error. Overall, the LSTM regressor ( solid green ) outperforms the ABC framework in terms of both RMSE and uncertainty calibration across the entire parameter range. However, it is surpassed by the CNN classifier at n=3 , where the Gaussian approximation of the posterior fails to capture the non-Gaussian statistics associated with photons being emitted in triplets. IV.2 Estimation with predicted uncertainty To further assess the performance and reliability of our inference frameworks, we employ estimation procedures that not only provide point estimates but also meaningful measures of predictive uncertainty. These quantifiers enable us to evaluate the calibration of each framework—defined by how closely the predicted uncertainty aligns with the actual spread of estimation errors (RMSE). By analysing the interplay between estimates and their associated uncertainties, we identify where specific frameworks fail to capture the underlying physics of the photoclick trajectories. IV.2.1 Approximate Bayesian Computation In Fig. 7 , we supplement the ABC RMSE curve (solid red, same as in Fig. 6 ) with the average variance of its reconstructed posterior (dashed red). Ideally, if the true posterior were exactly reproduced, these two curves would coincide, as the posterior variance should accurately represent the expected estimation error. We observe that at the n=2 resonance, the ABC framework heavily overestimates its uncertainty. This discrepancy indicates that the reconstructed posterior is significantly broader than the actual distribution of estimation errors. Such a mismatch suggests that while the chosen histogram statistics are sufficient to minimise the average error, they have not been sufficiently fine-tuned to fully capture the true shape and width of the posterior. This failure to reproduce the posterior width demonstrates that aggregated summary statistics discard higher-order information (here, two-photon correlations) necessary for a precise probabilistic characterisation of the system, even in regimes where the point-estimate accuracy is relatively high. IV.2.2 Probabilistic regression assuming Gaussianity Estimating predictive uncertainty via probabilistic regression is often based on the assumption that the posterior distribution is approximately Gaussian Kneissl et al. 2025 . Under this framework, the model is trained using a Negative Log-Likelihood (NLL) loss to provide both a predicted mean and variance, as described in Fig. 3 (b). In Fig. 7 , we present the results for the NLL-based LSTM regressor in green. While the RMSEs, as well as the uncertainty calibration, are improved compared to the ABC method across the entire parameter range, the Gaussian assumption introduces inherent limitations. At n=2 , the predicted error (dashed green) is closer to the true RMSE than the ABC estimate, yet it remains significantly overestimated, indicating that the Gaussian constraint is still too rigid to perfectly match the posterior width. More notably, in the n=3 regime, while the results appear relatively well-calibrated, the attained RMSE (solid green) is significantly higher than that of the MSE-trained LSTM regressor shown in Fig. 6 in blue. This demonstrates that forcing the model to produce a Gaussian-calibrated uncertainty estimate at n=3 comes at the cost of point-estimate accuracy, as the Gaussian form fails to capture non-Gaussian statistics associated with three-photon correlations. IV.2.3 Posterior reconstruction by classification By utilising the classification framework, we perform non-parametric posterior reconstruction by treating the network’s binned output as a probability distribution over the estimated parameter, as introduced in Fig. 3 (c). The results, shown in blue in Fig. 7 , demonstrate that this approach indeed avoids the accuracy-calibration trade-off encountered in probabilistic regression at the cost of high-dimensional network output. Notably, the CNN classifier provides point estimates that achieve almost the same RMSE as the MSE-based LSTM regressor (blue curve in Fig. 6 ) across the entire range of the estimated detuning \Delta . Unlike the previous methods, the predicted error (dashed blue) for the classifier closely tracks the attained RMSE (solid blue) even at the n=2 and n=3 resonances. This high degree of calibration highlights the model’s success in capturing the non-Gaussianity of the posterior, particularly for \Delta\in(3.5,6.5) . By bypassing the restrictive Gaussian assumption, the classification framework successfully exploits the three-photon statistics embedded in the photoclick trajectories, delivering a more reliable measure of uncertainty than both ABC and Gaussian regression. Figure 8: Posterior distribution reconstruction for representative photoclick trajectories across the n=1,2,\text{ and }3 resonance regimes. Each subplot compares the ground-truth posterior distribution ( black ) with the distributions reconstructed using ABC ( red ) and the CNN classifier ( blue ). The subplots also display the Bhattacharyya coefficient \mathcal{F} for both methods, quantifying the reconstruction fidelity. The comparison visualises the limitations of ABC at higher resonances—specifically the overestimation of variance at n=2 (cf. Fig. 7 ) and the failure to concentrate on the true parameter value at n=3 (cf. Fig. 6 )—which arise because ABC relies on aggregated statistics. In contrast, the CNN closely approximates the true posterior in all regimes, including n=3 at which it is able to learn the history-dependent features of the full photoclick trajectories. IV.3 Posterior reconstruction analysis Having estimated the posterior distribution via both ABC and the CNN classifier, we now evaluate how effectively these methods reconstruct the true posterior density. To establish a ground truth for comparison, we compute the exact posterior distributions using a brute-force simulation approach Clark et al. 2022 for a small number of photoclick trajectories. The results are visualised in Fig. 8 (a–c), where we present a representative trajectory for each of the n=1,2,\text{ and }3 regimes, respectively. Similarly to Ref. Clark and Kołodyński 2025 , we quantify the fidelity of the posterior reconstruction using the Bhattacharyya coefficient : \mathcal{F}\left[p,q|D_{\ell}\right]:=\int\!\mathrm{d}\Delta\,\sqrt{p\!\left(\Delta|D_{\ell}\right)q\!\left(\Delta|D_{\ell}\right)}, (25) where p\!\left(\Delta|D_{\ell}\right) represents the ground-truth posterior and q\!\left(\Delta|D_{\ell}\right) is the posterior reconstructed by either ABC or the CNN classifier. We observe that the CNN consistently outperforms ABC across all three resonance regimes ( n=1,2,3 ), capturing the shape of the true posterior with high accuracy and achieving superior values of \mathcal{F} . In the n=1 regime, Fig. 8 (a), both methods produce posteriors that are very similar to the ground truth. However, at the n=2 resonance in Fig. 8 (b), while the ABC framework provides a reasonably accurate point estimate, it is visually apparent from the shape of the distribution that the posterior variance is significantly overestimated. The disparity is most pronounced at n=3 , shown in Fig. 8 (c), where ABC fails to capture both the true parameter value and the width of the distribution due to its lack of access to higher-order temporal correlations. In contrast, the CNN closely approximates then the true posterior by learning the history-dependent features within each specific photoclick pattern. All the above observations are entirely consistent with the RMSE and predicted uncertainty results presented previously in Fig. 7 . Figure 9: Root Mean Squared Error (RMSE) estimation with and without dark counts at a relatively high rate (see the main text) of \lambda_{\text{DCR}}=10^{-2} (in units of \kappa ) as a function of the parameter value \Delta for ABC ( red ), the CNN classifier ( blue ), and the LSTM regressor ( green ). Solid lines represent the original noise-free datasets, while dashed lines indicate results including dark counts. For ABC and the LSTM, performance degradation is almost exclusively confined to the n=3 regime, whereas the CNN exhibits a slight increase in RMSE across all regimes. This suggests that the CNN is currently the least robust of the three; however, this should be attributed to the fact that its training has not yet saturated for the photoclick library considered, the size of which is kept constant across all methods to ensure a fair comparison. IV.4 Robustness to dark counts To assess the practical applicability of our inference frameworks, we evaluate their performance in the presence of dark counts Cohen et al. 2015 ; Fiaschi et al. 2021 ; Galinskiy et al. 2020 . These random detections follow a Poisson process at a rate \lambda_{\text{DCR}} dictated by thermal or electronic fluctuations. In order to consider a significant noise scenario, we follow the experimental case of Ref. Galinskiy et al. 2020 , in which only the photons associated with the anti-Stokes sideband are detected. This leads to an increased effective dark-count rate (DCR) of 15.5\pm 0.5 Hz, which for the \kappa/2\pi=2.1 kHz applicable to that setup, yields \lambda_{\text{DCR}}\approx 10^{-2}\kappa . Depending on the estimated detuning \Delta , this results in approximately 10 to 30 dark counts per each 80-click trajectory D_{\ell} in our library. In Fig. 9 , we compare the resulting RMSE degradation for ABC ( red ), the CNN classifier ( blue ), and the LSTM regressor ( green ). Both ABC and the LSTM are remarkably resilient in the n=1 and n=2 regimes, with performance degradation almost exclusively confined to the n=3 resonance. In contrast, the CNN exhibits a slight increase in RMSE across all regimes. This relative sensitivity is attributed to the fact that the CNN training has not yet saturated given the size of the photoclick library considered; while the LSTM has already converged, the more demanding CNN architecture would require a larger dataset to achieve similar noise resilience. We maintain a constant library size across all methods to ensure a fair comparison. Despite the introduction of significant noise, we observe a clear dip in the RMSE at n=3 for all methods, while the DL frameworks continue to outperform the ABC approach there by learning higher-order click correlations. Furthermore, we emphasise that for typical experiments employing modern photodetectors where \lambda_{\text{DCR}}\leq 1 Hz, the increase in estimation error due to dark counts is negligible. Indeed, our numerical tests at lower rates of 10^{-3}\kappa and 10^{-4}\kappa showed no observable change in the RMSE curves, rendering the impact of noise effectively imperceptible on the scale shown in Fig. 9 . V Conclusions and outlook In this work, we introduced a novel framework for parameter estimation in non-linear quantum sensors involving photodetection by leveraging likelihood-free inference. Specifically, we developed and compared two distinct approaches: Approximate Bayesian Computation (ABC) and various Deep Learning (DL) architectures. By systematically evaluating MSE-based regression, NLL-based regression with uncertainty estimation, and CE-based classification, we demonstrated that the optimal neural network design depends non-trivially on the specific estimation task and the statistical structure of the photoclick patterns observed. Our results show that while both likelihood-free methods are effective, the DL models consistently outperform the ABC approach in estimation accuracy. This is particularly evident in photon-bunching regimes ( n=2,3 ), where the networks autonomously extract and exploit relevant history-dependent quantum correlations from raw measurement data without requiring explicit prior knowledge of the system’s underlying non-renewal dynamics. Once trained, the DL models achieve a 1000-fold speed-up in inference time compared to ABC ( \sim 25 ms versus \sim 2 s per trajectory). Furthermore, our robustness tests confirmed that both frameworks maintain high precision even under significant dark-count noise, further validating their practical applicability for realistic experimental conditions. The primary motivation for employing such sensors, particularly in the context of optomechanics, is the high-precision estimation of external parameters and forces. Optomechanical platforms, ranging from cryogenic membranes to levitated nanospheres, have already proven to be formidable tools for sensing displacements, masses, and accelerations Barzanjeh et al. 2021 ; Cripe et al. 2019 ; Guha et al. 2020 ; Hälg et al. 2021 ; Kampel et al. 2017 ; Mason et al. 2019 ; Xia et al. 2023 . Our work represents a critical first step in this direction; by identifying the likelihood-free tools best suited to capturing non-classical photon statistics, we provide the necessary toolkit for real-time sensing applications. Looking ahead, we aim to transition from fixed-length trajectory analysis to real-time, event-by-event estimation. This could be achieved by developing Reinforcement Learning (RL) frameworks that update parameter estimates with each detected photon, enabling truly adaptive quantum sensing Cimini et al. 2023 ; Belliardo et al. 2024a ; Belliardo et al. 2024b —a capability particularly valuable for tracking time-varying forces or weak gravitational fields Qvarfort et al. 2018 . Such an approach would allow for the estimation of coupled optomechanical dynamics where mechanical displacement encodes external force information, even in the presence of back-action effects Cripe et al. 2019 . Finally, while we have demonstrated the practical efficacy of these estimators, a rigorous comparison against fundamental precision limits remains an open challenge. Specifically, future research should evaluate these methods against Bayesian Cramér-Rao bounds (BCRB) van Trees 1968 , which could potentially be derived via Gillespie-type algorithms for jump processes Radaelli et al. 2024a ; Radaelli et al. 2024b . Computing the Fisher information for photoclick trajectories is computationally demanding, as it requires monitoring both the conditional reduced state and its derivative Gammelmark and Mølmer 2013 ; Albarelli et al. 2018 . Furthermore, the question of whether photodetection constitutes the optimal measurement for a given quantum sensing task remains to be addressed. In the ideal case of pure states and fully monitored channels, this could be explored via the global Quantum Fisher Information (QFI) Gammelmark and Mølmer 2014 ; Albarelli et al. 2018 ; Ilias et al. 2022 ; Yang et al. 2023 . However, such computations are significantly more complex for high-dimensional systems (i.e. optomechanics), especially when accounting for unobserved degrees of freedom. Notably, this task has only recently been approached by leveraging Matrix Product Operator (MPO) representations Cirac et al. 2021 to describe the combined state of the sensor and emitted light with some unobserved degrees of freedom traced out Khan et al. 2025 ; Yang et al. 2025 . We leave the integration of these theoretical benchmarks into our framework for future investigation. Code Availability We provide the complete source code and data used for this study at git . Acknowledgements. We would like to thank Pierre Rouchon, Patrick P. Potts, Piotr Grochowski, Marco Genoni and Klaudia Dilcher for insightful comments and suggestions. The "Novel applications of signal processing methods in quantum sensing" project is carried out within the FIRST TEAM programme of the Foundation for Polish Science co-financed by the European Union under the European Funds for Smart Economy 2021-2027 (FENG) [MM, JK]. This research is supported by the National Research Foundation, Singapore, under its Competitive Research Programme (CRP30-2023-0033) and A*STAR under its Quantum Innovation Centre (Q.InC) Strategic Research and Translational Thrust. Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not reflect the views of National Research Foundation, Singapore and A*STAR [LAC]. CNN Classifier Layer Output shape Activation Conv1D (80, 32) LeakyReLU Batch Norm - - MaxPool1D (26, 32) - Conv1D (26, 64) LeakyReLU Batch Norm - - MaxPool1D (8, 64) - Conv1D (8, 64) LeakyReLU Batch Norm - - MaxPool1D (2, 64) - Flatten 128 - Dense 200 LeakyReLU Dense 101 SoftMax Trainable params. 83,637 LSTM Regressor Layer Output shape Activation LSTM (80, 40) - LSTM 40 LeakyReLU Batch Norm - - Dense 64 LeakyReLU Dense 16 LeakyReLU Dense 1 - Trainable params. 23,441 Table 3: Architecture details of the LSTM regressor and CNN classifier models. \begin{overpic}[Figs/PCA_main_plot.pdf] \put(72.0,5.5){\includegraphics[width]{Figs/PCA_stacked_subplots.pdf}} \put(79.5,4.5){\scriptsize PCA Comp 1} \put(41.0,-1.5){\large PCA Component 1} \put(-1.0,14.0){\rotatebox{90.0}{\large PCA Component 2}} \put(71.0,8.0){\rotatebox{90.0}{\scriptsize PCA Comp 2}} \put(71.0,20.0){\rotatebox{90.0}{\scriptsize PCA Comp 2}} \put(71.0,31.5){\rotatebox{90.0}{\scriptsize PCA Comp 2}} \put(76.0,39.5){\footnotesize$n=3$} \put(76.0,27.5){\footnotesize$n=2$} \put(76.0,16.0){\footnotesize$n=1$} \put(99.0,15.0){\rotatebox{90.0}{\Large$\Delta$ (units of $\kappa$)}} \put(76.0,8.5){\footnotesize(a)} \put(76.0,20.0){\footnotesize(b)} \put(76.0,32.0){\footnotesize(c)} \end{overpic} Figure 10: Principal Component Analysis (PCA) of the optomechanical dataset. The main panel shows the dataset projected onto the first two principal components, with points colour-coded by the detuning parameter \Delta . The first principal component (PC1) predominantly represents the total trajectory time, as the system quickly reaches a steady state where all entries contributing to PC1 become nearly identical. The spread along the PC1 axis thus reflects variations in total time for varying \Delta . Insets (a),(b) and (c) display selected regions corresponding to special detuning regimes n=1,2 and 3 , respectively. Distinct clustering patterns, particularly visible for n=1 , highlight how total time serves as a discriminative feature across regimes. The exact detuning values yielding n=1,2 and 3 are indicated in black on the colour bar. Appendix A Equivalence between Cross-Entropy and KL divergence minimisation To quantify the similarity between the ground-truth “reference” distribution p(\varphi) and the network-estimated “model” distribution q(\varphi) , one may employ the forward ( p\to q ) Kullback-Leibler (KL) divergence defined as: D_{\text{KL}}(p\parallel q)\coloneqq\mathbb{E}_{p}\left[\log\frac{p(\varphi)}{q(\varphi)}\right]=\int\!d\varphi\,p(\varphi)\log\frac{p(\varphi)}{q(\varphi)}, (26) where \mathbb{E}_{p} denotes the expectation value with respect to the reference distribution p . Within the classification-based inference framework, p represents the target distribution over the ground-truth labels. Specifically, given a discrete grid defining the parameter labels \varphi_{i} and an input dataset D generated with \varphi=\varphi_{\text{true}} , the reference is represented by an empirical distribution p(\varphi_{i}|D)=\delta_{\varphi_{i},\varphi_{\text{true}}} . On the other hand, q is the network output, i.e., the model’s predicted probability mass function q(\varphi_{i}|D) , which aims to approximate the true posterior distribution. Omitting the conditioning on the input D for brevity, the empirical KL divergence then reads: \displaystyle D_{\text{KL}}(p\parallel q) \displaystyle=\sum_{i}\left[p(\varphi_{i})\log p(\varphi_{i})-p(\varphi_{i})\log q(\varphi_{i})\right] \displaystyle=-H(p)+\mathcal{L}_{\textrm{CE}}(p,q), (27) where H(p)\coloneqq-\sum_{i}p(\varphi_{i})\log p(\varphi_{i}) is the Shannon entropy of the reference distribution, and \mathcal{L}_{\textrm{CE}}(p,q)=-\sum_{i}p(\varphi_{i})\log q(\varphi_{i}) is the Cross-Entropy (CE) between reference and model distributions, defined in Eq. ( 17 ). In our training scheme, the distribution p(\varphi) is fixed by each input dataset D . Consequently, H(p) is a constant with respect to the neural network parameters \bm{\theta} , and its gradient vanishes, \nabla_{\bm{\theta}}H(p)=0 . Minimising the CE loss during training is therefore mathematically equivalent to minimising the KL divergence: \arg\min_{\bm{\theta}}\mathcal{L}_{\textrm{CE}}(p,q_{\bm{\theta}})=\arg\min_{\bm{\theta}}D_{\text{KL}}(p\parallel q_{\bm{\theta}}). (28) This confirms that the classification framework yields a network that approximates the true posterior distribution by minimising the information-theoretic distance between the predicted and actual probability masses. Appendix B Summary of neural network parameters used for the optomechanical system In Table 3 , we provide the summary of NN architectures and their specs using the standard convention (see, e.g., Ref. Goodfellow et al. 2016 ) necessary for the reconstruction of the main results concerning the optomechanical system. Figure 11: Parameter estimation across various inference frameworks. Comparison of parameter estimation for different detunings, \Delta_{\text{True}}\in[0,10] , when leveraging ABC (left), regression (middle), or classification (right) methods. Each subplot displays the joint distribution of the true parameter \Delta_{\text{True}} (horizontal axis) and its estimator \tilde{\Delta} (vertical axis) provided by a given method. The colour intensity indicates the density of estimates, with lighter regions denoting higher frequencies; the dashed diagonal line represents ideal estimation. Left column (ABC) : Estimator \tilde{\Delta} provided by either the mean (top) or mode (bottom) of the reconstructed posterior, using total time and the waiting-time histogram as summary statistics. Middle column (regression) : LSTM-based regression employing a standard MSE loss (top) or a modified loss function designed to mitigate bias (bottom). Right column (classification) : CNN-based classification with point estimates being provided either by the mean (top) or the mode (bottom) of the predicted posterior distribution. Appendix C PCA of the optomechanical dataset To gain insight into the features leveraged by the deep learning model for parameter estimation, we perform a Principal Component Analysis (PCA) on the input data (see Fig. 10 ). PCA identifies orthogonal directions—principal components—along which the data exhibits maximal variance, providing a compact representation of the data’s dominant structure. In the main panel of Fig. 10 , we project the dataset onto the first two principal components, with each point colour-coded by the detuning parameter \Delta . The first principal component (PC1), associated with the largest eigenvalue, closely corresponds to a rescaled sum over all elements of the input vectors. Physically, the projection onto PC1 effectively represents the total time of each trajectory. This behaviour arises because, after a brief transient period, the system rapidly reaches its steady state, at which point all entries contributing to PC1 become nearly identical. Consequently, the PCA primarily captures variations in the cumulative waiting times that compose each trajectory, making PC1 a natural representation of the total time. The spread of points along the PC1 axis reflects changes in the trajectory’s total time for different detunings \Delta . Meanwhile, the inset plots in Fig. 10 (a–c) display data subsets corresponding to special photon regimes n=1,2 and 3 . Distinct clustering patterns emerge, particularly for n=1 , where trajectories are well separated from those in the n=2 and n=3 regimes. This observation indicates that when estimating detuning values in the n=1 regime, the total time can serve as a sufficient statistics. Appendix D Reducing bias in estimation As an additional analysis, we compare different inference methods in terms of their parameter estimation behaviour, visualised via 2D density plots in Fig. 11 . These plots map the relationship between the true detuning value \Delta and the corresponding estimated value \tilde{\Delta} across multiple trials, allowing for a visual assessment of the inference structure. In Bayesian parameter estimation, one typically chooses between the mean or the mode of the posterior distribution as the point estimator. While the mean is theoretically optimal under the MSE loss, the mode often yields more representative values in cases of skewed or multimodal distributions. Using ABC to reconstruct the posterior distribution and taking its mean as the parameter estimator (Fig. 11 , top-left), we observe distinct horizontal regions—plateaus—specifically around the n=1,2, and 3 regimes. These plateaus indicate a lack of sensitivity to changes in the true parameter. Interestingly, these artefacts disappear (at the cost of a slightly higher MSE) when the mode of the reconstructed posterior is used instead (Fig. 11 , bottom-left). A similar behaviour is observed when reconstructing the posterior with a CNN (Fig. 11 , bottom-right). Nonetheless, because the CNN is capable of learning higher-order correlations between photoclicks, its performance significantly exceeds that of ABC in the n=3 regime, when interpreting the posterior mean as the estimator \tilde{\Delta} (Fig. 11 , top-right). Regarding the LSTM regressor trained with a standard MSE loss (Fig. 11 , top-middle), the appearance of plateaus suggests that the network is effectively learning to approximate the posterior mean. To understand and mitigate this effect, we consider the decomposition of the MSE Wackerly et al. 2001 : \textrm{MSE}(\hat{\Delta})=\text{Var}(\hat{\Delta})+\left[\text{Bias}(\hat{\Delta},\Delta)\right]^{2}, (29) where \Delta is the true parameter and \hat{\Delta} is its estimate. The emergence of plateaus in all top plots Fig. 11 indicates that these architectures prioritise low variance at the expense of high bias in certain parameter regions. To address this issue in regression, we introduce a modified loss function that explicitly balances bias and variance via a weighting factor \lambda , i.e.: \textrm{MSE}_{\lambda}(\hat{\Delta})=\lambda\;\text{Var}(\hat{\Delta})+\left[\text{Bias}(\hat{\Delta},\Delta)\right]^{2}. (30) With \lambda=0.8 (favouring bias reduction), the LSTM regressor yields a smoother estimator (Fig. 11 , bottom-middle), significantly reducing plateau artefacts and mirroring the behaviour when it is rather the mode of posterior used as the estimator \tilde{\Delta} . Despite the improved qualitative behaviour, this modification does not lead to a significant reduction in the Root Mean Squared Error (RMSE). Nonetheless, this analysis provides insight into how does the objective function design dictates the structure of learned estimators and demonstrates how different posterior summary statistics (mean vs. mode) manifest in learning-based inference.