HCFT: A Hierarchical Convolutional Fusion Transformer for Cross-Task EEG Decoding.
Abstract
Electroencephalography (EEG) decoding remains challenging due to the non-stationary nature of neural signals and the limited generalization of existing models across tasks and subjects. To address this challenge, we propose a lightweight and generalizable decoding framework named Hierarchical Convolutional Fusion Transformer (HCFT), which combines dual-branch convolutional encoders and hierarchical Transformer blocks for multi-scale EEG representation learning. Specifically, the model first captures local temporal and spatiotemporal dynamics through time-domain and time space convolutional branches, and then aligns these features via a cross-attention mechanism that enables interaction between branches at each stage. Subsequently, a hierarchical Transformer fusion structure is employed to encode global dependencies across all feature stages. A task-adaptive stabilization strategy of Dynamic Tanh normalization is introduced to enhance transient feature detection and training stability. Extensive experiments are conducted on two representative cross-task benchmark datasets, BCI Competition IV-2b and CHB-MIT, covering both event-related classification and continuous seizure prediction tasks. Results show that HCFT achieves 80.83% average accuracy and a Cohen's kappa of 0.6165 on BCI IV 2b, as well as 99.10% sensitivity, 0.0236 false positives per hour, and 98.82% specificity on CHB-MIT, consistently outperforming over ten state-of-the-art baseline methods. Ablation studies confirm the effect of each core component of the proposed framework. The model also exhibits strong cross-subject generalization and structural interpretability, offering a scalable and versatile framework for advancing general-purpose neural decoding systems.