- The paper introduces SWIM, a tool that accurately models warm inflation by solving stochastic evolution equations and computing the parameter-dependent G(Q) correction factor.
- It employs both semi-analytical and full-numerical modules, enhanced with ML emulation to efficiently integrate with Bayesian parameter inference frameworks.
- Validation against existing tools demonstrates SWIM’s robustness across different dissipative regimes, providing improved precision for cosmological data analysis.
Overview of Warm Inflation and Motivations for Numerical Approaches
Warm Inflation (WI) represents a generically viable alternative to Cold Inflation (CI), characterized by the continuous dissipation of inflaton energy to a coexisting radiation bath. The dissipative dynamics introduce additional friction, facilitating slow-roll evolution even with steep potentials, and eliminating the need for a separate reheating phase. WI is compatible with a variety of scalar potentials—including those unsuitable for CI due to excessive tensor production or swampland conjecture constraints—and naturally yields sub-Planckian field excursions preferred by current cosmological data.
The core challenge addressed by SWIM is the inherent complexity of WI: coupled evolution of inflaton and radiation bath, temperature-dependent dissipative coefficients, and stochastic perturbations arising from thermal and quantum fluctuations. Accurate determination of the scalar power spectrum is impractical analytically except via restrictive approximations. Nearly all physically compelling WI models necessitate numerical techniques for their background and perturbative analyses, especially when integrating with MCMC frameworks for parameter estimation.
Structure and Capabilities of the SWIM Software Suite
SWIM is implemented in C++ and Python, structured into three main submodules:
- G(Q) Submodule: Numerically computes the G(Q) correcting factor, quantifying deviations of the true stochastic power spectrum from the semi-analytical approximation. Capable of analyzing arbitrary WI models with customizable inflaton potentials and dissipative coefficients.
- Semi-Analytical Power Spectrum Submodule: Utilizes numerically obtained G(Q) to construct the semi-analytical power spectrum, integrated with Cobaya for full Bayesian parameter inference using contemporary CMB datasets.
- Numerical Power Spectrum Submodule: Directly solves the full stochastic perturbation equations and outputs the raw numerical power spectrum, essential when G(Q) exhibits strong dependence on background parameters. This submodule leverages Random Forest regression (RFR) for emulation, reducing computational burden during MCMC analysis.
Figure 1: Illustration of the submodules of SWIM and their workflow.
SWIM distinguishes itself from existing tools (WarmSPy, WI2easy) by its generality, direct integration with Bayesian inference frameworks, and capacity to output fully numerical spectra when semi-analytical approaches break down.
Theoretical Foundations and Implementation Details
SWIM evolves the coupled dynamical equations for the inflaton and radiation bath in e-foldings, allowing for arbitrary functional forms of the potential V(ϕ) and dissipative coefficient Υ(ϕ,T). The module accommodates thermal noise and quantum fluctuations in the perturbative sector, supporting both correlated and uncorrelated stochastic terms (the former being physically preferred due to energy-momentum conservation).
Perturbatively, SWIM employs the Newtonian gauge for metric fluctuations and solves the stochastic evolution equations for δϕ, δρR, ΨR, and α. Ensemble averaging over numerous realizations yields the numerical curvature power spectrum G(Q)0, which can be mapped to the observable primordial power spectrum.
A correction factor G(Q)1 is computed as the ratio of numerical to analytical spectra, facilitating the semi-analytical approach:
G(Q)2
SWIM is explicitly designed to support arbitrary potentials, general dissipation forms, inclusion/exclusion of thermalization effects, and optional radiation noise terms.
Figure 2: Workflow of the G(Q)3 submodule, showing user input, internal computations, and output generation.
SWIM is benchmarked against WI2easy extensively, demonstrating equivalent accuracy for G(Q)4 across wide parameter ranges (G(Q)5), and verified to match outputs in both weak and strong dissipative regimes. Notably, SWIM and WI2easy diverge mildly in the moderate dissipative regime (G(Q)6) when correlated noise is correctly implemented—a physical effect absent in WI2easy’s structure.
SWIM exhibits comparable or superior runtimes relative to WI2easy, despite the added computational overhead of stochastic ensemble averaging. The framework’s robustness is further illustrated by the accurate reproduction of G(Q)7 for models with non-trivial dissipative coefficients (e.g., the EFT scenario in [Bastero-Gil:2019gao]), and its ability to handle thermalization effects self-consistently.











