## Abstract

To develop vaccines it is mandatory yet challenging to account for inter-individual variability during immune responses. Even in laboratory mice, T cell responses of single individuals exhibit a high heterogeneity that may come from genetic backgrounds, intra-specific processes (*e.g.* antigen-processing and presentation) and immunization protocols.

To account for inter-individual variability in CD8 T cell responses in mice, we propose a dynamical model and a statistical, nonlinear mixed effects model. Average and individual dynamics during a CD8 T cell response are characterized in different immunization contexts (vaccinia virus and tumor). We identify biological processes more likely to be affected by the immunization and those that generate inter-individual variability. The robustness of the model is assessed by confrontation to new experimental data.

Our approach allows to investigate immune responses in various immunization contexts, when measurements are scarce or missing, and contributes to a better understanding of inter-individual variability in CD8 T cell immune responses.

**Author summary** Developments of vaccines and therapies based on the immune response require to understand inter-individual variability, that is variations observed in responses of individuals subject to the same immunizations. These variations may originate from genetic backgrounds, intra-specific processes and immunization protocols. We propose a mathematical framework to describe and investigate inter-individual variability in CD8 T cell responses in mice. It consists in coupling a dynamical model of CD8 T cell response and an original statistical model of inter-individual variability. We characterize individual mice dynamics in response to vaccinia virus and also tumor cells inoculation. In addition we identify biological processes more likely to be affected by the immunization and those that generate inter-individual variability. Our work provides a framework to investigate immune responses in various immunization contexts, when measurements are scarce or missing as is often the case. It contributes to a better understanding of variability and its biological causes in CD8 T cell immune responses, and can be applied to various immune responses provided that appropriate data are available.

## Introduction

The immune response is recognized as a robust system able to counteract invasion by diverse pathogens (Fischer and Raussel, 2016; Wong and Germain, 2018). However, as a complex biological process, the dynamical behavior of its cellular components exhibits a high degree of variability affecting their differentiation, proliferation or death processes. Indeed, the frequency of antigen-specific T cells and their location relative to pathogen invasion will affect the dynamic of the response (Estcourt et al., 2005; Wong and Germain, 2018; Xiao et al., 2007). Similarly, the pathogen load and virulence as well as the host innate response will affect the T cell response (Iwasaki and Medzhitov, 2015). Finally, at the cellular level, variation in protein content can also generate heterogeneous responses (Feinerman et al., 2008). Genetic variability of the numerous genes controlling the immune response will also be a source of variability among individuals (Fischer and Raussel, 2016). Even among genetically identical individuals, the response to the same infection can result in highly heterogeneous dynamics (Althaus et al., 2007; Grau et al., 2018; Murali-Krishna et al., 1998).

Cytotoxic CD8 T cells play an essential role in the fight against pathogens or tumors as they are able to recognize and eliminate infected or transformed cells. Indeed, following encounter of antigen-presenting cells loaded with pathogen or tumor derived antigens, in lymphoid organs, quiescent naive CD8 T cells will be activated. This leads to their proliferation and differentiation in effector cells that have acquired the capacity to kill their targets, and to their ultimate differentiation in memory cells (Crauste et al., 2017; Youngblood et al., 2017). The CD8 T cell immune response is yet a highly variable process, as illustrated by experimental measurements of cell counts: dynamics of the responses (timing, cell counts) may differ from one individual to another (Miller et al., 2008; Precopio et al., 2007; Xiao et al., 2007), but also depending on the immunogen (Althaus et al., 2007; Estcourt et al., 2005; Murali-Krishna et al., 1998).

The role of genome variability in explaining inter-individual variations of T cell responses has been recently investigated (Ferraro et al., 2014; Li et al., 2016) but provided limited understanding of the observed heterogeneity. Li et al. (2016) focused on correlations between gene expression and cytokine production in humans, and identified a locus associated with the production of IL-6 in different pathogenic contexts (bacteria and fungi). Ferraro et al. (2014) investigated inter-individual variations based on genotypic analyses of human donors (in healthy and diabetic conditions) and identified genes that correlate with regulatory T cell responses.

To our knowledge, inter-individual variability characterized by heterogeneous cell counts has been mostly ignored in immunology, put aside by focusing on average behaviors of populations of genetically similar individuals. The use of such methodology, however, assumes that variability is negligible among genetically similar individuals, which is not true (Althaus et al., 2007; Badovinac et al., 2007; Crauste et al., 2017).

In this work, we propose to study inter-individual variability based on CD8 T cell counts with nonlinear mixed effects models (Delyon et al., 1999; Kuhn and Lavielle, 2005; Lavielle, 2014). In these models, instead of considering a unique set of parameter values as characteristic of the studied data set, a so-called *population approach* is used based on distributions of parameter values. All individuals are assumed to be part of the same population, and as so they share a common behavior (average behavior) while they keep individual behaviors (random effects). Nonlinear mixed effects models are well adapted to repeated longitudinal data. They aim at characterizing and understanding “typical behaviors” as well as inter-individual variations. T cell count measurements, obtained over the course of a response (few weeks), and the large variability they exhibit represent a case study for this approach.

Nonlinear mixed effects models have been used to analyze data in various fields (Davidian and Giltinan, 2003), especially in pharmakokinetic studies, and more recently to model cell to cell variability (Almquist et al., 2015; Llamosi et al., 2016) or to study tumor growth (Benzekry et al., 2014; Ferenci et al., 2017). In immunology, Keersmaekers et al. (2018) have recently studied the differences between two vaccines with nonlinear mixed effects models and ordinary differential equation (ODE) models for T and B cells. Jarne et al. (2017) and Villain et al. (2018) have used the same approach to investigate the effect of IL7 injections on HIV+ patients to stimulate the CD4 T cell response, and have identified biological processes accounting for inter-individual variability.

