## Abstract

Even short courses of antibiotics are known to reduce gut microbiome diversity. However, there has been limited mathematical modelling of the associated dynamical time-response. Here, we take inspiration from a ‘stability landscape’ schematic and develop an impulse-response model of antibiotic perturbation. We fit this model to previously published data where individuals took a ten-day course of antibiotics (clindamycin or ciprofloxacin) and were sampled up to a year afterwards. By fitting an extended model allowing for a transition to an alternative stable state, we find support for a long-term transition to an alternative community state one year after taking antibiotics. This implies that a single treatment of antibiotics not only reduces the diversity of the gut flora for up to a year but also alters its composition, possibly indefinitely. Our results provide quantitative support for a conceptual picture of the gut microbiome and demonstrate that simple models can provide biological insight.

## Introduction

The human gut microbiome is a complex ecosystem and, as such, can be thought of in ecological terms. The relative stability of the gut microbiome in the absence of large perturbations has been suggested to indicate the presence of restoring forces within a dynamical system (Relman 2012). While stability appears to be the norm, disturbances to this ecosystem are also important when considering the impact of the gut microbiome on human health. One example of a major perturbation is a course of antibiotics, which typically leads to a marked reduction in species diversity before subsequent recovery (Modi *et al*. 2014). Even a brief course of antibiotics can result in long-term effects on microbial community composition, with species diversity remaining lower than its baseline value up to a year afterwards (Zaura *et al*. 2015). However, the nature of the reconstitution of the gut microbiome remains an active area of research.

Artificial perturbation experiments are widely used to explore the underlying dynamics of macro-ecological systems (Wootton 2010). In the context of the gut microbiome, the response after antibiotics has been extensively investigated (Sullivan *et al*. 2001; Dethlefsen *et al*. 2008; Dethlefsen & Relman 2011). However, despite interest in the application of ecological theory to the gut microbiome (Pepper & Rosenfeld 2012) there has been limited quantitative or mechanistic modelling of this response. While this may be because responses can appear individualized (Dethlefsen & Relman 2011), this does not preclude the possibility of generalized models that are applicable at the population level. Additionally, recent work suggests that alterations due to specific antibiotics are predictable and reproducible (Raymond *et al*. 2015).

Applying mathematical models to other ecological systems subject to perturbation has a long tradition of giving useful insight into their behaviour (Skellam 1951; May 1973; Scheffer *et al*. 2001). Crucially, it allows the comparison of different models based on different hypotheses about the subsequent behaviour of the system. Additionally, developing a consistent mathematical framework for quantifying the long-term effects of antibiotic use would facilitate comparisons between different antibiotics and different regimens, with the potential to inform approaches to antibiotic stewardship (Doron & Davidson 2011). Some previous work has attempted to model species interactions in the context of antibiotics using Lotka-Volterra models (Stein *et al*. 2013), but such models require dense temporal sampling and restriction to a small number of species to make meaningful inference, limiting their applicability to broader ecological questions. Furthermore, it has recently been shown that pairwise microbial interactions in different scenarios cannot be captured by a single equation, suggesting that pairwise modelling will often fail to predict microbial dynamics (Momeni *et al*. 2017).

In one popular schematic picture taken from classical ecology, the state of the gut microbiome is represented by a ball sitting in a stability landscape (Holling 1973; Lemon *et al*. 2012; Relman 2012; Lloyd-Price *et al*. 2016). Perturbations can be thought of either as forces acting on the ball to displace it from its equilibrium position (Lloyd-Price *et al*. 2016), or alterations of the stability landscape (Costello *et al*. 2012). While this image is usually provided only as a conceptual model to aid thinking about the complexity of the ecosystem, we used it to derive a mathematical model to investigate whether it could provide mechanistic insight.

