Papers
Topics
Authors
Recent
Search
2000 character limit reached

mochi_class: Stable EFT Solver for Horndeski Models

Updated 8 July 2026
  • mochi_class is an extension of hi_class designed to model Horndeski scalar–tensor gravity via a stable effective-field-theory basis, ensuring ghost-free and gradient-stable simulations.
  • It reconstructs conventional EFT functions from arbitrary time-dependent inputs, avoiding hard-coded parametrizations and numerical instabilities typical in standard Horndeski scans.
  • The solver employs metric-level quasi-static and GR activation schemes to accurately compute background expansion, CMB anisotropies, and matter power spectra in modified gravity models.

Searching arXiv for the specified topic and closely related papers to ground the article. mochi_class is an extension of the Einstein–Boltzmann solver hi_class, itself built on CLASS, developed to model the linear cosmology of Horndeski scalar–tensor gravity with arbitrary time-dependent inputs and an explicitly stability-oriented formulation. Its defining feature is the replacement of the conventional Horndeski α\alpha-parametrisation by a stable effective-field-theory basis, so that broad classes of ghost-free and gradient-stable models can be explored without committing to hard-coded parametrisations or a specific covariant Lagrangian. In the original code paper and in subsequent phenomenological studies, mochi_class is presented both as a numerical solver and as a framework for non-parametric exploration of modified gravity, including weak-gravity sectors of Horndeski theory and minimally coupled kinetic gravity braiding models with phantom crossing (Cataneo et al., 2024).

1. Software lineage and scientific scope

mochi_class, whose title expands as “Modelling Optimisation to Compute Horndeski In class,” is a patch on top of hi_class and CLASS that changes how Horndeski gravity is specified and evolved at linear order. Rather than requiring either a covariant Horndeski action Gi(ϕ,X)G_i(\phi,X) or a small set of fixed functional forms for the EFT functions, it allows the modified-gravity sector and, if desired, the background expansion sector to be supplied as arbitrary precomputed functions of time. The code is publicly available at https://github.com/mcataneo/mochi_class_public (Cataneo et al., 2024).

The target theory space is Horndeski gravity in the gravitational-wave-compatible subclass with αT=0\alpha_T=0, so that tensor waves propagate at the speed of light. Within this sector, mochi_class is designed to compute the background expansion, the evolution of linear perturbations, CMB anisotropy spectra, linear matter power spectra P(k,z)P(k,z), and derived modified-gravity observables such as μ(a,k)\mu(a,k) and γ(a,k)\gamma(a,k). Later applications explicitly use it to output CMB TT spectra, including the late-time ISW contribution, and linear matter power spectra for large ensembles of generated models (Thummel et al., 7 Aug 2025).

Its development is motivated by several numerical and phenomenological issues in standard Horndeski scans. Direct sampling in αi(a)\alpha_i(a) space often allocates most prior volume to unstable or numerically pathological models. Hard-coded parametrisations such as αiΩΛ(a)\alpha_i \propto \Omega_\Lambda(a) or αiΩDE(a)\alpha_i \propto \Omega_{\rm DE}(a) can also obscure viable sectors of theory space. mochi_class was introduced precisely to enlarge the accessible Horndeski landscape while improving robustness and reducing the need for fine-tuning (Cataneo et al., 2024).

2. Stable EFT basis and reconstruction of Horndeski functions

The theoretical core of mochi_class is a stable basis built from quantities that appear directly in the linear stability conditions. In the code paper, the basis is written as

{Dkin(a),M2(a),cs2(a),αB0},\{D_{\rm kin}(a),\,M_*^2(a),\,c_s^2(a),\,\alpha_{B0}\},

together with a background descriptor such as Gi(ϕ,X)G_i(\phi,X)0 or Gi(ϕ,X)G_i(\phi,X)1. The positivity conditions

Gi(ϕ,X)G_i(\phi,X)2

enforce the absence of scalar ghosts, a healthy effective Planck mass, and the absence of scalar gradient instabilities by construction (Cataneo et al., 2024).