A number of models of the CD8 T cell response based on ODEs have been proposed over the years. Of particular relevance here is the work of De Boer et al. (2001), where the model accounts for activated and memory cell dynamics but the influence of the immunogen is imposed. Antia et al. (2003) proposed a model based on partial differential equations, that includes immunogen effects and dynamics of naive, effector and memory cells. These works describe different subpopulations of CD8 T cells, however most of the time only total CD8 T cell counts are available to validate the models. In Crauste et al. (2017), the authors generated cell counts for four subpopulations of CD8 T cells in mice that they used to identify the most likely differentiation pathway of CD8 T cells after immunogen presentation. This approach has led to a model of the average CD8 T cell dynamics in mice after immunization and its representation as a set of nonlinear ODEs. The model consists in a system of ODEs describing the dynamics of naive, early effector, late effector, and memory CD8 T cell subsets and the immunogen.

The goal of this article is to explore the ability of a mathematical model to describe the inter-individual variability observed in CD8 T cell responses, in different immunization contexts, by considering parameter values drawn from probability distributions (nonlinear mixed effects model). Starting from the model published in (Crauste et al., 2017), we will first select a model of the CD8 T cell immune response dynamics accounting for variability in cell counts by using synthetic then experimental data, generated in different immunization contexts. Second we will establish that the immunogen-dependent heterogeneity influences the early phase of the response (priming, activation of naive cells, cellular expansion). Finally, we will show that besides its ability to reproduce CD8 T cell response dynamics our model is able to predict individual dynamics of responses to similar immunizations, hence providing an efficient tool for investigating CD8 T cell dynamics and inter-individual variability.

## Results

### Model selection on synthetic data

In Crauste et al. (2017), System (3) (see Section Models of CD8 T cell dynamics) has been shown to be able to describe average dynamics of CD8 T cell immune responses, when CD8 T cells go through 4 differentiation stages: naive, early- then late- effector cells, and memory cells (see Section Data). Here System (3) is reduced in order to obtain a mixed effect model of CD8 T cell immune response whose parameters are correctly estimated on ideal data. Ideal data are generated by simulating ODE models and accounting for more individuals and time points than with real, biological data: we call them”synthetic data”, see Section Model selection on synthetic data.

We use Synth data sets 1 to 4 (Table 1) to reduce System (3). Parameter estimation is performed with SAEM algorithm (Monolix, 2019), see Section Parameter estimation. Using the procedure described in Section Model selection on synthetic data, based in particular on the use of the relative standard error (RSE) defined in (4) that informs on the confidence in the estimation, we iteratively remove parameters (see Table S2)

(estimated value = 0.2 *vs* true value = 1.8 cell^{−1} day^{−1}, RSE = 61%),

(estimated value = 0.3 *vs* true value = 3.6 cell^{−1} day^{−1}, RSE = 17%), and

*μ*_{I} (estimated value = 0.013 *vs* true value = 0.055 day^{−1}, RSE = 9%).

They are all related to death rates, of late effector cells and of the immunogen . In each case, the model still accounts for death of late effector cells and of the immunogen, *via* parameters and . Nonlinear mixed effects models avoid redundancy in the description of biological processes, thus they allow reliable parameter estimation using synthetic data. Parameter values are available in Table S1.

This leads to a reduction of the initial 12-parameters System (3) to the 9-parameters System (1),

For the sake of simplicity the parameters are renamed in System (1): and . Fig 1.A displays a schematic representation of System (1).

### A model of CD8 T cell dynamics accounting for *in vivo* inter-individual heterogeneity

Biological data from VV data set 1 (see Section Data) are confronted to System (1). Parameter estimation is performed using the SAEM algorithm (Monolix, 2019) and, following the procedure described in Section Model selection on biological data, leads to further reduction of the model. Using *in vivo* data to estimate parameter values provides a priori less information than synthetic data. Hence, it might be necessary to reduce the number of parameters to ensure correct estimations, either mean values or random effects, similarly to what has been done in the previous section.

The first step in the model reduction procedure leads to an estimated value of parameter *µ*_{L} close to zero (2 × 10^{−8} cell^{−1} day^{−1}), with a RSE *>* 100%, see Table 2,

*Step 1*. Hence parameter *µ*_{L} is removed, and the estimation is performed again with the updated model. We observe that all mean value parameters have now RSE *<* 30%, so we conclude that their estimations are reliable (Table 2, *Step 2*).

In the second step of the procedure however, several random effects have large RSE and high shrinkages (Table 2, *Step 2* to *Step 5*). The shrinkage is defined in (5) as a measure of the difference between the estimated variance of a parameter and the empirical variance of its random effect. Parameter *δ*_{LM} has the worst RSE and the largest shrinkage (99%), so we remove the random effect of *δ*_{LM}. Estimating parameter values with the updated reduced model leads to removing successively random effects of *δ*_{EL} (RSE = 138%, shrinkage = 95%), *ρ*_{E} (shrinkage = 97%), and *µ*_{N} (shrinkage = 84%). At each step, RSE of mean value parameters are low, and quality of individual fits is preserved.

The resulting model, System (2) (see Fig 1.B), comprises 8 parameters, 4 of them vary within the population (*δ*_{NE}, *µ*_{E}, *ρ*_{I}, *µ*_{I}) and 4 are fixed within the population (*µ*_{N}, *ρ*_{E}, *δ*_{EL}, *δ*_{LM}):

Bars highlight fixed parameters within the population. This system enables to describe VV data set 1 and its inter-individual variability. The inter-individual variability is entirely contained in the activation rate of naive cells (*δ*_{NE}), the mortality-induced regulation of effector cells (*µ*_{E}), and the dynamics of the immunogen (*ρ*_{I} and *µ*_{I}).

