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.

The role of the cosmic web in the scatter of the galaxy stellar mass–gas metallicity relation


The large-scale structure of the Universe can be understood in terms of features such as filaments, nodes and walls, which we collectively term the cosmic web. Galaxies evolve within the cosmic web, naturally raising the question of its impact on that process. There are two main mechanisms by which the cosmic web can influence galaxies: one is by modulating the growth of haloes, and the other is by regulating the gas ecosystem around galaxies. Disentangling the two is difficult, but key to deriving a holistic picture of galaxy formation and observational constraints on the growth of haloes. Here we report a detection of the effect of the cosmic web on the galaxy stellar mass–gas-phase metallicity relation of low-redshift star-forming galaxies using data from the Sloan Digital Sky Survey. The proximity of a galaxy to a node, independently of stellar mass and overdensity, influences its gas-phase metallicity, with galaxies closer to nodes displaying higher chemical enrichment than those farther away. We find a similar, but notably weaker, effect with respect to filaments. We find qualitative agreement in the cosmological hydrodynamical simulation IllustrisTNG (TNG300). Using IllustrisTNG, our results can be explained by both halo assembly bias and gas supply combining in nodes in a way that markedly modulates the metallicity of the gas, contributing to the scatter of this fundamental relation in galaxy evolution.

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

Access options

Buy article

Get time limited or full article access on ReadCube.


All prices are NET prices.

Fig. 1: Mass–metallicity relations in SDSS DR7 split by the distance to filaments and nodes.
Fig. 2: Gas-phase metallicity residuals as function of the distance to filaments and nodes in SDSS DR7.
Fig. 3: Mass–metallicity relations in IllustrisTNG split by the distance to filaments and nodes.
Fig. 4: Gas-phase metallicity residuals as function of the distance to filaments and nodes in IllustrisTNG.
Fig. 5: Gas fraction as function of the distance to filaments and nodes in IllustrisTNG.
Fig. 6: Star-formation and stellar metallicity histories in IllustrisTNG.

Data availability

Data for SDSS DR7 and IllustrisTNG are publicly available at and DisPerSE catalogues are available from the corresponding author upon reasonable request.

Code availability

