Integrating Expert ODEs into Neural ODEs: Pharmacology and Disease Progression

Abstract: Modeling a system's temporal behaviour in reaction to external stimuli is a fundamental problem in many areas. Pure Machine Learning (ML) approaches often fail in the small sample regime and cannot provide actionable insights beyond predictions. A promising modification has been to incorporate expert domain knowledge into ML models. The application we consider is predicting the patient health status and disease progression over time, where a wealth of domain knowledge is available from pharmacology. Pharmacological models describe the dynamics of carefully-chosen medically meaningful variables in terms of systems of Ordinary Differential Equations (ODEs). However, these models only describe a limited collection of variables, and these variables are often not observable in clinical environments. To close this gap, we propose the latent hybridisation model (LHM) that integrates a system of expert-designed ODEs with machine-learned Neural ODEs to fully describe the dynamics of the system and to link the expert and latent variables to observable quantities. We evaluated LHM on synthetic data as well as real-world intensive care data of COVID-19 patients. LHM consistently outperforms previous works, especially when few training samples are available such as at the beginning of the pandemic.


Reviews and author responses:

 Hello, I wanted to express my apologies for being absent from the discussion so far. I wanted to reserve time to re-read the paper as well as consider the response in context. I kept putting this off and for this I apologize. I appreciate the time the authors spent to address my concerns and I would recommend that the authors certainly follow through on their promises to clarify the paper. 

I wanted to quickly step in here and let you know that I've read the author's response as well as the other reviews and corresponding discussions. I feel that this work is a valuable contribution to the community and should help push forward the body of research looking to integrate expert and learned features in complex problem domains. I maintain my recommendation for acceptance.

I have some reservations about how the paper centers its advances on assumptions of "exact" or "correct" expert models. This severely limits the type of possible extensions (focusing on health and pharmacology here) of this work given that so few of these kinds of expert models exist with any reliability. I do feel that the arguments that other reviewers about the technical novelty of this work being somewhat narrow to be warranted. The LHM has a sense of being a special case of the supposedly more general approaches. However, my concerns are not to the depth where I feel the need to lower my initial score. I do hope that the authors will adequately address these similarities (despite their own nuances and limitations -- as the authors pointed out in their discussion with reviewer yPRn) in their revised (and possibly final) version of this paper. 

 Dear authors,

Thank you very much for running this extra experiment. It's really appreciated. This helps addressing the concerns I have expressed. However, I think that the experiment would be more convincing if it would be done on the real dataset and potentially with a non linear (e.g. quadratic) ODE. I'd be happy to increase my score in this case.

Nevertheless, I'm positive about your work and think it's valuable for the community.

Best Regards,

 Once again, thank you for your invaluable feedback. We were wondering whether our response has addressed your concerns. If you have any additional comments, please let us know, we would be eager to address them.

 Once again, thank you for your invaluable feedback. We were wondering whether our response has addressed your concerns. If you have any additional comments, please let us know, we would be eager to address them.

 Once again, thank you for your invaluable feedback. We were wondering whether our response has addressed your concerns. If you have any additional comments, please let us know, we would be eager to address them.


 Dear Reviewer 62Te, thank you for your reply.

Based on your suggestions, we have run an additional experiment with misspecified expert ODE. We will include the experiment and the analysis in the revision. We would like to kindly ask you to take these findings into consideration.

The experiment set up is the same as the simulation study in the paper (Figure 3 first panel). To ensure a fair comparison, the misspecified ODE involves the same number of the expert variables as the correct ODE (four expert variables, E=4). We also use the same number of ML latent variables (M=2) in both versions. The NODE benchmark uses 6 latent variables (M+E). 

The misspecified ODE is a linear ODE: $\dot{z_1} = z_2$ ; $\dot{z_2} = -\theta_1 z_1$ ; $\dot{z_3} = z_4$ ; $\dot{z_4} = -\theta_2 z_3$. The trajectories of these variables are sine/cosine waves with different periods. 

The results are shown in the table below. The misspecified version (LHM-MIS) consistently underperforms the version with correct expert ODE (LHM). This illustrates that the source of performance gain is the domain knowledge encoded in the expert ODE – when such domain knowledge is wrong or unhelpful, we do not expect performance gain. Also note that LHM-MIS displays the typical behavior of a misspecified (biased) model where the performance does not improve significantly with more samples. 

