The human microbiome plays a key role in human health and is associated with numerous diseases. Metagenomic-based studies are now generating valuable information about the composition of the microbiome in health and in disease, demonstrating nonneutral assembly processes and complex co-occurrence patterns. However, the underlying ecological forces that structure the microbiome are still unclear. Specifically, compositional studies alone with no information about mechanisms of interaction, potential competition, or syntrophy, cannot clearly distinguish habitat-filtering and species assortment assembly processes. To address this challenge, we introduce a computational framework, integrating metagenomic-based compositional data with genome-scale metabolic modeling of species interaction. We use in silico metabolic network models to predict levels of competition and complementarity among 154 microbiome species and compare predicted interaction measures to species co-occurrence. Applying this approach to two large-scale datasets describing the composition of the gut microbiome, we find that species tend to co-occur across individuals more frequently with species with which they strongly compete, suggesting that microbiome assembly is dominated by habitat filtering. Moreover, species' partners and excluders exhibit distinct metabolic interaction levels. Importantly, we show that these trends cannot be explained by phylogeny alone and hold across multiple taxonomic levels. Interestingly, controlling for host health does not change the observed patterns, indicating that the axes along which species are filtered are not fully defined by macroecological host states. The approach presented here lays the foundation for a reverse-ecology framework for addressing key questions concerning the assembly of host-associated communities and for informing clinical efforts to manipulate the microbiome.T he human body is home to numerous microbial species and several complex microbial ecosystems. Advances in sequencing technologies and metagenomics now allow researchers to characterize the composition of species that inhabit the human body and the variation these communities exhibit in health and in disease (1-3). Specifically, recent studies of the microbiome have found tremendous variation among healthy individuals (1) and demonstrated clear associations between species composition and several host phenotypes including obesity (4, 5), inflammatory bowel disease (IBD) (2), and diabetes (6), as well as with external factors such as diet (7). These studies further demonstrated that, as in many other ecosystems, the composition of species in the microbiome exhibits distinct patterns that clearly deviate from a random distribution. For example, species composition in the human microbiome exhibits a significant checkerboard pattern, indicating pairs of taxa that exclude one another from shared environments (8, 9). These patterns are similar to those seen in macroecological communities, suggesting that similar pressures may act upon such m...