Differential impact of self and environmental antigens on the ontogeny and maintenance of CD4+ T cell memory

Laboratory mice develop populations of circulating memory CD4+ T cells in the absence of overt infection. We have previously shown that these populations are replenished from naive precursors at high levels throughout life (Gossel et al., 2017). However, the nature, relative importance and timing of the forces generating these cells remain unclear. Here, we tracked the generation of memory CD4+ T cell subsets in mice housed in facilities differing in their ‘dirtiness’. We found evidence for sequential naive to central memory to effector memory development, and confirmed that both memory subsets are heterogeneous in their rates of turnover. We also inferred that early exposure to self and environmental antigens establishes persistent memory populations at levels determined largely, although not exclusively, by the dirtiness of the environment. After the first few weeks of life, however, these populations are continuously supplemented by new memory cells at rates that are independent of environment.


Introduction
Conventional memory T cells are defined as lymphocytes which respond rapidly to previously encountered epitopes (Gourley et al., 2004;Kaech and Wherry, 2007). In mice, memory T cells exhibit considerable heterogeneity in their function, circulation patterns, response to re-challenge, and capacities for proliferative self-renewal and survival (Farber, 2000;Kaech and Wherry, 2007;Jameson and Masopust, 2009;Gossel et al., 2017). This phenotypic heterogeneity is reflected in differential expression of various cell-surface molecules. In uninfected naive mice, there are at least two distinct populations of recirculating cells distinguished by their expression of the lymph node homing receptor L-selectin (CD62L); CD44 hi CD62L À effector memory (T EM ) and CD44 hi CD62L + central memory (T CM ) cells. During immune responses to active infection, there is an even more complex mix of effector and memory intermediates (Jameson and Masopust, 2018).
While it is clear that memory to infection resides amongst these CD44 hi subsets, it is also evident that they are generated in naive mice in the absence of overt infection. The functional significance of these memory-phenotype (MP) CD4 + T cells is not fully understood, but there is evidence they can augment primary immune responses. They can facilitate rapid production of IFN-g during the early inflammatory phase of the immune response to Toxoplasma gondii infection and enhance T H 1-type CD4 + T cell responses later in infection (Kawabe et al., 2017). There is also evidence that MP cells are capable of making rapid cross-reactive responses during primary infections (Min and Paul, 2005). Given that MP cells represent the majority of the memory compartment in specific pathogen-free (SPF) mice (Kawabe et al., 2017), a better understanding of how these cells are generated and maintained is crucial for better understanding their function and impact upon conventional memory to defined challenges.
The precise nature of the forces driving the generation of MP cells remains unclear. Their development appears to require a TCR-mediated activation event; Cd28 À/À mice have greatly reduced numbers of MP cells (Kotani et al., 2006), and mice lacking canonical NF-kB signalling, an obligate pathway in T cell activation, are completely devoid of such cells (Webb et al., 2019). Whether the TCR stimuli derive from self or foreign recognition events is unknown. MP cell generation may reflect a stochastic process in which CD4 + naive T cells occasionally encounter homeostatic stimuli that are above an activation threshold (Sprent and Surh, 2011), and indeed MP cells are generated not only in lymphopenia but also constitutively under replete conditions throughout life (Gossel et al., 2017;Kawabe et al., 2017). There is a positive correlation between the affinity of naive CD4 + T cells to self-antigens and the potential for differentiating into MP cells (Kawabe et al., 2017), although selfreactivity is also positively correlated to reactivity to foreign antigens (Mandl et al., 2013). Stronger evidence supporting an autoreactive stimulus comes from the failure of broad-spectrum antibiotics to prevent conversion of naive T cells to MP cells following adoptive transfer in vivo, and the observation that mice raised in germ-free conditions contain similar numbers of MP cells as those in SPF conditions (Kawabe et al., 2017). However, there is also a role for foreign environmental antigen in generating T cell memory compartments, since mice raised in more antigenically diverse environments, but still in the absence of overt infection, exhibit larger peripheral memory CD8 + T cell pools than SPF mice (Beura et al., 2016). When exactly such environmental stimuli impact upon memory compartment development, or how foreign and self reactivity combine to form the memory compartments, is unknown.
The differentiation pathways of these MP cells are also poorly understood. They may derive either directly from naive T cells or through interconversion of other memory phenotypes. Amongst CD8 +lineage cells, there is evidence that some MP subpopulations are generated in the thymus (Lee et al., 2011). In the case of CD4 + lineage cells, it has been suggested that MP cells derive from peripheral naive phenotype cells in a thymus-independent fashion (Kawabe et al., 2017). While both CD4 + T CM and T EM are produced constitutively in adult mice (Gossel et al., 2017), it remains unclear how their differentiation patterns relate to those of classically antigen-stimulated naive T cells.
In this study, we aimed to characterise the development and maintenance of memory CD4 + T cell subsets in adult mice to identify the nature and timing of the signals driving these dynamics in the absence of overt infection. To do this, we quantified the homeostasis and ontogeny of memory CD4 + T cells in identical strains of mice raised in two different animal facilities with distinct caging environments; those housed in individually ventilated cages (IVCs) and fed irradiated water, and those fed untreated tap water and housed in open cages, who might consequently be exposed to a greater variety of environmental antigens. We made use of an established temporal fate-mapping model in both cohorts, which allowed us to track the development of T cells under replete conditions (Hogan et al., 2015;Gossel et al., 2017). We also used data from germ-free (GF) mice to dissect further the relative contributions of self and environmental antigens to the generation and maintenance of MP cells.