```
N=       10            100           500           1000          
============================================================
LHM      0.753 (.004)  0.704 (.004)  0.707 (.005)  0.701 (.004)  
NODE     0.957 (.006)  0.918 (.006)  0.906 (.006)  0.873 (.007)  
LHM-MIS  0.925 (.006)  0.916 (.006)  0.912 (.006)  0.917 (.007)
```



 Dear Authors,

Thank you for your answers. 

My main concern still resides in the source of performance improvement. The experiments fail to convince that the improvement is due to the expert ODE or to a better behaved ODE (see my first comment that you did not address). I keep thinking an experiment with a mispecified expert ODE would be needed to better understand the source of improvement.

 Thank you for your prompt reply. With all respect: we believe that what is said in your 1st paragraph is simply not so.  

In [1], the authors assume that the true ODE is of the form 
$X' = F_P(X) + F_a(X)$ where $F_P$ is a known physical model and $F_a$ is unknown.  Because there are potentially many possible functions $F_a$, they look for one that minimizes the norm of $F_a$.  Notice that they assume explicitly that **i)** the true ODE is first order, **ii)** there are no other relevant variables and **iii)** the variables X are observable.  *Our work does not assume any of these things*.   

We find it difficult to compare our work with [2], in part because we think there are many problems with that paper. The model is not described in rigorous terms; in particular, the paper does not specify which quantities are known, which quantities are observed, and which quantities are to be inferred.  

We note that there is an enormous gap between the Example in [2] and the general model that is claimed.  In particular, in the Example, it is explicitly assumed that there is a single one-dimensional unknown variable - the angle $\theta(t)$ - and that the dataset includes values of that variable.  There are no latent variables to be inferred or to be used to infer information about $\theta$.  The analogs of $\theta$ in our setting are the expert variables - but in our setting the expert variables are not observed.  

In addition, there are some problems with the Example itself - or at least with the description.  The given ODE describes the angle (position) $\theta(t)$ of a pendulum that is both driven and damped.  (This is the classic physical example of a chaotic dynamical system.)  In addition to $\theta(t)$, the equation (1) involves $\omega$, $\zeta$ and $u(t)$; the authors identify $\omega$ as the angular velocity), $\zeta$ as the damping coefficient and $u(t)$ as the driving force.  This description is simply wrong.  By definition, the angular velocity is the time derivative of the angle (position); the term that represents angular velocity is not $(\omega)^2 sin(\theta)$ but rather $\zeta (d\theta/dt)$ - which is a term that is supposedly being learned.  

We hope the reviewer will understand why we did not raise these criticisms in the manuscript, and why we have been very reluctant to raise them in our responses - a forum which does not allow the authors of [2] the opportunity to respond.  



 Dear authors thank you for your response. I have a couple of comments. 

Considering the relation to [1,2], I believe that the fact that these consider incomplete or imperfect physics model makes them more general than the approach the paper discusses which assumes perfect knowledge. In particular by switching off the components in these models that learn to complete for the missing knowledge one would get something that is pretty similar to the approach presented in the present paper, modulo the missing regularisation on how the domain knowledge "latent" variables are used (or not) by the model.

With respect to the use of independent priors for the two types of latent variables $z^e, z^m$ what is there to prevent $z^e$ from being independent from $z^m$, but completely useless? and have all the information pass through $z^m$? One way to check whether at least in the synthetic experiments whether the model is making something sensible is to see how well the $\theta^e$ variables are learned and what is their error with respect to the real values used in the simulation. That would provide at least indirect evidence that the model is learning something sensible with respect to these variables. In any case the use or not of these variables should be studied more carefully, the improvement of performance between the vanilla version and the physics based version provides evidence that these are probably used, but this could be the result of some implicit regularisation, e.g. the number of $z^m$ latent variables being such, compared to the number of $z^e$, that the information that can flow through them is restricted forcing in that manner the use of the $z^e$ domain knowledge-based variables. 
 

 Thank you for your thoughtful comments and suggestions. We’ve provided a point-by-point response below. Please let us know if anything needs further clarification.

