Figures
Abstract
Primary immune responses induce CD8+ T cell responses characterized by activation via antigen presenting cells, expansion, differentiation into effector and memory phenotypes, and contraction resulting in long-term memory populations. In this study a mathematical stochastic agent-based model is developed to simulate all phases of the CD8+ T cell response following vaccination. Importantly, the model successfully captures the stochastic nature of T cell dynamics throughout the response. It predicts T cell population with high accuracy while addressing mouse-to-mouse variability, highlighting its robust predictive power. This predictive model aims to improve T cell vaccination strategies by both informing the biology of the T cell response and streamlining vaccine development.
Author summary
Vaccines work by stimulating immune cells to expand, and form populations that help protect the body. However, even when the same vaccine is given under controlled experimental conditions, the immune response can vary from one individual to another. In this study, we developed a computational model to study how this variability can arise during the response of CD8+ T cells vaccines. Our model represents individual cells and allows them to activate, divide, leave the modeled system, or become effector and memory cells. We used experimental data from vaccinated mice to estimate the model parameters and to compare the simulated immune response with measured cell counts over time. The model reproduced the main phases of the response, including expansion, peak response, and early contraction, while also generating variability between simulations. This work does not claim to capture every biological mechanism involved in immune response. Instead, it provides a framework for studying how stochastic single-cell events can influence population-level immune dynamics. Such models may help guide future studies that combine experimental data with simulation to better understand vaccine responses.
Citation: Seyyedizadeh SF, Christian DA, Adams TA II (2026) The SATvac model of CD8+ T cell expansion and contraction phases considering memory and effector cell differentiation. PLoS Comput Biol 22(8): e1014702. https://doi.org/10.1371/journal.pcbi.1014702
Editor: Stacey D. Finley, University of Southern California, UNITED STATES OF AMERICA
Received: January 23, 2026; Accepted: August 10, 2026; Published: August 18, 2026
Copyright: © 2026 Seyyedizadeh et al. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
Data Availability: All relevant data are within the manuscript and its Supporting Information files. We have also released our models to the public by uploading the source code on the Living Archive for Process Systems Engineering (LAPSE) repository. https://psecommunity.org/LAPSE:2025.0586.
Funding: This work was supported by a grant from the National Institutes of Health: NIAID AI(160664 to TA and DC). The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.
Competing interests: “The authors have declared that no competing interests exist.”.
1. Introduction
The generation of CD8+ T cell responses is required for protection against intracellular pathogens [1–4] as well as some cancers [5–7]. Effector CD8+ T cells aid in clearing pathogens during acute infection, while memory CD8+ T cell responses provide long-lived protection against re-infection [8]. The therapeutic potential of memory CD8+ T cells has motivated the development of prophylactic and therapeutic vaccines that effectively generate these memory CD8+ T cell populations to target diseases resistant to traditional antibody-mediated vaccine strategies such as HIV, parasite-born illnesses, and certain cancers [9–13]. However, the complexity and stochasticity of cellular signals required for CD8+ T cell expansion and memory cell differentiation has made the design of effective CD8+ T cell vaccines difficult [14].
Stochasticity plays a critical role in CD8+ T cell expansion and differentiation into effector and memory phenotypes following infection or vaccination [15]. Previous studies have emphasized that this randomness generates variability in how individual cells differentiate, ensuring a diverse pool of short-lived effectors and long term memory cells [16,17]. These studies of CD8+ T cell dynamics incorporated effector and memory differentiation and provided valuable insights that such variability is a fundamental property of biological systems [18]. However, these models captured population averages and primarily focused on reproducing observed kinetics rather than single cell mechanisms. Additionally, these studies were limited to early expansion phases or single tissues and did not mechanistically capture the contraction phase of the response nor the stochasticity of the fate of each cell across tissues. This paper extends these frameworks by explicitly modelling effector and memory precursor differentiation using an agent based stochastic model that spans up to 25 days post immunization, covering expansion, contraction, and early memory formation across major secondary lymphoid tissues.
The inherent variability of CD8+ T cell responses arises from both cell-intrinsic sources such as stochastic expression of cytokines and transcription factor fluctuations [19], and cell-extrinsic factors including the concentration of cytokines present during T cell activation and the amount, duration and quality of antigen exposure [18,20–22]. Even identical T cells exposed to the same antigen, can respond differently due to stochastic signaling proteins and receptors [23,24]. This stochasticity makes it difficult to predict vaccine responses of individuals as even cells within an individual may respond differently to identical vaccinations causing variability in both the magnitude and phenotype of the CD8+ T cell response [21,25,26]. Even small differences in the number of naïve cells present at the time of immunization can lead to large differences in expansion magnitude [27].
Computational models provide a method to rapidly simulate cellular dynamics and stochasticity, allowing insights into the processes of T cell activation that enable the prediction of T cell responses to vaccination [28–30]. Traditional ordinary differential equation (ODE) models provide deterministic outputs, producing the same result for a given set of inputs [31]. Historically, mathematical models have relied on such deterministic frameworks, using fixed parameters to describe average immune behaviors [32–36]. These models have been useful in tracking mean population trends and reproducing the average kinetics of T cell responses at the population level [30]. However, they inherently describe only the mean behaviour and cannot account for the experimentally observed variability between individual cells or mice. In contrast, stochastic and agent-based frameworks overcome these limitations by considering the probabilistic nature of biological events such as antigen encounter, activation, proliferation and differentiation that governs immune responses fate at the single cell level. The same principles have been used in the Cyton and Cyton2 modelling frameworks, where lymphocyte population dynamics are represented through stochastic variation in division, death and differentiation timing [37–39]. This approach captures both intrinsic and extrinsic sources of variability in T cell behaviour, generating different outcomes even with the same input, thus better reflecting the unpredictable nature of biological systems [18,25].
Immune responses originate from a small number of precursor cells which expand into large populations through proliferation and differentiation. In the modeled system in this paper, the initial population of cells is relatively small compared to the size of the response that follows. A few thousand of precursor cells can expand into millions of cells therefore, stochastic differences at the initial precursor cells can propagate and significantly affect the overall response magnitude. Moreover, these precursor cells do not act as a homogenous pool [40]. Each cell can behave differently in activation timing, number of division and differentiation, creating thousands of independent stochastic trajectories that together shape the observed diversity in immune responses [41]. Stochastic models are required for quantifying such heterogeneity and the full spectrum of possible immune trajectories [42–44]. These insights are unattainable with deterministic models, even when parameter uncertainty is incorporated [45].
Building upon this concept, this paper presents the Stochastic Agent-based T cell Vaccine (SATvac) model of the CD8+ T cell response after vaccination. In previous work, the STochastic Omentutm Response (STORE) model was developed as an agent-based model to simulate the activation phase of the CD8+ T cell response at the site of priming following immunization [46]. The SATvac model expands on this work by including the draining lymph nodes (DLN), non-draining lymph nodes (nDLN), spleen, omentum, and the site of immunization in the peritoneum. Examining these tissues allowed the SATvac model to simulate to one-month post-immunization and include the full expansion and contraction phases of the CD8+ T cell response. Further, SATvac models the differentiation of activated T cells into memory precursor and effector T cells. In this paper, simulations using SATvac reveal that the high level of stochasticity observed in the number of antigen-specific CD8+ T cells, especially at the peak of the T cell response, can be explained by stochastic mechanisms intrinsic to the system [47]. The model generates a wide distribution of antigen specific CD8+ T cell counts across simulations using fixed parameters, indicating the role of stochasticity in shaping the observed variability in immune responses.
2. Methods and model development
2.1. Ethics statements
All procedures involving mice were reviewed and approved by the Institutional Animal Care and Use Committee of the University of Pennsylvania (Animal Welfare Assurance Reference Number #A3079-01) and were in accordance with the guidelines set forth in the Guide for the Care and Use of Laboratory Animals of the National Institute of Health.
2.2. Original STORE model summary
The SATvac model discussed here is a new version of the STORE model (Fig 1) that was designed to simulate the CD8+ T cell response to vaccination [46]. The original implementation of the STORE model was developed to track ovalbumin-specific CD8+ (OT-I) T cell activation at the site of T cell priming for 8 days after immunization with the non-replicating CPS strain of the parasite Toxoplasma gondii engineered to secrete ovalbumin (CPS-OVA) as described below.
- Step 1: Naive OT-I T cells enter the system and bind to antigen presenting cells (APCs)
- This process begins with naive T cells (“A” cells) entering the system (the tissue of interest, such as the omentum or spleen). The user can change the time and rate of entry depending on the immunization strategy.
- APCs (“P” cells) also enter the system at a user-specified time and rate.
- Cells search for and bind P cells to form an “AP” pair.
- The probability that any given A cell might find a P cell and bind with it within a given timestep is dependent on the number of APCs present in the system boundary at that time.
- Step 2: AP maturation
- The length of time required for the maturation of AP to an antigen-experienced “BP” cell pair depends on a probability distribution function with a median of about 0.5 hours [46]. This distribution was chosen to approximate GFP maturation time and to ensure that all AP do eventually transition to BP.
- Step 3: Generation 1 (C Cells)
- The BP that is generated in the system can undergo a transition that it will separate from its bound P and also divide into two Cs.
- The length of time required for this process to complete depends on a probability distribution function with median of about 21 hours [46, 48].
- Step 4: Cell division across generations
- The C that is generated in the system can divide into two Ds (generation 2).
- These divisions continue through the generations (D, E, F, G, H, I, J) such that each cell divides into two daughter cells of the next generation (i.e., C → 2D, D → 2E, etc.).
- The length of time required for this process depends on a probability distribution function with a median of about 5.2 hours for types D-H and about 24 hours for types I and J [46, 49].
- Any generations beyond the 8th generation are all called type J cells. This reflects the detection limit of flow cytometry dye dilution methods since it is not possible to distinguish more than 8 divisions in these techniques.
- Step 5: Cell leaving
- Each cell of types E to J have a probability of leaving the system boundary in each time step where they are no longer tracked and never come back.
- This is the only mechanism for an activated T cell to exit the system in the original STORE model. The cell leaving probability used is not high enough to overcome the rate of cell doubling of type J cells noted in Step 4. Thus, the J cell population in the STORE model increases exponentially beyond day 8 and cannot be used beyond this for meaningful predictions. This is a key limitation of the original model that is overcome in the present SATvac model. In SATvac, a “leaving” event refers to removal from the modeled system boundary, meaning that the cell or interaction is no longer tracked by the model.
2.3. SATvac model summary
The SATvac model introduces the following new features (Fig 2) in the model which includes expanding from tracking only the site of priming to other major secondary lymphoid tissues and the site of immunization. SATvac also introduces T cell differentiation into memory precursor T cells (which we call “M”) and effector T cells (“Ef”) with corresponding rules for their behaviour in the model. Experimentally, the number of M and Ef cells were determined by the expression of CD127 and Killer cell lectin-like receptor G1 (KLRG1) where M cells were CD127+KLRG1- and Ef cells were CD127-KLRG1+ [50]. These additional phenomena explain the contraction phase of the CD8+ T cell response and allows the simulation time frame to be extended from 8 days to 25 days post immunization. These new features provide a more extensive description of the CD8+ T cell response. An overview of the new model phenomena is demonstrated in Fig 2 and outlined next.
In SATvac model, generation 8 (J cells) may continue diving, transition into an effector T cell (Ef) or into a memory precursor (M) cell. Effector T cells can divide, transition into long lived effector memory T cell (Ef-M) and persist for a long period [20] or leave. Memory cells may also divide or leave.
2.4. SATvac model description
A complete list of abbreviations and terminology used in the model is provided in Table 1.
2.4.1 System boundary.
In SATvac, a single unified model of tissues was used with an expanded system boundary that now includes the omentum, spleen, DLN, nDLN, and the site of immunization in the peritoneum. Therefore, the SATvac model does not explicitly simulate trafficking between individual tissues. Instead, these tissues are treated as a combined immune system boundary and the available experimental data used for parameter estimation were analyzed as total cell counts across the measured tissues. This approach is based on the biological assumption that the fundamental cellular behaviors including division, maturation, and transition events are happening across all secondary lymphoid tissues [51]. While the model structure remains the same, some parameters were reoptimized to account for the new system boundary. In addition, the model was also extended to capture the contraction and memory phases of the immune response, enabling simulation of T cell dynamics up to 25 days after immunization. This broader boundary reflects a more extensive overview of T cell dynamics in an immune response. Cells such as BPs and E through J may leave the system based on different leaving parameters. Cells are only tracked and considered while they are within the boundary, meaning their transitions and interactions are influenced solely by other cells within this system. Once cells exit the system, they are not tracked further.
2.4.2. Simulation framework.
In SATvac, the user can specify the time and manner at which naive T cells (A cells) and APCs (P cells) enter the system boundary. In these studies, naive T cells were transferred 24 hours prior to immunization, meaning that A cells are assumed to have completed their arrival time and are at steady state in the system boundary. We have defined time to be the time of immunization with a timestep of
hours.
2.4.3. Event timing.
In the SATvac model, the timing of each event such as division, transition, or leaving is determined at the time of cell generation using the inverse cumulative distribution function (ICDF). A random number is drawn for each newly generated cell and the length of time (
) in the future that the event will happen is computed depending on the type of probability (
) used for that event, taking the general form:
In this model, three types of event-timing distributions were employed:
- 1. Constant probability: if the probability of an event occurring during a time point is constant for all time points:
- 2. Age-dependent probability: if the probability of an event is described by a normal probability distribution, which is defined by mean (
) and standard deviation (
):
These probabilities are truncated and renormalized to avoid negative values of age.
- 3. Time-dependent probability: if the probability of an event is described by an exponential decay which is defined by initial probability (
) and decay constant (
):
In the above equations, is the probability that an event occurs at age
, given that it has not occurred before
. This is a conditional probability based on the assumption that the event has not happened up to
.
is in discrete time (e.g.,
) representing sequential time steps in the system under study. Each step has a duration
, which represents the size of the timestep.
is the simulation time in hours, and
is the probability parameter, representing the likelihood of the event occurring at each time step.
The ICDF maps to
, such that:
Therefore, to determine the timing of events in the model such as division, transition, and leaving we use the following general formula:
Where is the time when the l-th new cell goes through an event.
is the current time step (simulation time),
is a random number uniformly drawn from the interval (0,1) and
is the probability of happening for that specific event and can take any form of the three types (
).
Depending on the state, a newly generated cell may have more than one possible transition it could take (e.g., a type Ef could leave the system, divide into daughter cells, or change type to Ef-M). If so, all possible events like division or leaving are mapped to their time using ICDF but only the event with the earliest scheduled time is executed. An exception to this mechanism exists for type J. Unlike other cell types where time of events is computed by selecting the one with the earliest scheduled time, J cells follow a fixed priority sequence (see section 2.4.9).
2.4.4. Arrival rates.
The original STORE model allows the user to specify the manner in which naive T cells (A) and APCs (P) enter the system boundary (how they “arrive” in the system). The time they first arrive and enter the system boundary, the rate at which they enter the boundary, and the time they stop arriving are decided by the user. These parameters should be set appropriately to match the real system being simulated. For the case studies used in this work, we chose the so called “quadratic form”, in which cells arrive slowly at first, but their arrival rate (e.g., the number of cells that arrive per time step) increases linearly over time, until all the cells have arrived, and so no further cells arrive. This was chosen because it is a relatively realistic representation of the natural immune response [48]. The corresponding equations which determine the number of P cells entering at each timestep is achieved with the following equation:
Where represents the time of injection of P, and
is the length of time it takes for all of the P cells to arrive, after which, no more arrive. In this work, naive OT-I T cells were transferred into recipient wild-type (WT) mice 24 hours prior to immunization (
), and recipient mice were then immunized at time zero (
). The length of time it takes for all of the naïve T cells to enter into lymphatic system boundary, and therefore be present in the system at the start of the simulation at time = 0, is treated as a model parameter and estimated using optimization
. We also assume that the APCs will arrive over the course of
. This is expressed visually in Fig 3.
2.4.5. A and P binding.
In the proposed model, the binding of A and P cells is determined based on a probability that is calculated at each timestep. This probability is calculated similarly to the original model and by the following formula:
where is a model parameter, and
and
are the numbers of A and P cells within the system boundary at that timestep
.
The binding time for a given P cell is calculated using Equations 2 and 6 therefore:
Where is the time when the
-th new P cell binds to an A cell,
is the current time step,
is the time step and
is a random number uniformly drawn from the interval (0,1).
2.4.6. AP maturation.
At each timestep, each AP cell matures into an antigen-experienced BP cell with a probability that is governed by a normal distribution and defined by the mean () and standard deviation (
), such that:
The timing of this event is calculated using the ICDF method using Equations 3 and 6.to reflect biological variability. The parameters () and (
) are taken from the original STORE model such that the cumulative probability that an
transition will occur is 50% when the AP cell life has reached almost 0.4 hours [46].
2.4.7. BP separation and division.
At each timestep, each BP cell has a probability of separating from P and dividing into two Cs, such that:
Similar to the AP maturation step, this transition depends on a probability distribution which is defined by the mean () and standard deviation (
), using Equations 3 and 6. The timing of this transition is also taken from original STORE model such that the cumulative probability that a transition will occur is 50% when the
cell life has reached 17 hour mark to mimic the second phase of T cell priming [46,48].
2.4.8. C through I cell division transitions.
In the proposed model, cells of type C through I divide at each timestep such that:
Cells C through I divide into two cells of the next generation. Each cell has a probability () of division at any timestep, which is determined by its age. The division probability follows a normal distribution which is defined by the mean (
) and standard deviation (
). The timing of these divisions is calculated following the same approach of previous transition using the ICDF method, Equations 3 and 6. The parameters
and
are optimized through optimization algorithm to best fit the experimental data.
2.4.9. J cell division, transition and leaving.
In this model, the transition of proliferating cells into effector or memory precursor cells is implemented beginning at division 8 as J cells. Although fate biasing can arise as early as the first cell division [25,52–54], full phenotypic commitment as indicated by stable expression of markers such as CD127 and KLRG1, becomes evident only after multiple divisions [55,56]. Therefore, the bifurcation used here at division 8 represents the stage at which distinct effector and memory cells can be experimentally distinguished rather than the initial fate biasing. Each J cell generated at each timestep can then divide into two J cells, transition into an effector cell (Ef), or transition into a memory precursor cell (M):
- 1. J to 2J cells (J cell division)
This division is governed by a probability distribution defined by a mean () and standard deviation (
) using the same ICDF method (Equations 3 and 6). The parameters
and
are estimated by optimization to best fit experimental data (see section 2.6).
- 2. J cell transition to Ef or M cell
When a J cell division completes, the resulting J daughters can transition into an Ef or M cell or they can leave the system boundary. These transitions are sampled using binomial random variables. In this formulation, each eligible J cell is treated as an independent trial with the same probability of success (here cell transition), and the sampled value gives the number of cells assigned to the corresponding event during that timestep.
85% () of newborn J cells transition into an Ef cell and 6% transition to an M cell (implemented as 40% (
) of the 15% remaining), and the remaining 9% stay as a J cell and are scheduled for their next event (division or leaving). This probability structure was chosen based on experimental observations and literature findings that show a large proportion (≈90%) of activated CD8+ T cells differentiate into short lived Ef cells while only a small fraction (≈10%) survive to become M cells [50]. The 90/10 Ef to M precursor ratio is an approximate value [57] and can change based on the model of vaccination or infection. In our study, an 85/15 ratio provided a closer match to the observed effector and memory precursor dynamics. Mathematically, we let
be the number of newborn J cells generated at a given time point and
. The number of J cells transitioning to Ef cells (
) is given by:
The remaining J cells after the transition to effector cells are:
Following the same fashion, the number of J cells transitioning to M cells () is given by:
The remaining J cells after the transition to M cells are:
Each J cell has an independent chance of undergoing a transition and the binomial distribution approach captures the stochastic variability while maintaining the expected proportions of M cells and Ef cells over repeated simulations. Additionally, each J cell can leave the system boundary and turn into a K cell, similar to other cells. However, the probability of leaving for these cells () is different from others (
). The leaving probability for these cells is estimated via optimization (see section 2.6) and the timing of the leaving event for each cell is calculated using Equations 2 and 6.
2.4.10. E through I leaving transitions.
Cells E through I may leave the system boundary before they divide, where it is classified as cell K, following the transitions below:
The probability of each of these transitions is governed by the leaving parameter , which defines the likelihood that cells E through I will leave the system boundary before division. This probability value is determined in the parameter fitting step (see section 2.6). The timing of these leaving events is calculated using Equations 2 and 6.
2.4.11. Effector and memory precursor cell division, transition.
The different roles of Ef and M cells during an immune response result in different cell dynamics that are modeled separately in SATvac. Time dependent probabilities (Equation 4) were used for both Ef and M cells instead of age-dependant probabilities, as literature suggests that once T cells differentiate into these phenotypes, their behaviour is governed more by external cues that change during the course of the immune response (e.g., antigen persistence, cytokines) rather than their division history or generation number [20].
Ef cells are required during the acute phase of the immune response and thus divide rapidly during the expansion phase of the response. These cells are also characterized as short-lived and undergo high rates of apoptosis that result in the contraction phase of the response [58]. In the model, each Ef cell generated in the system can either divide into two new Ef cells, transition into an effector memory (Ef-M) cell or leave the system boundary (transition to a K cell). The probabilities for division and leaving are time dependent, defined by Equation 4, and the probability parameters are estimated (see section 2.6), while the probability of transition into an Ef-M T cell () is a constant 6%. We note that the 6% was the result of by-hand estimation and was not included in the unknown parameters identified through formal optimization. While some studies report that around 90% of Ef cells die via apoptosis after pathogen clearance, and the remaining 10% differentiate into Ef-M precursors [59], this percentage is dependent on the model of vaccination or infection [60]. The 6% transition probability used here is within the expected range from the literature.
All the M cells generated in the system can either divide into two new M cells or leave the system boundary (transition to a K). The probabilities of these events are time dependent, defined using Equation 4, and the probability parameters are estimated through optimization (see section 2.6). M cells have a longer lifespan than Ef cells and thus divide more slowly and undergo slower rates of apoptosis compared to Ef cells [58]. This difference in cell dynamics results in different parameters for the division and leaving probabilities compared to Ef cells.
In Table 2, we report the optimized parameters used to define event probabilities in the model. For agent-based probabilities, the optimized mean (μ) and standard deviation (σ) are reported. For time-dependent probabilities, the corresponding optimized parameters and
are reported.
The variability and stochastic nature of the model are further illustrated in Fig 4 through CDF and ICDF plots for each age-dependent function. These plots highlight the inherent uncertainty and variability in event timings. Additionally, the figure reports the median event time for each age-dependent probability defined as the time point by which 50% of the cells are expected to undergo the event. The graphs CDFs and ICDFs are forcibly truncated at a probability of 1, as after this point the event is certain to occur, and displaying the timings beyond this does not provide additional relevant information.
The AP cell maturation and BP cell transition distributions are described by ,
and
.
2.5. Algorithm overview
Fig 5 provides a detailed overview of the simulation steps and logic used to model T cell dynamics in response to vaccination. The algorithm begins by initializing model parameters and cell counts, followed by iterative time-step simulations. At each time step, cells are introduced based on their defined introduction rate and a series of conditional checks determine possible events for each cell type such as division, transition or leaving. The flowchart is organized into four key simulation phases: initialization, transition, division, and leave, each represented by color-coded blocks.
2.6. Model parameter estimation
The model has 5 parameters specified in advance from theory or prior work plus 19 unknown parameters that must be found through parameter estimation. This study used an optimization framework to estimate the values of the 19 unknown parameters. The optimization problem was formulated as a non-linear regression problem in which the simulated model output was matched to the experimental measurements. The parameter estimation was performed using a moment-based objective function. This formulation was selected because the experimental data include biological replicates at each timepoint and therefore contain information about both the average and the spread between replicates.
However, the challenge of parameter estimation using optimization arises due to the inherent stochasticity of the SATvac model. The stochastic nature of these models, where uncertainty and variability are present in the objective function or constraints, adds a layer of complexity to the optimization process [61]. One method to avoid the inherent stochasticity of the model and improve the estimation of parameters is to execute the simulation times and calculating the sum of the objective function values across these runs. In this work, each candidate parameter set was simulated (
) times. At each experimental time point, the mean and standard deviation of the simulated ensemble were compared with the mean and standard deviation of the experimental replicates. This method was chosen to show the robustness of the optimization and results using the following formulation. The objective function was then defined as a weighted sum of squared differences in these two moments:
Where:
is the objective function.
is the set of unknown parameters to estimate.
is the set of time points at which experimental data were collected. For this work, the experimental data were collected at times = {5, 6, 7, 8, 9, 12, and 25 days, accurate to within a few minutes}.
are the mean and standard deviation, respectively.
is the maximum number of simulations run to compute each objective function value.
is the
-th simulation out of
simulations.
is the
-th experimental data out of
available experimental data.
is the number of experimental data at time
, where each element is one repetition of the same experiment that measures the total T cell count at time
.
is either 4 or 5 elements.
is the
-th simulated count of each cell type
.
is the set of cell types = {A, B, C, D, E, F, G, H, I, J, Ef, M}
are the weight of each moment.
Note that this optimization framework uses absolute cell counts rather than log scale values to preserve biological scale and ensure the model reproduced both overall magnitude and distribution of immune responses. It also uses a multi-objective function approach that weights two penalty terms unequally: the ability to match average counts and to also match the extreme maximum counts. This is important because the variation in experimental data is not merely experimental error but measurements of a naturally stochastic system. The multi-objective function framework helps tune the model to capture both phenomena well.
For these studies, we found that runs was a good balance between computational time and accuracy, noting that using
as high as 20 showed little improvement in model accuracy over
but required significantly longer code execution times. The vectorization option in MATLAB’s PSO function was used to enhance the speed of the optimization process. By using vectorization, in each iteration, the optimization process evaluates a 30 × 19 matrix (Number of particles × Number of unknown parameters) which corresponds to 30 sets of parameters (particles) in parallel. Therefore, the objective function
value was being computed as a matrix of 30 values instead of a scaler value. The particle matrix (
) can be represented as:
Where each row represents a set of 19 parameters for one particle. For each particle (where
), the objective function
is evaluated in parallel to others. In result,
, the objective value is a vector of objective values.
Where is the objective value for the
-th particle.
Four global optimization algorithms that are most used for stochastic models according to the literature [62] were considered for this study, namely genetic algorithms, simulated annealing, surrogate (radial basis function) methods, and particle swarm optimization (PSO). Fig 6 shows the result of early-stage optimization trials comparing the four methods applied to the optimization problem. For this preliminary comparison, three training-data combinations were generated from the available Case 1 experimental data. Each combination represented a different subset of biological replicates across the measured time points and was used only to assess whether the relative performance of the optimization algorithms was robust to the selected replicate subset. These combinations are denoted as G1, G2, and G3 in Fig 6 and should not be confused with the independent experimental datasets referred to later as Case 1, Case 2, and Case 3. The PSO algorithm outperformed the other methods in all three cases. This is consistent with recent studies indicating that PSO is highly effective for exploring complex, nonlinear, and high-dimensional parameter spaces, especially in stochastic models [63–65]. Therefore, PSO was chosen for use in this work; specifically, the MATLAB implementation was used with 30 particles, parallel computing implementation, 150 maximum iterations, early stopping if no improvement has been made in 10 iterations, and default tuning parameters. Each simulation run, designed to capture the dynamics of the immune response over a 25-day period, completes in approximately 6 seconds. Generating the cloud graphs, which includes 200 independent simulation runs (see Fig 8 for example), takes around 10 minutes in total. To ensure realistic simulation results, parameters are constrained within the biological and experimental setup bounds. The final values of the model parameters are found in Table 2. Some parameters were fixed based on prior biological knowledge and values reported in the original STORE model or literature, while parameters specific to the SATvac extension and longer simulation time frame were estimated through optimization. This approach preserves established biological information while reducing the number of parameters to be fitted.
3. Experimental setup
3.1. Study design
An experimental study was designed to understand the kinetics of the T cell response to immunization with the attenuated CPS-OVA strain of T. gondii. Unlike previous work that focused only on the site of priming in the omentum, the studies presented here examined the spleen, draining lymph nodes (DLNs), non-draining lymph nodes (NDLNs), omentum, and peritoneum. For these experiments, 5000 OT-I/Nur77GFP T cells labeled with CellTrace Violet (CTV) were transferred intravenously (i.v.) into naive WT mice that were then immunized with 2 x 105 CPS-OVA parasites intraperitoneally (i.p.) 24 hours later. The OT-I T cell response was examined at various timepoints (timepoints noted in figures) from day 5 to day 28 post-immunization. At each measured time point, the experimental dataset contained biological replicate measurements from individual mice. Depending on the time point and experimental case, each data point included either four or five biological replicates. These replicate measurements were used to calculate the experimental mean and standard deviation used in the model parameter estimation.
A schematic overview of the experimental design is presented in Fig 7A, 7B, and representative kinetics of total OT-I T cells, Effector OT-I T cells and Memory OT-I T cells numbers are shown in Fig 7C-7F.
(A) Schematic of the transfer and immunization protocol. (B, D) Gating strategy expression levels used to identify (B: total OT-I T cells) and (D: Memory precursor and effector subsets). (C, E, F) Total number of OT-I T cells, Effector OT-I T cells and Memory precursor OT-I T cells.
To quantify the technical error in our cell counting procedure, we performed an additional experiment using spleens from five mice. Each spleen processed then sampled 3 independent times for both total cell number quantification and flow cytometry, yielding 15 measurements. In our workflow, the final OT-I T cell count per sample is obtained as , where
is the total live cell count,
is the fraction of live cells sampled during flow cytometry analysis, and
is the OT-I T cell count within that fraction.
showed a 4.8% relative error, while both
and
showed a 1.8% relative error. Using standard error propagation for a product and ratio, this leads to an overall relative error of approximately 5.4% for the final OT-I T cell counts for each mouse at each time point. Throughout this work, all experimental data points are therefore displayed with a technical error bar of
5.4%, reflecting the combined uncertainty of the flow cytometry and Guava counting steps.
3.2. Mice
C57BL/6J (stock no. 000664, RRID: IMSR_JAX:000664), Nur77GFP (stock no. 016617, RRID:IMSR_JAX:016617), OT-I (stock no. 003831, RRID:IMSR_JAX:003831), and CD45.1 (stock no. 002014, RRID:IMSR_JAX:002014) mice were obtained from the Jackson Laboratory. All mice were kept in specific-pathogen-free conditions at the School of Veterinary Medicine at the University of Pennsylvania.
3.3. Immunizations
All experiments were performed using cpsII-OVA parasites. Generation CpsII-OVA parasites have been previously described [66] and were derived from RHDcpsII clone, which was provided as a generous gift by Dr. David Bzik [67]. Parasites were cultured and maintained by serial passage on human foreskin fibroblast cells in the presence of parasite culture media [71.7% DMEM (Corning: 10–017-CM), 17.9% Medium 199 (Gibco: 11150–059), 9.9% Fetal Bovine Serum (FBS) (Atlanta Biologics: S11150H), 0.45% Penicillin and Streptomycin (Gibco: 15140–122) (final concentration of 0.05 units/ml Penicillin and 50 μg/ml Streptomycin), 0.04% Gentamycin (Gibco: 15750–060)(final concentration of 0.02 mg/ml Gentamycin)], which was supplemented with uracil (Sigma-Aldrich: U1128) (final concentration of 0.2 mM uracil). For infections, parasites were harvested and serially passed through 18- and 26-gauge needles (BD: 305196, 305115) before filtration with a 5 μM filter (PALL Acrodisc: 4650). Parasites were washed extensively with PBS and mice were injected i.p. with parasites suspended in PBS.
3.4. T cell transfers and tissue harvesting
For T cell transfers, OT-I mice were crossed with CD45.1/Nur77GFP mice. To isolate OT-I CD8+ T cells, secondary lymph nodes and spleen were harvested and leukocytes from the spleen and draining lymph nodes were obtained by processing spleens and lymph nodes over a 70 μm filter (Fisher Scientific: 22-363-548) and washing them in complete RPMI [90% RMPI 1640 (Corning: 10–040-CM), 10% FBS, 1% penicillin-streptomycin, 1 mM sodium pyruvate (Corning: 25–000-Cl), 1% nonessential amino acids (Gibco: 11140–050), and 0.1% β-mercaptoethanol (Gibco: 21985–023)]. Red blood cells were then lysed by incubating for 5 minutes at room temperature in 5 ml of lysis buffer [0.864% ammonium chloride (Sigma-Aldrich: A0171) diluted in sterile de-ionized H2O)], followed by washing with complete RPMI. OT-I CD8+ T cells were then purified by magnetic activated cell sorting (MACS) using the CD8a + T Cell Isolation Kit (Miltenyi Biotec: 130-104- 075). Purified OT-I T cells were then fluorescently labeled using the CellTrace Violet labeling kit (ThermoFisher Scientific: C34557). OT-I T cells were then transferred by i.v. injection into recipient mice. Peritoneal exudate cells were obtained by peritoneal lavage with 8 mL of ice cold PBS. Omentum was isolated, incubated in 0.4 U/mL of LiberaseTL (Roche: 5401020001) for one hour at 37°C, passed through an 18G needle, and processed over a 70 mm filter. Leukocytes from the spleen and lymph nodes were obtained by processing spleens and lymph nodes, washing them in complete media, and lysing red blood cells (see above). Cells were then resuspended in complete RPMI.
3.5. Flow cytometry
Cells were washed with FACS buffer [1 × _PBS, 0.2% bovine serum antigen (Gemini: 700-100P), 1 mM EDTA (Gibco: 15575–038)] and incubated in Fc block [99.5% FACS Buffer, 0.5% normal rat IgG (Invitrogen: 10700), 1 μg/ml 2.4G2 (BioXCell: BE0307)] at 4°C for 10 min prior to staining. If cells were stained for cell death using LIVE/DEAD staining, Ghost Dye Violet 510 Viability Dye (Cytek Biosciences: 13–0870-T100) or Ghost Dye Red 780 Viability Dye (Cytek Biosciences: 13–0865-T100) was included during incubation with Fc block. Cells were surface stained in 25 μL per 106 cells at 4°C for 15–20 min and washed in FACS buffer prior to acquisition. For intracellular cytokine and transcription factor staining, cells were rinsed with FACS buffer and surface stained as described above, fixed using the eBioscience Foxp3 Transcription Factor Fixation/Permeabilization Concentrate and Diluent (ThermoFisher Scientific: 00–8222) for 30 min at 4°C, and then washed with FACS buffer. Cells were then stained for intracellular cytokines and transcription factors in 50 μL 1X eBioscience Permeabilization Buffer (ThermoFisher Scientific: 00-8333-56) at 4°C for at least 1 hr. Cells were then washed in FACS buffer prior to acquisition.
TCF1/TCF7 (AF488; Cell Signaling Technologies, 6444S; clone: C63D9; RRID:AB_2797627), CD4 (PE-Cy5.5; ThermoFisher Scientific, 35-0042-82; clone: RM4–5; RRID:AB_11218300), Ki67 (AF647; BD Biosciences, 558615; clone: B56; RRID:AB_647130), CD90.2 (AF700; BioLegend, 105320; clone: 30-H12; RRID:AB_493725), CD98 (APC-Fire750; BioLegend, 128216; clone: RL388; RRID:AB_2750549), KLRG1 (BUV395; BD Biosciences, 740279; clone: 2F1; RRID:AB_2740018), CD8α (BUV563; BD Biosciences, 748535; clone: 53-6.7; RRID:AB_2872946), CD122 (BUV661; BD Biosciences, 741493; clone: TM-β1; RRID:AB_2870951), CD69 (BUV737; BD Biosciences, 612739; clone: H1.2F3; RRID:AB_2870120), CD11a (BUV805; BD Biosciences, 741919; clone: 2D7; RRID:AB_2871232), CD44 (BV605; BD Biosciences, 563058; clone: IM7; RRID:AB_2737979), CXCR3 (BV650; BioLegend, 126531; clone: CXCR3–173; RRID:AB_2563160), CD62L (BV711; BioLegend, 104445; clone: MEL-14; RRID:AB_2564215), TCR Vα2 (Super bright 780; Invitrogen, 78-5812-82; clone: B20.1; RRID:AB_2735086), CD25 (PE; BD Biosciences, 553866; clone: PC61; RRID:AB_395101), CD45.1 (PE-cf594; BD Biosciences, 562452; clone: A20; RRID:AB_11152958), T-bet (PE-Cy5; Invitrogen, 15-5825-82; clone: 4B10; RRID:AB_2815071), CD127 (PE-Cy7; BioLegend, 135014; clone: A7R34; RRID:AB_1937265), CD25 (APC; eBioscience, 17-0251-82; clone: PC61.5; RRID:AB_469366), B220 (BUV496; BD Biosciences, 612950; clone: RA3-6B2; RRID:AB_2870227), CXCR3 (BV421; BioLegend, 126529; clone: CXCR3–173; RRID:AB_2563100), CD27 (BV650; BioLegend, 124233; clone: LG.3A10; RRID:AB_2687192), CD43 (PE; BD Biosciences, 553271; clone: S7; RRID:AB_394748), CXCR3 (APC; BioLegend, 126512; clone: CXCR3–173; RRID:AB_1088993), CD98 (PE; BioLegend, 128208; clone: RL388; RRID:AB_2190813). Samples were run on a BD FACSymphony A3 (BD) and analyzed using FlowJo Software (Tree Star).
4. Results
4.1. Parameter estimation and simulation results of training data (Case 1)
In this section, we present the model parameter estimation and subsequent simulation results of the proposed model, highlighting its ability to capture the dynamic of the antigen-specific T cell population over the 25-day period. The model parameters were estimated as described in section 2.6 using the experimental data set 1 as the training data as described in section 3 and are shown in Table 2. Approximately 1.5 days of wall-time were required to solve the optimization problem on a i7-10700 CPU @ 2.90GHz Processor.
Using these optimized parameters, the SATvac model was run for 200 simulations to determine its fit of the training data set. The results of these simulations for the total OT-I T cell counts are presented as a cloud graph where the trajectories of the simulated T cell counts are shown compared to the experimental results (Fig 8). The simulated total OT-I T cell count was calculated as the sum of all OT-I cell states within the system boundary, including (A, BP, C, D, E, F, G, H, I, J, Ef and M). The corresponding experimental total was calculated as the sum of OT-I T cells measured across the collected tissues included in the system boundary. Each figure uses a linear scale to preserve the ability to interpret total cell numbers and avoid distortion in time points where cell counts approach zero. The model captures the general dynamic trend of the experimental data with more trajectories closer to the mean of the range than at the upper or lower extremes. The cloud graph shows that the stochasticity of the model captures the experimental variability in the T cell counts as well as the change in the variability through the course of the experiment as the stochasticity at days 5, 6, and 25 is very low compared to that at the peak of the T cell response (days 8 and 9). The model also accurately predicts the asymmetry of the distribution of trajectories around the mean, such that the distribution above the mean is stretched higher with a wider range than those below the mean. Importantly, the average trend and range of distributions are closely matched between the model and experiment, which supports the idea that the variability in the experimental data may be primarily driven by the inherent stochastic behaviour of the natural system rather than experimental variability.
Experimental data represent the sum of OT-I T cells measured across the collected tissues included in the system boundary. Simulated trajectories represent the sum of all modeled OT-I cell states within the aggregated system boundary. Experimental points represent individual data from (n = 4-5) mice per time point.
The SATvac model is able to capture the expansion, contraction, and the beginning of the memory phase by including the differentiation of OT-I T cells into effector (Ef) and memory precursor (M) phenotypes. Cloud graphs of the simulated trajectories for the number of Ef (Fig 9) and M (Fig 10) OT-I T cells showed that the model accurately captures the kinetics and variability of each cell type. The dynamic differences between Ef and M populations in the model arise from using different estimated parameters for Equation 4, where Ef cells have a higher initial rate of division () that decays more quickly (
) as well as a faster rate of apoptosis (
) compared to M cells. These differences result in faster expansion and contraction phases for Ef cells, while M cells divide more slowly and persist longer to maintain their expected role in long term immunity.
Experimental data represent the number of Effector T cells measured across the collected tissues included in the system boundary. Simulated trajectories represent the number of Effector T cells within the aggregated system boundary. Experimental points represent individual data from (n = 4-5) mice per time point.
Experimental data represent the number of Memory precursor T cells measured across the collected tissues included in the system boundary. Simulated trajectories represent the number of Memory precursor T cells within the aggregated system boundary. Experimental points represent individual data from (n = 4-5) mice per time point.
The cloud graph shown in Fig 11 demonstrates the number effector-memory (Ef-M) cells over time in 200 simulations. The distribution span in this figure closely matches ranges reported in literature [60,68], where differences between inbred mice have been reported. Overall, the model captures the stochastic behaviour of different types of T cell populations over a period of time and validates the ability of the model to replicate real immune responses.
Each gray line represents a single simulation. The dashed line represents the mean of the simulation results. The shaded blue area is the mean + of the simulation results.
4.2. Sensitivity analysis
To study the model robustness and to understand the key parameters that change both the magnitude and variability of the CD8+ T cell response, a normalized sensitivity analysis was performed. This analysis was done by changing each estimated parameter by ± 10% of its optimized baseline value. For each case, the model was simulated 100 times to account for stochasticity, and the results were averaged at each time point. In this analysis, we focused on a single model output defined as the average total CD8+ T cell count at time
based on 100 simulations using the optimized value of the parameter (
. The time dependent normalized sensitivity index
, is computed using the following formula:
The partial derivative was approximated using a centered finite difference:
Where:
is the average result of 100 simulation runs when parameter
is increased by 10%
is the average result of 100 simulation runs when parameter
is decreased by 10%
To summarize the sensitivity of each parameter over the simulation time, the following data are reported in Table 3:
: The maximum sensitivity value across all timepoints
: The minimum (most negative) sensitivity value across all timepoints
: The average absolute value of sensitivity, which demonstrates the overall impact regardless of direction to avoid cancellation when a parameter has both positive and negative effects at different time points.
Fig 12 shows representative results from six chosen parameters to show the range of different behaviours observed in this analysis. Table 3 summarizes the normalized sensitivity analysis for all tested parameters. The two parameters with the highest average absolute value of sensitivity, ( and
) both play important roles in antigen presentation to CD8+ T cells (Fig 12A, 12B).
represents the chance an A cell binds with a P cell, and
impacts the duration of antigen presentation by controlling the rate that BP cells leave the system boundary. The sensitivity of the system to these parameters is supported by previous vaccine studies that demonstrated the importance of the duration and magnitude of antigen presentation in generating CD8+ T cell responses [69–72].
Each subplot illustrates the effect of % variation to a selected parameter to its estimated baseline value on the total T cell counts over time. The shaded regions represent the full simulation range of the 100 simulation runs for each scenario (
in green,
in red and baseline in blue). The dashed lines represent the mean of the corresponding 100 simulations. Parameters shown are not necessarily the most sensitive but were chosen to demonstrate the range of responses observed in analysis.
Parameters having a more moderate impact on the total T cell number included the early rate of cell division after T cell activation (probability of division in cell types C to I) and the number of survived transferred OT-I T cell () (Fig 12C, 12D), both of which have been shown to impact T cell responses [27,71,73]. Changes to several parameters such as the rate that J cells leave the system (probability of J leaving) and J cells divide (probability of J to 2J) have little impact on the magnitude of the CD8+ T cell response (Fig 12E, 12F) [74]. Overall, Fig 12 demonstrates the effect of parameter changes on both mean kinetics and the variance (spread) of simulated trajectories. Parameters that change the proliferation rates such as
and
change both the mean of the responses and the simulation variance while less influential parameters such as probability of J leaving have little impact in either.
In addition, for each perturbation, the corresponding average objective function value over 100 simulations was computed and compared with the baseline objective function value obtained with the optimized parameter set. This allowed us to assess whether such perturbations improved or worsened the overall differences between simulations and experimental data. This comparison is shown in Fig 13. Consistent with the sensitivity analysis, parameters with the largest sensitivity indices, such as
and
, also produced the largest changes in the objective function value. Because the magnitude of the objective function values varies drastically across parameters, these values are displayed on a logarithmic scale to allow the differences to be visualized.
For each parameter the objective function value is the average over 100 simulations. Values are shown on a logarithmic scale to accommodate the wide range of changes.
4.3. Model validation on independent data (Case 2 and Case 3)
To evaluate the ability of the model to predict unseen data, it was validated using two independent experimental datasets (Case 2 and Case 3) that were not used during the parameter estimation phase. These datasets were generated using the same protocol as the training data set (Case 1), but they were collected on different dates and time points. Despite the identical experimental conditions, we observed distinctly different CD8+ T cell responses to vaccination. The key difference between these experimental results was in the magnitude of the total number of OT-I T cells at the peak of the response but not the overall kinetics of the immune response. While the main cellular behaviours, such as division, transition, and leaving rates should remain consistent across the experiments, the number of survived transferred OT-I T cells () may vary due to factors such as transfer efficiency and the fitness of the transferred OT-I T cells.
Although the number of naïve T cells injected is fixed across all cases, the number that reached the relevant lymphoid organ is not experimentally controllable [75]. It is important to highlight that even small variation () in the number of survived transferred OT-I T cell (
) can lead to significant differences in the magnitude of the immune response. Our findings together with our sensitivity analysis (section 4.2) showed that adjusting
alone, while keeping all other parameters constant, leads to changes in the magnitude of the OT-I T cell response. This behaviour reflects both our experimental observations and established literature, which reports that small differences in the number of precursor cells will translate into large differences in immune response [73,75].
To account for the variability of the number of survived transferred OT-I T cell between experiments, was optimized when fitting the different experimental data sets while all other parameters from case 1 remained fixed. For case 2, the best fit was obtained using
(Figs 14–16) and for case 3
(Figs 18–20).The results shown in Figs 14–20 demonstrate that the model successfully captured the trajectory of the total T cell counts as well as Ef cell and M cell subsets. Therefore, the model is capable of not only reproducing unseen data but also in capturing the biological stochasticity present in immune responses. The dynamics of the effector-memory cell subset are also reported in Figs 17 and 21. It should be noted that in case 3, measurements on day 8 were not collected. Therefore, the highest measured value in this dataset corresponds to the maximum among the sampled time points and should not be interpreted that the true biological peak occurred on day 7. Since both the experimental setup and kinetic parameters governing expansion and contraction were kept constant across all cases, we do not expect a change in the peak time (day 8). However, in this specific dataset, it may appear that the peak occurs at day 7. This is due to the absence of measurements on day 8, and it is not necessarily the actual time in which the peak occurs.
Experimental data represent the sum of OT-I T cells measured across the collected tissues included in the system boundary. Simulated trajectories represent the sum of all modeled OT-I cell states within the aggregated system boundary. Experimental points represent individual data from (n = 4-5) mice per time point.
Experimental data represent the number of Effector T cells measured across the collected tissues included in the system boundary. Simulated trajectories represent the number of Effector T cells within the aggregated system boundary. Experimental points represent individual data from (n = 4-5) mice per time point.
Experimental data represent the number of Memory precursor T cells measured across the collected tissues included in the system boundary. Simulated trajectories represent the number of Memory precursor T cells within the aggregated system boundary. Experimental points represent individual data from (n = 4-5) mice per time point.
Each gray line represents a single simulation. The dashed line represents the mean of the simulation results. The shaded blue area is the mean + of the simulation results.
Experimental data represent the sum of OT-I T cells measured across the collected tissues included in the system boundary. Simulated trajectories represent the sum of all modeled OT-I cell states within the aggregated system boundary. Experimental points represent individual data from (n = 4-5) mice per time point.
Experimental data represent the number of Effector T cells measured across the collected tissues included in the system boundary. Simulated trajectories represent the number of Effector T cells within the aggregated system boundary. Experimental points represent individual data from (n = 4-5) mice per time point.
Experimental data represent the number of Memory precursor T cells measured across the collected tissues included in the system boundary. Simulated trajectories represent the number of Memory precursor T cells within the aggregated system boundary. Experimental points represent individual data from (n = 4-5) mice per time point.
Each gray line represents a single simulation. The dashed line represents the mean of the simulation results. The shaded blue area is the mean + of the simulation results.
The simulation results presented in this study validate the ability of the model to capture both the immune response kinetics and its inherent biological variability. The cloud graphs demonstrate this stochastic behaviour with individual simulation runs producing a wide range of outcomes. The model clearly reflects experimental observations across different CD8+ T cell phenotypes, including high magnitude responses that are not modeled as experimental error but as a property of stochastic nature of immune response. The ability of the model to predict unseen experimental data sets using only one adjusted parameter ( shows the value of the model as a predicting tool and its generalizability.
4.4. Model validation of effector-memory T cells dynamics
The SATvac model was further evaluated using an independent set of experiments performed under the same experimental conditions explained earlier (see section 3, Fig 22A). In these experiments, effector-memory (Ef-M) T cells were identified by CD27 expression (B-C) [76,77] and quantified as a percentage of the total number effector (Ef) T cells at day 7 (Fig 22D). The resulting percentages of Ef-M cells among total Ef cells matched very closely to the corresponding percentages predicted by the SATvac model, obtained from 100 independent simulation runs (Fig 22D).
A) Experimental setup. B) Identification of Ef OT-I T cells, C) Identification of Ef-M cells based on CD27 expression, D) Experimental percentage of Ef-M cells among total Ef cells at day 7 and comparison of experimental Ef-M percentages with SATvac simulation results (100 runs).
In the SATvac model, the percentage of Ef cells that differentiate into Ef-M cells is fixed at 6%, a value estimated from published data and not fitted to the experimental dataset used to estimate the model parameters. Using the same 6% value, the simulated Ef-M fractions at day 7 showed excellent agreement with the new experimental measurements, providing strong validation that the model correctly captures the dynamics of effector-memory CD8+ T cells.
5. Discussion
In this work, we have developed a novel, agent-based stochastic model of CD8+ T cell responses to vaccination that integrates effector and memory T cell differentiation across tissues up to 25 days post immunization. The SATvac model tracks individual cells over time across key secondary lymphoid tissues and captures realistic biological dynamics. Unlike traditional deterministic models, this model incorporates stochasticity to demonstrate that the variability observed in antigen-specific CD8+ T cell responses following immunization can be largely explained by intrinsic and extrinsic stochasticity at the cellular level of the immune system. The SATvac model simulations reproduced a wide range of CD8+ T cell responses using a fixed set of parameters and captured not only average population dynamics but also the full range of variability observed in experimental data. These findings suggest that stochastic mechanisms coming both from T cell intrinsic and extrinsic factors collectively determine the magnitude and duration of the immune response.
The SATvac model provides information about the dynamics of effector-memory CD8+ T cell subset, even in the absence of direct experimental measurements for these cells in this study. By simulating the full range of effector-memory cell dynamics, including expansion and persistence, the model shows a distribution span that matches those reported in studies of inbred mice [60,68,78].
While changes in the number of survived transferred OT-I T cell () can partially explain the variability between mice, deterministic variation in (
) alone cannot replicate the different immune responses and timing differences observed even in one experimental set. This highlights that intrinsic stochastic mechanisms are required to explain the degree of variability observed in experimental data [79,80].
Choosing an agent-based, stochastic framework over a deterministic one was a biological necessity rather than just a technical preference [23]. Immune responses are governed by fundamentally random events. The activation, division and differentiation of CD8+ T cells depends on random molecular interactions and environmental cues that can vary between individual cells [23,81]. Deterministic models, even when extended with parameter uncertainty, can only capture mean or average behaviours, and thus miss the experimentally observed variability between mice and diversity of clonal trajectories possible within the same subject. [82]. In SATvac, every precursor T cell may proliferate, differentiate, or deactivate in random, independent ways. This assumption is consistent with experimental evidence from lymphocyte systems showing that division, death, differentiation and other related mechanism can behave as stochastic events [83]. This randomness produced trajectories whose range matches the variability observed in experimental data. Previous stochastic models also showed that small random fluctuations can shift the immune response between protection and failure. Therefore, including stochasticity makes the model both more realistic and more informative.
Beyond capturing the variability, sensitivity analysis identified the most influential parameters governing the CD8+ T cell response. In particular, the initial number of naïve OT-I T cells and the parameters defining early T cell activation were found to significantly change the modeled T cell response. The result of this analysis suggests that the stochasticity in early activation mechanisms has a primary role in determining the effector and memory outcomes, consistent with experimental evidence of early lineage in CD8+ T cells [25]. This analysis highlights the biological mechanisms that might be the most effective to target to enhance CD8+ T cell responses. In the future, coupling sensitivity analysis with the ability of the model to reproduce both the average and the variance of T cell dynamics would make SATvac a powerful tool for designing vaccines to elicit protective cellular immunity.
To enhance the current SATvac model, future work would replace distribution-based probabilities with first-principles mechanisms to determine the expansion and contraction of CD8+ T cells. Recent findings suggest that the proliferation dynamics by transcription factors such as c-Myc play a critical role in determining the magnitude and dynamics of the CD8+ T cell response. Specifically, the ability of a vaccine to induce and maintain levels of c-Myc during T cell activation predicts the magnitude of CD8+ T cell expansion and thus memory T cell formation [84–86]. Incorporating this mechanism into SATvac model will enhance the ability of the model to predict the full CD8+ T cell response from expansion to the contraction and memory phases. Such improvement would be a promising step toward the development of immunological models to predict patient immune responses and help improve the speed and efficacy of vaccine design.
Supporting information
S1 File. Experimental data used for model calibration and comparison.
The file Supplementary_data_V2 contains the experimental data used in the study for model calibration, simulation comparison, and quantitative analysis. The data include the measured experimental values as the reported time points used to evaluate the stochastic T-cell response model.
https://doi.org/10.1371/journal.pcbi.1014702.s001
(XLSX)
References
- 1. Mold JE, Modolo L, Hård J, Zamboni M, Larsson AJM, Stenudd M, et al. Divergent clonal differentiation trajectories establish CD8+ memory T cell heterogeneity during acute viral infections in humans. Cell Rep. 2021 May;35(8):109174.
- 2. Epstein JE, Tewari K, Lyke KE, Sim BKL, Billingsley PF, Laurens MB. Live Attenuated Malaria Vaccine Designed to Protect Through Hepatic CD8 T Cell Immunity. Science. 2011;334(6055):475–80.
- 3. Chen CY, Huang D, Wang RC, Shen L, Zeng G, Yao S, et al. A critical role for CD8 T cells in a nonhuman primate model of tuberculosis. PLoS Pathog. 2009;5(4):e1000392. pmid:19381260
- 4. Arunachalam PS, Charles TP, Joag V, Bollimpelli VS, Scott MKD, Wimmers F, et al. T cell-inducing vaccine durably prevents mucosal SHIV infection even with lower neutralizing antibody titers. Nat Med. 2020;26(6):932–40. pmid:32393800
- 5. Lin Y, Song Y, Zhang Y, Li X, Kan L, Han S. New insights on anti-tumor immunity of CD8 T cells: cancer stem cells, tumor immune microenvironment and immunotherapy. J Transl Med. 2025;23(1):341.
- 6. Raskov H, Orhan A, Christensen JP, Gögenur I. Cytotoxic CD8 T cells in cancer and cancer immunotherapy. Br J Cancer. 2021;124(2):359–67.
- 7. Han J, Khatwani N, Searles TG, Turk MJ, Angeles CV. Memory CD8+ T cell responses to cancer. Semin Immunol. 2020;49:101435. pmid:33272898
- 8. Baumann C, Fröhlich A, Brunner TM, Holecska V, Pinschewer DD, Löhning M. Memory CD8 T cell protection from viral reinfection depends on interleukin-33 alarmin signals. Front Immunol. 2019;10:1833.
- 9. Heidari M, Zhang H, Sunkara LT, Ahmad SM. Role of T Cells in Vaccine-Mediated Immunity against Marek’s Disease. Viruses. 2023;15(3):648. pmid:36992357
- 10. Ura T, Takeuchi M, Kawagoe T, Mizuki N, Okuda K, Shimada M. Current Vaccine Platforms in Enhancing T-Cell Response. Vaccines (Basel). 2022;10(8):1367. pmid:36016254
- 11. Billeskov R, Wang Y, Solaymani-Mohammadi S, Frey B, Kulkarni S, Andersen P. Low Antigen Dose in Adjuvant-Based Vaccination Selectively Induces CD4 T Cells with Enhanced Functional Avidity and Protective Efficacy. J Immunol. 2017;198(9):3494–506.
- 12.
Banerjee S, Majumder K, Gutierrez GJ, Gupta D, Mittal B. Immuno-informatics approach for multi-epitope vaccine designing against SARS-CoV-2. http://biorxiv.org/lookup/doi/10.1101/2020.07.23.218529 2020. Accessed 2024 November 18.
- 13. Nguyen TNT, Martin M, Arpin C, Bernard S, Gandrillon O, Crauste F. In silico modelling of CD8 T cell immune response links genetic regulation to population dynamics. ImmunoInformatics. 2024;15:100043.
- 14. Rappuoli R, Alter G, Pulendran B. Transforming vaccinology. Cell. 2024;187(19):5171–94. pmid:39303685
- 15. Gerner MY, Casey KA, Kastenmuller W, Germain RN. Dendritic cell and antigen dispersal landscapes regulate T cell immunity. J Exp Med. 2017;214(10):3105–22.
- 16. Pandit A, De Boer RJ. Stochastic Inheritance of Division and Death Times Determines the Size and Phenotype of CD8+ T Cell Families. Front Immunol. 2019;10:436. pmid:30923522
- 17. Buchholz VR, Flossdorf M, Hensel I, Kretschmer L, Weissbrich B, Gräf P, et al. Disparate individual fates compose robust CD8 T cell immunity. Science. 2013;340(6132):630–5.
- 18. Slack MD, Martinez ED, Wu LF, Altschuler SJ. Characterizing heterogeneous cellular responses to perturbations. Proc Natl Acad Sci. 2008;105(49):19306–11.
- 19. Fang M, Xie H, Dougan SK, Ploegh H, Van Oudenaarden A. Stochastic Cytokine Expression Induces Mixed T Helper Cell States. PLoS Biol. 2013;11(7):e1001618.
- 20. Chang JT, Wherry EJ, Goldrath AW. Molecular regulation of effector and memory T cell differentiation. Nat Immunol. 2014;15(12):1104–15. pmid:25396352
- 21. Shalek AK, Satija R, Shuga J, Trombetta JJ, Gennert D, Lu D, et al. Single-cell RNA-seq reveals dynamic paracrine control of cellular variation. Nature. 2014;510(7505):363–9. pmid:24919153
- 22. Feinerman O, Jentsch G, Tkach KE, Coward JW, Hathorn MM, Sneddon MW, et al. Single-cell quantification of IL-2 response by effector and regulatory T cells reveals critical plasticity in immune response. Mol Syst Biol. 2010;6:437. pmid:21119631
- 23. Abadie K, Pease NA, Wither MJ, Kueh HY. Order by chance: origins and benefits of stochasticity in immune cell fate control. Curr Opin Syst Biol. 2019;18:95–103. pmid:33791444
- 24. Feinerman O, Veiga J, Dorfman JR, Germain RN, Altan-Bonnet G. Variability and robustness in T cell activation from regulated heterogeneity in protein levels. Science. 2008;321(5892):1081–4. pmid:18719282
- 25. Gerlach C, Rohr JC, Perié L, van Rooij N, van Heijst JWJ, Velds A, et al. Heterogeneous differentiation patterns of individual CD8+ T cells. Science. 2013;340(6132):635–9. pmid:23493421
- 26. Egan JR, Abu-Shah E, Dushek O, Elliott T, MacArthur BD. Fluctuations in T cell receptor and pMHC interactions regulate T cell activation. J R Soc Interface. 2022;19(187):20210589. pmid:35135295
- 27. Ford ML, Koehn BH, Wagener ME, Jiang W, Gangappa S, Pearson TC. Antigen-specific precursor frequency impacts T cell proliferation, differentiation, and requirement for costimulation. J Exp Med. 2007;204(2):299–309.
- 28. Handel A, Li Y, McKay B, Pawelek KA, Zarnitsyna V, Antia R. Exploring the impact of inoculum dose on host immunity and morbidity to inform model-based vaccine design. PLOS Comput Biol. 2018;14(10):e1006505.
- 29. De Boer RJ, Oprea M, Antia R, Murali-Krishna K, Ahmed R, Perelson AS. Recruitment times, proliferation, and apoptosis rates during the CD8(+) T-cell response to lymphocytic choriomeningitis virus. J Virol. 2001;75(22):10663–9. pmid:11602708
- 30. De Boer RJ, Homann D, Perelson AS. Different dynamics of CD4 and CD8 T cell responses during and after acute lymphocytic choriomeningitis virus infection. J Immunol. 2003;171(8):3928–35.
- 31. Rane S, Hogan T, Lee E, Seddon B, Yates AJ. Towards a unified model of naive T cell dynamics across the lifespan. eLife. 2022.
- 32. Althaus CL, Ganusov VV, De Boer RJ. Dynamics of CD8 T Cell Responses during Acute and Chronic Lymphocytic Choriomeningitis Virus Infection. J Immunol. 2007;179(5):2944–51.
- 33. De Boer RJ, Yates AJ. Modeling T Cell Fate. Annu Rev Immunol. 2023;41:513–32. pmid:37126420
- 34. Kim PS, Levy D, Lee PP. Modeling and simulation of the immune system as a self-regulating network. Methods in Enzymology. Elsevier. 2009. p. 79–109.
- 35. Vlazaki M, Huber J, Restif O. Integrating mathematical models with experimental data to investigate the within-host dynamics of bacterial infections. Pathog Dis. 2019;77(8):ftaa001.
- 36. Eftimie R, Gillard JJ, Cantrell DA. Mathematical Models for Immunology: Current State of the Art and Future Research Directions. Bull Math Biol. 2016;78(10):2091–134. pmid:27714570
- 37. Hawkins ED, Turner ML, Dowling MR, Van Gend C, Hodgkin PD. A model of immune regulation as a consequence of randomized lymphocyte division and death times. Proceedings of the National Academy of Sciences. 2007;104(12):5032–7.
- 38. Subramanian VG, Duffy KR, Turner ML, Hodgkin PD. Determining the expected variability of immune responses using the cyton model. J Math Biol. 2008;56(6):861–92. pmid:17982747
- 39. Cheon H, Kan A, Prevedello G, Oostindie SC, Dovedi SJ, Hawkins ED, et al. Cyton2: A Model of Immune Cell Population Dynamics That Includes Familial Instructional Inheritance. Front Bioinform. 2021;1:723337. pmid:36303793
- 40. Lee S-W, Lee G-W, Kim H-O, Cho J-H. Shaping Heterogeneity of Naive CD8+ T Cell Pools. Immune Netw. 2023;23(1):e2. pmid:36911807
- 41. Satija R, Shalek AK. Heterogeneity in immune responses: from populations to single cells. Trends Immunol. 2014;35(5):219–29. pmid:24746883
- 42. Buckee CO, Recker M, Watkins ER, Gupta S. Role of stochastic processes in maintaining discrete strain structure in antigenically diverse pathogen populations. Proceedings of the National Academy of Sciences. 2011;108(37):15504–9.
- 43. Levin SA, Grenfell B, Hastings A, Perelson AS. Mathematical and computational challenges in population biology and ecosystems science. Science. 1997;275(5298):334–43. pmid:8994023
- 44.
Gregg RW, Shabnam F, Shoemaker JE. Bioinformatics. 2021;37(10):1428–34. https://doi.org/10.1093/bioinformatics/btaa969
- 45. Fatehi F, Kyrychko SN, Ross A, Kyrychko YN, Blyuss KB. Stochastic Effects in Autoimmune Dynamics. Front Physiol. 2018;9:45. pmid:29456513
- 46. Christian DA, Adams TA, Shallberg LA, Phan AT, Smith TE, Abraha M. cDC1 coordinate innate and adaptive responses in the omentum required for T cell priming and memory. Sci Immunol. 2022;7(75):eabq7432.
- 47. Ardia DR, Parmentier HK, Vogel LA. The role of constraints and limitation in driving individual variation in immune response. Funct Ecol. 2011;25(1):61–73.
- 48. Mempel TR, Henrickson SE, Von Andrian UH. T-cell priming by dendritic cells in lymph nodes occurs in three distinct phases. Nature. 2004;427(6970):154–9. pmid:14712275
- 49. Hwang LN, Yu Z, Palmer DC, Restifo NP. The in vivo expansion rate of properly stimulated transferred CD8+ T cells exceeds that of an aggressively growing mouse tumor. Cancer Res. 2006;66(2):1132–8. pmid:16424050
- 50. Kaech SM, Cui W. Transcriptional control of effector and memory CD8+ T cell differentiation. Nat Rev Immunol. 2012;12(11):749–61. pmid:23080391
- 51. Bajénoff M, Egen JG, Qi H, Huang AYC, Castellino F, Germain RN. Highways, byways and breadcrumbs: directing lymphocyte traffic in the lymph node. Trends Immunol. 2007;28(8):346–52. pmid:17625969
- 52. Chang JT, Palanivel VR, Kinjyo I, Schambach F, Intlekofer AM, Banerjee A, et al. Asymmetric T lymphocyte division in the initiation of adaptive immune responses. Science. 2007;315(5819):1687–91. pmid:17332376
- 53. Arsenio J, Kakaradov B, Metz PJ, Kim SH, Yeo GW, Chang JT. Early specification of CD8+ T lymphocyte fates during adaptive immunity revealed by single-cell gene-expression analyses. Nat Immunol. 2014;15(4):365–72. pmid:24584088
- 54. Kakaradov B, Arsenio J, Widjaja CE, He Z, Aigner S, Metz PJ, et al. Early transcriptional and epigenetic regulation of CD8+ T cell differentiation revealed by single-cell RNA sequencing. Nat Immunol. 2017;18(4):422–32. pmid:28218746
- 55. Sarkar S, Kalia V, Haining WN, Konieczny BT, Subramaniam S, Ahmed R. Functional and genomic profiling of effector CD8 T cell subsets with distinct memory fates. J Exp Med. 2008;205(3).
- 56. Joshi NS, Cui W, Chandele A, Lee HK, Urso DR, Hagman J, et al. Inflammation directs memory precursor and short-lived effector CD8(+) T cell fates via the graded expression of T-bet transcription factor. Immunity. 2007;27(2):281–95. pmid:17723218
- 57. Joshi NS, Kaech SM. Effector CD8 T cell development: a balancing act between memory cell potential and terminal differentiation. J Immunol. 2008;180(3):1309–15.
- 58. Xu T, Pereira RM, Martinez GJ. An updated model for the epigenetic regulation of effector and memory CD8 T cell differentiation. J Immunol. 2021;207(6):1497–505.
- 59. Kim EH, Suresh M. Role of PI3K/Akt signaling in memory CD8 T cell differentiation. Front Immunol. 2013;4:20. pmid:23378844
- 60. Kretschmer L, Flossdorf M, Mir J, Cho Y-L, Plambeck M, Treise I, et al. Differential expansion of T central memory precursor and effector subsets is regulated by division speed. Nat Commun. 2020;11(1):113. pmid:31913278
- 61. Hinderer K, Rieder U, Stieglitz M. Markovian decision processes with disturbances. Dynamic optimization. Cham: Springer International Publishing. 2016. p. 355–70.
- 62. Jia F, Lichti D. A Comparison Of Simulated Annealing, Genetic Algorithm And Particle Swarm Optimization In Optimal First-order Design Of Indoor Tls Networks. ISPRS Ann Photogramm Remote Sens Spatial Inf Sci. 2017;IV-2/W4:75–82.
- 63. Fontes DBMM, Homayouni SM, Gonçalves JF. A hybrid particle swarm optimization and simulated annealing algorithm for the job shop scheduling problem with transport resources. Eur J Oper Res. 2023;306(3):1140–57.
- 64. Shieh HL, Kuo CC, Chiang CM. Modified particle swarm optimization algorithm with simulated annealing behavior and its numerical verification. Applied Mathematics and Computation. 2011;218(8):4365–83.
- 65.
Tillett JC, Rao RM, Sahin F, Rao TM. Particle swarm optimization for the clustering of wireless sensors. Orlando, FL; 2003 p. 73. http://proceedings.spiedigitallibrary.org/proceeding.aspx?doi=10.1117/12.499080
- 66. Dzierszinski F, Pepper M, Stumhofer JS, LaRosa DF, Wilson EH, Turka LA, et al. Presentation of Toxoplasma gondii antigens via the endogenous major histocompatibility complex class I pathway in nonprofessional and professional antigen-presenting cells. Infect Immun. 2007;75(11):5200–9. pmid:17846116
- 67. Fox BA, Bzik DJ. De novo pyrimidine biosynthesis is required for virulence of Toxoplasma gondii. Nature. 2002;415(6874):926–9. pmid:11859373
- 68. Steinert EM, Schenkel JM, Fraser KA, Beura LK, Manlove LS, Igyártó BZ, et al. Quantifying Memory CD8 T Cells Reveals Regionalization of Immunosurveillance. Cell. 2015;161(4):737–49. pmid:25957682
- 69. Akondy RS, Johnson PLF, Nakaya HI, Edupuganti S, Mulligan MJ, Lawson B. Initial viral load determines the magnitude of the human CD8 T cell response to yellow fever vaccination. Proceedings of the National Academy of Sciences. 2015;112(10):3050–5.
- 70. Liu J, Hellerstein M, McDonnel M, Amara RR, Wyatt LS, Moss B, et al. Dose-response studies for the elicitation of CD8 T cells by a DNA vaccine, used alone or as the prime for a modified vaccinia Ankara boost. Vaccine. 2007;25(15):2951–8. pmid:17360078
- 71. Mayer A, Zhang Y, Perelson AS, Wingreen NS. Regulation of T cell expansion by antigen presentation dynamics. Proc Natl Acad Sci. 2019;116(13):5914–9.
- 72. Blair DA, Turner DL, Bose TO, Pham QM, Bouchard KR, Williams KJ. Duration of Antigen Availability Influences the Expansion and Memory Differentiation of T Cells. J Immunol. 2011;187(5):2310–21.
- 73. Badovinac VP, Haring JS, Harty JT. Initial T cell receptor transgenic cell precursor frequency dictates critical aspects of the CD8(+) T cell response to infection. Immunity. 2007;26(6):827–41. pmid:17555991
- 74. Yoon H, Kim TS, Braciale TJ. The cell cycle time of CD8+ T cells responding in vivo is controlled by the type of antigenic stimulus. PLoS One. 2010;5(11):e15423. pmid:21079741
- 75. Jenkins MK, Moon JJ. The role of naive T cell precursor frequency and recruitment in dictating immune response magnitude. J Immunol. 2012;188(9):4135–40.
- 76. Martin MD, Badovinac VP. Defining Memory CD8 T Cell. Front Immunol. 2018;9:2692.
- 77. Olson JA, McDonald-Hyman C, Jameson SC, Hamilton SE. Effector-like CD8⁺ T cells in the memory population mediate potent protective immunity. Immunity. 2013;38(6):1250–60. pmid:23746652
- 78. Milner JJ, Nguyen H, Omilusik K, Reina-Campos M, Tsai M, Toma C, et al. Delineation of a molecularly distinct terminally differentiated memory CD8 T cell population. Proceedings of the National Academy of Sciences. 2020;117(41):25667–78.
- 79. Boianelli A, Pettini E, Prota G, Medaglini D, Vicino A. A Stochastic Model for CD4+ T Cell Proliferation and Dissemination Network in Primary Immune Response. PLoS One. 2015;10(8):e0135787. pmid:26301680
- 80. Yuan Y, Allen LJS. Stochastic models for virus and immune system dynamics. Math Biosci. 2011;234(2):84–94. pmid:21945381
- 81. Graham AL, Tate AT. Are we immune by chance?. eLife. 2017.
- 82. Kadri A, Boudaoui A, Ullah S, Asiri M, Saqib AB, Riaz MB. A comparative study of deterministic and stochastic computational modeling approaches for analyzing and optimizing COVID-19 control. Sci Rep. 2025;15(1):11710. pmid:40188294
- 83. Duffy KR, Wellard CJ, Markham JF, Zhou JHS, Holmberg R, Hawkins ED. Activation-induced B cell fates are selected by intracellular stochastic competition. Science. 2012;335(6066):338–41.
- 84. Wang R, Dillon CP, Shi LZ, Milasta S, Carter R, Finkelstein D, et al. The transcription factor Myc controls metabolic reprogramming upon T lymphocyte activation. Immunity. 2011;35(6):871–82. pmid:22195744
- 85. Martin MD, Danahy DB, Hartwig SM, Harty JT, Badovinac VP. Revealing the Complexity in CD8 T Cell Responses to Infection in Inbred C57B/6 versus Outbred Swiss Mice. Front Immunol. 2017;8:1527. pmid:29213267
- 86. Martin MD, Sompallae R, Winborn CS, Harty JT, Badovinac VP. Diverse CD8 T Cell Responses to Viral Infection Revealed by the Collaborative Cross. Cell Rep. 2020 Apr;31(2):107508.