We present a model of inter-bacterial interactions that explains the effect of antibiotics and the counter-intuitive observation that an antibiotic-induced shift in microbiota composition can persist even after antibiotic cessation. Our analysis predicts a crucial dependence of the recovery time on the level of noise, as suggested by experiments with mice where the recovery depends on the exposure to mice with untreated microbiota 
. The simple model here introduced is inspired by classical ecological modeling such as competitive Lotka-Volterra models 
, but relies on mechanistic rather than phenomenological assumptions, such as the logistic growth. Although more sophisticated multi-species models include explicit spatial structure to describe microbial consortia 
, our model is a first attempt to quantitatively analyze the interplay between microbial social interactions (
) and stochastic fluctuations (
) in the gut microbiota. We find that these two mechanisms are the key ingredients to reproduce the main features of the dynamics in response to antibiotic (sudden shifts and recovery). Our model can be easily generalized to include spatial variability and more complicated types of noise. Therefore we provide a theoretical framework to quantify microbiota resilience against disturbances, which is an importance feature in all ecosystems 
. By introducing a new stochastic formulation, we were able to characterize composition switches within the context of state transition theory 
, an important development over similar ecological models of microbial populations 
. We present a new method to calculate the rate of switching between states that identifies the most likely trajectory between two stable states and their relative residence time, which can be subjected to experimental validation. Finally, we apply SVD to previously published metagenomic data 
, which allows us to classify the bacteria of each subject in two groups according to their temporal response to a single antibiotic. The SVD method has been used before to find patterns in temporal high-throughput data, including transcription microarrays 
and metabolomics 
. Although our approach seems to capture well the main temporal microbiota patterns, we should note that the use of the Euclidean distance as a metric for microbiome analysis presents limitations and recent studies have proposed alternative choices 
. We also opt for an indirect gradient analysis method 
because we are interested in emergent patterns from the data regardless of the measurements of the external environmental variable (i.e. presence or absence of the antibiotic) 
We propose a mechanism of interaction between two bacterial groups to explain the lack of recovery observed in the experiments that can be validated in the near future. Although training the model with the available data sets would be of great interest, this will not be useful in practice because we need more statistical power to be predictive. However, we anticipate that a properly validated mathematical model of the intestinal microbiota will be a valuable tool to assist in the rational design of antibiotic therapies. For example, we predict that the rate of antibiotic dosage will play a crucial role. In order to let the microbiota recover from antibiotic treatment, it is better to gradually decrease antibiotic dosage at the first sign of average microbiota composition change, which has to be larger than the threshold community change represented by the day-to-day variability 
, rather than waiting for tolerant-domination and then stopping antibiotic treatment.
We show here the application of our theory to a two-bacterial group scenario because we are interested in the microbiota response when challenged with a single antibiotic. However, in more realistic conditions the microbiota is subjected to different types of perturbations, which may drive it towards more alternative stable states. Our theory of the microbial-states switches characterization can be naturally extended to more than two states and consists of the solution of the linear system of equations
is the array of probability of residing in each stable state and
is the matrix of transition rates among the states.
The ongoing efforts to characterize the microbial consortia of the human microbiome can yield tremendous benefits to human health 
. Within the next few years, we are certain to witness important breakthroughs, including an increase in the number of microbiomes sequenced as well as in sequencing depth. Yet, without the proper ecological framework these complex ecosystems will remain poorly understood. Our study shows that, as in other complex microbial ecosystems, ecological models can be valuable tools to interpret the dynamics in the intestinal microbiota.