---
### (1) Will the decoder ignore the expert variable?
 
First, we must emphasize that the expert variables in this work are different from the “latent variables” in conventional state space modeling. The expert variables correspond to measurable quantities in the laboratories and their dynamics are governed by the expert ODEs (assumed to be correct). In contrast, the dynamics of the “latent variables” needs to be learned from the data. 
 
With that in mind, we can envision two possible situations where the decoder will ignore the expert variables. We believe these situations are unlikely, as is suggested by the performance gain in the experiments.
 
**Situation 1**: None of the measurements $x(t)$ depend on the expert variables. This would violate Equation 4 because now $x(t) = g(z^m(t))$. In practice, the user of LHM should verify that $x(t)$ and $z^e(t)$ are related; this can be done on the basis of domain knowledge (as is done in the case study in Section 5.2).  
 
**Situation 2**:  The neural ODE re-learns the expert ODE and the latent variables $z^m$ duplicate the expert variables $z^e$.  (This may be the situation that most concerned the reviewer.)  This is not impossible, but it is highly unlikely for two reasons. First, we use independent priors for the initial values $z^e(0)$ and $z^m(0)$; this discourages any possible duplication (Section 3.3). Second, duplicating the expert variables $z^e$ in the machine-learned variables $z^m$ would not improve the fit to the observed data (i.e., it would not improve the likelihood). Because the gradient-based training seeks to *improve* the objective function at each step, it will naturally avoid such duplication.
 
### (2) Related works
 
Thank you for bringing the contemporaneous works [1] and [2] to our attention. We will cite and discuss these works in the updated manuscript -- but we believe that they address very different problem settings from ours, and our work is certainly not subsumed by those.
Specifically, our work differs from [1] and [2] in the following three aspects:
1.	*Assumption on the expert ODE*. [1] and [2] assume that the expert ODE $f^e$ is *incorrect* but we assume the expert ODE is *correct*. By “correct”, we mean that the expert ODE accurately captures the dynamics of the physically meaningful expert variables. We think this is a reasonable assumption in our application because the expert variables are measurable in the *laboratory*.


2.	*The way to combine expert and ML ODEs*.  While [1] and [2] *modify* the expert ODE, our work adjoins *additional* ODEs to the expert ODE.  Note that [1] refers to its method as “augmenting” the expert ODE – but it uses the word to mean that it augments the ODE with data to “correct” the ODE.


3.	*The functionality of ML components*. In [1] and [2], ML is used to correct for the discrepancy between the expert ODE $f^e$ and the (unknown) true dynamics $f$. [1] employs additive corrections, i.e., $f = f^m + f^e$ while [2] allows for non-additive corrections.  They are thus related to the residual models discussed in Section 4. In contrast, our work does not attempt to modify or adjust an incorrect expert ODE (line 117-123). Instead, LHM introduces various ML components to link the (unobservable) expert variables $z^e$ to the measurements $y(t)$ that *are* made in the clinical environment.  

### (3) Experiments
 
We will report the estimation accuracy of the expert ODE parameters in the revision. We will also include qualitative evaluation (visualization of predicted and actual measurements and expert variables). 
 
The prediction horizon in Table 1 is 24 hours (shown in the table caption). We will clarify that in the updated text.

 ---

### References
[1] Le Guen, Vincent, et al. "Augmenting physical models with deep networks for complex dynamics forecasting." Ninth International Conference on Learning Representations ICLR 2021. 2021.

[2] Takeishi, Naoya, and Alexandros Kalousis. "Physics-Integrated Variational Autoencoders for Robust and Interpretable Generative Modeling." arXiv preprint arXiv:2102.13156 (2021).
 


 Thank you for your thoughtful comments and suggestions. We’ve provided a point-by-point response below. Please let us know if anything needs further clarification.

---
 
### (1) ODE parameters
 
Please see Line 106, where we introduce $\Theta$ to denote all the unknown parameters including the ones in the expert ODE. The parameters are estimated by maximizing the ELBO defined in Equation 8. We will report the estimated parameters in the revision. 

### (2) Qualitative evaluation of prediction accuracy
 
