Benoîte De Saporta

Aymar Thierry D'argenlieu

Régis Sabbadin

Alice Cleynen

Medical follow-up optimization: A Monte-Carlo planning strategy *

Designing patient-specific follow-up strategy is a crucial step towards personalized medicine in cancer. Tools to help doctors deciding on treatment allocation together with next visit date, based on patient preferences and medical observations, would be particularly beneficial. Such tools should be based on realistic models of disease progress under the impact of medical treatments, involve the design of (multi-)objective functions that a treatment strategy should optimize along the patient's medical journey, and include efficient resolution algorithms to optimize personalized follow-up by taking the patient's history and preferences into account. We propose to model cancer evolution with a Piecewise Deterministic Markov Process where patients alternate between remission and relapse phases with disease-specific tumor evolution. This model is controlled via the online optimization of a long-term cost function accounting for treatment side-effects, hospital visits burden and disease impact on the quality of life. Optimization is based on noisy measurements of blood markers at visit dates. This optimization problem is extremely difficult. It has recently been modeled as an infinite dimensional continuous space Markov Decision Process, approximated by a discrete-space problem in order to be solved exactly. Here, instead, we leverage the Partially-Observed Monte-Carlo Planning algorithm to solve the full continuous-time, continuous-state problem, taking advantage of the nearly-deterministic nature of cancer evolution. We show that this approximate solution approach of the exact model performs better than the counterpart exact resolution of the discrete model, while allowing for more versatility in the cost function model, hence a patient-specific follow-up. Our findings in terms of modeling and our efficient simulation-based optimisation approach to produce follow-up strategies can efficiently and easily be adapted to a large number of other diseases, thus being useful to doctors and patients.

Introduction

In long-term diseases such as cancer, patients alternate between remission and relapse phases and are monitored along time through non-invasive check-ups such as blood samples [START_REF] Hundt | Blood markers for early detection of colorectal cancer: a systematic review[END_REF][START_REF] Sozzi | Analysis of circulating tumor dna in plasma at diagnosis and during follow-up of lung cancer patients[END_REF]. Based on these noisy indirect disease measurements of some markers, practitioners must decide on treatment allocation, sometimes with little knowledge on the process dynamics (e.g. aggressiveness of the relapse) which may differ between patients [START_REF] Nagpal | Tumor markers: A diagnostic tool[END_REF][START_REF] Schrohl | Tumor markers: from laboratory to clinical utility[END_REF][START_REF] Sharma | Tumor markers in clinical practice: General principles and guidelines[END_REF]. Long retrospect of medical practice has allowed the definition of milestones to help practitioners in making follow-up decisions, but automated personalized criteria are yet to be defined to improve individual patient follow-up.

The ability to monitor patients in the least invasive manner, according to their personal preferences (more check-ups to enforce relapse detection, less aggressive treatments for better quality of life, etc) is a crucial step towards better care, but requires fine knowledge of diseases dynamics and reliable prediction algorithms. One of the main requirements for such task is the definition of a universal model adapted to patient-specific parameters that could describe in an exhaustive manner the possible consequences of the practitioner's decisions. Mathematical models have been developed to link the tumor markers to tumor sizes [START_REF] Lutz | Cancer screening: a mathematical model relating secreted blood biomarker levels to tumor sizes[END_REF], or to predict evolution of tumor growth from initial measurements [START_REF] Nicolò | Machine learning and mechanistic modeling for prediction of metastatic relapse in early-stage breast cancer[END_REF][START_REF] Xu | A mathematical model coupling tumor growth and angiogenesis[END_REF], but online adaptive models predicting relapses and automating treatment strategies are still lacking. In particular, such a model should be able to reconcile the continuous time evolution of the disease, continuous values for the markers leading to any possible values within a given range, and the noisy observations at discrete visit dates. A good candidate is the class of Piecewise Deterministic Markov Process (PDMP) [START_REF] Cloez | Probabilistic and piecewise deterministic models in biology[END_REF][START_REF] Mark | Piecewise-deterministic markov processes: A general class of non-diffusion stochastic models[END_REF][START_REF] Rudnicki | Piecewise deterministic processes in biological models[END_REF]. Indeed, PDMPs are non diffusive hybrid stochastic processes that can handle both continuous and discrete variables and their interactions in continuous time. The only source of stochasticity comes from the jumps of the process. They are thus simple to simulate and easy to interpret. Controlled PDMPs allow continuous time dynamics on continuous (or hybrid discrete and continuous) state spaces with decisions taken in continuous time [START_REF] Mha | Markov models and optimization[END_REF][START_REF] Benoîte De Saporta | Numerical methods for simulation and optimization of piecewise deterministic Markov processes: application to reliability[END_REF]. This paper is based on the analysis of a large cohort of Multiple Myeloma (MM) patient data from the Intergroupe Francophone du Myélome (IFM) 2009 clinical trial [START_REF] Attal | Lenalidomide, bortezomib, and dexamethasone with transplantation for myeloma[END_REF]. We assume that there is a single cancer marker that remains at a nominal threshold ζ 0 throughout any remission phase, and that at patient relapse its level increases exponentially with multiple possible behaviors until treatment is administered, or a threshold D is reached and the patient dies. To set up the context, we will assume that the study begins at time t 0 = 0 when the patient enters her first remission state, and we will denote t 1 , t 2 , . . ., her visit dates, defined over time by the practitioner, until some time horizon H is reached, or the patient dies. The time lapse between visits may not be constant, so that different patients may have different visit numbers and dates. More precisely, we will assume that at each visit time, the practitioner may choose to schedule the next visit in either 15, 30 or 60 days. Such decision may be based on the previous and current marker measurements, which we denote Y 0 , Y 1 , . . . . Note that the exact value of the marker is hidden as measurements are corrupted by noise, and measurements are only collected at visit dates. Together with the next visit date, the practitioner may chose to modify the patient's current treatment, fixing it to one of the two available treatments, a and b, or to no treatment at all, denoted ∅. An example of patient follow-up data is presented in Figure 1 a).

We model the underlying continuous-time dynamics of the patient health by a controlled PDMP (X t ) 0≤t≤H [START_REF] Almudevar | A dynamic programming algorithm for the optimal control of piecewise deterministic markov processes[END_REF][START_REF] Mha | Markov models and optimization[END_REF][START_REF] Benoîte De Saporta | Numerical methods for simulation and optimization of piecewise deterministic Markov processes: application to reliability[END_REF][START_REF] Mah Dempster | Impulse control of piecewise deterministic markov processes[END_REF][START_REF] Valle | Continuous average control of piecewise deterministic Markov processes[END_REF][START_REF] Renault | Optimal control of infinitedimensional piecewise deterministic Markov processes and application to the control of neuronal dynamics via optogenetics[END_REF]. We propose to optimally control the process, that is to choose online the next treatment and visit date, based on present and past observations and decisions by minimising a cost function which is calibrated to balance the burden of deteriorated quality of life under treatment (including hospital visits) with the risk of dying from the disease.

