Tutorials › Quantitative Systems Pharmacology (QSP) › T-Cell State Compartments in Tumor-Immune Models

Immuno-Oncology: Checkpoint Inhibitors and Cell Therapy · Tutorial 273 of 799

T-Cell State Compartments in Tumor-Immune Models

Learn to build and check a compartmental model that tracks T-cell state separately from whether cells are circulating or tumor-resident.

Advanced 12 min read

What You'll Learn

  • Define five T-cell states as operational model compartments rather than fixed, irreversible lineages.
  • Separate cell state from location using circulating and tumor-resident populations.
  • Write balance equations for state transitions, cell turnover, and exchange between locations.
  • Calculate state and location changes from hypothetical transition rates.
  • Check units, mass balance, positivity, and structural limitations in a compartment model.

Why Model T-Cell State and Location Separately?

A tumor-immune model can count all T cells as one population, but that total may combine cells with different histories and functions. A rise in tumor-associated T cells, for example, could reflect a change in the number of circulating cells entering the tumor, a change in cell survival, or a shift among T-cell states. A model that keeps state and location separate can represent these possibilities without assuming that every T cell behaves alike.

The essential modelling choice is to treat state and location as two distinct dimensions. A cell may be effector and circulating, or effector and tumor-resident; “effector” does not itself specify where the cell is. The same distinction applies to naive, primed, exhausted, and memory populations.

Definition: A T-cell state variable is a model quantity counting or measuring cells assigned to an operational category, such as naive (\(N\)), primed (\(P\)), effector (\(E\)), exhausted (\(X\)), or memory (\(M\)). A compartment is a modelled location or pool. Here, \(C\) denotes a circulating pool and \(T\) denotes cells resident in the tumor. Each state can have a separate variable in each location, such as \(E_C\) and \(E_T\). Unless stated otherwise, these variables are cell counts.

These categories are simplified descriptions for a model, not claims that each cell belongs to one permanent, sharply bounded biological lineage. Real T-cell phenotypes can be heterogeneous and can change over time. A state model groups cells according to the distinctions needed for the question and the available data.

Operational Meanings of the Five States

A model should define its states by what they mean within that model. The labels below provide a useful starting point while leaving the mechanisms of priming and immune signalling to more detailed descriptions.

  • Naive (\(N\)): T cells not yet assigned to an activated or antigen-experienced category in the model.
  • Primed (\(P\)): cells that have entered an activated, antigen-experienced state, but are not yet assigned to the model’s effector or memory categories. A model may treat priming as an input from an unmodelled process.
  • Effector (\(E\)): cells assigned to an active effector state. This label does not, by itself, specify a cytotoxic rate or guarantee a particular level of function.
  • Exhausted (\(X\)): cells assigned to a modelled exhaustion-associated state. It is distinct from cell death: exhausted cells remain in the population unless a separate loss process removes them.
  • Memory (\(M\)): cells assigned to a persistent antigen-experienced state that may, if the model includes it, return to an effector state.

A common starting transition structure is \(N\rightarrow P\), \(P\rightarrow E\), \(P\rightarrow M\), \(E\rightarrow X\), and \(E\rightarrow M\). A model may include \(M\rightarrow E\) when reactivation is relevant. These arrows are candidate flows, not universal rules: the model should include only transitions that serve its purpose and can be supported by assumptions or data. In particular, it should not assume that exhaustion is always irreversible or always reversible without stating that choice.

Writing the Compartment Balance Equations

Let \(x_{i,r}\) be the number of cells in state \(i\) and location \(r\), where \(i\in\{N,P,E,X,M\}\) and \(r\in\{C,T\}\). Time is measured in days in the examples. A transition rate \(q_{ij,r}\) is the per-day rate at which cells in state \(i\) move to state \(j\) while in location \(r\). A location-exchange rate \(k_i^{CT}\) describes movement from the circulating pool into the tumor for state \(i\); \(k_i^{TC}\) describes movement from tumor back to the circulating pool. These are effective model rates, not explanations of the biological mechanisms producing exchange.

