Skip to Content
  • Article
  • Open Access

27 November 2026

16 Pages

Reinforcement Learning for Dynamic Loop Diuretic Dosing in Heart Failure: A Model Development and Validation Study

,
and
1
Key Laboratory of Birth Defects and Related Diseases of Women and Children, Sichuan University, Ministry of Education, Chengdu 610041, China
2
School of Automation Engineering, University of Electronic Science and Technology of China, Chengdu 611731, China
*
Author to whom correspondence should be addressed.

Abstract

Background: Loop diuretics are central to decongestion in patients with heart failure (HF), but optimal dosing remains uncertain. This study aimed to develop and validate a reinforcement learning (RL) agent for dynamically personalized loop diuretic management. Methods: The agent was developed using offline RL. Five-fold patient-level cross-validation in MIMIC-IV was used to assess the stability of model performance across data splits. The final model was trained on the entire MIMIC-IV study cohort and externally evaluated in eICU-CRD. The state space included 21 clinical variables summarized at 6-h intervals, and the action space consisted of eight loop diuretic dose categories. The reward function incorporated urine output, acute kidney injury (AKI), and in-hospital mortality. The RL agent was evaluated using Fitted Q Evaluation (FQE), and dose comparisons were performed between the RL and clinician policies. Results: MIMIC-IV and eICU-CRD included 2410 and 635 patients, respectively. Across all five test folds, the RL policy achieved higher FQE values than the clinician policy, ranging from 0.255 (95% CI, 0.241–0.270) to 0.312 (95% CI, 0.297–0.327), compared with 0.125 (95% CI, 0.109–0.141) to 0.173 (95% CI, 0.156–0.189) for the clinician policy. Higher expected returns were associated with lower rates of AKI during the ICU stay and in-hospital mortality. Compared with clinicians, the agent recommended a lower initial dose followed by more active dosing at subsequent treatment steps. External validation reproduced this temporal dosing pattern, with a higher FQE value for the RL policy (0.282; 95% CI, 0.237–0.328) than for the clinician policy (0.225; 95% CI, 0.158–0.290). Conclusions: The RL agent achieved higher FQE-estimated policy values than the clinician policy in offline evaluations. These exploratory findings suggest that the RL agent has the potential to serve as a clinical decision-support system for loop diuretic dosing. Its clinical benefit remains to be demonstrated prospectively.

1. Introduction

Heart failure (HF) is a major global health problem associated with poor clinical outcomes and a substantial healthcare burden [1,2]. Fluid removal is a primary therapeutic goal for most patients hospitalized with HF, and intravenous loop diuretics remain an essential component of current treatment [3]. However, the optimal loop diuretic dose remains uncertain. Current guidelines recommend adjusting treatment according to the diuretic response and subsequently using the lowest effective dose to maintain a stable fluid status [4,5]. Higher doses may enhance decongestion but can also increase the risk of transient renal dysfunction [6,7]. Several measures have been proposed to characterize diuretic response. These include fluid output relative to the administered loop diuretic dose [8]. Changes in body weight or urinary sodium excretion may also inform subsequent treatment adjustment [9,10]. These studies reflect the need for a dynamic and individualized framework that can translate evolving treatment responses into subsequent dosing decisions.
The marked heterogeneity of critically ill patients limits the ability of standardized treatment protocols to address individual therapeutic needs. Reinforcement learning (RL) provides a framework for learning personalized treatment strategies from sequential clinical data. It represents patient management as interactions among clinical states, treatment actions, and subsequent rewards. By considering both immediate responses and delayed outcomes, RL can identify a policy that maximizes the expected cumulative reward over the course of treatment [11]. This property makes RL particularly suitable for clinical decisions that require repeated adjustment as the patient’s condition evolves [12,13]. RL has been applied to several sequential decision-making tasks in critical care, including hemodynamic management, mechanical ventilation, and sedation [14,15,16,17]. In the context of diuretic therapy, one study developed a joint policy for vasopressor and diuretic administration in ICU patients with HF [18]. Another study used a binary action to determine whether loop diuretics should be administered each day in hospitalized patients with acute dyspnea [19]. Both studies focused on the decision to administer diuretics. The application of RL to individualized diuretic dose adjustment therefore remains limited.
Therefore, this study aimed to develop an RL agent for individualized loop diuretic dosing in patients with HF. Data from two large critical care databases were used for model development and external validation. The learned dosing policy was evaluated using FQE and compared with clinician decisions to characterize its estimated policy value and dosing patterns.

2. Materials and Methods

2.1. Data Source and Study Population

Data were obtained from the Medical Information Mart for Intensive Care IV (MIMIC-IV, version 3.1) and the eICU Collaborative Research Database (eICU-CRD, version 2.0) [20,21]. The first author completed the required training and obtained authorized access to both databases (ID: 14380784).
The inclusion criteria were as follows: (1) adult patients with acute decompensated HF or acute-on-chronic HF identified using ICD-9 and ICD-10 codes; (2) first ICU admission with an ICU length of stay > 24 h; and (3) receipt of intravenous loop diuretics during the ICU stay. The exclusion criteria were as follows: (1) absence of a baseline serum creatinine measurement before the first intravenous loop diuretic dose; (2) acute kidney injury (AKI) before the first dose; (3) receipt of renal replacement therapy (RRT) before the first dose; (4) fewer than three 6-h observation windows; and (5) incomplete urine-output records. The detailed patient selection process is presented in Figure S1.

2.2. Data Extraction and Preprocessing