Previous work has focused on discretizing this problem in order to solve it approximately through Dynamic Programming (DP) iterations [START_REF] Cleynen | Numerical method to solve impulse control problems for partially observed piecewise deterministic markov processes[END_REF]. More specifically, the optimal control problem for the PDMP has first been expressed as a Partially Observed Markov Decision Process (POMDP) [START_REF] Bäuerle | Markov decision processes with applications to finance[END_REF]. This step is simply done by considering decision dates as stages of the POMDP. Note that the time lapse between decisions is thus not constant, the continuous time dynamics is encoded in the specific parametrization of the transition kernel, and the POMDP still has a continuous state space, with continuous observation space. The problem is then classically converted into a fully observed Markov Decision Process (MDP) [START_REF] Bäuerle | Markov decision processes with applications to finance[END_REF][START_REF] Cleynen | Change-point detection for piecewise deterministic markov processes[END_REF] on the belief or filter space. The filter process represents the probability distribution of the hidden values of the patient current state given the past and present observations. Second, the state space of the controlled PDMP has been discretized, so that an approximation of the filter process could be computed, charging only finitely many states. This approximate filter is called conditional filter in the sequel. Third, the belief space has been discretized in order to solve the MDP via dynamic programming iterations on a finite space.

In the current article, instead of discretizing the state and belief spaces, we use a Monte-Carlo Tree Search approach to (approximately) solve the controlled PDMP problem by simulation. More precisely, we propose an adaptation of the Partially Observed Monte-Carlo Planning (POMCP) algorithm [START_REF] Silver | Monte-carlo planning in large pomdps[END_REF], originally designed to solve discrete time / finite state and observation spaces POMDP, to the case of controlled PDMP. The novel challenge is that controlled PDMP involve continuous time as well as continuous state and observation spaces. We show empirically that this simulationbased approach outperforms the discretization-based approach both in terms of computation time and quality of returned policies. Thus, this approach is promising for providing an automated decision aiding tool for practitioners. To our knowledge, this is the first method to address this challenging question. Current decision making is typically based on heuristic rules derived from expert clinical knowledge [START_REF] Gerecke | The diagnosis and treatment of multiple myeloma[END_REF][START_REF] Lonial | How i treat high-risk myeloma[END_REF][START_REF] Stewart | How i treat multiple myeloma in younger patients[END_REF].

Results

Controlled piecewise deterministic Markov processes form a universal class of versatile models for patient follow-up

Despite the discrete-time acquisition of the marker measurements, we choose to model the dynamics of the patient's health by a continuous-time controlled Piecewise Deterministic Markov Process (PDMP). The formalism of PDMPs is both light and versatile [START_REF] Cloez | Probabilistic and piecewise deterministic models in biology[END_REF][START_REF] Mha | Markov models and optimization[END_REF][START_REF] Riedler | Limit theorems for infinitedimensional piecewise deterministic Markov processes[END_REF][START_REF] Rudnicki | Piecewise deterministic processes in biological models[END_REF]. It allows to describe the dynamics of the disease with only three biologically relevant parameters: the disease's risk function, λ, that dictates how often the patient is likely to relapse, the aggressiveness of the disease v that dictates how fast the marker level will increase during relapses, and the treatment efficiency v ′ that dictates how fast the marker level decreases under treatment.

In the formalism of PDMP, this is formulated by an exponential flow Φ which slope parameter (v or v ′ ) depends on patient condition and treatment, the risk function λ, and a transition kernel Q, that dictates how the patient's state evolves at relapses, here preventing the marker values from jumping abruptly at patient condition changes. This is illustrated in Fig 1 b). We consider a common risk function (identical for all patients) which we allow to depend on the time since the last remission date as well as the cancer marker level. We assume that the aggressiveness of the disease can be patient-dependent. It is either high or low and we model this as two different diseases. This leads us to introduce two different treatments, each efficient for one of those diseases and slowing the progression of the other. It is also an option not to treat for a given period.

We introduce three variables m, ζ, u, where the mode m corresponds to the overall condition of the patient (m = 0: remission, m = 1: disease 1, m = 2: disease 2, m = 3: death of the patient), ζ ∈ [ζ 0 , D] is the level of the marker, where ζ 0 is the nominal value and D the death level and u ≥ 0 is the time since the last change of overall condition (added for technical reasons to deal with non-constant risk functions). The precise definition of the controlled PDMP and its parameters (λ, Φ, Q) are given in the Methods section. The complete state of the patient is thus encoded by s = (m, ζ, u). We denote X 0 , . . . , X n the process values at the observation dates t 0 , . . . , t n .

The overall condition of the patient m, the level of the marker ζ and the relapse dates (together with the time u since the last change of condition) are not directly observed and thus cannot be used by the clinician to select a treatment. At each visit of the patient to the medical center, we assume that the practitioner receives a noisy observation of the marker level y = ζ + ϵ where ϵ is some Gaussian noise. The practitioner also knows the time t since the beginning of the patient follow-up. The complete observation available to the practitioner is thus encoded by ω = (y, t). The practitioner also has access to an indicator that the patient is still alive as treatment and follow-up stop at the death of the patient.

Based on the collection of present and past measurements and decisions, the practitioner selects both a time delay r until the next visit to the medical center and a treatment ℓ to hold until this next visit. Note that in our framework measurements are only made at visit dates. A decision is thus a pair d = (ℓ, r), where ℓ ∈ {∅, a, b}, and r ∈ {15, 30, 60}. Given a fixed arbitrary decision policy, simulating controlled patient trajectories is easy: see Algorithm 1 given in the Methods Section.

Cost functions encode the diverse impacts of treatment on the patient's quality of life

For the practitioner, controlling the disease is equivalent to choosing the best available treatment as well as the best next visit date in order to minimize its impact on the patient's quality of life along time. Defining the impact of treatment on the quality of life is a difficult task as it will typically depend on the treatment's side effects, the number of visits, the burden of living with a disease and the remaining life expectancy. This paper proposes a mathematical definition of the impact of the treatment on quality of life in terms of a cost function that takes into account those different aspects. For a decision d = (ℓ, r) comprising a treatment allocation ℓ and a time to next visit r, and for a current marker level ζ at time t k , and future marker level ζ ′ at time t k+1 = t k + r , we define

c(ζ, d, ζ ′ ) = C V + κ|ζ ′ -ζ 0 |r + βr1 {ζ=ζ0,ℓ̸ =∅} + M 1 {ζ ′ =D} , (1)
where C V is a visit cost, κ is non-negative scale factor penalizing high marker values, β is a penalty for applying an unnecessary treatment and M is the death cost. This cost function thus takes into account a visit cost, to prevent patients from undergoing too many screening tests, a cost depending on the marker value at the next visit, to encourage treatment and calibrate visit dates, a cost for degradation of quality of life due to treatments, in particular if they are not appropriate, and a cost for dying.

Calibrating cost parameters C V , κ, β, and M is a very difficult task, which is allowed to be patient-dependent (some patients may even express a wish to be sedated rather than undergo very long and painful treatments), and treatment strategies are bound to be parameters-dependent.

When cast as a controlled PDMP with this cost function, the practitioner's problem is mathematically equivalent to solving a (continuous state space) Partially Observable Markov Decision Process (POMDP) [START_REF] Cleynen | Numerical method to solve impulse control problems for partially observed piecewise deterministic markov processes[END_REF][START_REF] Pack | Planning and acting in partially observable stochastic domains[END_REF], which expected value optimisation can be stated as

V = inf π∈Π E π X0 Nπ-1 n=0 c(X n , d n , X n+1 ) , ( 2
)
where V is called the optimal policy value and represents the lowest possible expected total cost, Π is the set of admissible policies (yielding decisions depending only on current and past observations), N π is the patient-specific number of visits within the time-horizon of the study when using policy π, d n = π(Y 0 , t 0 , . . . , Y n , t n ) is the decision (ℓ, r) taken at the n-th visit date t n according to policy π, and (Y n ) n≥0 represents the marker observation process for the controlled-PDMP/POMDP. Solving this problem amounts to computing (a good approximation of) the optimal policy value and identifying an admissible policy π * that reaches (a value close to) the minimum.

