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.
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.

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.

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.
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)
- 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:
- Posted by Asif Iqbal