Thanks for making this great suggestion. We agree that a qualitative evaluation will better contextualize the performance gain. We will include predicted vs actual time series in the updated appendix. For the simulations reported in Figure 3, a naive baseline (constant prediction) will incur a RMSE of around 1.2 (compared with 0.6 of LHM). 
 
### (3) Clarification on the case study
 
The selected patients are from the testing data set. The first column (x1) represents the actual observations that are linearly interpolated (not the model predictions). The second and third columns are the latent variables inferred by the model based on the observations in the first column. We will clarify these points in the revision. 
 
The variable $z_2$ refers to the plasma concentration of dexamethasone, which is governed by a widely used compartmental model (detailed in Appendix 1 Equation 13 and 14).  
 
In this study, we have relied on ICU physicians with experience in treating COVID-19; they have qualitatively verified the variables in Figure 4. We did not acknowledge any contributing clinicians in the current version because of the anonymity requirement, but we will do so in the final version. 


 Thank you for your thoughtful comments and suggestions. We’ve provided a point-by-point response below. Please let us know if anything needs further clarification.

---

### (1) Related work
 
Thank you for bringing [1] to our attention; we will cite and discuss it in the revision.  However, [1] is very different from our work, both in the type of expert ODE used and in the way it incorporates machine-learned latent variables.

In [1], the expert ODE (UVA/Padova simulator) depends on an *unknown time-varying* parameter $\theta(t)$.  [1] treats $\theta(t)$ as a latent variable and infers its value from data.  After that, the expert ODE uses the estimated $\theta(t)$ as inputs. 

In contrast, we assume the expert ODE to be self-contained (i.e., no unknown time-varying parameters or variables, see Lines 85-91), but that the variables in the expert ODE are observable in the laboratory environment but unobservable in the clinical environment.  We use machine-learned latent variables $z^m$ to bridge the gap between the expert variables $z^e$ and the observable $x(t)$ (Line 93-99).
 
### (2) Clinical insights from the expert variables
 
The case study “LHM in action” (Line 314-348) provides qualitative evidence that the inferred expert variables provide clinical insight. In fact, we have involved ICU doctors with experience in treating COVID-19 patients in this study. We did not acknowledge any contributing clinicians in the current version due to anonymity requirements. 
 
### (3) Experiments
 
The metrics (RMSE and CRPS) reported in Figure 3 are aggregated over the entire prediction horizon $(t_0, T]$. We will report the breakdown for each future time step in the revision.
 
In the simulations, we have varied the amount of observed history $t_0$. The results are discussed in Appendix 4.3 and Figure 6. We have also varied the amount of observational noise $\sigma$; the results are discussed in Appendix 4.4 and Figure 7. In the revision, we will emphasize that the Appendix presents additional experimental results.
 
The prediction set up for the real data experiment is detailed on line 299-303. We set $t_0$ to be 24 hours after admission due to the urgency of the ICU setting and the requirements for early prediction.
 
### (4) Definition of expert variables
 
The term “expert variables” refers to the variables modeled by the expert ODE (Equation 3).  We will make this explicit in the revision.  In the particular model used in the experiment, the expert variables are the concentration of dexamethasone in plasma and lung, the innate immune response level, the adaptive immune response level and the viral load. 

--- 
### References
[1] Miller, Andrew C., Nicholas J. Foti, and Emily Fox. "Learning Insulin-Glucose Dynamics in the Wild." Machine Learning for Healthcare Conference. PMLR, 2020.



 Thank you for your thoughtful comments and suggestions. We’ve provided a point-by-point response below. Please let us know if anything needs further clarification.

---
### (1) Model formulation
 
In Equation 4, we allow the treatment to affect the mapping between the latent variables and the observations. This is a standard design in the state space modeling literature, to which we conform (e.g. Equation 1 in [1] and Equation 1 and 2 in [2]). 
 
We agree that it would not be reasonable to assume that all treatments are continuous – and we do not assume that.  As discussed on line 66 - 68, we do allow treatments that are continuous (e.g.  intravenous medications); as well as those that are discrete (e.g. surgical interventions).  Hence, some components of $a_i(t)$ may be continuous functions while others may be discontinuous step functions.
 
### (2) Related works
 