Fig 2.A shows the good agreement between model predictions and individual measurements for each CD8 T cell subpopulation. Model predictions are obtained from numerical simulations of System (2) performed with estimated individual parameter values. Despite over- or under-estimation of some individual observations, the 90th percentile of the difference between observed and predicted values (dashed line) shows that most experimental cell counts are efficiently predicted (estimated errors are relatively small for all subpopulations: *a*_{N} = *a*_{M} = 0.3 log10(cells), *a*_{E} = *a*_{L} = 0.4 log10(cells)). Parameter values are given in Table 3.

Fig 3 shows the estimated dynamics of early- and late-effector and memory cells of two individuals. One individual (Fig 3.A) was monitored on days 7, 15 and 47pi leading to three measurements points for late effector cells and two for early effector and memory cells. Estimated dynamics are in agreement with what is expected, especially regarding the time and height of the peak of the response and the following contraction phase. The other individual (Fig 3.B) had cell count measurements only on day 8pi, yet the estimated dynamics correspond to an expected behavior. This could not have been obtained by fitting this individual alone. Hence we are able to simulate likely dynamics even with a small amount of data points, thanks to the use of nonlinear mixed effects models and the parameter estimation procedure. By focusing first on the population dynamics (based on a collection of individual dynamics), the method enables to recover the whole individual dynamics. This is a huge advantage when data sampling frequency is low.

Similar good results are obtained for Tumor data set 1 (see Fig 2.B and parameter values in Table 3). Therefore System (2) enables to describe inter-individual variability in different immunization contexts, here VV and Tumor immunizations, and with only few data points per individual.

Estimated parameter values obtained with System (2) for VV or Tumor data sets are in the same range as in the estimation previously performed on average cell counts on a similar experimental set (VV immunization, Crauste et al. (2017)), see Table 3. Some differences are observed for estimated values of differentiation rates, yet for the 3 estimations (VV data set 1, Tumor data set 1, Crauste et al. (2017)) parameter values remain in the same order of magnitude, indicating consistency between the two studies. Estimated values of parameter *δ*_{NE} show the largest relative differences. Yet, the largest difference is observed between VV and Tumor data sets obtained with System (2), rather than between these values and the one obtained in Crauste et al. (2017). This may highlight a potential difference in the capacity of the two immunogens (VV and Tumor) to activate naive cells. This is investigated in the next section.

### Immunization-dependent parameters

#### Parameter comparison between immunizations

VV and Tumor induced immunizations differ in many aspects. VV immunizations are virus-mediated, use the respiratory tract to infect cells, and trigger an important innate response. Tumor immunizations involve eukaryotic cells bearing the same antigen, use subcutaneous routes, and induce a reduced innate response. From the independent estimations on VV and Tumor data sets (Table 3), we compute differences between estimated values of fixed effects. Differences are large for parameters – in decreasing order , and . These large differences may result from biological processes involved in the CD8 T cell response that differ depending on the immunogen.

Consequently, combining both data sets (VV and Tumor) as observations may highlight which parameters have to be significantly different to describe both data sets.

#### Parameters depending on immunization

To perform this analysis, we combine VV and Tumor data sets 1 and we include a categorical covariate into the model to estimate parameter values (see Section Parameter estimation). Covariates allow to identify parameter values that are significantly different between two CD8 activation conditions (tumors *vs* virus).

A covariate is added to the fixed effects of the five parameters that showed the larger differences in the initial estimation: , and . This results in the estimation of two different parameter values for parameters and (that are fixed within the population) and two probability distributions with different mean values for parameters *δ*_{NE} and *ρ*_{I} (that vary within the population).

One may note that adding a covariate increases the number of parameters to estimate. However, the number of parameters is not doubled, since we assumed that parameters without covariates are shared by both immunization groups. In addition, the data set is larger, since it combines VV and Tumor measurements. Hence the number of parameters with respect to the amount of data remains reasonable.

From this new estimation, we conclude that among the five selected parameters the covariates of only four of them are significantly different from zero: , and (Wald test, see Table S3 and Section Parameter estimation). The estimation is therefore performed a second time assuming *ρ*_{I} distribution is the same in both groups. Then the Wald test indicates that the remaining covariates are significantly different from zero (Table 4).

Fig 4 shows the estimated distribution for parameter *δ*_{NE} that varies within the population and for which we included a covariate. Histograms display the estimated individual parameter values of *δ*_{NE}. They show two distinct distributions of *δ*_{NE} values, corresponding to VV (red)- and Tumor (green)-associated values. The histograms and the theoretical distributions are in agreement.

Table 4 gives the estimated values of all parameters in both groups. Regarding parameters that do not vary within the population, it is required for parameters and to be different to describe each data set, and this difference is accounted for with a covariate parameter. Noticeably, using categorical covariates mostly improves the confidence in the estimation, as highlighted by either RSE values in the same range or improved (all other parameters) RSE values (Tables 3 and 4).

In summary, we identified parameters whose values are significantly different according to the immunogen used to activate CD8 T cells. These parameters correspond to the dynamics of naive cells , their activation (*δ*_{NE}), the proliferation of early effector cells , and differentiation to memory cells . We hence conclude that different immunizations affect the CD8 T cell activation process in the first phase of the response (priming, activation of naive cells, expansion of the CD8 T cell population) as well as the development of the memory population, and induce various degrees of variability in these responses through the activation of naive cells.

### Predicting dynamics following VV and Tumor immunizations

To challenge System (2) and the estimated parameters (Table 4), we compare simulated outputs to an additional data set, not used for data fitting up to this point, of both VV and Tumor immunizations, VV data set 2 and Tumor data set 2 (Table 1 and Section A posteriori model validation on biological data).