Data were extracted using structured query language (SQL). The extracted variables included demographic characteristics (age, sex, and body weight); vital signs, including systolic blood pressure (SBP), diastolic blood pressure (DBP), mean arterial pressure (MAP), and heart rate (HR); laboratory measurements, including serum creatinine (SCr), blood urea nitrogen (BUN), serum potassium, sodium, chloride, and bicarbonate; indicators of volume status and diuretic response, including urine output, fluid balance, and cumulative fluid balance; and treatment-related variables, including loop diuretic dose, thiazide diuretic use, vasopressor use, mechanical ventilation, and RRT. eGFR was calculated using the 2021 CKD-EPI creatinine equation and the most recent serum creatinine measurement before the first loop diuretic dose [22]. In-hospital mortality was extracted directly from hospital discharge records, whereas AKI was ascertained from serial serum creatinine measurements according to the KDIGO serum creatinine criteria [23]. New-onset AKI was assessed from the first intravenous loop diuretic administration until ICU discharge.
Patient trajectories were represented as multivariate discrete time series. Each trajectory began at the first administration of a loop diuretic and ended at the earliest occurrence of 72 h after treatment initiation, initiation of RRT, in-hospital death, or ICU discharge. Trajectories were divided into consecutive 6-h intervals, each representing one time step. For variables measured multiple times within a time window, physiological and laboratory measurements were averaged. Treatment-history variables were represented by administered doses or indicators of treatment use. Urine output was summed within each time window, and fluid balance was calculated as total recorded fluid intake mi-nus total recorded fluid output within that window. Missing values were imputed using the most recent available value before each time step. T-distributed stochastic neighbor embedding (t-SNE) was used to explore differences in clinical state distributions [24]. Each observation represented a clinical state at a 6-h decision window along a patient trajectory. The analysis included 21,287 states from MIMIC-IV and 5660 states from eICU-CRD. High-dimensional state representations were visualized in two dimensions, with each point colored according to its source database. The visualization was used to examine broad patterns of overlap and localized differences between the two cohorts.

2.3. Markov Decision Process

We structured the sequential loop diuretic dosing problem using a Markov decision process (MDP), defined as follows:
M = S , A , r , γ .
S denotes the state space. At each time step, the patient state st ∈ S comprised the demographic characteristics, vital signs, and laboratory measurements described above. Indicators of volume status and diuretic response included urine output during the current time window, 24-h urine output, fluid balance, and cumulative fluid balance. Treatment-related variables included loop diuretic dose, thiazide diuretic use, vasopressor use, and mechanical ventilation status.
A denotes the action space. In this study, the action was defined as the loop diuretic dose. Intravenous furosemide and bumetanide administrations were included, with 1 mg of intravenous bumetanide converted to 40 mg of intravenous furosemide [25]. The action space comprised eight loop diuretic dose categories (mg/step): 0, 1–20, 21–40, 41–60, 61–80, 81–100, 101–120, and >120.
Each state was constructed using information available before the corresponding treatment action. The initial state used the latest clinical measurements before the first loop diuretic dose and cumulative urine output and fluid balance over the preceding 6 h. The initial action represented loop diuretic administration within the 6-h interval beginning with the first dose. Subsequent state–action pairs maintained this temporal ordering to prevent information leakage from post-treatment observations.
r denotes the reward function, which was designed to maintain adequate urine output, reduce the occurrence of new-onset AKI, and lower the risk of in-hospital death. The intermediate reward was determined by the mean hourly urine output during each 6-h interval. Terminal rewards were determined by the occurrence of new-onset AKI during the ICU stay and survival status at hospital discharge. The reward function was defined as follows:
r t = r t U + I ( t = T ) r A + r D , r t U = − 1 , U t < 100   mL / h , 0 , 100 ≤ U t ≤ 150   mL / h , + 1 , U t > 150   mL / h , r A = − 5 , AKI , + 5 , no   AKI , r D = − 10 , death , + 10 , survival .
Here, Ut is the mean hourly urine output during the corresponding 6-h interval, and I ( t = T ) indicates that the terminal rewards for AKI and mortality were assigned only at the final time step. The raw rewards were normalized within each cross-validation fold using maximum absolute scaling.
γ denotes the discount factor, which determines the relative contribution of future rewards to the current decision. In this study, γ was set to 0.95 to account for long-term outcomes.

2.4. Reinforcement Learning Algorithm Description

