Fast and accurate bandpass integration of complex SEDs with neural networks

arXiv:2607.12953 · astro-ph.IM · Submitted 2026-07-14 · Read on arXiv

Listen

Radio episode about this paper

Transcript

Introduction to the show: ident: Astrophysics. The day in astrophysics: observations, models and what the data forces.

Vera: We're looking at the paper: "Fast and accurate bandpass integration of complex SEDs with neural networks".

Jocelyn: Here's the gist of the paper. The paper presents a novel ML-based approach for fast and accurate bandpass integration of spectral energy distributions (SEDs) by using neural networks to predict integral values directly from SED parameters, which is crucial because this method offers extremely fast run times and high accuracy compared to traditional methods when dealing with complex SED models.

Vera: Core Methodology The proposed approach involves training a feed-forward neural network (FFNN) for each bandpass-SED combination so that the network molds itself directly on a specific bandpass shape and parametric SED form, bypassing the integral computation entirely.

Jocelyn: The method is based on training an FFNN where the parameters Θ constitute the input of the network and the corresponding integral value I(Θ) is the target.

Vera: The core idea is to reach fast inference times while preserving a relative error on the integral estimate as low as possible.

Paper summary: Vera: To build on that, the paper dives into how they designed this neural network, focusing on the architecture and what kind of functions they’re using >

Jocelyn: They chose a feed-forward neural network where every input node corresponds to one of those free parameters in the SED description and a single output node gives you the bandpass integral value >

Subrahmanyan: The paper mentions that for the activation functions, they defaulted to SiLU because its smoothness and differentiability are really good for approximating those smooth functions we're dealing with in astronomy >

Vera: They used an adaptive moment estimation optimizer like Adam with a Huber loss function during training to make sure the network learned the target function hyper-surface robustly >

Jocelyn: When they did the more complex nine-parameter case, they used a quasi-Monte Carlo method called a Sobol sampler to sample that nine dimensional space efficiently instead of just running random numbers >

Subrahmanyan: That sampling technique was important because the landscape for that nine parameter space is quite complex, and it helped them get a more robust single valued estimate of the general prediction accuracy by looking at the ninety-nine point nine percent percentile rather than just the maximum relative residual >

Vera: So, they’re showing that you don't just look at one number when dealing with high dimensions; you need to look at how accurate it is across a whole range of possibilities >

Jocelyn: It’s interesting how they framed the problem as training the network to mold itself directly onto a specific bandpass shape and parametric SED form, totally skipping the integral computation itself >

Conclusion: Subrahmanyan: Looking at what this paper does, it shows that for complex models like Astrodust+PAH, which have many parameters, the traditional methods for handling those bandpass integrals just can't keep up with the computational demands >

Vera: It seems like the main implication here is that we can start using neural networks to get fast and accurate predictions for these integrations, which opens up possibilities for analyzing more intricate astrophysical data sets >

Jocelyn: The authors made this method available in a Python package called pyfine, which means anyone working with SEDs can now use this tool instead of having to write their own complex integration routines from scratch >

Subrahmanyan: It’s about making the calculation accessible, but we have to remember what they admit: the method is most effective when you're dealing with smooth target functions because that's where neural networks really shine >

Vera: And as a limitation, the paper points out that while it’s fast and accurate for these specific test cases, it still relies on training data and doesn't work universally without that specific setup >

Jocelyn: So, the title "Fast and accurate bandpass integration of complex SEDs with neural networks" really describes a technique for speeding up what is currently a very time-consuming step in our analysis pipeline >

Institute of Theoretical Astrophysics, University of Oslo

astro-ph.IM

Submitted: 2026-07-14

Updated: 2026-11-09

Comments: Published in the Open Journal of Astrophysics

Code: https://github.com/LeeoBianchi/pyfine

License: http://creativecommons.org/licenses/by/4.0/

Importance score: 83/100

The gist: The paper presents a novel ML-based approach for fast and accurate bandpass integration of spectral energy distributions (SEDs) by using neural networks to predict integral values directly from SED…