We already know the probability distribution of parameters (Table 4), so we only estimate individual parameters in order to fit individual dynamics. Results are shown in Fig 5, for both VV data set 2 and Tumor data set 2. It is clear that estimated individual dynamics are consistent with previous individual dynamics estimations. Hence, we validate System (2) and values estimated in both VV and Tumor immunization contexts by showing that estimated parameter values allow to characterize CD8 T cell counts obtained in similar contexts.

## Discussion

When following an *in vivo* immune response, experimental measurements are often limited by either ethical issues or tissue accessibility. Consequently, one often ends up measuring cell counts in peripheral blood on a restricted number of time points per individual, over the duration of a response (see Fig 3). With such data, estimation of all model parameters becomes unlikely. Using nonlinear mixed effects models, we propose a dynamical model of CD8 T cell dynamics that circumvents this difficulty by assuming that all individuals within a population share the main characteristics. The model allows the accurate description of individual dynamics, even though individual measurements are scarce. Indeed, we are able to obtain both good fits and relevant dynamics for individuals with only few cell count measurements, as illustrated in Fig 3. These results indicate that knowledge of population dynamics parameters and numerical simulations complement information given by experimental measurements.

Starting from the model described in Crauste et al. (2017) that could efficiently describe CD8 T cell dynamics, at the level of average population cell-counts in peripheral blood, we built and validated this nonlinear mixed effects model in a step-wise fashion. The system was first reduced to ensure correct parameter estimation when confronted to ideal, highly informative data. We next identified parameters – hence biological processes – that vary between individuals, and parameters that can be fixed within the population to explain biological data measured in different immunization contexts (virus and tumor). Finally, by adding a categorical covariate we identified immunization-dependent parameters.

Noteworthy, from a biological point of view, the removal of one parameter during model reduction (for example, the death rate of late effector cells) must not be understood as if the corresponding process is not biologically meaningful. Based on the available data, our methodology found that some processes are non-necessary in comparison with the ones described by the system’s equations.

Similarly, parameters characterizing immunogen dynamics vary within the population whereas model reduction led to remove the variability of equivalent processes (proliferation for instance) in CD8 T cell dynamics. It is likely that this is due to a lack of experimental measures on immunogen dynamics (whether virus load evolution or tumor growth), and one cannot conclude that inter-individual variability mostly comes from immunogen dynamics. Information on immunogen dynamics, when available, could significantly improve parameter estimation and help refining the information on inter-individual variability during CD8 T cell responses.

In our biological data, inter-individual variability is explained only by variability in the activation rate of naive cells, the mortality rate of effector cells, and dynamics (proliferation and death) of the immunogen. The former is actually in good agreement with the demonstration that in diverse infection conditions the magnitude of antigen-specific CD8 T cell responses is primarily controlled by clonal expansion (van Heijst et al., 2009).

Two of the three differentiation rates (early effector cell differentiation in late effector cells, and late effector cell differentiation in memory cells) do not need to vary to describe our data sets. This robustness of the differentiation rates is in good agreement with the auto-pilot model that shows that once naive CD8 T cells are activated their differentiation in memory cells is a steady process (Kaech and Ahmed, 2001; Stipdonk et al., 2001).

Eventually, using nonlinear mixed effects models and an appropriate parameter estimation procedure, we were able to quantitatively reproduce inter-individual variability in two different immunization contexts (VV and Tumor) and provide predictive population dynamics when confronted to another data set (for both immunogens). This demonstrates the robustness of the model.

The addition of a categorical covariate allowed us to identify parameters that are immunization-dependent. Interestingly they control the activation of the response (priming, differentiation of naive cells, expansion of effector cells) as well as the generation of memory cells. This is again in good agreement with the biological differences that characterize the two immunogens used in this study. Indeed, pathogen-associated molecular patterns (PAMP) associated with vaccinia virus will activate a strong innate immune response that will provide costimulatory signals that in turn will increase the efficiency of naive CD8 T cell activation (Iwasaki and Medzhitov, 2015). In contrast, when primed by tumor cells CD8 T cells will have access to limited amount of costimulation derived from damage associated molecular patterns (Yang et al., 2017). The amount of costimulation will also control the generation of memory cells (Mescher et al., 2006). Focusing on average CD8 T cell behaviors (not shown) highlights stronger responses following VV immunization, characterized by a faster differentiation of naive cells and a higher peak of the response (at approximately 3 × 10^{5} cells compare to 10^{5} cells for the Tumor induced response). Also, in average, more memory cells are produced following VV immunization. Hence the addition of covariates to the model parameters has allowed to identify biologically relevant, immunogen-dependent parameters.

Using covariates has additional advantages. First, they allow to consider a larger data set (in our case, the combination of two data sets) without adding too many parameters to estimate (4 covariates in our case). This is particularly adapted to situations where only some parameters are expected to differ depending on the data set (here, the immunogen). Second, and as a consequence, data fits may be improved compared to the situation where data sets generated with different immunogens are independently used to estimate parameters. Fig 6 illustrates this aspect: dynamics of two individuals are displayed, with and without covariate. In both cases using the covariate (and thus a larger data set) improved the quality of individual fits, and in the case of Individual 1 generated more relevant dynamics with a peak of the response occurring earlier, before day 10pi. No individual fit has been deteriorated by the use of a covariate (not shown).

Finally, CD8 T cell response dynamics to both VV and Tumor immunogens were well captured for data sets that had not been used to perform parameter estimation (Section Predicting dynamics following VV and Tumor immunizations). The behavior of each individual was estimated with the prior knowledge acquired on the population (i.e. fixed parameters values and variable parameter distributions) and proved consistent with previous estimated individual behaviors. The correct prediction of individual behaviors by the model, in a simple mice experiment, paves the way to personalized medicine based on numerical simulations. Indeed, once the population parameters are defined, numerical simulation of individuals can be performed from a few measurements per individual and consequently would allow to adapt personalized therapies.