The stable basis is related to the standard Bellini–Sawicki variables through

Gi(ϕ,X)G_i(\phi,X)3

with Gi(ϕ,X)G_i(\phi,X)4 reconstructed by solving a first-order differential equation and Gi(ϕ,X)G_i(\phi,X)5 then obtained from

Gi(ϕ,X)G_i(\phi,X)6

This reconstruction strategy is central: the user specifies positive functions in the stable basis, while mochi_class reconstructs the conventional EFT functions internally (Cataneo et al., 2024).

Subsequent work adopts the same logic in an “inherently stable basis” written as

Gi(ϕ,X)G_i(\phi,X)7

where Gi(ϕ,X)G_i(\phi,X)8. In that notation, Gi(ϕ,X)G_i(\phi,X)9 is the effective Planck mass and αT=0\alpha_T=00 is again not freely input, but obtained by solving an ODE derived from the definition of αT=0\alpha_T=01. This continuity of notation across code and applications is one of the reasons mochi_class can be used as a backend for non-parametric Horndeski model generation (Thummel et al., 7 Aug 2025).

A recurrent practical point is that this basis avoids numerical cancellation problems in models where αT=0\alpha_T=02 is analytically simple but numerically delicate. The code paper highlights designer αT=0\alpha_T=03 gravity as an example: in hi_class, cancellations can spuriously drive the derived αT=0\alpha_T=04 negative, whereas in mochi_class αT=0\alpha_T=05 is supplied directly as an input function, preventing stable models from being misclassified as unstable (Cataneo et al., 2024).

3. Numerical approximations, activation schemes, and viability controls

A second defining component of mochi_class is its implementation of the quasi-static approximation at the level of the modified metric potentials rather than at the level of the scalar fluctuation equation. In Newtonian gauge, the QSA is written through Poisson-like relations for αT=0\alpha_T=06 and the slip parameter αT=0\alpha_T=07, with modified-gravity functions αT=0\alpha_T=08 and αT=0\alpha_T=09 constructed from precomputed background quantities such as P(k,z)P(k,z)0, P(k,z)P(k,z)1, and P(k,z)P(k,z)2. The code paper emphasizes that this scheme is especially accurate for models transitioning between super- and sub-Compton regimes (Cataneo et al., 2024).

mochi_class also introduces a GR-approximation scheme that activates modified gravity only after a user-chosen redshift. Above P(k,z)P(k,z)3 the code evolves exactly P(k,z)P(k,z)4CDM; at activation, the scalar degree of freedom is introduced with QSA-matched initial conditions so that P(k,z)P(k,z)5 and P(k,z)P(k,z)6 remain smooth. The implementation includes a braiding activation threshold, allowing the effective onset of modified gravity to be tied to the time when P(k,z)P(k,z)7 exceeds a prescribed small value. This is intended to suppress numerical sensitivity to the poorly constrained very-early-time behavior of the EFT functions (Cataneo et al., 2024).

Beyond the physical stability conditions built into the basis, mochi_class monitors what the papers describe as “mathematical instabilities,” namely exponentially growing modes of the scalar fluctuation equation. The solver evaluates the growth rates implied by the coefficients of the scalar perturbation equation and rejects models whose real growth rates exceed a tunable threshold relative to P(k,z)P(k,z)8. Additional runtime checks include rejection of trajectories for which P(k,z)P(k,z)9 crosses the critical value μ(a,k)\mu(a,k)0, where the synchronous-gauge system inherits a known discontinuity from hi_class (Cataneo et al., 2024).

These numerical controls are not ancillary. They are part of the code’s scientific program: broad scans become feasible precisely because ghost and gradient stability are handled at the level of inputs, while pathological low-μ(a,k)\mu(a,k)1 or rapidly growing solutions are filtered during explicit time integration.

4. Inputs, outputs, and operational workflow

