The impact of temporal resampling on the safety of clinical reinforcement learning: A simulated trial
Organizations: University College London, London, United Kingdom · University College London Hospitals NHS Foundation Trust, London, United Kingdom
Abstract
Reinforcement learning (RL) is a type of artificial intelligence for making optimal choices. In healthcare, researchers generally use offline RL (ORL), where models are trained and evaluated from retrospective observational data. To accommodate naturally irregular clinical records, researchers often resample the data into uniform time intervals before training (known as binning). However, binning may create counterfactual trajectories that do not represent clinical practice. We first quantified these distortions in patients receiving continuous insulin infusions in the MIMIC-IV intensive care database. Binning reversed the apparent causal order for over 70% of paired glucose measurements and insulin adjustments within the same interval, and frequently masked significant dysglycaemic events and merged distinct treatment decisions together. We then conducted an in silico clinical trial using 30 virtual patients with type 1 diabetes from the FDA-approved UVA/Padova simulator. The simulator was modified to include stochastic intervals between decisions and used to generate a training dataset for offline RL. We trained three ORL algorithms on both the unprocessed dataset and equivalent datasets resampled at 10-minute, 2-hour, and 4-hour intervals. When deployed back into the simulated environment, temporal resampling was found to reduce model performance by up to 60% relative to unprocessed data, with 4-hour binning causing all agents to perform worse than the dataset's baseline. Retrospective evaluation on resampled data actively obscured this effect, predicting 1.5-3x better returns than agents achieved in practice. We recommend that future research in this area prioritises datasets with natural clinical timings between decisions, which may be a necessary step before these models can be safely deployed into patient care.
Figures & tables
| Hyperparameters | LavaGap | UVA/Padova | UVA/Padova (FQE) |
| Learning rate | |||
| Batch size | 64 | 1024 | 256 |
| Hidden dimensions | 64 | 128 | 64 |
| — discount factor | 0.99 | 0.99 | 1.0 |
| — expectile (IQL) | 0.8 | 0.9 | — |
| — temperature (IQL) | 10 | 10 | — |
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
| Paper | Date | Authors | Title | Data | Model | Evaluation | Intervals |
|---|---|---|---|---|---|---|---|
| 1 | 2016 Aug | Nemati et al. [ 71 ] | Optimal medication dosing from suboptimal clinical examples | MIMIC-II | Fitted Q-Iteration (model-free) | Retrospective evaluation only | 1 hour |
| 2 | 2017 Aug | Prasad et al. [ 12 ] | A reinforcement learning approach to weaning of mechanical ventilation in intensive care units | MIMIC-III | Fitted Q-Iteration (model-free) | Retrospective evaluation only | 10 minutes |
| 3 | 2017 Nov | Raghu et al. [ 47 ] | Continuous state-space models for optimal sepsis treatment: a deep reinforcement learning approach | MIMIC-III | Dueling Double Deep Q-Network (model-free) | Retrospective evaluation only | 4 hours |
| 4 | 2018 Jul | Lin et al. [ 72 ] | A deep deterministic policy gradient approach to medication dosing and surveillance in the ICU | MIMIC-III, Emory University | Deep Deterministic Policy Gradient (model-free) | Retrospective evaluation only | Unspecified (3 hours?) |
| 5 | 2018 Jul | Wang et al. [ 73 ] | Supervised reinforcement learning with recurrent neural network for dynamic treatment recommendation | MIMIC-III | Supervised RL with Recurrent Neural Network (model-free) | Retrospective evaluation only | 24 hours |
| 6 | 2018 Nov | Komorowski et al. [ 7 ] | The artificial intelligence clinician learns optimal treatment strategies for sepsis in intensive care | MIMIC-III, eICU | Policy Iteration (model-based) | Retrospective evaluation only | 4 hours |
| Item | Description | Page | Notes |
|---|---|---|---|
| Module 1: Study goals | |||
| 1a | Population or distribution about which the scientific claim is made. | Introduction | Offline reinforcement learning on any temporally resampled healthcare data. |
| 1b | Motivation for choosing this population or distribution (1a.). | Introduction | Explore risks to patients from decision models trained on resampled (rather than unprocessed) data. |
| 1c | Motivation for the use of ML methods in the study. | Introduction | Clinical reinforcement learning could improve healthcare decision models, but often mandates an offline training approach. |
| Module 2: Computational reproducibility | |||
| 2a | Dataset used for training and evaluating the model along with link or DOI to uniquely identify the dataset. | Methods for dataset generation | Datasets were generated uniquely by interacting with the LavaGap and UVA/Padova environments. Available at the GitHub repo below. |
Reinforcement Learning
Reinforcement learning studies how agents learn sequential decisions from rewards and interaction, balancing exploration, performance, safety, and adaptation.
See all 1,717 papers