Skip to main content

Thank you for visiting You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

An improved cosmological parameter inference scheme motivated by deep learning


Dark matter cannot be observed directly, but its weak gravitational lensing slightly distorts the apparent shapes of background galaxies, making weak lensing one of the most promising probes of cosmology. Several observational studies have measured the effect, and there are currently running1,2 and planned efforts3,4 to provide even larger and higher-resolution weak lensing maps. Owing to nonlinearities on small scales, the traditional analysis with two-point statistics does not fully capture all of the underlying information5. Multiple inference methods have been proposed to extract more details based on higher-order statistics6,7, peak statistics8,9,10,11,12,13, Minkowski functionals14,15,16 and recently convolutional neural networks17,18. Here we present an improved convolutional neural network that gives significantly better estimates of the Ωm and σ8 cosmological parameters from simulated weak lensing convergence maps than state-of-art methods and that is also free of systematic bias. We show that the network exploits information in the gradients around peaks, and with this insight we have constructed an easy-to-understand and robust peak-counting algorithm based on the steepness of peaks, instead of their heights. The proposed scheme is even more accurate than the neural network on high-resolution noiseless maps. With shape noise and lower resolution, its relative advantage deteriorates, but it remains more accurate than peak counting.

This is a preview of subscription content, access via your institution

Relevant articles

Open Access articles citing this article.

Access options

Buy article

Get time limited or full article access on ReadCube.


All prices are NET prices.

Fig. 1: Neural network predictions versus true cosmological parameters used in the simulations.
Fig. 2: Depiction of gradient magnitude of the convergence maps, the kernels learned by the CNN, a scatter-plot of predictions with different peak-counting schemes and the effect of angular resolution.
Fig. 3: Peak steepness distributions show larger separation between different cosmologies than peak height values, which results in more accurate predictions.

Data availability