Key concepts

Bandpass Integration
This is the process of calculating a specific integral value derived from a spectral energy distribution (SED) over a defined frequency range (bandpass). This calculation is essential for accurately modeling and analyzing astronomical data, such as those from cosmic microwave background observations.
Feed-Forward Neural Network (FFNN)
A type of artificial neural network where information flows in only one direction—from the input layer through hidden layers to the output layer. In this method, the network learns a direct mapping between SED parameters and their corresponding integral values, allowing for rapid prediction.
pyfine Package
This is a new Python software package developed to make the neural network approach accessible. It wraps the core code into an easy-to-use tool, allowing scientists to apply this fast integration method simply by initializing a network and feeding it SED parameter data.

Summary

The paper presents a novel ML-based approach for fast and accurate bandpass integration of spectral energy distributions (SEDs) by using neural networks to predict integral values directly from SED parameters, which is crucial because this method offers extremely fast run times and high accuracy compared to traditional methods when dealing with complex SED models. p. 0

Where the paper says it

Box 1029 Blindern, N-0315 Oslo, Norway Version October 7, 2026 Abstract The paper presents a novel ML-based approach for fast and accurate bandpass integration of spectral energy distributions (SEDs). The non-locality of the integral operator involved guarantees the smoothness of the target function to be approximated, making it an excellent use-case for neural networks.

Core Methodology

The proposed approach involves training a feed-forward neural network (FFNN) for each bandpass-SED combination so that the network molds itself directly on a specific bandpass shape and parametric SED form, bypassing the integral computation entirely. The method is based on training an FFNN where the parameters Θ constitute the input of the network and the corresponding integral value I(Θ) is the target. p. 1

Where the paper says it

, θn) which corresponds to the nodes of the input layer of the network. Neural Network approach The approach proposed in this work is based on training a feed-forward neural network (FFNN, for short) for each bandpass-SED combination, where the parameters Θ constitute the input of the network and the corresponding integral value I(Θ) is the target.

The core idea is to reach fast inference times while preserving a relative error on the integral estimate as low as possible. p. 1
Where the paper says it

The idea is to mold the network directly on a specific bandpass shape and parametric SED form through the training, bypassing the integral computation entirely. Reaching fast inference times, while preserving a relative error on the integral estimate al low as possible1 , is in fact the main goal of this work.

Network Design and Training

The neural network is typically designed with as many input nodes as free parameters and a single output node yielding the result of the integral evaluation. The number and shape of hidden layers strongly depends on the number of input parameters and the complexity of the integral function, with common configurations being pyramidal or brick shapes. p. 1

Where the paper says it

The number and shape of hidden layers strongly depends on the number of input parameters and the complexity of the integral function. However, the two most common configurations are typically a pyramidal shape, where the first hidden layer is several times wider than the input layer, and the subsequent ones are progressively narrower, generally by a factor of 2, and “brick” shape, where identical hidden layers follow each other.

For activation functions, the Sigmoid Linear Unit (SiLU) is chosen as a default because its smoothness and differentiability are effective for approximating smooth functions like those targeted here. p. 2
Where the paper says it

