^{1}

^{2}

^{1}

^{3}

^{1}

^{4}

^{5}

^{6}

^{1}

The authors have declared that no competing interests exist.

Immune responses rely on a complex adaptive system in which the body and infections interact at multiple scales and in different compartments. We developed a modular model of CD4+ T cells, which uses four modeling approaches to integrate processes at three spatial scales in different tissues. In each cell, signal transduction and gene regulation are described by a logical model, metabolism by constraint-based models. Cell population dynamics are described by an agent-based model and systemic cytokine concentrations by ordinary differential equations. A Monte Carlo simulation algorithm allows information to flow efficiently between the four modules by separating the time scales. Such modularity improves computational performance and versatility and facilitates data integration. We validated our technology by reproducing known experimental results, including differentiation patterns of CD4+ T cells triggered by different combinations of cytokines, metabolic regulation by IL2 in these cells, and their response to influenza infection. In doing so, we added multi-scale insights to single-scale studies and demonstrated its predictive power by discovering switch-like and oscillatory behaviors of CD4+ T cells that arise from nonlinear dynamics interwoven across three scales. We identified the inflamed lymph node’s ability to retain naive CD4+ T cells as a key mechanism in generating these emergent behaviors. We envision our model and the generic framework encompassing it to serve as a tool for understanding cellular and molecular immunological problems through the lens of systems immunology.

CD4+ T cells are a key part of the adaptive immune system. They differentiate into different phenotypes to carry out different functions. They do so by secreting molecules called cytokines to regulate other immune cells. Multi-scale modeling can potentially explain their emergent behaviors by integrating biological phenomena occurring at different spatial (intracellular, cellular, and systemic), temporal, and organizational scales (signal transduction, gene regulation, metabolism, cellular behaviors, and cytokine transport). We built a computational platform by combining disparate modeling frameworks (compartmental ordinary differential equations, agent-based modeling, Boolean network modeling, and constraint-based modeling). We validated the platform’s ability to predict CD4+ T cells’ emergent behaviors by reproducing their differentiation patterns, metabolic regulation, and population dynamics in response to influenza infection. We then used it to predict and explain novel switch-like and oscillatory behaviors for CD4+ T cells. On the basis of these results, we believe that our multi-approach and multi-scale platform will be a valuable addition to the systems immunology toolkit. In addition to its immediate relevance to CD4+ T cells, it also has the potential to become the foundation of a virtual immune system.