Conservative Q-learning (CQL) was used to learn an individualized loop diuretic dosing policy from retrospective patient trajectories [26]. A deep Q-network (DQN) parameterized by θ approximated the action value function Qθ(s,a), representing the expected cumulative reward of administering dose a in patient state s [27].
To limit overestimation of action values, the temporal difference target was calculated using the Double DQN approach. The online network selected the optimal action for the subsequent state, whereas a separate target network evaluated the selected action:
a * = arg max a ′ ∈ A Q θ ( s ′ , a ′ )
y = r + γ ( 1 − d ) Q θ ‾ ( s ′ , a * )
where θ ‾ represents the target network parameters and d indicates whether the transition is terminal. The Double DQN loss was defined as follows:
L DoubleDQN ( θ ) = E ( s , a , r , s ′ , d ) ∼ D Q θ ( s , a ) − y 2 ,
where D is the offline dataset of observed clinical transitions.
Because the model was trained without interacting with the clinical environment, estimated values for actions rarely observed in the dataset could be unreliable. CQL addressed this issue by penalizing high Q values across all candidate actions while preserving the values of actions observed in the clinical data:
L CQL ( θ ) = E ( s , a ) ∼ D log ∑ a ~ ∈ A exp Q θ ( s , a ~ ) − Q θ ( s , a ) .
The complete training objective was:
L ( θ ) = L DoubleDQN ( θ ) + α L CQL ( θ ) ,
where α controls the contribution of conservative regularization. After model training, the RL agent recommended the loop diuretic dose with the highest estimated Q value for the current patient state:
π RL ( s ) = arg max a ∈ A Q θ ( s , a ) .
The CQL training procedure is shown in Algorithm 1. The Q-network consisted of two fully connected hidden layers with 128 units each, Swish activation, and batch normalization. The discount factor was set to γ = 0.95, the conservative regularization weight to α = 0.1, the batch size to 512, and the learning rate to 5 × 10−7. Adam with AMSGrad was used for optimization, with β1 = 0.9, β2 = 0.999, and a weight decay of 1 × 10−4.
Algorithm 1. CQL training procedure
Require: Offline dataset D , discount factor γ, conservative weight α
1: Initialize Q-network Qθ and target network Q θ ‾
2: while not converged do
3:   Sample a mini-batch (s,a,r,s’,d) from D
4:    a * ← arg max a ′ ∈ A Q θ ( s ′ , a ′ )
5:    y ← r + γ ( 1 − d ) Q θ ‾ ( s ′ , a * )
6:    L DoubleDQN ← Q θ ( s , a ) − y 2
7:    L CQL ← log ∑ a ~ ∈ A exp ( Q θ ( s , a ~ ) ) − Q θ ( s , a )
8:   Update Qθ by minimizing L DoubleDQN + α L CQL
9:   Periodically update Q θ ‾
10: end while
11: Return πRL(s) = argmaxa∈AQθ(s,a)

2.5. Policy Evaluation

Policy performance was assessed using fitted Q evaluation (FQE), an offline policy evaluation method that estimates the expected return of a target policy from retrospective trajectories without requiring prospective interaction with the clinical environment [28]. For a given policy π, FQE fitted a separate action-value function by repeatedly applying policy-specific Bellman updates to the observed transition data. The estimated policy value was then calculated from the learned value function.
The FQE network was trained by minimizing:
L FQE θ = E D Q θ s , a − y 2 .
For the RL policy, the Bellman target used the action recommended by the fixed policy:
y = r + γ Q θ ¯ s ′ , π s ′ .
For the clinician policy, the Bellman target used the next actual clinical action a’ recorded in the same patient trajectory:
y = r + γ Q θ ¯ s ′ , a ′ .
Here, θ and θ ¯ denote the evaluation and target network parameters, respectively, and r is the normalized reward. The target policy remained fixed during FQE training. The discount factor was set to 0.95, the batch size to 512, and the learning rate to 1 × 10−5.
We used bootstrapping with 10,000 resamples at the ICU-stay level to obtain 95% CIs (confidence intervals) for the estimated return of each policy evaluated using FQE. Point estimates and corresponding CIs were obtained separately for both policies within each cross-validation test fold. Within each fold, ICU stays were sampled with replacement, with each stay contributing one FQE-estimated value at its first observed state. CIs were obtained from the 2.5th and 97.5th percentiles of the bootstrap mean distribution. The policy and FQE models were held fixed and were not refitted within bootstrap replicates.
Five-fold cross-validation was performed at the patient level using the entire MIMIC-IV cohort. In each iteration, four folds were used for model training and the remaining fold was used for testing. The RL policy and clinician policy were evaluated on the same test fold using FQE, and their performance was summarized across the five folds. These cross-validation results were used solely to assess the stability of model performance across data splits. The final model was trained on the entire MIMIC-IV cohort and used for policy characterization and external validation in the eICU-CRD cohort. For external evaluation in eICU-CRD, the FQE learning rate was set to 1 × 10−5. The same bootstrap procedure used in the cross-validation analyses was applied to obtain 95% CIs.
The initial-state value for each patient was defined as the Q value estimated by CQL for the recommended action at the first observed state of the patient’s trajectory. To examine associations between these values and observed outcomes, patients were grouped according to their initial values. The observed ICU AKI and hospital mortality rates were calculated within each bin. The analysis was conducted at the patient level, with each patient contributing one initial value and one outcome record.

2.6. Action Comparison

The actions recommended by the RL agent were compared with the corresponding clinician actions at each decision step. Agreement across the eight dose categories was summarized using a row-normalized heatmap, and the overall distributions of actions under the RL and clinician policies were compared. Each RL action was classified as lower than, the same as, or higher than the corresponding clinician action according to its dose category. Mean dose categories were also calculated at each decision step to characterize temporal differences between the two policies.
At the patient level, the clinician-recorded dose class was subtracted from the RL-recommended dose class at each decision step, and these differences were summed across each patient’s trajectory. Patients were assigned to the RL agent higher, RL agent lower, or same group when the total dose-class difference was positive, negative, or zero, respectively. The proportions of lower, same, and higher RL actions were further summarized according to in-hospital survival and the occurrence of AKI during the ICU stay. To characterize the three patient groups, age, gender, body weight, diabetes, hypertension, and baseline serum creatinine were analyzed and compared across groups.

2.7. Statistical Analysis

Continuous variables were summarized as medians with interquartile ranges or means with 95% CIs. Categorical variables were presented as counts and percentages. Continuous variables were compared using the Mann–Whitney U test for two groups or the Kruskal–Wallis test for three groups. Categorical variables were compared using Pearson’s chi-square test. p < 0.05 was considered statistically significant.

3. Results

3.1. Baseline Characteristics

