TL;DR
This paper introduces an explainable machine learning model for recognizing human activities (resting, walking, working, and reading) using EEG data. By integrating LIME (Local Interpretable Model-Agnostic Explanations), the model not only achieves good classification accuracy but also provides insights into which EEG features are most important for distinguishing between activities, making it more clinically relevant.
What Problem Does This Paper Address?
Human Activity Recognition (HAR) is a crucial field for applications ranging from healthcare to smart environments. While traditional HAR systems often rely on sensors like accelerometers and gyroscopes, these methods struggle to capture cognitive states or subtle neurological changes. Electroencephalography (EEG) offers a direct window into brain activity, making it promising for HAR. However, many machine learning models used for EEG-based HAR are "black boxes," making it difficult for clinicians or users to understand why a particular activity was recognized. This lack of interpretability hinders trust and adoption, especially in sensitive areas like patient monitoring and rehabilitation. This paper aims to bridge this gap by developing an interpretable EEG-based HAR system.
Methods
The study employs a multi-stage approach:
- EEG Data Acquisition: EEG data was collected from 75 healthy adults using a six-channel system (Fz, Oz, C1, C2, T7, T8) during four distinct activities: resting, walking, working, and reading. Auxiliary EMG and EOG signals were also recorded to help identify and remove artifacts.
- Pre-processing: Raw EEG data underwent artifact removal using Independent Component Analysis (ICA) and filtering (band-stop for 60 Hz noise, band-pass for 0.5-44 Hz). Signal-to-noise ratio (SNR) was used to discard low-quality epochs.
- Feature Extraction: The Welch periodogram method was used to extract EEG frequency-specific waveforms (delta, theta, alpha, beta, gamma). From these, various features were computed, including relative power (RP), pairwise-derived brain symmetry index (pdBSI), delta-alpha ratio (DAR), delta-theta ratio (DTR), and delta+theta/alpha+beta ratio (DTABR).
- Feature Selection: To manage the high dimensionality of EEG data, the SelectKBest method was used to identify the top 20 most relevant EEG features for classification.
- Machine Learning Classification: Three ensemble machine learning models were trained and evaluated: Random Forest (RF), Gradient Boosting (GBoost), and Extreme Gradient Boosting (XGBoost). These models were chosen for their effectiveness in classification tasks.
- Explainable AI (XAI): The Local Interpretable Model-Agnostic Explanations (LIME) framework was applied to interpret the predictions of the trained ML models. LIME explains individual predictions by approximating the black-box model locally with an interpretable model, highlighting the most influential features for a given prediction.
Datasets
The study utilized a newly collected EEG dataset from 75 healthy adults performing four activities: resting, walking, working, and reading. The dataset comprises 793 instances of reading, 408 of walking, 267 of working, and 243 of resting data. This dataset was split into 80% for training and 20% for testing. No pre-existing public datasets were explicitly mentioned as being used for training or comparison.
Key Insights and Ideas
- EEG is a viable sensor for cognitive HAR: The study demonstrates that EEG can effectively distinguish not only physical activities (walking, working) but also cognitive tasks (reading) from resting states, a feat challenging for IMU-based systems.
- LIME bridges the interpretability gap: The integration of LIME is a key contribution, transforming complex ML models into understandable tools. It allows researchers and clinicians to see which specific EEG frequency bands and electrode locations are driving the classification, fostering trust and clinical utility.
- Specific EEG rhythms correlate with activities: The LIME visualizations reveal that different EEG spectral bands and their localization (e.g., frontal alpha, central gamma) are consistently associated with specific activities, providing neurophysiological grounding for the model's predictions.
- Feature importance varies by activity: The study highlights that the most influential EEG features differ across activities. For instance, frontal alpha and beta rhythms are crucial for reading, while frontal theta and occipital alpha are important for walking.
Key Results
- Classification Performance: The Random Forest (RF) classifier achieved the highest accuracy of 80.33%, with a precision, recall, and F1-score of 81% for classifying the four activities. Gradient Boosting and XGBoost also performed comparably, with accuracies around 78-79%.
- LIME Explanations:
- For reading, lower central gamma, lower frontal alpha, and lower frontal beta rhythms were found to be most contributing.
- For resting, lower temporal theta, lower central beta, and higher central alpha waves, along with higher pdBSI, significantly impacted predictions.
- For walking, higher frontal theta, higher occipital alpha, and higher central beta bands contributed most.
- For working, higher central and global gamma, and lower central beta rhythms were most influential.
Limitations and Future Work
- Dataset Size and Diversity: The study used a dataset of 75 healthy individuals. While this is a reasonable starting point, a larger and more diverse dataset, including individuals with neurological conditions, would enhance generalizability.
- Clinical Validation: The study focused on healthy individuals. Future work should involve validating the model and its explanations in clinical settings with patients undergoing rehabilitation or monitoring.
- Consumer-Grade EEG: The study used clinical EEG. Expanding research to consumer-grade EEG devices could pave the way for more accessible real-life HAR applications.
- Multimodal Integration: The authors plan to expand their research by incorporating multimodal wearable biosensors, which could further improve HAR accuracy and robustness.
- High-Density EEG: For a more comprehensive understanding of complex daily activities, the authors suggest the use of high-density EEG in future studies.
Summary updated