Immune responses mediated by CD4+ T cells involve complex interactions among immune cells and molecules. Resting CD4+ T cells are activated by antigen-presenting cells and cytokines, further differentiate, and secrete cytokines to act against pathogens and abnormal cells. They also recruit other immune cells to the sites of infection. Depending on the cytokine milieu, activated CD4+ T cells may differentiate into various phenotypes, including T helper type 1 (Th1), T helper type 2 (Th2), T helper type 17 (Th17), and induced T regulatory cells (Tregs) [

Multi-scale modeling aims to integrate spatial, temporal, and organizational scales of biological systems. Such integration could be achieved by combining different modeling approaches, such as ordinary differential equations (ODEs) and partial differential equations (PDEs) for the chemical kinetics and transport of molecular species (in terms of concentrations) in and across different cells, organs, or tissues; agent-based modeling (ABM) for cells and molecules interacting in heterogeneous spatial environments; and ODE/PDE-based, rule-based, logic-based, or constraint-based models for intracellular dynamics. Genome-Scale Metabolic Models (GSMMs) have been developed for various human tissues and cell types [

Herein, with a view to comprehending the immune system as an integrated whole, we present a new multi-approach and multi-scale modeling framework that can be used to model diverse immune responses at molecular, cellular, and systemic scales. We demonstrated its capabilities by modeling the dynamics of CD4+ T cells in response to influenza infections (real and hypothetical) in different cytokine milieus, considering heterogeneous populations of Th0, Th1, Th2, Th17, and Treg subtypes and 11 cytokines in three spatial compartments (an infection site or target organ, lymphoid tissues, and a circulatory system). For each subtype, we modeled the intracellular signaling and gene regulation network underpinning the cell’s proliferation, differentiation into that subtype, as well as the whole-cell metabolism of that subtype. Using the framework, we reproduced experimental results available in literature, identified and explained new behaviors of CD4+ T cells, proving it is a tool wherein new regulations within the immune system may be implemented, and whose predictions may be experimentally validated.

The multi-scale model is divided into three compartments (

Schema representing the arrangement of models at three spatial scales. Cells are represented by discrete, autonomous agents that can differentiate into different subtypes, divide, and die. Each cell contains a constraint-based metabolic model for each phenotype and a logical model of signaling and gene regulatory pathways. The agents themselves reside in and travel between three isotropic compartments. Each compartment is associated with a set of cytokine concentrations, modeled by ordinary differential equations, that affect and are affected by the agents.

The aforementioned processes are represented using four different modeling frameworks.

(a) Active migration of agents and passive transport (carried by blood and lymph) of cytokines between compartments representing different organs. See

Different parameter sets can be used to model and simulate diverse immune phenomena. At the highest level, the simulation algorithm is a series of fixed time steps, the number and duration of which are determined by the duration and resolution of the modeled event.

Eizenberg-Magar

Each row represents the peak CD4+ T cell response in a Monte Carlo simulation, where 50 realizations of the modeled system were generated and averaged, thus explaining the continuous values (see

As illustrated in

Details about how the molecular models were used on their own can be found in Methods and

During our simulation corresponding to the IL6-TGFβ combination, both Th17 and Treg phenotypes were adopted by effector cells. Although TGFβ alone induced T cell differentiation into the Treg lineage, when IL6 was also present, T cells differentiated into Th17 or Treg in an IL6 concentration-dependent manner. The simulation with IL6 and TGFβ was repeated with multiples of the original IL6 concentration (20 ng/mL) used by Eizenberg-Magar

IL2 is a key cytokine in the metabolic regulation of CD4+ T cells because it induces both their proliferation and activation-induced cell death [

The results (

The population-level results shown in

Details about how the molecular models were used on their own can be found in Methods and

We used the standard specifications of the model to simulate the CD4+ T cell response to influenza infection. Due to the high computational costs associated with linear programming and exponential population growth, the initial number of naive agents in the draining lymph node was set to 10 to represent a portion of the node only. The initial cell counts in the other two compartments were set to respect the relative population sizes in the three compartments. There were no more sophisticated reasons behind the choice of 10. As for the influenza infection, the viral trajectory from an experimental study [

CD4+ T cell responses involve effectors and reactivated memory cells only. All cell counts are averages over 50 realizations. (a) Input signals representing acute infections with different peaks. The signal strength is in arbitrary units (A.U.). The signal labeled 0.8 represents the viral trajectory from an experimental study about influenza [

The simulated population dynamics are shown in

After validating the multi-scale model, we performed further simulations to test its ability to make predictions. To this end, the default input signal was modified in terms of its peak strength and long-term behavior, as explained in

The first robustness test centered on the input signal strength. We generated five input signals to model acute infections with different peak strengths (

The second robustness test centered on the input signal’s pattern. To simulate chronic infection, we produced a steady input signal, which does not decrease after peaking (

Oscillations can also be seen in the concentrations of secreted cytokines (

Concentration dynamics of the six cytokines secreted by CD4+ T cells during a hypothetical chronic infection; average of 50 realizations of the modeled system. The high-frequency oscillations were caused by the stochastic nature of the problem, not numerical artifacts. Details about the signal and simulation can be found in Methods and

To ensure that the results reported in the previous sections reflect the behavior of our computational platform, where information is passed between the constituting models, rather than just one parameter set, a sensitivity analysis of the model’s parameters was performed. Given the large number of parameters, a global sensitivity analysis was infeasible. Instead, we performed a local analysis focused on a few key parameters. We deemed the initial number of agents in each compartment highly important because a small cell count may artificially inflate random events’ impact. We also chose to assess the time interval between updates (

In a simulation using the default parameters, there are only 10 naive agents in the lymph node compartment initially, so the small cell count may inflate the impact of stochastic events spuriously, leading to drastic results such as the switch in

The default value of

We carried out a sensitivity analysis by repeating twice the simulation presented in ^{-3} that a naive cell will activate in such a simulation. If ^{-2}. If ^{-5}.

We increased and decreased this parameter by an order of magnitude and, in each case, we repeated the simulations illustrated by

We halved and doubled this parameter and in each case, we repeated the simulations illustrated by

In summary, the results reported throughout this section are robust with respect to parametric sensitivity. They do reflect the multi-scale model’s general behavior in passing information between the constituting models. In a model like ours, it is possible for a small cell count to inflate random events’ impact. However, when we increased the initial number of naive cells in each compartment, the switch-like behavior appeared at the same threshold. The presence of multiple time scales means

As reviewed in the introduction, numerous computational approaches have been used to model the immune system and its functions, particularly in relation to T cells. Although impressive and informative, those studies did not employ together methods such as logical modeling and genome-scale metabolic models. Furthermore, many mechanistic details about the metabolic regulation and plasticity of CD4+ T cells were not considered. As such, they could not capture essential nonlinear aspects of immune responses, such as emergent properties. Therefore, a more complex model is an important addition to the systems immunology toolkit. Many models are phenotypic in that they lack precise molecular and cellular details, so they cannot readily be informed by-and their outputs compared with-experimental and patient data [

To the best of our knowledge, our model is the first to integrate ABM, ODEs, GSMMs, and a logical model within a compartmental setup. In addition to tackling the drawbacks outlined above, the multi-approach strategy confers the advantage of modularity on the model. New agent types can be developed to represent other cell types (such as B cells), and integrated with the existing framework. This was how we expanded our existing logical model of CD4+ T cell differentiation [

The multi-scale nature of our model is very important because immune responses are multi-scale. The concentrations of cytokines at the systemic scale, the collective behavior of the cell population, and the heterogeneity within the population are interwoven due to nonlinear structures such as feedback loops. For example, the difference between our results in

At the systemic level, compartmental ordinary differential equations were chosen to model cytokine dynamics since the compartments are considered isotropic and molecules are indistinguishable. Because of the very large number of molecules, they can be solved using deterministic algorithms. At the cellular level, an agent-based approach was selected to serve the needs to model heterogeneity in the population and track each cell’s unique combination of attributes. While ordinary differential equations can describe how the sizes of several populations evolve, even cells within the same population (naive cells, for instance) have different attributes (cell cycle stage, for instance). We decided that cell expansion should be treated as a process (mammalian cell cycle) rather than a single event (division) to provide realistic links between the agent-based model and the models at the molecular level. In our simulations, for most agent behaviors (such as differentiation), the activity levels of the logical model were normalized before being passed to the agent-based models as probabilities. On the contrary, the activities of the nodes interfacing with the genome-scale metabolic models were used to alter the constraints on metabolic fluxes before the fluxes were optimized. A constraint-based approach was chosen over ordinary differential equations for the metabolic models to circumvent the lack of kinetic parameters and to allow a comprehensive (genome-scale) representation of metabolism. A disadvantage is the lack of transient dynamics. However, our algorithm mitigates the problem by updating the steady-state for each cell at every time step. Because this solution comes with a high computational cost, we built a library of optimized fluxes corresponding to the estimates of common logical model attractors.

Our model was able to reproduce diverse experimental observations made on CD4+ T cells, so we are confident in its validity. The model reproduced the ability of CD4+ T cells to differentiate into different phenotypes in a context-dependent manner, as well as the regulation of CD4+ T cell metabolism by IL2. We also reproduced the population dynamics of CD4+ T cells during influenza infection. These experimental observations were made in completely independent studies, and we emphasize that, except for the cytokine concentrations, they were not used to parameterize the model. The model was also able to make new predictions, as demonstrated by the simulation of emergent behaviors in virtual CD4+ T cell populations. The switch-like and oscillatory behaviors arise from interactions among biological phenomena taking place at different spatial scales. The switch-like behavior might help the body prevent chronic inflammation in the continuous presence of a small and non-threatening amount of antigen. In fact, switch-like behaviors have been observed in populations comprising other immune cell types. For instance, the chronic inflammation triggered by mast cells is a bistable switch [

Several opportunities to expand the presented modeling framework exist. The choice of a generic signal to represent pathogens/antigens and the rest of the immune system, with no feedback from the triggered response, can be improved upon by adding more mechanistic details. These unobserved components may also be a cause for non-identifiability concerns. When different parameter sets result in the same phenotype, a user might not distinguish redundancies intrinsic to CD4+ T cells from the unobserved components’ contributions. Another possible consideration is the use of well-stirred compartments due to the computational costs involved in solving a cell-based model considering cytokine diffusion and physical cell-cell interactions within each compartment. In our simulations, the agents demonstrated different sensitivity levels to different cytokine combinations, in contrast to the experimental evidence indicating a clear relation between the cytokine combinations and phenotypes [

We believe our framework provides the basis of a virtual immune system, well-suited to exploring the fundamental properties of the immune system and to modeling immune responses to specific diseases. Its multi-scale nature allows researchers to address cellular and molecular immunological problems with a systems approach by unraveling counterintuitive, nonlinear properties in the immune system.

The multi-scale model is divided into three isotropic compartments. In each compartment, IL2, IL4, IL6, IL12, IL17, IL18, IL21, IL23, IL27, IFNγ, and TGFβ are represented as time-dependent homogeneous concentrations. An agent representing a CD4+ T cell can sense all cytokines except IL17 and IL21, and it can secrete IFNγ, IL2, IL4, IL6, IL17, and IL21. The concentrations of the former are passed to the models at the cellular and molecular scales (see below), while the concentrations of the latter are influenced by those models. This setup is consistent with our previous study at the molecular scale [

_{i, j} is the concentration of cytokine j in compartment i (M), _{i, j} is the baseline production rate (M·h^{-1}), ^{deg}_{i, j} is the degradation rate constant (h^{-1}), _{t, i} is the input signal (antigen load and the rest of the immune system, dimensionless) in the compartment at time ^{in}_{i, j} is the production rate in response to the input signal (M·h^{-1}), ^{eff}_{i, j} is the number of cells/agents producing the cytokine in the compartment, ^{eff}_{i, j} is the rate of production by one cell/agent in the compartment (M·h^{-1}), and _{i} is a transport term (M·h^{-1}). Compartment 1 is the target organ, 2 the lymphoid tissues, and 3 the circulatory system. The transport terms are described by the following equations:
_{1}, _{2}, and _{3} are the compartments’ volumes in dm^{3}, _{a} is the rate of blood flow into the target organ (dm^{3}·h^{-1}), and _{b} is the rate of lymph flow into the circulatory system (dm^{3}·h^{-1}).

Cells are represented as discrete and autonomous agents defined by a set of attributes and behaviors. These agents respond to changes in both the cytokine concentrations and the input signal. A newly created agent represents a naive CD4+ T cell. They are created in all three compartments. Then, they undergo three major life cycle stages: activation, expansion, and contraction. An important point is that the agents are not synchronized, so any oscillatory behaviors must be explained in terms of driving forces external to the agents. For example, when the naive cell population drops below a threshold, a fixed number of cells are added to the compartments.

During the _{t,2}), the naive agent migrates from the target organ to the lymphoid tissues at a higher rate and stays there. Second, _{t,2} is the probability that the naive agent is stimulated in a time step, and if it gets stimulated, its

During the

During the

After the contraction stage, a memory agent undergoes the same three stages described above for naive agents. However, fewer stimuli are required for its activation, and the resulting activation level is higher [

Most of the attributes of each agent are determined by a logical model of signal transduction and gene regulation and constraint-based models of metabolism.

The logical model has three classes of inputs corresponding to 1) cytokine concentrations, provided by the ordinary differential equations, 2) receptor signaling (

The outputs of the logical model affect agent attributes and behaviors, such as phenotypes (Th0, Th1, Th2, Th17, and Treg), apoptosis, and cytokine secretion. They also parameterize the metabolic models. There are four classes of outputs representing 1) the transcription factors Tbet, GATA3, RORgt, and Foxp3, 2) the cytokines produced by the agent, 3) seven metabolic components providing the interface with the genome-scale, constraint-based models of metabolism, and 4) six cellular events (cell cycle progression, autophagy, memory formation, ACAD, AICD via the Fas pathway, and AICD via the B-cell lymphoma 2 (BCL2) pathway).

During a simulation, at each time step at the cellular and systemic scales, multiple simulations at the molecular scale (logical and constraint-based models) are run. At each discrete update of the logical model, the activation probability of each input component serves as an input to the logical model. Some of the outputs (seven metabolic components) are used to set the constraints in the metabolic models, which are then used to calculate the metabolic/synthesis rates in the agents. A detailed account of the simulation algorithm and the corresponding pseudocode can be found in

The multi-scale model has four classes of variables and parameters. They are agent attributes, variables/parameters specific to the compartments, settings for the numerical methods, and four parameters that can be varied for model calibration. All the variables and parameters are presented in Tables A—J in

Because the model contains stochastic elements, such as the logical model and most agent behaviors, multiple simulations (realizations of the model) must be performed to obtain robust averages of model outputs. A convergence study helps the modeler decide how many simulations are required to guarantee robustness. This step is necessary, following parameterization, to describe a specific immune phenomenon. The convergence study we ran before the validation and robustness studies presented in this paper, as carried out using the default, acute-infection-like input signal (

Text details the biological basis of the logical model, the variables and parameters of the multi-approach and multi-scale model, the simulation algorithm used to implement the multi-approach and multi-scale model, various input signals and cytokine combinations/dosages used in the presented simulations, the convergence study, estimation of logical model attractors, and model re-use. Figures include the logical model, convergence plots, and the results of sensitivity studies. Tables summarize all model variables and parameters, results of sensitivity studies, and a summary of the experimental results used for validation.

(DOCX)

The authors thank aSciStance Ltd. for their scientific advice and editing services.