## Material, Methods and Models

### Ethics Statement

CECCAPP (Lyon, France) approved this research accredited by French Research Ministry under project #00565.01.

Mice were anesthetized either briefly by placement in a 3% isoflurane containing respiratory chamber or deeply by intraperitoneal injection of a mix of Ketamin (70 mg/kg) and Xylazin (9 mg/kg). All animals were culled by physical cervical disruption.

### Data

All data used in this manuscript are available at https://osf.io/unkpt/?view_only=ff91bd89bc32421dbcbb356c3509ca55.

#### Experimental Models

C57BL/6 mice (C57BL6/J) and CD45.1+ C57BL/6 mice (B6.SJL-Ptprc^{a}Pepc^{b}/BoyCrl) were purchased from CRL. F5 TCR-tg mice recognizing the NP68 epitope were crossed to a CD45.1+ C57BL/6 background (B6.SJL-Ptprc^{a}Pep-c^{b}/BoyCrl-Tg(CD2-TcraF5,CD2-TcrbF5)1Kio/Jmar) (Jubin et al., 2012). They have been crossed at least 13 times on the C57BL6/J background. All mice were homozygous adult 6-8-week-old at the beginning of experiments. They were healthy and housed in our institute’s animal facility under Specific Pathogen-Free conditions.

Age- and sex-matched litter mates or provider’s delivery groups, which were naive of any experimental manipulation, were randomly assigned to 4 experimental groups (of 5 mice each) and co-housed at least for one week prior to experimentation. Animals were maintained in ventilated enriched cages at constant temperature and hygrometry with 13hr/11hr light/dark cycles and constant access to 21 kGy-irradiated food and acid (pH = 3 ± 0.5) water.

#### Vaccinia Virus (VV) Immunization

2 × 10^{5} naive CD8 T cells from CD45.1+ F5 mice were transferred by retro-orbital injection in, 6-8-week-old congenic CD45.2+ C57BL/6 mice briefly anaesthetized with 3% isoflurane. The day after deeply Xylazin/ Ketamin-anaesthetized recipient mice were inoculated intra-nasally with 2 × 10^{5} pfu of a vaccinia virus expressing the NP68 epitope (VV-NP68) provided by Pr. A.J. McMichael (Jubin et al., 2012).

#### Tumor Immunization

2 × 10^{5} naive CD8 T cells from CD45.1+ F5 mice were transferred by retro-orbital injection in 6-8-week-old congenic CD45.2+ C57BL/6 mice briefly anaesthetized with 3% isoflurane. The day after, recipients were subcutaneously inoculated with 2.5 × 10^{6} EL4 lymphoma cells expressing the NP68 epitope (EL4-NP68) provided by Dr. T.N.M. Schumacher (de Brito et al., 2011).

#### Phenotypic Analyses

Mice were bled at intervals of at least 7 days. Blood cell suspensions were cleared of erythrocytes by incubation in ACK lysis solution (TFS). Cells were then incubated with efluor780-coupled Fixable Viability Dye (eBioscience) to label dead cells. All surface stainings were then performed for 45 minutes at 4*°*C in PBS (TFS) supplemented with 1% FBS (BioWest) and 0.09% NaN3 (Sigma-Aldrich). Cells were fixed and permeabilized with the Foxp3-fixation and permeabilization kit (eBioscience) before intra-cellular staining for one hour to overnight. The following mAbs(clones) were utilized: Bcl2(BCL/10C4), CD45.1(A20) and CD45(30-F11) from Biolegend, Mki67(SolA15) and CD8(53.6.7) from eBioscience, and CD44 (IM7.8.1) from Miltenyi. Samples were acquired on a FACS LSR Fortessa (BD biosciences) and analyzed with FlowJo software (TreeStar).

#### CD8 T Cell Differentiation Stages

For both immunizations (VV and Tumor), phenotypic cell subsets based on Mki67-Bcl2 characterization (Crauste et al., 2017) have been identified and the corresponding cell counts measured in blood, from day 4 post-inoculation (pi) up to day 28pi, 32pi, 46pi, or 47pi depending on the experiment (VV and Tumor data sets 1, Table 1). Naive cells are defined as CD44-Mki67-Bcl2+ cells, early effector cells as CD44+Mki67+Bcl2-cells, late effector cells as CD44+Mki67-Bcl2-cells, and memory cells as CD44+Mki67-Bcl2+ cells.

### Models of CD8 T cell dynamics

#### Initial model

The following system (3) is made of ODE and describes individual behaviors. This is the model in Crauste et al. (2017), it describes CD8 T cell subpopulation dynamics as well as the immunogen load dynamics in primary immune responses, as follows

The variables *N, E, L* and *M* denote the four CD8 T cell subpopulation counts, naive, early effector, late effector, and memory cells respectively (see Section Data), and *I* is the immunogen load.

The immunogen load dynamics are normalized with respect to the initial amount (Crauste et al., 2015, 2017), so *I*(0) = 1. The initial amounts of CD8 T cell counts are *N* (0) = 10^{4} cells, *E*(0) = 0, *L*(0) = 0 and *M* (0) = 0.

Parameters *δ*_{k} are the differentiation rates, with *k* = *NE, EL* or *LM* for differentiation from naive to early effector cells, from early effector to late effector cells and from late effector to memory cells, respectively.

