betaFeedback

WorksPhysics and Astronomy

Binning is Sinning: Absolution for the Unbinned Supernova Hubble Diagram

Abstract

Cosmological analyses of Type Ia supernovae use a covariance matrix to describe statistical noise and systematic uncertainties. To fit a Hubble diagram with an unbinned covariance matrix, the CPU cost scales as O(N^3) for N supernovae, which has motivated compression into bins that loses information and reduces self-calibration power. To remove the need for lossy compression, we present a method that greatly reduces CPU time for matrix inversion and cosmology fitting, as well as matrix storage. For systematic covariances constructed from K per-supernova distance-shift vectors, we retain the exact representation C = D + U U^T, with diagonal statistical covariance D, and use the Woodbury factorization identity to efficiently invert C, significantly reducing computing time and disk storage without losing information. We implement this method in SNANA and validate it on simulated samples for LSST (N ~ 5,300, K = 18), Roman+LSST (N ~ 15,000, K = 30), and 10-yr LSST (N ~ 134,400, K = 18). For 10-yr LSST, matrix inversion and cosmology fit time is ~10 weeks using a dense (unbinned) matrix with 18 billion elements, and is reduced to ~1.5 hr using the factorization method. It also reduces covariance matrix disk storage by a factor of 1,800 (36 GB to 20 MB). In all validation tests, the best-fit cosmological parameters are nearly identical to the unbinned fit, and the dark energy figure of merit (FoM) agrees to better than 0.1% accuracy; the small differences are likely due to numerical artifacts in the pipeline. For the LSST and Roman era, this factorization method enables large unbinned supernova analyses with significantly reduced computing resources compared to previous analyses using a dense matrix, while preserving all information in the covariance model.

Introduction

A cosmological fit to Type Ia supernovae (SNe Ia) compares observed distances versus redshift to a model prediction and minimizes a chi-square (χ2\chi^2) computed from the data–model Hubble resid-

Corresponding author: Ayan Mitra

Email: [email protected] uals and their covariance matrix (C\mathbf{C}). The matrix C\mathbf{C} has two parts: a diagonal part (D\mathbf{D}) for each supernova’s statistical measurement uncertainty, and a systematic part (Csys\mathbf{C}_{\mathrm{sys}}) describing systematic uncertainties related to calibration, the SN Ia light-curve model, Galactic extinction, etc.

Several past cosmology analyses ([2, 15, 4]) evaluated their χ2\chi^2 using a redshift-binned (zz-binned) Hubble diagram (HD) and a zz-binned C\mathbf{C} in order to reduce computation time. D. Brout et al. [3] (BHS21) showed that zz-binning results in weaker constraints compared to fitting an unbinned Hubble diagram because the latter benefits from self-calibration that reduces systematic uncertainties.

For spectroscopically confirmed SNe Ia, using unbinned distances is straightforward. For the photometrically identified sample used in the DES-SN5YR analysis (M. Vincenzi et al. [20]), R. Kessler et al. [10] (K23) demonstrated how to determine unbinned distances using the BEAMS with Bias Corrections (BBC; [9]) likelihood for each event. Although current SN samples with N∼2,000N \sim2{,}000 events (where NN is the number of supernovae in the Hubble diagram) are computationally feasible using the unbinned approach, K23 pointed out that for the much larger samples expected from LSST and Roman, there will be severe CPU challenges for matrix inversion and χ2\chi^2 computation when C\mathbf{C} contains billions of elements. To address this, K23 suggested a “rebinned” approach of binning the HD and C\mathbf{C} as a function of redshift, color, and stretch, and showed that this approach recovers most, but not all, of the constraining power from an unbinned HD. More recent dark energy forecasts for LSST (M26; A. Mitra et al. [12]) and Roman (K25; R. Kessler et al. [8]) presented results using zz-binned, rebinned, and unbinned distances, confirming that while the rebinned method is significantly better than using zz-binned distances, it does not reach the full sensitivity of an unbinned HD because averaging events into discrete bins still washes out event-level information and degrades self-calibration. Furthermore, the computing challenge for large (∼104\sim10^4) unbinned samples was already apparent in these forecasts: both studies used the unbinned method only for the nominal analysis and relied on the rebinned method for the many systematic variants needed to quantify individual systematic contributions.

Here we apply a matrix technique that greatly reduces the CPU and disk-storage requirements for processing large unbinned HDs, without losing information. The key assumption is that each systematic variation produces a vector of per-supernova distance shifts, and Csys\mathbf{C}_{\mathrm{sys}} is a sum of the outer products of KK such vectors. For a fixed systematic model, KK is independent of NN. The key concept is to apply the Woodbury identity (M. A. Woodbury [22]) to C=D+UUT\mathbf{C} = \mathbf{D} + \mathbf{U}\mathbf{U}^{\mathrm{T}}, where U\mathbf{U} collects the KK shift vectors. The inverse requires only a K×KK \times K matrix, replacing O(N3)O(N^3) unbinned matrix inversion and O(N2)O(N^2) per-point quadratic-form evaluations with a small-matrix setup and O(N×K)O(N \times K) χ2\chi^2-likelihood evaluations for K≪NK \ll N, while preserving the adopted covariance up to floating-point precision.

