Tutorials › Quantitative Systems Pharmacology (QSP) › Worked Example: Simulating PD-1 Blockade Across T-Cell States

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

Worked Example: Simulating PD-1 Blockade Across T-Cell States

Build and iterate a small compartmental model to compare T-cell states and tumor burden with and without a fixed PD-1-blockade effect.

Advanced 10 min read

What You'll Learn

  • Define effector and exhausted T-cell compartments and a fixed blockade-effect input.
  • Write and interpret the coupled daily state-update equations.
  • Calculate tumor-burden updates from the simulated T-cell states.
  • Compare state trajectories and tumor burden across two hypothetical scenarios.
  • Check arithmetic, model assumptions, and positivity when interpreting a simulation.
  • Distinguish this compact discrete-time example from continuous-time or PK/PD models.

Why Simulate T-Cell States Separately?

A single total T-cell count can conceal an important distinction: cells in different functional states need not contribute equally to tumor killing. A model that separates effector and exhausted T cells can represent a simplified hypothesis in which PD-1 blockade shifts cells toward the effector state, while the resulting state composition changes the modeled tumor-killing pressure. The purpose here is to make that hypothesis concrete by iterating a small compartmental model and comparing two hypothetical scenarios.

This is a deterministic teaching example, not a fit to clinical data or a prediction for a particular patient. The blockade input is held constant, and the model does not explicitly represent drug concentrations, receptor occupancy, tumor-site penetration, or the full biology of T-cell activation. The distinction between checkpoint occupancy and functional rescue remains important: the blockade input below represents a stipulated functional effect, not an inferred effect from occupancy alone.

Definition: Let \(E_t\) and \(X_t\) denote the effector and exhausted tumor-reactive T-cell abundances at the start of day \(t\), measured in millions of cells. Let \(T_t\) denote tumor burden in normalized burden units. The dimensionless quantity \(B\), restricted to \(0\leq B\leq1\), is a fixed blockade-effect input: \(B=0\) is the no-blockade scenario, and larger values represent a stronger stipulated shift toward the effector state. It is not a drug concentration or receptor-occupancy measurement.

The Compartmental Model and Its Assumptions

Use a one-day time step. The state updates combine persistence, net expansion or loss, and transfer between the two T-cell states. The tumor update uses the current day's T-cell abundances, so the updated T-cell state affects tumor burden beginning in the following update.

$$ \begin{aligned} E_{t+1} &= (0.92+0.12B)E_t+0.04B X_t,\\ X_{t+1} &= 0.12(1-B)E_t+(0.96-0.04B)X_t,\\ T_{t+1} &= T_t\left[1.04-0.0015(E_t+0.20X_t)\right]. \end{aligned} $$

The coefficients are defined for a one-day step. The first equation says that some effector cells persist or expand, and that blockade increases this contribution; it also allows a blockade-dependent contribution from the exhausted compartment to the next effector abundance. The second equation includes transfer from effector to exhausted cells, reduced as \(B\) increases, and persistence of exhausted cells. These are phenomenological net updates, not literal probabilities of mutually exclusive cell fates: for example, the effector-origin coefficients can sum to more than one because net proliferation is included.

The tumor equation has a baseline daily multiplier of 1.04 and a reduction proportional to a weighted T-cell abundance. Effector cells have weight 1, while exhausted cells have weight 0.20. The coefficient 0.0015 therefore has units of inverse millions of cells, making the bracketed multiplier dimensionless. No direct \(B\) term appears in the tumor equation: blockade changes the modeled tumor trajectory through the cell-state updates, not through a separate direct tumor effect.

The example assumes nonnegative starting abundances, constant coefficients, a constant \(B\) over the simulated period, and no random variation. For the tumor update to preserve a nonnegative burden, its daily multiplier must be nonnegative. We will check this condition for the values used below. The simple equations also assume that the relevant biological effects can be summarized by these two states and one weighted-killing term.

A Useful Check on the State Equations

The blockade-dependent terms in the two state equations are equal in magnitude and opposite in sign. Adding the updates gives

$$ E_{t+1}+X_{t+1}=1.04E_t+0.96X_t. $$

This identity is a useful derivation and a useful implementation check. At a fixed current state, \(B\) redistributes the next-step abundance between compartments but does not directly change their sum in this model. The total at the next step can nevertheless differ between simulated scenarios later, because the scenarios then have different current values of \(E_t\) and \(X_t\). In addition, the tumor-killing weight \(E_t+0.20X_t\) rises when abundance is shifted from \(X_t\) to \(E_t\), all else being equal.

More explicitly, the difference in the next-step effector abundance between a blockade input \(B\) and no blockade, for the same current state, is

$$ E_{t+1}(B)-E_{t+1}(0)=B(0.12E_t+0.04X_t). $$