Death parameters are denoted by *µ*_{k}, where *k* = *N, E* and *I* for the death of naive cells, early effector cells and the immunogen respectively. Notations for some mortality-related parameters refer to parameters *µ*_{XY} in Crauste et al. (2017): the subscript *X* refers to the CD8 T cell population or the immunogen that dies, and the superscript *Y* to the CD8 T cell population responsible for inducing death.

Proliferation parameters of early effector cells and the immunogen are respectively denoted by *ρ*_{E} and *ρ*_{I}.

System (3) has been introduced and validated on a similar VV data set in Crauste et al. (2017). This system is simplified in this work, through a model selection procedure (see Sections Model selection on synthetic data and Model selection on biological data).

#### Model selected on synthetic data

Model (3) has been obtained by fitting average dynamics of a CD8 T cell immune response (Crauste et al., 2017). When confronting this model to heterogeneous data of individual CD8 T cell dynamics and using mixed effects modeling, we have to verify that assumptions of the mixed effects model (see Section Nonlinear mixed effects models) are valid. Using synthetic data and the procedure described in Section Model selection on synthetic data leads to the selection of the System (1),

This model is dynamically similar to System (3), but in order to correctly fit synthetic data and to satisfy the assumptions of mixed effects modeling, parameters and *µ*_{I} have been removed: it was not possible to accurately estimate them to non-zero true values. For the sake of simplicity the parameters are renamed in System (1): and . System (1) is defined by 9 parameters.

#### Model selected on biological data

When using biological, experimental data instead of synthetic data, not as many time points and measurements can be obtained (in particular with *in vivo* data) so the dynamical model may easily be over-informed (too many parameters compared to the size of the sampling). Using System (1), the confrontation with VV data set 1 leads to the reduced System (2),

System (2) has 8 parameters (*µ*_{L} has been removed from System (1)): 4 parameters are fixed within the population and 4 parameters have a random effect .

### Nonlinear mixed effects models

Nonlinear mixed effects models allow a description of inter-individual heterogeneity within a population of individuals (here, mice). The main idea of the method is to consider that since all individuals belong to the same population they share common characteristics. These common characteristics are called “fixed effects” and characterize an average behavior of the population. However, each individual is unique and thus differs from the average behavior by a specific value called “random effect”.

This section briefly describes our main hypotheses. Details on the method can be found in Delyon et al. (1999), Kuhn and Lavielle (2005), Samson and Donnet (2007), Lavielle (2014).

Each data set {*y*_{i,j}, *i* = 1, *…, N*_{ind}, *j* = 1, *…, n*_{i}} is assumed to satisfy
where *y*_{i,j} is the *j*^{th} observation of individual *i, N*_{ind} is the number of individuals within the population and *n*_{i} is the number of observations for the *i*^{th} individual.

The function *f* accounts for individual dynamics generated by a mathematical model. In this work *f* is associated with the solution of a system of ODE, see Section Models of CD8 T cell dynamics. The function *f* depends on known variables, denoted by *x*_{i,j}, and parameters of the *i*^{th} individual, denoted by *ψ*_{i}.

Individual parameters *ψ*_{i} are assumed to be split into fixed effects (population-dependent effects, average behavior) and random effects (individual-dependent effects). If denotes the *k*-th parameter characterizing individual *i*, then it is assumed that
where the vector of parameters models the average behavior of the population, and represents how the individual *i* differs from this average behavior. Variables , and they are assumed independent and identically distributed. The variance quantifies the variability of the *k*-th parameter within the population. From now on we will denote by *ω*^{2} the vector of variances . Parameters *ψ*_{i} are assumed to follow a log-normal distribution to ensure their positivity.

The residual errors, combining model approximations and measurement noise, are denoted by *aε*_{i,j}. They quantify how the model prediction is close to the observation. Residual errors are assumed independent, identically and normally distributed, *i.e ε*_{i,j} ∼ 𝒩(0, 1). Moreover, the random effects *η*_{i} and the residual errors *aε*_{i,j} are mutually independent. In this work, we assume a *constant* error model, with a constant *a*, for all cell populations, since they are all observed in log10 scale. The error parameter is estimated for each subpopulation (naive cells - *a*_{N}; early effector cells - *a*_{E}; late effector cells - *a*_{L}; memory cells - *a*_{M}). When data on the immunogen dynamics are available (only when using synthetic data), we assume a proportional error for the immunogen which is observed, so that *a*_{I} = *b*_{I}*f*.

We will write that a parameter is *fixed within the population* if all individuals have the same value for this parameter. On the contrary, if the variance of a parameter is non-zero, then this parameter will account for inter-individual variability within the population.

### Parameter estimation

Parameter values are estimated with Stochastic Approximation Expectation-Maximization (SAEM) algorithm. The SAEM algorithm is available in Monolix (2019).

#### Population and individual parameters

Under the previous assumptions (Section Nonlinear mixed effects models), cell population dynamics (average behavior and inter-individual variability) are described by parameters: *p*_{pop}, *ω*^{2} and *a*. These parameters are estimated by maximizing the likelihood with the SAEM algorithm.

Once these parameters have been estimated, each individual vector of parameters *ψ*_{i} is estimated by maximizing the conditional probabilities , where denotes the estimated value of *x*.

Both estimations are performed with Monolix software (Monolix, 2019). Files to run the algorithm (including all algorithm parameters) are available in Supplementary File 2.

#### Covariates

In order to study whether differences observed in parameter values between VV and Tumor data sets (Table 1) are only related to random sampling or if they can be explained by the immunogen, we use categorical covariates (Section Immunization-dependent parameters).

To tackle this question, we first pool together VV and Tumor data sets 1. Second, using this full data set, we estimate parameter values by assuming that fixed effects of some Tumor-associated parameters are different from those of the corresponding VV-associated parameters.