At the user level, mochi_class separates the cosmological problem into a background sector and a modified-gravity sector. The background can be specified through expansion_model = lcdm, w0wa, wext, or rho_de. The modified-gravity side is selected with gravity_model = stable_params, in which case the user provides tabulated arrays for the stable basis as functions of μ(a,k)\mu(a,k)2 (Cataneo et al., 2024).

Input block Options or arrays Function
Background lcdm, w0wa, wext, rho_de Specify μ(a,k)\mu(a,k)3, μ(a,k)\mu(a,k)4, or μ(a,k)\mu(a,k)5
Stable gravity sector Delta_M2(lna), D_kin(lna), cs2(lna), lna_smg, alpha_B0 via parameters_smg Reconstruct μ(a,k)\mu(a,k)6, μ(a,k)\mu(a,k)7, and μ(a,k)\mu(a,k)8
Approximation controls method_gr_smg, z_gr_smg, method_qs_smg, braid_activation_threshold Control GR activation and QSA behavior

The operational workflow is correspondingly modular. mochi_class reads the background and stable-basis arrays, computes μ(a,k)\mu(a,k)9 and γ(a,k)\gamma(a,k)0 where needed, reconstructs γ(a,k)\gamma(a,k)1 and γ(a,k)\gamma(a,k)2, integrates the braiding equation backward from the present using γ(a,k)\gamma(a,k)3, derives γ(a,k)\gamma(a,k)4 from γ(a,k)\gamma(a,k)5, stores QSA background quantities, and then solves the Einstein–Boltzmann system for the requested observables. In Python, the classy interface can pass arrays directly without file I/O (Cataneo et al., 2024).

The outputs are those of a general Einstein–Boltzmann solver specialized to Horndeski EFT: CMB angular power spectra, linear matter power spectra, growth observables, background tables, and effective modified-gravity functions. In the weak-gravity and KGB studies, these outputs are further used to analyze γ(a,k)\gamma(a,k)6, γ(a,k)\gamma(a,k)7, the ISW effect, CMB lensing, redshift-space distortions, weak lensing cosmic shear, and the galaxy–ISW cross-correlation (Thummel et al., 7 Aug 2025).

5. Validation and relation to other Einstein–Boltzmann solvers

The code paper validates mochi_class against hi_class, EFTCAMB, and MGCAMB across simple EFT parametrisations and specific models such as cubic Galileon, nKGB, and γ(a,k)\gamma(a,k)8. For scale-independent models, agreement between mochi_class and hi_class is reported at the γ(a,k)\gamma(a,k)9 level for the matter power spectrum. For Hu–Sawicki αi(a)\alpha_i(a)0 with QSA, mochi_class agrees with MGCAMB within αi(a)\alpha_i(a)1 up to αi(a)\alpha_i(a)2. For designer αi(a)\alpha_i(a)3, mochi_class with QSA differs from EFTCAMB by αi(a)\alpha_i(a)4 up to αi(a)\alpha_i(a)5, reaching αi(a)\alpha_i(a)6 at αi(a)\alpha_i(a)7; when QSA is disabled in mochi_class, the agreement is αi(a)\alpha_i(a)8 (Cataneo et al., 2024).

The same comparison program is used to motivate the metric-level QSA. In αi(a)\alpha_i(a)9 models, the original hi_class QSA, which treats the scalar fluctuation equation algebraically, produces percent-level errors on small scales, whereas the mochi_class implementation yields errors αiΩΛ(a)\alpha_i \propto \Omega_\Lambda(a)0 in linear αiΩΛ(a)\alpha_i \propto \Omega_\Lambda(a)1 out to αiΩΛ(a)\alpha_i \propto \Omega_\Lambda(a)2. CMB spectra, including TT, TE, EE, and lensing, agree at αiΩΛ(a)\alpha_i \propto \Omega_\Lambda(a)3 across the tested setups, apart from TE zero-crossings where relative differences are not physically informative (Cataneo et al., 2024).

This validation establishes mochi_class as neither a separate phenomenological wrapper nor merely a different parametrisation layer. It is a Horndeski-enabled Einstein–Boltzmann solver whose principal distinctions are the stable EFT basis, the metric-level QSA, the activation scheme for late-time modified gravity, and explicit mathematical-stability diagnostics.

