Table of Contents
Fetching ...

BBNet: accurate neural network emulator for primordial light element abundances

Fan Zhang, Hang Diao, Bohua Li, Joel Meyers, Paul R. Shapiro

TL;DR

BBNet addresses the bottleneck in precision Big-Bang Nucleosynthesis by training a deep-learning emulator on two public BBN codes to predict the primordial abundances $Y_ ext{P}$ and $ ext{D/H}$ with negligible bias. Its residual multi-head attention-based architecture, coupled with careful data-generation over extended cosmologies (including dark radiation and a stiff phase via $\kappa_{10}$ and $\Delta N_ ext{eff}$), yields millisecond-scale evaluations that are $\mathcal{O}(10^{4})$ times faster than full solvers. The emulator achieves sub-percent accuracy across wide parameter ranges and demonstrates robust, unbiased performance in MCMC contexts, outperforming simplified approximation schemes that introduce biases. This enables efficient, high-precision cosmological inferences and new-physics searches, while remaining easily extensible to additional abundances or nuclear-rate variations.

Abstract

Big-Bang Nucleosynthesis (BBN) predictions of primordial light-element abundances offer a powerful probe of early-Universe physics. However, high-accuracy numerical BBN calculations have become a major computational bottleneck for large-scale cosmological inferences due to the complex nuclear network. Here we present BBNet, a fast and accurate deep learning emulator for primordial abundances. The training data are generated by full numerical calculations using two public BBN codes, PArthENoPE and AlterBBN, modified to accommodate extended cosmologies that include dark radiation and a stiff equation of state. The network employs a residual multi-head architecture to capture convoluted physical relationships. BBNet produces primordial helium-4 and deuterium abundances with negligible errors in milliseconds per sample, achieving a speed-up of up to $10^4$ times relative to first-principles solvers while remaining unbiased over wide parameter ranges. Therefore, our emulator can supersede traditional simplified numerical prescriptions that compromise accuracy for speed. Based on extensive assessments of its performance, we conclude that BBNet is an optimal solution to the theoretical prediction of primordial element abundances. It will serve as a reliable tool for precision cosmology and new-physics searches.

BBNet: accurate neural network emulator for primordial light element abundances

TL;DR

BBNet addresses the bottleneck in precision Big-Bang Nucleosynthesis by training a deep-learning emulator on two public BBN codes to predict the primordial abundances and with negligible bias. Its residual multi-head attention-based architecture, coupled with careful data-generation over extended cosmologies (including dark radiation and a stiff phase via and ), yields millisecond-scale evaluations that are times faster than full solvers. The emulator achieves sub-percent accuracy across wide parameter ranges and demonstrates robust, unbiased performance in MCMC contexts, outperforming simplified approximation schemes that introduce biases. This enables efficient, high-precision cosmological inferences and new-physics searches, while remaining easily extensible to additional abundances or nuclear-rate variations.

Abstract

Big-Bang Nucleosynthesis (BBN) predictions of primordial light-element abundances offer a powerful probe of early-Universe physics. However, high-accuracy numerical BBN calculations have become a major computational bottleneck for large-scale cosmological inferences due to the complex nuclear network. Here we present BBNet, a fast and accurate deep learning emulator for primordial abundances. The training data are generated by full numerical calculations using two public BBN codes, PArthENoPE and AlterBBN, modified to accommodate extended cosmologies that include dark radiation and a stiff equation of state. The network employs a residual multi-head architecture to capture convoluted physical relationships. BBNet produces primordial helium-4 and deuterium abundances with negligible errors in milliseconds per sample, achieving a speed-up of up to times relative to first-principles solvers while remaining unbiased over wide parameter ranges. Therefore, our emulator can supersede traditional simplified numerical prescriptions that compromise accuracy for speed. Based on extensive assessments of its performance, we conclude that BBNet is an optimal solution to the theoretical prediction of primordial element abundances. It will serve as a reliable tool for precision cosmology and new-physics searches.