To introduce categorical covariates in our mixed effect model, we assume that if an individual is either in Tumor or VV data set then the probability distribution of its individual parameter vector *ψ*_{i} has a different mean. We write
where *c*_{i} equals 0 if individual *i* is in VV data set 1 and 1 if it is in Tumor data set 1, and *β* = (*β*^{k})_{k} is a vector of covariate parameters. We test whether the estimated covariate parameter is significantly different from zero with a Wald test, using Monolix (2019) software, and we use a *p*-value threshold at 0.05.

Parameters (*p*_{pop}, *ω*^{2}, *a, β*) are then characterizing cell population dynamics for both VV and Tumor immunogens. If the estimated vector is significantly different from zero, then part of the experimentally observed variability could be explained by the immunogen.

### Model selection on synthetic data

Model selection relies on criteria that allow to evaluate to which end a model appropriately satisfies *a priori* assumptions. For instance, one usually requires a model to correctly fit the data, and uses so-called quality of fit criteria, and/or requires that initial modeling assumptions are satisfied.

Here, we do not use quality of fit criteria to select a model because all models correctly fit data (see Paragraph Model selection below). Instead, we focus on the capacity of the parameter estimation procedure to correctly estimate model parameters. To do so, we first use synthetic data (see Paragraph Generation of synthetic data below). Because we know the exact true parameter values used to generate the data, to evaluate the correctness of estimated parameter values we rely on:

- the relative difference between the estimated parameter value and the true value,

- the relative standard error (RSE), defined as the ratio between the standard error (square root of the diagonal elements of the variance-covariance matrix) and the estimated value of the parameter (Lavielle, 2014),

A large RSE indicates a poor estimation of the parameter.

- the

*η*-shrinkage value (denoted throughout this manuscript as the*shrinkage*value), defined as where var(*η*_{i}) is the empirical variance of the random effect*η*_{i}and*ω*^{2}the estimated variance of the parameter; Large values of the shrinkage characterize individual estimates shrunk towards the conditional mode of the parameter distribution.

We decided not to consider the mathematical notion of identifiability here. Indeed, studying identifiability in nonlinear mixed effect models is a complicated, open question that has been discussed for instance in Lavielle and Aarons (2016). Approaches based on the Fisher Information Matrix (RSE) have been proposed and are often used for evaluating identifiability of population parameters, while analysis of the shrinkage allows to investigate individual parameters identifiability, and we used such methods in this work.

#### Generation of synthetic data

Using a dynamical model (for instance, System (3)), we generate a set of data associated to solutions of the model, where all the parameters are drawn from known log-normal distributions. Parameters *p*_{k} varying in the population satisfy log(*p*_{k}) ∼ 𝒩(log(*m*_{k}), 0.1^{2}). The standard deviation is fixed to the value 0.1 to generate heterogeneity, and values of medians *m*_{k} are given in Table S1. A multiplicative white noise modifies model’s outputs in order to mimic real measurements (we consider a white noise with standard deviation 0.2).

These data consist of time points and measurements for the 4 subpopulations of CD8 T cell counts (in log10 scale) and the immunogen load. These are called *synthetic data*, and these sets of data are referred to as Synth data set X, with X= 1, *…*, 4 (Table 1).

We generate synthetic data for 100 individuals, cell counts are sampled at days 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 25, 30pi (cf. Fig S1 to S4). In agreement with real biological data, we assume that all cell counts below 100 cells are not measured, and account for missing data. For the immunogen load, values lower than 0.1 are also not considered.

#### Model selection

Model selection on synthetic data is performed in 4 steps:

**Step 1** Select an initial model

**Step 2** Estimate parameter values using SAEM (Monolix, 2019)

**Step 3** Remove (priority list):

- parameters whose estimated value is different from their true value, and the RSE is larger than 5%

- random effect of parameters with shrinkage larger than 30%.

**Step 4** Select a model with all parameters correctly estimated

In Step 1, model (3) is used, with all parameters varying within the population. This makes 29 parameters to estimate: 12 mean values, 12 random effects, 5 error parameters.

In Step 3, based on the estimations performed in Step 2, we iteratively remove parameters that are not correctly estimated. To do so, we first focus on parameters that are not estimated to their true value (which is known) and whose RSE is larger than 5%. We consider that the estimated value is different from the true value if E_{rr} *>* 10%, with

Once all parameters are correctly estimated according to the two first criteria, we remove random effects of parameters with shrinkage larger than 30%.

One must note that every time a parameter is removed from the model (mean value or random effect) then new synthetic data are generated using the same protocol as described above, and Step 2 is performed again.

Errors are known when using synthetic data: since a normal noise, proportional to the observation, modifies each observation then there is a constant error on observations of cell counts in log10 scale, and a proportional error on the immunogen load. As mentioned in Section Nonlinear mixed effects models, we assume a constant error for all cell populations and a proportional error for the immunogen load. Diagnostic tools in Monolix (2019) show that error models are correct (not shown here).

Quality of fit criteria do not provide relevant information in our case: the Bayesian Information Criterion (BIC) reaches very low values, even for the initial model (3), whereas observations *vs* predictions graphs show that the number of outliers is not modified by simplifications of the model. Hence, we do not use quality of fit criteria to select a model. In Step 4, we select a model based on the chosen criteria that insure the correct estimation of all its parameters and its reduced shrinkage when confronted to a set of synthetic data.

### Model selection on biological data

Biological data are the ones introduced in Section Data. Compared to synthetic data, they provide less observations, hence it may not be possible to correctly estimate as many parameters as in the synthetic data case.

Model selection on biological data is also performed in 4 steps:

**Step 1** Select an initial model

**Step 2** Estimate parameter values using SAEM (Monolix, 2019)

**Step 3** Remove (priority list):