We have implemented this C-factorization in the SNANA program that builds C\mathbf{C},1 updated the fast cosmology-fit code to use the factorized matrix,2 and run validation tests across multiple sample sizes to demonstrate the improvements in computing speed and storage. § 2 presents the formalism, and § 3.2 describes the SNANA implementation and validation tests on three simulated samples: the LSST sample of M26, the Roman+LSST sample of K25, and an approximate 10-yr LSST sample made by combining the 25 independent LSST realizations from M26. § 4 summarizes the storage scaling, and § 5 discusses broader implications before we conclude in § 6. Appendix ?? provides the mathematical proofs.

Formalism

Standard unbinned likelihood and marginalized chi-square

We define μobs\mu^{\mathrm{obs}} to be an NN-dimensional vector of observed distance moduli for NN supernovae, and μmodel(θ)\mu^{\mathrm{model}}(\boldsymbol{\theta}) to be the corresponding vector of theoretical distance moduli as a function of cosmological model parameters θ\boldsymbol{\theta}. For the spatially flat cosmological models considered in this work, θ=(Ωm,w)\boldsymbol{\theta} = (\Omega_m, w) for flat wwCDM with a constant dark energy equation-of-state parameter ww, or θ=(Ωm,w0,wa)\boldsymbol{\theta} = (\Omega_m, w_0, w_a) for flat w0waw_0w_aCDM where the dark energy equation of state evolves with scale factor a=1/(1+z)a = 1/(1 + z) as w(a)=w0+wa(1−a)w(a) = w_0 + w_a(1 - a), and Ωm\Omega_m is the present-day matter density parameter. The light-curve standardization coefficients (stretch α\alpha and color β\beta) are determined prior to the cosmological fit when constructing the Hubble diagram.

The residual vector r(θ)=μobs−μmodel(θ)\boldsymbol{r}(\boldsymbol{\theta}) = \mu^{\mathrm{obs}} - \mu^{\mathrm{model}}(\boldsymbol{\theta}) is a function of θ\boldsymbol{\theta}. Following the standard approach ([18, 6, 5]), a cosmological fit at fixed nuisance offset minimizes the quadratic form χ^2(θ)=r(θ)TC−1r(θ)\hat{\chi}^{2}(\boldsymbol{\theta}) = \boldsymbol{r}(\boldsymbol{\theta})^{T}\mathbf{C}^{-1}\boldsymbol{r}(\boldsymbol{\theta}), where C=D+Csys\mathbf{C} = \mathbf{D} + \mathbf{C}_{\mathrm{sys}} is the sum of the statistical (D\mathbf{D}) and systematic (Csys\mathbf{C}_{\mathrm{sys}}) covariance matrices. Because supernovae measure only relative distances, the supernova absolute magnitude MBM_B and Hubble constant H0H_0 enter r(θ)\boldsymbol{r}(\boldsymbol{\theta}) through a single degenerate additive offset that is marginalized analytically using a flat prior ([5]). At each cosmology parameter point θ\boldsymbol{\theta}, the analytically marginalized chi-square is

χmarg2(θ)≡χ^2(θ)−B(θ)2S,(1)\chi_{\mathrm{marg}}^{2}(\boldsymbol{\theta}) \equiv\hat{\chi}^{2}(\boldsymbol{\theta}) - \frac{B(\boldsymbol{\theta})^{2}}{S}, \tag*{(1)}

where

χ^2(θ)=r(θ)TC−1r(θ),B(θ)=1TC−1r(θ),S=1TC−11.(2)\hat{\chi}^{2}(\boldsymbol{\theta}) = \boldsymbol{r}(\boldsymbol{\theta})^{T}\mathbf{C}^{-1}\boldsymbol{r}(\boldsymbol{\theta}), \qquad B(\boldsymbol{\theta}) = \mathbf{1}^{T}\mathbf{C}^{-1}\boldsymbol{r}(\boldsymbol{\theta}), \qquad S = \mathbf{1}^{T}\mathbf{C}^{-1}\mathbf{1}. \tag*{(2)}

Integrating over the additive offset with a flat prior gives, up to a parameter-independent constant, the marginalized log-likelihood

−2log⁡Lmarg(θ)=χmarg2(θ)+log⁡∣C∣+log⁡S.(3)-2\log\mathcal{L}_{\mathrm{marg}}(\boldsymbol{\theta}) = \chi_{\mathrm{marg}}^{2}(\boldsymbol{\theta}) + \log\lvert\mathbf{C}\rvert+ \log S. \tag*{(3)}

For the fixed covariances used in standard grid fits, both normalization terms log⁡∣C∣\log\lvert\mathbf{C}\rvert and log⁡S\log S in Equation (3) are constant across parameter space, and therefore minimizing Equation (1) or Equation (3) yields the same cosmological constraints. In the conventional unbinned approach, forming and Cholesky-factoring the dense N×NN \times N matrix C\mathbf{C} requires O(N3)O(N^3) computations (hence CPU time) and O(N2)O(N^2) disk storage, and each evaluation of Equation (2) for a new trial parameter θ\boldsymbol{\theta} requires O(N2)O(N^2) computations. In the following subsection, we present the factorized approach that eliminates this bottleneck.

Factorized covariance and efficient model fitting

Following Equation 8 of BHS21, the systematic covariance is constructed from KK per-supernova distance-shift vectors as