The data that support the plots within this paper and other findings of this study are available from the corresponding author upon reasonable request.


  1. Hildebrandt, H. et al. KiDS-450: cosmological parameter constraints from tomographic weak gravitational lensing. Mon. Not. R. Astron. Soc. 465, 1454–1498 (2016).

    ADS  Article  Google Scholar 

  2. Abbott, T. et al. Dark Energy Survey year 1 results: cosmological constraints from galaxy clustering and weak lensing. Phys. Rev. D 98, 043526 (2018).

    ADS  Article  Google Scholar 

  3. Ivezic, Z. et al. LSST: from science drivers to reference design and anticipated data products. Preprint at (2008).

  4. Laureijs, R. et al. Euclid definition study report. Preprint at (2011).

  5. Kilbinger, M. Cosmology with cosmic shear observations: a review. Rep. Prop. Phys. 78, 086901 (2015).

    ADS  MathSciNet  Article  Google Scholar 

  6. Takada, M. & Jain, B. Three-point correlations in weak lensing surveys: model predictions and applications. Mon. Not. R. Astron. Soc. 344, 857–886 (2003).

    ADS  Article  Google Scholar 

  7. Fu, L. et al. CFHTLenS: cosmological constraints from a combination of cosmic shear two-point and three-point correlations. Mon. Not. R. Astron. Soc. 441, 2725–2743 (2014).

    ADS  Article  Google Scholar 

  8. Dietrich, J. & Hartlap, J. Cosmology with the shear-peak statistics. Mon. Not. R. Astron. Soc. 402, 1049–1058 (2010).

    ADS  Article  Google Scholar 

  9. Kratochvil, J. M., Haiman, Z. & May, M. Probing cosmology with weak lensing peak counts. Phys. Rev. D 81, 043519 (2010).

    ADS  Article  Google Scholar 

  10. Marian, L., Smith, R. E., Hilbert, S. & Schneider, P. The cosmological information of shear peaks: beyond the abundance. Mon. Not. R. Astron. Soc. 432, 1338–1350 (2013).

    ADS  Article  Google Scholar 

  11. Shan, H. et al. Weak lensing mass map and peak statistics in Canada–France–Hawaii Telescope Stripe 82 survey. Mon. Not. R. Astron. Soc. 442, 2534–2542 (2014).

    ADS  Article  Google Scholar 

  12. Liu, J. et al. Cosmology constraints from the weak lensing peak counts and the power spectrum in CFHTLenS data. Phys. Rev. D 91, 063507 (2015).

    ADS  Article  Google Scholar 

  13. Kacprzak, T. et al. Cosmology constraints from shear peak statistics in Dark Energy Survey Science Verification data. Mon. Not. R. Astron. Soc. 463, 3653–3673 (2016).

    ADS  Article  Google Scholar 

  14. Petri, A., Haiman, Z., Hui, L., May, M. & Kratochvil, J. M. Cosmology with Minkowski functionals and moments of the weak lensing convergence field. Phys. Rev. D 88, 123002 (2013).

    ADS  Article  Google Scholar 

  15. Kratochvil, J. M. et al. Probing cosmology with weak lensing Minkowski functionals. Phys. Rev. D 85, 103513 (2012).

    ADS  Article  Google Scholar 

  16. Shirasaki, M. & Yoshida, N. Statistical and systematic errors in the measurement of weak-lensing Minkowski functionals: application to the Canada-France-Hawaii Lensing Survey. Astrophys. J. 786, 43 (2014).

    ADS  Article  Google Scholar 

  17. Schmelzle, J. et al. Cosmological model discrimination with Deep Learning. Preprint at (2017).

  18. Gupta, A., Matilla, J. M. Z., Hsu, D. & Haiman, Z. Non-Gaussian information from weak lensing data via deep learning. Phys. Rev. D 97, 103515 (2018).

    ADS  Article  Google Scholar 

  19. Matilla, J. M. Z., Haiman, Z., Hsu, D., Gupta, A. & Petri, A. Do dark matter halos explain lensing peaks? Phys. Rev. D 94, 083506 (2016).

    ADS  Article  Google Scholar 

  20. Krizhevsky, A., Sutskever, I. & Hinton, G. E. ImageNet classification with deep convolutional neural networks. In Adv. Neur. Information Processing Syst. 1097–1105 (2012).

  21. Simonyan, K. & Zisserman, A. Very deep convolutional networks for large-scale image recognition. Preprint at (2014).

  22. Goodfellow, I. J., Shlens, J. & Szegedy, C. Explaining and harnessing adversarial examples. Preprint at (2014).

  23. Zeiler, M. D. & Fergus, R. Visualizing and understanding convolutional networks. In European Conference on Computer Vision (ECCV) 818–833 (Springer, Cham, 2014).

  24. Lindeberg, T. Scale-space for discrete signals. IEEE Trans. Pattern. Anal. 12, 234–254 (1990).

    Article  Google Scholar 

  25. Roberts, L. G. Machine Perception of Three-Dimensional Solids. PhD thesis, Massachusetts Institute of Technology (1963).

  26. Chang, C. et al. The effective number density of galaxies for weak lensing measurements in the LSST project. Mon. Not. R. Astron. Soc. 434, 2121–2135 (2013).

    ADS  Article  Google Scholar 

  27. MacCrann, N., Zuntz, J., Bridle, S., Jain, B. & Becker, M. R. Cosmic discordance: are Planck CMB and CFHTLenS weak lensing measurements out of tune? Mon. Not. R. Astron. Soc. 451, 2877–2888 (2015).

    ADS  Article  Google Scholar 

  28. Petri, A., Haiman, Z. & May, M. Sample variance in weak lensing: how many simulations are required? Phys. Rev. D 93, 063524 (2016).

    ADS  MathSciNet  Article  Google Scholar 

Download references


This work was partially supported by National Research, Development and Innovation Office of Hungary via grant OTKA NN 114560 and the National Quantum Technologies Program. The authors thank Z. Haiman and J. M. Z Matilla for making available the simulated weak lensing maps used in this study.

Author information

Authors and Affiliations



I.C., D.R. and B.A.P. contributed to the conception and design of the study; B.A.P. performed the training and evaluation of neural networks; D.R. conducted the experiments with peak steepness. All authors reviewed the manuscript.

Corresponding author

Correspondence to István Csabai.

Ethics declarations

Competing interests

The authors declare no competing interests.

Additional information

Publisher’s note: Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Ribli, D., Pataki, B.Á. & Csabai, I. An improved cosmological parameter inference scheme motivated by deep learning . Nat Astron 3, 93–98 (2019).

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI:

Further reading


Quick links

Nature Briefing

Sign up for the Nature Briefing newsletter — what matters in science, free to your inbox daily.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing