CosmoForge I: A unified framework for QML power spectrum estimation and pixel-based likelihood analysis

arXiv:2605.21149 · astro-ph.CO, astro-ph.IM · Submitted 2026-05-20 · Read on arXiv

Listen

Radio episode about this paper

Transcript

Introduction to the show: ident: Astrophysics Radio. Generated commentary on the latest astrophysics papers.

Vera: I'm Vera.

Jocelyn: And I'm Jocelyn, here with Subrahmanyan.

Vera: We're looking at the paper: "CosmoForge I: A unified framework for QML power spectrum estimation and pixel-based likelihood analysis".

Paper summary: Vera: We're moving past just having codes that do one thing well—either estimating a power spectrum or doing a pixel-space likelihood check—to needing a single Python framework that handles both consistently for spin zero and spin two fields. That’s the main thesis of CosmoForge I: A unified framework for QML power spectrum estimation and pixel-based likelihood analysis.

Jocelyn: What they claim is that this unification lets you do a self-consistent analysis pipeline, starting from recovering the power spectrum right up to inferring parameters from the pixel data. It’s designed to handle general noise patterns, not just simple ones like diagonal or isotropic noise.

Subrahmanyan: The significance is that existing tools are often tailored for specific needs—like pixel polarization estimation or certain harmonic-space formulations—and this framework brings them all under one umbrella, providing a ground truth against which other approximate methods can be validated.

Vera: They specifically address the issue where different QML implementations exist, each restricted to specific computations, and they show how this framework combines the low ell likelihood and QML formalism into one coherent system.

Jocelyn: And they tackle noise modeling head-on by stating that the noise matrix N doesn't have to be diagonal or isotropic; it can represent realistic things like one over f noise or correlations between frequency channels in cross-correlation analyses <ref:2605.21149#pg1>.

Subrahmanyan: This is important because real experiments produce complex residuals, and being able to incorporate those realistic noise patterns directly into the framework for calculating the signal covariance S plus N gives you a much more accurate likelihood evaluation.

Vera: In short, it’s about creating a system where you can go from power spectrum recovery all the way to parameter inference without having to stitch together different code modules manually.

Jocelyn: It makes the whole analysis pipeline modular and consistent, which is what they are aiming for across different experimental setups, from space-based missions like Planck to ground-based experiments.

Subrahmanyan: If this works as advertised, it could streamline the process for anyone trying to use QML estimators on CMB data or other fields where noise is complex, making the analysis pipeline much more efficient.

Conclusion: Vera: So, looking at CosmoForge I: A unified framework for QML power spectrum estimation and pixel-based likelihood analysis, the authors are proposing a single Python package that unifies the process of estimating power spectra with evaluating pixel-based likelihoods.

Jocelyn: The core implication is moving away from fragmented tools to a single, modern framework that handles both spin zero and spin two fields while accommodating complex noise patterns. It’s about creating a standard way to do this analysis.

Subrahmanyan: For the broader field, it means researchers can build more complete pipelines where the estimation part feeds directly into the inference part with fewer assumptions about how those two separate stages interact.

Vera: It’s less about finding one magic answer and more about providing a validated, modular starting point that lets people start doing self-consistent analysis right away.

Jocelyn: This paper provides a solid foundation for anyone working in this area who needs a single, validated Python tool to handle QML analysis from the spectrum estimation phase through to the final likelihood calculation.

Subrahmanyan: It’s about making sure that when we look at cosmological signals, we have a consistent and efficient way to model both the signal and the noise structure across all those different analytical steps.

G. Galloni, L. Pagano

Dipartimento di Fisica e Scienze della Terra, UniversitaÞlla Ferrara · Istituto Nazionale di Fisica Nucleare Sezione di Ferrara · Institut d’Astrophysique Spatiale CNRS Univ Paris-Sud Université Paris-Saclay

astro-ph.CO, astro-ph.IM

Submitted: 2026-05-20

Updated: 2026-05-20

Comments: Prepared for submission to A&A, 20 pages, 6 figures

Journal ref: A&A 715, A348 (2026)

DOI: 10.1051/0004-6361/202661478

Code: https://github.com/ggalloni/CosmoForge

License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/

Importance score: 92/100

The gist: A unified framework for QML power spectrum estimation and pixel-based likelihood analysis presents CosmoForge…

Key concepts

CosmoForge
A unified Python framework that combines two main tasks in cosmology: estimating the power spectrum using Quantum Machine Learning (QML) and calculating pixel-based likelihoods. It handles spin-0 and spin-2 fields on a sphere, allowing for general noise covariances, making it a comprehensive tool.
QML Power Spectrum Estimation
This involves using Quantum Machine Learning techniques to estimate the cosmological power spectrum from data. CosmoForge implements this estimation pipeline within its QUBE package, offering an alternative method to traditional analysis.
Pixel-based Likelihood Analysis
This technique evaluates how well a set of cosmological parameters fits the observed data in pixel space. PICSLike handles this by evaluating the likelihood over parameter grids, providing a way to assess parameter uncertainties and constraints.
Computational Bases
The framework allows users to choose between two calculation methods: a harmonic basis using the Sherman–Morrison–Woodbury identity or a direct pixel-space basis. An auto-selector chooses the faster method based on setup time costs, optimizing performance for different analysis needs.

Terminology

Summary

