The SPATIAL Use Case 3 investigates the design, development, and integration of an accountable AI-based emergency detection into a next-generation emergency communication system. Specifically, the objective of the system developed in this use case is to automatically detect emergencies by analysing data gathered by IoT sensors with state-of-the-art AI technologies. Subsequently, after detecting an emergency, a corresponding emergency call (eCall) to a trained medical professional will be automatically initiated so that the call taker can initiate medical help immediately.
During the emergency call, both the patient and medical expert answering the call have access to all relevant data encompassing the sensor data, the decision of the employed AI models, and explanations describing why the AI model recognized an emergency in the available data. Therefore, the medical expert receiving the eCall can get a precise overview of the current situation, better instruct available first responders, and initiate the necessary medical countermeasures more effectively. As a result, the explainability and accountability features provided by the system developed in Use Case 3 can potentially improve and accelerate the entire emergency chain.
EMYNOS Next-Generation Emergency Communication System
As a foundation for the realization of the emergency communication, we will build on the results of the EU-funded H2020 EMYNOS[1] (nExt generation eMergencY commuNicatiOnS) project. The EMYNOS framework is a prototype of a so-called Next Generation 112 (NG112) emergency communication system that allows the realisation of VoIP emergency services. Compared to traditional phone-based emergency communication systems, EMYNOS offers several advantages. For example, EMYNOS allows the transmission of rich-media information during the call, such as video or geolocation. Furthermore, the IP-based infrastructure also enables the sharing of additional information, e.g. sensor data, directly with the emergency call centre during an emergency call. Therefore, the EMYNOS NG112 emergency communication system provides an excellent basis for the accountable AI-based emergency detection envisioned in Use Case 3.
Use Case 3 Architecture
The architecture of the Use Case 3 system, along with all involved actors and their interactions, are illustrated in Figure 1. In the light green and red boxes, we can see the patient (caller side) and the medical professional answering the eCall (Public Safety Answering Point – PSAP), respectively. Both use an adapted version of the OpenSource VoIP client Linphone[2] to connect to the EMYNOS network and conduct VoIP-based eCalls. In addition, we can see that relevant cardiovascular data is collected on the patient side by IoT sensors. This data is later used for AI-based detection of emergencies.
Furthermore, Figure 1 shows that the EMYNOS framework shown in blue has been integrated into the SPATIAL ecosystem and extended by two additional services—the Medical Analysis Module (MAM) and the Enhanced Interpretability Module (EIM). These services process the collected data and extend the functionality of the EMYNOS framework to perform accountable AI-based emergency detection and generation of corresponding explanations, which help users understand the decision-making of the employed models. We will briefly introduce these SPATIAL services and their functionality in the following.
Figure 1: Architecture of the system developed in Use Case 3 summarizing all relevant components, involved actors, and their interaction.
Medical Analysis Module
The Medical Analysis Module (MAM) is a REST-based service that offers powerful tools for fast and accurate medical diagnoses while enhancing accountability and transparency through the use of explainable AI (XAI) methods. It employs advanced algorithms and machine learning techniques to visualize and analyse medical data, gain insights that can aid in diagnosing various health conditions, provide accurate and reliable medical diagnoses, and explain the decision-making of the underlying ML models. This enables patients to receive faster and more reliable diagnoses while medical experts can make more informed decisions. Furthermore, the MAM provides developers with functionalities to administer ML models operating on multivariate time series data (i.e. uploading, managing, deletion) and evaluate them regarding various performance indicators (e.g. accuracy, recall, precision). Finally, the MAM also provides tools to generate local XAI explanations for the hosted ML models. The Medical Analysis Module is designed in an adaptive and modularized manner, allowing it to be easily extended to multiple medical applications. However, within the scope of SPATIAL, the provided service will be limited to the analysis of myocardial infarctions in ECG data, as we will discuss below.
MI detection capability of the developed AI models hosted at the MAM. In the context of SPATIAL, the detection of myocardial infarctions (MIs), commonly known as heart attacks, is currently being studied as the exemplary emergency scenario in Use Case 3. For this purpose, 12-lead ECG sensor data is utilized, which describes the heart’s electrical activity and allows the detection of various cardiovascular pathologies in a patient. In addition to professional clinical devices, such ECG readings can also be reliably collected by IoT sensors such as smart watches or chest bands and integrated into the Use Case 3 system.
Figure 2: Architecture of the developed 1D CNN showing convolutional (blue), dropout (yellow), pooling (green) and dense (grey) layers. In Use Case 3, this model is employed for the AI-based MI detection in provided 12-lead ECG sensor data. Further details regarding the CNN model are published in [1].
To analyse the ECGs and reliably detect indications for MIs, ML models were utilized in Use Case 3 and made available at the MAM. A CNN model was developed to precisely perform one-dimensional convolutions on the available multivariate time series ECG data. The architecture of the developed model is visualized in Figure 2. It includes four convolutional layers, two max-pooling layers, a global average pooling layer followed by a dense layer, and a probabilistic output provided by the sigmoid function. The ReLU activation is applied to all layers except the output layer. Dropout layers are added after each convolutional layer to serve as a regularization technique, helping to mitigate overfitting. The developed CNN reliably detects MIs in the PTB-XL [2] benchmarking dataset with an accuracy of 96.21%, precision of 91.55%, recall of 93.13%, and AUROC of 98.91%. The resulting CNN model is hosted at the MAM and utilized to perform the MI detection in the eCall scenario developed in Use Case 3. More details on the architecture of the CNN model, applied training processes, further performance indicators, and additional analyses were described by Knof et al. [1].
XAI explanations to increase the accountability of the system. In addition to the reliable detection of MIs, the accountability of the AI system also plays a decisive role in Use Case 3. The aim is to shed light on the decision-making of the employed AI models and explain why the models have detected indications for an MI in specific ECGs. To this end, various XAI methods are applied in Use Case 3 and provided as tools at the MAM. At its current state, the MAM supports generating local explanations using LRP [3] and SHAP [4]. The employed XAI methods aim to identify the data points most relevant to MI detection (highlighted in dark red) in the analysed ECGs. This information is then visualized as a heatmap over the ECG signal so that users can directly identify the anomalous ECG segments. Figure 3 exemplifies two investigated visualization forms for generated LRP explanations for a specific ECG. Figure 3 (a) visualizes the individual data features relevant for MI detection, while in Figure 3 (b) the importance is aggregated over time intervals. These local explanations enable medical professionals to directly identify meaningful and abnormal segments in the ECG signal, thereby understanding and verifying the model’s decision towards MI detection. Furthermore, these explanations allow end users to understand the models’ decision-making and enable developers to shed light on their inner workings, allowing them to improve them in a targeted manner.
Figure 3: Sample local explanations using the XAI method LRP [3]. In Figure (a), the individual relevant data points are identified for each lead, resulting in a fine-grained explanation of the significant points. In Figure (b), this information is used to determine the relevant time segments across the leads, enabling direct visual identification of prominent time segments.
Enhanced Interpretability Module
The second SPATIAL service utilized in Use Case 3 is the Enhanced Interpretability Module (EIM). The idea behind the EIM is motivated by the fact that explanations provided by state-of-the-art XAI methods are heavily influenced by the needs of data scientists. However, after deployment in the application domain, different stakeholders use these explanations. As interpretability is subjective and influenced by the users’ prior knowledge, the interpretability of such explanations for stakeholders with different domain knowledge becomes challenging. Therefore, the Enhanced Interpretability Module proposes an interactive interface with flexible explanations so that the user can interact with multiple levels of explanations and achieve the needed interpretability from the SPATIAL platform.
In the scope of SPATIAL, the EIM is realized as a Web-App and integrated into the Use Case 3 eCall scenario. The EIM utilizes the functionality of the MAM to enable users to easily apply and generate explanations from the available XAI methods for the hosted MI detection models. Subsequently, the EIM enhances the XAI explanations with additional meta information and descriptions on how to read and understand the provided explanations. As a result, the interpretability of the explanations is increased for users. A screenshot with a sample explanation of the latest version of the EIM is shown in Figure 4.
Figure 4: Screenshot of the Enhanced Interpretability Module, a subcomponent that provides XAI explanations for the ECG analysis and enhances them with additional meta-information and descriptions to increase users’ interpretability.
References:
[1] H. Knof, P. Bagave, M. Boerger, N. Tcholtchev, and A. Y. Ding, “Exploring CNN and XAI-based Approaches for Accountable MI Detection in the Context of IoT-enabled Emergency Communication Systems,” in Proceedings of the 13th International Conference on the Internet of Things, in IoT ’23. New York, NY, USA: Association for Computing Machinery, Mar. 2024, pp. 50–57. doi: 10.1145/3627050.3627057.
[2] P. Wagner et al., “PTB-XL, a large publicly available electrocardiography dataset,” Sci. Data, vol. 7, no. 1, p. 154, Dec. 2020, doi: 10.1038/s41597-020-0495-6.
[3] G. Montavon, A. Binder, S. Lapuschkin, W. Samek, and K.-R. Müller, “Layer-Wise Relevance Propagation: An Overview,” in Explainable AI: Interpreting, Explaining and Visualizing Deep Learning, W. Samek, G. Montavon, A. Vedaldi, L. K. Hansen, and K.-R. Müller, Eds., in Lecture Notes in Computer Science. , Cham: Springer International Publishing, 2019, pp. 193–209. doi: 10.1007/978-3-030-28954-6_10.
[4] S. M. Lundberg and S.-I. Lee, “A unified approach to interpreting model predictions,” in Proceedings of the 31st International Conference on Neural Information Processing Systems, in NIPS’17. Red Hook, NY, USA: Curran Associates Inc., Dezember 2017, pp. 4768–4777.