Let \(s_{i,r}\) denote an input of cells per day, \(b_{i,r}\) a per-day birth or proliferation rate, and \(d_{i,r}\) a per-day death or other removal rate. For a state \(i\) with incoming state transitions, its balance in the circulating pool is:

$$ \frac{dx_{i,C}}{dt} = s_{i,C} + \sum_{j\ne i} q_{ji,C}x_{j,C} - x_{i,C}\sum_{j\ne i}q_{ij,C} + (b_{i,C}-d_{i,C})x_{i,C} - k_i^{CT}x_{i,C} + k_i^{TC}x_{i,T}. $$

The tumor equation has the same structure, with state-transition and turnover rates for the tumor location and the exchange terms reversed:

$$ \frac{dx_{i,T}}{dt} = s_{i,T} + \sum_{j\ne i} q_{ji,T}x_{j,T} - x_{i,T}\sum_{j\ne i}q_{ij,T} + (b_{i,T}-d_{i,T})x_{i,T} + k_i^{CT}x_{i,C} - k_i^{TC}x_{i,T}. $$

Every term has units of cells per day. For example, \(q_{PE,T}P_T\) is a flow from primed to effector cells in the tumor, while \(k_E^{CT}E_C\) is a flow of circulating effector cells into the tumor. The same cell must not be counted as both an incoming and an outgoing state transition in one balance; a flow leaving one state enters another.

Model assumption: These equations use continuous-time, well-mixed compartments and first-order transitions: over a short interval \(dt\), the expected fraction of cells leaving a state through a particular process is approximately its rate multiplied by \(dt\). Rates may differ by state and location. The basic form assumes that rates are specified functions of time or other model variables; it does not imply that they are constant in every application.

Deriving a Single-State Balance

The balance equation follows by accounting for gains and losses over a short interval. Consider tumor-resident effector cells, with primed-to-effector transition, effector-to-exhausted transition, cell death, and exchange with the circulating pool. For small \(dt\), the expected contributions are \(q_{PE,T}P_Tdt\) from state transition, \(k_E^{CT}E_Cdt\) from entry, and \((q_{EX,T}+d_{E,T}+k_E^{TC})E_Tdt\) lost from the effector-tumor state.

Adding the gains and subtracting the losses, then dividing by \(dt\) and taking the limit as \(dt\) approaches zero, gives:

$$ \frac{dE_T}{dt} = q_{PE,T}P_T+k_E^{CT}E_C - (q_{EX,T}+d_{E,T}+k_E^{TC})E_T + (b_{E,T}-d^{\mathrm{other}}_{E,T})E_T. $$

Here \(d_{E,T}\) denotes the specific death rate if it is already included among the losses; it should not be added a second time in \(d^{\mathrm{other}}_{E,T}\). Equivalently, use one death term and one proliferation term, as in the general balance equation. This notation reminder matters in implementation: writing a death contribution twice would artificially accelerate cell loss.

Worked Example: Net Change in Tumor-Resident Effector Cells

Suppose a hypothetical model has \(E_T=100\) cells and \(P_T=80\) cells. The primed-to-effector rate in the tumor is \(q_{PE,T}=0.12\) per day. Circulating effector cells enter the tumor at \(k_E^{CT}E_C=20\) cells per day. Effector-to-exhausted transition, death, and exit to circulation occur at rates \(0.08\), \(0.03\), and \(0.04\) per day, respectively. Ignore proliferation and other inputs.

The effector balance is:

$$ \frac{dE_T}{dt} = q_{PE,T}P_T+k_E^{CT}E_C - (q_{EX,T}+d_{E,T}+k_E^{TC})E_T. $$

Substituting the hypothetical values gives:

