Personalized Adaptive Gabor Filtering with Three-Stage Semi-Supervised Domain-Adversarial Learning for Cross-Subject SSVEP Decoding
Abstract
1. Introduction
- At the feature-extraction level, we design a learnable Gabor adaptive filter bank (G-AFB) as the network front end. Unlike traditional fixed-parameter filters, G-AFB uses trainable parameters and is jointly optimized with the downstream network in an end-to-end manner. Therefore, it can learn a personalized spectral analysis strategy that best matches each user’s neural responses and extracts more discriminative features.
- At the transfer-learning level, we propose a three-stage semi-supervised domain-adversarial neural network (TriS-DANN), to address the high calibration cost in practical deployment. The framework first performs unsupervised domain-distribution pre-alignment and then uses a very small number of labeled target-domain samples for supervised fine-tuning. In this way, the model can be rapidly and efficiently adapted from existing subjects to a new user with minimal calibration data.
2. G-AFB and TriS-DANN Framework
2.1. Overall Framework
2.2. G-AFB: Learnable Gabor Adaptive Filter Bank Layer
2.2.1. Gabor Kernels and Adaptive Mechanism
2.2.2. Loss Function Regularization
- Frequency-alignment loss Lfreq: this term encourages the learned center frequencies {fs} to approach the key frequency bands {bj} associated with the SSVEP task:
- 2.
- Bandwidth-constraint loss Lbw: this term penalizes bandwidth values σs that fall outside the predefined range of [2, 15] Hz. This range was selected based on physiological plausibility and empirical tuning to balance the coverage of individual SSVEP spectral variations and the suppression of unrelated EEG noise:
- 3.
- Bandwidth-difference loss Ldiff: this term suppresses excessively large bandwidth differences among subbands and promotes smoothness in the filter bank.
| Algorithm 1. Forward Propagation and Loss Calculation of the G-AFB Layer. | |
| Input: Learnable parameters: Output: | |
| 1: | with heuristic rules |
| 2: | do |
| 3: | ) |
| 4: | |
| 5: | End For |
| 6: | |
| 7: | ) |
| 8: | ) |
| 9: | Compute prior losses: |
| 10: | |
| 11: | |
2.2.3. Integration with Downstream Networks
2.3. Three-Stage Semi-Supervised Domain Adaptation Network (TriS-DANN)
- Source-domain pre-training
- 2.
- Unsupervised domain alignment
- 3.
- Fine-tuning with a small number of labeled samples (lightweight calibration)
| Algorithm 2. Training procedure of TriS-DANN. | |
| Input: Source domain data Target domain unlabeled data Target domain labeled data (few-shot) Feature extractor Label classifier Domain classifier Output: Adapted feature extractor label classifier domain classifier Final adapted model = { } | |
| Step 1: Source-Domain Pre-training | |
| 1: | Initialize |
| 2: | For minibatch do |
| 3: | |
| 4: | |
| 5: | Compute classification loss: |
| 6: | Update by minimizing |
| 7: | End For |
| Step 2: Unsupervised Domain Adaptation | |
| 8: | For minibatch minibatch do |
| 9: | |
| 10: | Pass features through Gradient Reversal Layer (GRL) |
| 11: | |
| 12: | Compute domain loss: |
| 13: | Update to minimize (domain discrimination) |
| 14: | Update via GRL to maximize (domain confusion) |
| 15: | End For |
| (Note: frozen, only updated) | |
| Step 3: Fine-tuning with Few Labeled Samples | |
| 16: | For minibatch do |
| 17: | |
| 18: | |
| 19: | Compute fine-tuning loss: |
| 20: | Update by minimizing |
| 21: | End For |
| 22: | Return |
3. Experimental Setup and Results
3.1. Datasets
3.1.1. Public Dataset
3.1.2. In-House Dataset
3.2. Experiment 1: Validation of G-AFB Effectiveness (Within-Subject Evaluation)
3.2.1. Experimental Setup
3.2.2. Performance Evaluation on the Public Benchmark Dataset
3.2.3. Performance Evaluation on the In-House Dataset with an Idle State
3.2.4. Visual Analysis of the Individualized Filtering Mechanism of G-AFB
3.3. Experiment 2: Validation of TriS-DANN (Cross-Subject Evaluation)
3.3.1. Experimental Paradigm and Baseline Strategies
- Baseline (pre-training only): This strategy quantifies cross-subject domain differences. A model pre-trained on the source domain is directly evaluated on the target-domain test set without any target-domain adaptation. Its performance is treated as the lower bound for transfer-learning methods.
- Traditional fine-tuning (fine-tuning only): This strategy simulates conventional small-sample calibration. A source-domain pre-trained model is directly fine-tuned using 21 labeled calibration trials from the target domain.
- Fully trained within-subject benchmark: This strategy provides the empirical upper bound for evaluating the gap between lightweight calibration and ideal subject-specific training. The benchmark corresponds to the G-AFB-tCNN results from Experiment 1, where each target subject was trained using all available training data (e.g., 91 trials in the in-house dataset).
3.3.2. Performance Comparison and Analysis
3.3.3. Verification of the Domain-Distribution Alignment Mechanism
4. Discussion
4.1. Mechanism of Individualized Adaptation in G-AFB
4.2. Role of the Pre-Alignment Paradigm in Lightweight Calibration
4.3. Limitations and Future Work
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
| BCI | Brain–computer interface |
| SSVEP | Steady-state visual evoked potential |
| EEG | Electroencephalography |
| G-AFB | Gabor adaptive filter bank |
| TriS-DANN | Three-stage semi-supervised domain-adversarial neural network |
| CNN | Convolutional neural network |
| CCA | Canonical correlation analysis |
| ITR | Information transfer rate |
References
- Guo, N.; Wang, X.; Duanmu, D.; Huang, X.; Li, X.; Fan, Y.; Li, H.; Liu, Y.; Yeung, E.H.K.; To, M.K.T.; et al. SSVEP-based brain-computer interface controlled soft robotic glove for post-stroke hand function rehabilitation. IEEE Trans. Neural Syst. Rehabil. Eng. 2022, 30, 1737–1744. [Google Scholar] [CrossRef]
- Schiff, N.D.; Diringer, M.; Diserens, K.; Edlow, B.L.; Gosseries, O.; Hill, N.J.; Hochberg, L.R.; Ismail, F.Y.; Meyer, I.A.; Mikell, C.B.; et al. Brain-computer interfaces for communication in patients with disorders of consciousness: A gap analysis and scientific roadmap. Neurocrit. Care 2024, 41, 129–145. [Google Scholar] [CrossRef]
- Su, J.; Wang, J.; Wang, W.; Wang, Y.; Bunterngchit, C.; Zhang, P.; Hou, Z.-G. An adaptive hybrid brain-computer interface for hand function rehabilitation of stroke patients. IEEE Trans. Neural Syst. Rehabil. Eng. 2024, 32, 2950–2960. [Google Scholar] [CrossRef] [PubMed]
- Abdulkader, S.N.; Atia, A.; Mostafa, M.-S.M. Brain computer interfacing: Applications and challenges. Egypt. Inform. J. 2015, 16, 213–230. [Google Scholar] [CrossRef]
- Nicolas-Alonso, L.F.; Gomez-Gil, J. Brain computer interfaces, a review. Sensors 2012, 12, 1211–1279. [Google Scholar] [CrossRef] [PubMed]
- Shi, N.; Wang, L.; Chen, Y.; Yan, X.; Yang, C.; Wang, Y.; Gao, X. Steady-state visual evoked potential (SSVEP)-based brain-computer interface (BCI) of Chinese speller for a patient with amyotrophic lateral sclerosis: A case report. J. Neurorestoratol. 2020, 8, 40–52. [Google Scholar] [CrossRef]
- Na, R.; Hu, C.; Sun, Y.; Wang, S.; Zhang, S.; Han, M.; Yin, W.; Zhang, J.; Chen, X.; Zheng, D. An embedded lightweight SSVEP-BCI electric wheelchair with hybrid stimulator. Digit. Signal Process. 2021, 116, 103101. [Google Scholar] [CrossRef]
- Zhang, Y.; Qian, K.; Xie, S.Q.; Shi, C.; Li, J.; Zhang, Z.-Q. SSVEP-based brain-computer interface controlled robotic platform with velocity modulation. IEEE Trans. Neural Syst. Rehabil. Eng. 2023, 31, 3448–3458. [Google Scholar] [CrossRef] [PubMed]
- Xu, Z.; Chen, G.; Zhang, R. Boosters of the metaverse: A review of augmented reality-based brain-computer interface. Brain-Appar. Commun. 2024, 3, 2305962. [Google Scholar] [CrossRef]
- Waytowich, N.R.; Lawhern, V.J.; Garcia, J.O.; Cummings, J.; Faller, J.; Sajda, P.; Vettel, J.M. Compact convolutional neural networks for classification of asynchronous steady-state visual evoked potentials. J. Neural Eng. 2018, 15, 066031. [Google Scholar] [CrossRef] [PubMed]
- Lin, Z.; Zhang, C.; Wu, W.; Gao, X. Frequency recognition based on canonical correlation analysis for SSVEP-based BCIs. IEEE Trans. Biomed. Eng. 2006, 53, 2610–2614. [Google Scholar] [CrossRef]
- Chen, X.; Wang, Y.; Gao, S.; Jung, T.-P.; Gao, X. Filter bank canonical correlation analysis for implementing a high-speed SSVEP-based brain-computer interface. J. Neural Eng. 2015, 12, 046008. [Google Scholar] [CrossRef]
- Chen, X.; Chen, Z.; Gao, S.; Gao, X. A high-ITR SSVEP-based BCI speller. Brain Comput. Interfaces 2014, 1, 181–191. [Google Scholar] [CrossRef]
- Nakanishi, M.; Wang, Y.; Chen, X.; Wang, Y.-T.; Gao, X.; Jung, T.-P. Enhancing detection of SSVEPs for a high-speed brain speller using task-related component analysis. IEEE Trans. Biomed. Eng. 2018, 65, 104–112. [Google Scholar] [CrossRef] [PubMed]
- Zhang, Y.; Yin, E.; Li, F.; Zhang, Y.; Tanaka, T.; Zhao, Q.; Cui, Y.; Xu, P.; Yao, D.; Guo, D. Two-stage frequency recognition method based on correlated component analysis for SSVEP-based BCI. IEEE Trans. Neural Syst. Rehabil. Eng. 2018, 26, 1314–1323. [Google Scholar] [CrossRef] [PubMed]
- Roy, Y.; Banville, H.; Albuquerque, I.; Gramfort, A.; Falk, T.H.; Faubert, J. Deep learning-based electroencephalography analysis: A systematic review. J. Neural Eng. 2019, 16, 051001. [Google Scholar] [CrossRef] [PubMed]
- Wu, J.; Wang, J. An analysis of traditional methods and deep learning methods in SSVEP-based BCI: A survey. Electronics 2024, 13, 2767. [Google Scholar] [CrossRef]
- Ding, W.; Shan, J.; Fang, B.; Wang, C.; Sun, F.; Li, X. Filter bank convolutional neural network for short time-window steady-state visual evoked potential classification. IEEE Trans. Neural Syst. Rehabil. Eng. 2021, 29, 2615–2624. [Google Scholar] [CrossRef]
- Chen, J.; Zhang, Y.; Pan, Y.; Xu, P.; Guan, C. A transformer-based deep neural network model for SSVEP classification. Neural Netw. 2023, 164, 521–534. [Google Scholar] [CrossRef]
- Yao, H.; Liu, K.; Deng, X.; Tang, X.; Yu, H. FB-EEGNet: A fusion neural network across multi-stimulus for SSVEP target detection. J. Neurosci. Methods 2022, 379, 109674. [Google Scholar] [CrossRef]
- Li, Y.; Xiang, J.; Kesavadas, T. Convolutional correlation analysis for enhancing the performance of SSVEP-based brain-computer interface. IEEE Trans. Neural Syst. Rehabil. Eng. 2020, 28, 2681–2690. [Google Scholar] [CrossRef] [PubMed]
- Sathiya, E.; Rao, T.D.; Kumar, T.S. Gabor filter-based statistical features for ADHD detection. Front. Hum. Neurosci. 2024, 18, 1369862. [Google Scholar] [CrossRef] [PubMed]
- Yuan, P.; Chen, X.; Wang, Y.; Gao, X.; Gao, S. Enhancing performances of SSVEP-based brain-computer interfaces via exploiting inter-subject information. J. Neural Eng. 2015, 12, 046006. [Google Scholar] [CrossRef]
- Wong, C.M.; Wang, Z.; Rosa, A.C.; Chen, C.L.P.; Jung, T.-P.; Hu, Y.; Wan, F. Transferring subject-specific knowledge across stimulus frequencies in SSVEP-based BCIs. IEEE Trans. Autom. Sci. Eng. 2021, 18, 552–563. [Google Scholar] [CrossRef]
- Wu, D.; Xu, Y.; Lu, B. Transfer learning for EEG-based brain-computer interfaces: A review of progress made since 2016. IEEE Trans. Cogn. Dev. Syst. 2022, 14, 4–19. [Google Scholar] [CrossRef]
- Ganin, Y.; Ustinova, E.; Ajakan, H.; Germain, P.; Larochelle, H.; Laviolette, F.; March, M.; Lempitsky, V. Domain-Adversarial Training of Neural Networks. In Domain Adaptation in Computer Vision Applications; Csurka, G., Ed.; Springer: Cham, Switzerland, 2017; pp. 189–209. [Google Scholar]
- Liu, B.; Chen, X.; Li, X.; Wang, Y.; Gao, X.; Gao, S. Align and pool for EEG headset domain adaptation (ALPHA) to facilitate dry-electrode-based SSVEP-BCI. IEEE Trans. Biomed. Eng. 2022, 69, 795–806. [Google Scholar] [CrossRef]
- Kang, H.; Dong, C.; Bao, N.; Lei, D.; Liu, H.; Chen, X. A method of cross-subject transfer learning for ultra-short time SSVEP classification. In Proceedings of the 46th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Orlando, FL, USA, 15–19 July 2024; IEEE: Piscataway, NJ, USA, 2024. [Google Scholar]
- Wang, Y.; Chen, X.; Gao, X.; Gao, S. A benchmark dataset for SSVEP-based brain-computer interfaces. IEEE Trans. Neural Syst. Rehabil. Eng. 2017, 25, 1746–1752. [Google Scholar] [CrossRef]
- Chen, X.; Wang, Y.; Nakanishi, M.; Jung, T.-P.; Gao, X. Hybrid frequency and phase coding for a high-speed SSVEP-based BCI speller. In Proceedings of the 36th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Chicago, IL, USA, 26–30 August 2014; pp. 3993–3996. [Google Scholar]
- Ding, W.; Liu, A.; Chen, X.; Xie, C.; Wang, K.; Chen, X. Reducing calibration efforts of SSVEP-BCIs by shallow fine-tuning-based transfer learning. Cogn. Neurodyn. 2025, 19, 81. [Google Scholar] [CrossRef]
- Gretton, A.; Borgwardt, K.M.; Rasch, M.J.; Schölkopf, B.; Smola, A. A kernel two-sample test. J. Mach. Learn. Res. 2012, 13, 723–773. [Google Scholar]
- van der Maaten, L.; Hinton, G. Visualizing data using t-SNE. J. Mach. Learn. Res. 2008, 9, 2579–2605. [Google Scholar]