Paper Structure

This paper contains 21 sections, 16 equations, 8 figures, 5 tables.

Figures (8)

  • Figure 1: Consensus of primordial element abundances computed by our modified PArthENoPE (orange dashed lines with circle markers) and AlterBBN (red solid lines with square markers). Each panel contains two stacked subplots for $Y_\mathrm{P}$ and $\mathrm{D/H}$, respectively. Fig. \ref{['fig:compare_al_pe_kappa']} displays their relations with the density parameter of the stiff fluid, $\kappa_{10} \!\equiv\! (\rho_\mathrm{s}/\rho_\gamma)_{T=10\,\mathrm{MeV}}$, while Fig. \ref{['fig:compare_al_pe_dnnu']} shows the relations with the effective number of extra relativistic species, $\Delta N_\mathrm{eff}$. The gray shaded bands denote the $1\sigma$ observational constraints from Ref. Fields:2025 and the black dashed lines mark the corresponding central values.
  • Figure 2: Overview of the BBNet emulator and its training interface. Panel A shows the input–output schematic for the two BBN solvers used to generate the training set. Each solver takes as input the baryon density $\Omega_{\mathrm{b}} h^{2}$, the neutron lifetime $\tau_{n}$, and any beyond-standard-model extensions. For scenarios with a stiff-fluid sector, the solvers parameterize this component through $\kappa_{10}$, defined as the stiff-fluid to photon energy-density ratio at $T = 10\,\mathrm{MeV}$. The solvers encode relativistic-sector modifications either through $\Delta N_{\mathrm{eff}}$ or through generalized coefficients $\kappa_{\mathrm{rad},i}$. They then return the primordial abundances $Y_{\mathrm{P}}$ and $\mathrm{D/H}$ for comparison with observations. Panel B depicts the BBNet architecture. The network projects the inputs with a linear–GELU layer, applies a multi-head self-attention module, and processes the result through $N$ residual MLP blocks. It finally uses a linear head to predict $(Y_{\mathrm{P}}, \mathrm{D/H})$.
  • Figure 3: Training and validation loss curves for the BBNet emulators. Figs. \ref{['fig:train_val_loss_parthenope']} and \ref{['fig:train_val_loss_alterbbn']} illustrate the training processes of the neural network models based on data sets obtained by our modified PArthENoPE and AlterBBN, respectively. The loss function is defined as the mean absolute error between the predicted and true values of $(Y_{\mathrm{P}},\,\mathrm{D/H})$. Both losses decrease rapidly and stabilize within 300 epochs, reaching values close to zero with no indications of overfitting.
  • Figure 4: Comparison between the primordial element abundances predicted by BBNet and the ground truth. Each panel compares BBNet predictions on the vertical axis with outputs of the benchmark solver on the horizontal axis. Fig. \ref{['fig:accuracy_pe']} shows results based on PArthENoPE using its complete network. Fig. \ref{['fig:accuracy_alterbbn']} shows results based on AlterBBN with its RK2_halfstep mode. Each subpanel presents $Y_\mathrm{P}$ on the left and $\mathrm{D/H}$ on the right, where blue scatter points denote individual test samples plotted against the corresponding solver values. The diagonal dashed line in each plot indicates ideal emulation with $\hat{y} = y$.
  • Figure 5: Single-sample inference times for BBN numerical solvers and the BBNet emulator. The wall times are measured for 100 samples for each method. Blue lines indicate the runtimes of the baseline solvers, namely the complete network PArthENoPE (Fig. \ref{['fig:time_parthenope']}) and AlterBBN with the RK2_halfstep mode (Fig. \ref{['fig:time_alterbbn']}). Orange and green lines show the corresponding inference times of the BBNet emulator executed on CPU and GPU, respectively. The emulator achieves a speed-up of $\sim 10^{3}-10^{4}$ times in both cases and attains sub-millisecond evaluations on GPU with minimal overhead on CPU.
  • ...and 3 more figures