CKD: Contrastive Knowledge Distillation for Cross-Dataset EEG Classification.

Wang, Ziwei; He, Xingyi; Wang, Hongbin; Wu, Dongrui · IEEE Trans Biomed Eng · 2026

basic_science · Level V

Where this comes from

Abstract

Cross-dataset transfer in electroencephalography (EEG)-based brain-computer interfaces (BCIs) remains challenging due to substantial distribution shifts across datasets, including differences in subjects, acquisition devices, and recording protocols. This study aims to improve cross-dataset EEG decoding by enhancing knowledge transfer beyond conventional output-level distillation. We propose a contrastive knowledge distillation (CKD) framework for cross-dataset EEG classification. CKD follows a two-stage transfer strategy, consisting of cross-dataset teacher pretraining and cross-subject online adaptation, and jointly exploits logit-level distillation and feature-level contrastive alignment. In this way, the student model is encouraged to inherit both the predictive behavior and representation structure of the teacher. Experiments on five motor imagery EEG datasets showed that CKD consistently outperformed twelve conventional training, representative knowledge distillation, and domain adaptation baselines under both single-source and multi-source transfer settings. Additional visualizations and quantitative analyses further confirmed that CKD improves teacher-student alignment in terms of feature geometry and distribution consistency, and can be further enhanced by explicit domain adaptation. The proposed CKD provides an effective solution for cross-dataset EEG decoding by jointly improving predictive knowledge transfer and latent feature alignment under severe dataset shifts. This work improves the robustness and generalizability of EEG decoding across heterogeneous datasets, which is important for practical BCI deployment under real-world acquisition conditions.