This EEG Looks Like These EEGs: Interpretable Interictal Epileptiform Discharge Detection With ProtoEEG-kNN
Dennis Tang, Jon Donnelly, Alina Jade Barnett, Lesia Semenova, Jin Jing, Peter Hadar, Ioannis Karakis, Olga Selioutski, Kehan Zhao, M. Brandon Westover, Cynthia Rudin · 2025
Read This EEG Looks Like These EEGs: Interpretable Interictal Epileptiform Discharge Detection With ProtoEEG-kNN by Dennis Tang, Jon Donnelly, Alina Jade Barnett, Lesia Semenova, Jin Jing, Peter Hadar, Ioannis Karakis, Olga Selioutski, Kehan Zhao, M. Brandon Westover, Cynthia Rudin (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2510-20846.txt.
Introduction
Dennis Tang leads ten co-authors on ProtoEEG-kNN, an interpretable system for spotting epileptiform discharges in brain wave recordings, a key marker of epilepsy. Even trained neurologists find these spikes hard to catch, yet most machine tools cannot explain their calls, so doctors cannot check or correct them well.
The model reasons by direct comparison, judging a new recording against similar past recordings from its training set. It shows its logic through both spike shape and scalp location, matching how experts weigh evidence. Accuracy reaches the level of leading methods while expert users prefer its explanations over rival approaches, giving clinics a tool whose reasoning can be audited case by case.
Catalog record
| CREATOR | Dennis Tang, Jon Donnelly, Alina Jade Barnett, Lesia Semenova, Jin Jing, Peter Hadar, Ioannis Karakis, Olga Selioutski, Kehan Zhao, M. Brandon Westover, Cynthia Rudin |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 23 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2510-20846
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
This EEG Looks Like These EEGs: Interpretable Interictal Epileptiform Discharge Detection With ProtoEEG-kNN Dennis Tang, Jon Donnelly, Alina Jade Barnett, Lesia Semenova, Jin Jing, Peter Hadar, Ioannis Karakis, Olga Selioutski, Kehan Zhao, M. Brandon Westover, Cynthia Rudin Abstract The presence of interictal epileptiform discharges (IEDs) in electroencephalogram (EEG) recordings is a critical biomarker of epilepsy. Even trained neurologists find detecting IEDs difficult, leading many practitioners to turn to machine learning for help. While existing machine learning algorithms can achieve strong accuracy on this task, most models are uninterpretable and cannot justify their conclusions. Absent the ability to understand model reasoning, doctors cannot leverage their expertise to identify incorrect model predictions and intervene accordingly. To improve the human-model interaction, we introduce ProtoEEG-kNN, an inherently interpretable model that follows a simple case-based reasoning process. ProtoEEG-kNN reasons by comparing an EEG to similar EEGs from the training set and visually demonstrates its reasoning both in terms of IED morphology (shape) and spatial distribution (location). We show that ProtoEEG-kNN can achieve state-of-the-art accuracy in IED detection while providing explanations that experts prefer over existing approaches. 1 Introduction Epilepsy, a chronic neurological disorder characterized by recurring seizures, affects approximately 50 million people worldwide [ 30 ] . Epilepsy significantly impairs quality of life, increases risk for injuries, and reduces life expectancy when inadequately managed. To diagnose epilepsy, clinicians look for electrophysiological events known as interictal epileptiform discharges (IEDs) in electroencephalogram (EEG) recordings. However, identifying IEDs among benign variations in brain activity is difficult, with disagreement being common even among trained neurologists [ 22 ] . To help diagnose epilepsy, clinicians and researchers have recently turned to deep learning methods to create models that reliably detect IED spikes [ 2 ] . However, despite achieving accurate IED detection, many of these models are uninterpretable – providing no insight into how decisions are made. This paradigm is problematic because when a practitioner disagrees with a model, there is no way to check the model’s reasoning for validity. In contrast, interpretable models – models designed to explain the reasoning behind their decisions – allow practitioners to assess model predictions and incorporate machine learning insights into the diagnostic process. One such model is the Prototypical Part Network (ProtoPNet) [ 35 ] , a family of interpretable neural networks that achieve accuracy on par with black box models on complex tasks. However, existing ProtoPNets are ill-equipped to handle the unique challenges of the EEG domain. Specifically, they are unable to handle uncertain labels, cannot capture the complex interplay between spatial relationships (IED location) and morphological patterns (IED shape) that characterize IEDs [ 21 , 28 ] , and struggle to learn semantically meaningful prototypes due to the extreme variability among IEDs. To address these challenges, we introduce ProtoEEG-kNN, an interpretable IED-detection model that achieves state-of-the-art accuracy. Our model learns an effective EEG comparison space by training a ProtoPNet with a new similarity metric that incorporates selected interpretable statistical features (ISFs) and specialized spatial reasoning. Once this space is learned, we alter ProtoEEG-kNN to use k-Nearest Neighbors (kNN) reasoning over these learned embeddings, providing intuitive comparisons of the form “This IED-containing EEG looks like these IED-containing EEGs,” (Fig. 1 (Top)) with coverage over the extreme diversity of IEDs. Specifically, our contributions are: (1) We adapt ProtoPNet into a kNN based probabilistic classification model and update the loss terms to reflect training under uncertain labels. (2) We define a new similarity metric that aligns our model’s notion of EEG similarity with clinical practice by capturing both spike morphology and spatial distribution patterns. (3) We use channel masking to calculate channel-wise weights that allow the model to prioritize computations on medically relevant channels while revealing the spatial focus of the model’s attention across the EEG. 2 Related Works There has been a dramatic increase in interest in IED detection using machine learning models [ 2 ] , resulting in a wide variety of uninterpretable predictive approaches. Generally, IED detection operates at either the channel-level [ 6 , 7 , 5 ] or by analyzing entire EEGs at once [ 3 , 29 , 4 ] . Figure 1 : Top: ProtoEEG-kNN reasoning. The topographic map (“topoplot”) highlights important channels as calculated by the channel-wise weights ( w_{c}(x) ), which are also shown in bars to the left of the input channels. From left to right, we show the input sample, the best two matches selected by our model, and the best matches chosen by each of three ablated models. Middle: ProtoEEG-kNN architecture. An input is passed through the backbone f to produce a embedding. The Global Comparison Layer \bar{g} computes the similarity between the embedding and each sample in the training set. The final prediction produced by \bar{h} is the average label from the top-k most similar neighbors. Bottom: channel-wise similarity. The similarity along each channel is weighted by w_{c}(\mathbf{x}) . In computer vision, a large body of work has emerged around interpretable neural networks, based on the Prototypical Part Network (ProtoPNet) [ 35 ] . ProtoPNet provides an interpretable alternative to traditional neural networks by forming predictions using a series of comparisons to learned prototypical parts. A ProtoPNet can explain its predictions by saying “this image is of class A because it looks like this prototype from class A”. Of particular interest to this work, Ukai et al. [ 38 ] introduce ProtoKNN, which performs kNN-style classification over the vector of prototype similarities. This is different from our kNN approach, in which we use a specialized similarity metric to compute the similarity between an input and each training sample. Several papers have applied ProtoPNet style reasoning to IED detection [ 10 , 20 , 19 ] . In Gao et al. [ 20 ] , ProtoPNet is applied to IED detection, while Gao et al. [ 19 ] extends this work to “multi-scale” prototypes of varying lengths. However, both are limited to single channel comparisons, thus failing to consider the spatial distribution of spikes, an important factor in how experts identify IEDs [ 21 , 28 ] . In contrast, Tang et al. [ 10 ] , represents prototypes as full EEGs, but convolve every channel together, which keeps their model from providing channel-level interpretability. Additionally, Lopez et al. [ 18 ] and Ozcan et al. [ 17 ] apply post-hoc methods to explain black-box IED detection models, but these explanations are not necessarily faithful to how a model actually makes decisions, and may be misleading [ 25 , 12 ] . 3 Methods Notation and Setup. We denote our training dataset \mathcal{D}:=\{\mathbf{x}_{i},y_{i}\}_{i=1}^{N}, where \mathbf{x}_{i}\in\mathbb{R}^{C\times T} , C is the number of channels in the EEG and T is the length (1 second sampling 128 Hz), and y_{i}\in\{0/v,1/v,\dots,1\} (in our case, v=8 ). We treat this as a probabilistic classification problem because expert annotators often disagree on labels for this task (in 80.68\% of samples in our dataset). Our model architecture is inspired by that of ProtoPNet [ 35 ] , and we train a specialized ProtoPNet to shape the latent space before replacing the learned prototype layer with a kNN module. During training, the architecture of our model consists of a feature extraction backbone f:\mathbb{R}^{C\times T}\rightarrow\mathbb{R}^{L\times C} , prototype layer g:\mathbb{R}^{L\times