For nonnegative \(E_t\), \(X_t\), and \(B\), this immediate difference is nonnegative. It does not prove that every possible model with PD-1 blockade must increase effectors or reduce tumor burden; it follows only from the chosen equations and their assumptions.

Worked Example: Initialize the Two Scenarios

Take hypothetical starting values \(E_0=20\) million cells, \(X_0=80\) million cells, and \(T_0=100\) normalized tumor-burden units. Compare \(B=0\) with \(B=0.80\). First calculate the day-1 T-cell states.

With \(B=0\),

$$ \begin{aligned} E_1&=0.92(20)+0.04(0)(80)=18.40\text{ million cells},\\ X_1&=0.12(20)+0.96(80)=2.40+76.80=79.20\text{ million cells}. \end{aligned} $$

With \(B=0.80\), the effector retention coefficient is \(0.92+0.12(0.80)=1.016\), the exhausted-to-effector coefficient is \(0.04(0.80)=0.032\), and the effector-to-exhausted coefficient is \(0.12(0.20)=0.024\). Thus

$$ \begin{aligned} E_1&=1.016(20)+0.032(80)=20.32+2.56=22.88\text{ million cells},\\ X_1&=0.024(20)+0.928(80)=0.48+74.24=74.72\text{ million cells}. \end{aligned} $$

Both scenarios start with the same weighted abundance, \(E_0+0.20X_0=20+16=36\) million weighted cells. Therefore both have the same first tumor update:

$$ T_1=100[1.04-0.0015(36)]=100(0.986)=98.60\text{ normalized units}. $$

The T-cell state shift has occurred by day 1, but it affects the tumor update only when the day-1 states enter the next tumor calculation.

Iterating the Model and Comparing Trajectories

For each scenario, use the states at day \(t\) to calculate both the next state and the tumor update. Carry full precision during the arithmetic and round only when reporting results. The next example shows the updates through day 3.

Worked Example: Calculate the No-Blockade Trajectory

For \(B=0\), the day-1 values are \(E_1=18.40\) and \(X_1=79.20\). The weighted abundance for the tumor update is \(18.40+0.20(79.20)=34.24\) million weighted cells. Therefore

$$ T_2=98.60[1.04-0.0015(34.24)] =98.60(0.98864)=97.479904\text{ normalized units}. $$

The day-2 cell states are

$$ \begin{aligned} E_2&=0.92(18.40)=16.928\text{ million cells},\\ X_2&=0.12(18.40)+0.96(79.20) =2.208+76.032=78.24\text{ million cells}. \end{aligned} $$

Their weighted abundance is \(16.928+0.20(78.24)=32.576\) million weighted cells. Hence

$$ T_3=97.479904[1.04-0.0015(32.576)] =97.479904(0.991136) =96.615842130944\text{ normalized units}. $$

The day-3 states are \(E_3=0.92(16.928)=15.57376\) million cells and \(X_3=0.12(16.928)+0.96(78.24)=2.03136+75.1104=77.14176\) million cells. The tumor value \(T_3\) uses the day-2 states; calculating \(T_4\) would require the day-3 weighted abundance.

Worked Example: Calculate the Blockade Trajectory and Compare

For \(B=0.80\), use \(E_1=22.88\) and \(X_1=74.72\). The day-1 weighted abundance is \(22.88+0.20(74.72)=37.824\) million weighted cells, so

$$ T_2=98.60[1.04-0.0015(37.824)] =98.60(0.983264)=96.9498304\text{ normalized units}. $$

The next cell-state update is

$$ \begin{aligned} E_2&=1.016(22.88)+0.032(74.72) =23.24608+2.39104=25.63712\text{ million cells},\\ X_2&=0.024(22.88)+0.928(74.72) =0.54912+69.34016=69.88928\text{ million cells}. \end{aligned} $$

The day-2 weighted abundance is \(25.63712+0.20(69.88928)=39.614976\) million weighted cells. The corresponding tumor update is

$$ \begin{aligned} T_3 &=96.9498304[1.04-0.0015(39.614976)]\\ &=96.9498304(0.980577536)\\ &=95.066825809249\text{ normalized units}. \end{aligned} $$

The day-3 T-cell states are

$$ \begin{aligned} E_3&=1.016(25.63712)+0.032(69.88928) =26.04731392+2.23645696=28.28377088\text{ million cells},\\ X_3&=0.024(25.63712)+0.928(69.88928) =0.61529088+64.85725184=65.47254272\text{ million cells}. \end{aligned} $$

At day 3, the effector fraction among these two modeled states is \(15.57376/(15.57376+77.14176)=0.1680\), or 16.80%, without blockade. Under \(B=0.80\), it is \(28.28377088/(28.28377088+65.47254272)\approx0.3017\), or 30.17%. These are model-state fractions, not measurements of all T cells in a tumor.