The study included 2410 patients from MIMIC-IV and 635 patients from eICU-CRD (Table 1). Gender distribution was similar between the two cohorts, with males accounting for 54.1% of the MIMIC-IV cohort and 52.0% of the eICU-CRD cohort. Median age was 74.0 years in both cohorts. Heart rate, sodium, creatinine, and BUN did not differ significantly between cohorts (all p > 0.05). The proportions with eGFR < 60 or <30 mL/min/1.73 m2 did not differ significantly between cohorts (both p > 0.05). Compared with MIMIC-IV, eICU-CRD had higher SBP (119.5 vs. 113.0 mmHg), DBP (63.5 vs. 59.0 mmHg), and MAP (67.0 vs. 65.0 mmHg; all p < 0.01), and lower potassium levels (4.1 vs. 4.2 mmol/L; p < 0.01). Hemoglobin and pre-dose urine output were higher in eICU-CRD (10.9 vs. 10.3 g/dL and 61.9 vs. 45.8 mL/h, respectively; both p < 0.001). Pre-dose urine output was averaged over the 6 h preceding the first intravenous loop diuretic dose. The trajectory extended from the first dose until 72 h, ICU discharge, death, or RRT initiation, whichever occurred first. During the trajectory, eICU-CRD had lower urine output (94.9 vs. 106.0 mL/h) and less frequent vasopressor use (18.4% vs. 35.1%; both p < 0.001). First-window loop diuretic dose distributions differed despite identical medians of 40.0 mg/6 h (p = 0.036). The median trajectory-averaged loop diuretic dose was lower in eICU-CRD (15.0 vs. 16.0 mg/6 h; p < 0.001). In-hospital mortality was higher in eICU-CRD than in MIMIC-IV (12.9% vs. 9.4%; p < 0.01).
Table 1. Baseline characteristics of the study population.

3.2. Model Selection

Model performance varied substantially across α values (Figure 1). The full MIMIC-IV cohort was used to select α before cross-validation, aiming to identify a value that supported stable model convergence. With α = 0.1, the temporal-difference (TD) error decreased rapidly and stabilized at approximately 0.05, remaining consistently lower than those obtained with α = 0.5 and α = 1 throughout training. Based on the stability of the training TD-error trajectory, α = 0.1 was selected for the final RL agent. In parallel, the selected α = 0.1 produced the highest FQE initial-state value, which increased to approximately 0.35 during early training and remained above 0.32 at epoch 200. By comparison, α = 0.5 and α = 1 yielded lower FQE initial-state values. Because α was selected using the full cohort before cross-validation, the internal evaluation was not fully independent of hyperparameter selection and was therefore susceptible to optimistic bias.
Figure 1. Effects of different α values on model training. (A) TD error over 1000 training epochs. (B) FQE value over 200 training epochs. Lower TD error indicates better temporal-difference consistency, whereas a higher FQE initial-state value indicates a higher estimated policy value.

3.3. Model Performance

The RL agent consistently achieved higher FQE values than the clinician policy across all five test folds (Figure 2). The FQE values of the RL agent ranged from 0.255 (95% CI, 0.241–0.270) to 0.312 (95% CI, 0.297–0.327), whereas those of the clinician policy ranged from 0.125 (95% CI, 0.109–0.141) to 0.173 (95% CI, 0.156–0.189). Standardized expected return was inversely associated with both ICU AKI and in-hospital mortality. The observed ICU AKI rate declined as the expected return increased, reaching approximately 5% at higher expected returns. In-hospital mortality showed a similar but steeper decline, approaching zero at higher expected returns.
Figure 2. FQE values of the RL agent and their associations with clinical outcomes. (A) FQE initial-state values for the RL agent and clinicians’ policy across five cross-validation folds. Points represent FQE-estimated initial-state policy values, and vertical error bars indicate 95% CIs. (B,C) Smoothed curves illustrating the associations between standardized expected return and the observed rates of ICU AKI and hospital mortality, respectively.

3.4. Model Strategy

Action analyses were conducted using the final policy trained on the entire MIMIC-IV cohort. The heatmap summarizes the agreement between RL agent and clinician dose categories at each treatment decision (Figure 3). Among 21,287 treatment decisions from 2410 patients, the RL agent and clinicians selected the same dose category in 40.6% of decisions, whereas the RL agent recommended a lower dose in 26.1% and a higher dose in 33.3%. Agreement was highest for zero-dose decisions. When clinicians withheld diuretics, the RL agent also recommended 0 mg/step in 55.6% of decisions. For intermediate clinician doses, exact agreement ranged from 11.9% to 29.6%. The RL agent’s recommendations were distributed across multiple dose categories. When clinicians selected doses > 120 mg/step, the RL agent recommended doses of 101–120 or >120 mg/step in 4.8% and 22.2% of decisions.
Figure 3. Agreement between RL dosing actions (horizontal axis) and clinician dosing actions (vertical axis). Each row sums to 1. The color and number in each heatmap cell represent the proportion of RL dosing actions corresponding to each clinician dosing category, with darker colors indicating higher proportions.
Differences between the RL agent and clinician dosing strategies were further examined at the decision and patient levels and across treatment steps and clinical outcomes (Figure 4). Both the RL agent and clinicians most frequently selected the zero-dose category. Compared with clinicians, the RL agent selected 21–60 mg/step and doses above 80 mg/step more frequently, while selecting 0–20 mg/step less frequently. At the patient level, the cumulative dose-class difference was positive in 1247 patients (51.7%) and negative in 973 patients (40.4%). The remaining 190 patients (7.9%) had a zero cumulative class difference and formed the Same group. The RL agent recommended a lower initial dose than clinicians. After the first decision step, it maintained a more active diuretic strategy and consistently selected higher mean dose classes. In contrast, clinicians started with a higher dose but subsequently selected lower mean dose classes than the RL agent throughout the remaining treatment course (Figure 4C). Higher RL-recommended doses were more common in nonsurvivors and patients with AKI.
Figure 4. Comparison of diuretic dosing decisions between the RL agent and clinicians. (A) Distribution of treatment decisions across dose categories under the RL agent and clinician policies. (B) Patient counts and percentages grouped as higher (>0), lower (<0), or same (=0) based on the cumulative dose-class difference (RL minus clinician). (C) Mean dose class selected by the RL agent and clinicians at each decision step. (D,E) Proportions of decisions stratified by survival status and AKI status.
Patient characteristics were compared across the three RL dosing groups (Figure 5). Body weight, diabetes, hypertension, and baseline serum creatinine differed significantly across groups. The RL agent higher-dose group had the highest mean body weight and creatinine level and the highest proportions of diabetes and hypertension. Age and sex showed no statistically significant differences across groups (all p > 0.05).
Figure 5. Characteristics of patients stratified by the relationship between RL-recommended and clinician-recommended doses.

