ShapeFit Compression Framework
- ShapeFit Compression is a parameter-compression framework that reduces high-dimensional data to a concise set of summary parameters for robust cosmological and image analyses.
- It introduces additional shape parameters (m and n) to capture broadband spectral features, overcoming limitations of standard template fitting and full modeling approaches.
- The method enables fast, model-independent inference with minimal computational expense while mitigating systematic biases and prior-volume effects.
ShapeFit Compression is a parameter-compression framework designed to efficiently and robustly extract key physical information from high-dimensional cosmological or image data by reducing full data vectors (such as galaxy power spectra, bispectra, or digital images) to a small set of summary parameters. While several domains employ the idea of “compression by shape” or “shape-based coding,” the ShapeFit methodology is most prominently associated with large-scale structure analyses in cosmology, where it enables model-independent, high-throughput inference of parameters governing geometry, growth, and broadband spectral shape. Its mathematical, algorithmic, and validation details have been established through a series of foundational works, culminating in its application to the DESI survey and other precision cosmological analyses.
1. Conceptual Foundations and Motivations
ShapeFit Compression arose to address the computational and interpretational limitations of both standard template fitting (BAO+RSD) and “full modeling” (FM) approaches. In the standard “classic” analysis pipeline for galaxy surveys, clustering data are compressed into a handful of parameters—typically BAO dilation scales (e.g., , ) and growth measures (e.g., )—by marginalizing over, and largely discarding, broad-band power spectrum shape information (Brieden et al., 2021). Full modeling, by contrast, fits the entire data vector as a function of cosmological and nuisance parameters, but at the cost of high-dimensional Markov chains and significant prior-volume effects or projection biases, particularly in extended models (Forero-Sánchez et al., 21 Feb 2026Forero-Sánchez et al., 22 Jun 2026).
ShapeFit inserts an additional “shape” degree of freedom (the parameter and, optionally, ) to encode the broadband slope (and running) of the matter power spectrum or the equivalent feature in other domains. This enables nearly all of the cosmological constraining power of FM approaches to be recovered in a model-independent way, while controlling systematics due to marginalization and prior choices. The resulting compressed parameter vector enables fast, robust, and model-agnostic inference, as it decouples the expensive physical modeling step from the final cosmological or information-theoretic likelihood analysis.
2. Mathematical Formulation and Parameterization
The core of ShapeFit Compression is the summary-statistic parameterization of the data—whether this is a cosmological power-spectrum multipole vector or, in the image domain, a sequence of shape-filling operations. For cosmic large-scale structure, the compressed parameters per tracer and redshift bin are typically:
- , : Radial and transverse scale dilations (AP parameters), i.e.,
- or : Growth and amplitude combinations (the bispectrum allows 0 and 1 to be disentangled).
- 2, 3: Parameters controlling the broadband shape and running of 4. The template deformation is
5
with 6, 7, and 8 often fixed by the spectral tilt.
- In image compression, ShapeFit corresponds to choosing a dictionary 9 of frequent “shapes” and encoding the image by a sequence of fill-operations, capturing entropy via a shape–pixel ratio 0 with 1 for asymptotic optimality (Xin et al., 2022).
The ShapeFit slope parameter 2 quantifies deviations in the logarithmic derivative of the (no-wiggle) power spectrum around a pivot 3:
4
This encapsulates sensitivity to phenomena such as matter–radiation equality, baryon suppression, and, more generally, early-universe physics.
3. Algorithmic and Implementation Aspects
The ShapeFit algorithm proceeds via distinct compression and inference steps:
Compression:
- Compute the full data vector (e.g., 5) for each tracer and redshift bin.
- Fit a fixed (fiducial) template, deformed by the 6 shape parameters and rescaled via 7, to the data using a Gaussian likelihood and an analytic or MCMC marginalization over nuisance parameters (bias, EFT counterterms, stochastic terms).
- Output is a vector of best-fit/compressed parameters 8 with covariance matrix.
Fast cosmological inference:
- Feed the compressed parameters (with their likelihood and covariance) into a second-stage chain, where cosmological parameters (e.g., 9) are mapped into predictions for the ShapeFit observables via analytical expressions or Boltzmann codes.
- The final likelihood is evaluated directly in the compressed space:
0
This two-stage approach decouples the computational expense of full-model evaluation from the parameter sampling, yielding orders-of-magnitude speedup and isolating cosmological information from high-dimensional nuisance-volume effects (Lai et al., 2024Maus et al., 2024Forero-Sánchez et al., 21 Feb 2026).
4. Validation, Robustness, and Systematic Effects
ShapeFit Compression has undergone extensive validation on synthetic and survey-like mock data:
- Large-scale tests (e.g., PT Challenge, AbacusSummit N-body runs) consistently recover cosmological parameters (1) to within 2 of the truth over volumes up to 3, surpassing future survey volumes (Brieden et al., 2022).
- Precision matches to full modeling (FM) are demonstrated at the 4 level for 5CDM; in extended models (wCDM, oCDM, free 6, massive neutrinos, curvature, modified gravity), ShapeFit constraints are comparable or only modestly degraded, with similar or lower projection bias than FM (Lai et al., 2024Forero-Sánchez et al., 22 Jun 2026).
- Systematics unique to ShapeFit include the choice of maximum 7 (safe up to 8), inclusion or modeling of the hexadecapole (requiring care for unbiased 9 constraints), and the handling of bias or EFT parameter marginalization (strong prior volume effects in FM are suppressed by the compression) (Ramirez-Solano et al., 2024).
Robustness in the numerical extraction of 0 requires careful de-wiggling (isolation of the no-wiggle spectrum), mild smoothing/post-processing, and consistent extraction procedures between theory and data pipelines. A systematic uncertainty for 1 of 2 is recommended across 3CDM-like extensions (Ghaemi et al., 14 Apr 2025).
5. Applications: Image Coding and Shape Analysis
The compression-by-shapes paradigm also underlies image coding frameworks proven to be asymptotically optimal for stationary ergodic sources (Xin et al., 2022). Here, the encoder decomposes the image into a sequence of shape-filling operations from a dictionary 4, emitting for each the shape index and spatial location:
5
with the crucial asymptotic optimality condition 6 and a codebook/dictionary size polynomial in 7. On the MNIST dataset, this yields compression ratios superior to standard techniques with 8 achieved across all classes.
Relatedly, surface and smooth shape analysis in geometry processing exploits subdivision-surface compression, representing surfaces with a minimal set of control points (typically 92--5% of original mesh vertices) while retaining high accuracy for metric and spectral shape descriptors (Estellers et al., 2017).
6. Recent Advances and Cosmological Impact
ShapeFit has enabled the joint analysis of DESI DR1 full-shape (FS; power spectrum multipoles and bispectrum monopole) and BAO (post-reconstruction) measurements with robust cross-covariance estimation, delivering competitively tight cosmological constraints in 0CDM and beyond (Novell-Masot et al., 19 Mar 2026Forero-Sánchez et al., 21 Feb 2026Forero-Sánchez et al., 22 Jun 2026). The inclusion of the bispectrum via ShapeFit further breaks the 1–2 degeneracy, tightening 3 constraints by 420% and increasing amplitude parameters 5 and 6 by more than 7, in line with theoretical expectations for the information content of three-point statistics.
By compressing the information into physically-interpretable summary parameters and mitigating prior-volume artifacts, ShapeFit provides a scalable, prior-robust, and computationally efficient pathway. It supports rapid, model-independent updates to constraints as new cosmological and astrophysical models are proposed or tested, and permits a clean mapping between compressed observables and physical parameter space for a range of scenarios (standard 8CDM, 9CDM, massive neutrinos, spatial curvature, and modified gravity).
7. Limitations and Caveats
The ShapeFit approach makes several key assumptions and faces some limitations:
- The two-parameter 0 broadband shape deformation is valid in 1CDM and most simple extensions, but for nonstandard scenarios (e.g., early dark energy with strong pre-BAO features), this ansatz may be insufficient and require generalization (Ghaemi et al., 14 Apr 2025).
- Systematic uncertainties assigned to 2 may underestimate errors in cosmologies with complex transfer function features.
- Inclusion of the bispectrum is typically limited by S/N (e.g., only LRGs in DESI); ELG and QSO bispectra require further development to achieve reliable ShapeFit compression.
- The ShapeFit pipeline requires consistent de-wiggling/smoothing/derivative procedures between data and theory pipelines to avoid bias.
- In image and shape analysis, the approach relies on the representativity of the shape dictionary and may oversmooth sharp edges without special detection/treatment (Estellers et al., 2017).
ShapeFit Compression has established itself as an essential methodological advance in both statistical cosmology and shape-based image/data analysis, providing an optimal tradeoff between information retention, computational efficiency, and robustness against systematics and prior-volume artifacts (Brieden et al., 2021Forero-Sánchez et al., 22 Jun 2026Lai et al., 2024Xin et al., 2022Estellers et al., 2017).