Adapted Partially Observed Monte-Carlo Planning is particulartly well suited for controlled PDMPs

The objective of POMCP is to reduce the complexity of dynamic programming, which requires the construction of the entire decision tree (including the probabilities of every possible outcome with every possible decision at every future time-point), by sampling the tree in a principled way so as to compute the current optimal action. POMCP is thus an online algorithm, which re-estimates the optimal strategy at each new data acquisition 1 .

The POMCP algorithm relies on two main properties. The first one is the ability to simulate trajectories, so as to progressively build the decision tree and update filters Θ at every intermediate node h of the tree. Recall that a filter is a probability distribution representing the (approximate) distribution of the current hidden state given the observations. The standard POMCP algorithm uses a specific family of simulation-based filters Θ p called particle filters specified below. Filters are used to sample sets of plausible states.

The second property is the requirement to provide estimates of the expected value of the policy in leaves of the current exploration tree, in order to guide exploration and build the decision policy.

In the Methods Section we detail the algorithm (Algorithm 2) and show that POMCP is particularly well suited for controlled PDMPs. We simply point out here why trajectories simulation and policy evaluation are particularly efficient in POMCP, in the case of a controlled PDMP.

1. Simulation is particularly straightforward with PDMPs [START_REF] Benoîte De Saporta | Numerical methods for simulation and optimization of piecewise deterministic Markov processes: application to reliability[END_REF][START_REF] Daniel T Gillespie | Exact stochastic simulation of coupled chemical reactions[END_REF][START_REF] Lemaire | Thinning and multilevel Monte Carlo methods for piecewise deterministic (Markov) processes with an application to a stochastic Morris-Lecar model[END_REF], requiring only to simulate the jump times and exploit the deterministic behavior between jumps, see Algorithm 1. In our medical framework, it is made even more simple since only few jumps are allowed. When little knowledge is available about the underlying process, a classic approach is to resort to particle filters Θ p [START_REF] Del | Non linear filtering: Interacting particle solution[END_REF]. A particle filter Θ p at step n is a discrete uniform probability distribution with finite support B p (where B p may have repeated atoms). It is updated at step n + 1 though simulations: states s from B p are updated through a one-step simulation to a new state s ′ , and selected to be added to B p if the simulated observation is close to the true one. As an alternative filter to compare to, we propose to use a conditional filter Θ c derived from the exact filter (that is the conditional distribution of the hidden state given the observations) from [START_REF] Cleynen | Numerical method to solve impulse control problems for partially observed piecewise deterministic markov processes[END_REF]. The exact conditional filter is updated through a recurrence formula involving ratios of integrals over the state space. By discretizing the state space, one can construct the approximation Θ c of the exact filter. Unlike the particle filter that has a dynamically changing support with a uniform mass function, this conditional filter has a fixed support (the discretized space) with changing mass functions that are updated through analytical ratios of weighted sums.

2. To estimate the future expected cost at some node of the tree, POMCP requires to simulate many full trajectories from the current node to a leaf of the tree. This requires to apply an arbitrary strategy to pick actions at every future nodes for which a decision has not yet been optimized. This arbitrary strategy is called a rollout strategy in the POMCP framework. The most naive rollout strategy consists in uniformly randomly selecting decisions from the decision set {∅, a, b} × {15, 30, 60}. We consider instead a mode-based rollout strategy, which consists in choosing action ∅ in mode 0 (no treatment if the simulated patient is in remission), action a in mode 1 and b in mode 2 (most efficient treatment if the simulated patient has relapsed) and a fixed next visit date of 15 days. This rollout strategy, while not being necessarily optimal (depending on the cost function it might be optimal not to treat at the beginning of a relapse, or to treat preventively when in remission), exploits knowledge of the cost function, hence yields better estimates of action costs at time t. Note also that this mode-based policy is not applicable for real patients, since their mode is not observed. It is only applicable to simulated patients. This is fine since POMCP's rollout strategy is only used through simulations to estimate costs.

POMCP has a number of tuning parameters (number of simulations, number of particles in the filter, exploration vs exploitation rates) which are described (as well as the impact of varying their values) in the following section.

Following up a patient with adapted POMCP is easy and fast in practice

The previous paragraphs set the grounds for optimizing the long-term follow up of patients. In practice, we will assume a patient will enter the follow-up study once she enters the remission phase after an initial round of treatment. The practitioner may hence assume that her current state is known, i.e. s 0 = (0, ζ 0 , 0) and the initial value of both the particle and conditional filters is the Dirac mass at s 0 . The initial observation is ω 0 = (ζ 0 , t 0 ). The adapted POMCP algorithm is run to obtain the optimal decision d 0 , which the practitioner can use (if she decides to) to allocate treatment and decide on the next visit date t 1 . At visit n, the patient will come back for some new marker measurement, so that the n-th observation value ω n = (y n , t n ) is obtained. The practitioner will have access to her full history,

h n = ⟨ω 0 d 0 ω 1 d 1 • • • d n-1 ω n ⟩ as well as her last belief filter, Θ c n-1 or Θ p n-1 .
An initial update of the filter is performed, either using the recursion formula for Θ c n from Θ c n-1 and ω n , or by particle filtering through rejection sampling for Θ p n from Θ p n-1 and ω n . The adapted POMCP algorithm is then ran to obtain the optimal current decision d n , which the practitioner can use (or not) to allocate treatment and decide on the next visit date t n+1 . This is illustrated in Figure 2.

Adapted POMCP can be tuned to outperform dynamic programming

The simulation study presented in this section has been conducted based on real data obtained from the Centre de Recherche en Cancérologie de Toulouse (CRCT). Multiple myeloma (MM) is the second most common haematological malignancy in the world and is characterised by the accumulation of malignant plasma cells in the bone marrow. Classical treatments are based on chemotherapies, which, if appropriate, act fast and efficiently bring MM patients to remission in a few weeks. However almost all patients eventually relapse more than once and the five-year survival rate is around 50%.

We have obtained data from the Intergroupe Francophone du Myélome 2009 clinical trial [2] which has followed 748 French MM patients from diagnosis to their first relapse on a standardized protocol for up to six years. At each visit a blood sample was obtained to evaluate the amount of monoclonal immunoglobulin protein in the blood, a marker for the disease progression. An example of patient dataset is given in Figure 1.

Based on these data, we calibrated our PDMP model as described in the Methods section, and we performed simulations to evaluate the performance of the POMCP strategy to select the combination of treatment and next visit date at each time point of the trajectories (these time-points being themselves selected by the algorithm). The performance of the approach was measured by a Monte-Carlo estimate of the expectation and confidence interval of its value as well as the runtime new marker acquisition ωn = (yn, tn)

t 0 t 1 t 2 t 3 t 4 . . . b) ωn update ζ u ζ u Θ n-1 Θn (hn, Θn) dn c) h n ⟨N, V ⟩ h n d n 1 ⟨N, V ⟩ c rollout d n 1 h n d n 2 ⟨N, V ⟩ h n d n 2 ω n+1 1 ⟨N, V ⟩ c rollout ω n + 1 1 h n d n 2 ω n+1 2 ⟨N, V ⟩ h n d n 2 ω n+1 1 d n+1 1 ⟨N, V ⟩ c rollout d n + 1 1 h n d n 2 ω n+1 1 d n+1 2 ⟨N, V ⟩ c rollout d n + 1 2 ω n + 1 2 d n 2
ω n = (y n , t n ). b)
The filter is updated with the new observation, either through particle rejection sampling (particle filter ) or via a recursion formula (conditional filter ). c) The decision tree is partially explored via simulation through an adapted POMCP algorithm using the updated filter. The algorithm returns the optimal decision d n , combination of a time to next visit (defining t n+1 ) and treatment to allocate (influencing y n+1 ).