A unified framework for QML power spectrum estimation and pixel-based likelihood analysis presents CosmoForge, a Python framework that unifies QML power spectrum estimation and pixel-based Gaussian likelihood evaluation for spin-0 and spin-2 fields on the sphere, with general (non-diagonal) noise covariances The framework is publicly available, pip-installable, and extensible to non-CMB observables

Framework Architecture

CosmoForge is organized into three interconnected, independently pip-installable packages: CosmoCore (infrastructure), QUBE (Fisher and QML estimation), and PICSLike (pixel-space likelihood) CosmoCore provides the computational foundation, including field management, spherical harmonic and pixel-space operations, matrix algebra, the harmonic operator V and SMW machinery, binning, beam handling, and I/O utilities QUBE implements the QML estimation pipeline through two main classes: Fisher and Spectra PICSLike evaluates the pixel-space likelihood over parameter grids. Both packages inherit from the Core abstract base class, ensuring a common infrastructure is used consistently across QML estimation and likelihood evaluation. p. 5

Computational Bases and Optimizations

The framework exposes two interchangeable computation bases: a harmonic basis built on the Sherman–Morrison–Woodbury (SMW) identity and a direct pixel-space basis The auto selector compares the leading-order costs—n modes for the SMW kernel against (Nbins + 1) Npix for the per-bin C−1 ∂C/∂l products—and picks the cheaper basis at setup time. Exact algorithmic optimisations reduce the Fisher cost to O(l 4 max) for arbitrary noise covariances, with Numba JIT compilation of hot kernels and MPI parallelisation of the likelihood scan. p. 0 The harmonic-space formulation reduces the leading cost of QML estimation from O(N cubed pix) to O(n cubed modes), but several further optimisations are required for analyses to remain tractable at Nside ≳ 32. p. 5

Validation and Performance

CosmoForge reproduces the Planck low-l Fortran reference implementation across both the QML and pixel-space likelihood pipelines, consistently with double-precision arithmetic Monte Carlo validation shows that the mean recovered BB spectrum is consistent with zero across all multipoles, confirming that the QML estimator is unbiased at the ∼ 10−8 precision level. Empirical scatter and Fisher prediction overlap at every multipole and every fsky, confirming that F−1 accurately captures the estimator variance regardless of mask geometry. p. 7 The framework reaches Nside = 256 in joint Q, U at fsky = 0. p. 901 within a single-node, single-allocation budget. p. 9

Comparison with Existing Codes

The QML landscape today is at a similar stage: each public code addresses a useful subset of the problem, and the gap that CosmoForge seeks to fill is not a missing feature but the unification of features across a single, modern, extensible Python framework CosmoForge fills, for QML analyses, the same gap that NaMaster (Alonso et al. 2019) filled for pseudo-Cl analyses: a single public, validated, modular Python framework that does the standard analysis correctly out of the box. p. 1 The authors caution that the public versions of these codes evolve, and the table reflects a snapshot. p. 1

Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.

Improvements for AI systems

  1. Unified Framework for Analysis: The CosmoForge framework unifies QML power spectrum estimation and pixel-based Gaussian likelihood evaluation into a single system, enabling a self-consistent analysis pipeline from power spectrum recovery to parameter inference.

  2. General Observables Support: The framework supports any signal characterized by an angular power spectrum, including scalar (spin-0) and tensor (spin-2) fields on the sphere and general non-diagonal noise covariances.

  3. Computation Basis Abstraction: It exposes two interchangeable computation bases—a harmonic basis built on the Sherman–Morrison–Woodbury identity and a direct pixel-space basis—allowing the system to automatically select whichever is cheaper for the current configuration.

  4. Algorithmic Optimization: Exact algorithmic optimizations reduce the Fisher cost to O(l max 4 max) for arbitrary noise covariances, achieved through Numba JIT compilation of hot kernels and MPI parallelization of likelihood scans.

  5. Native Output Normalizations: The framework exposes three output normalisations—deconvolved, decorrelated, and window-convolved estimates—through a single code path without requiring recomputation.

  6. Spin-2 Field Handling: The framework generalizes to spin-2 (tensor) fields by using spin-weighted spherical harmonics and correctly handling the block structure of the lambda matrix for joint analysis of spin-0 and spin-2 fields.

  7. Efficient Inversion via SMW: The implementation uses the Sherman–Morrison–Woodbury identity to factorize covariance matrices, reducing per-point cost from O(N cubed pix) to O(n modes 3) for likelihood evaluation.

  8. Sparse Trace Evaluation: The Fisher matrix computation is optimized by using sparse evaluation of Fisher traces, reducing the scaling from O(n squared l n squared modes) to O(l max 4 max).

  9. Adaptive Multipole Range: The framework supports switching between inference windows and fixed fiducial multipoles, allowing the user to vary power spectra only over a target range while holding higher multipoles fixed at a fiducial model.

  10. Multi-Field Joint Analysis: For joint analysis of multiple fields (e.g., temperature and polarization), it automatically detects field groups that decouple in both signal and noise for fast block-diagonal covariance handling, reducing inversion cost when cross-spectra are not estimated between groups.

  11. End-to-End Inference: The framework allows for end-to-end pixel-based inference by evaluating the full Gaussian log likelihood over a Cartesian grid of cosmological parameters using the SMW identity to evaluate the quadratic form and log determinant efficiently.

Sources

Related papers