Csys=∑k=1KΔμkΔμkT=UUT,(4)\mathbf{C}_{\mathrm{sys}} = \sum_{k=1}^{K} \Delta\boldsymbol{\mu}_{k}\Delta\boldsymbol{\mu}_{k}^{T} = \mathbf{U}\mathbf{U}^{T}, \tag*{(4)}

where Δμk\Delta\mu_k is the NN-dimensional vector of distance shifts of every supernova under the kk-th systematic variation, already scaled by that systematic’s assumed prior uncertainty, and U=[Δμ1⋯ΔμK]\mathbf{U} = [\Delta\mu_1 \cdots\Delta\mu_K] is the N×KN \times K matrix with one row per supernova and one column per systematic. The full covariance can therefore be written as

C=D+UUT,(5)\mathbf{C} = \mathbf{D} + \mathbf{U}\mathbf{U}^{T}, \tag*{(5)}

a diagonal matrix plus a low-rank correction (Figure 1). For a sample with N=105N = 10^5 events and K=30K = 30 systematics, C\mathbf{C} contains 10 billion entries, whereas the factorized form (D,U)(\mathbf{D}, \mathbf{U}) has only N+N×K=3.1N + N \times K = 3.1 million elements without any loss of information.

Figure 1. Schematic of Equation 5: the covariance C\mathbf{C} (left) is a diagonal matrix D\mathbf{D} plus the product of a tall matrix U\mathbf{U} (one column per systematic) and its transpose UT\mathbf{U}^{T}. Shading is illustrative.

Equation (5) holds algebraically for any NN and KK; numerical implementations agree up to floating-point round-off. This is not a truncation of an eigen-decomposition: U\mathbf{U} is built directly from the same shift vectors used in the traditional C\mathbf{C}-inversion approach. The Woodbury identity (M. A. Woodbury [22]; J. Sherman & W. J. Morrison [16]; W. W. Hager [7]) and the matrix determinant lemma give

C−1=D−1−D−1U(I+UTD−1U)−1UTD−1,(6)\mathbf{C}^{-1} = \mathbf{D}^{-1} - \mathbf{D}^{-1}\mathbf{U}\left(\mathbf{I}+\mathbf{U}^{T}\mathbf{D}^{-1}\mathbf{U}\right)^{-1}\mathbf{U}^{T}\mathbf{D}^{-1}, \tag*{(6)}
log⁡∣C∣=log⁡∣D∣+log⁡∣I+UTD−1U∣.(7)\log\lvert\mathbf{C}\rvert= \log\lvert\mathbf{D}\rvert+ \log\left\lvert\mathbf{I}+\mathbf{U}^{T}\mathbf{D}^{-1}\mathbf{U}\right\rvert. \tag*{(7)}

Only the K×KK \times K matrix Q≡I+UTD−1U\mathbf{Q} \equiv\mathbf{I}+\mathbf{U}^{T}\mathbf{D}^{-1}\mathbf{U} must be inverted (or Cholesky-factored), at a one-time setup cost of O(NK2+K3)O(NK^2 + K^3). For a diagonal D\mathbf{D} with positive entries and any real N×KN \times K matrix U\mathbf{U}, Q\mathbf{Q} is always symmetric positive definite and invertible.

Using Equation (6), the marginalized chi-square quantities in Equation (2) are evaluated without ever forming an N×NN \times N matrix. We define a=D−1r\mathbf{a} = \mathbf{D}^{-1}\mathbf{r}, b=UTa\mathbf{b} = \mathbf{U}^{T}\mathbf{a}, c=Q−1b\mathbf{c} = \mathbf{Q}^{-1}\mathbf{b}, and g=UTD−11\mathbf{g} = \mathbf{U}^{T}\mathbf{D}^{-1}\mathbf{1}, where a\mathbf{a}, b\mathbf{b}, and c\mathbf{c} depends on θ\theta. Equation (6) gives

χ^2(θ)=rTa−bTc,(8)\hat{\chi}^{2}(\theta) = \mathbf{r}^{T}\mathbf{a} - \mathbf{b}^{T}\mathbf{c}, \tag*{(8)}
B(θ)=1Ta−gTc,(9)B(\theta) = \mathbf{1}^{T}\mathbf{a} - \mathbf{g}^{T}\mathbf{c}, \tag*{(9)}
S=1TD−11−gTQ−1g.(10)S = \mathbf{1}^{T}\mathbf{D}^{-1}\mathbf{1} - \mathbf{g}^{T}\mathbf{Q}^{-1}\mathbf{g}. \tag*{(10)}

Because g\mathbf{g} does not depend on θ\theta, g\mathbf{g} and SS are computed once during setup. Each subsequent χ2\chi^2 evaluation for a new θ\theta costs O(NK+K2)O(NK + K^2) operations, or O(NK)O(NK) for K≪NK \ll N, compared to O(N2)O(N^2) for an unbinned evaluation with a pre-factored dense covariance and O(N3)O(N^3) to factor it. To illustrate the scale of this reduction for the 10-yr LSST sample (N≈1.34×105N \approx1.34 \times10^5, K=18K = 18), the one-time setup drops from N3∼2.4×1015N^3 \sim2.4 \times10^{15} to NK2∼4.3×107NK^2 \sim4.3 \times10^7 operations (nearly eight orders of magnitude fewer), and each χ2\chi^2 evaluation drops from N2∼1.8×1010N^2 \sim1.8 \times10^{10} to NK∼2.4×106NK \sim2.4 \times10^6 operations (a factor of ∼7,500\sim7{,}500 reduction per grid point). Similarly, for the Roman+LSST sample (N≈1.46×104N \approx1.46 \times10^4, K=30K = 30), setup drops from N3∼3.1×1012N^3 \sim3.1 \times10^{12} to NK2∼1.3×107NK^2 \sim1.3 \times10^7 operations and per-point χ2\chi^2 evaluation drops from N2∼2.1×108N^2 \sim2.1 \times10^8 to NK∼4.4×105NK \sim4.4 \times10^5 operations (nearly 500×500 \times fewer). Note that if D or U depends on fitted parameters, these setup terms must be recomputed whenever the covariance changes.