DisPerSE is publicly available at: All other code used in this project is available from the corresponding author upon reasonable request.


  1. Wechsler, R. H. & Tinker, J. L. The connection between galaxies and their dark matter halos. Annu. Rev. Astron. Astrophys. 56, 435–487 (2018).

    Article  ADS  Google Scholar 

  2. Blanton, M. R. & Moustakas, J. Physical properties and environments of nearby galaxies. Annu. Rev. Astron. Astrophys. 47, 159–210 (2009).

    Article  ADS  Google Scholar 

  3. Bond, J. R., Kofman, L. & Pogosyan, D. How filaments of galaxies are woven into the cosmic web. Nature 380, 603–606 (1996).

    Article  ADS  Google Scholar 

  4. Dalal, N., White, M., Bond, J. R. & Shirokov, A. Halo assembly bias in hierarchical structure formation. Astrophys. J. 687, 12–21 (2008).

    Article  ADS  Google Scholar 

  5. Borzyszkowski, M., Porciani, C., Romano-Díaz, E. & Garaldi, E. ZOMG - I. How the cosmic web inhibits halo growth and generates assembly bias. Mon. Not. R. Astron. Soc. 469, 594–611 (2017).

    Article  ADS  Google Scholar 

  6. Musso, M. et al. How does the cosmic web impact assembly bias? Mon. Not. R. Astron. Soc. 476, 4877–4906 (2018).

    Article  ADS  Google Scholar 

  7. Paranjape, A., Hahn, O. & Sheth, R. K. Halo assembly bias and the tidal anisotropy of the local halo environment. Mon. Not. R. Astron. Soc. 476, 3631–3647 (2018).

    Article  ADS  Google Scholar 

  8. Tojeiro, R. et al. Galaxy And Mass Assembly (GAMA): halo formation times and halo assembly bias on the cosmic web. Mon. Not. R. Astron. Soc. 470, 3720–3741 (2017).

    Article  ADS  Google Scholar 

  9. Alpaslan, M. et al. Galaxy And Mass Assembly (GAMA): stellar mass growth of spiral galaxies in the cosmic web. Mon. Not. R. Astron. Soc. 457, 2287–2300 (2016).

    Article  ADS  Google Scholar 

  10. Kraljic, K. et al. Galaxy evolution in the metric of the cosmic web. Mon. Not. R. Astron. Soc. 474, 547–571 (2018).

    Article  ADS  Google Scholar 

  11. Winkel, N. et al. The imprint of cosmic web quenching on central galaxies. Mon. Not. R. Astron. Soc. 505, 4920–4934 (2021).

    Article  ADS  Google Scholar 

  12. Kleiner, D., Pimbblet, K. A., Jones, D. H., Koribalski, B. S. & Serra, P. Evidence for H I replenishment in massive galaxies through gas accretion from the cosmic web. Mon. Not. R. Astron. Soc. 466, 4692–4710 (2017).

    ADS  Google Scholar 

  13. Crone Odekon, M. et al. The effect of filaments and tendrils on the H I content of galaxies. Astrophys. J. 852, 142 (2018).

    Article  ADS  Google Scholar 

  14. Darvish, B. et al. Spectroscopic study of star-forming galaxies in filaments and the field at z ~ 0.5: evidence for environmental dependence of electron density. Astrophys. J. 814, 84 (2015).

    Article  ADS  Google Scholar 

  15. Genel, S. How environment affects galaxy metallicity through stripping and formation history: lessons from the Illustris simulation. Astrophys. J. 822, 107 (2016).

    Article  ADS  Google Scholar 

  16. Gupta, A. et al. Chemical pre-processing of cluster galaxies over the past 10 billion years in the IllustrisTNG simulations. Mon. Not. R. Astron. Soc. 477, L35–L39 (2018).

    Article  ADS  Google Scholar 

  17. Maiolino, R. & Mannucci, F. De re metallica: the cosmic chemical evolution of galaxies. Astron. Astrophys. Rev. 27, 3 (2019).

    Article  ADS  Google Scholar 

  18. Tremonti, C. A. et al. The origin of the mass-metallicity relation: insights from 53,000 star-forming galaxies in the Sloan Digital Sky Survey. Astrophys. J. 613, 898–913 (2004).

    Article  ADS  Google Scholar 

  19. De Lucia, G., Xie, L., Fontanot, F. & Hirschmann, M. Gas accretion regulates the scatter of the mass-metallicity relation. Mon. Not. R. Astron. Soc. 498, 3215–3227 (2020).

    Article  ADS  Google Scholar 

  20. van Loon, M. L., Mitchell, P. D. & Schaye, J. Explaining the scatter in the galaxy mass-metallicity relation with gas flows. Mon. Not. R. Astron. Soc. 504, 4817–4828 (2021).

    Article  ADS  Google Scholar 

  21. Mannucci, F., Cresci, G., Maiolino, R., Marconi, A. & Gnerucci, A. A fundamental relation between mass, star formation rate and metallicity in local and high-redshift galaxies. Mon. Not. R. Astron. Soc. 408, 2115–2127 (2010).

    Article  ADS  Google Scholar 

  22. Martini, P. et al. Overview of the Dark Energy Spectroscopic Instrument. In Ground-based and Airborne Instrumentation for Astronomy VII Vol. 10702 (eds Evans, C. J. et al.) 107021F (SPIE, 2018).

  23. York, D. G. et al. The Sloan Digital Sky Survey: technical summary. Astrophys. J. 120, 1579–1587 (2000).

    Google Scholar 

  24. Abazajian, K. N. et al. The Seventh Data Release of the Sloan Digital Sky Survey. Astrophys. J. Suppl. 182, 543–558 (2009).

    Article  ADS  Google Scholar 

  25. Strauss, M. A. et al. Spectroscopic target selection in the Sloan Digital Sky Survey: the main galaxy sample. Astrophys. J. 124, 1810–1824 (2002).

    Google Scholar 

  26. Peng, Y.-j & Maiolino, R. The dependence of the galaxy mass-metallicity relation on environment and the implied metallicity of the IGM. Mon. Not. R. Astron. Soc. 438, 262–270 (2014).

    Article  ADS  Google Scholar 

  27. Chartab, N. et al. The MOSDEF Survey: environmental dependence of the gas-phase metallicity of galaxies at 1.4 ≤ z ≤ 2.6. Astrophys. J. 908, 120 (2021).

    Article  ADS  Google Scholar 

  28. Williams, R. J. et al. Dynamics and metallicity of far-infrared selected galaxies. Mon. Not. R. Astron. Soc. 443, 3780–3794 (2014).

    Article  ADS  Google Scholar 

  29. Libeskind, N. I. et al. Tracing the cosmic web. Mon. Not. R. Astron. Soc. 473, 1195–1217 (2018).

    Article  ADS  Google Scholar 

  30. Nelson, D. et al. First results from the IllustrisTNG simulations: the galaxy colour bimodality. Mon. Not. R. Astron. Soc. 475, 624–647 (2018).

    Article  ADS  Google Scholar 

  31. Pillepich, A. et al. Simulating galaxy formation with the IllustrisTNG model. Mon. Not. R. Astron. Soc. 473, 4077–4106 (2018).

    Article  ADS  Google Scholar 

  32. Springel, V. et al. First results from the IllustrisTNG simulations: matter and galaxy clustering. Mon. Not. R. Astron. Soc. 475, 676–698 (2018).

    Article  ADS  Google Scholar 

  33. Tumlinson, J., Peeples, M. S. & Werk, J. K. The circumgalactic medium. Annu. Rev. Astron. Astrophys. 55, 389–432 (2017).

    Article  ADS  Google Scholar 

  34. Gunn, J. E. et al. The Sloan Digital Sky Survey photometric camera. Astrophys. J. 116, 3040–3081 (1998).

    Google Scholar 

  35. Smee, S. A. et al. The Multi-object, fiber-fed spectrographs for the Sloan Digital Sky Survey and the Baryon Oscillation Spectroscopic Survey. Astrophys. J. 146, 32 (2013).

    Google Scholar 

  36. Salim, S. et al. UV star formation rates in the local Universe. Astrophys. J. Suppl. 173, 267–292 (2007).

    Article  ADS  Google Scholar 

  37. Torrey, P. et al. The evolution of the mass-metallicity relation and its scatter in IllustrisTNG. Mon. Not. R. Astron. Soc. 484, 5587–5607 (2019).

    ADS  Google Scholar 

  38. Sousbie, T. The persistent cosmic web and its filamentary structure - I. Theory and implementation. Mon. Not. R. Astron. Soc. 414, 350–383 (2011).

    Article  ADS  Google Scholar 

  39. Sousbie, T., Pichon, C. & Kawahara, H. The persistent cosmic web and its filamentary structure - II. Illustrations. Mon. Not. R. Astron. Soc. 414, 384–403 (2011).

    Article  ADS  Google Scholar 

  40. Kraljic, K. et al. The impact of the connectivity of the cosmic web on the physical properties of galaxies at its nodes. Mon. Not. R. Astron. Soc. 491, 4294–4309 (2020).

    Article  ADS  Google Scholar 