We have discussed the work [3] in Appendix 5.3; we will expand that discussion.  However, we think that it is in fact very different from our work.
 
First of all, [3] deals with discrete time series; our paper deals with continuous time dynamics.  It is unclear whether the method used in [3] could be generalized/adapted to our setting; even if it were possible to do this, it would be a highly non-trivial exercise. 
 
Furthermore, the method in [3] considers *one set* of latent variables, whose transition dynamics is decided by a mixture-of-experts model, in which the mixing weights may vary over time. In contrast, the LHM in this work involves *two sets* of latent variables: the expert variables $z^e$, which are governed by a known expert ODE, and the ML variables $z^m$, which are governed by neural ODEs.
 
We thank you for bringing [4] to our attention; we will cite and discuss it in the revision.  The similarity of [4] to our work is that it involves a set of expert variables $z^e(t)$, which are driven by a known expert ODE. However, [4] assumes that the observations are directly generated by the expert variables $x(t) = g(z^e(t)) + \epsilon$. (See Equation 2 of [4] and compare with Equation 4 of our work.).  Hence, unlike our work, [4] does not involve any machine-learned latent variables or neural ODEs.
 
### (3) Experiments
 
When M=0, the expert variables alone suffice to explain and predict the observations. Hence, there is no need to add an ML component -- the ML variables $z^m(t)$ in LHM will be redundant and including them may even lead to overfitting. In the revision, we will add an experiment to point this out.  However, we would like to reiterate that for most real applications one would expect M > 0 because the expert variables are usually not enough to *functionally determine* $x(t)$. 
 
--- 
### References
[1] Bengio, Yoshua, and Paolo Frasconi. "An input output HMM architecture." Advances in neural information processing systems (1995): 427-434.

[2] Verhaegen, Michel. "Identification of the deterministic part of MIMO state space models given in innovations form from input-output data." Automatica 30.1 (1994): 61-74.

[3] Hussain, Zeshan, Rahul G. Krishnan, and David Sontag. "Neural Pharmacodynamic State Space Modeling." ICML (2021).

[4] Linial, Ori, et al. "Generative ODE modeling with known unknowns." Proceedings of the Conference on Health, Inference, and Learning. 2021.



This paper proposes an architecture to mix Neural ODE models and more structured ODE coming from expert knowledge. They evaluate their approach on a dataset from COVID-19 patients using an expert ODE of the dexamethasone.  I think this is a good paper with an interesting idea to mix expert knowledge and ODE models. However, the experiments section focuses on a single ODE /dataset, on which the results are compelling. Importantly, to understand if the performance gain comes from the expert ODE or from a better behaved ODE, extra experiment is needed. 

**Model formulation**
- Why is it beneficial to add the current treatment value as an input to the observation function. Indeed, the treatment is already encoded in the model through the ODE of the latent process (equations 3. and 5.)
- $a(t)$ is considered continuous, so it requires some assumption to cast any type of treatment in this form. This would need to be discussed.

**Related works**
- Related work on mechanistic/pharmacology models embedded in ML architectures : I think you don't cite reference [1]. Maybe too recent but would be good to discuss the difference with your work.

- I think your work is very much linked to this paper as well : [2]

**Experiments :**

- From the synthetic experiment, I would not be surprised that the Expert performs worse than LHM even if M=0, simply because the number of parameters is higher for LHM. It would be good to have expand the plots of Figure 3 with M=0, as this would give a better view of the MSE obtained for larger M.

- Similarly as in the paper of Hussain et al. [1], it would be nice to assess the effect of a mispecification of the expert ODE. Indeed, it might be that part of the improvement over an unconstrained Neural-ODE is the fact that part of the ODE is well-behaved [3] (low Lipschitz constant). In practice this would just mean to encode in the model a \emph{wrong} parametric form for $f^e$. This would help narrowing down the source of the performance gain.

[1] Neural Pharmacodynamic State Space Modeling Zeshan Hussain, Rahul G. Krishnan, David Sontag
[2] Linial, O., Ravid, N., Eytan, D., & Shalit, U. (2021, April). Generative ODE modeling with known unknowns. In Proceedings of the Conference on Health, Inference, and Learning (pp. 79-94).
[3] How to Train Your Neural ODE: the World of Jacobian and Kinetic Regularization, Finlay et al. They have. I think one limitation is the source of improvement of the model, which would require an extra experiment.

