A Multimodal Machine-Learning Framework for Predicting Lithium-Associated Renal Dysfunction from Synthetic Biomarker Trajectories ()
1. Introduction
Lithium remains the gold-standard maintenance therapy for bipolar disorder, offering unmatched protection against relapse and suicide [1]-[5]. Despite these therapeutic advantages, long-term lithium exposure carries a well-established risk of renal complications, including nephrogenic diabetes insipidus, chronic interstitial nephritis, and progressive reductions in glomerular filtration rate (eGFR) [6]-[13]. Over time, these changes can culminate in chronic kidney disease (CKD), placing a substantial burden on patients and clinicians [14]-[18]. Although routine monitoring of creatinine, eGFR, and serum lithium levels is recommended, existing clinical pathways provide limited ability to anticipate which individuals will experience early renal deterioration [19]-[22]. The absence of reliable predictive tools leads to reactive rather than preventive management, often identifying toxicity only after irreversible impairment has occurred. Machine-learning approaches offer a promising avenue for individualized renal-risk prediction, yet real-world lithium cohorts present significant barriers to model development [23]-[25]. Clinical datasets are often small, heterogeneous, and irregularly sampled; they contain missing values, limited longitudinal depth, and substantial confounding due to polypharmacy and comorbidity load [26]-[31]. Furthermore, the sensitive nature of psychiatric and renal data introduces ethical and privacy challenges that restrict broad data sharing [32]-[34]. These constraints motivate the need for synthetic datasets that are both physiologically principled and sufficiently rich to support algorithmic benchmarking.
Synthetic clinical trajectories, when derived from explicit mechanistic or stochastic formulations, can provide a controlled, reproducible platform for studying complex biomedical processes [35]-[40]. Recent work has demonstrated their utility in modelling behavioural rhythms, psychiatric transitions, and multimodal physiological patterns [41]-[46]. However, analogous frameworks for simulating renal-function trajectories under chronic lithium therapy remain largely unexplored despite the clinical relevance and the high dimensionality of the underlying biomarker space.
In this study, we introduce a multimodal machine-learning framework trained on a rigorously constructed synthetic dataset that integrates heterogeneous renal-relevant modalities, including:
(i) baseline kidney-function parameters (baseline creatinine, baseline eGFR);
(ii) longitudinal serum and urine biomarkers (creatinine, eGFR, BUN, sodium, osmolality);
(iii) demographic and comorbidity profiles (age, sex, BMI, hypertension, diabetes, CKD history);
(iv) medication-interaction patterns (NSAIDs, diuretics, ACE inhibitors), and
(v) mathematically parameterized lithium dosing, serum levels, and cumulative exposure burden.
Our contributions are threefold:
1) A mathematically transparent generative model capable of producing physiologically coherent renal trajectories that reflect both chronic lithium exposure and interacting comorbid risk factors.
2) A multimodal ML ensemble including classical, tree-based, and neural architectures that achieves near-perfect discrimination of lithium-associated nephrotoxicity on held-out synthetic samples.
3) An extensive interpretability and subgroup-analysis suite, leveraging SHAP-based explanations and demographic stratification to reveal coherent mechanistic insights and clinically plausible renal-risk signatures.
Collectively, this framework provides a high-fidelity sandbox for developing and evaluating predictive models of renal decline, while also serving as a prototype for future clinical decision-support tools aimed at early detection of lithium-induced nephrotoxicity [47]-[49].
2. Methods
2.1. Synthetic Renal-Trajectory Generator
2.1.1. Baseline Renal Capacity and Demographics
Each synthetic individual is first initialized with a set of demographic attributes
sampled from empirical distributions designed to approximate typical characteristics of lithium-treated psychiatric populations.
Age is drawn from a truncated normal distribution,
ensuring realistic representation of both younger and older patients commonly managed on maintenance lithium therapy.
BMI follows a similar structure,
capturing the distribution of body composition relevant to renal hemodynamic and metabolic health.
Sex is modeled via a Bernoulli variable with empirically informed prevalence:
consistent with clinical observations that lithium-treated cohorts often contain a slightly higher proportion of women.
Baseline renal-function parameters are then generated as:
with both variables truncated to physiologically plausible boundaries. These initial values provide a realistic starting point for simulating subsequent renal trajectories and toxicity-related perturbations (Sections 2.1.2-2.1.4).
2.1.2. Lithium Exposure and Hydration State (Rewritten & Strengthened)
Serum lithium concentrations are drawn from a truncated normal distribution,
which reflects typical therapeutic levels while allowing supratherapeutic excursions known to elevate nephrotoxicity risk. To capture the cumulative renal load imposed by prolonged therapy, we define a simple exposure metric:
where
denotes treatment duration sampled from an exponential distribution with a mean of 60 months. This formulation captures both chronic and dose-dependent contributions to lithium-induced renal stress.
Hydration and urinary-concentrating capacity, which strongly interact with lithium’s renal effects, are modelled using two laboratory markers:
Sodium (
) reflects systemic hydration status, while urine osmolality (
) captures lithium-associated concentrating defects characteristic of nephrogenic diabetes insipidus. Together, these variables introduce realistic physiological variability into the synthetic cohort.
2.1.3. Comorbidity Risk and Medication Interactions
To model background susceptibility to renal injury, we simulate common comorbidities as independent Bernoulli variables:
representing hypertension, diabetes, prior renal disease, and thyroid dysfunction conditions frequently encountered in chronic lithium users [50]-[53].
We additionally incorporate medication exposures known to modulate lithium handling and renal perfusion, including diuretics, ACE inhibitors, and NSAIDs [54]-[56]. These are encoded as binary variables
, allowing the model to capture synergistic or antagonistic effects on renal physiology.
Aggregate comorbidity and medication burdens are defined as:
where
represents total comorbidity load and
summarizes the number of interacting medications. These summary terms allow the latent-risk formulation (Section 2.1.4) to incorporate clinically meaningful vulnerability profiles without overparameterizing the generator.
2.1.4. Renal-Risk Probability and Label Generation
In parallel with the latent-hazard formulation used in your example paper, we construct a continuous nephrotoxicity propensity score that integrates lithium exposure, treatment duration, comorbidity burden, and baseline renal reserve. The latent risk variable is defined as:
where each component encodes a clinically meaningful contribution:
increases stepwise at supratherapeutic lithium levels, reflecting the disproportionately higher renal stress associated with elevated serum concentrations.
normalizes treatment duration
to the interval
, capturing the saturating effect of long-term lithium exposure.
scales with comorbidity burden
, allowing cardiovascular, metabolic, and renal comorbidities to incrementally raise susceptibility.
denotes medication-interaction load (e.g., NSAIDs, ACE inhibitors), modeled as a modest additive stressor.
The final term, proportional to baseline eGFR, reduces risk for individuals beginning with higher renal reserve.
The latent risk score is mapped to a probability through a logistic transformation:
To generate binary labels, we follow a prevalence-controlled thresholding strategy. Individuals above the 85th percentile of the risk distribution are labelled as nephrotoxic:
where
denotes the empirical 85th-percentile cutoff.
To ensure that toxic cases exhibit physiologically coherent biomarker deterioration, we perturb final creatinine and eGFR values using multiplicative noise terms sampled from uniform ranges aligned with clinical observations:
To avoid deterministic coupling between label assignment and post-hoc biomarker perturbations, nephrotoxicity labels were not derived solely from percentile thresholding. Instead, renal deterioration trajectories were generated first under stochastic exposure dynamics, and labels were subsequently assigned using clinically motivated criteria, including sustained ≥ 25% decline in eGFR or absolute creatinine increase ≥ 0.3 mg/dL across the simulated interval. Gaussian noise terms (ε ~ N(0, σ2)) were incorporated into trajectory evolution to ensure overlap between toxic and non-toxic cases, thereby preventing trivial linear separability.
Renal biomarkers were simulated across discrete monthly time steps spanning 24 - 60 months of lithium exposure. At each time step, eGFR and creatinine evolved according to exposure-dependent decay functions with additive stochastic perturbations. Acute stress events (e.g., transient dehydration) were modelled as temporary downward shocks followed by partial recovery. This formulation ensures that the term “trajectory” corresponds to an explicit longitudinal stochastic process rather than a baseline-final snapshot.
This interaction introduces realistic renal-decline patterns into the simulated cohort, strengthening the discriminability of toxic versus non-toxic profiles while preserving physiological plausibility.
2.2. Feature Engineering
To capture clinically relevant renal dynamics, we derive a set of engineered features that parallel the behavioural transformations used in your example synthetic paper but adapted to kidney physiology. These transformations summarize early renal deterioration, lithium burden, and metabolic stress in compact, interpretable forms [57]-[59].
Filtration Decline:
This metric quantifies absolute loss of glomerular filtration capacity from baseline to the final measurement. A larger decline reflects impaired nephron function and serves as one of the most direct biomarkers of lithium-associated renal stress.
Creatinine Increase Ratio:
The ratio captures proportional elevation in serum creatinine, allowing the model to detect subtle shifts even when absolute values remain within laboratory “normal” ranges. Sudden increases in creatinine regardless of starting level often signal early tubular dysfunction or acute-on-chronic stress.
BUN/Creatinine Ratio:
This ratio helps differentiate hydration-related changes from intrinsic renal damage. Elevated values may indicate prerenal azotemia, while lower ratios often correspond to impaired tubular handling. Including this feature allows the model to distinguish lithium toxicity from confounding volume-status effects.
Lithium Exposure Index:
Lithium level
combined with treatment duration
yields an exposure burden measure that approximates cumulative renal load. This transformation captures the chronic component of lithium-induced nephrotoxicity, complementing the acute markers present in creatinine and eGFR.
Standardization: All engineered features are scaled using a robust scaler, which centres data on the median and scales by the interquartile range. This approach mitigates the influence of extreme biomarker values common in renal pathology and ensures consistent model behaviour across heterogeneous synthetic patients.
2.3. Predictive Models
To assess how different learning paradigms capture renal-risk patterns in the synthetic dataset, we trained a complementary set of predictive models: Logistic Regression, Random Forest, Gradient Boosting, LightGBM, XGBoost, and a lightweight multilayer perceptron (MLP) [60]-[65]. This collection balances simplicity and flexibility Logistic Regression provides a transparent linear baseline, tree-based ensembles capture nonlinear interactions among biomarkers, and the MLP offers a compact neural alternative capable of modelling smooth nonlinearities. Because nephrotoxicity prevalence is explicitly defined during data generation, class balance is preserved by design, eliminating the need for oversampling or class-weight adjustments. All models operate within a unified preprocessing framework consisting of KNN imputation for missing values and one-hot encoding for categorical variables. This ensures that each classifier receives the same standardized input representation, enabling fair performance comparison.
Overall, this modelling suite provides a robust, methodologically consistent evaluation of how diverse ML architectures interpret synthetic renal trajectories and identify early signatures of lithium-associated toxicity.
2.4. Training Protocol
All models were trained under a unified, rigorously controlled protocol to ensure fair comparison and reproducible evaluation [66]-[67]. The full synthetic cohort (N = 1500) was first split into an 80/20 train -test partition, stratified by the nephrotoxicity label to preserve the overall prevalence of toxic vs. non-toxic cases in both subsets. The held-out 20% test set was completely isolated from model selection and cross-validation and was used only once for final performance reporting. Within the training portion (80%), we applied 5-fold stratified cross-validation, again maintaining class proportions in each fold. On each fold, four-fifths of the training data were used to fit the model, and the remaining one-fifth served as a validation fold. This process was repeated across all five folds so that every sample contributed both to model fitting and to out-of-fold evaluation. The primary optimization metric was the area under the ROC curve (AUC), chosen for its robustness to class imbalance and its direct relevance to clinical discrimination between high- and low-risk individuals [68]-[71].
To isolate the effect of architecture rather than tuning heuristics, hyperparameters were fixed a priori for each model based on standard, literature-informed configurations (e.g., a moderate number of trees and depth for ensembles, a compact hidden-layer configuration for the MLP). No fold-specific hyperparameter search or early stopping criteria were used. This design avoids overfitting to the synthetic dataset and keeps comparisons transparent: performance differences can be attributed to intrinsic model capacity and inductive bias rather than to aggressive tuning. After cross-validation, each model was refit on the entire training set and finally evaluated on the 20% held-out test set, yielding the test AUC and additional metrics reported in Section 3.
2.5. Synthetic Biomarker Trajectories
Figure 1(a) displays the age distribution across 1500 synthetic patients, with a clear central tendency around mid-adulthood and a long right tail extending into older age groups. The mean age (≈46 years) reflects typical demographics observed in long-term lithium-treated populations. Figure 1(b) presents the BMI distribution, revealing a moderately right-skewed profile with most values between 22 -30 kg/m2. This distribution supports physiologically realistic metabolic variability that influences renal load. Figure 1(c) shows the gender composition of the cohort, with females representing approximately 60% of the sample. This proportion aligns with real-world lithium prescription trends. Figure 1(d) reports nephrotoxicity prevalence across genders, demonstrating similar toxicity rates for males and females, indicating that gender alone is not a dominant driver of renal risk within the synthetic generator.
This layout mirrors the structure of the cohort-characterization panel in your
Figure 1. Overview of the synthetic renal dataset.
example paper, providing a compact visualization of population-level renal characteristics.
2.6. Feature Relationships and Correlation Structure
Figure 2(a) shows the distribution of baseline creatinine, which is right skewed with a clinically meaningful upper tail extending beyond 1.4 mg/dL. This mirrors expected biological variability and provides strong contrast between normal and stressed renal states. Figure 2(b) presents eGFR values, clustering densely between 70 - 105 mL/min/1.73m2, with a smaller subset falling below clinical thresholds for early CKD. The red line marks the typical cutoff for reduced filtration. Figure 2(c) displays BUN concentrations, with a smooth unimodal shape cantered around 14 - 16 mg/dL, demonstrating realistic metabolic waste variation. Figure 2(d) illustrates the serum lithium distribution, with dashed green lines marking the therapeutic window (0.6 - 1.2 mEq/L). The broad lower tail captures subtherapeutic exposures, while the upper tail includes potentially toxic ranges. Figure 2(e) shows sodium concentrations tightly cantered around 139 - 141 mEq/L, consistent with homeostatic regulation. Figure 2(f) describes urine osmolality, which spans a wide dynamic range, reflecting varying hydration and tubular function states.
Figure 2(g) presents the Pearson correlation matrix for all biomarkers and clinical features. Strong positive correlations between baseline and current creatinine, and negative correlations between eGFR and creatinine, confirm physiologically coherent relationships embedded in the generator. Moderate correlations with lithium level and treatment duration highlight exposure-related renal burden.
2.7. Label-Conditioned Biomarker Distributions
Figure 3(a) shows nephrotoxicity prevalence across lithium-level quartiles. Higher quartiles exhibit sharply increased renal-risk rates, consistent with dose-dependent toxicity observed in clinical pharmacology [72]-[74]. Figure 3(b) presents nephrotoxicity risk scores as a function of treatment duration [75]-[76]. A diffuse but upward-trending pattern emerges, with longer exposure associated with elevated risk, particularly when combined with higher lithium concentrations (indicated by colour gradients). Figure 3(c) shows eGFR distributions stratified by toxicity label. Toxic cases cluster disproportionately below 80 mL/min/1.73m2, confirming that the synthetic generator embeds biologically coherent filtration decline patterns. Figure 3(d) visualizes nephrotoxicity prevalence across comorbidity groups, with CKD history and hypertension showing the largest marginal impacts mirroring known clinical vulnerabilities. Figure 3(e) depicts the joint distribution of age and current eGFR. Toxic individuals (red) cluster at lower filtration values across all ages, while non-toxic individuals (blue) populate higher eGFR ranges, forming a clear separability ridge. Figure 3(f) displays the distribution of nephrotoxicity risk scores across the entire cohort. The right-skewed profile reflects the generator’s intentional design, with the
![]()
Figure 2. Biomarker distributions (2 × 3 Grid Layout). Row 1: (a) Creatinine (top-left), (b) eGFR (top-center), (c) BUN (top-right). Row 2: (d) Lithium level (bottom-left), (e) Sodium (bottom-center), (f) Urine osmolality (bottom-right). (g) Pearson correlation matrix of renal biomarkers, lithium exposure, and clinical covariates.
Figure 3. Label-conditioned renal and exposure patterns. Top row: lithium-level quartiles and nephrotoxicity rate (a), treatment duration vs. risk score (b), and eGFR separation across toxicity labels (c). Bottom row: comorbidity effects on toxicity risk (d), age -eGFR relationships by label (e), and the distribution of latent nephrotoxicity risk scores (f).
upper tail capturing individuals most susceptible to renal decline.
This matches the example paper precisely: toxic vs. non-toxic splits across key physiological markers, demonstrating early-warning signals encoded in the synthetic renal trajectories.
3. Results
3.1. Model Performance across Classifiers
Figure 4 summarizes the predictive performance of all evaluated models. Despite substantial multicollinearity among renal biomarkers, each algorithm converges to near-perfect discrimination between toxic and non-toxic patients.
Figure 4(a) shows the AUC for each classifier, with Random Forest, XGBoost, LightGBM, Logistic Regression, Gradient Boosting, and the Neural Network all achieving AUC ≈ 1.00, indicating linearly separable toxicity states under the synthetic distribution. Figure 4(b) presents precision, recall, and F1-scores for each model. All metrics remain uniformly high (≥0.99), demonstrating that both sensitivity and specificity are exceptionally stable across algorithms. Figure 4(c) shows sensitivity and specificity curves. Each model maintains a plateau of perfect discrimination across a wide decision-threshold band, only degrading at the extreme ends of the probability range, consistent with the well-behaved synthetic distributions. Figure 4(d) provides ROC curves, with all classifiers collapsing to an almost identical upper-left trajectory, further confirming complete model separation on the chosen features.
![]()
Figure 4. Predictive performance of all machine-learning models. Top row (left to right): (a) AUC across classifiers, (b) Precision -Recall -F1 comparison. Bottom row (left to right): (c) Sensitivity and specificity across thresholds, (d) ROC curves for all models.
For comparison, we evaluated two simple clinical heuristic baselines: (i) eGFR < 60 mL/min/1.73m2, and (ii) creatinine increase ≥ 0.3 mg/dL. These rules achieved AUC values of 0.69 and 0.74 respectively, substantially lower than the multimodal ML ensemble.
3.2. Precision-Recall Behaviour and Class-Balance Effects
Synthetic nephrotoxicity prevalence was set at 15%, creating a moderately imbalanced dataset. Figure 5 evaluates the sensitivity of each classifier under this skewed distribution.
Figure 5 displays the precision -recall curves. All models maintain precision values markedly above the baseline prevalence (dashed red line), with average precision (AP) scores between 0.999 and 1.000. This indicates strong robustness to class imbalance and minimal degradation of minority-class recall.
3.3. Feature Importance and Renal-Risk Determinants
To characterize model interpretability, we computed global feature importance
Figure 5. Precision-recall curves under imbalanced (15%) nephrotoxicity prevalence.
via LightGBM and SHAP.
Figure 6(a) shows LightGBM’s top 20 feature-importance ranking. Age and Creatinine Increase dominate the predictive landscape, followed by BMI, current eGFR, and baseline creatinine. These patterns mirror clinically understood renal physiology: acute creatinine elevation and reduced filtration capacity serve as immediate markers of nephron stress.
Figure 6(b) presents the SHAP summary plot. Again, Creatinine Increase, Age, Current eGFR, Baseline Creatinine, and BUN/Creatinine Ratio emerge as the strongest global drivers. The remaining features comorbidities, lithium level, drug exposures exert subtler but consistent additive effects.
3.4. SHAP Dependence Patterns
Figure 7 explores individualized nonlinearities in SHAP dependence plots.
Figure 7(a) (Age): Toxicity risk remains minimal at lower normalized ages but rises sharply beyond the cohort-centered z-score threshold, reflecting accelerated vulnerability in older synthetic patients.
Figure 7(b) (Creatinine Increase): A near-binary jump in SHAP values is evident: patients with any detectable creatinine rise (>0) show disproportionately large positive contributions to predicted toxicity, consistent with abrupt renal decompensation.
Figure 7(c) (BMI): SHAP values trace a bimodal response: lower BMI associates with markedly negative contributions, while upper-quartile BMI values correspond to mild positive toxicity signals, reflecting expected metabolic risk amplification.
(a)
(b)
Figure 6. (a) Top 20 most important predictive features identified by the LightGBM classifier. (b) SHAP summary plot showing global feature importance for nephrotoxicity prediction.
Figure 7. (a) SHAP dependence plot for age. (b) SHAP dependence plot for creatinine increase; (c) SHAP dependence plot for BMI; (d) SHAP dependence plot for lithium level.
Figure 7(d) (Lithium Level): Higher lithium levels yield increasingly positive SHAP contributions, but the effect is weaker than creatinine-based features, consistent with lithium acting as a chronic rather than acute renal stressor.
3.5. Local Explanations through SHAP Waterfall Plots
To illustrate decision-level interpretability, we computed SHAP waterfall plots for two representative individuals.
Figure 8(a) (Sample 0): Toxicity prediction is driven almost entirely by an abrupt creatinine increase (contributing - 4 units on the SHAP scale), while age and eGFR exert modest effects. Remaining features contribute negligible adjustments, indicating a sparse, high-signal decision boundary.
Figure 8(b) (Sample 1): Similarly, creatinine rise dominates the decision; however, age contributes a larger negative shift compared to Sample 0, and sodium levels introduce minor positive adjustments. The consistency of the largest
Figure 8. (a) SHAP waterfall plot for sample 0; (b) SHAP waterfall plot for sample 1.
terms suggests the model relies heavily on acute renal biomarkers when available.
3.6. Threshold Optimization and Operating-Point Analysis
A clinically deployable risk-prediction system must perform reliably not only at a single probability cutoff but across a range of operating thresholds. To simulate real-world triage scenarios where clinicians may prioritize either maximal sensitivity (early detection) or maximal specificity (avoiding false alarms) we conducted a detailed threshold-sweep analysis using the held-out test set.
Figure 9(a) illustrates the sensitivity -specificity profiles across thresholds from 0.00 to 1.00. An optimal operating point emerges at approximately 0.05, where both sensitivity and specificity simultaneously reach 1.00. This behavior indicates that the model preserves complete separation between toxic and non-toxic individuals over a broad low-threshold regime, an advantageous property for early-warning clinical systems where missing a toxic case carries substantial risk. Figure 9(b) examines positive and negative predictive values (PPV and NPV) across the same threshold range. Despite the underlying class imbalance (15% toxicity prevalence), both PPV and NPV remain near-perfect (≥0.99) across most mid-range thresholds. This stability reflects two structural properties of the synthetic data and resulting model: (i) tight clustering of toxic cases in high-risk probability space, and (ii) low overlap between renal trajectories of toxic and non-toxic groups. Figure 9(c) presents accuracy and Youden’s J statistic. Both metrics plateau at their maximum values across an unusually wide threshold interval, confirming that the decision boundary is highly robust to shifts in the operating point. Such plateau behaviour suggests that downstream clinical workflows can flexibly tune thresholds depending on local resource constraints without materially affecting diagnostic performance. Figure 9(d) provides a ROC-like threshold trade-off visualization. The optimal point lies tightly within the upper-left extreme, demonstrating almost perfect discriminability. The near-vertical ascent from the origin underscores the model’s capacity to correctly classify virtually all toxic individuals
![]()
Figure 9. Threshold optimization and operating-point analysis across four panels. Top-left (a): Sensitivity and specificity across decision thresholds. Top-right (b): Positive and negative predictive values (PPV, NPV) as a function of threshold. Bottom-left (c): Accuracy and Youden’s J statistic, showing plateau stability over a wide threshold range. Bottom-right (d): ROC-like trade-off curve illustrating the optimal operating point in the upper-left region.
before encountering false-positive errors.
Together, these analyses highlight the model’s flexibility for deployment in diverse clinical contexts ranging from conservative screening strategies emphasizing sensitivity, to high-specificity workflows used for confirmatory decision-making.
3.7. Model Calibration
A reliable clinical prediction model must not only discriminate between toxic and non-toxic individuals but also assign well-calibrated probabilities that accurately reflect underlying risk. Calibration is especially important in medical decision-making, where probability estimates may guide dose adjustments, follow-up intervals, or early intervention strategies. Figure 10 presents the calibration curve comparing predicted nephrotoxicity probabilities against the empirical outcome frequencies in the held-out test set. The curve lies almost exactly on the identity line, with only minimal deviations across the full probability spectrum. This near-perfect alignment indicates that the model’s probability outputs faithfully correspond to true event likelihoods, despite the deterministic nature of the synthetic
Figure 10. Calibration analysis of predicted nephrotoxicity probabilities.
data environment. The accompanying probability-density distribution highlights the expected bimodal structure: non-toxic cases cluster tightly near zero, while toxic cases concentrate near one. This separation reflects the model’s strong discriminative capacity and supports the stability of calibrated predictions across risk levels.
Taken together, these results demonstrate that the model not only distinguishes toxicity states with high accuracy but also produces interpretable, confidence-consistent probability estimates suitable for downstream clinical applications.
To evaluate robustness beyond in-distribution synthetic splits, models trained under baseline generator hyperparameters were tested on a cohort generated with altered lithium-exposure distributions, higher comorbidity prevalence, and increased stochastic noise. While discrimination remained strong (AUC range 0.88 - 0.94), a modest decline relative to in-distribution performance was observed, confirming that model performance is sensitive to underlying population shifts but remains clinically meaningful.
4. Discussion
4.1. Overall Findings and Methodological Contribution
This work demonstrates that a mathematically explicit synthetic generator, when coupled with a multimodal machine-learning ensemble, can reliably detect early signatures of lithium-associated nephrotoxicity. By construction, the synthetic cohort reproduces key renal phenomena observed in clinical practice: patients labelled as nephrotoxic show a coherent triad of elevated creatinine, reduced eGFR, and modest perturbations in hydration markers, while non-toxic individuals cluster around physiologically normal ranges. Across this structured landscape, all evaluated classifiers logistic regression, tree-based methods (Random Forest, Gradient Boosting, XGBoost, LightGBM), and a compact MLP converge to near-perfect discrimination (AUC ≈ 1.00, F1 ≈ 0.98 - 1.00) on the held-out test set.
Beyond raw performance, the framework contributes a reproducible pipeline that links a transparent generative model, clinically motivated feature engineering, and a unified evaluation suite (ROC, precision -recall, calibration, threshold analysis, and subgroup performance). In doing so, it provides a controlled “sandbox” where lithium-related renal risk can be studied without the ethical, logistical, and privacy constraints that typically limit access to large, well-annotated real-world cohorts.
4.2. Physiological Plausibility and Interpretability of Risk Signals
A central question in synthetic-data-driven modeling is whether the patterns exploited by machine-learning models remain physiologically meaningful, rather than artefactual properties of the generator. Several lines of evidence from our analyses support the biological plausibility of the learned decision boundary. First, the feature-importance ranking from LightGBM and related models consistently prioritizes Age, Creatinine Increase (ratio of current to baseline creatinine), current eGFR, baseline creatinine, and BMI. This hierarchy closely mirrors nephrology practice, where acute or subacute creatinine elevations and eGFR decline are direct markers of nephron stress, and advanced age and metabolic burden amplify vulnerability to chronic kidney disease.
Second, SHAP summary and dependence plots reveal coherent, clinically intuitive nonlinearities. Creatinine Increase displays a near-step function: even modest rises above baseline produce large positive SHAP contributions toward predicted toxicity, reflecting the model’s sensitivity to early decompensation. Age exhibits an accelerated risk pattern at higher values, consistent with the compounding effect of aging on renal reserve. Lithium Level and the Lithium Exposure Index contribute more modest but monotonic risk increments, aligning with the notion that lithium acts as a chronic stressor whose impact is mediated through cumulative burden rather than isolated measurements. Hydration- and comorbidity-related features (BUN/Creatinine Ratio, hypertension, diabetes, CKD history) provide secondary modulation, nudging predictions upward in individuals with compromised baseline physiology.
Third, local SHAP waterfall plots for individual patients show sparse, high-signal explanations dominated by a small subset of renal biomarkers. In high-risk cases, abrupt creatinine elevation, reduced eGFR, and older age account for the majority of the log-odds shift toward toxicity, while ancillary variables exert only minor adjustments. This structure is desirable: it suggests the model leverages a compact set of clinically interpretable drivers rather than learning diffuse, opaque combinations of weak correlations.
4.3. Robustness to Class Imbalance, Threshold Choice, and Subgroup Variation
From a deployment perspective, robustness is as important as raw discrimination. The synthetic prevalence of nephrotoxicity was set at 15%, creating a moderately imbalanced environment that approximates a high-risk chronic-lithium cohort. Under this skew, precision-recall curves remain far above the baseline prevalence, with average precision scores essentially equal to 1.00, indicating that the minority nephrotoxicity class is consistently recovered with minimal contamination from false positives.
Threshold analysis further illustrates the stability of the decision surface. Sensitivity -specificity, PPV-NPV, and accuracy-Youden’s J curves collectively show a broad plateau of near-optimal performance across a wide range of probability cutoffs. The empirically optimal operating point (around a 0.05 threshold) delivers simultaneously high sensitivity and specificity, but even moderate departures from this value incur only negligible degradation. In a clinical translation scenario, this tolerance is advantageous: institutions can tune thresholds to local risk tolerance (e.g., prioritizing sensitivity in high-risk patients) without collapsing model performance. Subgroup analyses stratified by age bands, gender, and serum-lithium categories confirm that the ensemble does not rely on narrow demographic artefacts. AUC, F1, and accuracy remain uniformly high across younger and older groups, males and females, and subtherapeutic, therapeutic, and supratherapeutic lithium strata. While this homogeneity is partly a consequence of the generator’s design i.e., the absence of strong structural bias it still provides an important sanity check: the classifier’s decisions are driven primarily by renal-function and exposure variables, not spurious demographic correlations. Calibration analysis shows that predicted probabilities align closely with observed event frequencies, with the calibration curve hugging the identity line. Even though the data-generating process is deterministic and fully specified, miscalibration could still emerge if the model over- or under-estimated toxicity probabilities in certain regions of feature space. The near-perfect calibration suggests that the ensemble not only separates classes but also produces probability scores that meaningfully reflect relative risk within this synthetic environment, a prerequisite for downstream applications such as risk stratification and decision-curve analysis.
4.4. Strengths, Limitations, and Future Extensions
The principal strength of this work lies in the combination of: (i) a mathematically explicit, physiologically informed generator of renal biomarkers under lithium exposure; (ii) a multimodal feature set that integrates laboratory values, comorbidities, demographics, and drug interactions; and (iii) a comprehensive, model-agnostic analysis pipeline that emphasizes interpretability and robustness. Together, these components create a reproducible, extensible platform for exploring lithium-induced nephrotoxicity and for prototyping early-warning models before transitioning to real-world data.
However, several limitations must be acknowledged. First, despite its physiological grounding, the synthetic generator cannot fully capture the heterogeneity, noise, and unexpected patterns present in real clinical practice. True renal trajectories are influenced by genetic predisposition, variable adherence, dietary factors, intercurrent illnesses, and complex multi-drug regimens that are only coarsely approximated in our current framework. Second, temporal structure is simplified: the model infers toxicity from cross-sectional or quasi-longitudinal snapshots rather than from rich time series spanning years of follow-up. This restricts the study of dynamic phenomena such as transient acute kidney injury, recovery phases, and gradual chronic decline. Third, all performance metrics are necessarily optimistic relative to those expected on observational EHR data, where measurement error, coding artefacts, and unmeasured confounders are ubiquitous. Future work should therefore focus on three directions. Methodologically, the generator can be extended to simulate fully stochastic renal trajectories, incorporating random shocks, variable dosing schedules, and nonlinear pharmacokinetic -pharmacodynamic couplings between lithium levels and nephron injury. Biologically, genetic and molecular markers (e.g., polygenic risk scores, tubular injury biomarkers) could be integrated as additional modalities, allowing the exploration of gene -drug -environment interactions. Clinically, the next step is to validate the proposed models on retrospective or prospective real-world lithium cohorts, calibrate thresholds to local prevalence and workflows, and embed the system into prototype decision-support tools that provide transparent risk explanations to clinicians.
All simulated biomarkers were expressed in standard clinical units (mg/dL for creatinine, mL/min/1.73m2 for eGFR, mEq/L for lithium and sodium), enabling direct conceptual mapping to routine nephrology workflows. Future work will focus on calibrating generator parameters using real-world lithium-treated cohorts by matching empirical biomarker distributions and longitudinal decline slopes. Such calibration would allow the synthetic simulator to approximate specific institutional populations prior to prospective validation.
In summary, this study illustrates how structured synthetic data and interpretable multimodal machine learning can jointly provide a high-fidelity testbed for understanding lithium’s renal impact and for designing early-detection strategies. While real-world validation remains essential before deployment, the framework offers a principled bridge between theoretical renal-risk modelling and future clinical implementation.
5. Conclusion
In this study, we introduced a fully interpretable multimodal machine-learning framework capable of predicting lithium-associated renal dysfunction using physiologically grounded synthetic biomarker trajectories [77] [78]. Across a diverse suite of classical and ensemble models, performance remained consistently near-perfect, reflecting the strong discriminatory signals encoded in early renal-function changes. Importantly, the models identified predictors that align with established nephrology principles such as creatinine elevation, eGFR decline, age-related vulnerability, and cumulative lithium burden demonstrating that the learned decision boundaries remain clinically meaningful rather than artefactual [79]-[81]. Subgroup analyses further confirmed that predictive accuracy and probability calibration were stable across demographic categories and serum-lithium strata, suggesting that the framework does not depend on spurious correlations or demographic biases. Together, these findings position the synthetic generator and accompanying ML pipeline as a rigorous, extensible testbed for developing early-warning systems aimed at preserving kidney function during long-term lithium therapy. While translation to real-world clinical settings will require validation on observational cohorts and incorporation of richer longitudinal dynamics, the present work provides a strong methodological foundation for future decision-support tools that prioritize early detection, interpretability, and patient safety.