Detection of Insulin Pump Malfunctioning to Improve Safety in Artificial Pancreas Using Unsupervised Algorithms

J Diabetes Sci Technol. 2019 Nov;13(6):1065-1076. doi: 10.1177/1932296819881452. Epub 2019 Oct 14.


Background: Recent development of automated closed-loop (CL) insulin delivery systems, the so-called artificial pancreas (AP), improved the quality of type 1 diabetes (T1D) therapy. As new technologies emerge, patients put increasing trust in their therapeutic devices; therefore, it becomes increasingly important to detect malfunctioning affecting such devices. In this work, we explore a new paradigm to detect insulin pump faults (IPFs) that use unsupervised anomaly detection.

Methods: We generated CL data corrupted with IPFs using the latest version of the T1D Padova/UVA simulator. From the data, we extracted several features capable to describe the patient dynamics and making more apparent suspicious data portions. Then, a feature selection is performed to determine the optimal feature set. Finally, the performance of several popular unsupervised anomaly detection algorithms is analyzed and compared on the identified optimal feature set.

Results: Using the identified optimal configuration, the best performance is obtained by the Histogram-Based Outlier Score (HBOS) algorithm, which detected 87% of the IPF with only 0.08 false positives per day on average. Isolation forest is the best algorithm that offers more conservative performances, detection of 85% of the faults but only 0.06 false positives per day on average.

Conclusion: Unsupervised anomaly detection algorithms can be used effectively to detect IPFs and improve the safety of the AP. Future studies will be dedicated to test the presented method inside dedicated clinical trials.

Keywords: anomaly detection; artificial pancreas; fault detection; insulin pump; insulin pump faults; unsupervised anomaly detection.

Publication types

  • Research Support, Non-U.S. Gov't

MeSH terms

  • Algorithms
  • Blood Glucose
  • Diabetes Mellitus, Type 1 / blood
  • Diabetes Mellitus, Type 1 / drug therapy*
  • Equipment Failure
  • Humans
  • Hypoglycemic Agents / administration & dosage*
  • Insulin / administration & dosage*
  • Pancreas, Artificial


  • Blood Glucose
  • Hypoglycemic Agents
  • Insulin