of the online computation of a complete trajectory. For each disease parameters' configuration 500 simulations were performed to estimate these values. Codes and parameters are available at https://github.com/acleynen/pomcp4pdmp [START_REF] Cleynen | Argenlieu. Pomcp4pomdp, implementation of pomcp algorithm adapted for pdmp models[END_REF].

Study 1: Impact of the parameters' values on POMCP's perfomance

We evaluated the impact of the value of 6 parameters on the performance: (i) the filter chosen (conditional or particle), (ii) the rollout procedure chosen, (iii) the exploitation/exploration tradeoff parameter α ′ , (iv) the number n search of simulations in the online POMCP procedure, (v) the number K of initial states to sample from at each of the n search simulations, and (vi) the internal POMCP precision parameter D to select particles in the particle filter. Those parameters are described at length in the Methods Section, see Algorithm 2. The github page [START_REF] Cleynen | Argenlieu. Pomcp4pomdp, implementation of pomcp algorithm adapted for pdmp models[END_REF] contains tables with results for every sets of parameters' values that were tested. In this section we describe the most important results. We performed all parameter comparisons for both the conditional and the particle filters. The conditional particle filter is a discrete probability distribution on a finite fixed support B c of size 184 with 81 states in condition m = 0, 31 states in condition m = 1, 71 states in condition m = 2 and one state in condition m = 3. The choice of these states is discussed in [START_REF] Cleynen | Numerical method to solve impulse control problems for partially observed piecewise deterministic markov processes[END_REF]. To adapt this filter to the POMCP environment, at each iteration n we start by randomly sampling K states s from B c with the distribution given by Θ c n . For the particle filter, this number K directly corresponds to the number of particles in the filter, hence the size of B p . Note that for the conditional filter the support B c does not change over time, whereas for the particle filter B p keeps the same size but possibly contains different states at each iteration.

Mode-based rollout outperforms naive rollout. We found that the uniform rollout procedure (selecting decisions randomly) produced very poor results compared to the mode-based rollout procedure and hence we only present results for the mode-based rollout policy here.

POMCP is robust to the exploration/exploitation trade-off. We found that the exploitation/exploration trade-off parameter had little influence on the overall performance, with the exception of extreme values (α ′ = 0.99, almost no exploration, and α ′ = 0.2, almost no exploitation, both leading to poorer performance). We also tried several adaptive strategies to select the value of α ′ depending on the confidence in the belief (measured in terms of entropy) which did not improve the results. The following results are therefore discussed for a fixed value of α ′ = 0.5, but the reader may refer to the Supplementary Information Tables 4 and5 for additional results on these parameters.

Increasing the number of exploratory simulations yields the best performance gain. For a fixed number of sampled belief states K and precision D, increasing the number of simulations n search improved the performance of the algorithm while decreasing the variance in the simulations for both filter types (see the top left panel of Figure 3 for K = 500, D = 0.01). In the case of the conditional filter, the runtime increases linearly, from 10 3 seconds per trajectory with n search = 100 simulations to 10 4 seconds per trajectory with n search = 1000. In the case of the particle filter, the runtime is 3 times as much for 100 simulations since when n search < K additional simulations have to be performed to compute the particle filter at time n + 1. The difference decreases to only 1.2 times the runtime of the conditional filter for n search = 1000.

Discretization precision

Value

Discretization impact, nsearch=1000, K=500

Figure 3: Impact of POMCP parameters on the estimated value function. Top left: increasing the number of simulations for filters with 500 initial states improves the average trajectory costs. Top right: increasing the number of atoms in the filter improves the performance of the particle filter but not the conditional filter.

The particle filter requires a large belief state to achieve high performance. As expected, for a fixed number of exploratory simulations n search and precision D, increasing the number K of particles in the particle filter led to a tremendous improvement for the particle filter together with a significantly decreased variance in the trajectory costs, while it had no impact on the conditional filter (see top right panel of Figure 3 for n search = 500, D = 0.01). Similarly, K has no runtime impact for the conditional filter, while it leads to exponential increase of the runtime for the particle filter.

POMCP for controlled PDMPs requires one additionnal tuning: the precision of the tree observation nodes. The bottom two panels of Figure 3 illustrate the impact of the precision D for a fixed filter size (K = 500) and two different numbers of simulations (n search = 500, left, and n search = 1000, right). For a smaller number of simulations, decreasing the precision improves the result up to D = 0.1, and then worsens them again. This tendency is still observed for the particle filter when n search increases, while the performance of the conditional filter is optimal with the loosest precision, D = 1. Those results are the consequence of two factors: as detailed in the Methods Section, each simulation creates a novel node in the tree exploration, where a node is a set of potential future trajectories with their estimated costs. When the precision is very fine, each simulation produces a different future observation and hence the estimation relies on one-step forward simulations which may miss future events. On the other hand, when the precision is very loose, each simulation will build on the previous simulation to explore a step forward, yielding very long trees with few branches. This will also miss the variability of different outcomes. The second factor comes from the way the filters are constructed. Particle filters rely on comparing simulations to observations. When the precision is very loose, almost all simulations will be accepted, creating a strong bias in the belief of the current state, that will propagate from time-point to time-point.

As the conditional filter update does not rely on simulations, hence neither on precision, there is no propagation of uncertainty from step to step, and when the number of exploratory simulations n search is large enough to guarantee some diversity in the tree exploration, estimating the cost of each decision from longer trajectories will provide better results.

Finally, one may note that the gain in using conditional filters is mostly apparent in extreme parameter scenarios, for instance with very low number of particles K, with very high precision rates, etc. Provided the user has enough computing budget, both filters tend to provide very similar results.

Study 2: Adapted POMCP outperforms the dynamic programming approach

In this study we compare the results of three resolution strategies calibrated with their optimal parameters on biological relevant outcomes: the death rate, the Progression-Free Survival (PFS) time, that is the time from entry in the study to the first relapse, the time spent under treatment, the number of visits to the hospital, and the cost. Those quantities were normalized so that they range between 0 and 1, and such that an optimal result is 0. To do so, death rate was normalized so that a random treatment strategy yields 1 (here 5% of patients); the PFS was transformed as 1-(PFS/H) (where we recall that H is the study horizon), so that a patient who does not relapse has normalized PFS equal to 0; the time spent under treatment was normalized by H, the number of visits was normalized as NVisit-40 160-40 since over the horizon, a visit every 15 days produces 160 visits, whereas a visit every 60 days produces 40 visits; and finally the cost was normalized as

C-v0 C random -v0
where v 0 is the the best approximation of the optimal value obtained through discretizations in [START_REF] Cleynen | Numerical method to solve impulse control problems for partially observed piecewise deterministic markov processes[END_REF], and C random is the average cost of the random strategy.

Here again, we simulated 500 trajectories with each strategy under the same cost parameters. The results are summarized in the Radar plot of Figure 4, and additional visual information on average trajectory cost are given in the barplots. In the Radar plot representation, a perfect strategy should delimitate the inner circle.

Compared strategies are the discretization/DP approach (DP) from [START_REF] Cleynen | Numerical method to solve impulse control problems for partially observed piecewise deterministic markov processes[END_REF] that relies on exact resolution by dynamic programming of the discretized POMPD, the adapted POMCP with the conditional filter (POMCP-Conditional) and the adapted POMCP with the particle filter (POMCP-Particles). Interestingly, the combination of POMCP with the conditional filter yields the lowest average trajectory cost and the shortest average time spent under treatment, by slightly increasing the number of visits and reducing PFS compared to the DP approach. However, the particle-based POMCP approach (relying fully on simulations with no other exploitation of the underlying model) yields cost almost as good as the previous two approaches, with increased number of visits but longest progression-free survival time. Importantly, out of 500 simulations, one of the trajectories ended with a patient dying.

Discussion

In this paper, a mechanistic PDMP model for cancer evolution and treatment has been presented. PDMPs are very flexible tools that allow to model routine screening data with very few parameters with biological meaning. When embedded in a control framework, PDMPs usually suffer from the need to compute intractable integrals and thus resort to several layers of approximations with heavy computational burden. In our case, there are two major difficulties in solving the optimization problem for the controlled PDMP. The first one is related to the partial observations of the process, since the practitioner only observes some noisy measurement of the marker at visit dates, and not the overall condition of the patient nor the relapse dates. The second one comes from the continuous state space and continuous time dynamics of the process, which prevent direct use of exhaustive exploration solution strategies such as dynamic programming [START_REF] Bertsekas | Neuro-dynamic programming[END_REF].

In a previous work [START_REF] Cleynen | Numerical method to solve impulse control problems for partially observed piecewise deterministic markov processes[END_REF], we have dealt with those difficulties by defining an equivalent fully observable Markov decision process on an enlarged state space through the use of conditional filters, the conditional distributions of the hidden process given the observations. Then we discretized the state space of the original process, in order to obtain finite support filters and discretized again these finite support approximate filters to obtain finitely many (belief) states. The fully discretized model can then be solved by dynamic programming.

Here we investigated another original solution approach exploiting filter objects under a different (simulation-based) dimension reduction strategy. We show that the inherent generator function of the PDMP can be exploited to make use of simulation-based solution strategies such as POMCP with excellent performance. Provided the number of simulations is large enough (either to explore the outcome space, or to construct consistent belief states), this approach can even outperform discretization approaches that exploit the knowledge of the underlying model. We have also proposed to combine both approaches, using discretization based conditional filters and simulation based solution stategy, resulting in a more robust algorithm (in particular less sensitive to the choice of POMCP parameters and with more stable variance), but with little performance gain.

The main advantage of the discretization/DP approach is that solutions are pre-computed for all new patients. This is especially useful under the assumption that all patients have the same dynamics with the same parameters. Its main drawback is that the model presented here is at maximum complexity for such an approach. In particular, it will become intractable if one wants to take into account more disease markers or more modes and treatments.

Conversely, the simulation-based approach can extend to any complexity provided simulations can be performed easily and fast. In addition, one of the main advantages of simulation-based approaches such as that presented here is that cost parameters can be modified with each new patient, yielding a patient-based procedure closer to precision medicine. This remains quite theoretical, as in practice calibrating cost parameters is a very difficult task, but with experience practitioners may be able to encode personal preferences, such as shorter life with better quality, or longer life at the price of more treatments, etc.

In this work, we have adapted the POMCP algorithm to solving a controlled PDMP with known model, too complex to be solved through exact dynamic programming. We made the assumption that the patient-disease model was known, which is a daring assumption. Therefore, one next step of our approach is to extend it by considering an unknown model and applying Reinforcement Learning methods [START_REF] Richard | Reinforcement learning: An introduction[END_REF]. A fundamental problem in Reinforcement Learning is the difficulty of deciding whether to select actions in order to learn a better model of the environment, or to exploit current knowledge about the rewards and effects of actions [START_REF] Katt | Learning in pomdps with monte carlo tree search[END_REF]. This is especially true in disease control problems.

Methods

Datasets, parameters and code availability

In order to propose a simulation study as realistic as possible we have used real data to infer the parameters of the design. The data come from the follow-up of 748 multiple myeloma patients registered in the 2009 IFM clinical trial described in the Results Section. An example of data is given in Figure 1. From this data, we opted for the exponential form of the dynamics in the disease states with boundaries ζ 0 = 1 and D = 40 for remission and death levels, simply calibrated as the minimal and maximal values in the data set. Then, as described in the Results Section, 3 parameters had to be calibrated, and all hyperparameters are explicitly given in the github repository [START_REF] Cleynen | Argenlieu. Pomcp4pomdp, implementation of pomcp algorithm adapted for pdmp models[END_REF].

For the risk function λ, we choose to distinguish the standard relapse (from remission to disease state) from the therapeutic escape (from a disease state under appropriate treatment to the other disease state). We then further separate the risk by disease and treatment, so that for any treatment ℓ and any state s = (m, ζ, u), one has λ ℓ (s) = λ ℓ m (ζ, u), where the form of λ ℓ m is specified in Table 1. For the standard relapse, the risk µ i for disease i was chosen as piecewise increasing linear functions calibrated such that the risk of relapsing increases until some duration τ 1 (average of standard relapses occurrences), then remains constant, and further increases between say τ 2 and τ 3 years (to model late or non-relapsing patients). This function and corresponding density are illustrated in Table 1: Risk function of the controlled continuous time PDMP. For the therapeutic escape, we chose to fit a Weibull survival distribution of the form

ℓ = ∅ ℓ = a ℓ = b m = 0 λ ℓ m (ζ, u) = (µ 1 +µ 2 )(u) λ ℓ m (ζ, u) = µ 2 (u) λ ℓ m (ζ, u) = µ 1 (u) m = 1 λ ℓ m (ζ, u) = 0 λ ℓ m (ζ, u) = µ ′ (ζ) λ ℓ m (ζ, u) = 0 m = 2 λ ℓ m (ζ, u) = 0 λ ℓ m (ζ, u) = 0 λ ℓ m (ζ, u) = µ ′ (ζ) m = 3 λ ℓ m (D, u) = 0 λ ℓ m (D, u) = 0 λ ℓ m (D, u) = 0
ℓ = ∅ ℓ = a ℓ = b m = 0 Φ ℓ m (ζ, t) = ζ Φ ℓ m (ζ, t) = ζ Φ ℓ m (ζ, t) = ζ m = 1 Φ ℓ m (ζ, t) = ζe v ∅ 1 t Φ ℓ m (ζ, t) = ζe -v ′ 1 t = ζe v a 1 t Φ ℓ m (ζ, t) = ζe v b 1 t m = 2 Φ ℓ m (ζ, t) = ζe v ∅ 2 t Φ ℓ m (ζ, t) = ζe v a 2 t Φ ℓ m (ζ, t) = ζe -v ′ 2 t = ζe v b 2 t m = 3 Φ ℓ m (ζ, t) = ζ Φ ℓ m (ζ, t) = ζ Φ ℓ m (ζ, t) = ζ
µ ′ (ζ) = ( βζ) α,
with -1 < α < 0 to account for a higher relapse risk when the marker decreases. We arbitrarily chose α = -0.8 and calibrated β = 1000 such that only about 5% of patients experience a therapeutic escape. The aggressiveness of the disease/treatment efficiency v/v ′ may depend on both treatment ℓ and mode m. Specific values are thus denoted by v ℓ m /v ′ m , see Table 2. After setting aside patients that do not relapse (about 20%), we first estimated remission and relapse times using maximal slope difference, and then fitted exponential regression models on each segment. We then clustered Table 3: Markov transition kernel Q for the controlled PDMP. matrix Q ℓ m (m ′ ) for the controlled PDMP. For any treatment ℓ and initial state s = (m, ζ, u) a jump sends the patient to state s ′ = (m ′ , ζ ′ , u ′ ) sampled from the distribution Q(•|s, ℓ). The following constraints are satisfied:

ζ ′ = ζ, u ′ = 0 and m ′ is sampled from the discrete distribution Q ℓ m . ℓ = ∅ m = 0 Q ℓ m (m ′ ) = 1 (m ′ ∈{1,2}) µ m ′ (u) µ1(u)+µ2(u) m = 1 Q ℓ m (m ′ ) = 1 (m ′ =0) (possible only if ζ = ζ 0 ) Q ℓ m (m ′ ) = 1 (m ′ =3) (possible only if ζ = D) m = 2 Q ℓ m (m ′ ) = 1 (m ′ =0) (possible only if ζ = ζ 0 ) Q ℓ m (m ′ ) = 1 (m ′ =3) (possible only if ζ = D) ℓ = a m = 0 Q ℓ m (m ′ ) = 1 (m ′ =2) m = 1 Q ℓ m (m ′ ) = 1 (m ′ =2) (possible only if ζ > ζ 0 ) Q ℓ m (m ′ ) = 1 (m ′ =0) (possible only if ζ = ζ 0 ) m = 2 Q ℓ m (m ′ ) = 1 (m ′ =3) (possible only if ζ = D) ℓ = b m = 0 Q ℓ m (m ′ ) = 1 (m ′ =1) m = 1 Q ℓ m (m ′ ) = 1 (m ′ =3) (possible only if ζ = D) m = 2 Q ℓ m (m ′ ) = 1 (m ′ =1) (possible only if ζ > ζ 0 ) Q ℓ m (m ′ ) = 1 (m ′ =0) (possible only if ζ = ζ 0 )
patients based on their relapse coefficient and chose the number of clusters using the slope heuristic on residual sum of squares. We obtained two groups and used the average values to obtain v ∅ 1 = 0.02 (22% of patients) and v ∅ 2 = 0.006 (78% of relapsing patients). We then computed the average of the treatment parameters for each group and obtained v ′ 1 = 0.077 and v ′ 2 = 0.025. The data do not present patient relapsing under treatment, and therefore we could not estimate v for therapeutic escapes or inappropriate treatments. Because we assume the aggressiveness in those circumstances should be smaller than under standard relapse, we chose v b 1 = 0.01 and v a 2 = 0.003. By separating the risk λ by disease, the kernel function Q is automatically fitted, since we assume that the marker level does not jump at relapses, and the mode is selected by the risk clocks leading to the jump, whichever rings first, see Table 3. Finally, we arbitrarily selected a centered Gaussian distribution with noise parameter σ 2 = 1 for the observation process.

We resorted to extensive simulations study to select cost parameters that seemed reasonable (very few patients dying over our study horizon, on average not more that a fourth of the follow-up time spent under treatment, etc). We arbitrarily fixed the visit cost C V to 1. We then fixed the death cost M to 110 so that with visits every 15 days and early relapse, a patient would rather die that spend the entire horizon under treatment with numerous visits. We then fixed β = 0.1 so that the penalty of applying an unnecessary treatment would count as 1.5, 3 or 6 times the visit cost depending on the choice of next visit date r. Finally, we selected κ = 1/6 from extensive simulations so that for low marker observations (typically when it is hard to decide between relapse or remission with high noise) it might be preferable to wait for new data acquisition rather than treat by default. All codes and parameters are available at https://github.com/acleynen/pomcp4pdmp [START_REF] Cleynen | Argenlieu. Pomcp4pomdp, implementation of pomcp algorithm adapted for pdmp models[END_REF].

Reminder on controlled PDMPs

Here is a description of how to simulate a trajectory of a controlled PDMP between two consecutive visits to the medical center. The controlled PDMP parameters are λ, the disease risk function (distribution of duration until the next jump i.e. condition change), Q, the Markov kernel, defining the stochastic transition to the state reached after the next jump and {v ℓ m } 2 , the parameters of the exponential deterministic behavior of the marker between two jumps, defined from the current mode and treatment applied.

Algorithm 1 Simulation of a trajectory between two consecutive decision times of a controlled PDMP.

1: procedure SimulatePDMP(m, ζ, u, ℓ, r)

2: t ← 0 3: v ← v ℓ m 4:
while t < r do

u ← u + S 13: m ∼ Q(•|m, ζ, u , ℓ) 14:
u ← 0

15: v ← v ℓ m
Procedure SimulatePDMP takes as input an initial position X t = s = (m, ζ, u) with mode m, marker level ζ, time since the last jump u, and a decision d = (ℓ, r) with treatment to be applied ℓ for a duration r until the next visit to the medical center and returns the state X t+r = s ′ = (m ′ , ζ ′ , u ′ ) of the process at time t + r given that treatment ℓ was applied. At line 5, S ∼ λ means that S is sampled from the distribution with risk function λ, which means that it has the following survival function P(S > t) = e -t 0 λ(m,ζ exp(vτ ),u+τ )dτ .

At line 6, t * (m, ζ, u, ℓ) is the (deterministic) time to reach either the nominal value ζ 0 or the death level D from the current point (m, ζ, u) (if no change of condition or treatment occurs). The third variable u representing the time since the last jump allows transitions described in SimulatePDMP to be Markovian, i.e. to be independent of the previous transitions.

Reminder on Partially Observed Monte-Carlo Planning

In this section we give a description of the original POMCP algorithm 3 . The algorithm is called iteratively at each observation step n and requires several entries in order to output a decision d n to be used by the operator. The inputs include a set of possible decisions (denoted A), a history

2 For the sake of unified notation, we denote here

v a 1 = v ′ 1 , v b 2 = v ′ 2 , and v ∅ 0 = v a 0 = v b 0 = 0 3 A
Python implementation of the POMCP algorithm can be found here: https://github.com/GeorgePik/POMCP h n = ⟨ω 0 d 0 ω 1 . . . d n-1 ω n ⟩ of successive observations and decisions up to step n, including the current observation ω n , an approximate (particle) filter Θ p (h n ) with support B p (h n ), a simulator G(s, d) of state and observation at step n + 1 together with their cost given a state s and decision d at step n, a stopping criterion Timeout and an arbitrary Rollout strategy to provide a heuristic evaluation of an history, whenever needed.

Algorithm 2 Original POMCP algorithm [START_REF] Silver | Monte-carlo planning in large pomdps[END_REF] 1: procedure POMCP(h n )

2: repeat 3: if h n = ∅ then 4: s ∼ Θ p 0 5: else 6: s ∼ Θ p (h n ) 7: Simulate(s, h n ) 8:
until Timeout() T (hd) ← ⟨N init , V init , ∅⟩ C ← c+Simulate(s ′ , hd * ω) 28:

9: d * ← arg min d V (h n d) 10: V (h n ) ← min d V (h n d)
B p (h) ← B p (h) ∪ {s} 29: N (h) ← N (h) + 1 30: N (hd * ) ← N (hd * ) + 1 31: V (hd * ) ← V (hd * ) + C-V (hd * ) N (hd * ) 32:
return C

The POMCP algorithm involves several data structures:

• Simulated states s = (m, ζ, u).
• Decisions d = (ℓ, r), belonging to a finite decision space A, preferably small.

• Observations ω = (y, t). The original algorithm assumes that they belong to a finite observation space Ω of limited size. • T is a tree data structure rooted at the initial history h n . Each node of T will correspond to an extended history, ended by either a decision or an observation. Each simulation step creates a novel node in the tree, and histories h are attached to T by appending the corresponding novel decision/observation to the parent node's history. In addition, we also attach to each node (now denoted T (h) or T (hd)) (i) integer numbers N (h) or N (hd) where N (h) corresponds to the number of times the history h has been simulated and N (hd) to the number of times d has been selected after h was encountered, (ii) real numbers V (hd) corresponding to an estimate of the cost value of hd, that is the expected sum of future costs obtained if the optimal policy is applied after h has been encountered and d selected, until the final decision step and (iii) Θ p (h), called a particle filter, which is a discrete uniform distribution on a set B p (h) of states s compatible with the current history h.