6. Non-parametric weak gravity and “stable islands”

A major application of mochi_class is the search for “stable islands of weak gravity” in Horndeski theory space. In “Stable Islands of Weak Gravity,” the solver is described as the computational backbone for a non-parametric exploration in which Gaussian processes generate time-dependent basis functions while directly enforcing stability and phenomenology criteria. The study begins from the inherently stable basis implemented in mochi_class and focuses first on weak-gravity models that suppress the growth of large-scale structure at late times (Thummel et al., 7 Aug 2025).

In that analysis, weak gravity means αiΩΛ(a)\alpha_i \propto \Omega_\Lambda(a)4 in the high-αiΩΛ(a)\alpha_i \propto \Omega_\Lambda(a)5 quasi-static regime. The small-scale effective gravitational coupling is written as

αiΩΛ(a)\alpha_i \propto \Omega_\Lambda(a)6

so that a larger effective Planck mass suppresses gravity while the fifth-force contribution is always positive when αiΩΛ(a)\alpha_i \propto \Omega_\Lambda(a)7 and αiΩΛ(a)\alpha_i \propto \Omega_\Lambda(a)8. The no-slip condition

αiΩΛ(a)\alpha_i \propto \Omega_\Lambda(a)9

eliminates the fifth-force term, leaving

αiΩDE(a)\alpha_i \propto \Omega_{\rm DE}(a)0

This makes the design of weak gravity largely a question of constructing suitable αiΩDE(a)\alpha_i \propto \Omega_{\rm DE}(a)1 histories that remain stable when the full perturbation system is evolved (Thummel et al., 7 Aug 2025).

The models are generated non-parametrically with Gaussian processes, using the public GPtools package and a squared-exponential kernel. The GP realizations are conditioned to approach GR at early times, to bias αiΩDE(a)\alpha_i \propto \Omega_{\rm DE}(a)2 over an intermediate redshift interval relevant for structure growth, and, in some constructions, to satisfy “local-value” or “local-convergence” conditions at αiΩDE(a)\alpha_i \propto \Omega_{\rm DE}(a)3. mochi_class then reconstructs αiΩDE(a)\alpha_i \propto \Omega_{\rm DE}(a)4, performs the built-in stability checks, integrates perturbations, and outputs the observables used to identify viable model families. The study reports a broad range of weak-gravity islands and illustrates models that produce a αiΩDE(a)\alpha_i \propto \Omega_{\rm DE}(a)5 suppression of linear power at αiΩDE(a)\alpha_i \propto \Omega_{\rm DE}(a)6 relative to GR. It also shows that replacing the αiΩDE(a)\alpha_i \propto \Omega_{\rm DE}(a)7CDM expansion history with the DESI αiΩDE(a)\alpha_i \propto \Omega_{\rm DE}(a)8CDM best fit still yields stable islands of weak gravity (Thummel et al., 7 Aug 2025).

A notable negative result concerns a common intuition about local screening requirements. For no-slip models on a αiΩDE(a)\alpha_i \propto \Omega_{\rm DE}(a)9CDM background, imposing both {Dkin(a),M2(a),cs2(a),αB0},\{D_{\rm kin}(a),\,M_*^2(a),\,c_s^2(a),\,\alpha_{B0}\},0 and {Dkin(a),M2(a),cs2(a),αB0},\{D_{\rm kin}(a),\,M_*^2(a),\,c_s^2(a),\,\alpha_{B0}\},1 drives {Dkin(a),M2(a),cs2(a),αB0},\{D_{\rm kin}(a),\,M_*^2(a),\,c_s^2(a),\,\alpha_{B0}\},2 negative at late times, so there is no stable no-slip local-convergence weak-gravity model in that setting. By contrast, beyond-no-slip constructions with a non-zero fifth force can realize local-convergence solutions while remaining stable. This suggests that the viable weak-gravity sector is structured, rather than generic, even within the stable basis.