$$ \frac{dE_T}{dt} = (0.12\ \mathrm{day}^{-1})(80\ \mathrm{cells}) +20\ \mathrm{cells/day} - (0.08+0.03+0.04)\ \mathrm{day}^{-1}(100\ \mathrm{cells}) =9.6+20-15 =14.6\ \mathrm{cells/day}. $$

At this instant, the model predicts a net increase of 14.6 tumor-resident effector cells per day. This is an instantaneous rate, not a claim that the population will keep increasing linearly: the state variables and flows can change as the model evolves.

Worked Example: Primed-Cell Steady State

In a hypothetical circulating pool, suppose primed cells receive a constant input of \(24\) cells per day from an aggregated, unmodelled source. Primed cells leave that state through transition to effector cells at \(0.10\) per day and through death at \(0.05\) per day. Assume no proliferation or other gains. At steady state, set the net rate of change to zero:

$$ 0=24\ \mathrm{cells/day}-(0.10+0.05)\ \mathrm{day}^{-1}P_C. $$

Solving gives:

$$ P_C = \frac{24\ \mathrm{cells/day}}{0.15\ \mathrm{day}^{-1}} = 160\ \mathrm{cells}. $$

The predicted steady-state pool is 160 primed cells under these specified constant rates and input. This is not a general estimate of a biological population; changing the assumed input, transition, death, or proliferation terms changes the result.

Competing Transitions and Population Accounting

A transition rate is often interpreted as a hazard: conditional on a cell still being in its starting state, the rate describes its instantaneous propensity to leave through that process. If two processes compete, their rates add to give the total rate of leaving, provided the model treats them as independent first-order exits from the same state. The relative rates then determine how the exits divide.

Worked Example: Effector Cells Becoming Exhausted or Dying

Consider a hypothetical isolated population of 500 effector cells. There is no inflow, proliferation, or movement between locations during the five-day interval. The only exits are transition to the exhausted state at \(q_{EX}=0.06\) per day and death at \(d_E=0.04\) per day. Under constant rates, the total exit rate is \(0.10\) per day, so the remaining effector population is:

$$ E(5)=500e^{-(0.06+0.04)(5)} =500e^{-0.5} \approx 303.3\ \mathrm{cells}. $$

The cumulative number transitioning to exhaustion is the integral of the transition flow over time:

$$ X_{\mathrm{new}}(5) = \int_0^5 0.06(500)e^{-0.10t}\,dt = \frac{0.06(500)}{0.10}(1-e^{-0.5}) \approx 118.0\ \mathrm{cells}. $$

The cumulative number of deaths is:

$$ D(5) = \int_0^5 0.04(500)e^{-0.10t}\,dt = \frac{0.04(500)}{0.10}(1-e^{-0.5}) \approx 78.7\ \mathrm{cells}. $$

The accounting check is \(303.3+118.0+78.7=500.0\) cells, up to rounding. This equality holds because the example has no other flows. In a larger model, population accounting must also include entries, proliferation, and exchange between compartments.

Circulating and Tumor-Resident Cells Are Different Model Quantities

A circulating pool and a tumor-resident pool answer different questions. \(E_C\) describes effector cells in the modelled non-tumor circulating pool; \(E_T\) describes effector cells located in the tumor. The word “resident” denotes location in the model, not necessarily permanent residence. If the model allows exit from the tumor, the corresponding \(k_E^{TC}\) flow must appear as a loss from \(E_T\) and an equal gain to \(E_C\).

For exchange alone, the contributions to the two balances are:

$$ \left.\frac{dE_C}{dt}\right|_{\mathrm{exchange}} =-k_E^{CT}E_C+k_E^{TC}E_T, \qquad \left.\frac{dE_T}{dt}\right|_{\mathrm{exchange}} =+k_E^{CT}E_C-k_E^{TC}E_T. $$