The model we outline here, based on simple ecological concepts, allows quantitative hypotheses about the effect of antibiotics on the gut microbiome to be tested. We model the effect of a brief course of antibiotics on the microbial community’s phylogenetic diversity as the impulse response of an overdamped harmonic oscillator (Figure 1; see Materials and Methods), and compare parameters for two widely-used antibiotics by fitting to empirical data previously published by Zaura et al. (2015). We find that a variant of the model with an extra parameter accounting for the possibility of an altered equilibrium value of diversity is better supported, providing evidence from a sparse dataset that antibiotics can produce transitions to alternative stable states.

## Results

### An impulse response model for the effect of antibiotics

Our mechanistic model (Figure 1) assumes that a short course of antibiotics can be modelled as an impulse on the gut microbiome. With some additional simplifying assumptions about the form of the stability landscape (see Materials and Methods), we derive an analytical form for this overdamped impulse response in terms of the phylogenetic diversity of the gut microbiome (eq. 6).

We fit the model to published data from Zaura et al. (2015) where 30 individuals received a ten-day course of either a placebo, ciprofloxacin, or clindamycin (Table 1). Clindamycin is a lincosamide with a broad spectrum of activity against Gram-positive aerobes and anaerobes Gram-negative anaerobes (Guay 2007). Ciprofloxacin is a quinolone which targets bacterial DNA topoisomerase and DNA gyrase, making it active against a range of Gram-positive and Gram-negative bacteria (Mustaev *et al*. 2014). Faecal samples were taken at baseline (i.e. before treatment), then subsequently at ten days, one month, two months, four months, and one year after treatment.

The model appeared to adequately describe the initial response to antibiotics (Figure 2), where diversity decreases (i.e. displacement from equilibrium increases) before returning gradually towards equilibrium. Despite large variability between samples from the same treatment group, reassuringly the placebo group clearly did not warrant an impulse response model whereas data from individuals receiving ciprofloxacin and clindamycin was qualitatively in agreement with the model.

However, the residuals suggested that diversity after a year was not well-captured by the model. In their analysis, Zaura et al. (2015) noted significantly (*p* < 0.05) reduced Shannon diversity when comparing samples a year after receiving 10 days’ ciprofloxacin to baseline, but this could have in principle merely been due to slow reconstitution and return to original equilibrium under the dynamics we have described.

Fitting the impulse model to the data and taking into account the whole temporal response suggests that the lack of return to the initial equilibrium state is not due to slow reconstitution of the initial microbiome species community. Instead, the distribution of residuals indicates that, while the initial response fits a standard impulse response model well, the longer-term dynamics of the system did not – as might be expected under a scenario involving a long-term transition to an alternative community state (Figure 1). We therefore developed a variant of the model (eq. 7) to take into account potential shifts to alternative stable states.

### Support for an antibiotic-induced state transition

To test the hypothesis that the course of antibiotics could have moved individuals’ gut microbiomes into alternative states, we fit an extended version of our model that allowed a potential non-zero asymptotic value (model 2; eq. 7), representing a new long-term value of diversity. We assumed a normally distributed prior for the asymptote parameter A centred at zero (i.e. return to original equilibrium) with a variance given by the variance of the displacement of placebo samples from baseline after a year.

Qualitatively, this slightly more complex model gave a similar fit (Figure 3) but with a positive displacement from equilibrium, corresponding to an alternative equilibrium state with lower diversity. We compared models with the Bayes factor *BF*, where *BF* > 1 indicates support for one model over another. There was no support for model 2 over model 1 for the placebo (*BF* = 0.96) but support for ciprofloxacin (*BF* = 3.36) and clindamycin (*BF* = 3.99). The posterior estimates for the asymptote parameter for ciprofloxacin and clindamycin were substantially positively skewed (Figure 4), providing evidence of a transition to a state with lower phylogenetic diversity than the baseline.

### Comparison of parameters between antibiotics

