Abstract
Machine learning (ML) is revolutionizing research and industry. Many ML applications rely on the use of large amounts of personal data for training and inference. Among the most intimate exploited data sources is electroencephalogram (EEG) data, a kind of data that is so rich with information that application developers can easily gain knowledge beyond the professed scope from unprotected EEG signals, including passwords, ATM PINs, and other intimate data. The challenge we address is how to engage in meaningful ML with EEG data while protecting the privacy of users. Hence, we propose cryptographic protocols based on Secure Multiparty Computation (SMC) to perform linear regression over EEG signals from many users in a fully privacy-preserving (PP) fashion, i.e., such that each individual's EEG signals are not revealed to anyone else. To illustrate the potential of our secure framework, we show how it allows estimating the drowsiness of drivers from their EEG signals as would be possible in the unencrypted case, and at a very reasonable computational cost. Our solution is the first application of commodity-based SMC to EEG data, as well as the largest documented experiment of secret sharing based SMC in general, namely with 15 players involved in all the computations.
The Challenge of "Brain Spyware"
Brain-Computer Interfaces (BCIs) are rapidly moving from laboratory environments to consumer headsets used for gaming, wellness, and safety. However, electroencephalogram (EEG) data is inherently "leaky." Beyond measuring focus or drowsiness, raw EEG signals can inadvertently reveal sensitive personal information, such as a user’s reactions to specific faces, religious beliefs, or even ATM PINs. This vulnerability has given rise to the threat of "brain spyware."
Standard privacy techniques like anonymization are often insufficient against sophisticated linkage attacks. The central challenge is enabling collective machine learning on brain data without any single entity—including the application developer—ever accessing the raw signals.
Methodology: Privacy-Preserving Machine Learning
The researchers propose a cryptographic framework based on Secure Multiparty Computation (SMC), specifically utilizing additive secret sharing. This approach ensures that data is split into "shares" that appear as random noise to any single party, and only the final result is revealed.
Key technical components of the framework include:
- The Lynx Framework: A custom C++ library designed for privacy-preserving ML. It utilizes a "Broadcast Agent" to manage communication, optimizing network complexity from $O(m^2)$ to $O(m)$, where $m$ is the number of participants.
- Commodity-Based SMC: The system employs a "Trusted Initializer" (TI) to pre-distribute correlated random numbers offline. This allows the computationally intensive "online" phase to proceed much faster once real data is collected.
- Distributed Linear Regression: The team adapted protocols for matrix inversion (using the Newton-Raphson method) and matrix multiplication to operate over encrypted shares.
Collaborative Training Scenarios
The study addresses "horizontal partitioning," where many different users provide the same set of features. Two primary scenarios were evaluated:
- Target-Independent: Multiple "source" drivers train a global model to predict drowsiness for a new "target" driver.
- Target-Calibrated: A personalized approach where the target driver provides a small amount of calibration data to create an ensemble of models.
Performance and Accuracy
The framework was tested using a real-world EEG dataset from 15 subjects participating in a driving simulation. Each driver provided 1,200 epochs of data with 30 numerical features.
- Zero Accuracy Loss: Unlike Differential Privacy, which introduces noise, SMC is mathematically equivalent to computing on raw data. The Root Mean Square Error (RMSE) for drowsiness prediction was identical (to the third decimal place) between the encrypted SMC version and the unencrypted baseline (e.g., 0.048 RMSE).
- Scalability: This work represents the largest documented experiment of its kind, successfully coordinating 15 players in a single computation.
- Computational Efficiency: Training a model with 14 source parties (over 16,000 training examples) took approximately 350 seconds. Inference for a single user takes between 2.89 and 10 seconds, making it practical for monitoring fatigue trends.
Conclusion and Future Work
This research demonstrates that high-stakes privacy in BCI applications does not have to come at the cost of utility. While currently assuming "semi-honest" participants, future iterations aim to protect against malicious actors and optimize the protocol for the low-power processors found in mobile devices and wearable headsets. Moving beyond linear regression to complex models like Deep Neural Networks remains a significant next step for the field.
Summary updated