7. Minimally coupled KGB, phantom crossing, and current interpretive debates

A second major application uses mochi_class to test whether late-time phantom crossing requires non-minimal conformal coupling. “Non-parametric exploration of minimally coupled gravity with phantom crossing” studies the minimally coupled, luminal Horndeski subclass known as kinetic gravity braiding. In this setting,

{Dkin(a),M2(a),cs2(a),αB0},\{D_{\rm kin}(a),\,M_*^2(a),\,c_s^2(a),\,\alpha_{B0}\},3

so the only nontrivial perturbation EFT functions are {Dkin(a),M2(a),cs2(a),αB0},\{D_{\rm kin}(a),\,M_*^2(a),\,c_s^2(a),\,\alpha_{B0}\},4 and {Dkin(a),M2(a),cs2(a),αB0},\{D_{\rm kin}(a),\,M_*^2(a),\,c_s^2(a),\,\alpha_{B0}\},5, while the background is specified by {Dkin(a),M2(a),cs2(a),αB0},\{D_{\rm kin}(a),\,M_*^2(a),\,c_s^2(a),\,\alpha_{B0}\},6 or equivalently {Dkin(a),M2(a),cs2(a),αB0},\{D_{\rm kin}(a),\,M_*^2(a),\,c_s^2(a),\,\alpha_{B0}\},7. The study uses mochi_class in its manifestly stable EFT-basis mode to scan these models non-parametrically (Cataneo et al., 15 Dec 2025).

The scan parameterizes the stable functions in terms of {Dkin(a),M2(a),cs2(a),αB0},\{D_{\rm kin}(a),\,M_*^2(a),\,c_s^2(a),\,\alpha_{B0}\},8,

{Dkin(a),M2(a),cs2(a),αB0},\{D_{\rm kin}(a),\,M_*^2(a),\,c_s^2(a),\,\alpha_{B0}\},9

where Gi(ϕ,X)G_i(\phi,X)00 and Gi(ϕ,X)G_i(\phi,X)01 are Gaussian-process draws with squared-exponential covariance. The background is not reconstructed non-parametrically in this study; instead, it is fixed to CPL forms

Gi(ϕ,X)G_i(\phi,X)02

including the DESI DR2 + CMB + DES Y5 best fit Gi(ϕ,X)G_i(\phi,X)03 and two mirage-dark-energy cases. Over 250,000 KGB models are generated and passed through mochi_class, which reconstructs Gi(ϕ,X)G_i(\phi,X)04 and Gi(ϕ,X)G_i(\phi,X)05, enforces the stable-basis conditions, and rejects models that develop large mathematical instabilities (Cataneo et al., 15 Dec 2025).

The phenomenological filtering is deliberately conservative. The selected models are required to keep the linear matter power spectrum within Gi(ϕ,X)G_i(\phi,X)06 of Gi(ϕ,X)G_i(\phi,X)07CDM on sub-horizon scales at Gi(ϕ,X)G_i(\phi,X)08 and to produce a positive late-time galaxy–ISW cross-correlation. The resulting models also remain broadly consistent with CMB temperature and lensing power spectra, redshift-space distortions, and cosmic shear. The central conclusion is explicit: viable phantom-crossing solutions exist without conformal coupling. This directly challenges the interpretation that phantom crossing inferred from DESI-era background fits necessarily points toward Gi(ϕ,X)G_i(\phi,X)09 or a time-varying effective Planck mass (Cataneo et al., 15 Dec 2025).

In this KGB context, mochi_class functions as a stable-basis EFT solver, but also as an instrument for clarifying model-selection biases. A plausible implication is that earlier preferences for non-zero conformal coupling in simple EFT parametrisations may partly reflect the choice of basis and priors, rather than an unavoidable feature of the data. That implication is not a formal theorem of the code; it follows from the fact that a broader, manifestly stable non-parametric scan uncovers minimally coupled phantom-crossing models that had been obscured in more restrictive parametrised analyses.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (3)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to mochi_class.