Results
Modelling the ontogeny and homeostasis of CD4 + MP T cell subsets We employed a system described previously (Hogan et al., 2015;Gossel et al., 2017) to examine the flow of cells into memory subsets ( Figure 1A). Briefly, CD45.1 + C57Bl6/SJL host mice of various ages were treated with optimised doses of the transplant conditioning drug busulfan to selectively deplete haematopoeitic stem cells (HSC). The HSC compartment was then reconstituted by bone marrow transplantation (BMT) with congenically labelled bone marrow from CD45.2 + C57Bl6/J donors. The progeny of donor HSC were then followed as they developed in the thymus and percolated into the peripheral T cell pools, initially replete with host-derived cells.  Donor T cells (orange) differentiate and percolate through the thymus and periphery, replacing host cells (grey). (B) Comparing total numbers of CD4 + naive, T CM and T EM cells in clean and dirty chimeric mice. (C) Numbers of donor-derived CD4 + subsets recovered from spleen and lymph nodes of clean and dirty chimeric mice. Bone marrow transplants (BMT) were performed in mice between ages 5-26 weeks. (D) The donor Figure 1 continued on next page naive T cells and T CM and T EM cells in these busulfan chimeric mice were normal, in comparison to untreated wild-type (WT) controls ( Figure 1-figure supplement 1), confirming that the busulfan treatment regime left peripheral compartments intact (Hogan et al., 2015;Gossel et al., 2017). The kinetics with which donor-derived cells infiltrate the peripheral compartments -first naive, and then memory subsets -are rich in information regarding developmental pathways, rates of turnover and differentiation of lymphocyte populations, and any heterogeneity in homeostatic dynamics within them (Hogan et al., 2015;Gossel et al., 2017;Rane et al., 2018).
We studied busulfan chimeric mice from two housing facilities that employed different levels of mouse containment. At the MRC National Institute for Medical Research (NIMR), mice were held in open cages and fed untreated tap water, while mice held at the UCL Comparative Biology Unit (UCL) were maintained in individually ventilated cages (IVCs) and fed irradiated water. Henceforth, we refer to UCL sourced mice as 'clean' and NIMR sourced mice as 'dirty', in reference to the presumed difference in health status of the mice. We use these terms for clarity, but emphasise that they are relative; mice co-housed with pet-store or feral mice would be expected to be substantially 'dirtier' (Beura et al., 2016), and those in turn are cleaner than truly feral mice. In both environments, the same C57Bl6/SJL strain was analysed by the same researcher and cells were enumerated using the same single CASY counter. From age 10 weeks onwards, the numbers of CD4 + naive T cells in mice from clean and dirty environments were broadly similar ( Figure 1B, left panel). The total sizes (host+donor) of all circulating memory CD4 + T cell subsets remained relatively stable over the time frame of analysis, but were significantly larger in dirty mice ( Figure 1B, right panels) at age 10 weeks. Following BMT, donor-derived memory T cells accumulated in similar numbers in the two environments ( Figure 1C). Therefore, these two observations result in a lower proportional replacement of pre-existing memory cells with donor memory cells in dirty mice ( Figure 1D).
To quantify the cellular processes underlying these kinetics, we first considered a simple mechanistic explanation shown schematically in Figure 2A. In this 'homogeneous' model, each memory population (CD4 + T CM or T EM ) is fed at a constant per capita rate from a precursor population (source). We refer to this rate as the force of recruitment, '. The total cellular flux into a memory subset per day is then ' multiplied by the size of the source population, which in principle could be CD4 + naive T cells, or the complementary memory subset. We assume that memory cells are then lost at a constant net per capita rate l, which is the balance of loss (turnover) and proliferative self-renewal. In particular, the 'clonal half-life' lnð2Þ=l is the average time taken for a population that undergoes any degree of self-renewal to halve in size, and may be much longer than the lifespan of any particular cell within it.
We also considered a 'two phase' model of memory dynamics ( Figure 2B), which was motivated by three observations. First, newly generated donor CD4 + T CM and T EM in busulfan chimeras express Ki67, a marker of recent cell division, at higher levels than their established host-derived counterparts for some time after BMT (Gossel et al., 2017), although these levels eventually converge (data not shown). These observations suggest that memory CD4 + T cell populations become less proliferative, on average, with time since entry into the compartment. Second, we previously found evidence, using BrdU labelling in WT mice, that both CD4 + T EM and T CM appear to be kinetically heterogeneous, comprising at least two subpopulations turning over and dividing at different rates (Gossel et al., 2017). Third, and consistent with this picture, the increases in donor chimerism that we observed in both T CM and T EM with time post-BMT were suggestive of a biphasic kinetic, with a relatively rapid accumulation of donor cells followed by a slower increase ( Figure 1D). As shown in Materials and methods, the rate of accumulation of new memory cells is dictated by both the dynamics of influx and the net loss rate of existing memory, l. Therefore, all three observations are consistent with a mechanism in which cells newly recruited into memory comprise a subpopulation  that both divides rapidly and has a high net loss rate l fast . These cells then transition to a more quiescent state that divides more slowly and also has a lower net loss rate, l slow <l fast ( Figure 2B). The transient differences in Ki67 expression in donor and host memory cells could then be explained by an enrichment for 'new' memory (donor cells) in the fast phase in the weeks immediately following BMT, and not by any intrinsic differences in the behaviour of donor and host cells. Further, this transient difference in Ki67 expression implies a linear flow from fast to slow, rather than a branched process of establishment of the two populations separately; in the latter case, we would expect no differences in Ki67 expression between host and donor cells at any time, provided Ki67 expression within each subset derives entirely from self-renewal and is not inherited from the precursor population.
While the two-phase model is perhaps a minimal description of these observations, it seems plausible that any transition from active to quiescent memory might be more continuous. We previously found evidence for smooth changes in the rates of division and/or loss of naive T cells with their post-thymic age (Rane et al., 2018). We therefore also considered a model in which the net loss rate l of a cohort of cells changes continuously with the time since their common ancestor entered memory, a (the 'age-dependent loss model', Figure 2C). While the observations above are most consistent with l slow <l fast , or a decreasing lðaÞ, when fitting the two-phase and age-dependent loss models we placed no constraints on their parameters and allowed the data to determine their γ M fast (t)