Its definition in fact simply reads ReLU(x) = max(0, x) = x if x > 0 0 otherwise (2) However, as shown in figure 2, the sharp knee centered on zero makes it unideal to approximate smooth functions as the ones targeted here. The smoothness of the target function has in fact been the main reason for choosing the Sigmoid Linear Unit (Ramachandran et al.

Training employs an adaptive moment estimation optimizer like Adam with a Huber loss function to achieve robust training performance. p. 3
Where the paper says it

A preliminary phase of research and test, wherein many models and training parameters have been tried, helped to determine a particularly effective and flexible training setup that has been kept more or less untouched through the work here presented. The main features are: • Adaptive Moment Estimation, or Adam (Kingma and Ba 2017), as optimizer algorithm.

Performance Benchmarking and Accuracy

The method demonstrated its capability by predicting values of the bandpass integral with maximum relative residuals as low as 0.002% and 0. p. 0

Where the paper says it

The results show that the method is capable of predicting values of the bandpass integral with maximum relative residuals as low as 0. 002% and 0.

p. 0
Where the paper says it

The results show that the method is capable of predicting values of the bandpass integral with maximum relative residuals as low as 0. 002% and 0.

p. 0
Where the paper says it

The results show that the method is capable of predicting values of the bandpass integral with maximum relative residuals as low as 0. 002% and 0.

08% respectively, within the sampled region of the parameter space. p. 0
Where the paper says it

002% and 0. 08% respectively, within the sampled region of the parameter space, fast run times, and very little memory overhead.

p. 0
Where the paper says it

002% and 0. 08% respectively, within the sampled region of the parameter space, fast run times, and very little memory overhead.

The results show that the method is capable of predicting values of the bandpass integral with maximum relative residuals as low as 0. p. 0
Where the paper says it

The method is demonstrated with two different bandpass integration test cases with 3 and 9 free parameters, respectively, where both accuracy and computational performance are analyzed. The results show that the method is capable of predicting values of the bandpass integral with maximum relative residuals as low as 0.

002% and 0.08% respectively, within the sampled region of the parameter space. Furthermore, in a test case involving a simple modified black body SED, the neural network’s measured run times resulted faster by two orders of magnitudes than an optimized multithreaded version of the “brute force” exact calculation of the integral. p. 0
Where the paper says it

The usage of pyfine is especially effective when the computation of an SED functional form, given a set of values for its free parameters, is expensive. However, already in the first of the two test cases, where a simple modified black body SED was employed, the neural network’s measured run times resulted faster by two orders of magnitudes than an optimized multithreaded version of the “brute force” exact calculation of the integral.

Application to Complex Models

The method was successfully applied to two different bandpass integration test cases: a simpler modified-black-body SED and a more complex one based on Astrodust+PAH. In the 9-parameter case using Astrodust+PAH, the training utilized a quasi-Monte Carlo method, specifically a Sobol sampler, to efficiently sample the 9-dimensional hypercube without exponentially increasing the total number of samples. p. 7

Where the paper says it

This time, to obtain an efficient sampling of the 9-dimensional hypercube without exponentially increasing the total number of samples, a quasi-Monte Carlo method, namely a Sobol sampler (Sobol’ 1967), is employed. Instead of using purely random numbers, which in high dimensions tend to cluster in clumps and leave large empty spaces, a Sobol sequence places points in a deterministic pattern designed to evenly cover the target space (Atanassov and Ivanovska 2022).

The high complexity of the residual landscape in a 9-dimension space resulted in the 99. p. 8
Where the paper says it

1%, taken as a general reference. In fact, given the high complexity of the residual landscape in a 9-dimension space, the 99.

9th percentile giving a more robust single-valued estimate of the general prediction accuracy than the maximum relative residual. p. 8
Where the paper says it

In fact, given the high complexity of the residual landscape in a 9-dimension space, the 99. 9 th percentile gives a more robust single-valued estimate of the general prediction accuracy of the networks than the maximum relative residual, which can be dragged away by a few isolated outliers.

Implementation and Accessibility

The computational tools developed for this work have been wrapped into a new Python package named pyfine (FINE: Fast Function Interpolation via NEural NEtworks) to make the method easily applicable to any bandpass correction scenario. The package exposes a core class FFNN which wraps a general and flexible feed-forward neural network based on PyTorch. p. 3

Where the paper says it

The main goal is to make the method presented easily applicable to any bandpass correction scenario, and possibly any smooth function approximation in general, reducing as much as possible the setup overhead for the user. Currently, pyfine is mainly exposing a core class, FFNN, which wraps a general and flexible feed-forward neural network based on PyTorch (Paszke et al.

Usage involves initializing the network with a shape array describing the number of nodes of each layer and fitting it to a training dataset generated by the DatasetGenerator class. p. 3
Where the paper says it

A new neural network can be initialized with a single line of code as from pyfine . nn import FFNN myNN = FFNN ([3 ,16 ,8 ,4 ,1]) here the array [3,16,8,4,1] describes the shape of the network, where each element gives the number of nodes of the corresponding layer.

The package can be downloaded and installed as described at https://github. p. 3
Where the paper says it

5 , 1] # number of samples N = 100000 gen = DatasetGenerator ( foo ) X , y = gen . generate_uniform (N , lo , hi ) dataset = VectorScalarDataset (X , y) 2 The package can be downloaded and installed as described at https://github.

com/LeeoBianchi/pyfine. p. 3
Where the paper says it

generate_uniform (N , lo , hi ) dataset = VectorScalarDataset (X , y) 2 The package can be downloaded and installed as described at https://github. com/LeeoBianchi/pyfine.

Conclusion

The method has been applied to both a simpler 3-parameter test case, with a modified black body as SED and a bandpass from Planck HFI 353 GHz, and a more complex 9-parameter one, based on the expensive Astrodust+PAH emission model. In both cases at least one or more of the models tested provided a satisfactory result in terms of accuracy, with maximum relative residual as low as 0. p. 9

Where the paper says it

The SiLU activation function resulted being the optimal choice for the purpose of the method presented. In both test cases at least one or more of the models tested provided a satisfactory result in terms of accuracy, with maximum relative residual as low as 0.

002% and 0.08%, respectively. p. 0
Where the paper says it

This new Python package makes the relevant code available and easy to use by everyone within the scientific community. The method is demonstrated with two different bandpass integration test cases with 3 and 9 free parameters, respectively, where both accuracy and computational performance are analyzed.

The high accuracy obtained came together with a significant save in computation run time, with speed ups of more than two orders of magnitude compared to an optimized Numbacompiled version of the exact integral summation routine, as shown by the first test case. p. 9
Where the paper says it

08%, respectively. The high accuracy obtained came together with a significant save in computation run time, with speed ups of more than two orders of magnitude compared to an optimized Numbacompiled version of the exact integral summation routine, as shown by the first test case.

The method developed and presented in this paper has been published in the form of a new Python package, pyfine, making it easily accessible and usable. p. 9
Where the paper says it

The high accuracy obtained came together with a significant save in computation run time, with speed ups of more than two orders of magnitude compared to an optimized Numbacompiled version of the exact integral summation routine, as shown by the first test case. The method developed and presented in this paper has been published in the form of a new Python package, pyfine, making it easily accessible and usable.

Acknowledgments

The current work has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement numbers 819478 (ERC; Cosmoglobe), 101165647 (ERC; Origins), 101141621 (ERC; Commander) and from the Research Council of Norway with the grant NFR 357701 (COMAP). This article reflects the views of the authors only. p. 9

Where the paper says it

ACKNOWLEDGMENTS The current work has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement numbers 819478 (ERC; Cosmoglobe), 101165647 (ERC; Origins), 101141621 (ERC; Commander) and from the Research Council of Norway with the grant NFR 357701 (COMAP). This article reflects the views of the authors only.

The work presented made use of data stored in the Legacy Archive for Microwave Background Data Analysis (LAMBDA), part of the High Energy Astrophysics Science Archive Center (HEASARC). p. 9
Where the paper says it

The funding body is not responsible for any use that may be made of the information contained therein. The work presented made use of data stored in the Legacy Archive for Microwave Background Data Analysis (LAMBDA), part of the High Energy Astrophysics Science Archive Center (HEASARC).

Most of the work presented in this paper has been carried out in the context of the PhD course FYS9429 “Advanced machine learning and data analysis for the physical sciences”, held at the University of Oslo by professor Morten Hjorth-Jensen, whose expertise and guidance are acknowledged by the author. p. 9
Where the paper says it

HEASARC/LAMBDA is a service of the Astrophysics Science Division at the NASA Goddard Space Flight Center. Most of the work presented in this paper has been carried out in the context of the PhD course FYS9429 “Advanced machine learning and data analysis for the physical sciences”, held at the University of Oslo by professor Morten Hjorth-Jensen, whose expertise and guidance are acknowledged by the author.

Important help, support and exchange of ideas came from Hans Kristian K. p. 9
Where the paper says it

Most of the work presented in this paper has been carried out in the context of the PhD course FYS9429 “Advanced machine learning and data analysis for the physical sciences”, held at the University of Oslo by professor Morten Hjorth-Jensen, whose expertise and guidance are acknowledged by the author. Important help, support and exchange of ideas came from Hans Kristian K.

Eriksen, Mathew Galloway, Jonas G. p. 9
Where the paper says it

Important help, support and exchange of ideas came from Hans Kristian K. Eriksen, Mathew Galloway, Jonas G.

S. Lunde, Sigurd K. p. 9
Where the paper says it

Eriksen, Mathew Galloway, Jonas G. Lunde, Sigurd K.

Næss, Duncan J. p. 9
Where the paper says it

Lunde, Sigurd K. Næss, Duncan J.

Watts, and the Cosmoglobe collaboration in general. p. 9
Where the paper says it

Næss, Duncan J. Watts, and the Cosmoglobe collaboration in general, throughout the development of the work here presented.

Finally, the author acknowledges the support received by Brandon S. p. 9
Where the paper says it

Watts, and the Cosmoglobe collaboration in general, throughout the development of the work here presented. Finally, the author acknowledges the support received by Brandon S.

Hensley with the theoretical understanding and usage of Astrodust+PAH model. p. 9
Where the paper says it

Finally, the author acknowledges the support received by Brandon S. Hensley with the theoretical understanding and usage of Astrodust+PAH model.

Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.

Improvements for AI systems

  1. Faster computation for bandpass integration can be achieved by employing a neural network to efficiently predict integral values directly from SED parameters, bypassing slow brute-force summation methods.

  2. The improved system can handle complex SED models, such as Astrodust+PAH, which feature more than 10 parameters, making them computationally expensive for traditional interpolation methods.

  3. The system can achieve high accuracy in bandpass integral correction with maximum relative residuals as low as 0.002% for a simple test case and 0.08% for the complex Astrodust+PAH case.

  4. The system can be implemented via the pyfine Python package, making the method easily accessible and usable for various bandpass correction scenarios across different astrophysical data analysis pipelines like Commander.

  5. The system can optimize inference time significantly compared to optimized multithreaded versions of exact calculation, achieving run times faster by two orders of magnitude for a simple modified black body SED case.

  6. The system can be configured using a feed-forward neural network with an input layer matching the number of free parameters and a single output node yielding the integral evaluation result.

  7. The system benefits from using the SiLU activation function, which has been proven to provide significantly better accuracy performance than ReLU for approximating smooth functions in this application.

  8. The system can utilize quasi-Monte Carlo methods like Sobol samplers to efficiently sample high-dimensional parameter spaces for complex SEDs, producing a deterministic pattern to evenly cover the target space.

Abstract

The paper presents a novel ML-based approach for fast and accurate bandpass integration of spectral energy distributions (SEDs). The non-locality of the integral operator involved guarantees the smoothness of the target function to be approximated, making it an excellent use-case for neural networks. The computational method developed for this work has been wrapped within pyfine (FINE: Fast Function Interpolation via NEural NEtworks). This new Python package makes the relevant code available and easy to use by everyone within the scientific community. The method is demonstrated with two different bandpass integration test cases with 3 and 9 free parameters, respectively, where both accuracy and computational performance are analyzed. The results show that the method is capable of predicting values of the bandpass integral with maximum relative residuals as low as 0.002% and 0.08% respectively, within the sampled region of the parameter space, fast run times, and very little memory overhead. The usage of pyfine is especially effective when the computation of an SED functional form, given a set of values for its free parameters, is expensive. However, already in the first of the two test cases, where a simple modified black body SED was employed, the neural network's measured run times resulted faster by two orders of magnitudes than an optimized multithreaded version of the ``brute force'' exact calculation of the integral.

Sources

Related papers