The day-3 tumor-burden difference is \(96.615842130944-95.066825809249=1.549016321695\) normalized units. Relative to the no-blockade burden, that is \(1.549016321695/96.615842130944=0.01603\), or about 1.603% lower under \(B=0.80\) in this hypothetical model through day 3. This is a model comparison under specified assumptions, not evidence that the same effect would occur in patients.

The table summarizes the rounded trajectories. Tumor burden at each day is calculated using the T-cell state from the preceding day, as specified by the update equations.

Day\(E_t\), B=0 (million)\(X_t\), B=0 (million)\(T_t\), B=0 (units)\(E_t\), B=0.80 (million)\(X_t\), B=0.80 (million)\(T_t\), B=0.80 (units)
020.0080.00100.020.0080.00100.0
118.4079.2098.6022.8874.7298.60
216.9378.2497.4825.6469.8996.95
315.5777.1496.6228.2865.4795.07

Diagnostics, Alternatives, and Limitations

A simulation should be checked as it is constructed, not only interpreted after the final time point. In this example, useful checks include:

  • Recalculate the state sum. For any current \(E_t\) and \(X_t\), the updates must satisfy \(E_{t+1}+X_{t+1}=1.04E_t+0.96X_t\), regardless of \(B\).
  • Check the treatment input and units. \(B\) must be between 0 and 1 as defined here, cell abundances must be in millions, and the tumor-killing coefficient must use the matching inverse-abundance units.
  • Check nonnegativity. The state updates have nonnegative coefficients over the stated range of \(B\), so nonnegative states remain nonnegative. For tumor burden, check \(1.04-0.0015(E_t+0.20X_t)\geq0\) at every step. If it fails, a negative tumor burden is not a meaningful biological prediction; it signals that the update rule or parameter range is being used outside its sensible domain.
  • Check the time alignment. \(T_{t+1}\) uses \(E_t\) and \(X_t\), not \(E_{t+1}\) and \(X_{t+1}\). Mixing these conventions produces a different model.

A common mistake is to treat \(B\) as if it directly multiplied tumor killing, then claim that the tumor changes immediately when blockade is switched on. In these equations, the first tumor update is identical in both scenarios because the initial states are identical and \(B\) does not occur in the tumor equation. The blockade first alters the T-cell update; the altered state composition then changes a later tumor update.

A continuous-time alternative would specify differential equations for \(E\), \(X\), and \(T\), with rates per unit time, and solve them numerically or analytically where possible. That approach can represent changes within a day and time-varying inputs, but it requires rates and numerical integration choices. A more detailed PK/PD model could make blockade time-varying and connect drug exposure to functional effects; it would also require additional parameters and data. The present fixed-input discrete-time model is easier to audit by hand, but it cannot represent dosing schedules, delays beyond its one-step structure, or biological heterogeneity within either T-cell compartment.

Finally, the comparative result is conditional on the assumed transition coefficients, initial conditions, tumor-growth multiplier, and killing weights. The state equations deliberately simplify priming, recruitment, cytokine feedback, suppressive cells, antigen variation, and other processes. The simulation demonstrates how one specified mechanism can generate contrasting trajectories; it does not establish that PD-1 blockade caused a clinical response or that this model is uniquely supported by data.

Check Your Understanding

Answer each question using the equations and assumptions stated above. Solutions follow the questions.

  1. For \(B=0\), verify the day-1 exhausted-cell update from \(E_0=20\) and \(X_0=80\). Why is 78.40 not the correct result?
  2. For \(B=0.80\), calculate the weighted abundance from the day-1 states and explain why it is used for the \(T_2\) update.
  3. Show from the equations that blockade does not directly change \(E_{t+1}+X_{t+1}\) when the current state is held fixed.
  4. Why are the two \(T_1\) values equal in the worked simulation, even though \(E_1\) differs between scenarios?
  5. What must be checked if a simulated tumor update yields a negative \(T_{t+1}\)?

Solutions. (1) \(X_1=0.12(20)+0.96(80)=2.40+76.80=79.20\) million cells; 78.40 is an arithmetic error. (2) \(22.88+0.20(74.72)=22.88+14.944=37.824\) million weighted cells. The tumor update \(T_2\) uses the day-1 states by definition of the time indexing. (3) Adding the state equations cancels \(+B(0.12E_t+0.04X_t)\) and \(-B(0.12E_t+0.04X_t)\), leaving \(1.04E_t+0.96X_t\). (4) Both use the same initial weighted abundance, \(20+0.20(80)=36\), and \(B\) is absent from the tumor equation, so \(T_1=100[1.04-0.0015(36)]=98.60\) in both. (5) Check whether \(1.04-0.0015(E_t+0.20X_t)\) is nonnegative and whether the units and parameter range are appropriate. A negative multiplier indicates that this simple update is outside a sensible range for the chosen state values or parameters.

Clinical Biostats