Figure 3: Comparison of SWIM and WI2easy outputs for G(Q)8 across representative WI models without inflaton thermalization.

Figure 4: Comparison of SWIM and WI2easy G(Q)9 outputs for select scenarios with inflaton thermalization and Bose-Einstein distribution.
SWIM’s advantage over WarmSPy is pronounced due to WarmSPy’s restriction to fixed potential forms and constant G(Q)0. SWIM’s flexibility permits arbitrary model exploration, and it is the only package capable of directly interfacing with MCMC codes for parameter estimation.
Critical Analysis of Semi-Analytical Methodology and SWIM’s Full-Numerical Approach
A crucial insight provided by SWIM is the discovery that G(Q)1 can, in certain particle physics constructions of WI, exhibit substantial dependence on parameters beyond G(Q)2—e.g., G(Q)3, G(Q)4, and other microphysical quantities. Standard semi-analytical pipelines, which fix G(Q)5 for one parameter set and reuse it, fail to capture this induced bias, resulting in systematically inaccurate inference.

Figure 5: Demonstrates the dependence of G(Q)6 on the normalization G(Q)7 and relativistic degrees of freedom G(Q)8 for a representative WI EFT model.
SWIM circumvents these limitations via its numerical spectrum module: solving the stochastic system for each point in parameter space, and directly integrating the output with likelihood evaluation. To render this computationally tractable, SWIM incorporates ML emulation strategies—most notably RFR—to dynamically decide, during MCMC sampling, when to trust fast surrogate predictions and when to invoke the full solver. Reliability is internally assessed based on variance across the ensemble of trees, ensuring accuracy is not sacrificed.
The emulator is trained during MCMC exploration, mapping background parameters to fitted power spectrum parameters G(Q)9. This approach is robust, model-independent, and avoids learning stochastic noise artifacts. Additional uncertainty introduced by solver stochasticity is empirically estimated and incorporated into the likelihood function.
Figure 6: Workflow of the numerical power spectrum submodule, including ML emulation and parameter inference.
Figure 7: Posterior distributions for the EFT WI model using both the full numerical solver and the random forest emulator, confirming congruent results.
Practical and Theoretical Implications, Future Directions
SWIM constitutes a comprehensive numerical platform for modeling, simulation, and statistical analysis of WI models, inclusive of all current theoretical advancements. Practically, SWIM enables rigorous evaluation of WI model viability against cosmological datasets, accommodating arbitrary microphysical properties and dissipation scenarios. Theoretically, its demonstration of parameter-dependent G(Q)0 provides impetus for reassessment of semi-analytical pipelines and calls for full-numerical approaches, especially for UV-complete models and those motivated by string theory.
The integration of ML emulation into stochastic solver pipelines sets a precedent for computational cosmology, balancing accuracy and scalability. Future extensions may incorporate additional inflationary scenarios, support for tensor spectra, and further optimization of surrogate modeling strategies.
Conclusion
SWIM offers a complete numerical framework for the modeling and analysis of Warm Inflationary power spectra, addressing the need for accurate, flexible, and computationally efficient tools in the study and parameter inference for WI models. The package’s ability to handle arbitrary potentials, dissipative coefficients, and parameter-dependent corrections, coupled with robust performance, enables rigorous theoretical and observational scrutiny of Warm Inflation scenarios. SWIM is uniquely positioned to be the standard for future WI research requiring numerical precision and integration with cosmological data analysis.