This paper introduces an approach to integrate expert information into learned ODE models of observed dynamic processes. Motivated by applications in healthcare (particularly in pharmacology and disease progression) the expert information is provided as a verified dynamics model of lab-measured features that may not be readily measured in the normal clinical practice. However, the inductive biases afforded on the physiological dynamics, conditioned on possible treatment interventions, are considered worthwhile in the task of predicting future patient measurements with the learned ODE model. The two models are brought together by inferring the latent variables of the unobserved "expert" measurements and how they may affect the latent state generating the observed measurements. The proposed hybrid approach is evaluated on synthetic as well as real ICU data, comparing with several contemporary nODE appraoches.  

#### **Originality**
While the use of expert models or inductive biases to accelerate or improve model performance is not new, the use of a factored latent space between joint ODEs is unique and interesting. The authors do a great job listing and comparing to contemporary methods and approaches in the literature. One omission that should be included and considered is that of Miller, et al (2020 MLHC; reference below) which learns an improved dynamics model of the Insulin-Glucose interaction dynamics from a pre-defined ODE and observed patient data. I would be interested to hear from the authors how they feel their proposed approach differs from this work.


#### **Quality and Clarity**
I found the paper to be very well written with an appropriate level of technical detail and formalization such that the construction of the proposed LHM was easy to follow. I particularly enjoyed the measured discussion that was included to discuss both potential benefits of LHM in practice (in particular, Section 3.5 was well formed) as well as the current limitations of the approach (e.g independence of noise terms vs. autocorrelation, possible expert model misspecification, etc). I did have a few questions however and look forward to the author’s clarifications that they are able to provide.

Was the claim on line 51 that the inferred expert variables provide additional insights to clinicians ever evaluated? If not, the hypothetical nature of this claim should be clarified. Or is the evidence of this statement provided in the analysis presented around Figure 4? 

In the modeling of the expected measurements over the future time interval, does the length of that interval affect the confidence or uncertainty associated with the predictions? While these quantities are referred to toward the end of Section 2, the experimental results do not fully demonstrate the effect of prediction horizon on model confidence. It’s unclear what the choice of $t_0$ has on the downstream performance of the predictions. Does the model appropriately extrapolate over long horizons? How do those predictions improve with longer histories ahead of the prediction interval? Is there a maximum future time window for which the predictions are reliable?

This line of questioning led me to wonder what the specified prediction time was for the ICU dexamethasone experiments included in Section 5.2? When were the predictions made? At the first treatment? At distinct time points?

The use of the term “expert variables” is quite vague throughout the paper. More concrete examples of what these variables may be in the context of the conditions investigated in the paper would be really helpful to get a sense of what the proposed LHM is expected to learn. This would be most helpful in the early stages of the paper. One particular area could be at the outset of Section 3.2. 

In the final paragraph of the “Datasets” subsection of Section 5.1, a range for $\sigma$ is provided. However, in Section 3.2 this variable is included in the learnable parameters $\Theta$? Are the experiments in Section 5.1 investigating the effects of a fixed $\sigma$ parameter?


#### **Significance**
While I don’t feel especially qualified to comment on the significance of this paper. I do feel that the contributions put forward by the work are potentially of high impact as far as the type of expert modeling needed for LHM is available and appropriately specified for the desired use case. 


##### **Additional references**
Miller, Andrew C., Nicholas J. Foti, and Emily Fox. "Learning Insulin-Glucose Dynamics in the Wild." Machine Learning for Healthcare Conference. PMLR, 2020.
 As mentioned above, the authors sufficiently address the current technical limitations of the proposed LHM approach. There are no expressed considerations or limitations in view of potential applications of this model in live situations. However, at this time this research appears to be largely establishing a proof of concept for circumstances when a fully validated (and trusted) expert model exists and LHM serves to only adapt and improve that model based on observed data (without considerations toward equitable performance across possible patient subgroups).

