1 Introduction

Programmed cell death protein 1 (PD-1), a member of the CD28 family, is a key immune checkpoint receptor expressed on the surface of activated T cells (Ai et al. 2020). After engagement with its ligands, mainly programmed cell death ligand 1 (PD-L1), PD-1 is activated, which leads to the inhibition of T cell activation, proliferation, cytokine production and cytotoxic T lymphocytes killer functions, and eventually the death of activated T cells. It is acknowledged that as a negative modulatory signalling pathway for the activation of T cells, the PD-1/PD-L1 axis plays a crucial role in the progression of a tumour by altering the status of immune surveillance (Yi et al. 2018). PD-L1 expression in tumour cells is evaluated for many cancers, including lymphocytoma (Yang et al. 2019), prostate cancer (Li et al. 2019), soft-tissue sarcoma (Bertucci et al. 2017), adrenocortical carcinoma (Billon et al. 2019), breast cancer (Sabatier et al. 2015), renal cell carcinoma (Kumar et al. 2019), glioma (Filippova et al. 2018) and non-small cell carcinoma (Bylicki et al. 2018). Elevated PD-L1 expression on tumour cells results in the exhaustion of T cells, and the escape of tumour cells from host immune surveillance.

Immunotherapies that target the PD-1/PD-L1 axis have shown unprecedented success for the therapy of some refractory tumours by showing potent and durable anti-tumour effects (Yi et al. 2018). For example, immunotherapy with monoclonal antibodies to PD-1, such as nivolumab and pembrolizumab, significantly improved the survival of patients with metastatic NSCLC (Bassanelli et al. 2018). However, the response rate of PD-1/PD-L1 inhibitors in overall patients is unsatisfactory, and the relatively low response rate in overall patients limits the application in clinical practice (Yi et al. 2018). Therefore, prior to PD-1/PD-L1 inhibitors therapy, it is important to determine the subset of patients that can benefit from PD-1/PD-L1 inhibitors.

Tumour microenvironment-related factors such as tumour cell PD-L1 expression status, the density of tumour infiltrating lymphocyte, and tumour mutational burden, have been shown to influence treatment effect of anti-PD-1 and anti-PD-L1 therapies (Yi et al. 2018). The status of PD-L1 is widely proposed as a biomarker that can predict the response to treatment, and the role of PD-L1 expression has been investigated in many studies and clinical trials (Kumar et al. 2019; Li et al. 2019; Filippova et al. 2018; Yi et al. 2018). However, the conclusions from multiple trials are not consistent. In general, it is believed that high PD-L1 expression is related to increased response rate and clinical benefit in anti-PD-1 and anti-PD-L1 therapy (Yi et al. 2018). The inherent heterogeneity of PD-L1 may cause the contradictory roles of PD-L1 as a predictive biomarker for the response to anti-PD-1 and anti-PD-L1 seen in clinical trials (McLaughlin et al. 2016; Soliman et al. 2014).

One of the obstacles to profiling the immune microenvironment landscape by PD-L1 is that PD-L1 expressions are shown to vary not only across individual patients but also during cancer evolution and under chemotherapy/radiotherapy treatment in an individual patient (Yi et al. 2018). Overexpression of PD-L1 in tumour tissues often indicates adverse clinical outcomes. A study for analyzing the expression and significance of CD47, PD-1 and PD-L1 has shown that the overall one-year survival rate of patients with high PD-L1 expression is lower than that of patients with low PD-L1 expression (Yang et al. 2019). The high PD-L1 expression is also shown to be associated with high-grade tumours (Inman et al. 2007) and poor prognosis for NSCLC (Mu et al. 2011). A significant shift from PD-L\(1^-\) to PD-L\(1^+\) status is found in 50% advanced esophageal adenocarcinoma patients post chemo-radiation (Yi et al. 2018). A significant increase in PD-L1 expression is found also in breast cancer tissues after chemotherapy (Uhercik et al. 2017).

Due to the intratumoral heterogeneity and dynamic alteration of PD-L1 expression along with cancer progression and treatment, it is difficult to accurately display the actual status of PD-L1 either experimentally or clinically. Therefore, it is valuable to establish a predictive mathematical model for the dynamic alteration of PD-1 and PD-L1 expression states based on clinical data, which is meaningful for profiling the tumour immune microenvironment landscape during cancer progression and treatment.

Recently there have been some achievements in modelling PD-1/PD-L1 blockades with the heterogeneity of PD-L1 expression. Kaveh and Fu (2021) developed an ordinary differential equations model of cancer immunotherapy, by assuming cancer cells as binary populations with either high PD-L1 expressing or low PD-L1 expressing, to quantify the efficacy of combination therapy with immune-checkpoint blockades. In this model, the heterogeneity of PD-L1 was averaged in a cell population level, which is further considered as binary, that is, high PD-L1 expressing or low PD-L1 expressing populations. The dynamic evolution of PD-L1 and PD-1 expression status was not considered. Similarly, Galante et al. (2012) explored the dynamic of PD-L1-positive and PD-L1-negative cancer cell populations by fitting experimental lysis data in vitro with an ordinary differential equations model of cytotoxic T cells and cancer cells. In this work, the heterogeneity of PD-L1 was also averaged at the cell population level, which was classified as PD-L1-positive and PD-L1-negative. Furthermore, the effects of the presence or absence of PD-L1 were modelled as the difference in two apoptosis-related parameters. The dynamic evolution of PD-L1 expression status was not considered during cancer progression.

In our previous work (Lai and Friedman 2017; Lai et al. 2018), we focused on the scheduling of immune checkpoint inhibitors (anti-PD-1 or anti-PD-L1) in combination with other anti-cancer drugs such as other immunotherapy, chemotherapy or targeted therapy by modelling tumour growth with the application of partial differential equations with free tumour boundary. The spatial heterogeneity distributions of cancer cells, T cells and PD-L1 (also PD-1) expressions were demonstrated in these models, but the expression of PD-L1 was assumed to be proportional to the density of cancer cells and T cells. Furthermore, these models considered the growth and control of the early stage of the tumour. Nikolopoulou et al. (2018) studied the stability and bifurcation dynamics of a simplified tumour-immune model in the cases with and without anti-PD-1. In this context of modelling with ordinary differential equations, the dynamics approached steady states in a very short time period. However, the dynamic changes of PD-L1 expression occur in a longer time period (in years) with the progression of tumour stages and tumour grades, such as in the patients of breast cancer (Muenst et al. 2014), urothelial cancer (Nakanishi et al. 2007) and esophageal carcinoma shown in The Cancer Genome Atlas database (TCGA, see Sect. 3). The goal of this study is to explore the dynamic alteration of PD-L1 heterogeneity during cancer development, progression and treatment by technics of mathematical modelling.

Cancer is a group of diseases involving abnormal cell growth, during which abnormal regulations in stem cell regeneration are essential for the dynamics of cancer development. To model heterogeneous stem cell regeneration, Lei proposed a general mathematical model framework, with application to cancer evolution dynamics that involves plasticity and heterogeneity in cancer cells (Lei 2020a, b). In this model framework, the dynamics of stem cell regeneration were modelled as a G0 phase cell cycle model, which yields the following differential-integral equation for the evolution of cell counts (Lei 2020a, b),

