| Issue |
A&A
Volume 707, March 2026
|
|
|---|---|---|
| Article Number | A128 | |
| Number of page(s) | 18 | |
| Section | Numerical methods and codes | |
| DOI | https://doi.org/10.1051/0004-6361/202557450 | |
| Published online | 11 March 2026 | |
SymBoltz.jl: A symbolic-numeric, approximation-free, and differentiable linear Einstein–Boltzmann solver
Institute of Theoretical Astrophysics, University of Oslo,
PO Box 1029 Blindern,
0315
Oslo,
Norway
★ Corresponding author: This email address is being protected from spambots. You need JavaScript enabled to view it.
Received:
26
September
2025
Accepted:
12
January
2026
Abstract
SymBoltz is a new Julia package for solving the linear Einstein-Boltzmann equations in cosmology. It features a symbolic-numeric interface for specifying equations, is free of approximation switching schemes, and is compatible with automatic differentiation. Cosmological models are built from replaceable physical components in a way that scales well to extended models, or alternatively written as one compact system of equations. The modeler provides their equations, and SymBoltz solves them while reducing friction in the modeling process. Symbolic knowledge enables powerful automation of tasks, such as separating computational stages (e.g., background and perturbations), generating analytical and sparse Jacobian matrices, and interpolating arbitrary variables from the solution. Implicit solvers integrate the full stiff equations at all times without approximations, which greatly simplifies the code. Performance remains comparable to existing approximation-based codes due to efficient high-order implicit methods, fast generated code, optimal handling of the Jacobian, and sparse matrix methods. Automatic differentiation gives exact derivatives of any output with respect to any input, which is important for gradient-based Markov chain Monte Carlo (MCMC) sampling in large parameter spaces, Fisher forecasting, emulator training, and sensitivity analyses. The main features form a synergy that reinforces the design of the code. Output spectra agree with established codes up to 0.1% with standard precision levels. More work is needed to implement additional features and for fast reverse-mode automatic differentiation of scalar loss functions. SymBoltz is publicly available with single-command installation and extensive documentation. We welcome all contributions to the code from the community.
Key words: methods: numerical / cosmology: theory
© The Authors 2026
Open Access article, published by EDP Sciences, under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
This article is published in open access under the Subscribe to Open model. This email address is being protected from spambots. You need JavaScript enabled to view it. to support open access publication.
Current usage metrics show cumulative count of Article Views (full-text article views including HTML views, PDF and ePub downloads, according to the available data) and Abstracts Views on Vision4Press platform.
Data correspond to usage on the plateform after 2015. The current usage metrics is available 48-96 hours after online publication and is updated daily on week days.
Initial download of the metrics may take a while.