Download references


Part of this work made use of the Horizon cluster hosted by the Institut d’Astrophysique de Paris. We thank S. Rouberol for running it smoothly. K.K. acknowledges support from the DEEPDIP project (grant number ANR-19-CE31-0023). Funding for the Sloan Digital Sky Survey IV was provided by the Alfred P. Sloan Foundation, the US Department of Energy Office of Science and the Participating Institutions. The SDSS acknowledges support and resources from the Center for High-Performance Computing at the University of Utah. The SDSS web site is The SDSS is managed by the Astrophysical Research Consortium for the Participating Institutions of the SDSS Collaboration including the Brazilian Participation Group, the Carnegie Institution for Science, Carnegie Mellon University, Center for Astrophysics Harvard & Smithsonian (CfA), the Chilean Participation Group, the French Participation Group, Instituto de Astrofísica de Canarias, The Johns Hopkins University, Kavli Institute for the Physics and Mathematics of the Universe (IPMU)/University of Tokyo, the Korean Participation Group, Lawrence Berkeley National Laboratory, Leibniz Institut für Astrophysik Potsdam (AIP), Max-Planck-Institut für Astronomie (MPIA Heidelberg), Max-Planck-Institut für Astrophysik (MPA Garching), Max-Planck-Institut für Extraterrestrische Physik (MPE), National Astronomical Observatories of China, New Mexico State University, New York University, University of Notre Dame, Observatório Nacional/MCTI, The Ohio State University, Pennsylvania State University, Shanghai Astronomical Observatory, United Kingdom Participation Group, Universidad Nacional Autónoma de México, University of Arizona, University of Colorado Boulder, University of Oxford, University of Portsmouth, University of Utah, University of Virginia, University of Washington, University of Wisconsin, Vanderbilt University and Yale University.

Author information

Authors and Affiliations



C.T.D. performed the main analysis of the data. C.T.D., R.T. and K.K. interpreted the results and contributed to the writing of the manuscript. K.K. generated the DisPerSE catalogues.

Corresponding author

Correspondence to Callum T. Donnan.

Ethics declarations

Competing interests

The authors declare no competing interests.

Peer review

Peer review information

Nature Astronomy thanks the anonymous reviewers for their contribution to the peer review of this work

Additional information

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

Supplementary information

Supplementary Information

Supplementary Information and Figs. 1–3.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Donnan, C.T., Tojeiro, R. & Kraljic, K. The role of the cosmic web in the scatter of the galaxy stellar mass–gas metallicity relation. Nat Astron 6, 599–606 (2022).

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI:


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