This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

\equalcont

These authors contributed equally to this work.

\equalcont

These authors contributed equally to this work.

[2,5]\fnmLijing \surShao

1]\orgdivDepartment of Astronomy, School of Physics, \orgnamePeking University, \orgaddress\streetNo. 5 Yiheyuan Road, \cityBeijing, \postcode100871, \stateBeijing, \countryChina

2]\orgdivKavli Institute for Astronomy and Astrophysics, \orgnamePeking University, \orgaddress\streetNo. 5 Yiheyuan Road, \cityBeijing, \postcode100871, \stateBeijing, \countryChina

3]\orgdivSchool of Physics, \orgnameDalian University of Technology, \orgaddress\streetNo. 2 Linggong Road, \cityDalian, \postcode116024, \stateLiaoning, \countryChina

4]\orgdivInstitute for Gravitational Wave Astronomy, \orgnameHenan Academy of Sciences, \orgaddress\streetNo. 228 Chongshili Road, \cityZhengzhou, \postcode450046, \stateHenan, \countryChina

5]\orgdivNational Astronomical Observatories, \orgnameChinese Academy of Sciences, \orgaddress\street20A Datun Road, \cityBeijing, \postcode100012, \stateBeijing, \countryChina

A practical Bayesian method for gravitational-wave ringdown analysis with multiple modes

\fnmYiming \surDong ydong@pku.edu.cn    \fnmZiming \surWang zwang@pku.edu.cn    \fnmHai-Tian \surWang wanght9@dlut.edu.cn    \fnmJunjie \surZhao junjiezhao@hnas.ac.cn    lshao@pku.edu.cn [ [ [ [ [
Abstract

Gravitational-wave (GW) ringdown signals from black holes (BHs) encode crucial information about the gravitational dynamics in the strong-field regime, which offers unique insights into BH properties. In the future, the improving sensitivity of GW detectors is to enable the extraction of multiple quasi-normal modes (QNMs) from ringdown signals. However, incorporating multiple modes drastically enlarges the parameter space, posing computational challenges to data analysis. Inspired by the \mathcal{F}-statistic method in the continuous GW searches, we develope an algorithm, dubbed as FIREFLY, for accelerating the ringdown signal analysis. FIREFLY analytically marginalizes the amplitude and phase parameters of QNMs to reduce the computational cost and speed up the full-parameter inference from hours to minutes, while achieving consistent posterior and evidence. The acceleration becomes more significant when more QNMs are considered. Rigorously based on the principle of Bayesian inference and importance sampling, our method is statistically interpretable, flexible in prior choice, and compatible with various advanced sampling techniques, providing a new perspective for accelerating future GW data analysis.

Since the detection of the first gravitational wave (GW) event [1], we have opened new avenues for advancing our understanding of gravity [2, 3], cosmology [4], and astrophysics of compact stars [5, 6]. The final stage of binary black hole (BH) mergers, known as ringdown, describes the progression of remnants to the stable phase, offering a unique opportunity to study BH theories, such as the no-hair theorem [7], the BH area law [8], and properties of the event horizon [9]. A ringdown signal is usually modelled as the superposition of quasi-normal modes (QNMs) of the remnant BH, which can be further divided into spin-weighted spheroidal harmonics with angular indices (,m)(\ell,m). Each set of (,m)(\ell,m) contains a series of overtone modes, indexed by nn [10, 11]. The extraction and measurement of multiple QNMs provide unparalleled opportunities for studying BHs, known as the BH spectroscopy [12, 11].

The parameter inference of GW signals is mainly based on the Bayes’ theorem,

P(x|d)=P(d|x)P(x)P(d)=(x)π(x)𝒵,P(x|d)=\frac{P(d|x)P(x)}{P(d)}=\frac{{\mathcal{L}}(x)\pi(x)}{{\mathcal{Z}}}\,, (1)

where in the second equality, we have introduced the terminologies in the Bayesian inference: π(x)P(x)\pi(x)\equiv P(x) is called the prior, representing the knowledge of the model parameters xx before observing the data dd; the likelihood (x)P(d|x){\mathcal{L}}(x)\equiv P(d|x) is determined by the model, encoding the statistical relation between the parameter and the data; the denominator 𝒵P(d){\mathcal{Z}}\equiv P(d) is called evidence, which can also be regarded as the normalization factor of the numerator according to the law of total probability, 𝒵=π(x)(x)dx{\mathcal{Z}}=\int\pi(x){\mathcal{L}}(x){\rm{d}}x. The posterior distribution P(x|d)P(x|d) is the conditional probability of parameters given the data, representing the measurement of parameters after the observation. Therefore, given the prior and the likelihood, the Bayesian inference calculates the posterior distribution according to Eq. (1). However, obtaining an analytical expression (or an efficient numerical formula) of the posterior is usually unfeasible, and a more practical approach is to sample from the posterior distribution and estimate the evidence as an alternative. There are already some techniques to carry out this, such as the Markov-Chain Monte Carlo (MC) [13, 14] and nested sampling methods [15, 16]. These methods partially reduce the difficulty of posterior calculations, but the computational cost is still high when sampling in high-dimensional parameter spaces.

Currently, a typical Bayesian analysis of GW signals can take several hours to days, depending on the number of parameters and the adopted waveform templates. In the future, the next-generation (XG) ground-based GW detectors, such as the Cosmic Explorer (CE) [17, 18] and the Einstein Telescope (ET) [19, 20], will be observing with one order of magnitude higher sensitivity than the current ones, while the near-future space-based detectors, such as the Laser Interferometer Space Antenna (LISA) [21], Taiji [22] and TianQin [23], are expected to detect GWs in the millihertz band. It will become feasible to extract multiple QNMs from ringdown signals [24, 25, 26]. Each QNM component is described by a damping harmonic oscillator consisting of four parameters: amplitude, phase, damping time, and oscillation frequency [27]. In the General Relativity, the latter two parameters are determined by the final mass and spin of the remnant BH. Therefore, adding one QNM mode to ringdown signals increases the dimension of the parameter space by two, and extracting multiple QNMs leads to a challenge in the data analysis. The computational costs are even more prohibitive in tests of no-hair theorem with multiple QNMs, where each mode introduces four free parameters [24, 25, 26].

In this work, we propose an algorithm, named FIREFLY (\mathcal{F}-statistic Inspired REsampling For anaLYzing GW ringdown signals), to accelerate the Bayesian analysis of parameter estimation. This algorithm is inspired by the \mathcal{F}-statistic method in the continuous GW searches, which reduces the computational cost by maximizing the likelihood over the extrinsic parameters [28]. In the FIREFLY, the amplitude and phase parameters in the QNMs are analytically marginalized under a specifically chosen prior, reducing the dimensionality of parameter space [29, 30]. Using this auxiliary step, the inference under the target prior can be efficiently performed by importance sampling. In our work, the FIREFLY algorithm reduces the computational time from several hours to a few minutes, while producing consistent posterior distribution and evidence as in the traditional full-parameter Bayesian inference.

FIREFLY does not refine the sampling technique itself, instead, it utilizes the special form of the likelihood and designs more efficient sampling strategies to accelerate the posterior calculation. Compared to the pure \mathcal{F}-statistic-based methods, which implicitly assume some specific priors [31, 32, 29, 30], FIREFLY is flexible in prior choices because of its efficient importance-sampling design. Compared to current machine-learning-based accelerating algorithms for Bayesian GW data analysis [33, 34, 35, 36], FIREFLY only utilizes the marginalization and resampling techniques in Bayesian analysis, offering a clear and intuitive statistical interpretability. Moreover, any future improvements in the stochastic sampling technique can be incorporated into FIREFLY, further accelerating the inference.

Now we explain the logic of FIREFLY. The recorded GW strain of a ringdown signal is expressed as [27, 30],

h(t)=mnj=1,2Bmn,jgmn,j(t),h(t)=\sum_{\ell mn}\,\sum_{j=1,2}B^{\ell mn,j}g_{\ell mn,j}(t)\,, (2)

where Bmn,1=AmncosϕmnB^{\ell mn,1}=A_{\ell mn}\cos\phi_{\ell mn} and Bmn,2=AmnsinϕmnB^{\ell mn,2}=A_{\ell mn}\sin\phi_{\ell mn} are reparameterization of the QNM amplitude AmnA_{\ell mn} and phase ϕmn\phi_{\ell mn}, while gmn,j(t)g_{\ell mn,j}(t) depends on other source parameters, denoted as 𝜽{\bm{\theta}}. Assuming a stationary and Gaussian noise, one finds that the likelihood has a Gaussian form with respect to 𝑩{\bm{B}} [30]

ln=12[(BμB^μ)Mμν(BνB^ν)+d|d],\ln\mathcal{L}={\cal F}-\frac{1}{2}\Big{[}\big{(}B^{\mu}-\hat{B}^{\mu}\big{)}M_{\mu\nu}\big{(}B^{\nu}-\hat{B}^{\nu}\big{)}+\langle d|d\rangle\Big{]}\,, (3)

where BμB^{\mu} represents the unified notation for Bmn,jB^{\ell mn,j}, d|d\langle d|d\rangle is noise-weighted inner product of the observed data dd, while {\mathcal{F}}, B^μ\hat{B}^{\mu}, and MμνM_{\mu\nu} are functions of 𝜽{\bm{\theta}} but independent of 𝑩{\bm{B}} (see Methods for more details). Based on this Gaussian-form likelihood, FIREFLY aims to accelerate the Bayesian inference, by computing the posterior distribution and evidence given the likelihood (3) and the prior π(𝜽,𝑩|)\pi({\bm{\theta}},{\bm{B}}|{\otimes}) in a target inference problem.

The FIREFLY algorithm mainly composes of two steps: auxiliary inference and importance sampling. In the auxiliary inference, the prior for 𝜽{\bm{\theta}} is chosen as the same as the target inference, denoted as π(𝜽)\pi({\bm{\theta}}), while the prior for 𝑩{\bm{B}} is chosen to be independent of 𝜽{\bm{\theta}} and flat in 𝑩{\bm{B}} with a large-enough range, π(𝑩|𝜽,)=πB\pi({\bm{B}}|{\bm{\theta}},{\varnothing})=\pi_{B}. Note that we use {\otimes} and {\varnothing} to distinguish the target and auxiliary priors. Under the auxiliary prior, the QNM parameters can be analytically marginalized, leaving an inference problem only involving 𝜽{\bm{\theta}}. The marginal likelihood for 𝜽{\bm{\theta}} reads

m(𝜽)=πB(2π)Ne12d|ddet(M1)e,\displaystyle{\mathcal{L}}^{m}_{\varnothing}({\bm{\theta}})=\pi_{B}(2\uppi)^{N}e^{-\frac{1}{2}\langle d|d\rangle}\sqrt{{\rm det}\big{(}M^{-1}\big{)}}e^{{\mathcal{F}}}\,, (4)

where NN is the number of QNMs considered in the ringdown waveform. FIREFLY firstly draws samples of 𝜽{\bm{\theta}} with sampling techniques (such as the nested sampling) based on the marginal likelihood and the prior for 𝜽{\bm{\theta}}. These samples are denoted by {𝜽i|}\{{\bm{\theta}}_{i}|\varnothing\}. The evidence 𝒵{\mathcal{Z}}_{\varnothing} is also obtained by the adopted sampling technique. The auxiliary inference is completed by resampling 𝑩{\bm{B}}, which only needs to draw one sample 𝑩i{\bm{B}}_{i} for the ii-th sample 𝜽i{\bm{\theta}}_{i} from the Gaussian distribution, 𝒩(𝑩^(𝜽i),M1(𝜽i)){\cal N}\big{(}\hat{{\bm{B}}}({\bm{\theta}}_{i}),M^{-1}({\bm{\theta}}_{i})\big{)}; see Methods for details.

In the second step, FIREFLY performs importance sampling based on the posterior samples, {𝜽i,𝑩i|}\{{\bm{\theta}}_{i},{\bm{B}}_{i}|{\varnothing}\}, and the evidence 𝒵{\mathcal{Z}}_{\varnothing} produced by the auxiliary inference. The evidence under the target prior can be estimated by a MC integration, while for the posterior, a direct importance sampling weighted by the prior ratio π(𝜽,𝑩|)/π(𝜽,𝑩|)\pi({\bm{\theta}},{\bm{B}}|{\otimes})/\pi({\bm{\theta}},{\bm{B}}|{\varnothing}) may lead to large variance [37], especially when the target and auxiliary priors are significantly different (see Methods). Therefore, FIREFLY adopts a two-step importance sampling, dealing with 𝜽{\bm{\theta}} and 𝑩{\bm{B}} separately. First, the sample weights for {𝜽i|}\{{\bm{\theta}}_{i}|{\varnothing}\} are calculated according to the marginal-posterior ratio for 𝜽{\bm{\theta}} between the target and auxiliary inferences. After the importance resampling for 𝜽{\bm{\theta}}, the sample 𝑩i{\bm{B}}_{i}, assigned to each 𝜽i{\bm{\theta}}_{i}, is drawn from the conditional posterior,

P(𝑩|𝜽,d,)π(𝑩|𝜽,)e12(BμB^μ)Mμν(BνB^ν),P({\bm{B}}|{\bm{\theta}},d,{\otimes})\propto\pi({\bm{B}}|{\bm{\theta}},{\otimes})e^{-\frac{1}{2}(B^{\mu}-\hat{B}^{\mu})M_{\mu\nu}(B^{\nu}-\hat{B}^{\nu})}\,, (5)

where the importance-sampling technique is applied once again with a Gaussian proposer.

The output of FIREFLY is the posterior samples {𝜽i,𝑩i|}\{{\bm{\theta}}_{i},{\bm{B}}_{i}|{\otimes}\} and the evidence 𝒵{\mathcal{Z}}_{\otimes} under the target prior, which is the same as in the full Bayesian inference with all parameters. As we can see, FIREFLY takes advantage of the Gaussian-form likelihood in 𝑩{\bm{B}}, and eliminates 2N2N parameters analytically before applying the time-consuming stochastic sampling techniques. We summarize the workflow of FIREFLY in Fig. 1.

Refer to caption
Figure 1: Workflow of FIREFLY. The algorithm takes advantages of the special form of the likelihood, where in the ringdown-signal analysis, the likelihood is Gaussian with respect to some QNM parameters (represented by 𝑩\bm{B}). Taking this specific likelihood and some state-of-the-art sampling techniques as input, FIREFLY consists of two main steps: auxiliary inference and importance sampling. In the auxiliary inference, a specific prior for 𝑩\bm{B} is chosen, allowing an analytical marginalization of 𝑩\bm{B}. The inference problem involving other parameters (represented by MM and χ\chi in the figure) is passed to a stochastic sampling algorithm, where in this work we use dynesty. The posterior samples and evidence under this auxiliary prior are marked in pink. In the importance sampling, we use two steps dealing with {M,χ}\{M,\chi\} and 𝑩\bm{B} respectively. This special treatment makes use of the special dependence of likelihood on 𝑩\bm{B}, leading to smaller weight variances and more efficient sampling. The final output of FIREFLY is the posterior samples and the evidence under the target prior, presented in green.

Now we apply FIREFLY to analyze realistic ringdown signals, and compare the results with those from the full Bayesian inference with all parameters, which we refer as the “full-parameter sampling”. To test the performance of FIREFLY in accelerating the extraction of multiple QNMs, we assume the signals are recorded in the triangular-shape ET which consists of three detectors [20]. The data are generated from Numerical Relativity (NR) waveforms of Simulating eXtreme Spacetimes (SXS) catalog [38] and injected into a Gaussian stationary noise corresponding to the ET-D sensitivity.

Specifically, we inject the NR signal SXS:BBH:0305, which is generated by a GW150914-like, non-precessing binary BH (BBH) with a mass ratio of 1.21.2, a detector-frame final mass of 68.2M68.2\,{M_{\odot}}, and a dimensionless spin of 0.690.69 [38]. The luminosity distance, inclination angle, and reference phase are set to 390Mpc390\,{\rm Mpc}, 3π/43\uppi/4, and 0, respectively. The signal-to-noise ratio of ringdown is approximately 312312 in the ET, assuming that the signal’s starting time is at its peak amplitude [30]. Usually, for ringdown signals from nearly equal-mass BBHs, one focuses solely on the extraction of QNMs with l=|m|=2l=|m|=2, while considering different number of overtones [39]. In this work, we consider three scenarios: (i) only the fundamental mode (N=1N=1), (ii) one additional overtone mode (N=2N=2), and (iii) two additional overtone modes (N=3N=3). Since higher-order overtones decay faster and are only potentially significant at earlier times [39], we use the ringdown part from the whole signal at starting times of 18M18\,\rm{M}, 23M23\,\rm{M} and 28M28\,\rm{M} (with the final mass M=68.2M\rm{M}=68.2\,{M_{\odot}}) after coalescence for N=1N=1, 22 and 33, respectively.111Here we adopt the geometric units G=c=1G=c=1, and 68.2M68.2\,{M}_{\odot} corresponds to 0.33ms0.33\,{\rm ms}. In each scenario, it was verified that reasonable adjustments of the starting time do not significantly change our results [30].

When extracting QNMs from the ringdown signal, the variable parameters in the waveform include the right ascension α\alpha, declination δ\delta, polarization angle ψ\psi, inclination angle ι\iota, coalescence time tct_{c}, final mass MfM_{f}, and final dimensionless spin χf\chi_{f}, in addition to the QNM parameters 𝑩{\bm{B}}. It is also customary to fix the first five parameters based on a more comprehensive study, such as the inspiral-merger-ringdown analysis. For simplicity, we adopt the sky-averaged antenna pattern functions over α\alpha, δ\delta, and ψ\psi, and fix ι\iota and tct_{c} to their injected values. Therefore, in this work 𝜽{\bm{\theta}} only contains the final mass MfM_{f} and final spin χf\chi_{f} of the remnant BH, and the full set of variables is {Mf,χf,Amn,ϕmn}\big{\{}M_{f},\chi_{f},A_{\ell mn},\phi_{\ell mn}\big{\}}, where (,m,n)(\ell,m,n) runs over all QNMs considered in the ringdown signal. Notably, expanding the set of free parameters does not affect the applicability of FIREFLY. In the target inference, we choose flat priors for all parameters, Mf/M𝒰(50,100)M_{f}/M_{\odot}\sim{\cal U}(50,100), χf𝒰(0,0.99)\chi_{f}\sim{\cal U}(0,0.99), ϕmn𝒰(0,2π)\phi_{\ell mn}\sim{\cal U}(0,2\uppi) and Amn𝒰(0,Amax)A_{\ell mn}\sim{\cal U}(0,A_{\max}) with Amax=5×1020A_{\max}=5\times 10^{-20}. In the auxiliary inference, the prior for MfM_{f} and χf\chi_{f} remains the same, while the flat prior in 𝑩{\bm{B}} corresponds to π(Amn,ϕmn|𝜽,)Amn\pi\big{(}A_{\ell mn},\phi_{\ell mn}\big{|}{\bm{\theta}},{\varnothing}\big{)}\propto A_{\ell mn}. We adopt this prior shape for all AmnA_{\ell mn} and ϕmn\phi_{\ell mn}, and normalize it in the region of AmnAmaxA_{\ell mn}\leq A_{\max} and 0ϕmn<2π0\leq\phi_{\ell mn}<2\uppi.

Now we compare the posteriors obtained by FIREFLY and the full-parameter sampling, which directly samples all parameters {𝜽,𝑩}\{{\bm{\theta}},{\bm{B}}\} under the target prior. In both the auxiliary inference and the full-parameter sampling, we use the dynesty [40] sampler to draw samples from the posterior. In all three scenarios, we find that the FIREFLY results closely agree with those from the full-parameter sampling. For concreteness, we show the N=3N=3 case in Fig. 2, where the green and blue contours represent the results from the FIREFLY and the full-parameter sampling, respectively. The P-P plots between the one-dimensional marginalized posteriors of the two methods are shown in Fig. 3. We also use the Wasserstein distance to quantitatively verify the consistency between the two methods [41], and find that the average difference of one-dimensional marginal distributions is less than 0.1 standard deviation. The computational times of FIREFLY and the full-parameter sampling are listed in Table 1. In the N=3N=3 case, FIREFLY reduces the computational time from several hours to just a few minutes, speeding up by two orders of magnitude.

Refer to caption
Figure 2: Posteriors of the N=3N=3 scenario in overtone analysis. The green dashed contours represent the posterior distributions obtained by FIREFLY, while the blue ones are from the full-parameter sampling. The contours are drawn at the two-dimensional 1-σ\sigma (39.3%39.3\%), 1.5-σ\sigma (67.5%67.5\%), 2-σ\sigma (86.5%86.5\%), and 3-σ\sigma (98.9%98.9\%) credible levels.
Refer to caption
Figure 3: P-P plots in overtone analysis. The differences of the one-dimensional marginalized posteriors between FIREFLY and the full-parameter sampling are shown in P-P plots. From left to right, the panels correspond to N=1N=1, N=2N=2, and N=3N=3 scenarios, respectively. Different colors indicate different parameters, while the black dashed lines depict y=xy=x for reference.
Table 1: Computational times with FIREFLY and the full-parameter sampling. The runtime of FIREFLY consists of three part: “Sampling” denotes the time spent on the nested sampling in auxiliary inferences, “Evidence” refers to the time to compute the evidence using MC integration, and “IS” corresponds to the time spent on the importance sampling. “Total” represents the overall time taken for the entire analysis. In the “Full-Parameter” column, “Total” indicates the time spent on the nested sampling over the full parameter space. The kk-factor gives the ratio of computational times used by the full-parameter sampling to FIREFLY.
FIREFLY Full-parameter
Sampling Evidence IS Total Total kk-factor
Overtone N=1N=1 45.7s{\rm 45.7\,s} 4.5s{\rm 4.5\,s} 4.5s{\rm 4.5\,s} 54.6s{\rm 54.6\,s} 2min 52.7s{\rm 2\,min\ 52.7\,s} 3.2
Overtone N=2N=2 1min 7.0s{\rm 1\,min\ 7.0\,s} 4.8s{\rm 4.8\,s} 5.9s{\rm 5.9\,s} 1min 17.7s{\rm 1\,min\ 17.7\,s} 27min 59.0s{\rm 27\,min\ 59.0\,s} 21.6
Overtone N=3N=3 2min 49.7s{\rm 2\,min\ 49.7\,s} 5.7s{\rm 5.7\,s} 7.9s{\rm 7.9\,s} 3min 3.2s{\rm 3\,min\ 3.2\,s} 5hr 15min 38.0s{\rm 5\,hr\ 15\,min\ 38.0\,s} 103.4
Higher modes 4min 30.1s{\rm 4\,min\ 30.1\,s} 7.2s{\rm 7.2\,s} 10.0s{\rm 10.0\,s} 4min 47.2s{\rm 4\,min\ 47.2\,s} 5hr 14min 31.2s{\rm 5\,hr\ 14\,min\ 31.2\,s} 65.7
\botrule

The main reason why FIREFLY significantly accelerates the inference is the analytical marginalization of the QNM amplitude and phase parameters in the auxiliary inference, which eliminates 2N2N free parameters in the stochastic sampling process. The computational advantage of FIREFLY becomes more pronounced when involving more QNMs in the analysis. Due to the same reason, FIREFLY is fully statistically interpretable, and also compatible with various sampling techniques. Since the majority of the computational time in FIREFLY is spent on the auxiliary inference (see Table 1), one can incorporate the state-of-the-art sampling techniques into FIREFLY, further reducing the computational cost.

FIREFLY also allows flexible prior choices, which is based on the effective two-step importance sampling. In the ringdown signal analysis, different prior choices can significantly affect posteriors, especially when considering multiple QNMs or analyzing weak signals (see Methods). In contrast, the pure \mathcal{F}-statistic-based methods reduce the number of parameters by analytical maximization, which inherently assumes some specific priors [31, 32, 29, 30]. The flexibility of priors in FIREFLY makes it possible to conduct a more comprehensive analysis when extracting multiple QNMs from ringdown signals. It is also worth noting that changing to a new target prior only requires one to rerun an importance sampling that takes only a few seconds, while the results of auxiliary inference can be reused.

Because of its structure, FIREFLY also gives the evidence estimates, and we compare them with those from the full-parameter sampling in Fig. 4. FIREFLY estimates the evidence with a smaller variance than in the full-parameter sampling. This is because that the uncertainties of the evidence estimation mainly come from the stochastic sampling of the auxiliary inference in FIREFLY, which has 2N2N fewer free parameters than in the full-parameter sampling. Nevertheless, the evidence estimated by FIREFLY tends to be slightly larger than that of the full-parameter sampling. Similar discrepancies have been reported by other approaches designed to accelerate evidence calculation in GW Bayesian inference [35]. To address this issue, we conduct a comprehensive investigation into the potential uncertainty source and confirm the consistency of the results produced by two methods after considering the additional uncertainties from the insufficient sampling in the full-parameter sampling (see Appendix). Having said that, the relative differences between the two methods are at the level of 10310^{-3}, so the evidence given by FIREFLY is still largely consistent with the full-parameter sampling.

Refer to caption
Figure 4: Evidences given by FIREFLY and the full-parameter sampling. From top to bottom, we show the evidences for the cases of N=1N=1, N=2N=2, and N=3N=3 in overtone analysis, respectively. We use green to represent the FIREFLY results and blue for the full-parameter sampling. In each case, we independently run four trials, and mark the estimates and uncertainties in the figure. For each method, the dash-dotted lines denote the upper and lower bounds of the combined evidence ranges from the four trials, while the shaded areas represent conservative evidence ranges considering the additional uncertainties arising from insufficient sampling.

After validating FIREFLY in the parameter estimation of ringdown signals, we now present the extraction of higher modes in the ringdown signal from an asymmetric-mass-ratio BBH system. We inject the NR signal SXS:BBH:0065, which is generated from a non-precessing binary with a mass ratio of 8.08.0, a final redshifted mass of 122.45M122.45\,{M_{\odot}}, and a final spin of 0.660.66 [38]. The luminosity distance, inclination angle, and reference phase are set to 390Mpc390\,{\rm Mpc}, 3π/43\uppi/4, and 0, respectively. We extract four QNMs (,m,n)=(2,2,1)(\ell,m,n)=(2,2,1), (2,1,1)(2,1,1), (3,3,1)(3,3,1), and (4,4,1)(4,4,1) from the ringdown signal, at different start times Δt=16M\Delta t=16\,{\rm M}, 20M20\,{\rm M}, 24M24\,{\rm M}, and 28M28\,{\rm M} with M=122.45M{\rm M}=122.45\,{M_{\odot}}.222In the geometric units, M=122.45M{\rm M}=122.45\,{M_{\odot}} corresponds to 0.60ms0.60\,{\rm ms}. The prior for the final mass is chosen to be Mf/M𝒰(100,150)M_{f}/M_{\odot}\sim{\cal U}(100,150), while priors of other parameters are the same as those in the previous overtone analysis. The joint posteriors of the final mass and the final spin from FIREFLY and the full-parameter sampling are shown in Fig. 5. FIREFLY achieves close agreement with the full-parameter sampling, while reducing the computational time by about sixty times (see the last row in Table 1).

Refer to caption
Figure 5: Joint Posteriors of the final mass and the final spin with different starting times in the higher-mode analysis. The colored contours represent the FIREFLY results, while different colors correspond to different starting times. The gray contours indicate results from the full-parameter sampling for comparison. The contours are drawn at the two-dimensional 2-σ\sigma (86.5%86.5\%) credible level.

In this work, we develop the FIREFLY algorithm, which significantly accelerates the analysis of ringdown signals while maintaining nearly indistinguishable posterior and evidence estimates. In the spirit of {\cal F}-statistic, by constructing an auxiliary inference where the QNM amplitudes and phases are analytically marginalized, FIREFLY reduces the computational time by several orders of magnitude, demonstrating its potential to address the challenge of dimensionality curse when extracting multiple QNMs. Also, based on the delicately designed importance-sampling strategy, FIREFLY is highly flexible in prior choices, allowing for a more comprehensive analysis for identifying overtones and higher modes in the ringdown signals. FIREFLY presents a computational paradigm that only leverages the intrinsic structure of the likelihood to accelerate the Bayesian inference, which is fully statistically interpretable, and compatible with any improvements in stochastic sampling techniques. Similar structures are commonly encountered in GW analyses, such as for extreme-mass-ratio inspirals (EMRIs) [42] and GW localization [43]. We hope that the novelty of the FIREFLY algorithm will provide a viable solution to address many more data challenges in future GW data analysis and the beyond.

Methods

Ringdown waveform, likelihood and the -statistic{\mathcal{F}\text{-statistic}}. The ringdown signal of a BBH coalescence models the GW waveform from a perturbed BH remnant, and is decomposed into the superposition of QNMs [27],

h+(t)=mnYm2(ι,ς)Amnetτmncos(2πfmnt+ϕmn),\displaystyle h_{+}(t)=\sum_{\ell mn}\!{}_{-2}Y_{\ell m}(\iota,\varsigma)A_{\ell mn}e^{-\frac{t}{\tau_{\ell mn}}}\cos\big{(}2\uppi f_{\ell mn}t+\phi_{\ell mn}\big{)}, (6)
h×(t)=mnYm2(ι,ς)Amnetτmnsin(2πfmnt+ϕmn),\displaystyle h_{\times}(t)=\sum_{\ell mn}\!{}_{-2}Y_{\ell m}(\iota,\varsigma)A_{\ell mn}e^{-\frac{t}{\tau_{\ell mn}}}\sin\big{(}2\uppi f_{\ell mn}t+\phi_{\ell mn}\big{)},

where the damping frequency fmnf_{\ell mn} and damping time τmn\tau_{\ell mn} are determined by the final mass MfM_{f} and the final spin χf\chi_{f} of the remnant, AmnA_{\ell mn} and ϕmn\phi_{\ell mn} are the amplitude and phase of the mode (,m,n)(\ell,m,n). The binary inclination angle is denoted by ι\iota, while ς\varsigma is the azimuthal angle and is usually set to zero. We take the spin-weighted spherical harmonics Ym2{}_{-2}Y_{\ell m} to approximate the spin-weighted spheroidal harmonics, include the mirror modes, and omit the mode mixing contributions [44, 39]. Combining the waveform model with the antenna pattern function F+,×(α,δ,ψ)F^{+,\times}(\alpha,\delta,\psi), the recorded GW strain can be expressed as the linear summation in Eq. (2), where the explicit form of gmn,j(t)g_{\ell mn,j}(t) is given by

gmn,1(t;𝜽)=\displaystyle g_{\ell mn,1}(t;{\bm{\theta}})= [F+cos(2πfmnt)+F×sin(2πfmnt)]Ym2(ι,0)etτmn,\displaystyle\Big{[}F^{+}\cos(2\uppi f_{\ell mn}t)+F^{\times}\sin(2\uppi f_{\ell mn}t)\Big{]}{}_{-2}Y_{\ell m}(\iota,0)e^{-\frac{t}{\tau_{\ell mn}}}\,, (7)
gmn,2(t;𝜽)=\displaystyle g_{\ell mn,2}(t;{\bm{\theta}})= [F×cos(2πfmnt)F+sin(2πfmnt)]Ym2(ι,0)etτmn,\displaystyle\Big{[}F^{\times}\cos(2\uppi f_{\ell mn}t)-F^{+}\sin(2\uppi f_{\ell mn}t)\Big{]}{}_{-2}Y_{\ell m}(\iota,0)e^{-\frac{t}{\tau_{\ell mn}}}\,,

where 𝜽={α,δ,ψ,ι,Mf,χf}{\bm{\theta}}=\big{\{}\alpha,\delta,\psi,\iota,M_{f},\chi_{f}\big{\}} comprises other parameters in the ringdown waveform except for the QNM amplitude and phase.

In the data analysis of ringdown signals, the likelihood is the conditional probability of the observed data dd given the model hh, or equivalently the model parameters 𝑩{\bm{B}} and 𝜽{\bm{\theta}}. In this work we use the standard likelihood in the GW data analysis, where the log-likelihood reads [45]

ln=12dh|dh+C0,\ln{\mathcal{L}}=-\frac{1}{2}\langle d-h|d-h\rangle+C_{0}\,, (8)

where C0C_{0} does not affect the inference, and is fixed to zero. The inner product between two signals, |\langle\cdot|\cdot\rangle, is defined by,

h1|h2=\vvh1𝒞1\vvh2,\langle{h}_{1}|{h}_{2}\rangle=\vv{h}_{1}^{\intercal}\mathcal{C}^{-1}\vv{h}_{2}\,, (9)

where the arrow notation \vvh\vv{h} indicates that it is a discrete time series sampled from the continuous signal h(t)h(t), and 𝒞\mathcal{C} is the auto-covariance matrix of the noise at the sampling times, which is determined by the auto-correlation function of the detector noise, or equivalently, the power spectral density of noise. Equation (3) is obtained by formulating the likelihood (8) into a quadratic form with respect to 𝑩{\bm{B}}, where Mμν=gμ|gνM_{\mu\nu}\!=\langle g_{\mu}|g_{\nu}\rangle and B^μ=(M1)μνsν\hat{B}^{\mu}\!=(M^{-1})^{\mu\nu}s_{\nu} with sν=d|gνs_{\nu}\!=\langle d|g_{\nu}\rangle. The first term in Eq. (3) is called the -statistic{\mathcal{F}\text{-statistic}},

=12sμ(M1)μνsν.{\cal F}=\frac{1}{2}s_{\mu}(M^{-1})^{\mu\nu}s_{\nu}\,. (10)

In addition, if a NdetN_{\rm det}-detector network is considered, sμs_{\mu} and MμνM_{\mu\nu} should be replaced by k=1Ndetsμk\sum_{k=1}^{N_{\rm det}}s_{\mu}^{k} and k=1NdetMμνk\sum_{k=1}^{N_{\rm det}}M_{\mu\nu}^{k} respectively, where sμk=dk|gμks_{\mu}^{k}=\langle d^{k}|g_{\mu}^{k}\rangle and Mμνk=gμk|gνkM_{\mu\nu}^{k}=\langle g_{\mu}^{k}|g_{\nu}^{k}\rangle are the corresponding quantities in the kk-th detector. As a short summary, the reparameterization of QNM parameters leads to a Gaussian-form likelihood in 𝑩{\bm{B}}, which is the foundation of our FIREFLY algorithm.

Auxiliary inference and the marginal likelihood. In the auxiliary inference, the posterior distribution is

P(𝜽,𝑩|d,)=π(𝜽,𝑩|)(𝜽,𝑩)𝒵=π(𝜽)πB(𝜽,𝑩)𝒵,P({\bm{\theta}},{\bm{B}}|d,{\varnothing})=\frac{\pi({\bm{\theta}},{\bm{B}}|{\varnothing}){\mathcal{L}}({\bm{\theta}},{\bm{B}})}{{\mathcal{Z}}_{\varnothing}}=\frac{\pi({\bm{\theta}})\pi_{B}{\mathcal{L}}({\bm{\theta}},{\bm{B}})}{{\mathcal{Z}}_{\varnothing}}\,, (11)

where 𝒵{\mathcal{Z}}_{\varnothing} is the evidence under the auxiliary prior. Formally, one can always marginalize over 𝑩{\bm{B}}, and rewrite the marginal posterior of 𝜽{\bm{\theta}} as

P(𝜽|d,)=π(𝜽|)m(𝜽)𝒵,𝒵=π(𝜽|)m(𝜽)d𝜽,\displaystyle P({\bm{\theta}}|d,{\varnothing})=\frac{\pi({\bm{\theta}}|{\varnothing}){\mathcal{L}}^{m}_{\varnothing}({\bm{\theta}})}{{\mathcal{Z}}_{\varnothing}}\,,\quad\quad{\mathcal{Z}}_{\varnothing}=\!\int\pi({\bm{\theta}}|{\varnothing}){\mathcal{L}}^{m}_{\varnothing}({\bm{\theta}}){\rm{d}}{\bm{\theta}}\,, (12)

with the marginal likelihood [46]

m(𝜽):=π(𝑩|𝜽,)(𝜽,𝑩)d𝑩.{\mathcal{L}}^{m}_{\varnothing}({\bm{\theta}}):=\int\pi({\bm{B}}|{\bm{\theta}},{\varnothing}){\mathcal{L}}({\bm{\theta}},{\bm{B}}){\rm{d}}{\bm{B}}\,. (13)

In FIREFLY, the marginal likelihood m(𝜽){\mathcal{L}}^{m}_{\varnothing}({\bm{\theta}}) is analytically given by Eq. (4), since the likelihood (𝜽,𝑩){\mathcal{L}}({\bm{\theta}},{\bm{B}}) is quadratic in 𝑩{\bm{B}} and π(𝑩|𝜽,)\pi({\bm{B}}|{\bm{\theta}},{\varnothing}) is flat in 𝑩{\bm{B}} in our auxiliary prior. Benefiting from this, the marginal likelihood m(𝜽){\mathcal{L}}^{m}_{\varnothing}({\bm{\theta}}) can be evaluated at almost the same speed as for the full likelihood. Noting that Eq. (12) represents an inference problem only involving 𝜽{\bm{\theta}}, FIREFLY applies current stochastic sampling techniques to draw samples based on the marginal likelihood m(𝜽){\mathcal{L}}^{m}_{\varnothing}({\bm{\theta}}) and the prior π(𝜽)\pi({\bm{\theta}}), and the posterior samples can be regarded as drawn from the marginal posterior P(𝜽|d,)P({\bm{\theta}}|d,{\varnothing}), while producing the same evidence 𝒵{\mathcal{Z}}_{\varnothing} as in the full auxiliary inference. To complete the auxiliary inference, we also need to sample 𝑩{\bm{B}}, whose conditional posterior given 𝜽{\bm{\theta}} is Gaussian,

P(𝑩|𝜽,d,)=π(𝑩|𝜽,)(𝜽,𝑩)m(𝜽)=exp{12(BμB^μ)Mμν(BνB^ν)}(2π)Ndet(M1).\displaystyle P({\bm{B}}|{\bm{\theta}},d,{\varnothing})=\frac{\pi({\bm{B}}|{\bm{\theta}},\varnothing){\mathcal{L}}({\bm{\theta}},{\bm{B}})}{{\mathcal{L}}^{m}_{\varnothing}({\bm{\theta}})}=\frac{\exp\left\{-\frac{1}{2}\big{(}B^{\mu}-\hat{B}^{\mu}\big{)}M_{\mu\nu}\big{(}B^{\nu}-\hat{B}^{\nu}\big{)}\right\}}{(2\uppi)^{N}\sqrt{{\rm det}\big{(}M^{-1}\big{)}}}\,. (14)

Therefore, for each sample 𝜽i{\bm{\theta}}_{i}, the corresponding 𝑩i{\bm{B}}_{i} is generated by drawing once from the Gaussian distribution 𝒩(𝑩^(𝜽i),M1(𝜽i)){\cal N}\big{(}\hat{{\bm{B}}}({\bm{\theta}}_{i}),M^{-1}({\bm{\theta}}_{i})\big{)}. A more detailed description of this resampling technique can be found in the Appendix C of Ref. [47].

Evidence estimation and the two-step importance sampling. Based on the nn_{\varnothing} posterior samples {𝜽i,𝑩i|}\{{\bm{\theta}}_{i},{\bm{B}}_{i}|{\varnothing}\} and the evidence 𝒵{\mathcal{Z}}_{\varnothing} in the auxiliary inference, FIREFLY calculates the evidence in the target inference 𝒵{\mathcal{Z}}_{\otimes} by the following formula,

𝒵\displaystyle{\mathcal{Z}}_{\otimes} =π(𝜽,𝑩|)(𝜽,𝑩)d𝜽d𝑩=𝒵π(𝑩|)π(𝑩|)P(𝜽,𝑩|d,)d𝜽d𝑩𝒵n{𝜽i,𝑩i|}π(𝑩i|)π(𝑩i|).\displaystyle=\int\pi({\bm{\theta}},{\bm{B}}|{\otimes}){\mathcal{L}}({\bm{\theta}},{\bm{B}}){\rm{d}}{\bm{\theta}}{\rm{d}}{\bm{B}}={\mathcal{Z}}_{\varnothing}\int\frac{\pi({\bm{B}}|{\otimes})}{\pi({\bm{B}}|{\varnothing})}P({\bm{\theta}},{\bm{B}}|d,{\varnothing}){\rm{d}}{\bm{\theta}}{\rm{d}}{\bm{B}}\approx\frac{{\mathcal{Z}}_{\varnothing}}{n_{\varnothing}}\sum_{\big{\{}{\bm{\theta}}_{i},{\bm{B}}_{i}|{\varnothing}\big{\}}}\frac{\pi({\bm{B}}_{i}|{\otimes})}{\pi({\bm{B}}_{i}|{\varnothing})}\,. (15)

In the second equality, the Bayes’ theorem is applied to rewrite the evidence into an integral involving the posterior and evidence in the auxiliary inference. In the last equality, we approximate the integral by a MC summation with the posterior samples {𝜽i,𝑩i|}\big{\{}{\bm{\theta}}_{i},{\bm{B}}_{i}|{\varnothing}\big{\}}. This technique is widely used to calculate the evidence for hyperparameters in the hierarchical Bayesian inference [47].

As for the posterior samples, FIREFLY first reweighs {𝜽i|}\big{\{}{\bm{\theta}}_{i}|{\varnothing}\big{\}} according to the marginal posterior density ratio of 𝜽{\bm{\theta}} between the target and auxiliary priors, called the marginal importance weight wm(𝜽)w^{m}({\bm{\theta}}),

wm(𝜽)=P(𝜽|d,)P(𝜽|d,)=π(𝜽)π(𝜽)m(𝜽)m(𝜽)𝒵𝒵,w^{m}({\bm{\theta}})=\frac{P({\bm{\theta}}|d,{\otimes})}{P({\bm{\theta}}|d,{\varnothing})}=\frac{\pi({\bm{\theta}})}{\pi({\bm{\theta}})}\frac{{\mathcal{L}}^{m}_{\otimes}({\bm{\theta}})}{{\mathcal{L}}^{m}_{\varnothing}({\bm{\theta}})}\frac{{\mathcal{Z}}_{\varnothing}}{{\mathcal{Z}}_{\otimes}}\,, (16)

where m(𝜽)=π(𝑩|𝜽,)(𝜽,𝑩)d𝑩{\mathcal{L}}^{m}_{\otimes}({\bm{\theta}})=\int\pi({\bm{B}}|{\bm{\theta}},{\otimes}){\mathcal{L}}({\bm{\theta}},{\bm{B}}){\rm{d}}{\bm{B}} is the marginal likelihood for 𝜽{\bm{\theta}} under the target prior. Substituting the marginal likelihood in Eq. (4), we find that

wm(𝜽)π(𝑩|𝜽,)e12(BμB^μ)Mμν(BνB^ν)d𝑩det(M1).w^{m}({\bm{\theta}})\propto\frac{\int\pi({\bm{B}}|{\bm{\theta}},{\otimes})e^{-\frac{1}{2}(B^{\mu}-\hat{B}^{\mu})M_{\mu\nu}(B^{\nu}-\hat{B}^{\nu})}{\rm{d}}{\bm{B}}}{\sqrt{{\rm det}\big{(}M^{-1}\big{)}}}\,. (17)

The integral in the numerator can be efficiently evaluated by a MC integration with the Gaussian proposer 𝒩(𝑩^(𝜽i),M1(𝜽i)){\cal N}\big{(}\hat{{\bm{B}}}({\bm{\theta}}_{i}),M^{-1}({\bm{\theta}}_{i})\big{)}. FIREFLY resamples 𝜽{\bm{\theta}} from the weighted sample set {𝜽i,wm(𝜽i)}\big{\{}{\bm{\theta}}_{i},w^{m}({\bm{\theta}}_{i})\big{\}} and obtains nn_{\otimes} resampled samples {𝜽i|}\big{\{}{\bm{\theta}}_{i}|{\otimes}\big{\}}, which are regarded as being drawn from the marginal posterior P(𝜽|d,)P({\bm{\theta}}|d,{\otimes}) according to the principle of importance sampling. In the second step, samples of 𝑩{\bm{B}} are drawn from the conditional posterior P(𝑩|d,𝜽,)P({\bm{B}}|d,{\bm{\theta}},{\otimes}), which can also be performed by the importance-sampling technique. For each 𝜽i{𝜽i|}{\bm{\theta}}_{i}\in\{{\bm{\theta}}_{i}|{\otimes}\}, FIREFLY firstly draws nBn_{\rm B} samples {𝑩j|i}\{{\bm{B}}_{j|i}\} from 𝒩(𝑩^(𝜽i),M1(𝜽i)){\cal N}\big{(}\hat{{\bm{B}}}({\bm{\theta}}_{i}),M^{-1}({\bm{\theta}}_{i})\big{)}, then calculates the weight wj|i=π(𝑩j|i|𝜽i,)w_{j|i}=\pi({\bm{B}}_{j|i}|{\bm{\theta}}_{i},{\otimes}). The resampled 𝑩i{\bm{B}}_{i} assigned to 𝜽i{\bm{\theta}}_{i} is generated by a single draw from the weighted sample set {𝑩j|i,wj|i}\big{\{}{\bm{B}}_{j|i},w_{j|i}\big{\}}. After repeating this procedure for all 𝜽i{𝜽i|}{\bm{\theta}}_{i}\in\{{\bm{\theta}}_{i}|{\otimes}\}, nn_{\otimes} samples, denoted as {𝜽i,𝑩i|}\big{\{}{\bm{\theta}}_{i},{\bm{B}}_{i}|{\otimes}\big{\}}, are obtained, which can be regarded as being drawn from the posterior distribution P(𝜽,𝑩|d,)P({\bm{\theta}},{\bm{B}}|d,{\otimes}).

The strategy of two-step importance sampling allows FIREFLY to efficiently resample the posterior samples under the target prior. In principle, one can directly calculate the marginal likelihood m(𝜽){\mathcal{L}}^{m}_{\otimes}({\bm{\theta}}) by a MC integration, eliminate the dependence on 𝑩{\bm{B}}, and sample the posterior of 𝜽{\bm{\theta}} in the target prior. However, this is equivalent to numerically marginalizing 𝑩{\bm{B}} in the posterior distribution that requires a MC integration for every likelihood evaluation and is thus computationally expensive. In contrast, FIREFLY executes the MC integration after the sampling and on the samples {𝜽i|}\{{\bm{\theta}}_{i}|{\varnothing}\}, making it much more efficient. In the second step, the proposal distribution for 𝑩{\bm{B}} is Gaussian, which is also highly efficient for sampling with current algorithms. The two-step strategy again utilizes the Gaussian form of the likelihood in 𝑩{\bm{B}}, reducing the computational cost and avoiding the weight divergence in the importance sampling.

The problem of weight divergence. Importance sampling estimates the properties of a target distribution p(x)p(x) by reweighing samples drawn from a proposal distribution q(x)q(x) [48]. After drawing samples {xi}\{x_{i}\} from q(x)q(x), in order to get the samples that follow the target distribution p(x)p(x), one computes the importance weights,

wi=p(xi)q(xi),w_{i}=\frac{p(x_{i})}{q(x_{i})}\,, (18)

and reweighs the samples xix_{i} accordingly. A handy proposal distribution should resemble the target distribution, ensuring importance weight close to one for each sample. If the chosen proposal distribution differs significantly from the target one, it is likely that some samples will have large importance weights 1\gg 1, while some others will have weights 1\ll 1, leading to a large divergence. The weight divergence refers to a large variance in the importance weights of samples [37]. In this case, the performance of importance sampling deteriorates. Intuitively, a few samples with extremely large weights dominate the importance sampling process, causing significant instability in the MC estimation.

In FIREFLY we need to convert the posterior of the auxiliary inference to the posterior with the target prior, where the importance-sampling proposal and target are the posterior distributions under the auxiliary and target priors. Since they share the same likelihood, the importance weights are proportional to the ratio of the priors. When the target prior is significantly different from the auxiliary one (flat in 𝑩{\bm{B}} in FIREFLY), the importance weights can be highly divergent. In this work, the importance weight takes the form of wAmn1w\propto A_{\ell mn}^{-1}. Therefore, the samples with small AmnA_{\ell mn} will have disproportionately large importance weights, leading to severe weight divergence. A direct importance sampling according to the prior ratio π(𝜽,𝑩|)/π(𝜽,𝑩|)\pi({\bm{\theta}},{\bm{B}}|{\otimes})/\pi({\bm{\theta}},{\bm{B}}|{\varnothing}) produces unstable distributions with significant variance and spurious structures, as shown in Fig. 6. FIREFLY addresses this issue by performing a two-step importance sampling, avoiding the direct resampling for all parameters. In the first step, FIREFLY resamples 𝜽{\bm{\theta}} with the marginal likelihood ratio wm(𝜽)w^{m}({\bm{\theta}}), where the problem of weight divergence does not exist. In the second step, one needs to sample 𝑩{\bm{B}} in the conditional posterior given 𝜽{\bm{\theta}}, which is the product of the conditional prior π(𝑩|𝜽,)\pi({\bm{B}}|{\bm{\theta}},{\otimes}) and the Gaussian distribution 𝒩(𝑩^(𝜽),M1(𝜽)){\cal N}\big{(}\hat{{\bm{B}}}({\bm{\theta}}),M^{-1}({\bm{\theta}})\big{)}. Benefiting from this specific form of the conditional posterior, one can adopt the importance-sampling technique again to draw samples with a Gaussian proposer. Though weight divergence may still arise with some choices of π(𝑩|𝜽,)\pi({\bm{B}}|{\bm{\theta}},{\otimes}), the efficient sampling from the Gaussian distribution effectively mitigates this issue. Overall, the two-step importance sampling produces a more stable posterior with smaller variances, which is also closer to the results of full-parameter sampling (cf. Fig. 2).

Refer to caption
Figure 6: Posterior of the N=3N=3 scenario from the direct importance sampling. Same as Fig. 2, but now the red contours represent the posterior distributions obtained through direct importance sampling for all parameters.

Simulation configuration and hyperparameters. We perform nested sampling with the Bilby package [49] and the dynesty sampler [40]. The sampler is configured with nlive=2000{\rm nlive=2000} live points and a termination criterion of dlogz=0.1{\rm dlogz=0.1}. In all samplings, we utilize 16 CPU cores for computation on the FusionServer X6000 V6 equipped with two Intel Xeon Platinum 8358 processors and 256 GB of RAM. The sampling rate of detectors is set to 2048 Hz, which is sufficient for the ringdown signals from BH remnants with mass around 100M100M_{\odot}.

Apart from the configurations in the auxiliary inference, FIREFLY introduces several additional hyperparameters. The first hyperparameter nMCn_{\rm MC} defines the number of repetitions for computing the evidence with the MC integration. In this work, we set nMC=10n_{\rm MC}=10, and calculate the mean and standard deviation of the evidence over 10 repetitions. In the overtone analysis, the contribution to the final uncertainty of the evidence in the MC integration is significantly smaller than that in the auxiliary inference, where the evidence is estimated by the nested sampling.

The second hyperparameter nwn_{w} defines the number of samples used to calculate the marginal importance weights with MC integration in the first importance sampling step. Our tests show that nw=5×104n_{w}=5\times 10^{4} provides sufficient accuracy, while increasing nwn_{w} further does not lead to significant improvements in the results. We adopt this setting throughout the work.

The third hyperparameter nn_{\otimes} is the number of samples generated in the first importance-sampling step, which is also the total number of posterior samples in FIREFLY. We draw n=2×104n_{\otimes}=2\times 10^{4} samples based on the importance sampling weights in Eq. (17). Subsequently, the second importance sampling step is then performed to recover the corresponding parameters 𝑩{\bm{B}} for each sample.

The fourth hyperparameter nQNM=5000n_{\rm QNM}=5000 describes the number of samples drawn from 𝒩(𝑩^(𝜽i),M1(𝜽i)){\cal N}\big{(}\hat{{\bm{B}}}({\bm{\theta}}_{i}),M^{-1}({\bm{\theta}}_{i})\big{)} in the second importance-sampling step. In our configuration, the number of samples obtained from the auxiliary prior is smaller than n=2×104n_{\otimes}=2\times 10^{4}. Therefore, the effective number of samples for the parameters 𝜽{\bm{\theta}} is fewer than nn_{\otimes}. However, when recovering the parameters 𝑩i{\bm{B}}_{i} for each sample 𝜽i{\bm{\theta}}_{i}, we fully utilize the special form of the conditional posterior by drawing non-repetitive parameters 𝑩i{\bm{B}}_{i} for each sample 𝜽i{\bm{\theta}}_{i}. Increasing nn_{\otimes} helps acquire more stable posterior distributions for the parameters 𝑩{\bm{B}}.

By construction of the FIREFLY package, the hyperparameters can be adjusted to either speed up the inference or improve the accuracy and stability of the results. Additionally, if auxiliary inference becomes sufficiently efficient, we could explore different importance sampling strategies to generate more compact posterior sample sets. Under the current configuration, FIREFLY already delivers sufficiently fast, stable, and accurate results, but further improvements can be pursued.

Posterior differences between the auxiliary and target priors. FIREFLY analytically marginalizes the QNM parameters 𝑩{\bm{B}} in the auxiliary inference, where the prior πB\pi_{B} is chosen to be flat. The full posterior can be obtained by resampling the QNM parameters 𝑩{\bm{B}} based on the posterior samples of 𝜽{\bm{\theta}}. In Fig. 7, we illustrate the result of full-parameter sampling under this auxiliary prior for comparison. For conciseness, we only show the N=3N=3 case in overtone analysis. As expected, the posterior distributions from the resampling of 𝑩{\bm{B}} in FIREFLY and the full-parameter sampling under the auxiliary prior highly agree with each other. We also illustrate how different priors for 𝑩{\bm{B}} affect the posteriors in the ringdown analysis, where noticeable differences are observed in Fig. 7. Compared to the target prior, the posterior of the amplitudes under the auxiliary prior is overestimated, which comes from the flat prior in 𝑩{\bm{B}} favoring larger amplitudes. Additionally, since there is a negative correlation between amplitudes and the final mass/spin, the overestimation of amplitudes leads to an underestimation of the mass/spin parameter. For the higher-mode analysis where four QNMs are involved, the posterior differences between the target and auxiliary priors are more significant. Therefore, in the ringdown analysis, different prior choices lead to different posterior distributions, especially extracting multiple QNMs. Advantageously, in FIREFLY the flexibility of the prior selection is achieved by adopting the two-step importance sampling.

Refer to caption
Figure 7: Posterior of the N=3N=3 scenario under auxiliary prior. Same as Fig. 2, but the pink contours represent the posteriors under the auxiliary prior. The dashed pink lines are obtained by resampling the QNM parameters 𝑩{\bm{B}} based on the posterior samples of 𝜽{\bm{\theta}} in the auxiliary inference of FIREFLY, denoted as “FIREFLY (Resampling)”, while the solid pink contours are obtained by the full-parameter sampling under the auxiliary prior. The blue contours still represent the posterior distributions under the target prior, given by FIREFLY.
\bmhead

Acknowledgements We thank Hyung Won Lee, Hiroyuki Nakano, and Nami Uchikata for comments.

\bmhead

Funding This work was supported by the National Natural Science Foundation of China (123B2043), the Beijing Natural Science Foundation (1242018), the National SKA Program of China (2020SKA0120300), the Max Planck Partner Group Program funded by the Max Planck Society, and the High-performance Computing Platform of Peking University. H.-T. Wang and L. Shao are supported by “the Fundamental Research Funds for the Central Universities” respectively at Dalian University of Technology and Peking University. J. Zhao is supported by the National Natural Science Foundation of China (No. 12405052) and the Startup Research Fund of Henan Academy of Sciences (No. 241841220).

\bmhead

Competing interests The authors declare no competing interests.

\bmhead

Data availability

The data used in this study can be found in the public SXS Gravitational Waveform Database at https://data.black-holes.org/. The data generated and analysed during this study are available from the corresponding author upon reasonable request.

\bmhead

Code availability

The code can be addressed to the corresponding author upon reasonable requests, and will be made publicly available soon.

\bmhead

Author contributions Y.D. and Z.W. contributed equally to the work, on the design and programming of the FIREFLY code, and writing the initial draft of the paper. H.-T.W. contributed to the {\cal F}-statistic-based method, and developed preliminary sampling codes for ringdown analysis in this work. J.Z. contributed to the Bayesian analysis and sampling implementation. L.S. contributed to the design and methodology of FIREFLY, and writing of the paper, and provided supervision and coordination of the whole project. All co-authors discussed the results and provided input to the data analysis and the content of the paper.

Appendix A Zero-noise Injection

In this Appendix, we present the results of FIREFLY in zero-noise injections, where the data are injected according to Eq. (6) and only involving the QNMs to be extracted. We show the test results in the overtone analysis. The source parameters 𝜽{\bm{\theta}} of the injected signals are chosen to be the same as those in the main text, while the amplitudes and phases of each QNM are set to reasonable values based on NR analysis [39], as shown in Table 2. Other configurations such as the priors and hyperparameters are consistent with the overtone analysis in the main text.

Table 2: Injected values of amplitudes AlmnA_{lmn} and initial phases ϕlmn\phi_{lmn} in zero-noise injection for different scenarios. Modes N=1N=1, N=2N=2, and N=3N=3 correspond to the cases of injecting 1, 2, and 3 QNMs, respectively. The amplitudes and phases in the table denote the amplitude and initial phase of the signal at the beginning of the truncated starting times at 28M28\,{\rm M}, 23M23\,{\rm M}, and 18M18\,{\rm M} for the cases N=1N=1, N=2N=2, and N=3N=3, respectively. The unit for AmnA_{\ell mn} is 102010^{-20}.
Mode A220A_{220} ϕ220\phi_{220} A221A_{221} ϕ221\phi_{221} A222A_{222} ϕ222\phi_{222}
N=1N=1 0.11020.1102 5.44125.4412
N=2N=2 0.16530.1653 2.79562.7956 0.01640.0164 5.24725.2472
N=3N=3 0.24790.2479 0.15000.1500 0.05600.0560 2.66002.6600 0.00720.0072 1.54001.5400
\botrule

The posteriors given by FIREFLY and the full-parameter sampling are shown in Figs. 810, corresponding to the cases of N=1N=1, N=2N=2, and N=3N=3, respectively. While all results of the two methods are highly consistent visually with each other and the injection values, we further quantify the differences between the two methods using the P-P plot and the Wasserstein distance. In Fig. 11, we depict the P-P plot of the one-dimensional marginal posteriors between the two methods in all three scenarios. The Wasserstein distance, also known as the Earth-Mover’s distance, measures the minimum cost of transforming one distribution into another, providing a robust metric for comparing distributions [41]. We compute the Wasserstein distance between each pair of the one-dimensional marginal posteriors from the two methods, and normalize it with the standard deviation of the one-dimensional posterior distribution in the full-parameter sampling. The normalized Wasserstein distances are further averaged over all parameters, providing a single, average, normalized Wasserstein distance d¯w\bar{d}_{w}, shown in Fig. 12. For each model, the analysis is performed independently four times for both FIREFLY and the full-parameter sampling, allowing for a comparison between the two methods as well as their internal variability. In the cases of N=1N=1 and N=2N=2, the differences between the two methods are close to the internal fluctuations of each method, which irrefutably demonstrates the accuracy of FIREFLY. In the case of N=3N=3, the difference between the two methods is slightly larger than the internal fluctuations, but remains at a relatively low level with d¯w0.1\bar{d}_{w}\lesssim 0.1, indicating that the average difference between the one-dimensional marginal distributions of the two methods is less than 0.1 standard deviation.

Refer to caption
Figure 8: Posteriors of the N=1N=1 scenario in the zero-noise injection. The contour levels and styles are the same as those in Fig. 2, while the data are injected with only the fundamental mode.
Refer to caption
Figure 9: Posteriors of the N=2N=2 scenario in the zero-noise injection. Same as Fig. 8, but for the N=2N=2 case with the fundamental and first overtone modes injected.
Refer to caption
Figure 10: Posteriors of the N=3N=3 scenario in the zero-noise injection. Same as Fig. 8, but for the N=3N=3 case with the fundamental, first overtone, and second overtone modes injected.
Refer to caption
Figure 11: P-P plots in the zero-noise injections. Same as Fig. 3, but for the zero-noise injections, where the data are injected with only the QNM signals under consideration.
Refer to caption
Figure 12: Averaged and normalized one-dimensional Wasserstein distances for the posteriors of two methods in the zero-noise injections. The three rows from top to bottom represent the results for N=1N=1, N=2N=2, and N=3N=3 scenarios in overtone analysis. In each row, the three subplots from left to right show the comparisons between FIREFLY and the full-parameter sampling, the comparisons within FIREFLY, and the comparisons within the full-parameter sampling. In each subplot, the rows labeled from “F1” to “F4” represent four independent inferences using FIREFLY, while the columns labeled from “T1” to “T4” represent four independent inferences in the full-parameter sampling. Each element in the matrix represents the averaged and normalized Wasserstein distance between the one-dimensional marginal posteriors.

The evidences in different scenarios are also calculated by FIREFLY and the full-parameter sampling. Same as in the main text, we conduct four independent trials for each scenario, and show the results in Fig. 13. The dash-dotted lines represent the upper and lower bounds of the evidence by taking the union of the ranges from the four independent trials. For the full-parameter sampling, we further consider the uncertainties due to insufficient sampling in the QNM parameters. We perform the following numerical experiments to estimate it. First, if MfM_{f} and χf\chi_{f} are fixed, then (d|Mf,χf,𝑩){\cal L}(d|M_{f},\chi_{f},{\bm{B}}) has a Gaussian form in 𝑩{\bm{B}}. In the auxiliary inference, we analytically marginalize 𝑩{\bm{B}} and obtain the marginal likelihood. In the full-parameter sampling, 𝑩{\bm{B}} is treated as the same as 𝜽{\bm{\theta}} and sampled. We find that the nested sampling method tends to overestimate the marginal likelihood in the numerically stochastic sampling of 𝑩{\bm{B}}. To quantify this bias, we fix MfM_{f} and χf\chi_{f} at their injected values, and compute the Gaussian integration in 𝑩{\bm{B}} both analytically and with the nested sampling method. The difference between the two results can be regarded as the bias led by insufficient sampling in 𝑩{\bm{B}}, shown in Fig. 14. For the higher-dimensional cases of N=2N=2 and N=3N=3, the nested sampling tends to produce overestimated values, which partially explains the small evidence discrepancy between the two methods discussed in the main text. Without further investigation, in this work we simply treat the bias as an additional uncertainty in the full-parameter sampling, and combine it with the evidence uncertainty given by the nested-sampling algorithm. This finally leads to a more conservative estimation of the evidence.

Refer to caption
Figure 13: Evidences calculated by FIREFLY and the full-parameter sampling in the zero-noise injections. Same as Fig. 4, but for the zero-noise injections.
Refer to caption
Figure 14: Integrals of Gaussian functions over QNM parameters. The subplots represent the integral over the QNM parameters 𝑩{\bm{B}}, where MfM_{f} and χf\chi_{f} are fixed at the injected values. From top to bottom, the three subplots display the results in the cases of N=1N=1, N=2N=2, and N=3N=3, with 2, 4, and 6 QNM parameters, respectively. For each scenario, we run the nested sampling to calculate the integral in 𝑩{\bm{B}} for 10 times. The results are shown as dots, with their mean as black horizontal lines. The gray horizontal lines show the analytical values for comparison.

References