S(t)
Precursor population (source)  Figure 2. Models of the generation and maintenance of memory CD4 + T cell subsets in adult mice. (A) New cells from a precursor (source) population of size SðtÞ flow in to a homogeneous memory subset MðtÞ at total rate 'SðtÞ. The force of recruitment ' is approximately the daily probability that any given cell from the source will be recruited into memory, multiplied by an expansion factor. This memory population may self-renew through division and be lost through death or differentiation and is continually supplemented by cells from the source. We assume that the net loss rate (loss minus division) is a constant, l. (B) In a two-phase model of memory, new cells are recruited at rate 'SðtÞ into a population M fast ðtÞ that has a high net loss rate l fast and so is replaced by donor cells relatively quickly. These cells transition into a slower subset M slow ðtÞ at constant rate g and are then lost at net rate l slow <l fast . (C) The age-dependent loss model; here, the net loss rate of memory is a continuous function of cell 'age' a, defined as the time since a cell or its ancestor entered the memory pool. The model tracks the evolution of the population density of memory T cells of age a at host age t, Mðt; aÞ. (D) The resistant memory model invokes a subpopulation of 'incumbent' memory cells which are presumed to be established early in life, stable in numbers, and not replenished from the source population. As in the homogeneous model, the source feeds a compartment of 'displaceable' cells, with net loss rate l. values. When analysing the age-dependent loss model, we also explored a variety of forms for lðaÞ (see Materials and methods).

S(t)
Finally, we considered an alternative form of heterogeneity in memory, in which subpopulations of CD4 + T CM and T EM generated early in life persist and are not replenished by newer cells (Gossel et al., 2017; Figure 2D). These 'incumbent' or 'resistant memory' populations, assumed to be stable in numbers and entirely host-derived (that is, established before 5 weeks of age, the earliest age at BMT in this study), could naturally explain the limited donor chimerism within memory subsets and, if they are less dynamic than memory generated later in life, might also be able to explain host/donor differences in Ki67 expression.
The kinetics of accumulation of CD4 + MP cells are consistent with a naive ! T CM ! T EM pathway, and both memory subsets are heterogeneous in their turnover We compared the abilities of the four mechanisms to describe the replacement kinetics of memory subsets in the dirty and clean environments. The kinetic of donor chimerism in CD4 + T EM clearly lagged that of CD4 + T CM ( Figure 1D), ruling out T EM as a direct predictor of T CM accumulation. We therefore considered only naive T cells as the source for T CM , but considered both naive and T CM cells as potential sources of T EM .
For each combination of source, environment (clean/dirty), and subset (T EM /T CM ), we fitted each model simultaneously to the timecourses of the total cell numbers and the proportion of donor cells within the subset using a maximum likelihood approach. We then calculated the combined probabilities (joint likelihoods) that the replacement kinetics of a given subset in both clean and dirty environments derive from each combination of source and model, allowing for different parameters in clean and dirty mice. We then compared the support for each combination using the Akaike Information Criterion ( Table 1, values in bold). Details of the model formulation, model fitting and inference procedures are given in Materials and methods.
We found clearly stronger support for T CM cells rather than naive T cells as a predictor of T EM production ( Table 1). This conclusion contrasts with that of our earlier study (Gossel et al., 2017), which found evidence for a direct naive ! T EM transition; however, while these inferences may be model-dependent to some extent, the more detailed timecourses we studied here gave us greater power to discriminate between the two pathways.
We found almost no support for the homogeneous or resistant memory models. For T CM the age-dependent loss was strongly favoured statistically, while for T EM the two-phase model had the strongest support (fits shown in Figure 3). However, the two models gave visually very similar descriptions of each dataset (not shown). This similarity is perhaps unsurprising, as both describe a progressive increase in clonal persistence the longer cells or their progeny reside within memory. Therefore, we remain somewhat equivocal regarding the true nature of heterogeneity in each, and present parameter estimates below for both models ( Table 2). A robust conclusion, however, is that we find a progressive lengthening of clonal lifetimes in both memory subsets and environments, Table 1. Measures of support (using differences in the corrected Akaike information criterion, AICc -AICc min ; see Materials and methods) for models in which CD4 + T CM derive directly from CD4 + naive T cells, and T EM derive either from naive T cells or T CM . AICc differences are shown in bold, with zero indicating the model with strongest support, and positive differences representing reduced support, with differences of 10 or more generally considered highly significant. Figures in parentheses are the log likelihoods, reflecting the quality of fit of each model. We also show the number of parameters estimated for each model in each environment.    Figure 3. The best-fitting models of CD4 + MP T cell dynamics. The age-dependent loss model was the best description of CD4 + T CM dynamics, and the two-phase model best described T EM . (A) Total (donor+host) numbers of memory T cells and (B) chimerism, from 4 weeks post bone marrow transplant (BMT). To visualise the fits, clean facility mice were grouped into small ranges of age at BMT, and the four curves show the model predictions for the median age within each group. All trajectories are described with the same parameters, differing only in the kinetics of the source population, Figure 3 continued on next page with newly recruited memory being lost on timescales of days to weeks, and more established memory persisting for several months (Figure 4).

