2.1. Structure-Preserving Hybrid Pharmacokinetic Framework
We consider a compartmental pharmacokinetic model written in terms of drug amounts. Let
denote the amount of drug in compartment
at time
, for
, and let
denote the corresponding concentration, where
is the volume of that compartment. The mechanistic model is written as
where
is the state vector,
is the parameter vector,
denotes observed covariates, and
represents known inputs such as dose administration. The functions
describe the usual PK processes, including absorption, transfer between compartments, distribution, and elimination. This formulation is sufficiently general for the one- and two-compartment settings considered in the present study.
In the general ODE-based formulation introduced in [
15], the hybrid model is obtained by adding a learned correction term to the mechanistic system. Thus, we write
where
is a data-driven correction with parameter vector
. The mechanistic component remains central in the formulation. This formulation provides the general basis for the bounded-correction approach used in the present study.
Within this formulation, the correction is controlled by
where
is a control parameter and
is a suitable reference scale derived from the mechanistic model. This condition limits the correction relative to the main PK dynamics. When an internal transfer term is modified, the correction is constructed to preserve compartmental balance, and it is restricted accordingly when nonnegative state variables are required. These conditions apply to the general ODE-level formulation, while the output-level implementation used in the present numerical studies is described below.
For the numerical studies, the bounded correction was applied to the mechanistic concentration prediction at the output level and expressed on the logarithmic concentration scale. Let denote the fitted correction function based on the standardized hybrid features. The constrained correction was defined as , and the final prediction was calculated as , where is a small constant used to avoid taking the logarithm of zero. This formulation ensures that . The correction function included linear terms with or without radial basis functions and was estimated by ridge-regularized least squares. The hyperbolic tangent was used because it provides a smooth and differentiable bound rather than abrupt clipping. For the held-out polymyxin B and linezolid analyses, the value of was selected during nested inner validation. For illustration, when , the correction is limited approximately to a multiplicative range of to , corresponding to about 0.70 to 1.42 times the mechanistic prediction. Since , the corrected prediction satisfies . Therefore, a positive mechanistic prediction remains positive after correction, and the learned component cannot move the prediction beyond the prescribed multiplicative range. The smoothness of the hyperbolic tangent also avoids discontinuities in the corrected prediction.
2.2. Population Pharmacokinetic Setting and Estimation
The present work is carried out in a population-oriented PK setting, in which parameters may vary across individuals through observed covariates and, in the general formulation, random effects. At the structural level, this is written as
where
contains observed covariates and
denotes interindividual variability. In this way, the mechanistic model retains the main PK interpretation, while the learned correction is used only for residual systematic effects that remain after the structural model and covariate relations have been introduced. Parameters such as clearance, volume, and absorption rate therefore continue to play their usual role in the formulation. In the present numerical studies, subject-specific parameters were represented using the available covariate relations, and a full nonlinear mixed-effects estimation of random effects was not performed.
Let
denote the measured concentration for subject
at time
. The observation model is written as
where
maps the compartmental state to the observed quantity and
denotes residual error. Parameter estimation is based on an objective function that combines data fit with control of the correction term. For the output-level implementation used in the numerical studies, let
denote the correction applied to the mechanistic concentration prediction. A general form of the objective function is
where
measures the discrepancy between observed and predicted concentrations,
penalizes excessive correction size or behavior inconsistent with the intended structure, and
is a regularization parameter. The exact residual model and regularization term may differ across drugs, but the same general framework is used throughout the study.
In the numerical studies, the mechanistic parameters were estimated using nonlinear least squares. For the held-out polymyxin B and linezolid analyses, the mechanistic parameters were re-estimated using only the training subjects within each fold. The correction model combined standardized linear features with or without radial basis functions and was fitted using ridge-regularized least squares. The correction form, regularization level, and correction-strength parameter were selected using nested inner validation, as described below. The correction parameters were obtained by solving the regularized linear system directly. Convergence of the mechanistic fitting was assessed using the predefined function and step tolerances.
2.3. Mathematical Properties of the Hybrid Model
The analysis below concerns the general ODE-based hybrid formulation in (2), together with the control condition in (3), the population parameter relation in (4), and the observation structure in (5) and (6). We assume that the functions appearing in (1) and (2) are continuous in time, continuously differentiable with respect to the state and parameter variables, and continuous in the remaining variables on the region of interest.
Proposition 1. Assume that the vector field defined by the right-hand side of (2) is locally Lipschitz in the state variable, uniformly with respect to the parameters and patient descriptors on bounded sets. Then, for every initial condition, the hybrid system admits a unique local solution. Moreover, the solution depends continuously on the initial data, the mechanistic parameters, the correction parameters, and the patient descriptors appearing in (4).
Small changes in the patient covariates or parameter values do not lead to abrupt changes in the PK trajectory, at least on finite time intervals where the solution exists. This is important in the present setting because the same framework is used across different patients and different clinical datasets. A proof is given in
Appendix A. The result is a standard consequence of local Lipschitz continuity, but here it is used in a population-oriented PK setting where the model depends explicitly on patient descriptors [
16].
Proposition 2. Let denote the sensitivity matrix of the hybrid model with respect to the mechanistic parameters, and let denote the corresponding sensitivity matrix for the mechanistic model in (1). Assume that the derivatives of the correction term with respect to the state and, if present, with respect to the mechanistic parameters are bounded on the region of interest, and that their combined size is at most . Then, on every finite time interval on which both solutions remain in that region, there exists a constant , depending on the interval and on bounds of the mechanistic system but independent of , such that If the correction remains sufficiently controlled, then the way the hybrid model responds to changes in the mechanistic parameters stays close to the response of the base PK model. This matters because quantities such as clearance, volume, and absorption rate should still retain their main PK meaning after the correction is introduced. This behavior was discussed qualitatively in [
15], while Proposition 2 gives an explicit finite-time bound under the stated derivative condition. This result follows from the variational equations associated with (1) and (2), together with the stated derivative bound on the correction term and a Grönwall-type estimate. The proof is included in
Appendix A.
Proposition 3. Suppose that, for the mechanistic model observed through (5), the parameter-to-observation map is locally distinguishable at a reference parameter value, in the sense that the corresponding sensitivity matrix has full column rank on the observation window of interest. Assume further that the observation map is continuously differentiable, and that the correction term is continuously differentiable and satisfies the smallness condition used in Proposition 2. Then there exists
such that, whenever that smallness condition holds with threshold , the hybrid model preserves local distinguishability of the mechanistic parameters on the same observation window.
If the mechanistic parameters can be locally separated in the base model, then a sufficiently controlled correction does not destroy that property. In practical terms, the main PK parameters remain locally distinguishable as long as the learned term does not compete too strongly with them. This point was discussed qualitatively in [
15], while Proposition 3 gives a local rank-based result under the stated smallness condition. This proposition does not claim full structural identifiability of the joint parameter set. It is a local result for the mechanistic parameters in the presence of a constrained correction. The argument relies on continuity of matrix rank under sufficiently small perturbations and is given in
Appendix A.
In the general model, if a correction is added to a transfer term, it is added with opposite signs in the two compartments. In this way, the correction only changes the movement of the drug between compartments and does not add or remove drug from the system. Equation (3) also keeps the size of this correction limited relative to the mechanistic model. These statements refer to the general ODE-level formulation.
For the output-level implementation used in the numerical analyses, positivity and bounded correction size follow directly from the form of the corrected prediction. Propositions 1–3 concern the general ODE-based formulation and provide the analytical basis for its population-oriented extension.
2.4. Datasets and Numerical Implementation
We tested the framework using three published clinical pharmacokinetic datasets. The datasets were selected because they contained concentration-time data together with dosing information and relevant patient covariates, and because they represented different drugs, dosing routes, and model structures. Each dataset was analyzed separately and the datasets were not combined into a single training dataset. Repeated subject-wise validation was used for polymyxin B and linezolid, whereas tacrolimus was evaluated as an exploratory in-sample robustness study. No independent external validation dataset was used. The numerical studies are organized by purpose. We begin with a primary clinical application on polymyxin B, followed by cross-drug evaluation and a robustness study in a more difficult clinical setting. Only records with a valid observed concentration were included in the analysis. Missing concentration values were excluded and were not imputed. We first consider the polymyxin B dataset from Hanafin et al. [
13]. This dataset was chosen as the first main application because it gives a clinically important setting with explicit intravenous infusion records and a mechanistic structure that is suitable for a full comparison. In our implementation, the dataset contained 40 subjects, 268 dosing events, and 230 concentration observations. The data was provided in event format, with explicit entries for dose amount, infusion rate, and infusion duration. Therefore, in this case we did not need to reconstruct oral absorption, lag time, or repeated dosing from simplified summaries. The infusion events were taken directly from the file and used as they were. For the mechanistic baseline, we used a two-compartment intravenous infusion model with elimination from the central compartment. The numerical model was
where
and
are the drug amounts in the central and peripheral compartments, respectively, and
is the infusion input rate. The subject-specific parameters were scaled by body weight, and clearance also included a creatinine clearance effect. In the final mechanistic baseline, the predicted concentration was taken as
Among the mechanistic runs we tested, this offset version gave the best baseline fit and was therefore retained as the mechanistic model structure in this application.
We next considered linezolid as a cross-drug evaluation study using the published dataset from [
12], where the purpose was to assess the held-out predictive performance of the framework in a different pharmacokinetic setting. In this case, the data corresponded to oral or nasogastric administration, so the mechanistic baseline was simpler than in the polymyxin B study. After data cleaning and dose expansion, the dataset used in our implementation contained 48 subjects, 305 dose events, and 196 concentration observations.
For the mechanistic baseline, we used a one-compartment model with first-order absorption and first-order elimination. The numerical model was
where
and
denote the amounts in the absorption and central compartments, respectively. The predicted concentration was taken as
The subject-specific parameters were scaled by body weight, and the mechanistic parameters were re-estimated using only the training subjects within each outer fold.
We next considered the published tacrolimus dataset of Quintairos et al. as an exploratory robustness study [
17]. The role of this experiment was different from the first two studies. Here, the goal was to test whether the framework could reduce in-sample prediction error when the baseline model is weak and the data are more difficult. This is a harder setting because tacrolimus is well known for large variability, and in our implementation the data were naturally handled at the occasion level using the observed time-after-dose values. After preprocessing, the dataset used in this study contained 471 occasions and 1102 concentration observations. For the mechanistic baseline, we used an oral two-compartment model with first-order absorption, lag time, and elimination from the central compartment. The numerical model was
where
and
denote the amounts in the absorption, central, and peripheral compartments, respectively. The predicted concentration was taken as
Across all three numerical studies, the correction was applied to the mechanistic concentration prediction at each observation time. The hybrid component did not directly estimate or modify pharmacokinetic parameters such as clearance, volume of distribution, intercompartmental clearance, absorption rate, or lag time. These parameters remained part of the fitted mechanistic baseline. The main predicted endpoint was drug concentration, and model performance was assessed by comparing the predicted and observed concentrations. For polymyxin B and linezolid, predictive performance was assessed in held-out subjects. For tacrolimus, the reported comparison was exploratory and in-sample.
2.5. Model Comparison and Sensitivity Analyses
Whenever relevant, we compare the mechanistic baseline with unconstrained and constrained hybrid models and, for polymyxin B and linezolid, with a boosted-tree residual benchmark to examine whether the correction improves or preserves held-out predictive performance while remaining controlled relative to the mechanistic baseline. Model performance was assessed using the root mean square error (RMSE), mean absolute error (MAE), median absolute error (MedAE), correlation coefficient, and logarithmic root mean square error (LogRMSE).
For the polymyxin B and linezolid analyses, we used repeated five-fold subject-wise cross-validation with five repeats. All records from the same subject were kept within the same fold. In each repeat, the mechanistic model and the correction models were fitted using the outer training subjects and evaluated using only the held-out subjects. Within each outer training set, four-fold subject-wise inner validation was used for model selection. The mechanistic parameters were re-estimated using only the inner training subjects. Any covariate imputation, feature standardization, and radial basis function center selection were also based only on the corresponding training data.
The candidate correction models included a linear-only form and radial basis function forms with 4, 8, or 12 centers. Ridge regularization values of 0.01, 0.1, 1, and 10 were tested. For the constrained correction, values were considered. This gave 16 unconstrained and 64 constrained candidates. The unconstrained and constrained models were selected separately according to the mean subject-level MAE in the inner validation folds. After selection, the correction was fitted using the complete outer training set and evaluated using the held-out outer subjects.
The boosted-tree residual benchmark was fitted to the same log-scale residual target and standardized features used by the correction models. It used least-squares gradient boosting with 150 regression stumps, a learning rate of 0.05, and a minimum leaf size of 5 observations. These settings were fixed before the outer held-out evaluation.
The effect of the correction-strength parameter was examined through its selection during nested inner validation. The frequency with which each value of was selected across the 25 outer folds was recorded separately for polymyxin B and linezolid. No single value of was fixed for the held-out analyses.
We finally checked whether the constrained hybrid model still responds to changes in the main mechanistic parameters in a sensible way. This test was done on the polymyxin B dataset, since this was the main application and gave the clearest baseline model. The aim here was to see whether the hybrid correction keeps the main effect of the mechanistic parameters or hides it completely. We considered three parameters from the mechanistic model, namely , , and , and perturbed each of them by while keeping the remaining parts of the model fixed. This separate analysis used and was treated as a local in-sample interpretability analysis rather than a held-out predictive comparison.
Computational time was assessed for the polymyxin B application using one unrecorded warm-up run followed by three measured runs on the same computer. The mechanistic prediction, feature construction, correction fitting, bounded transformation, and final hybrid prediction were timed separately. Data loading, file writing, and figure generation were excluded. The timing results are reported as mean standard deviation. This timing comparison concerned one mechanistic fit and one correction fit and did not include the repeated cross-validation or nested model-selection procedure.
For each outer repeat, the held-out predictions from the five outer folds were combined before the overall performance metrics were calculated. These metrics were then summarized across the five repeats using the mean and standard deviation. To examine performance across subjects, the MAE was calculated separately for each subject using its held-out predictions and then averaged across the five repeats. Paired subject-level differences were defined as the mechanistic MAE minus the comparator MAE, so that a positive value indicated improvement over the mechanistic model. The paired values were compared using a two-sided Wilcoxon signed-rank test, and the rank-biserial effect size was calculated. Ninety-five percent confidence intervals for the mean and median paired differences were estimated using 10,000 subject-level bootstrap samples. The constrained-versus-mechanistic comparison was the main comparison, while the unconstrained and boosted-tree comparisons were additional comparisons. A -value below 0.05 was considered statistically significant.