| Layer Type | Output Shape | Description |
|---|---|---|
| Input | C × T × 1 | C: Channels, T: sample points |
| G-AFB Layer | C × T × S × 1 | S: number of subbands = 4 |
| Parallel Sub-band Processing | ||
| Slicing (per subband) | C × T × 1 | Slice a single sub-band from G-AFB output |
| Conv2D | (C-7) × T × 16 | Filters = 16, Kernel = (8, 1), Padding = ‘valid’ |
| BatchNormalization | (C-7) × T × 16 | |
| Activation | (C-7) × T × 16 | elu |
| Dropout | (C-7) × T × 16 | Rate = 0.4 |
| Conv2D | (C-7) × [T/5] × 16 | Filters = 16, Kernel = (1, 5), Strides = (1, 5) |
| BatchNormalization | (C-7) × [T/5] × 16 | |
| Activation | (C-7) × [T/5] × 16 | elu |
| Dropout | (C-7) × T × 16 | Rate = 0.4 |
| Conv2D | (C-7) × ([T/5]-4) × 16 | Filters = 16, Kernel = (1, 5), Strides = (1, 5) |
| BatchNormalization | (C-7) × ([T/5]-4) × 16 | |
| Activation | (C-7) × ([T/5]-4) × 16 | elu |
| Conv2D | (C-7) × ([T/5]-4) × 64 | Filters = 64, Kernel = (1, 5), Strides = (1, 5) |
| BatchNormalization | (C-7) × ([T/5]-4) × 64 | |
| Activation | (C-7) × ([T/5]-4) × 64 | elu |
| Flatten | F | F = (C-7) × ([T/5]-4) × 64 |
| Concatenate | S × F | Concatenate features from all S sub-bands |
| Classification Head | ||
| Dense | 256 | Units = 256; activation = ‘elu’ |
| Dropout | 256 | Rate = 0.4 |
| Dense (Output) | k | Units = k(number of classes),Activation = ‘softmax’ |
| Item | Value |
|---|---|
| Operating System | Windows 11 |
| CPU | Intel(R) Core(TM) i5-12400F |
| GPU | NVIDIA GeForce RTX 4070 |
| RAM | 12 GB |
| Programming language | Python 3.9 |
| Machine Learning Platform | Tensorflow 2.7 |
| Hyperparameter | Value |
|---|---|
| Learning rate | 0.001 |
| Optimizer | Adam (momentum = 0.99) |
| Batch Size | 500 |
| Dropout Rate | 0.25 |
| Training epochs | 600 |
| L2 regularization | 0.0001 |
| Base Model | Filtering Strategy | Mean Accuracy (%) | Standard Deviation (%) | Improvement Over Original |
|---|---|---|---|---|
| Original | 77.38 | 6.23 | — | |
| tCNN | FB | 84.50 | 4.96 | +7.12 pp |
| G-AFB | 89.13 | 4.13 | +11.75 pp | |
| Original | 80.13 | 6.03 | — | |
| EEGNet | FB | 86.99 | 4.61 | +6.86 pp |
| G-AFB | 82.53 | 5.60 | +2.40 pp | |
| Original | 80.54 | 4.16 | — | |
| SSVEPFormer | FB | 84.05 | 4.48 | +3.51 pp |
| G-AFB | 84.71 | 4.74 | +4.17 pp |
| Hyperparameter | Stage 1 (Source-Domain Pre-Training) | Stage 2 (Unsupervised Adaptation) | Stage 3 (Few-Label Fine-Tuning) |
|---|---|---|---|
| Feature-extractor learning rate | 1 × 10−2 | 1 × 10−4 | 1 × 10−5 |
| Label-classifier learning rate | 1 × 10−2 | N/A (frozen) | 1 × 10−5 |
| Domain-classifier learning rate | N/A | 1 × 10−4 | N/A |
| Domain loss weight (d) | N/A | 0.5 | N/A |
| Batch size | 256 | 256 (source domain) + 256 (target domain) | 64 (target domain only) |
| Training epochs | 250 | 60 | 40 |
| Signal Length | 0.4 s | 0.6 s | 0.8 s | 1.0 s |
|---|---|---|---|---|
| Source only [25] | 60.27 ± 14.95% | 70.84 ± 16.15% | 70.36 ± 18.88% | 81.97 ± 14.44% |
| Fine-tuning only [31] | 84.57 ± 9.21% | 91.78 ± 6.05% | 93.49 ± 6.28% | 95.76 ± 5.15% |
| TriS-DANN | 86.60 ± 7.16% | 92.28 ± 5.40% | 94.67 ± 5.43% | 95.98 ± 5.11% |
| Full-data within-subject benchmark | 91.55 ± 5.44% | 94.90 ± 6.71% | 96.78 ± 5.30% | 97.26 ± 5.19% |
| Signal Length | MMD Before Adaptation | MMD After Adaptation | MMD Reduction (%) |
|---|---|---|---|
| 0.4 s | 0.0246 | 0.0206 | 16.15% |
| 0.6 s | 0.0191 | 0.0166 | 13.35% |
| 0.8 s | 0.0167 | 0.0148 | 11.39% |
| 1.0 s | 0.0162 | 0.0136 | 15.50% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Guo, J.; Pan, X.; Mi, N.; Zhang, J.; Huyan, T. Personalized Adaptive Gabor Filtering with Three-Stage Semi-Supervised Domain-Adversarial Learning for Cross-Subject SSVEP Decoding. Sensors 2026, 26, 3694. https://doi.org/10.3390/s26123694
Guo J, Pan X, Mi N, Zhang J, Huyan T. Personalized Adaptive Gabor Filtering with Three-Stage Semi-Supervised Domain-Adversarial Learning for Cross-Subject SSVEP Decoding. Sensors. 2026; 26(12):3694. https://doi.org/10.3390/s26123694
Chicago/Turabian StyleGuo, Junjun, Xiaonan Pan, Ning Mi, Jianrui Zhang, and Ting Huyan. 2026. "Personalized Adaptive Gabor Filtering with Three-Stage Semi-Supervised Domain-Adversarial Learning for Cross-Subject SSVEP Decoding" Sensors 26, no. 12: 3694. https://doi.org/10.3390/s26123694
APA StyleGuo, J., Pan, X., Mi, N., Zhang, J., & Huyan, T. (2026). Personalized Adaptive Gabor Filtering with Three-Stage Semi-Supervised Domain-Adversarial Learning for Cross-Subject SSVEP Decoding. Sensors, 26(12), 3694. https://doi.org/10.3390/s26123694