In standard supernova pipelines, systematic variations enter as independent uncorrelated effects so that the systematic weight matrix is the identity (W=I\mathbf{W} = \mathbf{I}). More generally, if correlated systematic amplitudes with a K×KK \times K covariance matrix W=(wkk′)\mathbf{W} = (w_{kk'}) are present (e.g. peculiar velocity covariances), such that Csys=∑k=1K∑k′=1Kwkk′ΔμkΔμk′T=UWUT\mathbf{C}_{\mathrm{sys}} = \sum_{k=1}^{K} \sum_{k'=1}^{K} w_{kk'} \Delta\boldsymbol{\mu}_k \Delta\boldsymbol{\mu}_{k'}^{\mathsf{T}} = \mathbf{U}\mathbf{W}\mathbf{U}^{\mathsf{T}}, one can compute the K×KK \times K Cholesky factor W=LLT\mathbf{W} = \mathbf{L}\mathbf{L}^{\mathsf{T}} and replace U by U′≡UL\mathbf{U}' \equiv\mathbf{U}\mathbf{L}; this restores C=D+U′U′T\mathbf{C} = \mathbf{D} + \mathbf{U}'\mathbf{U}'^{\mathsf{T}} and Equations 6–7 without requiring a separate matrix inversion of W\mathbf{W}. An external positive-semidefinite covariance can be represented by multiple factor columns, although its rank may be large and remove the computational advantage. The current implementation exports the shift-vector contributions it constructs internally; if an additional external covariance is present, it skips the factorized output and warns. Non-diagonal statistical noise requires a different efficiently solvable base covariance. Our implementation works under the assumption of uncorrelated statistical noise, hence D is diagonal. Exactness here means equivalence to the adopted covariance model, rather than a claim that this model captures every physical source of uncertainty.

Validation on Simulated Samples

Implementation in SNANA

With the new factorization code implemented in SNANA, the covariance program writes the diagonal statistical variance vector D and the N×KN \times K shift-vector matrix U directly from the per-systematic shift vectors, and does not construct, invert, or write the N×NN \times N matrix C.

The cosmology-fitting program reads D and U, and before beginning the fit it precomputes the K×KK \times K matrix Q=I+UTD−1U\mathbf{Q} = \mathbf{I} + \mathbf{U}^{\mathsf{T}}\mathbf{D}^{-1}\mathbf{U}, its Cholesky decomposition, the vector g=UTD−11\mathbf{g} = \mathbf{U}^{\mathsf{T}}\mathbf{D}^{-1}\mathbf{1}, and the scalar S. At each step of the minimization, it evaluates Equations 6 and 7 in place of a double loop over C−1\mathbf{C}^{-1}. The analytic marginalization over the distance-modulus offset, prior evaluations, and all other parts of the fit remain unchanged, and the fitting program never allocates or forms an N×NN \times N matrix in memory.

Validation Tests

We test the factorization on three simulated samples from the literature that have been used to forecast cosmology constraints: (1) the LSST Deep Drilling Field sample of A. Mitra et al. [12] (M26), with N≈5,300N \approx5{,}300 supernovae and K=18K = 18 systematics in each of 25 independent realizations; (2) the Roman+LSST sample of R. Kessler et al. [8] (K25), with N≈14,600N \approx14{,}600 and K=30K = 30 in each of 9 realizations; and (3) an anticipated 10-yr LSST sample with N≈134,400N \approx134{,}400 and K=18K = 18, made by combining the 25 realizations of M26. The forecast quantity is the dark energy figure of merit (FoM) from a cosmology fit using the w0waw_0w_aCDM model with a w0w_0, waw_a, Ωm\Omega_m marginalization3 grid size of 91391^3 for M26 and 10-yr LSST, and 812×3781^2 \times37 grid size for K25. For consistent CPU comparisons, our reported fit times for K25 have been scaled by (913)/(812×37)=3.1(91^3)/(81^2 \times37) = 3.1. Following the Dark Energy Task Force (DETF; A. Albrecht et al. [1]), these forecasts use the FoM definition of Y. Wang [21], FoM =[σw0σwa1−ρw0wa2]−1= [\sigma_{w_0}\sigma_{w_a}\sqrt{1-\rho_{w_0w_a}^{2}}]^{-1}, where ρw0wa\rho_{w_0w_a} is the fitted parameter correlation. To quantify the impact of factorization, we re-ran the K25 and M26 covariance construction and cosmology fitting using the SNANA factorization updates (§ 3.1), and evaluated the average figure of merit, FoMWoodbury\mathrm{FoM}_{\mathrm{Woodbury}}. Using the published FoMC−1\mathrm{FoM}_{C^{-1}} based on the traditional unbinned C, we define the FoM ratio

RFoM=FoMWoodburyFoMC−1,(11)R_{\mathrm{FoM}} = \frac{\mathrm{FoM}_{\mathrm{Woodbury}}}{\mathrm{FoM}_{C^{-1}}}, \tag*{(11)}

and define RFoM−1R_{\mathrm{FoM}} - 1 to be the numerical accuracy of the factorization approach. Table 1 summarizes the CPU processing time, hard drive storage, and accuracy comparisons across all three samples. Across the validation samples, ∣RFoM−1∣<10−3\lvert R_{\mathrm{FoM}} - 1\rvert< 10^{-3}, and the small non-zero residual in K25 is from file-output rounding and grid-boundary interpolation artifacts. The covariance construction speed is accelerated by a factor of ∼10\sim10, disk storage is reduced by two to three orders of magnitude, and the cosmology fit speed is increased by factors of 6 and 60 for the M26 and K25 samples, respectively. For the 10-yr LSST sample, we did not run the analysis using the unbinned method because of the large compute resources needed. However, we can very roughly estimate the CPU time by assuming that the C-inversion time scales as N3N^3 and the cosmology fit time scale as N2N^2; the result is ∼1\sim1 week to compute C−1C^{-1}, and ∼9\sim9 weeks to perform the cosmology fit.

SampleUnbin.Fact.Rebin.Unbin.Fact.Rebin.Unbin.Fact.RFoM−1R_{\mathrm{FoM}} - 1
CPU1^{1} time (minutes) for Covariance construction3^{3}Cosmology fitC Storage2^{2} size (MB)
LSST (M26)5^{5}1.80.20.214525145710
Roman+LSST (K25)6^{6}161.40.82,8504511142540.0008
10-yr LSST7^{7}N/A8^{8}696^{9}N/AN/A79N/A36,12020N/A

Table 1. Summary of the validation tests for covariance matrix (C) construction and cosmology fitting. The performance metrics are CPU, disk storage, and RFoM−1R_{\mathrm{FoM}} - 1 (Eq. (11)).

Across all three datasets, the factorized representation preserves the unbinned covariance and cosmological constraints without loss of information: in all 25 M26 realizations, factorized versus unbinned χ2\chi^2 evaluations agree to better than 10−1510^{-15} prior to file-output rounding. In the cosmological fits, the best-fit central values and uncertainties on w0w_0, waw_a, and Ωm\Omega_m, and the minimum χ2\chi^2 from the factorized covariance are identical to those from the unbinned covariance in every realization of the M26 and K25 samples. For M26, RFoM−1=0R_{\mathrm{FoM}} - 1 = 0 across all 25 realizations (mean FoM = 155.5±2.8155.5 \pm2.8 in both), and for K25, ∣RFoM−1∣≤8×10−4\lvert R_{\mathrm{FoM}} - 1\rvert\le8 \times10^{-4} (0.08%, differing by at most 10−410^{-4} in σwa\sigma_{w_a} in three of nine realizations and 0.4 in FoM in two of nine, with exact agreement in all stat-only fits).

By contrast, when using the rebinned covariance, the fitted parameters shift relative to the unbinned analysis: the (rebinned − unbinned) shifts (quoting the mean shift and its standard error std/Nreal\mathrm{std}/\sqrt{N_{\mathrm{real}}}), for M26 are Δw0=+0.027±0.005\Delta w_0 = +0.027 \pm0.005 and Δwa=−0.063±0.030\Delta w_a = -0.063 \pm0.030, with a mean FoM shift = +3.1±2.8%+3.1 \pm2.8\% (mean FoM = 158.9±2.5158.9 \pm2.5, ranging from −16%-16\% to +46%+46\% across realizations). For K25, the ensemble shifts are Δw0=−0.001±0.005\Delta w_0 = -0.001 \pm0.005 (up to 0.02) and Δwa=+0.017±0.017\Delta w_a = +0.017 \pm0.017 (up to 0.11), and mean FoM shift = −5.5±0.9%-5.5 \pm0.9\% (mean FoM = 479.2±10.5479.2 \pm10.5 versus 507.3±11.1507.3 \pm11.1, ranging from −1%-1\% to −9%-9\%). Replacing the rebinned approximation with the factorized unbinned covariance eliminates these binning shifts while retaining fast runtimes. Because factorized unbinned inference matches the computational speed and compact storage of rebinning without losing information or biasing cosmological parameters and the dark energy FoM, we recommend discontinuing rebinned Hubble-diagram analyses9 and using factorized unbinned inference for future supernova cosmology pipelines.

As summarized in Table 1, the computational speedup grows rapidly with sample size. For M26, building a factorized covariance matrix is nearly ×10\times10 faster than building and inverting the corresponding unbinned matrix (0.2 min versus 1.8 min per matrix), and the w0waw_0w_aCDM cosmology fit is nearly ×6\times6 faster. For the larger K25 sample, covariance construction is 11×11\times faster and the w0waw_0w_aCDM cosmology fit is 63×63\times faster than the unbinned fit, and 2.5×2.5\times faster than the rebinned fit. At full ten-year LSST scale (N=134,387N = 134{,}387, K=18K = 18), where building and fitting the 36 GB unbinned covariance would require months of CPU time, the unbinned factorized approach completes in 79 minutes using a 20.4 MB covariance file.

Figure 2 shows the one-time setup time and per-point χ2\chi^2 evaluation time as a function of NN at fixed K=18K = 18, for M26 and extrapolated to N=105N = 10^5. At N=5,344N = 5{,}344, factorized evaluation is ∼600×\sim600\times faster than an unbinned triangular solve (0.064 ms versus 38.4 ms) and setup is ∼4,900×\sim4{,}900\times faster than unbinned Cholesky decomposition, growing to projected speedups of ∼104×\sim10^4\times and ∼106×\sim10^6\times, respectively, at N=105N = 10^5.

Figure 2. One-time linear-algebra setup time (squares; O(N3)O(N^3) Cholesky factorization of C for unbinned versus O(NK2)O(NK^2) formation and Cholesky factorization of the K×KK \times K matrix Q=I+UTD−1UQ = I + \mathbf{U}^{\mathsf{T}}\mathbf{D}^{-1}\mathbf{U} for factorized) and per-point χ2\chi^2 likelihood evaluation time (circles; O(N2)O(N^2) triangular solve versus O(NK)O(NK) Woodbury dot products) as a function of the number of supernovae NN at fixed K=18K = 18. Solid curves are measured on M26 subsets up to N=5,344N = 5{,}344 (shaded band); dashed lines show the asymptotic scaling extrapolations (N3N^3, N2N^2, and NN), and horizontal lines show the constant 306-bin rebinned setup and evaluation costs.

Figure 3 shows the complementary dependence on the number of systematics KK at fixed N=5,344N = 5{,}344, obtained by truncating the shift-vector matrix U\mathbf{U} to its first KK columns. In the regime K≪NK \ll N, the Woodbury setup cost grows quadratically with KK, while the per-point likelihood evaluation cost grows linearly with KK. Because fixed O(N)O(N) vector-operation overhead (a=D−1r\mathbf{a} = \mathbf{D}^{-1}\mathbf{r} and rTa\mathbf{r}^{T}\mathbf{a}) dominates at small KK, fitting the measured timings across K=1K = 1–1818 to explicit overhead-plus-scaling models, tsetup(K)=t0,setup+c2K2t_{\mathrm{setup}}(K) = t_{0,\mathrm{setup}} + c_2K^2 (t0,setup≈0.25t_{0,\mathrm{setup}} \approx0.25 ms, c2≈0.76 μsc_2 \approx0.76\,\mu\mathrm{s}) and teval(K)=t0,eval+c1Kt_{\mathrm{eval}}(K) = t_{0,\mathrm{eval}} + c_1K (t0,eval≈45 μst_{0,\mathrm{eval}} \approx45\,\mu\mathrm{s}, c1≈1.0 μsc_1 \approx1.0\,\mu\mathrm{s}), accurately captures the transition from the flat overhead floor to the asymptotic K2K^2 and KK scaling regimes out to K=100K = 100. Even at K=100K = 100, both operations remain several orders of magnitude faster than the KK-independent N×NN \times N unbinned Cholesky setup (1.58 s) and triangular-solve evaluation (38.4 ms).

Figure 3. Woodbury linear-algebra setup time (red squares; forming and factoring the K×KK \times K matrix Q=I+UTD−1U\mathbf{Q} = \mathbf{I} + \mathbf{U}^{\mathsf{T}}\mathbf{D}^{-1}\mathbf{U}) and per-point χ2\chi^2 likelihood evaluation time (blue circles; evaluating b=UTD−1r\mathbf{b} = \mathbf{U}^{\mathsf{T}}\mathbf{D}^{-1}\mathbf{r} and c=Q−1b\mathbf{c} = \mathbf{Q}^{-1}\mathbf{b}) as a function of the number of systematics KK at fixed N=5,344N = 5{,}344. Points are measured for K=1K = 1 to 18 (minimum of 11 repeats, each averaging 2,000 evaluations); curves show fits to tsetup(K)=t0+c2K2t_{\mathrm{setup}}(K) = t_0 + c_2K^2 and teval(K)=t0+c1Kt_{\mathrm{eval}}(K) = t_0 + c_1K over the measured range (solid) and extrapolated to K=100K = 100 (dashed). The KK-independent N×NN \times N unbinned reference times at N=5,344N = 5{,}344 are indicated on the plot.

Storage

The inverse covariance matrix shares the low-rank structure of CC: defining the N×KN \times K matrix V≡D−1UQ−1/2\mathbf{V} \equiv\mathbf{D}^{-1}\mathbf{U}\mathbf{Q}^{-1/2}, Equation (6) takes the form C−1=D−1−VVT\mathbf{C}^{-1} = \mathbf{D}^{-1} - \mathbf{V}\mathbf{V}^{T}. Storing either (D,U)(\mathbf{D}, \mathbf{U}) or the inverse representation requires only N(K+1)N(K + 1) numbers instead of N2N^2 (or N(N+1)/2N(N + 1)/2 when packed), reducing the storage scaling from O(N2)O(N^2) to O(NK)O(NK) so that a precomputed N×NN \times N inverse file is never needed.

As summarized in Table 1 and Figure 4, the 64-bit factorized representation reduces on-disk covariance storage relative to a 32-bit upper-triangular unbinned file by two to three orders of magnitude across current and upcoming survey scales: a factor of 70 for M26 (0.8 MB versus 57 MB), a factor of ∼100\sim100 for K25 (4 MB versus 425 MB), and a factor of 1,800 for 10-yr LSST (20 MB vs. 36 GB). Beyond a single covariance file, the unbinned quadratic storage growth poses a severe campaign-level bottleneck for 10-yr LSST because analysis validation routinely generates and archives covariance matrices across dozens of simulation realizations, and dozens of systematic options per realization. For example, 225 C files were produced in the M26 analysis, and for 10-yr LSST a single production campaign generating 225 C files would require 8 TB, growing to tens of terabytes across iterative analysis passes. In factorized form, the entire set of 225 C files would occupy only 5 GB.

Figure 4. Covariance storage as a function of the number of supernovae NN, comparing 32-bit upper-triangular unbinned files (2N(N+1)2N(N + 1) bytes, solid red) against 64-bit factorized (D,U)(\mathbf{D}, \mathbf{U}) files (8N(K+1)8N(K + 1) bytes for K=18K = 18 solid blue and K=30K = 30 dotted blue). Markers show the unbinned and factorized file sizes for LSST M26 (circles; 57 MB versus 0.8 MB), Roman+LSST K25 (squares; 425 MB versus 4 MB), and 10-yr LSST (diamonds; 36 GB versus 20 MB), with the corresponding storage compression factors annotated beside each vertical arrow.

Discussion

For systematic covariances built from a fixed set of distance-shift vectors, the computational trade-off between unbinned accuracy and binned speed identified by BHS21 and K23 is eliminated. Factorization preserves the floating-point precision while reducing both likelihood evaluation and storage to O(NK)O(NK). This allows production pipelines to use the unbinned Hubble diagram not only for a single nominal fit, but also across the full suite of systematic-variant and sub-sample analyses where rebinning was previously used to reduce processing time.

The CPU reduction is not limited to the specific SNANA cosmology fitting code that we tested. The same O(NK)O(NK) likelihood evaluation and analytic normalization (Eq. (3)) can be used in Markov Chain Monte Carlo (MCMC) and nested-sampling frameworks such as CosmoSIS ([23]), CosmoMC ([11]), and Cobaya ([17]), where the overall inference speedup depends on the relative cost of the Boltzmann solver and external likelihoods. More broadly, the method applies to any observational covariance that consists of independent per-object statistical noise plus a modest number of coherent systematic templates; analogous low-rank structures are exploited in pulsar-timing analyses ([19]) and multilevel factor models ([14 a]), whereas here the factorization follows as an exact algebraic identity from the definition of supernova systematic shift vectors.

Conclusion

The Binning is Sinning series established the importance of retaining individual-supernova information in cosmological fits, first through unbinned analyses ((BHS21)) and subsequently through redshift–stretch–color rebinning to keep large photometric samples computationally tractable ((K23)).

By exploiting the exact low-rank structure C=D+UUT\mathbf{C} = \mathbf{D} + \mathbf{U}\mathbf{U}^{\mathsf{T}} of systematic covariances built from KK per-supernova distance-shift vectors, the Woodbury identity reduces likelihood evaluation and storage from O(N2)O(N^2) (and O(N3)O(N^3) setup) to O(NK)O(NK) for K≪NK \ll N, removing the computational need for binning.

Implemented in SNANA and validated across simulated LSST (N≈5,300N \approx5{,}300, K=18K = 18), Roman+LSST (N≈14,600N \approx14{,}600, K=30K = 30), and 10-yr LSST (N≈134,400N \approx134{,}400, K=18K = 18) samples, the factorized method reproduces the unbinned best-fit cosmological parameters identically and matches uncertainties and the dark energy FoM to within 0.08%. Compared to the traditional approach of using a dense covariance matrix, single-step likelihood evaluations are accelerated by a factor of ∼600\sim600, w0waw_0w_aCDM cosmology fits are accelerated by up to a factor of 63 (completing in ∼80\sim80 minutes, even with N>105N > 10^5), and covariance disk storage is reduced by factors of 70 to 1,800 relative to unbinned files, keeping covariance files at the megabyte scale. Factorized unbinned inference therefore provides a practical, exact standard for next-generation supernova cosmology analyses.

Acknowledgments

This research used resources of the National Energy Research Scientific Computing Center (NERSC), a Department of Energy User Facility supported by the Office of Science of the U.S. Department of Energy under Contract No. DE-AC02-05CH11231, and was completed in part with resources provided by the University of Chicago Research Computing Center (RCC). We acknowledge the use of AI agents (claude code from Anthropic) for SNANA coding and manuscript preparation assistance; all code, results, and plots were verified by the authors.

References

  1. [1]Albrecht, A., Bernstein, G., Cahn, R., et al. 2006, Report of the Dark Energy Task Force, Tech. rep., DoE, NASA, and NSF. https://arxiv.org/abs/astro-ph/0609591
  2. [2]Betoule, M., Kessler, R., Guy, J., et al. 2014, Improved cosmological constraints from a joint analysis of the SDSS-II and SNLS supernova samples, A&A, 568, A22, doi: 10.1051/0004-6361/201423413DOI
  3. [3]Brout, D., Hinton, S., & Scolnic, D. 2021, Binning is Sinning (Supernova Version): The Impact of Self-Calibration in Cosmological Analyses with Type Ia Supernovae, ApJL, 912, L26, doi: 10.3847/2041-8213/abf4dbDOI
  4. [4]Brout, D., Scolnic, D., Kessler, R., et al. 2019, First Cosmology Results Using Type Ia Supernovae from the Dark Energy Survey: Analysis, Systematic Uncertainties, and Validation, ApJ, 874, 150, doi: 10.3847/1538-4357/ab08a0DOI
  5. [5]Conley, A., Guy, J., Sullivan, M., et al. 2011, Supernova Constraints and Systematic Uncertainties from the First Three Years of the Supernova Legacy Survey, ApJS, 192, 1, doi: 10.1088/0067-0049/192/1/1DOI
  6. [6]Guy, J., Sullivan, M., Conley, A., et al. 2010, The Supernova Legacy Survey 3-year sample: Type Ia supernovae photometric distances and cosmological constraints, A&A, 523, A7, doi: 10.1051/0004-6361/201014468DOI
  7. [7]Hager, W. W. 1989, Updating the Inverse of a Matrix, SIAM Review, 31, 221, doi: 10.1137/1031049DOI
  8. [8]Kessler, R., Hounsell, R., Joshi, B., et al. 2025, Cosmology Constraints from Type Ia Supernova Simulations of the Nancy Grace Roman Space Telescope Strategy Recommended by the High-Latitude Time Domain Survey Definition Committee, ApJ, 993, 116, doi: 10.3847/1538-4357/ae07c9DOI
  9. [9]Kessler, R., & Scolnic, D. 2017, Correcting Type Ia Supernova Distances for Selection Biases and Contamination in Photometrically Classified Samples, ApJ, 836, 56, doi: 10.3847/1538-4357/836/1/56DOI
  10. [10]Kessler, R., Vincenzi, M., & Armstrong, P. 2023, Binning is Sinning: Redemption for Hubble Diagram Using Photometrically Classified Type Ia Supernovae, ApJL, 952, L8, doi: 10.3847/2041-8213/ace34dDOI
  11. [11]Lewis, A., & Bridle, S. 2002, Cosmological parameters from CMB and other data: A Monte-Carlo approach, Phys. Rev. D, 66, 103511, doi: 10.1103/PhysRevD.66.103511DOI
  12. [12]Mitra, A., Kessler, R., Chen, R. C., et al. 2026, A Fully Photometric Approach to Type Ia Supernova Cosmology in the LSST Era: Host-galaxy Redshifts and Supernova Classification, ApJ, 1006, 122, doi: 10.3847/1538-4357/ae7a41DOI
  13. [14]Parshakova, T., Hastie, T., Darve, E., & Boyd, S. 2025b, Factor fitting, rank allocation, and partitioning in multilevel low rank matrices, in Springer Optimization and Its Applications, Vol. 220, Optimization, Discrete Mathematics and Applications to Data Sciences, ed. A. Nikeghbali, P. M. Pardalos, & M. T. Rassias (Springer), 135–173, doi: 10.1007/978-3-031-78369-2_9DOI
  14. [15]Scolnic, D. M., Jones, D. O., Rest, A., et al. 2018, The Complete Light-curve Sample of Spectroscopically Confirmed SNe Ia from Pan-STARRS1 and Cosmological Constraints from the Combined Pantheon Sample, ApJ, 859, 101, doi: 10.3847/1538-4357/aab9bb
  15. [16]Sherman, J., & Morrison, W. J. 1950, Adjustment of an Inverse Matrix Corresponding to a Change in One Element of a Given Matrix, Annals of Mathematical Statistics, 21, 124, doi: 10.1214/aoms/1177729893
  16. [17]Torrado, J., & Lewis, A. 2021, Cobaya: Code for Bayesian Analysis of hierarchical physical models, JCAP, 2021, 057, doi: 10.1088/1475-7516/2021/05/057DOI
  17. [18]Tripp, R. 1998, A two-parameter luminosity correction for Type Ia supernovae, A&A, 331, 815
  18. [19]van Haasteren, R., & Vallisneri, M. 2015, Low-rank approximations for large stationary covariance matrices, as used in the Bayesian and generalized-least-squares analysis of pulsar-timing data, MNRAS, 446, 1170, doi: 10.1093/mnras/stu2157DOI
  19. [20]Vincenzi, M., Brout, D., Armstrong, P., et al. 2024, The Dark Energy Survey Supernova Program: Cosmological Analysis and Systematic Uncertainties, ApJ, 975, 86, doi: 10.3847/1538-4357/ad5e6cDOI
  20. [21]Wang, Y. 2008, Figure of Merit for Dark Energy Constraints from Current Observational Data, Phys. Rev. D, 77, 123525, doi: 10.1103/PhysRevD.77.123525DOI
  21. [22]Woodbury, M. A. 1950, Inverting Modified Matrices, Memorandum Report 42, Statistical Research Group, Princeton University
  22. [23]Zuntz, J., Paterno, M., Jennings, E., et al. 2015, CosmoSIS: Modular cosmological parameter estimation, Astronomy and Computing, 12, 45, doi: 10.1016/j.ascom.2015.05.005DOI

Paper details

vlnc:W_74t93th7
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 9

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

Claude Code

View statement
Looking for related papers…
Contents