Kangning Diao
Current Organizations / Institutes
The organizations/institutes from the scholar's latest article
Research Subjects
Kangning Diao has a total of 7 co-authors. Here are the top co-authors by number of shared publications:
- Yi Mao
Tsinghua University
4 shared publications - Richard D. P. Grumitt
Department of Astronomy, Tsinghua University, Beijing 100084, People’s Republic of China
2 shared publications - Biwei Dai
Center for Computational Astrophysics Flatiron Institute 162 Fifth Avenue 10010 New York NY USA
1 shared publication Uroš Seljak
Berkeley Center for Cosmological Physics, University of California, Berkeley, CA 94720, U.S.A.
1 shared publication- Xuelei Chen
National Astronomical Observatories
1 shared publication - Zack Li
68 Berkeley Center for Cosmological Physics, University of California, Berkeley, CA 94720, U.S.A.
1 shared publication
Latest Publications
- Open Access
- 13 October 2025
- Published by American Astronomical Society in The Astrophysical Journal
- Vol. 992 (2) , 173
Multifidelity Emulator for Large-scale 21 cm Lightcone Images: A Few-shot Transfer Learning Approach with Generative Adversarial Network
Emulators using machine learning techniques have emerged to efficiently generate mock data matching the large survey volume for upcoming experiments, as an alternative approach to large-scale numerical simulations. However, high-fidelity emulators have become computationally expensive as the simulation volume grows to hundreds of megaparsecs. Here, we present a multifidelity emulation of large-scale 21 cm lightcone images from the epoch of reionization, which is realized by applying the few-shot transfer learning to training generative adversarial networks (GAN) from small-scale to large-scale simulations. Specifically, a GAN emulator is first trained with a huge number of small-scale simulations, and then transfer-learned with only a limited number of large-scale simulations, to emulate large-scale 21 cm lightcone images. We test the precision of our transfer-learned GAN emulator in terms of representative statistics including global 21 cm brightness temperature history, 2D power spectrum, and scattering transform coefficients. We demonstrate that the lightcone images generated by the transfer-learned GAN emulator can reach the percentage level precision in most cases on small scales, and the error on large scales only increases mildly to the level of a few tens of percent. Nevertheless, our multifidelity emulation technique saves a significant portion of computational resources that are mostly consumed for generating training samples for GAN. On estimate, the computational resource by training GAN completely with large-scale simulations would be 1 to 2 orders of magnitude larger than using our multifidelity technique. This implies that our technique allows for emulating high-fidelity, traditionally computationally prohibitive, images in an economic manner.
- 13 October 2025
- Published by American Astronomical Society in The Astrophysical Journal
- Vol. 992 (2) , 173
Open AccessMultifidelity Emulator for Large-scale 21 cm Lightcone Images: A Few-shot Transfer Learning Approach with Generative Adversarial Network
Emulators using machine learning techniques have emerged to efficiently generate mock data matching the large survey volume for upcoming experiments, as an alternative approach to large-scale numerical simulations. However, high-fidelity emulators have become computationally expensive as the simulation volume grows to hundreds of megaparsecs. Here, we present a multifidelity emulation of large-scale 21 cm lightcone images from the epoch of reionization, which is realized by applying the few-shot transfer learning to training generative adversarial networks (GAN) from small-scale to large-scale simulations. Specifically, a GAN emulator is first trained with a huge number of small-scale simulations, and then transfer-learned with only a limited number of large-scale simulations, to emulate large-scale 21 cm lightcone images. We test the precision of our transfer-learned GAN emulator in terms of representative statistics including global 21 cm brightness temperature history, 2D power spectrum, and scattering transform coefficients. We demonstrate that the lightcone images generated by the transfer-learned GAN emulator can reach the percentage level precision in most cases on small scales, and the error on large scales only increases mildly to the level of a few tens of percent. Nevertheless, our multifidelity emulation technique saves a significant portion of computational resources that are mostly consumed for generating training samples for GAN. On estimate, the computational resource by training GAN completely with large-scale simulations would be 1 to 2 orders of magnitude larger than using our multifidelity technique. This implies that our technique allows for emulating high-fidelity, traditionally computationally prohibitive, images in an economic manner.
- 1 August 2025
- Published by IOP Publishing in Journal of Cosmology and Astroparticle Physics
- Vol. 2025 (08)
Detecting modeling bias with continuous time flow models on weak lensing maps
Simulation-based inference (SBI) provides a powerful framework for extracting rich information from nonlinear scales in current and upcoming cosmological surveys, and ensuring its robustness requires stringent validation of forward models. In this work, we recast forward model validation as an out-of-distribution (OoD) detection problem within the framework of machine learning (ML)-based SBI. We employ probability density as the metric for OoD detection, and compare various density estimation techniques, demonstrating that field-level probability density estimation via continuous time flow models (CTFM) significantly outperforms feature-level approaches that combine scattering transform (ST) or convolutional neural networks (CNN) with normalizing flows (NFs), as well as NF-based field-level estimators, as quantified by the area under the receiver operating characteristic curve (AUROC). Our analysis shows that CTFM not only excels in detecting OoD samples but also provides a robust metric for model selection. Additionally, we verified CTFM maintains consistent efficacy across different cosmologies while mitigating the inductive biases inherent in NF architectures. Although our proof-of-concept study employs simplified forward modeling and noise settings, our framework establishes a promising pathway for identifying unknown systematics in the cosmology datasets.
- 1 August 2025
- Published by IOP Publishing in Journal of Cosmology and Astroparticle Physics
- Vol. 2025 (08)
Detecting modeling bias with continuous time flow models on weak lensing maps
Simulation-based inference (SBI) provides a powerful framework for extracting rich information from nonlinear scales in current and upcoming cosmological surveys, and ensuring its robustness requires stringent validation of forward models. In this work, we recast forward model validation as an out-of-distribution (OoD) detection problem within the framework of machine learning (ML)-based SBI. We employ probability density as the metric for OoD detection, and compare various density estimation techniques, demonstrating that field-level probability density estimation via continuous time flow models (CTFM) significantly outperforms feature-level approaches that combine scattering transform (ST) or convolutional neural networks (CNN) with normalizing flows (NFs), as well as NF-based field-level estimators, as quantified by the area under the receiver operating characteristic curve (AUROC). Our analysis shows that CTFM not only excels in detecting OoD samples but also provides a robust metric for model selection. Additionally, we verified CTFM maintains consistent efficacy across different cosmologies while mitigating the inductive biases inherent in NF architectures. Although our proof-of-concept study employs simplified forward modeling and noise settings, our framework establishes a promising pathway for identifying unknown systematics in the cosmology datasets.
- Open Access
- 24 June 2025
- Published by American Astronomical Society in The Astrophysical Journal
- Vol. 987 (1) , 18
Modeling Foreground Spatial Variations in 21 cm Gaussian Process Component Separation
The 21 cm line from neutral hydrogen captures rich cosmological information. However, the 21 cm signals are highly contaminated by foreground emission, making accurate component separation vital for cosmological analyses. Gaussian processes (GPs) have been utilized for component separation in 21 cm data analyses, exploiting the distinct spectral behavior of the cosmological and foreground signals, which are modeled through the GP covariance kernel. Previous approaches have employed a global GP kernel along all lines of sight (LoS). In this work, we study Bayesian approaches that allow for spatial variations in foreground kernel parameters, testing them against simulated H i intensity mapping observations, which measures the total H i intensity in large voxels. We consider a no-pooling (NP) model, treating each LoS independently by fitting for separate covariance kernels, and a hierarchical Gaussian process (HGP) model, allowing for variation in kernel parameters between different LoS, regularized through a global hyperprior. We find that including spatial variations in the GP kernel parameters results in a significant improvement in cosmological signal recovery, achieving up to a 30% reduction in the standard deviation of the residual distribution. Allowing for spatial variations also improves the recovery of the H i power spectra and wavelet scattering transform coefficients. While the NP model achieves superior recovery as measured by the residual distribution, it is computationally demanding, faces convergence challenges, and is prone to overfitting. The HGP model strikes a balance between accuracy and robustness. Further improvements to the HGP model will require more physically-motivated modeling of foreground spatial variations. Our code can be found in the following repository: https://github.com/dkn16/H21F.
- 24 June 2025
- Published by American Astronomical Society in The Astrophysical Journal
- Vol. 987 (1) , 18
Open AccessModeling Foreground Spatial Variations in 21 cm Gaussian Process Component Separation
The 21 cm line from neutral hydrogen captures rich cosmological information. However, the 21 cm signals are highly contaminated by foreground emission, making accurate component separation vital for cosmological analyses. Gaussian processes (GPs) have been utilized for component separation in 21 cm data analyses, exploiting the distinct spectral behavior of the cosmological and foreground signals, which are modeled through the GP covariance kernel. Previous approaches have employed a global GP kernel along all lines of sight (LoS). In this work, we study Bayesian approaches that allow for spatial variations in foreground kernel parameters, testing them against simulated H i intensity mapping observations, which measures the total H i intensity in large voxels. We consider a no-pooling (NP) model, treating each LoS independently by fitting for separate covariance kernels, and a hierarchical Gaussian process (HGP) model, allowing for variation in kernel parameters between different LoS, regularized through a global hyperprior. We find that including spatial variations in the GP kernel parameters results in a significant improvement in cosmological signal recovery, achieving up to a 30% reduction in the standard deviation of the residual distribution. Allowing for spatial variations also improves the recovery of the H i power spectra and wavelet scattering transform coefficients. While the NP model achieves superior recovery as measured by the residual distribution, it is computationally demanding, faces convergence challenges, and is prone to overfitting. The HGP model strikes a balance between accuracy and robustness. Further improvements to the HGP model will require more physically-motivated modeling of foreground spatial variations. Our code can be found in the following repository: https://github.com/dkn16/H21F.
- Open Access
- 1 May 2025
- Published by American Astronomical Society in The Astrophysical Journal Supplement Series
- Vol. 278 (1) , 25
synax: A Differentiable and GPU-accelerated Synchrotron Simulation Package
We introduce synax (https://github.com/dkn16/Synax), a novel library for automatically differentiable simulation of Galactic synchrotron emission. Built on the JAX framework, synax leverages JAX’s capabilities, including batch acceleration, just-in-time compilation, and hardware-specific optimizations (CPU, GPU, TPU). Crucially, synax uses JAX’s automatic differentiation (AD) mechanism, enabling precise computation of analytical derivatives with respect to any model parameters. This facilitates powerful inference algorithms, such as Hamiltonian Monte Carlo (HMC) and gradient-based optimization, which enables inference over models that would otherwise be computationally prohibitive. In its initial release, synax supports synchrotron intensity and polarization calculations down to GHz frequencies, alongside several models of the Galactic magnetic field (GMF), cosmic-ray spectra, and thermal electron density fields. When running synax on the CPU we obtain identical performance to hammurabi, a state-of-the-art synchrotron simulation package, while on the GPU synax brings a 20-fold enhancement in efficiency. We further demonstrate the potential of AD in enabling full posterior inference using gradient-based inference algorithms. Using synax with HMC to perform inference over a four-parameter test model, we attain a twofold improvement compared to standard random walk Metropolis–Hastings (RWMH). When applied to a more complex 16-parameter model, HMC is still able to obtain accurate posterior expectations, while RWMH fails to converge. We also showcase the application of synax to optimizing the GMF based on the Haslam 408 MHz map, achieving residuals with a standard deviation below 1 K.
- 1 May 2025
- Published by American Astronomical Society in The Astrophysical Journal Supplement Series
- Vol. 278 (1) , 25
Open Accesssynax: A Differentiable and GPU-accelerated Synchrotron Simulation Package
We introduce synax (https://github.com/dkn16/Synax), a novel library for automatically differentiable simulation of Galactic synchrotron emission. Built on the JAX framework, synax leverages JAX’s capabilities, including batch acceleration, just-in-time compilation, and hardware-specific optimizations (CPU, GPU, TPU). Crucially, synax uses JAX’s automatic differentiation (AD) mechanism, enabling precise computation of analytical derivatives with respect to any model parameters. This facilitates powerful inference algorithms, such as Hamiltonian Monte Carlo (HMC) and gradient-based optimization, which enables inference over models that would otherwise be computationally prohibitive. In its initial release, synax supports synchrotron intensity and polarization calculations down to GHz frequencies, alongside several models of the Galactic magnetic field (GMF), cosmic-ray spectra, and thermal electron density fields. When running synax on the CPU we obtain identical performance to hammurabi, a state-of-the-art synchrotron simulation package, while on the GPU synax brings a 20-fold enhancement in efficiency. We further demonstrate the potential of AD in enabling full posterior inference using gradient-based inference algorithms. Using synax with HMC to perform inference over a four-parameter test model, we attain a twofold improvement compared to standard random walk Metropolis–Hastings (RWMH). When applied to a more complex 16-parameter model, HMC is still able to obtain accurate posterior expectations, while RWMH fails to converge. We also showcase the application of synax to optimizing the GMF based on the Haslam 408 MHz map, achieving residuals with a standard deviation below 1 K.
- Open Access
- 1 October 2024
- Published by American Astronomical Society in The Astrophysical Journal
- Vol. 974 (1) , 141
Reionization Parameter Inference from 3D Minkowski Functionals of the 21 cm Signals
The Minkowski functionals (MFs), a set of topological summary statistics, have emerged as a powerful tool for extracting non-Gaussian information. We investigate the prospect of constraining the reionization parameters using the MFs of the 21 cm brightness temperature field from the epoch of reionization (EOR). Realistic effects, including thermal noise, synthesized beam, and foreground avoidance, are applied to the mock observations from radio interferometric array experiments such as the Hydrogen Epoch of Reionization Array (HERA) and the Square Kilometre Array (SKA). We demonstrate that the MFs of the 21 cm signal measured with SKA-Low can be used to distinguish different reionization models, whereas the MF measurement with a HERA-like array cannot be made accurately enough. We further forecast the accuracies with which the MF measurements can place constraints on reionization parameters, using the standard Markov Chain Monte Carlo analysis for parameter inference based on forward modeling. We find that for SKA-Low observation, MFs provide unbiased estimations of the reionization parameters with accuracies comparable to the power spectrum (PS) analysis. Furthermore, joint constraints using both MFs and PS can improve the constraint accuracies by up to 30% compared to those with the PS alone. Nevertheless, the constraint accuracies can be degraded if the EOR window is shrunk with strong foreground avoidance. Our analysis demonstrates the promise of MFs as a set of summary statistics that extract complementary information from the 21 cm EOR field to the two-point statistics, which suggests a strong motivation for incorporating the MFs into the data analysis of future 21 cm observations.
- 1 October 2024
- Published by American Astronomical Society in The Astrophysical Journal
- Vol. 974 (1) , 141
Open AccessReionization Parameter Inference from 3D Minkowski Functionals of the 21 cm Signals
The Minkowski functionals (MFs), a set of topological summary statistics, have emerged as a powerful tool for extracting non-Gaussian information. We investigate the prospect of constraining the reionization parameters using the MFs of the 21 cm brightness temperature field from the epoch of reionization (EOR). Realistic effects, including thermal noise, synthesized beam, and foreground avoidance, are applied to the mock observations from radio interferometric array experiments such as the Hydrogen Epoch of Reionization Array (HERA) and the Square Kilometre Array (SKA). We demonstrate that the MFs of the 21 cm signal measured with SKA-Low can be used to distinguish different reionization models, whereas the MF measurement with a HERA-like array cannot be made accurately enough. We further forecast the accuracies with which the MF measurements can place constraints on reionization parameters, using the standard Markov Chain Monte Carlo analysis for parameter inference based on forward modeling. We find that for SKA-Low observation, MFs provide unbiased estimations of the reionization parameters with accuracies comparable to the power spectrum (PS) analysis. Furthermore, joint constraints using both MFs and PS can improve the constraint accuracies by up to 30% compared to those with the PS alone. Nevertheless, the constraint accuracies can be degraded if the EOR window is shrunk with strong foreground avoidance. Our analysis demonstrates the promise of MFs as a set of summary statistics that extract complementary information from the 21 cm EOR field to the two-point statistics, which suggests a strong motivation for incorporating the MFs into the data analysis of future 21 cm observations.