- parameters whose RSE is larger than 100%

- random effect of parameters with shrinkage larger than 75%

**Step 4** Select a model with RSE and shrinkages low

In Step 1, model (1) is used, with all parameters varying within the population. This makes 23 parameters to estimate: 9 mean values, 9 random effects, 5 error parameters. This model is the one selected on synthetic data (see Section Model selection on synthetic data).

In Step 3, we iteratively remove parameters that are not correctly estimated. We first focus on parameters that are not estimated with a high confidence, that is RSE *>* 100%. Once all parameters are correctly estimated, we remove random effects of parameters with shrinkage larger than 75%.

The error model is not known, so we use the same error model as for synthetic data: a constant error for all cell populations (note that no data on immunogen is available, so the error parameter for the immunogen is not estimated). Diagnostic tools in Monolix (2019) show that assuming constant error models is acceptable (not shown here).

### A posteriori model validation on biological data

In Section Predicting dynamics following VV and Tumor immunizations, the model selected on biological data is compared to data that were not used for parameter estimation. These data are presented hereafter.

In order to assess the model ability to characterize and predict immune response dynamics we compare our results to additional experiments, VV data set 2 and Tumor data set 2 (see Table 1 and Section Data), similar to the ones used to estimate parameters (VV and Tumor data sets 1). CD8 T cell counts of naive, early and late effector, and memory cells have been measured following VV and tumor immunizations, on days 4, 6, 7, 8, 11, 13, 15, 21, 28, 42pi.

The probability distribution of parameters (mean values, random effects) are known since we have estimated them on VV and Tumor data sets 1 (Section Model selection on biological data). These parameters are not estimated on the validation data. We use them to estimate the individual parameter values that fit individual behaviors of these new data sets (see Section Parameter estimation).

## Supporting information

**Supplementary File 1.** Contains the following tables and figures.

**Table S1.** Parameter values of fixed effects (median values) used to generate Synth data sets 1 to 4 from System (3) and its subsequent reductions: removal of (column 4), of (column 5), and of *µ*_{I} (column 6). Notations for some mortality-related parameters refer to parameters *µ*_{XY} in Crauste *et al.* (2017): the subscript *X* refers to the CD8 T cell population or the immunogen that dies, and the superscript *Y* to the CD8 T cell population responsible for inducing death..

**Table S2.** Steps in estimating parameter values using Synth data sets 1 to 4 and System (3). The procedure is detailed in Section Model selection on synthetic data. True values of parameters (fixed effects) are given on the second line, true values of random effects all equal 0.1. At *Step 1*, the procedure leads to removing parameter . At *Step 2*, the procedure leads to removing parameter . At *Step 3*, the procedure leads to removing parameter *μ*_{I}. At *Step 4*, no other action is required. Values used to take a decision are highlighted in bold at each step. In the first column, ‘m.v.’ stands for mean value, RSE is defined in (4), ‘r.e.’ stands for random effect, and the shrinkage is defined in (5). Note that values (mean values and random effects) of parameters and have to be multiplied by 10^{−5} (for ), 10^{−6} (for and ), 10^{−7} (for ), and 10^{−8} (for ). Units are omitted for the sake of clarity.

**Fig. S1.** Synth data set 1. These data have been obtained by simulating System (3) with parameter values in Table S1 and using a multiplicative white noise, as detailed in Section Model selection on synthetic data. 100 individuals are simulated and first observations are on day 4 pi for cell populations and the immunogen. Then measurements are on days 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 25, and 30 pi. All cell counts below 100 cells are not measured. For the immunogen load, values lower than 0.1 are also not considered.

**Fig. S2.** Synth data set 2. These data have been obtained by simulating a reduced System (3), with parameter values in Table S1, and using a multiplicative white noise, as detailed in Section Model selection on synthetic data. See Fig. S1 for details.

**Fig. S3.** Synth data set 3. These data have been obtained by simulating a reduced System (3), with parameter values in Table S1, and using a multiplicative white noise, as detailed in Section Model selection on synthetic data. See Fig. S1 for details.

**Fig. S4.** Synth data set 4. These data have been obtained by simulating a reduced System (3), with parameter values in Table S1, and using a multiplicative white noise, as detailed in Section Model selection on synthetic data. See Fig. S1 for details.

**Supplementary File 2.** Monolix files. Are included:

- files to run the algorithm of parameter estimation, including algorithm parameters (mlxtran files)

- mathematical model files (System1 model.txt and System2 model.txt)

- data files (txt files, monolix format)

- associated result files (folders with Monolix outputs)

for the following cases:

- Synth data set 4 and System (1)

- VV data set 1 and System (2)

- Tumor data set 1 and System (2)

- VV and Tumor data set 1, System (2) and 4 categorical covariates

## Acknowledgments

The authors are grateful to Pr. Adeline Leclercq Samson for sharing her expertise on nonlinear mixed effects models. We thank the BioSyL Federation and the LabEx Ecofect (ANR-11-LABX-0048) of the University of Lyon for inspiring scientific events. This work was supported by Inria PRE MEMOIRE grant and by the ANR predivac grant (ANR-12-RPIB-0011-01). We acknowledge the contributions of SFR Biosciences (UMS3444/CNRS, US8/Inserm, ENS de Lyon, UCBL) and of the CELPHEDIA Infrastructure (http://www.celphedia.eu/), especially the center AniRA in Lyon (AniRA-PBES and AniRA-Cytometrie facilities).

## Footnotes

We updated the description of our model selection strategy and the parameter estimation procedures. We also removed some predictions about tumor volumes. Some results have been slightly modified, but overall all our main results remain valid.

https://osf.io/unkpt/?view_only=ff91bd89bc32421dbcbb356c3509ca55