• Histories h = ⟨ω 0 d 0 ω 1 d 1 • • • , d n-1 ω n d ′ ω ′ d
When Simulate is called with entry a history h that already belongs to T , it updates the values of N (h) and B p (h) as well as the values N (hd) and V (hd) for all the successor nodes4 hd. When Simulate is called with entry a history h which does not yet belong to T (as is the case initially for h n ), it appends h as well as all its successor nodes hd to T and initializes their values N (h), B p (h), N (hd) and V (hd).

Procedure Simulate is based on a generator function, (s ′ , ω, c) ∼ G(s, d) that generates a successor (hidden) state s ′ , an observation ω and an immediate cost c, from decision d applied in current (hidden) state s. Repeated calls to G are used to progressively expand T .

Simulation sequences and updates are performed, starting from h n , until Timeout() function requires to stop (generally, after an arbitrary number n search of trajectories have been simulated or a fixed amount of time has been spent). Then, the decision d * which maximizes V (h n d * ) is applied to the real-world system, and a real-life observation ω ∈ Ω is obtained. The new real-world history becomes h n+1 = h n d * ω and T is pruned, so that the new tree is rooted5 in h n+1 .

POMCP proposes strategies to select the input rollout and filters when the user has no knowledge on the process. A typical rollout strategy may simply involve selecting the decisions randomly from the set A. The following particle filter update procedure, included in procedure Simulate, is suggested:

• If h = ∅, sample s ∼ Θ p 0 .
In the initial step of the algorithm, we simulate random particles from an arbitrary belief state.

• If h ̸ = ∅, sample s ∼ Θ p (h) where Θ p (h) is the uniform discrete distribution on the finite nonempty set B p (h). Indeed, if h ̸ = ∅, this means that procedure Simulate(s ′ , h) has already been called at least once for some s ′ and thus B p (h) ̸ = ∅ (B p (h) contains at least s ′ ).

• Sample (s ′ , ω, c) ∼ G(s, d * ). This step is performed in line 27 of the POMCP algorithm.

• if |ω -ω ′ | = 0, update B p (hd * ω) ← B p (hd * ω) ∪ {s ′ }.
As the number of samples increases, the supports of the filters B p (h) will contain more and more particles and converge to the empirical distribution P(•|h) of hidden states given the observed trajectory h. When the state space is finite, Θ p (h) can be seen as an histogram approximation of P (•|h).

Adapted POMCP algorithm to the case of controlled PDMPs

It seems natural to apply a POMCP algorithm to optimize a PDMP control strategy in the context of disease control. Indeed, PDMPs have natural generator functions since algorithm SimulatePDMP can be naturally augmented with an observation simulator and a cost function, in order to obtain a generator function G as described above. We propose three adaptations of the original POMCP algorithm to exploit the particular framework of controlled PDMPs.

Rollout policies

The original POMCP algorithm describes the possible rollout policies as admissible policies, meaning that actions choices should only depend on the history of past actions and observations. Instead, we exploit here the PDMP generator which provides both hidden states and observations. This allows to design rollout policies exploiting hidden states instead of noisy observations. In our medical framework, one may build interesting rollout policies exploiting the hidden mode of the disease to provide good heuristics to the simulation part of POMCP. In practice, we propose to compare the two following rollout policies:

1. The (admissible) uniform policy : π unif (ω = (y, t)) ∼ U({∅, a, b} × {15, 30, 60})

2. The (non-admissible) mode policy :

π mode (s = (m, ζ, u)) = π mode (m) =      {∅, 15} if m = 0, {a, 15} if m = 1, {b, 15} if m = 2.
The mode policy, being based on the full observation of the process, is likely to underestimate the real cost of an optimal control policy, which is a useful property for the convergence of a heuristic search method [START_REF] Russel | Artificial intelligence: a modern approach[END_REF].

In our simulation study we observed that a mode-based rollout policy can be particularly efficient.

Observation space The time, state and observation spaces of the disease control PDMP model are continuous. This means that the probability of simulating exactly the same history h twice is zero if we apply the POMCP procedure as such. Thus, the tree depth and the size of filters supports B p (h) may never exceed 1. This is particularly annoying since the POMCP algorithm convergence proof only holds when Θ(h) is close to the true empirical belief state, which (approximately) holds when the size of the support B p (h) tends to +∞. Indeed, the POMCP procedure in [START_REF] Silver | Monte-carlo planning in large pomdps[END_REF] requires that B p (h) contains at least K particles, when h is non empty. In practice, for the controlled PDMP case, observations are made of pairs (y, t) of a continuous-value observed marker level and discrete time of current decision. Therefore, we discretize the observation space into a set of contiguous intervals and group together observations belonging to the same interval.

The continuous nature of the model also prevents the exact computation of the filter, hence we resort to the use of particle or conditional filters. The construction of the former is slightly adapted from the initial POMCP algorithm to fit our model. Indeed, as the true process still produces continuous-valued observations, the last action of the particle filter update procedure is modified to updating B p (hd * ω) with s ′ only if |ω -ω ′ | < D (with D chosen by the user, typically of the same magnitude as the discretization precision). It may still happen that this procedure selects only states with wrong mode m at step n (i.e. Θ p (h n ), which is only an approximation of the true filter, does not contain the true hidden mode m), and hence cannot generate compatible states at step n + 1 due to diverging dynamics of the process in the different modes. This is not a simple matter of statistical accuracy, but a very practical problem. When this happens, we say that B p (h n+1 ) is deprived of particles and we cannot go on applying POMCP to h n+1 .

This problem of particle deprivation can be mitigated by a few modifications of the standard particle filter construction:

An alternative view of controlled PDMPs Controlled PDMPs can be modelled as continuous space POMDPs, in the way we proposed in this paper. However, they can also be seen as a particular subclass of continuous-time (Partially Observed) Semi-Markov Decision Processes [START_REF] Howard | Semi-markovian decision processes[END_REF]. Fully-observed continuous-time Semi-Markov Decision Processes extend Markov Decision Processes by including random continuous durations of state transitions and by considering that decisions can only be made at transition times. Several reinforcement learning solution approaches have been proposed, both in the fully-observed [START_REF] Bradtke | Reinforcement learning methods for continuous-time markov decision problems[END_REF][START_REF] Doya | Reinforcement learning in continuous time and space[END_REF] and partially-observed [START_REF] Du | Model-based reinforcement learning for semi-markov decision processes with neural odes[END_REF] cases to solve these problems. An alternative approach to ours could be to cast the PDMP model of cancer treatment into the continuous-time SMDP model and look for specializations of the existing simulation based solution algorithms.

Supplementary simulation results on POMCP parameters

Here we provide raw results for a series of parameter we tried to tune to optimize the POMCP algorithm, but that did not seem to bring additional improvement in our framework. Table 4 shows the impact of the trade off parameter α ′ in a few scenarios for the particle filter. Table 4: Raw results for the particle filter varying parameters α ′ , n search and K. For each parameter set, n = 500 trajectories were simulated. The Value column is the average cost of the trajectories over the n trajectories, and σ its empirical variance. We also recorded the runtime of optimizing each trajectory (duration column).

Filter To allow adaptive selection of the trade off parameter c we tried three dynamic procedures to exploit or explore more depending on our trust in the current patient state. To do so, we define the state entropy as E t = 2 m=0 p m log(p m ), p j = s=(m,ζ,u)∈B 1{m = j} and E max = log(1/3) and consider the following:

π
• entropy: α t = E t /E max

Figure 1 :

 1 Figure 1: Example of patient follow-up data, PDMP model. a) Marker values are measured at each patient visits over a certain period of time. Data from the Intergroupe Francophone du Myélome 2009 clinical trial, courtesy of the Centre de Recherche en Cancérologie de Toulouse. b) PDMP model, representation of the marker level of a patient. The risk function λ controls the time to relapse, while parameters v and v ′ control the aggressiveness of the disease and the efficiency of the treatment respectively.

Figure 2 :

 2 Figure 2: Practice of patient follow-up. a) At each new visit the patient has a new marker measurement, and the practitioner receives a new observation ωn = (y n , t n ). b)The filter is updated with the new observation, either through particle rejection sampling (particle filter ) or via a recursion formula (conditional filter ). c) The decision tree is partially explored via simulation through an adapted POMCP algorithm using the updated filter. The algorithm returns the optimal decision d n , combination of a time to next visit (defining t n+1 ) and treatment to allocate (influencing y n+1 ).

Figure 4 :

 4 Figure4: a) Radar plot comparing performances of 4 solution strategies on death rate, progressionfree survival (PFS), time spent under treatment, average number of visits per patient, and average trajectory cost. An optimal strategy would be the inner-circle. b) Barplot of trajectory cost for 500 simulations under three main strategies: POMCP with particle filter, POMCP with conditional filter and Dynamic Programming on discretized processes.

Figure 5

 5 Figure 5 for disease b.

Figure 5 :

 5 Figure 5: Risk and Density functions for standard relapse from remission condition to disease b condition (similar shapes for standard relapse to disease a).

  * ← arg min d V (hd) -α log(N (h)) N (hd) 26: (s ′ , ω, c) ∼ G(s, d * ) 27:

  "ω" . . . ⟩. Histories represent sequences of decisions and observations of variable lengths. They are the concatenation of the sequence of past observations/decisionsh n = ⟨ω 0 d 0 ω 1 d 1 • • • d n-1 ω n ⟩plus an arbitrary sequence of future observations/decisions, built using the rollout strategy and a simulation model of the POMCP (line 28, h ← hd * ω).

Table 2 :

 2 Flow Φ of the controlled continuous time PDMP. For any treatment ℓ, initial state s = (m, ζ, u), and duration t, Φ ℓ (m, ζ, u, t) = (m, Φ ℓ m (ζ, t), u + t) is the state of the patient after a time t starting from state s at time 0 if no change of condition or treatment occurred.

The Partially Observed Monte-Carlo Planning (POMCP) algorithm[START_REF] Silver | Monte-carlo planning in large pomdps[END_REF] is an efficient simulationbased algorithm that has been designed for real-time planning in large finite state-space POMDPs. In this paper we show that even-though it has not been designed to handle continuous state and observation spaces, we can adapt it to solve controlled PDMPs, thanks to their efficient simulation property, without resorting to the computation of complex integrals for computing transition probabilities.

POMCP does not "forget" previously computed strategies, but updates them using new simulated samples after every new observation is received.

It is a property of the algorithm that whenever h ∈ T , hd ∈ T as well.

The interest of pruning T instead of starting with an empty tree in h n+1 is to exploit past simulations in the computation of the next decision.

We acknowledge the support of the French Agence Nationale de la Recherche (ANR), under grant ANR-21-CE40-005 (project HSMM-INCA), of European Union's Horizon 2020 research and innovation program (Marie Sklodowska-Curie grant agreement No 890462) and the support of MESO@LR-Platform at the University of Montpellier.

• Assume that B p (h n+1 ) is empty or too small, whatever the number of simulations of s n ∼ B p (h n ) followed by a call to G(s n , d * n ) we perform. Then, we may go back in the history and resimulate s n-1 ∼ B p (h n-1 ) followed by two successive calls to G:

) and, provided that |ω ′ -ω n | < D, -(s n+1 , ω ′′ , c ′′ ) ← G(s n , d * n ), hoping that now, |ω ′′ -ω n+1 | < D. A particle s n+1 is then added to B p (h n+1 ) whenever the two above conditions are met.

• Assume that B p (h n+1 ) is non-empty but still too small (|B p (h n+1 )| ≪ K) after the previous step was applied a large number of times. We may perform particle revigoration by resampling particles from B p (h n+1 ) and duplicate them.

• Finally, when everything fails, we may perform a large number of sampled transitions from B p (h n ) (e.g. 1000 × K) and keep the K particles s ′ in the generated samples(s ′ , ω ′ , c ′ ) with minimal distance |ω n+1 -ω ′ |, with some arbitrary distance definition.

In our experimental studies, we applied these three modifications in turn, whenever needed, until we got belief states B p (h n ) of cardinality at least K.

Filters We propose to modify the original particle filter of POMCP to incorporate the conditional filter. Hence the algorithm is modified as follows: starting from an initial arbitrary belief filter Θ c 0 for h 0 = ∅ as in the original POMCP, when the new history becomes h n+1 = h n d ⋆ ω, we compute the new filter Θ c n+1 as a deterministic function of Θ c n and d ⋆ , ω (see [START_REF] Cleynen | Numerical method to solve impulse control problems for partially observed piecewise deterministic markov processes[END_REF] for its specific form) and sample K particles from Θ c n+1 to generate a set of plausible hidden states. Depending only on the current belief and the new observation (and not on simulations), this filter does not suffer from the propagation of approximations and particle deprivation. Moreover, the computational burden of the simulations is replaced by the computation of weighted sums which are particularly efficient in matrix programming languages.

5 Supporting information

State of the art

Artificial Intelligence in medicine The use of artificial intelligence methods in medicine has recently exploded, as was shown for example in [START_REF] Kumar | Artificial intelligence in disease diagnosis: a systematic literature review, synthesizing framework and future research agenda[END_REF]. Yet the vast majority of these works focus on diagnosis and prognosis, rather than treatment and follow-up. There are a few studies related to treatment of diseases, though. [START_REF] Bhinder | Artificial intelligence in cancer research and precision medicine[END_REF] provides a review of approaches to cancer treatment focused on medical decision support. In the context of drug design for cancer treatment, (deep) Reinforcement Learning (RL) approaches have been proposed recently [START_REF] Olivecrona | Molecular denovo design through deep reinforcement learning[END_REF][START_REF] Popova | Deep reinforcement learning for de novo drug design[END_REF], but with the disadvantage of being black-box approaches, preventing the practitioner from access to an explainable model of disease evolution and treatment. Uncertainty quantification in models of assisted decision making have been proposed to alleviate this problem [START_REF] Begoli | The need for uncertainty quantification in machine-assisted medical decision making[END_REF]. In the same line of work, [START_REF] Benzekry | Artificial intelligence and mechanistic modeling for clinical decision making in oncology[END_REF] advocate learning of mechanistic models of cancer evolution/treatment in order to help decision making. However, the latter approach requires a large amount of data prior to applying any treatment action, in order to learn a model that may prove only partially valid as decisions influence the disease dynamics. The authors advocate that the approach may be rendered more efficient if learning phases are interleaved with actual decision phases.

• rev-entropy-2:

However, none of those procedures improved the results, as illustrated in selected examples in Table 5.

Table 5: Simulation results with adaptative choice of the exploration/exploitation parameter α ′ . For each parameter set, n = 500 trajectories were simulated. The Value column is the average cost of the trajectories over the n trajectories, and σ its empirical variance. We also recorded the runtime of optimizing each trajectory (duration column).

Filter