3.5. External Validation

The t-SNE visualization suggested broadly similar clinical state distributions between MIMIC-IV and eICU-CRD, with localized differences (Figure S2). In the eICU external-validation cohort, FQE estimated a higher initial-state value for the RL agent (0.282; 95% CI, 0.237–0.328) than for the clinician policy (0.225; 95% CI, 0.158–0.290). The action analysis included 5660 treatment decisions from 635 patients. The RL agent selected zero dose less frequently and selected middle and higher dose classes more frequently than clinicians (Figure S3). The RL agent initially selected a lower dose but subsequently adopted a more active diuretic strategy, consistent with the pattern observed in the full MIMIC-IV cohort.

4. Discussion

We developed an RL agent to support dynamically individualized loop diuretic dosing in critically ill patients with HF. The RL agent consistently achieved higher FQE-estimated returns than the clinician policy across all five cross-validation folds, and higher FQE-estimated returns were also observed in the independent eICU cohort. It recommended a lower initial dose followed by more active dosing during subsequent treatment steps. Its recommendations also varied according to patient characteristics and evolving clinical states. These findings suggest the potential of RL to support sequential loop diuretic dosing through dynamic and individualized treatment decisions. Prospective evaluation is required to establish its clinical effectiveness.
HF management involves a sequence of interdependent decisions. Each dose influences urine output, fluid balance, renal function, and the treatment options available at the next decision step. Conventional prediction models generally estimate the probability of a single outcome from a fixed set of variables. The MDP framework represents the complete decision process through transitions among patient states, treatment actions, rewards, and subsequent states. The Q-network then estimates the cumulative value of each candidate dose in the current state. This structure allows the model to account for immediate diuretic response and delayed clinical outcomes when selecting an action.
The offline setting creates an important methodological challenge because the agent learns entirely from actions recorded in clinical practice. Some state–action combinations occur infrequently, and a standard DQN may assign high values to these poorly represented actions. CQL addresses this problem by penalizing high Q values for candidate actions outside the well-supported regions of the clinical dataset [26]. The learned policy therefore remains anchored to observed treatment patterns while retaining the capacity to identify actions with higher estimated cumulative rewards. Double DQN further separates action selection from action evaluation and reduces Q-value overestimation. These components improve the stability of policy learning and are particularly relevant in clinical applications where direct exploration is unavailable.
Previous clinical RL studies have explored fluid and vasopressor selection in sepsis [14], guideline-informed mechanical ventilation [15], and individualized sedative dosing [17]. These applications illustrate how action spaces and reward functions can be tailored to specific treatments and clinical objectives. Building on previous RL studies of HF treatment and loop diuretic administration [18,19], our framework focuses on intravenous loop diuretic dose selection at 6-h intervals, with intermediate rewards based on urine output and terminal rewards based on AKI and in-hospital mortality. This reward design incorporates both immediate diuretic response and longer-term clinical outcomes into policy learning.
The reward function was designed to encourage an adequate diuretic response while avoiding AKI and in-hospital death. Mortality received the largest magnitude because death was considered the most serious adverse outcome. AKI was assigned an intermediate magnitude to reflect its clinical importance. The urine-output thresholds were informed by published guidance on the assessment of early diuretic response. The 2021 ESC Guidelines describe urine output above approximately 100–150 mL/h during the first 6 h after initiation of diuretic treatment as an indicator of a satisfactory response [29]. We therefore used 100 and 150 mL/h as the lower and upper reference points for the intermediate reward: −1 below 100 mL/h, 0 between 100 and 150 mL/h, and +1 above 150 mL/h. These clinically informed thresholds were translated into a three-level reward for model training. However, higher estimated returns under this reward specification do not necessarily indicate greater clinical safety.
The RL agent recommended a relatively low initial dose and used the subsequent clinical response to guide continued treatment. The 2021 ESC guidelines recommend assessing urine output within the first 6 h after initiating loop diuretic therapy [29]. An adequate response supports repetition of the current dose, and an inadequate response prompts dose escalation. The 6-h intervals used in the MDP correspond to this recommended assessment period. The 2022 AHA/ACC/HFSA guidelines also recommend increasing loop diuretic doses when initial diuresis is inadequate and continuing treatment until clinical congestion is resolved [4]. However, this initial dosing pattern may partly reflect how trajectory initiation was defined. Each trajectory began with an actual nonzero clinician dose, whereas the agent could recommend zero dose. This structural imbalance may contribute to the observed difference. In addition, clinicians may select a higher initial intravenous dose for patients already receiving substantial loop diuretic doses before admission [29]. Because home diuretic doses were not included in the state representation, the agent could not directly account for prior exposure when recommending the initial dose. This information gap may partly explain why the agent recommended lower initial doses than clinicians.
After the initial decision step, the RL agent maintained higher mean dose classes and selected intermediate-to-high doses more frequently than clinicians. Previous studies have used comparable response-guided escalation strategies. In the DOSE trial, the higher-dose regimen produced greater diuresis, fluid loss, and improvement in several secondary measures [6]. The stepped pharmacological protocol used in CARRESS-HF adjusted diuretic intensity according to urine output and the persistence of congestion [30]. PUSH-AHF assessed the diuretic response early and repeatedly, with protocolized treatment intensification following an insufficient natriuretic response [10]. This strategy increased natriuresis and diuresis during the initial treatment period. The RL agent recommended a similar sequence in which a lower initial dose was followed by dose maintenance or escalation according to the evolving clinical state.
The state representation also lacked clinical and haemodynamic assessments of congestion, including jugular venous pressure, peripheral oedema, and cardiac filling pressures. Urine output and fluid balance describe fluid removal but do not establish whether congestion has resolved. Their inclusion therefore does not replace assessment of the remaining need for decongestion. After congestion has resolved, clinicians may reduce diuretic doses based on bedside assessments. The agent lacks these assessments, while its urine-output reward continues to assign a positive value. This combination may lead the agent to maintain higher dose recommendations after clinicians have reduced treatment following congestion relief.
Higher RL-recommended doses relative to clinician doses were more frequent in non-survivors and patients with AKI. The urine-output reward assigns +1 to each window above 150 mL/h, without a penalty for excessive output or adjustment for congestion relief. This design rewards sustained high urine output without distinguishing necessary from excessive fluid removal. Although terminal rewards incorporate AKI and mortality, they do not explicitly penalize other adverse effects of excessive diuresis.
Policy evaluation is a central issue in offline clinical RL because the outcomes of unobserved treatment decisions cannot be measured directly [31]. We used FQE to estimate the expected return of the learned policy from retrospective transitions and compared the RL and clinician policies within the same test folds. Five-fold cross-validation assessed the consistency of FQE estimates across data splits, conditional on the α value selected using the full MIMIC-IV cohort. The consistently higher FQE estimates provide exploratory evidence of higher estimated returns under the specified reward function. External validation in eICU-CRD produced the same relative ordering of the RL and clinician policies and reproduced the temporal pattern of lower initial dosing followed by more active treatment.
This study has several limitations. The retrospective observational design carries inherent risks of selection bias and residual confounding. A major limitation is that α was selected using the full cohort before cross-validation, compromising the independence of hyperparameter selection and internal evaluation and introducing a risk of optimistic bias. External validation remained subject to the limitations of retrospective offline policy evaluation, including residual confounding and dependence on FQE model assumptions. Furthermore, limitations of the retrospective datasets prevented the inclusion of all relevant indicators of HF severity. Differences in patient characteristics between MIMIC-IV and eICU-CRD should be considered when interpreting the external policy evaluation results. Given the limited amount of training data, the action space was discretized into eight dose categories, reducing the precision of treatment recommendations by grouping different doses within the same category. The reward function reflects the clinical objectives selected for this study, and the available retrospective data do not establish a uniquely optimal reward specification. In particular, the urine-output component may favor persistently high urine output without fully capturing the risks of excessive volume depletion, hypotension, and electrolyte disturbances. FQE estimates expected policy performance from retrospective data, and higher estimated returns do not establish actual clinical benefit. The narrow bootstrap CIs reflect only sampling variability in the test patients, conditional on fixed policy and FQE models. They do not capture the full uncertainty of the FQE estimates, including uncertainty from model fitting and selection. Prospective evaluation is still required to determine clinical effectiveness. The 6-h intervals simplify the timing of clinical decisions.