Comparing the posterior distribution of parameters for model 2 fits between treatment groups (Figure 4), the strength of the perturbation parameter *D* was not substantially different between antibiotics. The asymptotic equilibrium parameter *A* was positively skewed for both antibiotics (median (95% CI): *A*_{clinda} = 0.66 (-0.13–1.41); *A*_{cipro} = 0.58 (-0.14–1.27), strongly suggesting persistent detrimental effects on microbiome diversity and a transition to an alternative stable state.

The parameters *b* and *k* were both greater in clindamycin compared to ciprofloxacin. The damping ratio summarises how perturbations decay over time, and is an inherent property of the system independent of the perturbation itself. Therefore, if our modelling framework and ecological assumptions were valid we would expect to find a consistent damping ratio across both the clindamycin and ciprofloxacin groups. This is indeed what we observed, with median (95% CI) damping ratios of *ζ*_{clinda} = 1.07 (1.00–1.65) and *ζ*_{cipro} = 1.07 (1.00–1.66), substantially different from both the prior and the posterior distribution in the placebo group of *ζ*_{placebo} = 1.21(1.00–3.00), supporting the view of the gut microbiome as a damped harmonic oscillator.

### A complex, individualized antibiotic response does not prevent modelling

While it is not our intention to repeat a comprehensive description of the precise nature of the response for the different antibiotics, we note some interesting qualitative observations from our reanalysis that highlight the complexity of the antibiotic response in order to make the point that, while modelling these interactions is far beyond the scope of our model, our approach is unaffected by this underlying complexity. We discuss here observations at the level of taxonomic family (Supplementary Figure 1).

Despite their different mechanisms of action, both clindamycin and ciprofloxacin caused a dramatic decrease in the Gram-negative anaerobes *Rikenellaceae*, which was most marked a month after the end of the course. However, for ciprofloxacin this decrease had already started immediately after treatment, whereas for clindamycin the abundance after treatment was unchanged in most participants. The different temporal nature of this response perhaps reflects the bacteriocidal nature of ciprofloxacin (Mustaev *et al*. 2014) compared to the bacteriostatic effect of clindamycin, although concentrations *in vivo* can produce bacteriocidal effects (Spížek & Řezanka 2004).

There were clear differences in response between antibiotics. For example, clindamycin caused a decrease in the anaerobic Gram-positives *Ruminococcaceae* after a month, whereas ciprofloxacin had no effect. Conversely ciprofloxacin caused lower levels of *Barnesiellaceae* which was largely unaffected by clindamycin.

Some families appeared unaffected by antibiotics: the *Bacteroidaceae* were largely unaffected in most individuals. Furthermore, while overall diversity decreased, this can still be consistent with increases in the relative abundance of certain taxa. For example, ciprofloxacin led to increases in *Erysipelotrichaceae*, which were dramatic in some individuals. Interestingly, for these individuals these increases coincided with marked decreases in *Bacteroidaceae*, suggesting the relevance of inter-family microbial interactions (Supplementary Figure 1). The individualized nature of the ciprofloxacin response was also noticeable in *Lachnospiraceae* – which was largely unaffected by clindamycin – as its abundance dropped below detectable levels in some individuals after a month but remained unchanged in other individuals.

Comparing relative abundances at the family level, there were few differences between community states of different treatment groups after a year. Equal phylogenetic diversity can be produced by different community composition, and this suggests against consistent trends in the long-term dysbiosis associated with each antibiotic. However, we did find that *Peptostreptococcaceae*, a member of the order *Clostridiales*, was significantly more abundant in the clindamycin group when compared to both the ciprofloxacin group and the placebo group separately (*p* < 0.05, Wilcoxon rank sum test). In a clinical setting, clindamycin is well-established to lead to an increased risk of a life-threatening infection caused by another member of *Clostridiales: Clostridium difficile* (Thomas *et al*. 2003). The long-term reduction in diversity may well similarly increase the risk of colonization and overgrowth of pathogenic species.

## Discussion

Starting from a common qualitative conceptual picture of the gut microbiome as resting within a stability landscape, we have developed a simple mathematical model of its response to perturbation. With a few simplifying ecological assumptions, most notably that the phylogenetic diversity of the gut microbiome relative to its baseline value in some way parameterises this stability landscape, we have demonstrated that the response of the gut microbiome to a short course of antibiotics can be modelled as an impulse acting on a damped harmonic oscillator. Crucially, the simplifications involved appear to be justified at some fundamental level, as this model proves to successfully capture dynamics of empirical data. From this, we suggest that the restoring forces that contribute to the gut microbiome’s resilience to perturbation are proportional to displacement from equilibrium and that the system is overdamped.

Our approach uses a simple conceptual model to give mechanistic insight. Zaura et al. (2015) made the observation from their dataset that the lowest diversity was observed after a month rather than immediately after treatment stopped. This cannot be due to a persistence of the antibiotic effect, as clindamycin and ciprofloxacin only have short half-lives of the order of hours (Leigh 1981; Bergan *et al*. 1987). Our model gives us a mechanistic framework for thinking about this temporal delay: the full effects of the transient impulse take time to be realized due to the overdamped nature of the system, and we found a consistent damping ratio for both antibiotics analyzed.

We have also demonstrated how this modelling framework could be used to compare different hypotheses about the long-term effect of antibiotic perturbation on the gut microbiome by fitting different models and using Bayesian model selection. Our modelling work provides an additional line of evidence that while short-term restoration obeys a simple impulse response model, the underlying long-term community state can be fundamentally altered by a brief course of antibiotics, as suggested previously by others (Dethlefsen & Relman 2011), raising concerns about the long-term impact of antibiotic use on the gut microbiome. Despite the noisiness of the dataset and reliance on uninformative priors, we still found evidence that a model with a state transition was better supported, which was not observed in individuals taking a placebo. The transition to a new state with reduced diversity may increase the risk of colonization and overgrowth of pathogenic species. Even if only marginal, when considered at a population level this may mean that antibiotics have substantial negative health consequences that could support reductions in the length of antibiotic courses, in addition to concerns about antibiotic resistance (Llewelyn *et al*. 2017). Modelling the long-term impact on the microbiome of different doses and courses could help to influence the use of antibiotics in routine clinical care.

While the evidence for a long-term state transition is weak at present, we can at the very least conclude that the restoration of diversity after a year does not seem to obey the same underlying dynamics that govern the initial response, even if we remain agnostic about the most appropriate model refinement. This disparity between the short- and long-term time-evolution of the system is relevant to the distinction between different definitions of resilience. Implicit in some definitions of ecological resilience is the assumption that the fundamental shape of the stability landscape remains unaltered (Gunderson 2000), which we also adopt here, but it is possible that this assumption is invalid and should also be explicitly modelled.

Our sample size is small so the precise posterior estimates for parameters that we obtain should not be over-interpreted, but comparing antibiotics using these estimates represents another practical application of such simple models. However, these posterior estimates for the model parameters were fairly wide, which is to be expected with a sparse and small dataset. Hierarchical mixed effects models may offer an improved fit, particularly if they take into account other covariates; however, here we lacked metadata on the participants from the original study (Table 1).

A single metric clearly fails to capture all the complexity of the microbial community and its interactions. Nevertheless, the observation that treating phylogenetic diversity as the ‘height’ in the stability landscape leads to a reasonable fit of a simple model is interesting, as it supports observations of functional redundancy in the gut microbiome (Turnbaugh *et al*. 2007). An interesting extension of this work would be to systematically fit the model to a variety of diversity metrics and assess the model fit to see which metric, or combination of metrics, is most appropriately interpreted as the state variable parameterizing the stability landscape. A possible complementary approach could consider the diversity of the gut resistome (van Schaik 2015).

We would not expect the behavior with longer or repeated courses of antibiotics to be well-described by an impulse response model, but it would be possible to use the mathematical framework given here to obtain an analytic form for the possible system response by convolving any given perturbation function with the impulse response. It remains to be seen whether this simple model would break down in such circumstances.

The detailed nature of the gut microbiome’s response to clindamycin and ciprofloxacin was individualized in our dataset, as others have also observed with shotgun sequencing of samples from healthy participants given a second-generation cephalosporin (Raymond *et al*. 2016). We believe it would be a mistake to react to this complexity by assuming that no simplified model can capture general details of the ecosystem. At this stage of our understanding, creating a comprehensive inter-species model of the hundreds of members of the gut microbiome appears intractable. We recommend that microbiome research instead starts with ecologically-informed simple models and believe there is a place for both ‘bottom-up’ models using pairwise interactions for systems of reduced complexity like bioreactors, and ‘top-down’ models using general ecological principles, as we have attempted to demonstrate here.

We have shown that comparing different hypotheses about the response of the gut microbiome to antibiotics is possible by using a simple model derived from minimal assumptions about the nature of its equilibrium diversity. Future mathematical models of the gut microbiome, in conjunction with carefully designed longitudinal studies, will offer many more opportunities to rigorously test ecological hypotheses.

## Materials and methods

### Ecological assumptions

We represent the state of the gut microbiome as a unit mass resting in a stability landscape (Figure 1A). Choosing to mathematically model the state of the gut microbiome in this way also requires choosing a mathematical representation with reference to an equilibrium value. While earlier studies sought to identify a core set of ‘healthy’ microbes, the disturbance of which would indicate displacement from equilibrium, it has become apparent that this is not a practical definition due to high inter-individual variability in taxonomic composition (Lloyd-Price *et al*. 2016). More recent concepts of a healthy ‘functional core’ appear more promising, but characterization is challenging, particularly as many gut microbiome studies use 16S rRNA marker gene sequencing rather than whole-genome shotgun sequencing.

Therefore, we choose to use a metric that offers a proxy for the general functional potential of the gut microbiome: phylogenetic diversity (Lloyd-Price *et al*. 2016). Higher diversity has previously been associated with health (Turnbaugh *et al*. 2007) and temporal stability (Flores *et al*. 2014). For these reasons, we assume the equilibrium position to have higher diversity than the points immediately surrounding it, forming a potential well (Figure 1B). However, there may be alternative stable states that represent possible ‘dysbiotic’ states (Figure 1B), which are of interest when considering the effect of perturbations (Figure 1C).

### The model

We treat the local stability landscape as a harmonic potential, with a ‘restoring’ force proportional to the displacement *x* from the equilibrium position (–*kx*). We also assume the presence of a ‘frictional’ force acting against the direction of motion . This system is equivalent to a damped harmonic oscillator (Riley *et al*. 1997) with the following equation of motion:

Additional forces acting on the system now appear on the right-hand side of this equation as perturbations. Consider a course of antibiotics of duration *τ*. If we are interested in the behaviour of the system at timescales *T* ≫ *τ*, we can assume for simplicity that this perturbation is of infinitesimal duration and model it as an impulse of magnitude *D* acting at time *t* = 0:

To solve this second order differential equation, we assume that *b*^{2} > 4*k* (the ‘overdamped’ case) based on the lack of any oscillatory behaviour previously observed in the gut microbiome, to the best of our knowledge. Then, subject to the initial conditions *x*(0^{+}) = 0 and we obtain the following equation describing the system’s trajectory:

Fitting the model therefore requires fitting three parameters: *b* (the damping on the system), *k* (the strength of the restoring force), and *D* (how strong the perturbation is). For the purposes of fitting the model, we choose to reparameterise the model using the following definitions:

Resulting in the following model (Model 1, Figure 1C):

Antibiotics may lead not just to displacement from equilibrium, but also state transitions to new equilibria (Modi *et al*. 2014). To investigate this possibility, we also consider a model where the value of equilibrium diversity asymptotically tends to a new value *A* (Model 2, Figure 1C).

### Empirical dataset

To validate our model and test whether antibiotic perturbation caused a state transition we fitted both models to an empirical dataset and compared the results. Zaura *et al*. (2015) conducted a study on the long-term effect of antibiotics on the gut microbiome which provides an ideal test dataset. As part of this study, 30 Swedish individuals (15 males and 15 females, average age 26 years, range 18–45 years) were randomly assigned to either ciprofloxacin, clindamycin, or a placebo. The antibiotics (150 mg clindamycin four times a day, 500 mg ciprofloxacin twice a day) and placebo were administered for *τ* = 10 days and longitudinal faecal samples collected until *T* = 1 year afterwards (i.e. ) at baseline, after treatment, one month, two months, four months, and one year. Samples underwent 16S rRNA gene amplicon sequencing, targeting the V5–V7 region (SRA: SRP057504). We reanalysed this data, doing de novo clustering into operational taxonomic units (OTUs) at 97% similarity with VSEARCH v1.1.1 (Rognes *et al*. 2016) with chimeras removed against the 16S gold database (http://drive5.com/uchime/gold.fa). Taxonomy was assigned with RDP (Wang *et al*. 2007).

### Phylogenetic diversity

There are many possible diversity metrics that could be used to compute the displacement from equilibrium. Because of our assumption that phylogenetic diversity approximates functional potential, which is itself a proxy for ecosystem ‘health’ (see ‘Ecological assumptions’), we chose to use Faith’s phylogenetic diversity (Faith 1992) calculated with the `pd()` function in the ‘picante’ R package v1.6-2 (Kembel *et al*. 2010). Calculating Faith’s phylogenetic diversity requires a phylogeny, which we produced with RaxML v8.1.15 (Stamatakis 2014) after aligning 16S rRNA V5-V7 OTU sequences with Clustal Omega v1.2.1 (Sievers *et al*. 2011). To obtain values for fitting the model, we used mean bootstrapped values (*n* = 100, sampling depth *r* = 2000) of phylogenetic diversity *d _{i}* relative to the baseline phylogenetic diversity

*d*

_{0}for each individual, representing the displacement from equilibrium in our model:

### Model fitting

We used a Bayesian framework to fit models 1 and 2 (eq. 6 and 7) using Stan (Carpenter *et al*. 2017) and RStan (Stan Development Team 2017) to the three separate groups: placebo, ciprofloxacin, and clindamycin. In brief, our approach used 4 chains with a burn-in period of 10,000 iterations and 100,000 subsequent iterations, verifying that all chains converged and the effective sample size for each parameter was sufficiently large (*n _{eff}* > 10,000).

We used uninformative priors for the three parameters in the original model 1 without a state transition (eq. 6). For ciprofloxacin and clindamycin we used the same uniformly distributed prior for *D*, and uniform priors for *ϕ*_{1}, *ϕ*_{2}. For model 2 with a state transition (eq. 7) we used the same priors, with a normal prior centred at zero for the new equilibrium value *A* with a standard deviation given by the standard deviation of the displacement of placebo samples from baseline after a year, with bounds between −2 and 2. The priors are as follows:

For the placebo group, we expected no perturbation response so used a uniform prior for D centred at zero:

We compared models 1 and 2 for each treatment group using the Bayes factor (Aitkin 1991; Kass & Raftery 1995) after extracting the model fits using bridge sampling with the bridgesampling R package v0.2-2 (Gronau *et al*. 2017). A prior sensitivity analysis showed that choice of priors did not affect the conclusion that model 2 outperformed model 1 for the two antibiotics, although the strength of the Bayes factor varied.

Full code for fitting the models to empirical data is available as a zipped archive (Supplemental Code 1).

## Author contributions

LPS conceived the model, performed analyses, and wrote the paper. All authors contributed to discussion of the model and gave comments on the paper.

## Data accessibility statement

Datasets and code necessary to reproduce the results and figures are available as Supporting Information. All sequence data reported in this paper has been previously deposited in the NCBI Sequence Read Archive as part of another publication (SRA accession SRP057504).

## Funding

LPS is supported by the Engineering and Physical Sciences Research Council [EP/F500351/1] and the Reuben Centre for Paediatric Virology and Metagenomics. CPB is supported by the Wellcome Trust [097319/Z/11/Z].