In this work the authors proposed the latent hybridisation model to predict disease progression from physiological measurements. The proposed model combines ordinary differential equations designed by experts and the neural ODE approach to achieve prediction accuracy and the interpretability of the expert variables. The performance was evaluated on a synthetic data as well as a real-world dataset. Improved performance was demonstrated comparing with several competing models.  I think the authors demonstrated a nice idea to integrate Pharmacological models as prior knowledge for a generic machine learning model. The work is well-presented, and I enjoyed reading the article. 
The implementation seems follow standard approach of variational inference and limited technical contribution was presented. The evaluation demonstrates improvement in performance comparing to several strong baselines on a real-word ICU dataset. It would be nice to have another dataset to validate the improvement. The authors also demonstrated the benefit in interpretability with qualitative analysis.

Detailed comments:

How are the parameters in the expert ODEs determined? Can the authors provide a table for the values of ODE parameters?

Can the authors provide interpretation on the values on RMSE, i.e, how good/off a predicted track is for RMSE ~ 0.6. It would be very helpful to plot a few time series comparing the predicted ones v.s. ovserved ones. Also, it would be helpful to provide the definition or reference for RMSE / CRPS in line 254-255.

Can the authors provide details on the results presented in Fig 4? Specifically, are the selected trajectories from the training or test split? Are all observed time points used for reconstructing the time courses? I am confused that the blue curve in x1 looks like a perfect fitting to the datapoints with no prediction errors. 

Are the time courses of Z2 in figure 4 just the convoluted responses of drug treatments? If so, it seems not as informative as claimed.

Is there any evidence supporting that z1 represents the real response of cytokine Type I IFN? The authors adequately addressed the limitations

A VAE model in which the decoder includes an ODE describing the evolution of some non-directly observable quantities, and the encoder learns mappings from the observed measurements to the initial states of the non-observed quantities, as well as to the ODE parameters. The model is used for forecasting in interesting application that seeks to forecast response to treatment of COVID-19 patients. 

I have some concerns with respect to the novelty of the paper, since it seems to be a special case of recent work, as well with respect to how the model might choose to treat the ODE part of it. In the general case the latter might simply be ignored since there is no protection against something like that baked in the model.   The paper presents an interesting application in forecasting the results of different treatments on patients with COVID-19.
It proposes a learning architecture based on a VAE model where the decoder contains an expert model, a pharmacological ODE, 
that describes the evolution of different quantities of interest, collectively denoted by $\mathbf z^e(t)$, such as immune 
responce to infection, concentration of the drug in the body, viral load. Typically these variables are not directly observable 
in the routine clinical setting, but only in laboratory.  Only the structure of the ODE is known but not its parameters $\theta$.

The clinician has direct access only to a set of observable variables, $\mathbf x(t)$, or more precisely to their noisy measurements, 
$\mathbf y(t)$, measuring quantities such as temperature, heart rate, and more. In addition the clinician also provides the treatment
which is also modelled as a temporal sequence $\mathbf a(t)$.  Since the non-observable variables $\mathbf z^e(t)$ 
of the pharmacological ODE explain only one part of the process that produces the observational data these are completed with an 
additional set of variables $\mathbf z^m(t)$. 

The VAE model is structured as follows: 
* the encoder receives the observation data $\mathbf y(t)$ and treatment $a(t)$ and encodes them to the parameters of the ODE, $\theta$, and the 
initial states $\mathbf z^e(0)$  $\mathbf z^m(0)$; these are then respectivelly passed through the pharmacological ODE and a learned ODE to produce 
the complete sequences $\mathbf z^e(t), \mathbf z^m(t)$
* the decoder receives the latent variables and reconstructs the input signal. 

In forecasting time the model receives the $\mathbf y(t)$ and $\mathbf a(t)$ up to the present time, 
provides the posterior, and the decoder will use the sampled initial states and parameters of the
pharmacological ODE, to conditionally generate the future observation trajectory given also a future 
treatment plan.


The paper provides two sets of experiments one on syntetic data generated using the known pharmacological model and one on real world COViD-19 patient 
data. The model is compared against a number of baselines that involve a variant in which the pharmacological ODE is removed (NODE), one which is using 
only the pharmacological ODE (Expert), two that rely in combinations of them, and a additional number including autoregressive models. 