5. Conclusions

An RL agent was developed for individualized loop diuretic dosing in critically ill patients with HF. The agent achieved higher FQE-estimated policy values than the clinician policy in both internal and external offline evaluations. It recommended a lower initial dose followed by higher mean dose classes at subsequent treatment steps. These exploratory findings suggest its potential as a clinical decision-support system for loop diuretic dosing. Its clinical benefit remains to be demonstrated prospectively.

Supplementary Materials

The following supporting information can be downloaded at: https://www.mdpi.com/article/10.3390/jcm15239314/s1, Figure S1: Flowchart of study cohort selection; Figure S2: Visualization of clinical state distributions using t-SNE. Each point rep-resents a clinical state at a 6-h decision window. Colors distinguish MIMIC-IV (21,287 states) from eICU-CRD (5660 states); Figure S3: Comparison of dosing decisions between the RL agent and clinicians in the eICU-CRD cohort. (A) Distribution of treatment decisions across dose categories. (B) Mean dose class selected by the RL agent and clinicians at each decision step.

Author Contributions

T.Z.: Methodology, Software, Validation, Formal analysis, Investigation, Data curation, Visualization, Writing—original draft and Writing—review and editing. Z.H.: Methodology, Software, and Writing—original draft. Y.H.: Conceptualization, Supervision, and Writing—review and editing. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Ethical review and approval were waived for this study because it involved only retrospective analysis of de-identified data from the MIMIC-IV and eICU Collaborative Research databases.

Data Availability Statement

