Abstract
Microbial consortia exhibit complex functional properties in contexts ranging from soils to bioreactors to human hosts. Understanding how community composition determines function is a major goal of microbial ecology. Here we address this challenge using the concept of community-function landscapes—analogues to fitness landscapes—that capture how changes in community composition alter collective function. Using datasets that represent a broad set of community functions, from production/degradation of specific compounds to biomass generation, we show that statistically inferred landscapes quantitatively predict community functions from knowledge of species presence or absence. Crucially, community-function landscapes allow prediction without explicit knowledge of abundance dynamics or interactions between species and can be accurately trained using measurements from a small subset of all possible community compositions. The success of our approach arises from the fact that empirical community-function landscapes appear to be not rugged, meaning that they largely lack high-order epistatic contributions that would be difficult to fit with limited data. Finally, we show that this observation holds across a wide class of ecological models, suggesting community-function landscapes can be efficiently inferred across a broad range of ecological regimes. Our results open the door to the rational design of consortia without detailed knowledge of abundance dynamics or interactions.
This is a preview of subscription content, access via your institution
Access options
Access Nature and 54 other Nature Portfolio journals
Get Nature+, our best-value online-access subscription
$32.99 / 30 days
cancel any time
Subscribe to this journal
Receive 12 digital issues and online access to articles
$119.00 per year
only $9.92 per issue
Buy this article
- Purchase on SpringerLink
- Instant access to the full article PDF.
USD 39.95
Prices may be subject to local taxes which are calculated during checkout