Adding these terms gives zero. Thus, exchange redistributes effector cells between the two pools but does not change their combined number. This property is a useful check on the equations. It applies only to exchange: state transitions conserve total T-cell number only if they move cells between included states and do not include proliferation or death.

In applications, a “circulating” compartment may be a deliberately aggregated pool rather than a literal sample of blood. State clearly what it includes. For example, an input into the primed circulating pool may represent cells arriving from an unmodelled process; the model should not imply that priming itself occurred in the blood if the relevant priming site is outside the model.

Model Checks, Alternatives, and Limitations

The state-and-location structure is more informative than a single total-T-cell variable, but it also requires more parameters and, often, more data. Before interpreting a simulation, check the structure as well as the fit.

  • Check units. Each rate multiplied by a cell count must give cells per day. A transition rate in \(\mathrm{day}^{-1}\) cannot be added directly to a cell count or an input in cells per day.
  • Check flow conservation. Every transition or exchange flow should be subtracted from its source and added to its destination. A flow included in only one of those balances creates or removes cells unintentionally.
  • Check non-negativity. With non-negative initial counts, non-negative inputs, and valid non-negative transition rates, the continuous-time balance should not produce negative populations. Negative simulated values can signal an implementation or numerical-integration problem.
  • Check state definitions against measurements. If the assay does not distinguish the model’s categories, separate state variables may not be identifiable from the available observations.
  • Check whether the model’s lumping is defensible. A single “exhausted” state may hide substantial variation, while constant first-order rates may fail when transitions depend on changing conditions.

A single pooled T-cell variable is a reasonable alternative when only total abundance matters and there are no data or questions that require state or location distinctions. It has fewer parameters but cannot distinguish changes in state composition from changes in total number. A more detailed state model can make those distinctions, but may be difficult to estimate and validate. The appropriate structure is the simplest one that represents the question and the observations, not the one with the greatest number of compartments.

The equations here do not specify how cells are primed, what signals change transition rates, how cells enter the tumor mechanistically, or how a T-cell state affects tumor-cell killing. Those processes require additional model structure. Nor do the five labels guarantee that biological measurements map uniquely to model states. Treat the state definitions, transition network, and observation mapping as explicit assumptions to be tested, rather than as direct consequences of the labels.

Key takeaway: Represent state and location as separate dimensions. Define each population, write each inflow and outflow once, and verify that units and cell accounting agree before interpreting a simulated trajectory.

Check Your Understanding

Answer each question using the compartment definitions and balance principles above. Short solutions follow the questions.

  1. A model has 60 primed tumor-resident cells, with \(q_{PE,T}=0.05\) per day and \(q_{PX,T}=0.01\) per day. What is the combined outflow from \(P_T\) through these transitions?
  2. Effector cells move from circulation to tumor at \(0.02\) per day. If \(E_C=300\) cells, what is the entry flow, in cells per day?
  3. Why should an effector-to-exhausted transition be represented as a loss in \(E\) and a gain in \(X\), rather than as cell death?
  4. For an exchange-only model with \(k_E^{CT}=0.03\) per day, \(E_C=200\) cells, \(k_E^{TC}=0.01\) per day, and \(E_T=50\) cells, calculate the exchange contributions to both pools and their sum.

Solutions. (1) The combined outflow is \((0.05+0.01)\ \mathrm{day}^{-1}(60\ \mathrm{cells})=3.6\ \mathrm{cells/day}\). (2) The entry flow is \((0.02\ \mathrm{day}^{-1})(300\ \mathrm{cells})=6.0\ \mathrm{cells/day}\). (3) The transition changes the modelled state but keeps the cell in the included T-cell population, so the flow must enter \(X\); death removes the cell from that population. (4) The circulating contribution is \(-0.03(200)+0.01(50)=-5.5\ \mathrm{cells/day}\). The tumor contribution is \(+0.03(200)-0.01(50)=+5.5\ \mathrm{cells/day}\). Their sum is zero, as required for exchange alone.

Clinical Biostats