Quantitative Regular Expressions for Arrhythmia Detection Algorithms
Motivated by the problem of verifying the correctness of arrhythmia-detection algorithms, we present a formalization of these algorithms in the language of Quantitative Regular Expressions. QREs are a flexible formal language for specifying complex numerical queries over data streams, with provable runtime and memory consumption guarantees. The medical-device algorithms of interest include peak detection (where a peak in a cardiac signal indicates a heartbeat) and various discriminators, each of which uses a feature of the cardiac signal to distinguish fatal from non-fatal arrhythmias. Expressing these algorithms’ desired output in current temporal logics, and implementing them via monitor synthesis, is cumbersome, error-prone, computationally expensive, and sometimes infeasible.
In contrast, we show that a range of peak detectors (in both the time and wavelet domains) and various discriminators at the heart of today’s arrhythmia-detection devices are easily expressible in QREs. The fact that one formalism (QREs) is used to describe the desired end-to-end operation of an arrhythmia detector opens the way to formal analysis and rigorous testing of these detectors’ correctness and performance. Such analysis could alleviate the regulatory burden on device developers when modifying their algorithms. The performance of the peak-detection QREs is demonstrated by running them on real patient data, on which they yield results on par with those provided by a cardiologist.
KeywordsPeak Detection Electrocardiograms Arrythmia discrimination ICDs Quantitative Regular Expressions
The authors would like to thank Konstantinos Mamouras for insightful discussions about QREs and for providing the QRE Java library we used in this paper. This work is supported in part by AFOSR Grant FA9550-14-1-0261 and NSF Grants IIS-1447549, CNS-1446832, CNS-1446664, CNS-1445770, and CNS-1445770, and Austrian National Research Network grants S 11405-N23 and S 11412-N23 (RiSE/SHiNE of the FWF) and the ICT COST Action IC1402 Runtime Verification beyond Monitoring.
- 2.Alur, R., Freilich, A., Raghothaman, M.: Regular combinators for string transformations. In: Proceedings of the Joint Meeting of the Twenty-Third EACSL Annual Conference on Computer Science Logic (CSL) and the Twenty-Ninth Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), CSL-LICS 2014, pp. 9:1–9:10. ACM, New York (2014)Google Scholar
- 7.Bufo, S., Bartocci, E., Sanguinetti, G., Borelli, M., Lucangelo, U., Bortolussi, L.: Temporal logic based monitoring of assisted ventilation in intensive care patients. In: Margaria, T., Steffen, B. (eds.) ISoLA 2014. LNCS, vol. 8803, pp. 391–403. Springer, Heidelberg (2014). doi: 10.1007/978-3-662-45231-8_30 Google Scholar
- 9.D’Angelo, B., Sankaranarayanan, S., Sánchez, C., Robinson, W., Finkbeiner, B., Sipma, H.B., Mehrotra, S., Manna, Z.: LOLA: runtime monitoring of synchronous systems. In: Proceedings of the 12th International Symposium of Temporal Representation and Reasoning (TIME 2005), pp. 166–174. IEEE Computer Society Press (2005)Google Scholar
- 13.Haghighi, I., Jones, A., Kong, Z., Bartocci, E., Grosu, R., Belta, C.: Spatel: a novel spatial-temporal logic and its applications to networked systems. In: Proceedings of HSCC 2015: The 18th International Conference on Hybrid Systems: Computation and Control, pp. 189–198. ACM (2015)Google Scholar
- 14.Harel, E., Lichtenstein, E., Pnueli, A.: Explicit clock temporal logic. IEEE (1990)Google Scholar
- 20.Mamouras, K., Raghothaman, M., Alur, R., Ives, Z., Khanna, S.: StreamQRE: modular specification and efficient evaluation of quantitative queries over streaming data. In: Proceedings of 38th ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 693–708 (2017)Google Scholar