Source-linked AI summary
EEG-TCNet: An Accurate Temporal Convolutional Network for Embedded Motor-Imagery Brain-Machine Interfaces
Thorir Mar Ingolfsson, Michael Hersche, Xiaying Wang, Nobuaki Kobayashi, Lukas Cavigelli, Luca Benini
TL;DR
MI-BMI systems need accurate EEG decoding without the memory and computation demands that hinder embedded deployment. The paper introduces EEG-TCNET, combining compact EEGNet-style feature extraction with TCN temporal modeling and subject-specific hyperparameter selection. It reports strong results on BCI Competition IV-2a and MOABB, including higher accuracy and a positive benchmark meta-effect.
Problem
Accurate MI-EEG decoding is difficult because of low signal-to-noise ratio and high variance among subjects, while accurate models can exceed low-power MCU resource limits.
Method
EEG-TCNET combines shallow EEGNet feature extraction with a temporal convolutional network using dilated convolutions, optionally optimizing hyperparameters per subject.
Results
A meta-effect of 0.25 on MOABB shows EEG-TCNET outperforms the current state-of-the-art; on BCI Competition IV-2a, variable EEG-TCNET reaches 83.84% accuracy.
Takeaways & Limitations
EEG-TCNET offers accurate MI-BMI classification with low parameter, MAC, and memory requirements and generalizes across multiple MI datasets.
Abstract
from arXiv · showhide
In recent years, deep learning (DL) has contributed significantly to the improvement of motor-imagery brain-machine interfaces (MI-BMIs) based on electroencephalography(EEG). While achieving high classification accuracy, DL models have also grown in size, requiring a vast amount of memory and computational resources. This poses a major challenge to an embedded BMI solution that guarantees user privacy, reduced latency, and low power consumption by processing the data locally. In this paper, we propose EEG-TCNet, a novel temporal convolutional network (TCN) that achieves outstanding accuracy while requiring few trainable parameters. Its low memory footprint and low computational complexity for inference make it suitable for embedded classification on resource-limited devices at the edge. Experimental results on the BCI Competition IV-2a dataset show that EEG-TCNet achieves 77.35% classification accuracy in 4-class MI. By finding the optimal network hyperparameters per subject, we further improve the accuracy to 83.84%. Finally, we demonstrate the versatility of EEG-TCNet on the Mother of All BCI Benchmarks (MOABB), a large scale test benchmark containing 12 different EEG datasets with MI experiments. The results indicate that EEG-TCNet successfully generalizes beyond one single dataset, outperforming the current state-of-the-art (SoA) on MOABB by a meta-effect of 0.25.
I. INTRODUCTION
MI-BMI decoding remains difficult because EEG has low signal-to-noise ratio and substantial subject variability, while accurate deep models can exceed embedded-device resources. EEG-TCNET combines EEGNet-like compactness with TCN-based temporal modeling and achieves strong accuracy with low inference cost.
- MI-EEG decoding is challenging because of low signal-to-noise ratio and high inter-subject variance, which limits use of one model for all subjects.
- EEG-TCNET combines the compactness of EEGNet with the high accuracy of temporal convolutional networks.
- 6.8 MMACs per inference and 4272 trainable parameters make EEG-TCNET suitable for resource-limited embedded devices.
- 77.35% accuracy is achieved on BCI Competition IV-2a, with fewer parameters, MACs, and inference memory than similarly accurate networks.
- 83.84% accuracy results from a 6.49% improvement using subject-specific hyperparameters selected by grid search with training-data cross-validation.
- A meta-effect of 0.25 indicates that EEG-TCNET outperforms the current state-of-the-art on the MOABB benchmark.
II. BACKGROUND
The paper uses two benchmark resources: BCI Competition IV-2a, a four-class, two-session EEG dataset from nine subjects, and MOABB, an aggregation intended to improve reproducible BMI evaluation. MOABB standardizes access to diverse datasets and supports algorithm comparison.
- BCI Competition IV-2a contains recordings from nine subjects using 22 EEG electrodes and four imagined movement classes.
- The dataset uses 0.5–100 Hz bandpass filtering, 250 Hz sampling, and separate sessions for training and testing.
- MOABB aggregates publicly available EEG datasets into a common format and software package.
- MOABB addresses reproducibility problems caused by unpublished code and inconsistently reported preprocessing, toolboxes, and implementation details.
- MOABB provides extensive MI and ERP datasets, algorithm rankings, and a website for comparing available solutions.
C. Related Work
Related work spans handcrafted-feature pipelines and raw-signal CNNs, with accuracy and model size varying substantially. TCNs provide an architectural alternative using dilated convolutions to expand temporal receptive fields efficiently.
- FBCSP achieved 67.75% accuracy, while later Riemannian, highway-network, random-forest, and binary-classifier combinations reached 75.74%–81.02%.
- EEGNet and Shallow ConvNet achieved 66.70% and 74.31% accuracy with 1716 and 47 324 trainable parameters, respectively.
- MSFBCNN uses multi-scale temporal convolution and achieves 75.80% accuracy, while variable DFFN reaches 79.71%.
- TPCT reaches 88.87% accuracy but requires 7.78 M parameters and 1.73 GMACs per inference.
- TCN architecture diagrams show stacked residual blocks with dilated convolutions, including kernel size KT = 2 and dilation values d = {1, 2}.
D. Temporal Convolutional Networks
Temporal convolutional networks preserve sequence length and causal ordering while expanding their receptive field efficiently through dilated convolutions.
- Causal Convolutions: TCNs use fully convolutional layers and zero-padding to produce outputs with the same length as their inputs.Causal convolutions ensure that the output at time t depends only on inputs from time t and earlier.
- Causal Convolutions: Causal convolutions restrict each output time step to the current and preceding inputs, preventing information flow from the future.
- Dilated Convolutions: Dilated convolutions expand the receptive field exponentially with network depth, unlike regular causal convolutions, which expand it linearly.This provides larger temporal context without requiring an extremely deep network or a huge kernel size.
3) Residual Blocks:
EEG-TCNet uses residual TCN blocks to process temporal feature maps, enlarge temporal context, and retain information through skip connections while modifying several normalization and regularization choices.
- Residual Blocks: Residual TCN blocks contain two dilated-convolution layers with batch normalization, nonlinear activation, and dropout between the convolutions.
- Residual Blocks: Skip connections add each block’s input to its output, using a 1x1 convolution when their depths differ.
- Residual Blocks: Stacking residual blocks increases the receptive field exponentially because each subsequent block uses exponentially larger dilation.The receptive field is determined by the TCN kernel size KT and the number of residual blocks L.
- Residual Blocks: EEG-TCNet uses batch normalization instead of weight normalization because batch normalization produced higher accuracy in cited large-scale networks.
- Residual Blocks: The model uses ELU rather than ReLU and normal dropout rather than spatial dropout in the TCN module.The paper reports better performance with ELU and motivates element-wise dropout because adjacent feature-map frames are not strongly correlated.
III. METHODOLOGY
EEG-TCNet combines EEGNet-inspired feature extraction with a temporal convolutional network to exploit temporal information, using either global or subject-specific hyperparameters.
- Methodology: EEG-TCNet combines shallow EEGNet-inspired feature-extraction layers with a TCN to use temporal information retained in the extracted features.
- Methodology: The input spans 4.5 seconds, from 0.5 seconds before the motor-imagery cue through the end of the imagery period, yielding 1125 samples at 250 Hz.
- Methodology: The network learns temporal frequency filters, frequency-specific spatial filters, and separable temporal summaries before the TCN further exploits temporal information.
- Methodology: The TCN expands F2 feature maps to FT maps, stacks L residual blocks with receptive field size RFS ≥17, and classifies the final time steps.
- Methodology: A global cross-validated grid search selected F1 = 8, F2 = 16, KE = 32, KT = 4, L = 2, FT = 12, pe = 0.2, pt = 0.3, with standardization.
1) Fixed
The fixed EEG-TCNet configuration uses one globally selected architecture and a common training procedure for all subjects.
- Fixed: The fixed setting applies the same network and hyperparameter configuration to every subject.The supplied passages identify this section as the fixed configuration and contrast it with subject-specific optimization.
- Fixed: TABLE II presents the EEG-TCNet architecture used for the fixed configuration.
- Fixed: The architecture notation includes C, T, F1, F2, KE, KT, FT, pe, and pt for channel, time, filter, kernel, and dropout settings.
- Fixed: Models use categorical cross-entropy and Adam with learning rate 0.001, batch size 64, and 750 training epochs.
IV. EXPERIMENTAL RESULTS
The evaluation uses classification accuracy and Cohen’s κ-score, while also measuring inference complexity and memory footprint under an 8-bit quantization assumption.
- Classification accuracy is the ratio of correctly classified trials to all test-set trials.
- Cohen’s κ-score measures agreement beyond the hypothetical probability of chance agreement or random classification.
- Inference complexity is assessed by reporting each model’s trainable parameters and multiply-accumulate operations.
- Memory footprint is defined as the size of the two largest consecutive feature maps during inference.
- The analysis assumes feature maps and weights can be quantized to 8 bits with negligible accuracy loss.
B. BCI Competition IV-2a
On BCI Competition IV-2a, EEG-TCNET combines strong accuracy with low computational and memory requirements, while subject-specific tuning further improves performance and preserves favorable efficiency trade-offs.
- Fixed networks: 77.35% accuracy and a κ-score of 0.70 were achieved across nine subjects by fixed EEG-TCNET.Its accuracy improved 4.95% over EEGNet, with lower cross-subject accuracy variability.
- Variable networks: 83.84% accuracy was achieved by variable EEG-TCNET after adding subject-specific hyperparameters, a 6.49% improvement.Variable EEG-TCNET also outperformed variable DFFN by 4.13%.
- Subject-specific configurations: Variable EEG-TCNET generally used fewer temporal filters and a smaller temporal filter size than EEGNet.Except for Subject 2, it generally used data standardization, whereas variable EEGNet used raw data.
- Efficiency comparison: TPCT reached 88.87% accuracy but required 380× more parameters and 143× more MACs than variable EEG-TCNET.
- Embedded deployment: EEG-TCNet required 400 kB of memory and approximately 197 ms per inference, compared with TPCT’s 8.304 MB and approximately 50 s.The paper identifies EEG-TCNET and variable EEG-TCNET as the best embedded implementation candidates.
- Efficiency trade-offs: EEG-TCNET achieved Pareto optimality across the parameter and MAC comparisons by spanning almost the entire Pareto front.
C. Mother of All BCI Benchmarks
On MOABB, EEG-TCNET is compared with established pipelines using meta-analysis across datasets, and the reported results show broad performance advantages over the benchmark’s current state-of-the-art.
- Benchmark setup: The MOABB comparison includes CSP + LDA, TS + optSVM, and AM + optSVM alongside EEG-TCNET and EEGNet.
- Meta-analysis: The meta-effect combines standardized mean differences across all datasets with weights based on the square root of the number of subjects.
- Results: 0.25 was the final meta-effect for EEG-TCNET versus TS + optSVM, with the overall trend favoring EEG-TCNET.
- Results: EEG-TCNET outperformed all other methods in the reported MOABB comparisons and became the framework’s new state-of-the-art.The experiment indicates generalization beyond the single MI dataset used for modeling.
V. CONCLUSION
The paper concludes that EEG-TCNET provides accurate MI-BMI classification with low inference resource requirements, and that subject-specific tuning and MOABB evaluation strengthen its reported performance.
- 77.35% accuracy was achieved on BCI Competition IV-2a, improving the state of the art among similarly sized networks by 4.95%.
- 83.84% accuracy was reached after subject-specific hyperparameter search, adding 6.49% accuracy.
- EEG-TCNET used few parameters, MACs, and memory during inference, supporting operation on low-power resource-limited edge devices.
- On MOABB, EEG-TCNET generalized to other MI datasets and became the new state of the art with a final meta-effect of 0.25.