Similar content being viewed by others
Data availability
Data analysed here are either available from the original studies or in the following repository: https://github.com/abbyskwara2/regression_on_landscapes.
Code availability
Code to run all analyses presented in this paper is available in the following repository: https://github.com/abbyskwara2/regression_on_landscapes.
References
Wright, S. The roles of mutation, inbreeding, crossbreeding and selection in evolution. Proc. XI Int. Congr. Genet. 8, 209–222 (1932).
Ferguson, A. L. et al. Translating HIV sequences into quantitative fitness landscapes predicts viral vulnerabilities for rational immunogen design. Immunity 38, 606–617 (2013).
Chou, H. H., Chiu, H. C., Delaney, N. F., Segrè, D. & Marx, C. J. Diminishing returns epistasis among beneficial mutations decelerates adaptation. Science 332, 1190–1192 (2011).
Khan, A. I., Dinh, D. M., Schneider, D., Lenski, R. E. & Cooper, T. F. Negative epistasis between beneficial mutations in an evolving bacterial population. Science 332, 1193–1196 (2011).
Kauffman, S. & Levin, S. Towards a general theory of adaptive walks on rugged landscapes. J. Theor. Biol. 128, 11–45 (1987).
Poelwijk, F. J., Kiviet, D. J., Weinreich, D. M. & Tans, S. J. Empirical fitness landscapes reveal accessible evolutionary paths. Nature 445, 383–386 (2007).
Kryazhimskiy, S., Tkăcik, G. & Plotkin, J. B. The dynamics of adaptation on correlated fitness landscapes. Proc. Natl Acad. Sci. U.S.A. 106, 18638 (2009).
Datta, M. S., Sliwerska, E., Gore, J., Polz, M. F. & Cordero, O. X. Microbial interactions lead to rapid micro-scale successions on model marine particles. Nat. Commun. 7, 11965 (2016).
Solden, L. M. et al. Interspecies cross-feeding orchestrates carbon degradation in the rumen ecosystem. Nat. Microbiol. 3, 1274–1284 (2018).
Jones, M. L., Rivett, D. W., Pascual-Garria, A. & Bell, T. Relationships between community composition, productivity and invasion resistance in semi-natural bacterial microcosms. eLife 10, e71811 (2021).
Wagner, A. Competition for nutrients increases invasion resistance during assembly of microbial communities. Mol. Ecol. 31, 4188–4203 (2022).
Cheng, A. G. et al. Design, construction, and in vivo augmentation of a complex gut microbiome. Cell 185, 3617–3636 (2022).
Sanchez, A. et al. The community-function landscape of microbial consortia. Cell Syst. 14, 122–134 (2023).
Fisher, R. A. The Genetical Theory of Natural Selection (Clarendon Press, 1930).
Price, G. R. Selection and covariance. Nature 227, 520–521 (1970).
Lande, R. & Arnold, S. J. The measurement of selection on correlated characters. Evolution 37, 1210–1226 (1983).
Uffelmann, E. et al. Genome-wide association studies. Nat. Rev. Methods Primers 1, 59 (2021).
Otwinowski, J. & Plotkin, J. B. Inferring fitness landscapes by regression produces biased estimates of epistasis. Proc. Natl Acad. Sci. U.S.A. 111, E2301 (2014).
Wu, N. C., Dai, L., Olson, C. A., Lloyd-Smith, J. O. & Sun, R. Adaptation in protein fitness landscapes is facilitated by indirect paths. eLife 5, e16965 (2016).
Poelwijk, F. J., Socolich, M. & Ranganathan, R. Learning the pattern of epistasis linking genotype and phenotype in a protein. Nat. Commun. 10, 4213 (2019).
Sanchez-Gorostiaga, A., Bajić, D., Osborne, M. L., Poyatos, J. F. & Sanchez, A. High-order interactions distort the functional landscape of microbial consortia. PLoS Biology 17, e3000550 (2019).
Clark, R. L. et al. Design of synthetic human gut microbiome assembly and butyrate production. Nature Communications 12, 3254 (2021).
Gowda, K., Ping, D., Mani, M. & Kuehn, S. Genomic structure predicts metabolite dynamics in microbial communities. Cell 185, 530–546 (2022).
van den Berg, N. I. et al. Ecological modelling approaches for predicting emergent properties in microbial communities. Nat. Ecol. Evol. 6, 855–865 (2022).
Debray, R. et al. Priority effects in microbiome assembly. Nat. Rev. Microbiol. 20, 109–121 (2022).
Amor, D. R., Ratzke, C. & Gore, J. Transient invaders can induce shifts between alternative stable states of microbial communities. Sci. Adv. 6, eaay8676 (2020).
Langenheder, S., Bulling, M. T., Solan, M. & Prosser, J. I. Bacterial biodiversity-ecosystem functioning relations are modified by environmental complexity. PLoS ONE 5, e10834 (2010).
Diaz-Colunga, J., Skwara, A., Vila, J. C. C. & Bajic, D. Global epistasis and the emergence of ecological function. bioRxiv https://doi.org/10.1101/2022.06.21.496987 (2023).
Kehe, J. et al. Massively parallel screening of synthetic microbial communities. Proc. Natl Acad. Sci. U.S.A. 116, 12804–12809 (2019).
Poelwijk, F. J., Krishna, V. & Ranganathan, R. The context-dependence of mutations: a linkage of formalisms. PLoS Comput. Biol. 12, e1004771 (2016).
Hordijk, W. & Stadler, P. F. Amplitude spectra of fitness landscapes. Adv. Complex Syst. 01, 39–66 (1998).
Hastie, T., Tibshirani, R. J., & Friedman, J. The Elements of Statistical Learning 2nd edn (Springer, 2008).
Szendro, I. G., Schenk, M. F., Franke, J., Krug, J. & De Visser, J. A. G. Quantitative analyses of empirical fitness landscapes. J. Stat. Mech.: Theory Exp., 1: P01005 (2013).
de Visser, J. A. G. M. & Krug, J. Empirical fitness landscapes and the predictability of evolution. Nat. Rev. Genet. 15, 480–490 (2014).
Barbier, M., Arnoldi, J.-F., Bunin, G. & Loreau, M. Generic assembly patterns in complex ecological communities. Proc. Natl Acad. Sci. U.S.A. 115, 2156–2161 (2018).
Bunin, G. Ecological communities with Lotka–Volterra dynamics. Phys. Rev. E 95, 042414 (2017).
Vanwonterghem, I. et al. Deterministic processes guide long-term synchronised population dynamics in replicate anaerobic digesters. ISME J. 8, 2015 (2014).
Esteban, D. J., Hysa, B. & Bartow-McKenney, C. Temporal and spatial distribution of the microbial community of Winogradsky columns. PLoS ONE 10, e0134588 (2015).
Goyal, A., Dubinkina, V. & Maslov, S. Multiple stable states in microbial communities explained by the stable marriage problem. ISME J. 12, 2823–2834 (2018).
Dubinkina, V., Fridman, Y., Pandey, P. P. & Maslov, S. Multistability and regime shifts in microbial communities explained by competition for essential nutrients. eLife 8, e49720 (2019).
Darcy, J. L. et al. A phylogenetic model for the recruitment of species into microbial communities and application to studies of the human microbiome. ISME J. 14, 1359–1368 (2020).
O’Dwyer, J. P., Kembel, S. W. & Green, J. L. Phylogenetic diversity theory sheds light on the structure of microbial communities. PLoS Comput. Biol. 8, e1002832 (2012).
Louca, S. et al. Function and functional redundancy in microbial systems. Nat. Ecol. Evol. 2, 936–943 (2018).
Shan, X., Goyal, A., Gregor, R. & Cordero, O. X. Annotation-free discovery of functional groups in microbial communities. Nat. Ecol. Evol. 7, 716–724 (2023).
Moran, M. A. et al. Microbial metabolites in the marine carbon cycle. Nat. Microbiol. 7, 508–523 (2022).
Lyons, D. M., Zou, Z., Xu, H. & Zhang, J. Idiosyncratic epistasis creates universals in mutational effects and evolutionary trajectories. Nat. Ecol. Evol. 4, 1685–1693 (2020).
Reddy, G. & Desai, M. M. Global epistasis emerges from a generic model of a complex trait. eLife 10, e64740 (2021).
Diaz-Colunga, J. et al. Global epistasis on fitness landscapes. Philos. Trans. R. Soc. B 378, 20220053 (2023).
Harcombe, W. et al. Metabolic resource allocation in individual microbes determines ecosystem interactions and spatial dynamics. Cell Rep. 7, 1104–1115 (2014).
Diaz-Colunga, J. et al. Top-down and bottom-up cohesiveness in microbial community coalescence. Proc. Natl Acad. Sci. U.S.A. 119, e2111261119 (2022).
Barbier, M., Arnoldi, J. F., Bunin, G. & Loreau, M. Generic assembly patterns in complex ecological communities. Proc. Natl Acad. Sci. U.S.A. 115, 2156–2161 (2018).
Acknowledgements
We thank S. Allesina and the members of the Center for the Physics of Evolving Systems at the University of Chicago for useful discussions. We thank J. Softcheck for assistance with the experiments. S.K., K.G., M.Y., and M.T. acknowledge funding from the National Science Foundation (EF-2025293, MCB-2117477, PHY-2310746). S.K. acknowledges funding from the National Institutes of Health (NIH R01GM151538). A. Sanchez acknowledges support from the Spanish Ministry of Science and Innovation under project PID2021-125478NA-100.
Author information
Authors and Affiliations
Contributions
S.K., M.T., K.G., M.Y., A. Skwara, A. Sanchez and A.S.R. conceptualized the study. A. Skwara, K.G., M.Y., M.T. and S.K. developed the methodology. A. Skwara, K.G., M.Y., M.T. and S.K. designed and conducted formal analysis. J.D.-C. and A. Sanchez designed experiments and collected experimental data, and J.D.-C. assisted with data analysis and visualization. K.G., S.K., M.T. and A. Skwara wrote the paper. S.K. and M.T. supervised the project and acquired funding.
Corresponding authors
Ethics declarations
Competing interests
The authors declare no competing interests.
Peer review
Peer review information
Nature Ecology & Evolution thanks Elle Barnes, Daniel Amor and the other, anonymous, reviewer(s) for their contribution to the peer review of this work. Peer reviewer reports are available.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Extended data
Extended Data Fig. 3 Model predictions from second-order regression fits with all data in-sample and experimental replicates included.
Data from (A) Clark et al.22, (B) Diaz-Colunga et al.28, (C) data from the Sanchez lab, and (D) Kehe et al.29. Black points correspond to the mean observed value for each distinct experimental community, and are identical to the points shown in Extended Data Fig. S1. Gray points correspond to values for distinct experimental replicates. The datasets here include only datasets for which experimental replicates were measured.
Supplementary information
Supplementary Information (download PDF )
Supplementary Table 1, Discussion and Figs. 1 and 2.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Skwara, A., Gowda, K., Yousef, M. et al. Statistically learning the functional landscape of microbial communities. Nat Ecol Evol 7, 1823–1833 (2023). https://doi.org/10.1038/s41559-023-02197-4
Received:
Accepted:
Published:
Version of record:
Issue date:
DOI: https://doi.org/10.1038/s41559-023-02197-4
This article is cited by
-
Molecules-mediated bidirectional interactions between microbes and human cells
npj Biofilms and Microbiomes (2025)
-
Replicating community dynamics reveals how initial composition shapes the functional outcomes of bacterial communities
Nature Communications (2025)
-
Applying ecological principles to microbiome engineering
Nature Microbiology (2025)
-
Data-driven prediction of colonization outcomes for complex microbial communities
Nature Communications (2024)
-
Smooth functional landscapes in microcosms
Nature Ecology & Evolution (2023)


