AI Training Flaw Reverses Cause And Effect In Hospital Data
Technology

AI Training Flaw Reverses Cause And Effect In Hospital Data

Smoothing irregular medical records into uniform time intervals creates misleading training data that compromises safety.

By Asif Iqbal
Published:
Email this Article
AI Training Flaw Reverses Cause And Effect In Hospital Data
Example patient trajectories from MIMIC-IV and the UVA/Padova simulator. A) The top and bottom panels display a patient trajectory from MIMIC-IV receiving an insulin infusion, before and after temporal binning (respectively). A causal inversion artefact can be seen, where insulin was escalated in response to a spike in the blood glucose level. In the binned trajectory, this action appears to occur in response to glucose levels from the previous time window, with the glucose spike occurring after the action. B) A patient trajectory from the UVA/Padova simulator, also before and after binning. A causal inversion artefact is observed, this time in response to a carbohydrate intake. Thomas Frost et al. / PLOS Digital Health

Artificial intelligence trained on medical records to automate treatments can fail and mask its errors when fed standardized timeline data, according to a study revealing a hidden flaw in how researchers prepare data for life-saving algorithms. In a test involving virtual intensive care records and type 1 diabetes simulations, researchers discovered that smoothing out irregular medical schedules into neat hourly intervals reverses cause and effect in over seventy percent of paired events, creating a distorted reality that leads offline reinforcement learning models to make dangerous mistakes.

Reinforcement learning is a branch of artificial intelligence where computer agents learn to make sequential choices through trial and error, aiming to maximize long-term success. While online reinforcement learning allows an agent to interact directly with its environment to discover the best strategy, doing this safely in human medicine is impossible because exposing patients to risky treatments is unethical. Researchers instead rely on offline reinforcement learning, using historical datasets from electronic health records to infer better treatments for conditions ranging from sepsis to insulin delivery in diabetes.

However, clinical care is inherently irregular. A doctor might act within minutes when a patient deteriorates or wait for hours during stable periods. To simplify computer modeling, researchers frequently use a practice called temporal binning, aggregating or interpolating patient records into uniform time intervals such as one, two, or four hours. A review of fifty healthcare offline reinforcement learning studies published between 2016 and 2026 found that forty-three relied on temporally resampled datasets, despite the existence of architectures capable of processing irregular data directly.

To quantify how this preprocessing distorts training data, the study examined 12,238 patients receiving continuous intravenous insulin infusions in the MIMIC-IV intensive care database, as detailed in the work published in PLOS Digital Health. The authors identified reactive pairs where a blood glucose measurement was followed by an insulin rate adjustment. When these events occupied the same binned time window, the causal order was inverted. The post-aggregation model incorrectly viewed the insulin adjustment as the trigger for the glucose level rather than its response. This causal inversion occurred in more than seventy percent of paired events, becoming more common as time bins grew wider. Additionally, averaging multiple events within a single window masked significant episodes of dangerously low and high blood sugar.

Fig 2: Quantification of artefacts in MIMIC-IV following temporal binning. A) The proportion of causally inverted artefacts (from reactive glucose-insulin pairs that occupy the same time window) is shown to be high even with 1-hour binning, and increases monotonically with greater bin widths. B) The proportion of hypo- and hyperglycaemic events that are masked as a result of averaging blood glucose levels within each bin window. C) The proportion of bins containing 2 or more insulin adjustment decisions (which are then aggregated into a single action).
Quantification of artefacts in MIMIC-IV following temporal binning. A) The proportion of causally inverted artefacts (from reactive glucose-insulin pairs that occupy the same time window) is shown to be high even with 1-hour binning, and increases monotonically with greater bin widths. B) The proportion of hypo- and hyperglycaemic events that are masked as a result of averaging blood glucose levels within each bin window. C) The proportion of bins containing 2 or more insulin adjustment decisions (which are then aggregated into a single action). Credit: Thomas Frost et al. / PLOS Digital Health

Testing Artificial Intelligence on Virtual Patients

To evaluate how these distortions affect actual performance, the authors conducted simulations using thirty virtual patients from the FDA-approved UVA and Padova Type 1 Diabetes Simulator. They trained multiple state-of-the-art offline reinforcement learning algorithms, including implicit Q-learning and conservative Q-learning, on datasets processed in different ways. The models were then deployed in an environment featuring randomly irregular decision intervals.