Constitutive generation of circulating CD4 + T EM and T CM cells in adult mice occurs at constant rates, irrespective of environment
The kinetics of accumulation of donor-derived memory cells were visually indistinguishable in the two environments from age 10 weeks onwards ( Figure 1C), suggesting similar net rates of recruitment and loss. Consistent with this observation, we found no significant differences between clean and dirty mice in the forces of recruitment (') into circulating CD4 + memory T cell subsets between the ages of 11-64 weeks, in either model, and no substantial differences in their rates of loss (Figure 4 and Table 2). Therefore, we infer that antigenic stimuli common to both environments drive the continuous generation of new CD4 + effector and central memory T cells in adult mice, at total rates that are proportional to the sizes of their precursor populations.

Quantifying the long-term dynamics of CD4 + MP T cell subsets
Our analyses give a quantitative picture of recruitment into memory and the cells' subsequent lifehistories, and allow us to identify features of their population dynamics that are common to both environments and model-independent. First, the donor chimerism in T CM reached substantially lower levels than that of their CD4 + naive T cell precursors ( Figure 1D), suggesting that the rate of generation of new memory in both environments wanes with age, and/or that more established memory  95% confidence intervals are shown in parentheses. *In the age-dependent loss model, the threshold cell age A defines the beginning of the more persistent phase of memory maintenance (lðaÞ ¼ l 0 =ð1 þ ða=AÞ 3 Þ); for T EM in dirty mice, estimates of l 0 were close to zero, and A was poorly constrained. has a competitive advantage over recently recruited cells. We find evidence for both processes here. We show in Materials and methods that if influx declines faster than the average rate of turnover, a population will be unable to reach the same level of chimerism as its precursor -in effect, the flow from the source 'dries up' more quickly than the memory cells can be replaced by immigrants. We see signs of this effect; due to thymic involution, CD4 + naive T cell numbers decay exponentially in both clean and dirty adult mice ( Figure 1B) with population half lives of 228 days (95% CI 227-231 days) and 143 (142-144) days, respectively. These timescales are comparable to or shorter than the estimated half lives of established T CM memory clones (lnð2Þ=l slow in the two-phase model; and lnð2Þ=lðaÞ for a > 30 weeks in the age-dependent loss model; Figure 4 and Table 2). In addition, both the two-phase and age-dependent models indicate that older memory clones have a fitness advantage over newer ones. Therefore, the limited replacement of host CD4 + T CM by donor cells derives from the decline in naive T cell numbers with age, slow average rates of turnover, and the increased persistence of more established memory cells. This slow rate of accumulation of new T CM in turn acts to limit the chimerism observed in T EM , which are also lost slowly. One can also quantify the fates of populations after entering memory, although here our insights are more model-dependent. The two-phase model predicts that the establishment of memory is relatively inefficient, with 'fast' populations lost over timescales of days and only a small proportion of these surviving to become more persistent 'slow' memory (~2-10% of T EM , and~3-5% of T CM ; Table 2). Despite this inefficiency, the substantial constitutive influxes maintain the fast and slow populations at comparable sizes, consistent with our previous analysis of BrdU labelling of CD4 + T CM and T EM in WT mice (Gossel et al., 2017). In contrast, the age-dependent loss model makes lower estimates of the force of recruitment into memory (Figure 4, left panels) but predicts more efficient establishment, with newly generated memory having clonal half-lives of 20-40 days and a much greater proportion persisting longer term (Figure 4-figure supplement 1).
Larger memory populations in dirty mice derive from early antigen exposure Given the similarity of the rates of generation of memory in clean and dirty adult mice, and of their rates of turnover, we infer that the larger, relatively stable T CM and T EM populations in dirty mice ( Figure 3A) must derive from their establishment in greater numbers in the first few weeks of life. The differences in compartment sizes in the two environments are then sustained well into adulthood by the very slow loss of these early memory populations.
To explore this hypothesis, we used the parameters estimated in adult mice to predict the development of their CD4 + MP T cell populations early in life. To do this, we drew on measurements of naive and central memory CD4 + T cell numbers recovered from the spleen and lymph nodes of WT mice aged between 5 days and 14 weeks, kept in the clean facility ( Figure 5A). We then used the naive T cell timecourse with the parameters estimated for the best-fitting (age-dependent loss) model of T CM development in clean adult mice, to predict their accumulation of T CM from age 5d onwards ( Figure 5B, left panel), starting from the mean numbers of CD4 + T CM observed at age 5d. The model slightly underestimated T CM numbers in clean adult mice and failed to capture their rapid accumulation up to age 4 weeks. In contrast, using the observed timecourse of T CM in clean WT mice as a source ( Figure 5A, right panel), the establishment of the T EM compartment was predicted remarkably well by the adult parameters from the favoured two-phase model ( Figure 5B, right panel).
To predict the early kinetics of CD4 + MP T cell populations in dirty mice, we first assumed their accumulation of naive T cells closely approximated that in clean mice, given that naive T cell numbers were similar in young adults from the two facilities ( Figure 1B). We then used this timecourse ( Figure 5A, left panel) with the parameters from the best-fitting (age-dependent loss) model of T CM development in adult dirty mice, to predict their kinetics of accumulation. This prediction underestimated T CM numbers at age 14 weeks by a factor of approximately 4 ( Figure 5C, left panel). In turn, using this trajectory as the source of T EM , and using the force of recruitment and loss rates derived from adults, led to a similarly substantial underestimate of their numbers ( Figure 5C, right panel). Predictions using the alternative models in all cases were even poorer; and all predictions were insensitive to the presumed numbers of T CM or T EM at age 5d, which are small and rapidly outnumbered by the influx of new memory cells from their precursor population.
We conclude that to account for memory T cell numbers in adulthood, mice in the clean facility experience a slightly elevated force of recruitment into T CM early in life; and this force is much larger in dirtier mice, presumably deriving from greater levels of exposure to environmental antigens.

Analysis of germ free mice confirms roles for both autoreactive and commensal stimuli in the establishment of memory compartments
We found that the rate of constitutive recruitment into memory in adult mice was insensitive to variations in environmental commensals, and that these antigens must exert their biggest influence on the establishment of MP cells in neonates and young mice. However, earlier studies reported that numbers of memory cells in the spleens of SPF and germ-free (GF) mice are similar and argue that self-recognition is therefore the sole driver of MP cell generation in early life (Kawabe et al., 2017). To reconcile these apparent differences, and dissect the contributions of self and foreign antigens to the establishment of MP T cells in young mice, we compared the size and behaviour of memory CD4 + T cell subsets in C57Bl6/J and/or C57Bl6/SJL mice housed in a wider range of environments. In addition to the clean (UCL) and dirty (NIMR) mice analysed above, we enumerated cells from GF and SPF mice obtained from the Kennedy Institute (KI) in Oxford. Consistent with these earlier studies, substantial numbers of both T CM and T EM MP cells were recovered from GF mice aged between  The timecourses of numbers of CD4 + naive T cells and T CM recovered from the spleen and lymph nodes of wild-type (WT) mice housed in the clean facility at UCL, aged 5 days to 15 weeks. We fitted a descriptor function SðtÞ ¼ S max =ð1 þ e Àrt ðS max À S min Þ=S min Þ to both, using least squares on the log-transformed observations. (B) Using these curves to predict the development of CD4 + T CM and T EM in clean mice using the best-fitting model parameters from adults. Shaded regions indicate the spread of predictions over the 95% confidence intervals of the parameters. The black points (not used for fitting) are the numbers of CD4 + T CM and T EM Figure 5 continued on next page 40 and 200d, confirming that the generation of MP cells does not depend exclusively on commensal-derived foreign antigens ( Figure 6A). However, the memory CD4 + T cell compartments of GF mice, enumerated from spleen and lymph nodes combined, were significantly smaller than in the SPF mice in all facilities. Clean mice from KI and UCL had similar-sized memory compartments, and in turn both were substantially smaller than those in mice from the dirty facility (NIMR) ( Figure 6A). Indeed, the dirty mice played host to around five times the number of MP cells found in GF mice, indicating that antigens from commensal organisms are a substantial driver of MP cell expansion.
We also analysed the proliferative activity of MP cells in mice from the different environments, by measuring the expression of Ki67. Division of MP cells is dependent on TCR (Seddon et al., 2003) and CD28 costimulation signaling (Kawabe et al., 2017). A substantial fraction of MP cells in GF mice expressed Ki67 ( Figure 6B), indicating cell cycle activity within the previous 3-4 days (Gossel et al., 2017). This proportion was broadly similar to that in mice from both clean and dirty environments, indicating that the level of proliferation of CD4 + MP T cells in adult mice was relatively insensitive to environmentally derived stimuli.

Quantifying the forces exerted by commensals on memory generation early in life
Finally, we estimated the rates of memory generation in young mice in the different environments. We began with the favoured age-dependent loss model of T CM dynamics. Using the parameters from clean adult mice (which were similar to those estimated for dirty mice, and for which no estimates were available for GF mice), and the empirical description of CD4 + naive T cell numbers in clean WT mice ( Figure 5A), we then estimated the fold changes in the force of recruitment ' needed during the first 11 weeks of life needed to seed CD4 + T CM at the average numbers observed in the mice aged between 10 and 28 weeks (Figure 7, left panel). CD4 + T CM numbers were relatively stable in all facilities during this period. GF mice needed approximately 0.4 times the force of recruitment in clean adult mice, younger clean mice needed a force approximately 1.1 times greater, and dirty mice required a 2.7-fold increase. As before, uncertainty in memory cell numbers at age 5d had very little effect on the predicted levels of memory attained at week 11, or on these estimated correction factors.
We then used these environment-specific, corrected trajectories of T CM development to predict the accumulation of T EM by age 11 weeks, using the favoured two-phase model. Remarkably, after accounting for the different T CM population sizes, the force of recruitment from T CM to T EM estimated in clean adult mice was also sufficient to account for T EM numbers in all three environments (Figure 7, right panel).
In summary, this analysis showed that approximately 2-to 3-fold increases or decreases in the force of recruitment into CD4 + T CM observed in clean adult (UCL) mice were sufficient to explain their numbers in dirty mice from NIMR or GF mice. However the subsequent rate of development of T EM from T CM appeared to be independent of both mouse age and environment, and differences in the numbers of T EM could be explained simply by the differences in the size of the T CM precursor population. These results suggest that the rate of generation of CD4 + T CM from naive T cells in young mice reflects both self antigens and the level of exposure to environmental antigens, but that the rate of differentiation from T CM to T EM is largely insensitive to these forces.

Discussion
In this study, we compared mice housed in facilities with distinct antigenic burdens to investigate the nature, magnitude and timing of the forces that establish and maintain CD4 + MP T cell compartments. We examined (i) tonic recruitment into the T CM and T EM pools in adults, (ii) the kinetic substructure and maintenance of these compartments throughout life, and (iii) their generation/ establishment early in life. Our analyses indicate that self recognition contributes to all these Figure 5 continued recovered from clean WT mice. (C) Using CD4 + naive T cells from young clean mice as a source, we used the age-dependent loss model of T CM dynamics in adult dirty mice to predict their accumulation (left panel). This trajectory in turn was used to predict the accumulation of T EM in the same mice (right panel).
processes, but that the contribution of reactivity to commensal antigens is largely restricted to the neonatal period.
Our analysis of GF mice, which lack exposure to commensal organisms, confirmed earlier work showing that generation of MP cells in adults is not driven exclusively by foreign commensals (Kawabe et al., 2017) and suggesting that self-recognition is instead the key driver. GF mice are not entirely free of environmental antigens and it is possible that proteins in bedding material and diet could represent foreign antigenic stimuli. However, the argument for self-recognition is made *** *** Figure 6. Comparing the numbers and proliferative activity (panels A and B respectively) of CD4 + T CM and T EM in adult mice, in different SPF and GF facilities. Cross-hatched bars denote busulfan chimeras, solid bars denote WT mice. NIMR (red bars) and UCL (blue bars) are the 'dirty' and 'clean' facilities used for the bulk of the analysis presented here. 'ND' denotes data not available. * p < 0.05, ** p < 0.01, *** p < 0.001, using the Mann-Whitney test. Group sizes: Panels A; (28,0,78,98,4,14) and (46,11,78,98,4,14). Panels B; (0,0,74,140,4,14) and (18,4,74,140,4,14).
through the correlation of the degree of MP cell conversion and steady state proliferation with affinity for self-MHC, as indicated by CD5 expression. We also found that memory CD4 + T cell division, as reported by Ki67, was substantial and largely independent of the level of commensals. We could not determine the extents to which Ki67 expression derived from the homeostatic proliferation of existing cells or the influx of newly generated (and recently divided) MP cells. However, the common levels of Ki67 across environments, together with our findings from the adult clean and dirty chimeric mice that the rates of memory generation and net loss were insensitive to environment, support our conclusion that self-recognition is the major driver of both recruitment and proliferative renewal in adult memory compartments. Commensals did, however, have a substantial impact upon the sizes of the memory compartments generated early in life. CD4 + T CM and T EM numbers in mice raised in dirty environments were 3-5 times greater than those in either GF or cleaner IVC or SPF facilities, and these differences could be explained by differences in the forces of recruitment of CD4 + T CM during ontogeny. The estimated seven-fold difference in this force between GF and dirty mice prompts the simple interpretation that self-recognition only accounts for~14% of the memory compartment in dirty mice.
We ascribe differences in memory compartment sizes to different commensal burdens, but it is possible that their smaller sizes in GF mice also derive from their smaller lymph nodes. Bacterial stimulation of DCs is required for their migration into lymph nodes, and these DCs are required for their normal development (Wendland et al., 2011;Moussion and Girard, 2011;Zhang et al., 2016). Therefore, it is not straightforward to separate the indirect influence of commensals on lymphoid development from any direct influences upon memory generation. It is also possible that some of the additional force of recruitment in neonates derives not from commensals but from lymphopenia, which can drive naive T cells to acquire a memory phenotype (Min et al., 2003). However, this process was demonstrated by transferring naive cells from adults into very young mice; it is possible that such naive cells do not represent the activity of neonatal naive T cells, which are almost exclusively recent thymic emigrants.
We observed that environment not only impacted memory but also naive T cells. Their numbers naturally decline with age, but this decline was almost twice as fast in dirty mice than in genetically identical mice housed in cleaner facilities (Figure 1-figure supplement 2A; numbers halve every 228d (95% CI 227-231) in clean mice, and 143d (142-144) in dirty mice). This difference likely derives from a more rapid reduction in thymic output with age in the dirty environment, and not differences . Modelling the ontogeny of CD4 + memory T cell subsets in different facilities. Using the timecourse of CD4 + naive T cell numbers in young clean WT control mice ( Figure 5A), and the parameters estimated in clean adult mice, we estimated the corrections to the force of recruitment ' needed from birth to age 11 weeks to generate the mean numbers of T CM in adults aged 10-28 weeks in each environment (left panel). These corrected T CM trajectories, together with the force of recruitment and loss rates estimated from clean adult mice, predicted the accumulation of CD4 + T EM up to age 11 weeks in all three environments (right panel).
in lifespans of CD4 + naive T cells in the two environments, because we see similar rates of decline in the numbers of single positive thymocytes at the latest stage of thymic development (halving every every 282d (281-308) in clean mice, 151d (150-159) in dirty mice; data not shown). Therefore, it appears that another consequence of life in a more antigenically diverse environment is more rapid involution of the thymus. It is possible that this effect derives from the stress or inflammation associated with an increased commensal burden, or is somehow a consequence of expanded memory populations; but whatever the mechanism, our data clearly indicate that environmental factors can impact the maintenance of naive T cells.
Our models do not incorporate any homeostatic regulation in the sense of modulation of rates of division or loss through quorum sensing. Since memory cell numbers only vary by a factor of 2-3 between clean and dirty mice, we did not expect to detect any strong variation in net loss rate with pool size with these data, and indeed our estimates of loss rates were similar in the two environments. While we cannot rule it out at higher cell densities, there is arguably little evidence for homeostatic regulation of circulating memory T cells in SPF mice. We observed a range of relatively stable memory compartment sizes in the different containment facilities; these memory compartments do not appear to fill up rapidly with large clones in very young mice, which might occur if division or loss rates are sensitive to total pool size; and they appear to be expandable following multiple infections in older animals (Vezys et al., 2009).
The models yielded robust conclusions regarding the nature and magnitudes of the forces generating CD4 + T CM and T EM , and the existence of heterogeneity within both subsets, consistent with previous reports by ourselves and others of subpopulations of CD4 + MP cells with distinct rates of division and turnover (Younes et al., 2011;Gossel et al., 2017). However, these models are abstractions, and resolving the details of kinetic substructure in lymphocyte populations is challenging (Ganusov et al., 2010). For CD4 + T CM in adult mice we found evidence for slow and continuous changes in their net loss rates as cells age, and additional support for such a process comes from the slow rate at which Ki67 levels in donor and host memory cells converge in adult busulfan chimeras. In contrast, the data for T EM in adult mice, and the predictions of their accumulation in younger mice, more strongly supported a discrete two-phase model with a relatively rapid transition from fast to slow memory. Our previous study of CD4 + T CM and T EM homeostasis in adult mice used short-term BrdU labelling to identify populations in both subsets that divide and die rapidly (Gossel et al., 2017), although in that study we assumed the proliferative and more quiescent pools were maintained independently and so it is not straightforward to compare the rate estimates with those presented here. Overall, although, it seems likely that both MP cell subsets are more heterogeneous than any one of our models suggests. Indeed, there are other potential sources of heterogeneity. One possibility is that MP T cells are generated with a distribution of net loss rates, and those clones with greater intrinsic fitness (lower net loss rates) are simply selected for over time. Such a mechanism -a generalisation of the simple 'resistant memory' model we rejected herecould explain the under-representation of donor cells in the memory compartments of busulfan chimeric mice, and may be difficult to distinguish from our model of gradual changes in fitness with cell age; indeed the two mechanisms are not mutually exclusive. Characterising the homeostatic dynamics of CD4 + memory T cells, and ultimately how these dynamics relate to their functional capacity, requires further study.

Generating busulfan chimeric mice
Mice were treated with optimised low doses of busulfan to deplete HSC but leave peripheral T cell subsets intact. HSC were reconstituted with congenically labelled, T-cell depleted bone marrow to generate stable chimeras ( Figure 1A). Details of the protocols are given in Hogan et al. (2017b) and Hogan et al. (2017a).

Mice
Busulfan chimeric mice and wild-type control mice were housed in conventional animal facilities, either at the National Institute for Medical Research, London, UK (NIMR); or at the UCL Royal Free Campus, London, UK (UCL). At NIMR, mice were housed in open cages and drank tap water. At UCL, mice were housed in individually ventilated cages and drank irradiated water. Germ Free and SPF mice were housed at the Oxford Centre for Microbiome Studies, Oxford, UK.
Modelling the fluxes between naive, central memory and effector memory CD4 + subsets The homogeneous model Our simplest description of the kinetics of the generation and renewal of CD4 + T CM and T EM is illustrated in Figure 2A and was formulated as follows. We assume that cells flow into a memory subset of total size MðtÞ from a precursor population SðtÞ at total rate 'SðtÞ, where t is the age of the animal. The rate constant ' is the 'force of recruitment', a compound parameter which is the product of the per capita rate of recruitment of cells from the source population per day multiplied by number representing any net expansion that occurs during recruitment. Memory is also lost at net per capita rate l. This rate is the balance of loss through death and/or differentiation, and any compensatory cell production through division. It represents the rate of decline or growth of a population that selfrenews to any extent, rather than the loss rate of individual cells. We place no constraints on this rate, and so l may be positive or negative.
We assume host and donor cells each obey the same kinetics, so that dM host ðtÞ dt ¼ 'S host ðtÞ À lM host ðtÞ (2) dM donor ðtÞ dt ¼ 'S donor ðtÞ À lM donor ðtÞ; where the total population size is MðtÞ ¼ M donor ðtÞ þ M host ðtÞ. Our strategy for parameter estimation was to fit this model simultaneously to the timecourses of total numbers of memory cells MðtÞ, and the donor chimerism within memory, M ðtÞ, which is the fraction of cells in memory that are donorderived. For reasons detailed below, we normalise this fraction to the proportion of early doublepositive (DP1) thymocytes that are donor-derived, which is measured in the same mouse and denoted DP1 ; Equations (2) and (3) If observations are made sufficiently long after BMT (more than 3-4 weeks), chimerism among DP thymocytes can be assumed to have stabilised (Hogan et al., 2015) By normalising the chimerism of both the source and the memory populations to that in the thymus, we remove any variation in these quantities due to variation across individuals in the degree of chimerism achieved with busulfan treatment and BMT.
Fitting required initial conditions for the total numbers of memory cells and donor chimerism. We solved all of the models from host age t 0 , which was chosen to be the time at which donor chimerism in memory for the mouse with the youngest age at BMT could be assumed to be zero and donor chimerism in DP1 had stabilised. This was host age 66d for the clean mice and 84d for dirty mice (26d and 28d post-BMT, respectively). Our results were insensitive to changes of a few days in these baseline ages. We also required functional forms for the kinetics of the immediate precursor (source) population SðtÞ and source;norm ðtÞ. When considering CD4 + naive T cells as a source, their numbers from age t 0 onwards in both facilities were well described with an exponential decay curve, SðtÞ ¼ Sðt 0 Þe Ànt , though with different exponents (Figure 1-figure supplement 2A). With this form, we can solve Equation (1) for MðtÞ explicitly; ¼ Mðt 0 Þe lðt0ÀtÞ þ 'Sðt 0 Þ l À n ðe Ànt À e lðt0ÀtÞÀnt0 Þ: Using this expression for MðtÞ in Equation (6) The rate of increase in donor chimerism in memory then depends on the force of recruitment ', the dynamics and chimerism of the source (Sðt 0 Þe Ànt and source;norm ðtÞ), the initial memory pool size Mðt 0 Þ, and the net loss rate l. Note that Equation (10) predicts that given sufficiently long, and if the rate of decline of naive T cells is less than the rate of loss of memory (n<l), the chimerism in memory will stabilise at the chimerism of CD4 + naive T cells.
When considering T CM as a source for T EM in clean and dirty mice, we described SðtÞ with sigmoid and exponential decay functions, respectively (Figure 1-figure supplement 2B). We described each source's chimerism with the generalised logistic function (Figure 1-figure supplement 2C and D).
The homogeneous model is characterised by the three unknowns Mðt 0 Þ, l and '. To estimate them for a given subset, location and source population we solved Equations (1) and (6) numerically and fitted them simultaneously to the timecourses of total numbers and normalised chimerism of the memory subset, using a method detailed below. The clean mice underwent BMT at a range of ages, which were accounted for individually in the fitting; model predictions for a mouse which underwent BMT at age t B and was observed at age t were generated by running the model from host age T ¼ t b þ 26d (clean) or t b þ 28d (dirty) to time t; with MðTÞ calculated from Mðt 0 Þ using Equation (8), and the normalised chimerism at time T assumed to be zero. qMðt; aÞ qt þ qMðt; aÞ qa ¼ ÀlðaÞMðt; aÞ; where the population density of cells of age zero is the rate at which cells flow into memory from the source, and we must specify the overall population density with respect to cell age Mðt 0 ; aÞ ¼ gðaÞ at some initial mouse age, t 0 . As with the other models, we assumed all cells present at t 0 are host-derived; we model their age distribution as gðaÞ ¼ 'Sðt 0 Þ e pa . The free parameter p could be positive or negative, such that older cells can initially be over-or under-represented compared to younger cells. This definition ensures gð0Þ is the rate of influx of cells of age zero from the source at time t 0 , 'Sðt 0 Þ. We explored exponential (lðaÞ ¼ l 0 e Àa=A ) and sigmoid (lðaÞ ¼ l 0 =ð1 þ ða=AÞ n Þ) forms for the dependence of the net loss rate l on cell age, with n = 1, 2, 3, 5 and 10. We found that n ¼ 3 consistently yielded the best fits, with the exponential performing the most poorly.
Solving this system using the method of characteristics allows us to track the fates of three cell populations -the host-derived population that was present at t 0 (M init host ðt; aÞ), and host-and donorderived cells that entered the population after t 0 (M new host ðt; aÞ and M donor ðt; aÞ). Total memory cell numbers at t ! t 0 are then We fitted Equations (20) and (21) to the timecourses of their observed counterparts from host age t 0 onwards. This model has four free parameters; p and ', which, together with the observed value of Sðt 0 Þ, specify the initial age distribution of host cells, gðaÞ ¼ 'Sðt 0 Þe pa ; and l 0 and A, which specify the form of lðaÞ. The parameters p and ' then determine the initial number of host-derived memory cells; M total ðt 0 Þ Z t0 0 gðaÞda ¼ 'Sðt 0 Þðe pt0 À 1Þ=p: As described above, this model was fitted simultaneously to data from mice who underwent BMT at different ages, replacing t 0 in Equation (21) with the age at BMT plus 26d or 28d for clean and dirty mice, respectively.

Resistant memory model
In this model, proposed in Gossel et al. (2017), the CD4 + T CM and T EM populations are assumed to be heterogeneous, each consisting of a 'displaceable' subset turning over at rate l and continuously supplemented from the source, and an 'incumbent' or 'resistant' population of host memory cells, I host ðtÞ; these are assumed to be established early in life, not supplemented thereafter, and have a distinct net loss rate l I : All donor-derived cells are assumed to be displaceable and obey the same kinetics as displaceable host-derived cells. We solved Equation (23) For simplicity, we assumed that resistant memory cells were stable in number (l I ¼ 0). The resistant memory model then has four free parameters (M total ðt 0 Þ, I host ðt 0 Þ, ', l). Multiple ages at BMT were handled as described for the homogeneous model.

Parameter estimation and model selection
Each model (with its parameter set denoted b) was fitted simultaneously to the timecourses of total memory cell numbers M i and the normalised chimerism norm;i , i ¼ 1 . . . n, for a given source population (naive/T CM ) and environment (dirty/clean). The cell counts and chimerism values were log-and arcsin-square root-transformed, respectively, such that these new variables (denoted x and y) could be assumed to have normally distributed errors with constant variances s 2 x and s 2 y . We then maximised the joint likelihood of x and y with respect to the model parameters b, and the unknown s x and s y . If X i ðbÞ and Y i ðbÞ are the model predictions of the transformed observations x i and y i respectively, this likelihood is where SSR denotes the sum of squared residuals, and both SSR x and SSR y are functions of the parameters b. The log-likelihood is then To reduce the number of unknowns to be estimated with a parameter search, we substituted the maximum likelihood estimates of the error variances, which can be calculated directly; (and similarly forŝ y ), giving the following expression for the joint log-likelihood, ln L ¼ À n 2 ln SSR x Â SSR y À Á À 2n: This quantity was then maximised with respect to the parameters b using the scipy.optimize package in Python. We used the best-fitting model predictions to estimate 95% confidence intervals on parameters by bootstrapping residuals 1000 times, re-fitting and taking the 2.5% and 97.5% quantiles of the resulting distributions of parameter estimates.
For each model and source, we performed the above procedure separately for data from the clean and dirty environments, and calculated a combined, maximum log likelihood ln L combined ¼ ln L clean þ ln L dirty . We then used the corrected Akaike Information Criterion, AICc (Akaike, 1974;Burnham and Anderson, 2002) to assess the relative support for each model/ source pairing, where Here, K is the total number of estimated parameters, which was double the number of parameters in each model (one set for clean and another for dirty); and N is the total number of observations, which was 2 Â the number of mice in the clean facility + 2 Â the number in the dirty facility (each mouse yielded two measurements for each memory subset -total cell numbers, and donor chimerism).
. Transparent reporting form

Data availability
The code for mathematical models has been deposited on GitHub (https://github.com/marianowicka/memory-CD4-and-dirt; copy archived at https://github.com/elifesciences-publications/memory-CD4-and-dirt), and raw cell counts used for model fitting are provided as source data files, as featured in figures 1, 5 and 7.