$$\begin{aligned} \left\{ \begin{aligned}&\frac{\partial Q(t, \mathbf {x})}{\partial t} = -Q(t, \mathbf {x})(\beta (\hat{Q}(t), \mathbf {x})+\kappa (\mathbf {x})) \\&\qquad + 2 \int \beta \left( \hat{Q}(t-{\tau (\mathbf {y}))}, \mathbf {y}\right) Q(t-\tau (\mathbf {y}), \mathbf {y}) e^{-\mu (\mathbf {y}) \tau (\mathbf {y})} p(\mathbf {x}, \mathbf {y}) d \mathbf {y}, \\&\hat{Q}(t) = \int Q(t, \mathbf {x}) \xi (\mathbf {x}) d \mathbf {x}. \end{aligned}\right. \end{aligned}$$
(1)

Here, a vector \(\mathbf {x}\) is introduced to represent the epigenetic state of a cell which associates with specific genes that may affect the signaling pathways controlling cell cycle progression, apoptosis, or cell growth, and \(Q(t, \mathbf {x})\) denotes the cell count at time t with the epigenetic state \(\mathbf {x}\). During cell cycle progression, cells in the resting phase either enter the proliferation phase with a rate \(\beta \) or are removed from the resting pool with a rate \(\kappa \) due to differentiation or death. Proliferating cells undergo apoptosis with a rate \(\mu \). The proliferation rate \(\beta \), apoptosis rate \(\mu \), differentiation rate \(\kappa \), and the duration of proliferating phase \(\tau \) are cell-specific and dependent on the epigenetic state \(\mathbf {x}\) of each individual cell. The stem cell proliferation is also regulated by the cells in the niche via releasing cytokines, and \(\hat{Q}(t)\) denotes the total concentration of effective cytokines that regulate cell proliferation, where \(\xi (\mathbf {x})\) indicates the effective cytokine signal produced by a cell with state \(\mathbf {x}\).

The random transition of cell epigenetic states during cell division is described by the inheritance probability \(p(\mathbf {x}, \mathbf {y})\), which represents the probability that a daughter cell of state \(\mathbf {x}\) comes from a mother cell of state \(\mathbf {y}\) after cell division. The inheritance probability satisfies \(\int p(\mathbf {x}, \mathbf {y})d\mathbf {x} = 1\) for any \(\mathbf {y}\).

The model (1) describes the evolution of the cell numbers with various epigenetic states. It was shown that with appropriate kinetic rates and inheritance function, Eq. (1) could model various biological processes of stem cell regeneration, such as tissue growth, degeneration, and abnormal growth, and also tumour development induced by driver gene mutations (Lei 2020a).

Based on the above model framework, in Sect. 2, we establish a mathematical model for the dynamics of cancer cells with heterogeneities in both stemness and PD-L1 expression state, and T cells with heterogeneity in PD-1 expression. The computational framework and the main results are shown in Sect. 3, where we investigate the dynamic alteration of PD-L1 expression during tumour development, progression and treatment by model simulation, and compare our simulation results with esophageal carcinoma (ESCA) patient data from TCGA. We also explore the adaptive anti-PD-L1 therapy schedules under the dynamic alteration of PD-L1 expression. The conclusion is shown in Sect. 4.

2 Mathematical model formulation

2.1 The mathematical model

In modelling tumour growth, we consider the heterogeneity of cancer cells with different stemness states (\(x_0\)) and PD-L1 expression states (\(x_1\)), and the heterogeneity of T cells with different PD-1 expression states (\(x_2\)). Let \(C(t, x_0, x_1)\) denotes the cancer cells number with stemness state \(x_0\) and PD-L1 expression state \(x_1\) at time t. Let \(T_0(t, x_2)\) and \(T(t, x_2)\) denote resting T cells and effector T cells with PD-1 expression state \(x_2\) at time t, respectively.

The schematic representation of the model of heterogeneous tumour-immune dynamics is shown in Fig. 1. We assume that during tumour development, cancer cells enter the proliferation phase with a rate \(\beta _C\), and undergo apoptosis with a rate \(\kappa _C\). Proliferating cancer cells undergo apoptosis with a rate \(\mu _C\). The kinetic rates of each cancer cell depend on its stemness state \(x_0\) and PD-L1 expression state \(x_1\). Resting T cells enter the proliferation phase with a rate \(\beta _T\), or differentiate into effector T cells with a rate \(\kappa _T\) as activated by cancer antigen presentation. Proliferating T cells undergo apoptosis with a rate \(\mu _0\). Effector T cells undergo apoptosis with a rate \(\mu _T\). The kinetic rates of each T cell depend on its PD-L1 expression state \(x_2\). Effector T cells kill cancer cells with a rate \(\eta \), which is inhibited by the PD-1/PD-L1 pathway. The stemness state \(x_0\), PD-L1 expression state \(x_1\) and PD-1 expression state \(x_2\) vary during cell division according to the inheritance probability, \(p_0({x_{0}},{y_{0}})\), \(p_1({x_{1}},{y_{1}})\) and \(p_2({x_{2}},{y_{2}})\), respectively.

Fig. 1
figure 1

Schematic diagram for cancer cell development and interaction with T cells. Here, \(C(t, x_0, x_1)\) represents the cancer cells number with stemness state \(x_0\) and PD-L1 expression state \(x_1\) at time \(t, T_0(t, x_2)\) indicates the count of resting T cells with PD-1 expression state \(x_2\) at time \(t, T(t, x_2)\) represents the count of effector T cells with PD-1 expression state \(x_2\) at time t. Cancer cells enter the proliferation phase with a rate \(\beta _C\), then undergo apoptosis with a rate \(\mu _C\), or undergo cell division during which the stemness state \(x_0\) and the PD-L1 expression state \(x_1\) vary according to the inheritance probability function \(p_0({x_{0}}, {y})\) and \(p_1({x_{1}}, {y})\), respectively. Resting T cells enter the proliferation phase with a rate \(\beta _T\), and then undergo apoptosis with a rate \(\mu _0\), or undergo cell division during which the PD-1 expression state \(x_2\) varies according to the inheritance probability functions \(p_2({x_{2}}, {y})\). Resting T cells are activated by cancer antigen presentation and then differentiate into effector T cells with a rate \(\kappa _T\), which kill cancer cells. The killing effect (\(\eta \)) is inhibited by the PD-1/PD-L1 pathway

Based on the model (1) and the above assumptions, the dynamics of cancer cells, \(C(t,x_0,x_1)\), resting T cells, \(T_0(t,x_2)\), and effector T cells, \(T(t,x_2)\) are modelled by the following differential-integral equations

$$\begin{aligned} \left\{ \begin{aligned}&\frac{\partial C(t, x_0, x_1)}{\partial t} = - \left[ \beta _C\left( {\hat{C}}(t), x_0\right) + \kappa _C (x_0, x_1) + \int _0^1 \eta (x_1,x_2) T(t, x_{2}) d x_{2} \right] \\&\qquad \qquad \quad \qquad \qquad \times C(t, x_0, x_1) \\&\qquad \qquad \quad \qquad \qquad + 2 \int _0^1 \int _0^1\beta _C(\hat{C}(t-\tau _C),y_0) C(t-\tau _C,y_0,y_1) e^{-\mu _C \tau _C}\\&\quad \qquad \qquad \qquad \quad \quad \times p_0(x_0,y_0) p_1(x_1,y_1,y_0) d y_0 d y_1, \\&\frac{\partial T_0(t,x_2)}{\partial t} = - \left[ \beta _{T}(\hat{T}(t), {\hat{C}}(t)) + \kappa _{T}({\hat{C}}(t), x_2)\right] T_0(t,x_2) \\&\qquad \qquad \quad \qquad \qquad + 2 \int _0^1 \beta _{T}(\hat{T}(t-\tau _0),{\hat{C}}(t-\tau _0)) T_0(t-\tau _0,y_2) e^{-\mu _0 \tau _0} p_2(x_2,y_2) d y_2, \\&\frac{\partial T(t, x_2)}{\partial t} = \kappa _{T}({\hat{C}}(t), x_2) T_0(t, x_2)-\mu _{T} T(t, x_2). \end{aligned} \right. \end{aligned}$$
(2)

Here, we assume that cancer cells at state \((x_0,x_1)\) proliferate at the rate \(\beta _C(\hat{C}(t),x_0)\), which is regulated by the total cancer cells number at time t, \({\hat{C}}(t)\), and

$$\begin{aligned} {{\hat{C}}}(t)=\int _{0}^{1} \int _{0}^{1} C\left( t, x_{0}, x_{1}\right) dx_{0}d x_{1}. \end{aligned}$$

The elimination of cancer cells by effector T cells is represented by the term \(\displaystyle \int _0^1 \eta (x_1,x_2) T(t, x_{2})d x_{2} \times C(t, x_0, x_1)\) in the first equation, where \(\eta (x_1,x_2)\) is the rate at which cancer cells at state \(x_1\) are killed by effector T cells at state \(x_2\). Resting T cells at PD-1 expression state \(x_2\) proliferate at the rate \(\beta _T(\hat{T}(t),\hat{C}(t),x_2)\), which is regulated by the total count of effector T cells, denoted as

$$\begin{aligned} {\hat{T}}(t)=\int _{0}^{1} T\left( t, x_{2}\right) d x_{2}, \end{aligned}$$

and the presentations of cancer antigens, \(\hat{C}(t)\). Resting T cells at state \(x_2\) are activated and differentiate at the rate \(\kappa _T(\hat{C}(t),x_2)\), which also depends on the presentations of cancer antigens \(\hat{C}(t)\). The duration of proliferating phase for cancer cells and T cells are assumed to be \(\tau _C\) and \(\tau _0\), respectively.

The epigenetic state inheritance after cell division is indicated by the inheritance probability function, \(p(\mathbf {x},\mathbf {y})\), e.g. the probability that a daughter cell of state \(\mathbf {x}\) comes from a mother cell of state \(\mathbf {y}\). Specifically, \(p_0(x_0, y_0)\) represents the probability that a daughter cancer cell with stemness \(x_{0}\) comes from a mother cancer cell with stemness \(y_0\) after cell division; \(p_2(x_2,y_2)\) represents the probability that a daughter T cell with PD-1 expression state \(x_2\) comes from a mother T cell with PD-1 expression state \(y_2\) after cell division; \(p_1(x_1,y_1,y_0)\) represents the probability that a daughter cancer cell with PD-L1 expression state \(x_1\) comes from a mother cancer cell with PD-L1 expression state \(y_1\) and stemness state \(y_0\) after cell division. Here, we assume that the inheritance probability of the PD-L1 state depends on both the PD-L1 state and the stemness state of the mother cell.

The biological meanings of variables and parameters are described in Table 1, and the formulas of related functions are shown in Sect. 2.2 in detail.

Table 1 The variables and parameter functions in the mathematical model

2.2 Cell kinetics and epigenetic state inheritance functions

Proliferation. As in Lei (2020a), we consider the feedback regulation of cancer cell proliferation rate as follows:

$$\begin{aligned} \beta _{C}({{\hat{C}}}(t),x_0) = \beta (x_0)\frac{\theta _C}{\theta _C+{\hat{C}}(t)}, \quad {{\hat{C}}}(t)=\int _{0}^{1} \int _{0}^{1} C\left( t, x_{0}, x_{1}\right) dx_{0}d x_{1}, \end{aligned}$$

where \(\theta _C\) is the 50% effective coefficient (EC50); \({\hat{C}}(t)\) is the total counts of cancer cells at time t. We assume that the proliferation rate of cancer cells depends also on their stemness state \(x_0\), so that cells with intermediate stemness have greater proliferation rates, while the stem cells (\(x_0 \sim 1\)) and matured cells (\(x_0 \sim 0\)) have lower proliferation rates. This effect can be modelled as Lei (2020a)

$$\begin{aligned} \beta (x_{0})=\bar{\beta }_{C} \frac{\bar{a}_1x_0+(\bar{a}_2x_0)^n}{1+(\bar{a}_3x_0)^n}. \end{aligned}$$

The proliferation rate of resting T cells is assumed to be

$$\begin{aligned} \beta _{T}\left( \hat{T}(t),{\hat{C}}(t)\right) = \bar{\beta }_{T}\frac{\theta _T}{\theta _T+\hat{T}(t)} \cdot \frac{{\hat{C}}(t)}{K_{C}+{\hat{C}}(t)},\quad \hat{T}(t)=\int _{0}^{1} T\left( t, x_{2}\right) d x_{2}, \end{aligned}$$

where \(\theta _T\) is the 50% effective coefficient of T cells; \(\hat{T}(t)\) is the total counts of effector T cells. Here, the activation of resting T cells by tumour antigen is assumed to follow a receptor-kinetic law of the form \( {\hat{C}}(t)/(K_C+{\hat{C}}(t))\).

Differentiation. We assume that the differentiation rate of cancer cells, \(\kappa _C\), decreases as their stemness \(x_0\) increases (Lei 2020a) or as PD-L1 expression level \( x_{1}\) increases (Inman et al. 2007), which is expressed by

$$\begin{aligned} \kappa _C(x_0,x_1) = \bar{\kappa }_C \frac{1}{1+\left( \bar{b}_0 x_0\right) ^n+\left( \bar{b}_1 x_1\right) ^n}. \end{aligned}$$

The activation and differentiation of resting T cells are promoted by cancer antigens presentation, which is given by

$$\begin{aligned} \kappa _T({\hat{C}}(t), x_2) = \bar{\kappa }_T \frac{{\hat{C}}(t)}{K_C+{\hat{C}}(t)}\left[ 1 + \frac{(\bar{b}_2 x_2)^n}{1+(\bar{b}_2 x_2)^n}\right] . \end{aligned}$$

Here, we also assume that T cells with high PD-1 expression level \(x_2\) have high activation and differentiation rate (Sauce et al. 2007).

Inheritance probability. In this study, we assume that the cell states \(x_i\) are represented by the nucleosome modification levels of related genes and hence are taken values from the unit interval [0, 1]. The nucleosome modification level of daughter cells can be described by a beta-distributed random number dependent on the state of the mother cells (Lei 2020a). Hence, the inheritance functions \(p_{i}\left( x_i, \mathbf {y}\right) \) can be written as the beta distribution density function as follows:

$$\begin{aligned} p_i(x_{i},\mathbf {y})=\frac{x_i^{a_i(\mathbf {y})-1}(1-x_i)^{b_i(\mathbf {y})-1}}{B(a_i(\mathbf {y}),b_i(\mathbf {y}))}, \quad B(a_i, b_i)=\frac{\Gamma (a_i) \Gamma (b_i)}{\Gamma (a_i+b_i)}, \quad i=0,1,2, \end{aligned}$$

where \(\mathbf {y}=(y_{0},y_{1},y_{2})\). The definitions of shape parameters \(a_i(\mathbf {y})\) and \(b_i(\mathbf {y})\) are crucial to formulating the dependence of the inheritance probability with the state \(\mathbf {y}\) of the mother cells. To this end, while we introduce a function \(\phi _i(\mathbf {y})\) and a constant \(\nu _i > 0\) so that the conditional expectation and variance of \(x_i\), given the state \(\mathbf {y}\), are given by

$$\begin{aligned} \mathrm {E}( x_i \vert \mathbf {y}) = \phi _i(\mathbf {y}), \quad \mathrm {Var}(x_i \vert \mathbf {y}) = \frac{1}{1 + \nu _i} \phi _i(\mathbf {y}) ( 1- \phi _i(\mathbf {y})), \end{aligned}$$

the shape parameters \(a_i(\mathbf {y})\) and \(b_i(\mathbf {y})\) are given by \(\phi _i(\mathbf {y})\) and \(\nu _i\) as

$$\begin{aligned} a_i(\mathbf {y}) = \nu _i\phi _i(\mathbf {y}),\quad b_i(\mathbf {y})=\nu _i(1-\phi _i(\mathbf {y})), \quad 0<\phi _i(\mathbf {y})<1,\quad \nu _i>0. \end{aligned}$$

Here, the conditional expectation function \(\phi _i(\mathbf {y}) = \mathrm {E}(x_i \vert \mathbf {y})\) represents the expectation of the state \(x_i\) given the state \(\mathbf {y}\) of the mother cells. In general, a mother cell with a higher level state \(x_i\) tends to generate a daughter cell with a higher level state \(x_i\). Hence, it is reasonable to assume that \(\phi _i(\mathbf {y})\) is increased with the component \(y_i\). Thus, the conditional expectation can be expressed as an increased Hill function of the form

$$\begin{aligned} \phi _i(y_0, y_1, y_2) = \hat{a}_i + \hat{b}_i \dfrac{(\sigma _i y_i)^{m_i}}{1 + (\sigma _i y_i)^{m_i}}, \end{aligned}$$

where \(\hat{a}_i\) and \(\hat{b}_i\) are coefficients in the Hill function, which may also depend on \(y_j\) with \(j\not =i\). Moreover, the parameters are taken so that

$$\begin{aligned} 0\le \phi _i(y_0, y_1, y_2) \le 1,\quad \forall 0\le y_0, y_1, y_2 \le 1. \end{aligned}$$

To model the tumour evolution dynamics, we can also introduce time-dependent coefficients \(\hat{a}_i\) and \(\hat{b}_i\).

Now, we assume that the inheritance of stemness \(x_0\) only depends on the stemness state \(y_0\) at the mother cells (Das et al. 2022), so that

$$\begin{aligned} a_0(\mathbf {y}) = \nu _0\phi _0(y_0),\quad b_0(\mathbf {y})=\nu _0(1-\phi _0(y_0)), \end{aligned}$$

where the conditional expectation function \(\phi _0(y_0)\) is assumed to increase with the stemness state \(y_0\) (Das et al. 2022), and is formulated as a Hill function

$$\begin{aligned} \phi _0(y_0)=\hat{a}_{0}+\left( \hat{b}_{0}+\varepsilon f_0(t)\right) \cdot \frac{(\sigma _0 y_0)^{m_0}}{1+(\sigma y_0)^{m_0}}. \end{aligned}$$

Here, we assume that the conditional expectation function is regulated in a time-dependent manner that is represented by a factor \(f_0(t)\) (Lei 2020a):

$$\begin{aligned} f_0(t)=\frac{1}{1+e^{-(t-S)/S_0}}. \end{aligned}$$

The parameter S and \(S_0\) control the changes of inheritance functions during cancer evolution.

The inheritance of PD-L1 state \(x_2\) is assumed to be associated with both the stemness \(y_0\) and the PD-L1 state \(y_1\) of the mother cells (Gao et al. 2019), such that

$$\begin{aligned} a_{1}(\mathbf {y})=\nu _1\phi _1(y_0,y_1),\quad b_{1}(\mathbf {y})=\nu _1(1-\phi _1(y_0,y_1)), \end{aligned}$$

where the conditional expectation \(\phi _1(y_0,y_1)\) is assumed to decrease with the stemness state \(y_0\), and increase with the PD-L1 state \(y_1\) (Gao et al. 2019) as follows:

$$\begin{aligned} \phi _1(y_0,y_1)=\hat{a}_1+\left( \hat{b}_1+\frac{\varepsilon f_1(t)}{1+(\sigma _1 y_0)^n}\right) \cdot \frac{(\sigma _1 y_1)^{m_1}}{1+(\sigma _1 y_1)^{m_1}}, \quad f_1(t)=\frac{1}{1+e^{-(t-S)/S_1}}. \end{aligned}$$

We assume that the inheritance of the PD-1 state \(x_2\) only depend on the PD-1 state \(y_2\) at the mother cells (Riley 2009), so that

$$\begin{aligned} a_2(\mathbf {y}) = \nu _2\phi _2(y_2), \quad b_2(\mathbf {y}) = \nu _2(1-\phi _2(y_2)), \end{aligned}$$

where the conditional expectation \(\phi _2(y_2)\) is assumed to increase with the PD-1 state \(y_2\) (Riley 2009) as follows:

$$\begin{aligned} \phi _2(y_2)= \hat{a}_2+\left( \hat{b}_2+\varepsilon f_2(t)\right) \cdot \frac{(\sigma _2 y_2)^{m_2}}{1+(\sigma _2 y_2)^{m_2}},\quad f_2(t)=\frac{1}{1+e^{-(t-S)/S_2}}. \end{aligned}$$

In the above formulations, we introduce time-dependent functions \(f_0(t), f_1(t)\) and \(f_2(t)\) to represent the changes in the microenvironment condition during cancer evolution and treatment, which are regulated by the control parameters S and \(S_0, S_1, S_2\). Moreover, in the simulations below, we take \(\sigma _0 = \sigma _1 = \sigma _2 = \sigma \) and \(m_0 = m_1 = m_2 = m\) for simplicity.

Killing rate by effector T cells. PD-L1 combined with PD-1 could inhibit cytokine secretion of PD-1 positive T cells and attenuate the host immune response to tumour cells (Han et al. 2020; Ghosh et al. 2021; Zuazo et al. 2017). Based on these perspectives, we consider the reducing effect of the PD-1/PD-L1 axis on the killer function of effector T cells as follows:

$$\begin{aligned} \eta (x_1,x_2)=\frac{\eta _0}{1+K_0x_{1}x_{2}}, \end{aligned}$$

where \(\eta _0\) represents the anti-cancer immune responses; \(K_0\) is a parameter to indicate the inhibition of the PD-1/PD-L1 axis to the anti-cancer immune response.

Anti-PD-L1 promotes the immune response against cancer cells, and mainly relies on effector T cells that effectively penetrate the tumour (Han et al. 2020; Ghosh et al. 2021). When anti-PD-L1 therapy is implemented, the drug effect is incorporated into the killing rate function \(\eta \) by

$$\begin{aligned} \eta (x_1,x_2)=\frac{\eta _0}{1+K_0 x_{1}x_{2}/(\gamma A+1)}, \end{aligned}$$

where \(\eta _{0}\) is the maximum killing rate per T cell and per cancer cell as they contact. The killing rate is inhibited by the formation of the PD-L1/PD-1 axis (\(K_0x_1x_2\)), which is in turn blocked by anti-PD-L1, the parameter A is associated with the concentration of anti-PD-L1 drugs. The total killing rate by effector T cells is represented by the term \(\displaystyle \int _0^1 \eta (x_1,x_2) T(t, x_{2})d x_{2} \times C(t, x_0, x_1)\) in model (2), which is proportional to the cancer cell counts and T cell counts.

3 Results

3.1 Analysis of ESCA patients data and validation of the model

We obtain the transcriptome data and clinical information for esophageal carcinoma (ESCA) patients from The Cancer Genome Atlas (https://portal.gdc.cancer.gov). RNA-sequencing (RNA-Seq) was performed using the normalization method HTSeq-FPKM (Du et al. 2021). In our study, to explore the alteration of PD-L1 and PD-1 expression states during cancer progression, we analyze gene expression data and clinical follow-up information of 151 primary ESCA patients.

The expressions of PD-L1 and PD-1 in patients at the four cancer stages (I, II, III, IV) are shown in Fig. 2. Here, cancer staging is the process of determining the extent to which cancer develops through growth and spread. The most widely used cancer staging system is the TNM Staging System, which describes the size and extent of the main tumour (T), the number of nearby lymph nodes (N) that have cancer, and whether the cancer has metastasized (M). Based on the information on TNM stages, cancers are grouped into five less-detailed stages. Most types of cancer have four stages, I to IV, with a gradual increase in cancer severity. Stage I is usually early-stage cancer that has not grown deeply into nearby tissues. Stage II and Stage III are cancers that have grown more deeply into nearby tissue. Stage IV is advanced or metastatic cancer that has spread to other organs or parts of the body. The cancer states of clinical patients shown in Fig. 2 are according to the cancer stage information given in the TCGA database. The percentage of patients with high PD-L1 expression (PD-L\(1^+\)) is shown to increase significantly as the cancer stage proceeds from stage I to stages II and III. Moreover, the percentage of patients with both high PD-L1 and high PD-1 expression (PD-L\(1^+\), PD-\(1^+\)) increases as cancer progresses, which rises from 27% for patients in stage I to 63% for patients in stage IV (see S4 regions in Fig. 2A, D). As cancer stage progresses, the epigenetic state (PD-L1 and PD-1 expression level) gradually progresses from low expressions in both PD-L1 and PD-1 (PD-L\(1^-\), PD-\(1^-\)) (see S1 regions in Fig. 2) to high expressions in both PD-L1 and PD-1 (PD-L\(1^+\), PD-\(1^+\)) (see S4 regions in Fig. 2). We also see that PD-L1 expression and PD-1 expression have a strong positive correlation in ESCA patients, which is in agreement with the finding of Muenst et al. (2014) that tumour cell PD-L1 expression is strongly correlated with the presence of PD-1\(^{+}\) tumour-infiltrating lymphocytes for human breast cancer.

We note that the sample size of patients at cancer stage IV (\(N=8\)) is relatively small, which may be due to the low survival rate of patients at the most advanced stage with metastasis (stage IV). To overcome the limitation of a small sample size, we apply a computational method of generating virtual patients based on TCGA data analysis and model calibration in Sect. 3.3.

Fig. 2
figure 2

PDL1 and PD-1 expression of ESCA patients at the four cancer stages (151 samples from TCGA). AD PDL1 and PD1 gene expression data from RNA sequencing of 151 ESCA patient samples (\(N=151\)) at the four cancer stages (I, II, III, IV) in TCGA, with patients data A at cancer stage I (\(N = 2 1\)), B at cancer stage II (\(N = 71\)), C at cancer stage III (\(N = 51\)) and D at cancer stage IV (\(N = 8\)). The expression level of genes is usually measured by transcripts per kilobase per million mapped reads (TPM). Here, the PDL1 and PD1 expression levels are shown by \(\log _2(\mathrm{TPM} + 1)\), respectively. Red dashed lines divide the PD-1-PD-L1 expression level space into four regions: (S1) with low level PDL1 and PD1 expressions (PD-L\(1^-\)PD-\(1^-\)), (S2) with relatively high PDL1 and low PD1 expressions (PD-L\(1^+\)PD-\(1^-\)), (S3) with low PDL1 and high PD1 expressions (PD-L\(1^-\)PD-\(1^+\)) and (S4) with high PDL1 and PD1 expressions (PD-L\(1^+\)PD-\(1^+\)). The clinical data were downloaded from the TCGA database (https://portal.gdc.cancer.gov) with the R package TCGAbiolinks version 3.8 (Colaprico et al. 2016)

To validate our model and estimate the parameters, we simulate the time evolution of PD-L1 and PD-1 expression states during cancer development and progression and compare simulation results with the clinical data of ESCA patients. In TCGA clinical data, the longest overall survival time of patients is 2134 days. In order to be consistent with clinical data, the length of simulation time is chosen to be 2000 days. Simulation of the model are implemented by C++ based on the cell-based stochastic simulation (Lei 2020a) (see the Appendix).

Figure 3A, B display the PD-L1 expression and PD-1 expression for normal samples and different cancer stages ESCA patients (11 normal samples and 151 patient samples from TCGA), respectively. Figure 3C, D demonstrate the time evolution of PD-L1 expression and PD-1 expression obtained from model simulations, where parameter values are set as in Table 2. Here, some parameter values are estimated by referring to related studies, and others are estimated by the qualitative fitting of cancer stage progression data. The median of PD-L1 expression state (red lines in the boxes of Fig. 3A) and median of PD-1 state (red lines in boxes of Fig. 3B) demonstrated that the PD-L1 expression level rises up significantly during the transition period from cancer stage I to stage II, whereas PD-1 expression level grows up slowly from normal to stage III cancer. In consistency with these states changes, simulation results also show a significant increase of PD-L1 expression state \(x_1\) during 500–1000 days of simulation (see Fig. 3C), while the PD-1 expression state \(x_2\) gradually increases during 0–1000 days of simulation (see Fig. 3D).

Fig. 3
figure 3

Evolution of PD-L1 and PD-1 expression levels. A PD-L1 expression levels of 151 ESCA patients from TCGA. B PD-1 expression levels of 151 ESCA patients from TCGA. TPM denotes transcripts per kilobase per million mapped reads, which is log-scaled by \(\log _2(\mathrm{TPM} + 1)\). C Simulated temporal evolution of PD-L1 expression heterogeneity. D Simulated temporal evolution of PD-1 expression heterogeneity. Colour columns indicate the distribution of cancer cells with different PD-L1 expression levels. All parameter values in the simulation are the same as in Table 2. In the box plots A and B, maximum whisker lengths are specified as the interquartile range; data points beyond the whiskers are displayed using “+”. The clinical data were downloaded from the TCGA database (https://portal.gdc.cancer.gov) with the R package TCGAbiolinks version 3.8 (Colaprico et al. 2016)

Dynamics of cancer cell and T cell counts are shown in Fig. 4, where changes in the heterogeneity with stemness and PD-L1 expression are shown by the scatter plots for the epigenetic state of all cancer cells at different time points. With the increase of cancer cell counts, the stemness of cancer cells declines and then maintains at a low level, while the PD-L1 expression level gradually increases. Simulation results are consistent with the results of flow cytometry data for PD-L1 expression in human breast cancer (Muenst et al. 2014).

Fig. 4
figure 4

Tumour growth with cancer cell heterogeneity for stemness and PD-L1 expression. Time evolutions of cancer cell count, resting T cell count and effector T cell count are shown by red, black and blue curves, respectively. Insets are scattered plots of cancer cells at different stemness states (\(x_0\)) and PD-L1 expression states (\(x_1\)) at different time points. All parameter values are the same as in Table 2

It is worth pointing out that due to the limited number of ESCA patient samples in this dataset, the results of data analysis may not be statistically significant. In the following subsections, we deal with this challenge by creating virtual patient data via calibrated mathematical model and a comprehensive computational framework for the estimation of the anti-PD-L1 therapy response.

Table 2 The parameter values in the mathematical model simulation

3.2 Sensitivity analysis

Measuring tumour area or volume is a traditional way for oncologists to evaluate cancer treatment activity. The current clinical interest of immunotherapy is targeting the PD-1/PD-L1 axis (Mellman et al. 2011). Thus we choose the following three indicators to perform sensitivity analysis: (1) the count of cancer cells \({\hat{C}}\), (2) the PD-L1 expression states \(x_{1}\), (3) the PD-1 expression states \(x_{2}\). Our goal is to explore the most significant parameters with respect to those indicators in the mathematical model.

For the cancer cell counts at day 2000, we perform sensitivity analysis with the following parameters: proliferation rate of cancer cells (\(\bar{\beta }_C\)) and resting T cells (\(\bar{\beta }_T\)), differentiation rate of cancer cells (\(\bar{\kappa }_C\)), killing rate by T cells (\(\eta _0\)), immune inhibition rate by PD-1/PD-L1 (\(K_0\)), and the shape control parameters of \(x_1\) inheritance probability (\(\hat{a}_1\), \(\hat{b}_1\)). Following the method of Kozłowska et al. (2020), we perform Latin hypercube sampling to generate 1000 parameter sets and calculate the Pearson correlation coefficients (PCCs) between those indicators and the parameters of interest. Through the method of sensitivity analysis, we can identify the critical inputs (parameters) of the model and further quantify how the input uncertainties may affect the model outcomes (Marino et al. 2008). Based on the parameter values given in Table 2, we choose the ranges of sampling parameter values with the same orders of magnitude as the basic values shown in Table 2 as inputs, which prevents under-sampling in the outer range of the interval where the parameters assume very small values (Marino et al. 2008). The ranges of parameter values for the sampling data are given in Table 3. PCCs values range between interval \([-1,1]\), where the sign of the values indicates the positive or negative correlation of the parameters with the indicator (Kim and Friedman 2010). The calculated statistically significant PCCs values (p-value \(<0.05\)) for the parameters of interest are shown in Fig. 5.

From simulations, both cancer cell proliferation \(\bar{\beta }_C\) and killing rate of cancer cells \(K_{0}\) are positively correlated with cancer cell counts, while the cancer cell apoptosis rate \(\bar{\kappa }_C\), the killing rate of cancer cells by effector T cells \(\eta _0\) and \(\bar{\beta }_T\) are negatively correlated with cancer cell counts (see Fig. 5A). We also see that coefficients in the inheritance function of the PD-L1 state, namely \(\hat{a}_1\) and \(\hat{b}_1\), are positively correlated with cancer cell counts (see Fig. 5A). Among these parameters, \(\eta _0\) has the largest impact on reducing cancer cell counts, while \(\bar{\beta }_C\) has the largest impact on increasing cancer cell counts. Figure 5B shows the distribution of the cancer cell counts under different combination pairs of the two most sensitive parameters \(\eta _{0}\) and \(\bar{\beta }_C\).

Table 3 Ranges of parameter values for sensitivity analysis
Fig. 5
figure 5

Global sensitive analysis (GSA). A Statistically significant Pearson correlation coefficient values (p-value \(<0.05\)) for cancer cell counts at day 2000. The most significant parameters affecting cancer cell counts are \(\eta _{0}\) and \(\bar{\beta }_C\). B Cancer cell counts under different combination pairs of the two most sensitive parameters \(\eta _{0}\) and \(\bar{\beta }_C\). C Statistically significant Pearson correlation coefficients (PCCs, p-value \(<0.05\)) for PD-L1 state at day 2000. D Statistically significant Pearson correlation coefficients (PCCs, p-value \(<0.05\)) for PD-1 state at day 2000. The key model parameters affecting epigenetic state are \(\hat{a}_{1}\) and \(\hat{a}_{2}\). The ranges of parameter values are taken as in Table 3

Fig. 6
figure 6

Computational framework. Firstly, overall survival data and epigenetic state (PD-L1, PD-1) data are extracted from 68 ESCA patients from TCGA. Then sensitivity analysis of the model parameters is performed for cancer cell counts and PD-L1 expression states, based on the mathematical model and Latin hypercube sampling method. By sensitivity analysis, the most sensitive parameters, \((\eta _{0},\bar{\beta }_C,{\hat{a}}_{1},\hat{a}_{2})\), are determined. With the epigenetic data, the probability density function of \((\hat{a}_1,{{\hat{a}}}_2)\) is determined. With the overall survival data, a set of parameters are given for the virtual patients’ cohort. Finally, single-cell-based stochastic simulation is performed to analyze the survival of virtual patients receiving different treatment schedules

We further perform sensitivity analysis for the dependence of PD-L1 expression state at day 2000 with respect to the control parameters for the inheritance functions, including the parameters for \(x_0\) inheritance function (\(\hat{a}_0\), \(\hat{b}_0\)), the parameters for \(x_1\) inheritance function (\(\hat{a}_1\), \(\hat{b}_1\), \(\nu _1\)) and the parameters for \(x_2\) inheritance function (\(\hat{a}_2\)). Results are shown in Fig. 5C. Among these parameters, the parameter \(\hat{a}_1\) has the most significant effect on the promotion of PD-L1 expression levels. A similar analysis shows that the control parameter \(\hat{a}_2\) has a major impact on increasing the PD-1 expression level at day 2000 (Fig. 5D).

3.3 Model calibration and creation of virtual patients

To create more data for further analysis, we extract the epigenetic state (PD-L1, PD-1) data and overall survival data from 68 ESCA patients in TCGA, and apply the computational framework proposed in Kozłowska et al. (2020) that combines the mathematical model with a machine learning algorithm to generate virtual patients, The schematic diagram of the calculation framework is shown in Fig. 6.

From the above sensitivity analysis, we identify the four most significant parameters \((\eta _0,\bar{\beta }_C,\hat{a}_{1},\hat{a}_{2})\) to generate the virtual patients, and other parameters are taken from Table 2. We note that the parameters are estimated by reference to related studies and qualitative fitting to cancer stage progression data, and simulation results are not sensitively dependent on changes in these parameters (Stiehl et al. 2020).

According to the sensitivity analysis, the parameters \(\hat{a}_1\) and \(\hat{a}_2\) are the most significant parameters that affect the epigenetic state (PD-L1,PD-1). Thus, we can estimate the conditional probability density function of \(\hat{a}_1\) and \(\hat{a}_2\), \(\mathrm{PDF}(\hat{a}_1,\hat{a}_2\vert \) PD-L1,PD-1) based on the clinical epigenetic state (PD-L1, PD-1) data following the procedures below. First, the parameters \(\hat{a}_1\) and \(\hat{a}_2\) are chosen uniformly and separately 30 times from their ranges as shown in Table 3, and the states of PD-L1 and PD-1 expression are obtained for 900 patients by simulation of 900 parameter sets \((\hat{a}_1,\hat{a}_2)\). Secondly, we select patients with PD-L1 and PD-1 expression states that are consistent with the clinical epigenetic state data through the method of bootstrap sampling with replacement. Lastly, to estimate the multivariate probability density function of \((\hat{a}_1,\hat{a}_2)\), we fit \((\hat{a}_1,\hat{a}_2)\) values of the selected patients to the multivariate Gaussian Mixture Model (GMM) (Biernacki et al. 2003) using the expectation-maximization algorithm (Dempster et al. 1977), so that the realistic values of parameters \((\hat{a}_1,\hat{a}_2)\) can directly be sampled from the fitted Gaussian Mixture Model.

The clinical PD-L1 and PD-1 state data for 68 ESCA patients from TCGA are shown in Fig. 7A. Compared with Fig. 2B, the clinical data in Fig. 7A are normalized. Figure 7B shows the PD-L1 and PD-1 states of 1000 samples obtained by the model simulation, where values of \((\hat{a}_1,\hat{a}_2)\) are directly sampled from the fitted Gaussian Mixture Model. The boxplot of the PD-L1 and PD-1 states of the clinical patients and the simulated samples are shown in Fig. 7C. We see that the epigenetic state (PD-L1, PD-1) of the simulated samples is in good agreement with clinical patient data, which shows that the deficiency of limited clinical data can be effectively compensated by calibrated mathematical model simulation.

Fig. 7
figure 7

Calibration of the model to clinical data from 71 ESCA patients in TCGA. A The plot shows the epigenetic state of (stage II) ESCA patients in TCGA. Compared with Fig. 2B, the clinical data are normalized. The probability density contour is fitted by Gaussian mixture model. B The plot shows the epigenetic state of 1000 virtual patients (VPs) simulated by calibrated mathematical model (2). The results are consistent with the probability density contour in A. C The boxplot shows the agreement of the epigenetic state (PD-L1,PD-1) between virtual patients and clinical patients

To generate virtual patients with the four parameters \(\eta _{0}\), \(\bar{\beta }_{C}\), \(\hat{a}_{1}\), \(\hat{a}_{2}\), we select 900 parameters pairs of \((\eta _{0}, \bar{\beta }_{C})\) values uniformly and separately for 30 times from their ranges as shown in Table 3, while parameters \((\hat{a}_1,\hat{a}_2)\) are sampled from the probability density function of the fitted Gaussian Mixture Model. In this way, 900 sets of \((\eta _{0}\), \(\bar{\beta }_{C}\), \(\hat{a}_{1}\), \(\hat{a}_{2})\) values are sampled, leading to 900 virtual patients cohorts.

We calculate the overall survival of the 900 virtual patients. Applying the method of bootstrap sampling with replacement, 1000 samples of the patients are determined with overall survivals that are consistent with the clinical overall survival data.

To calculate the overall survival of virtual patients, we note that cancer cell count or tumour volume is the key to determining the survival of a patient (Kozłowska et al. 2020; Stiehl et al. 2020). Thus, the death or disease progression of a virtual patient is marked by presetting a threshold of the total tumour cell count or tumour volume (Sun et al. 2016). We assumed a probability of mortality that is dependent on the cancer cell ratio r by (refers to Chen and Lai 2022)

$$\begin{aligned} P_{\mathrm {death}}(r)=P_{\mathrm {max}} \frac{1}{1 + e^{-\left( r-\mu _{p}\right) / \sigma _{p}}}, \end{aligned}$$

where r is the ratio of \({\hat{C}}(t)\) (the number of cancer cells at t) to the carrying capacity \({\hat{C}}_{*}\). The mortality probability of a patient with cancer cell ratio r in a time window \([t,t+\Delta t]\) is given by \(P_{\mathrm {death}}(r)\Delta t\). Here, \(P_{\max }\) means the maximum death probability. The probability function \(P_{\mathrm {death}}(r)\) increases monotonically with the cancer cell ratio r. The parameter \(\mu _p\) represents the specific cancer cell ratio \(r_c\) with \(50\%\) mortality probability (\(P_\mathrm{death}(r_c)=P_{\max }/2\)). The parameter \(\sigma _{p}\) controls the shape of the increasing probability curve. The overall survival is calculated as the time from the diagnosis to the death of all patients.

The clinical overall survival data and the simulated survival data for 1000 virtual patients are shown in Fig. 8A with solid curves, where 95% confidence intervals are also displayed. The survival estimate of virtual patients is well consistent with the survival data of clinical patients. We also compare the survival of clinical PD-L1 negative patients and virtual PD-L1 negative patients, where PD-L1 negative patients are defined by those with a PD-L1 state level lower than the median value. The results are shown in Fig. 8B, and the survival data for PD-L1 positive patients is shown in Fig. 8C. We see that the survival of virtual patients is also in good agreement with the clinical data for both PD-L1 positive and PD-L1 negative patients.

Fig. 8
figure 8

Overall survival of clinical and virtual patients. A Overall survival of all clinical patients (blue solid curves) and virtual patients (black solid curves). Blue dotted lines indicate the 95% confidence interval. B Overall survival of PD-L1 negative clinical patients (blue solid curves) and virtual patients (black solid curves). C Overall survival of PD-L1 positive clinical patients (blue solid curves) and virtual patients (black solid curves). The virtual patient data is obtained by simulation with the calibrated model

3.4 Cancer treatment with anti-PD-L1

The conventional cancer treatment approach usually implements the maximum tolerated dose (MTD) with the goal of maximizing the killing of tumour cells without serious damage to the patient. This method is effective in killing tumour cells, but may also cause major toxicities (Staňková et al. 2019). Adaptive therapy (ADT) aims to maintain a controllable stable tumour burden or reduce tumour volume by employing minimum effective drug doses or timed drug holidays (Kim et al. 2021).

Based on the virtual patients obtained by the calibrated model, we further explore the efficient treatment schedule of anti-PD-L1 therapy. To this end, we assign the effective concentration of the anti-PD-L1 drug, \(LC_{\alpha }\), to be the value of the drug dose (A) required to reduce the equilibrium value of the total number of cancer cells by \(\alpha \) (in percentage) (Lorenzi et al. 2016). Our simulation with the virtual patients shows that when the anti-PD-L1 is given continuously, the cancer cell counts at equilibrium decrease significantly as the effective drug dose \(LC_{\alpha }\) increases (see Fig. 9A).

Fig. 9
figure 9

The effects of anti-PD-L1. A Higher anti-PD-L1 drug doses cause lower cell numbers. The count of cancer cells at equilibrium declines significantly as the effective concentration of anti-PD-L1 drug \(LC_{\alpha }\) increases. Here, \(\alpha \) ranges from 0 to 95. B Anti-PD-L1 is more effective for the patients with higher PD-L1 expression in control of tumor growth. The curve in blue (or red) indicates the average cancer cell count of virtual patients with low (or high) PD-L1 expression state. The inset figure illustrates the PD-L1 expression state in two groups of virtual patients. The colored zones demonstrates the 95% confidence intervals (colour figure online)

Table 4 Treatment schedules
Fig. 10
figure 10

Treatment schedules with anti-PD-L1 administration. A Maximum tolerated dose. B Metronomic therapy. C Adaptive therapy. D Adaptive therapy with drug holiday for 15 days

Fig. 11
figure 11

Overall survival of virtual patients under anti-PD-L1 treatment. A Overall survival of all virtual patients under different treatment schedules with anti-PD-L1. B Overall survival of PD-L1 negative virtual patients under different treatment schedules with anti-PD-L1. C Overall survival of PD-L1 positive virtual patients under different treatment schedules with anti-PD-L1. D The survival of PD-L1 positive (blue curves) and PD-L1 negative (red curves) virtual patients under the maximum tolerated dose scheduled anti-PD-1 treatment (MTD). E The survival of PD-L1 positive (blue curves) and PD-L1 negative (red curves) virtual patients under the adaptive anti-PD1 treatment with metronomic schedule (AMT). F The survival of PD-L1 positive (blue curves) and PD-L1 negative (red curves) virtual patients under the adaptive anti-PD-1 treatment (ADT). Virtual patient data are obtained by the calibrated model (colour figure online)

To determine the optimal treatment schedule under the heterogeneity of PD-L1 and PD-1 expression, we introduce the following treatment schedules: maximum tolerated dose (MTD), metronomic therapy (MT), adaptive therapy (ADT) and adaptive metronomic therapy (AMT), which are explained in Table 4 in detail and illustrated in Fig. 10.

In the early stage of anti-PD-L1 therapy, the response rate and the efficacy of anti-PD-L1 depend on the PD-L1 expression levels of virtual patients. Figure 9B shows that in the early stage of anti-PD-L1 adaptive therapy, it is more effective for controlling tumour growth in patients with high PD-L1 expression state (in red) in contrast with patients with low PD-L1 expression state (in blue).

We further explore the efficacy of the anti-PD-L1 under different treatment schedules by estimating its effects on the overall survival rates of virtual patients. In clinical trials, the treatment and follow-up periods are much longer. In Phase I/II clinical trial (El-Khoueiry et al. 2018), hepatocellular carcinoma patients received nivolumab (anti-PD-1) intravenously for up to two years. In the multicenter phase I trial of patients with advanced solid tumours, BMS-936559 (anti-PD-L1) was administered intravenously to patients for up to 96 weeks (Brahmer et al. 2012). Clinically, the duration of therapy ranges from 2 weeks to 111 weeks (Brahmer et al. 2012). In our simulations, we consider treatments for 2 years.

In a Phase Ib trial (Lote et al. 2015), patients with advanced gastric cancer are treated with pembrolizumab (anti-PD-1) every 2 weeks; in a multi-dose Phase I trial (Topalian et al. 2012), patients with the same advanced cancers are given nivolumab (anti-PD-L1) every 2 weeks. In our simulations, we consider drug holiday for 15 days.

For virtual patients, we investigate the efficacy of treatment schedules for improving the overall survival. The overall survival of all patients under different treatment schedules is shown in Fig. 11A, and the overall survival for PD-L1 positive patients and PD-L1 negative patients under different treatment schedules are shown in Fig. 11B, C, respectively.

For the whole group of patients, not surprisingly, the schedule of continuous treatment with the maximum tolerated dose (MTD) is better than all other schedules when there is no development of drug resistance, and adaptive therapy (ADT) has a similar result as the MTD schedule with drug holiday for 15 days(MT), as shown in Fig. 11A. Moreover, PD-L1 positive patients show better outcomes in comparison with PD-L1 negative patients (Fig. 11B, C).

Now, we compare the overall survival curve of applying different strategies to PD-L1 positive and negative patients. The continuous MTD strategy shows better efficacy for PD-L1 positive patients and for PD-L1 negative patients in the two-year overall survival (see Fig. 11D). Similar results are also seen in metronomic therapy (Fig. 11E) and adaptive therapy strategy (Fig. 11F), in which the overall survival rate of PD-L1 positive patients improve obviously in comparison with that for PD-L1 negative patients. Because of the possible side effects of continuous MTD therapy, these results suggest that the adaptive therapy strategy can be considered for PD-L1 positive patients.

4 Conclusion

Immunotherapy with monoclonal antibodies to PD-1 and PD-L1 significantly improved the survival of patients with some cancers. However, the response rate of PD-1/PD-L1 inhibitors in overall patients is relatively low. One of the obstacles is the cancer cell heterogeneity with PD-L1 expression and the variability of PD-L1 expression status during cancer evolution and treatment. To predict and estimate the dynamic alteration of PD-L1 expression during cancer evolution, we build a differential-integral equations model to describe the kinetics of cancer cells and T cells during the process of tumour development and progression, including cell division, activation, proliferation, differentiation, apoptosis, and tumour-immune interaction, and also the immunosurveillance of PD-1/PD-L1 axis. We highlight cancer cell heterogeneity with respect to stemness state and PD-L1 expression state and T cell heterogeneity with PD-1 expression state.

Based on the mathematical model, we investigate the dynamic alteration of PD-L1 and PD-1 expression state during tumour development and progression. Our simulation results are in qualitative agreement with the PD-L1 and PD-1 expression states of esophageal carcinoma patient data from TCGA. The simulation is done by single-cell-based stochastic computation with SPSVERBc1 implementation. Both simulation and clinical data show that cancer cell PD-L1 expression level increases significantly during the transition from cancer stage I to stage II, while T cell PD-1 expression level increases much more fluently from stage I to stage IV.

To overcome the limitation of a small clinical sample size and to create more realistic virtual patients, we propose a computational framework based on TCGA data analysis and model calibration to generate virtual patients, and performed optimal treatment scheme prediction. In the model calibration, we apply the Gaussian Mixture Model to generate 1000 virtual patient cohorts based on four parameters \((\eta _{0}, \bar{\beta }_{C}, \hat{a}_{1}, \hat{a}_{2})\), with the application of the PD-L1 expression data and overall survival data for esophageal carcinoma patient data from TCGA. The simulation results are in good consistency with the clinical results, which shows the effectiveness of the virtual patients created. This comprehensive computational framework may provide an approach for settling the problem of insufficient patient samples in clinical trials.

The efficacy of adaptive therapy with anti-PD-L1 is explored for improving the overall survival of patients. We apply the virtual patients to carry out a series of treatment trials with different schedules, including maximum tolerated dose, metronomic therapy and adaptive therapy. In contrast to the continuous maximum tolerated dose treatment, adaptive therapy is more efficient, particularly for PD-L1 positive patients, owing to the dynamic drug dose implementation according to the PD-L1 expression state. Adaptive therapy with adaptive dose administration is also a type of personalized treatment strategy. How to reduce the drug dose and prolong the survival time of patients as much as possible is the core issue of personalized and precise treatment. Our results show that adaptive therapy can effectively prolong the survival time of patients while reducing the dose of drugs. The computational framework could be applied as a supplementary approach for clinical trials.

It should be pointed out that our model does not explore the spatial distribution of PD-L1 expression heterogeneity in tumour tissues. In lung cancer, the heterogeneous spatial distribution of PD-L1 expression in tumour tissues is often observed (Nakamura et al. 2017; Rehman et al. 2017), while it is also found that PD-L1 expression shows spatial heterogeneity in primary breast tumours and lymph node metastatic (Li et al. 2018). Spatial heterogeneity of PD-L1 expression also has a great influence on the therapeutic effect of PD-L1 inhibitors. In addition, we only explore the theoretical therapeutic effect of a single PD-L1 inhibitor. In actual clinical treatment, a variety of PD-L1 inhibitors are implemented in combination. Explorations of the adaptive scheduling of drug combinations will be done in future research.