Models trained on unprocessed datasets consistently achieved the highest average returns, substantially outperforming clinical baselines. Performance declined monotonically as temporal abstraction increased. Models trained on four-hour binned datasets performed up to sixty percent worse than those trained on unprocessed data. None of the models trained on resampled data improved upon the baseline performance of their training dataset.

Fig 3: Impact of temporal resampling on offline RL performance. Models trained via behavioural cloning (BC), implicit Q-learning (IQL), or conservative Q-learning (CQL) were evaluated on the UVA/Padova insulin control task. Models were trained using unprocessed, interpolated, or temporally binned datasets and deployed in both regularly and irregularly timed versions of the environment. Models trained on the unprocessed dataset consistently achieved the highest returns, which were heavily degraded using binned or interpolated datasets. The pink band indicates the expert proximal policy optimisation (PPO) baseline used to generate the training data. Average returns are normalised (0.0 for a random policy; 1.0 for the highest observed score). Shaded regions and error bars represent 95% confidence intervals (CIs).
Impact of temporal resampling on offline RL performance. Models trained via behavioural cloning (BC), implicit Q-learning (IQL), or conservative Q-learning (CQL) were evaluated on the UVA/Padova insulin control task. Models were trained using unprocessed, interpolated, or temporally binned datasets and deployed in both regularly and irregularly timed versions of the environment. Models trained on the unprocessed dataset consistently achieved the highest returns, which were heavily degraded using binned or interpolated datasets. The pink band indicates the expert proximal policy optimisation (PPO) baseline used to generate the training data. Average returns are normalised (0.0 for a random policy; 1.0 for the highest observed score). Shaded regions and error bars represent 95% confidence intervals (CIs). Credit: Thomas Frost et al. / PLOS Digital Health

Why Standard Evaluation Fails to Catch the Flaws

The investigation also examined how retrospective evaluation tools assess model quality. Using fitted Q-evaluation, a standard technique for estimating policy performance within static datasets, the authors compared predicted returns against true online performance in the irregular simulation.

While evaluation models trained on unprocessed and interpolated data showed high calibration, those trained on binned data exhibited severe overestimation bias. The evaluation methods predicted improvements of one and a half to three times for agents that actually matched or underperformed their baselines. Because the binned dataset contained counterfactual trajectories, the evaluation produced hallucinations of success rather than accurate estimates.

The authors note limitations in their work, including the simpler observation space and uniformly sampled decision intervals in the virtual environment, which may limit generalizability to complex real-world settings. They also focused exclusively on model-free algorithms. The findings highlight the need for future healthcare artificial intelligence research to move beyond default binning practices and prioritize methods that preserve natural decision intervals to ensure patient safety before clinical trials begin.

The research was published in PLOS Digital Health on November 6, 2026.

Fact Checked

This article has been fact checked for accuracy, with information verified against reputable sources. Learn more about us and our editorial process.

Last reviewed on .

Article history

  • Latest version

Reference(s)

  1. Frost, Thomas., et al. “The impact of temporal resampling on the safety of clinical reinforcement learning: A simulated trial.” PLOS Digital Health, vol. 5, no. 11, November 6, 2026, pp. e0001801 Public Library of Science (PLoS), doi: 10.1371/journal.pdig.0001801. <https://doi.org/10.1371/journal.pdig.0001801>.

Cite this page:

Iqbal, Asif. “AI Training Flaw Reverses Cause And Effect In Hospital Data.” BioScience. BioScience ISSN 2521-5760, 08 November 2026. <https://www.bioscience.com.pk/en/subject/technology/the-impact-of-temporal-resampling-on-the-safety-of-clinical-reinforcement-learning-a-simulated-trial>. Iqbal, A. (2026, November 08). “AI Training Flaw Reverses Cause And Effect In Hospital Data.” BioScience. ISSN 2521-5760. Retrieved November 08, 2026 from https://www.bioscience.com.pk/en/subject/technology/the-impact-of-temporal-resampling-on-the-safety-of-clinical-reinforcement-learning-a-simulated-trial Iqbal, Asif. “AI Training Flaw Reverses Cause And Effect In Hospital Data.” BioScience. ISSN 2521-5760. https://www.bioscience.com.pk/en/subject/technology/the-impact-of-temporal-resampling-on-the-safety-of-clinical-reinforcement-learning-a-simulated-trial (accessed November 08, 2026).
End of the article