The datasets analyzed in this study are available through PhysioNet: MIMIC-IV at https://physionet.org/content/mimiciv/3.1/ (accessed on 21 July 2026) and the eICU Collaborative Research Database at https://physionet.org/content/eicu-crd/2.0/ (accessed on 21 July 2026). Access is restricted to credentialed researchers who complete the required training and sign the applicable data use agreements.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Savarese, G.; Becher, P.M.; Lund, L.H.; Seferovic, P.; Rosano, G.M.C.; Coats, A.J.S. Global Burden of Heart Failure: A Comprehensive and Updated Review of Epidemiology. Cardiovasc. Res. 2022, 118, 3272–3287, Correction in Cardiovasc. Res. 2023, 119, 1453. https://doi.org/10.1093/cvr/cvad026. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  2. Shahim, B.; Kapelios, C.J.; Savarese, G.; Lund, L.H. Global Public Health Burden of Heart Failure: An Updated Review. Card. Fail. Rev. 2023, 9, e11. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  3. Ellison, D.H.; Felker, G.M. Diuretic Treatment in Heart Failure. N. Engl. J. Med. 2017, 377, 1964–1975, Correction in N. Engl. J. Med. 2018, 378, 492. https://doi.org/10.1056/NEJMx180001. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  4. Heidenreich, P.A.; Bozkurt, B.; Aguilar, D.; Allen, L.A.; Byun, J.J.; Colvin, M.M.; Deswal, A.; Drazner, M.H.; Dunlay, S.M.; Evers, L.R.; et al. 2022 AHA/ACC/HFSA Guideline for the Management of Heart Failure: A Report of the American College of Cardiology/American Heart Association Joint Committee on Clinical Practice Guidelines. Circulation 2022, 145, e895–e1032, Correction in Circulation 2023, 147, e674. https://doi.org/10.1161/CIR.0000000000001142. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  5. McDonagh, T.A.; Metra, M.; Adamo, M.; Gardner, R.S.; Baumbach, A.; Böhm, M.; Burri, H.; Butler, J.; Čelutkienė, J.; Chioncel, O.; et al. 2023 Focused Update of the 2021 ESC Guidelines for the Diagnosis and Treatment of Acute and Chronic Heart Failure: Developed by the Task Force for the Diagnosis and Treatment of Acute and Chronic Heart Failure of the European Society of Cardiology (ESC) with the Special Contribution of the Heart Failure Association (HFA) of the ESC. Eur. Heart J. 2023, 44, 3627–3639. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  6. Felker, G.M.; Lee, K.L.; Bull, D.A.; Redfield, M.M.; Stevenson, L.W.; Goldsmith, S.R.; LeWinter, M.M.; Deswal, A.; Rouleau, J.L.; Ofili, E.O.; et al. Diuretic Strategies in Patients with Acute Decompensated Heart Failure. N. Engl. J. Med. 2011, 364, 797–805. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  7. Testani, J.M.; Chen, J.; McCauley, B.D.; Kimmel, S.E.; Shannon, R.P. Potential Effects of Aggressive Decongestion during the Treatment of Decompensated Heart Failure on Renal Function and Survival. Circulation 2010, 122, 265–272. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  8. Kiernan, M.S.; Stevens, S.R.; Tang, W.H.W.; Butler, J.; Anstrom, K.J.; Birati, E.Y.; Grodin, J.L.; Gupta, D.; Margulies, K.B.; LaRue, S.; et al. Determinants of Diuretic Responsiveness and Associated Outcomes during Acute Heart Failure Hospitalization: An Analysis from the NHLBI Heart Failure Network Clinical Trials. J. Card. Fail. 2018, 24, 428–438. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  9. Valente, M.A.E.; Voors, A.A.; Damman, K.; Van Veldhuisen, D.J.; Massie, B.M.; O’Connor, C.M.; Metra, M.; Ponikowski, P.; Teerlink, J.R.; Cotter, G.; et al. Diuretic Response in Acute Heart Failure: Clinical Characteristics and Prognostic Significance. Eur. Heart J. 2014, 35, 1284–1293. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  10. ter Maaten, J.M.; Beldhuis, I.E.; van der Meer, P.; Krikken, J.A.; Postmus, D.; Coster, J.E.; Nieuwland, W.; van Veldhuisen, D.J.; Voors, A.A.; Damman, K. Natriuresis-Guided Diuretic Therapy in Acute Heart Failure: A Pragmatic Randomized Trial. Nat. Med. 2023, 29, 2625–2632. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  11. Liu, S.; See, K.C.; Ngiam, K.Y.; Celi, L.A.; Sun, X.; Feng, M. Reinforcement Learning for Clinical Decision Support in Critical Care: Comprehensive Review. J. Med. Internet Res. 2020, 22, e18477. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  12. Gottesman, O.; Johansson, F.; Komorowski, M.; Faisal, A.; Sontag, D.; Doshi-Velez, F.; Celi, L.A. Guidelines for Reinforcement Learning in Healthcare. Nat. Med. 2019, 25, 16–18. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  13. Yu, C.; Liu, J.; Nemati, S.; Yin, G. Reinforcement Learning in Healthcare: A Survey. ACM Comput. Surv. (CSUR) 2021, 55, 5:1–5:36. [Google Scholar] [CrossRef] [Scilit]
  14. Komorowski, M.; Celi, L.A.; Badawi, O.; Gordon, A.C.; Faisal, A.A. The Artificial Intelligence Clinician Learns Optimal Treatment Strategies for Sepsis in Intensive Care. Nat. Med. 2018, 24, 1716–1720. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  15. den Hengst, F.; Otten, M.; Elbers, P.; van Harmelen, F.; François-Lavet, V.; Hoogendoorn, M. Guideline-Informed Reinforcement Learning for Mechanical Ventilation in Critical Care. Artif. Intell. Med. 2024, 147, 102742. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  16. Peine, A.; Hallawa, A.; Bickenbach, J.; Dartmann, G.; Fazlic, L.B.; Schmeink, A.; Ascheid, G.; Thiemermann, C.; Schuppert, A.; Kindle, R.; et al. Development and Validation of a Reinforcement Learning Algorithm to Dynamically Optimize Mechanical Ventilation in Critical Care. npj Digit. Med. 2021, 4, 32. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  17. Eghbali, N.; Alhanai, T.; Ghassemi, M.M. Patient-Specific Sedation Management via Deep Reinforcement Learning. Front. Digit. Health 2021, 3, 608893. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  18. Drudi, C.; Fechner, M.; Mollura, M.; Pace, A.; Rätsch, G.; Barbieri, R. Reinforcement Learning for Heart Failure Treatment Optimization in the Intensive Care Unit. In Proceedings of the 2024 46th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Orlando, FL, USA, 15–19 July 2024; pp. 1–4. [Google Scholar]
  19. Lee, J.M.; Tang, S.; Sjoding, M.; Wiens, J. Optimizing Loop Diuretic Treatment for Mortality Reduction in Patients with Acute Dyspnea Using a Practical Offline Reinforcement Learning Pipeline for Health Care: Retrospective Single-Center Simulation Study. JMIR Med. Inf. 2025, 13, e69145. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  20. Johnson, A.E.W.; Bulgarelli, L.; Shen, L.; Gayles, A.; Shammout, A.; Horng, S.; Pollard, T.J.; Hao, S.; Moody, B.; Gow, B.; et al. MIMIC-IV, a Freely Accessible Electronic Health Record Dataset. Sci. Data 2023, 10, 1, Correction in Sci. Data, 2023, 10, 31. https://doi.org/10.1038/s41597-023-01945-2. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  21. Pollard, T.J.; Johnson, A.E.W.; Raffa, J.D.; Celi, L.A.; Mark, R.G.; Badawi, O. The eICU Collaborative Research Database, a Freely Available Multi-Center Database for Critical Care Research. Sci. Data 2018, 5, 180178. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  22. Inker, L.A.; Eneanya, N.D.; Coresh, J.; Tighiouart, H.; Wang, D.; Sang, Y.; Crews, D.C.; Doria, A.; Estrella, M.M.; Froissart, M.; et al. New Creatinine- and Cystatin C–Based Equations to Estimate GFR without Race. N. Engl. J. Med. 2021, 385, 1737–1749. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  23. Kellum, J.A.; Lameire, N.; For The Kdigo Aki Guideline Work Group. Diagnosis, Evaluation, and Management of Acute Kidney Injury: A KDIGO Summary (Part 1). Crit. Care 2013, 17, 204. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  24. Roggeveen, L.; el Hassouni, A.; Ahrendt, J.; Guo, T.; Fleuren, L.; Thoral, P.; Girbes, A.R.; Hoogendoorn, M.; Elbers, P.W. Transatlantic Transferability of a New Reinforcement Learning Model for Optimizing Haemodynamic Treatment for Critically Ill Patients with Sepsis. Artif. Intell. Med. 2021, 112, 102003. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  25. Felker, G.M.; Ellison, D.H.; Mullens, W.; Cox, Z.L.; Testani, J.M. Diuretic Therapy for Patients with Heart Failure: JACC State-of-the-Art Review. J. Am. Coll. Cardiol. 2020, 75, 1178–1195. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  26. Kumar, A.; Zhou, A.; Tucker, G.; Levine, S. Conservative Q-Learning for Offline Reinforcement Learning. In Proceedings of the Advances in Neural Information Processing Systems; Curran Associates, Inc.: Red Hook, NY, USA, 2020; Volume 33, pp. 1179–1191. [Google Scholar]
  27. Mnih, V.; Kavukcuoglu, K.; Silver, D.; Rusu, A.A.; Veness, J.; Bellemare, M.G.; Graves, A.; Riedmiller, M.; Fidjeland, A.K.; Ostrovski, G.; et al. Human-Level Control through Deep Reinforcement Learning. Nature 2015, 518, 529–533. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  28. Le, H.; Voloshin, C.; Yue, Y. Batch Policy Learning under Constraints. In Proceedings of the 36th International Conference on Machine Learning, PMLR, Long Beach, CA, USA, 9–15 June 2019; pp. 3703–3712. [Google Scholar]
  29. McDonagh, T.A.; Metra, M.; Adamo, M.; Gardner, R.S.; Baumbach, A.; Böhm, M.; Burri, H.; Butler, J.; Čelutkienė, J.; Chioncel, O.; et al. 2021 ESC Guidelines for the Diagnosis and Treatment of Acute and Chronic Heart Failure: Developed by the Task Force for the Diagnosis and Treatment of Acute and Chronic Heart Failure of the European Society of Cardiology (ESC) with the Special Contribution of the Heart Failure Association (HFA) of the ESC. Eur. Heart J. 2021, 42, 3599–3726. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  30. Bart, B.A.; Goldsmith, S.R.; Lee, K.L.; Givertz, M.M.; O’Connor, C.M.; Bull, D.A.; Redfield, M.M.; Deswal, A.; Rouleau, J.L.; LeWinter, M.M.; et al. Ultrafiltration in Decompensated Heart Failure with Cardiorenal Syndrome. N. Engl. J. Med. 2012, 367, 2296–2304. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  31. Jiang, N.; Li, L. Doubly Robust Off-Policy Value Evaluation for Reinforcement Learning. In Proceedings of the 33rd International Conference on Machine Learning, PMLR, New York, NY, USA, 20–22 June 2016; pp. 652–661. [Google Scholar]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.