The paper is quite well written and easy to follow. I have though a number of concerns. 

The main one has to do with whether indeed the model is really using the pharmacological ODE and the resulting $\mathbf z^e(t)$ latent variables in its generative
process. Since the latent space has two components $\mathbf z^e(t)$ and  $\mathbf z^m(t)$ what is there that guarantees that all the information flow will not happen
trhough $\mathbf z^m(t)$ and the decoder $g$ will learn to ignore it, reducing the model to the NODE baseline. The empirical results show that probably this is not 
happening, since the proposed model outperforms systematically NODE. However there is nothing in the model architecture and objective function that would prevent that
from happening in the general case. The end result would be that we will have a model that while we believe it is based in domain knowledge it has learned to circumvent
that knowledge. 

In fact such a setting has been extensively studied in Takeishi, Kalousis, Physics-Integrated Variational Autoencoders for Robust and Interpretable 
Generative Modeling, 2021, which seems to subsume LHM as a special case. In that work a number of regularisers have been proposed in an effort to guarantee that the 
ODE will not be ignored and the additional non ODE latent variables will be used in as minimal way as possible. Moreover there is no assumption about the completeness 
of the provided ODE, i.e. the model can work with incomplete knowledge. 

Very relevant work, though not in a generative setting and thus no interpretable latent variables, is also Yin et al, Augmenting Physical Models with Deep Networks for 
Complex Dynamics Forecasting, ICLR 2021. That work learns a dynamics model to be used for forecasting by learning augment {\em incomplete} ODEs. Its model has two dynamics 
components; one directly relies on the incomplete ODE and one is data driven and additively completes the ODE based dynamics. Here too the model makes sure, through appropriate 
regularisation, that the data-driven component will only capture information that is not already contained in the physics component, making sure in that manner that it does 
not overwrite the ODE based compelent.  


Experiments: 
In the synthetic experiments, since we have complete access to all data, including the non-observed latents, it would have been very informative:
*  to show how well the encoder is able to predict the $\theta^e$ parameters of the ODE, 
*  and compare the forecasted/completed curves of $\mathbf y(t)$, $\mathbf z^{e}$, produced by the model with the real ones. Such a figure, fig 4, is 
only partially given for $\mathbf z^{e}$ for the real data, which is expected since there we do not have access to the real $\mathbf z^{e}$. However 
there too it would be quite interesting to see how the forecasted $\mathbf y(t), t>t_0$ values compare with the ones that actually occur in the real data. 
* the paper also mentions a forecasting horizon of 1, 3, and 7 days, the results of which I found in the appendix,  but it is not clear to which horizon 
the table 1 in the main paper corresponds to. Again some visualisations of the actual dynamics would have also been quite useful here, to see how the
performance scales as we move further to the future. 


 Given the application domain, that of forecasting for medical purposes, it is rather important to make sure that the model operates as it is intended. This goes back to my comment above on whether indeed the model makes use of its ODE or simply chooses to ignore it, since as the model is there is no explicit control to avoid such a scenario. The end result would be a model that is not driven by the pharmacology model, the latent variables $\mathbf z^e(t)$ would be meaningless. That does not necessarily mean that the forecasting performance would be poor, it would rather be that of a classical data driven model.
As a consequence one would need to include mechanisms to avoid such case from happening, see related work above, as well as mechanisms that are able to detect the extend to which such a case happens, e.g. some sensitivity analysis of $g$ with respect to $\mathbf z^e(t)$ and $\mathbf z^m(t)$. 
 
Given the sensitive application domain such a discussion is more than relevant.  

Meta-review: First, thanks to the authors for this engaging submission on an important topic.  While the reviewers expressed some concern about understanding the method, the back and forth between the reviewers and authors appears to have addressed most of those concerns. 

Reviewer 62Te was concerned about the source of the improvement, given all of the moving pieces in the proposed approach.  The additional simulation study has shed more light on the behavior of the proposed algorithm. 

Reviewer yPRn voiced concerns about novelty, and how the proposed approach is related to two recent physics + ML algorithms.  The authors addressed these concerns in their response, and I encourage them to more explicitly compare these methods to their own in the manuscript. 


Decision: accept