Electroencephalography (EEG) classification plays a key role in brain-computer interface (BCI) systems, yet it remains challenging due to the low signal-to-noise ratio, temporal variability of neural responses, and limited data availability. In this paper, we present a comparative study of deep learning architectures for classifying event-related potentials (ERPs) in EEG signals. The preprocessing pipeline includes bandpass filtering, spatial filtering, and normalization. We design and compare three main pipelines: a 2D convolutional neural network (CNN) using Common Spatial Pattern (CSP), a second 2D CNN trained directly on raw data for a fair comparison, and a 3D CNN that jointly models spatiotemporal representations. To address ERP latency variations, we introduce a temporal shift augmentation strategy during training. At inference time, we employ a confidence-based test-time voting mechanism to improve prediction stability across shifted trials. An experimental evaluation on a stratified five-fold cross-validation protocol demonstrates that while CSP provides a benefit to the 2D architecture, the proposed 3D CNN significantly outperforms both 2D variants in terms of AUC and balanced accuracy. These findings highlight the effectiveness of temporal-aware architectures and augmentation strategies for robust EEG signal classification.
Figures & tables
Figure 1: Images of targets (top) and non-target (bottom).
F7
F3
Fz
F4
F8
FC5
FC1
-
FC2
FC6
T7
C3
Cz
C4
T8
CP5
CP1
-
CP2
CP6
P7
P3
Pz
P4
P8
-
PO3
-
PO4
-
-
O1
Oz
O2
-
Table 1: 2D sensor layout.
Layer
Filter/Units
Output Shape
Remarks
Input
–
C×T×1
CSP/Non-CSP input
Conv2D
1×10 , F=8
C×T′×8
Temporal
ReLU + BN
–
same
–
Conv2D
C×1 , F=16
1×T′×16
Spatial
ReLU + BN
–
same
–
Conv2D
1×10 , F=32
1×T′′×32
Full 2D
Table 2: Baseline 2D CNN (ReLU + Cross-Entropy)
Layer
Filter/Units
Output Shape
Remarks
Input
–
C×T×1
CSP/Non-CSP input
Conv2D
1×10 , F=8
C×T′×8
Temporal
GELU + BN
–
same
–
Conv2D
C×1 , F=16
1×T′×16
Spatial
GELU + BN
–
same
–
Conv2D
1×10 , F=32
1×T′′×32
Full 2D
Table 3: Improved 2D CNN (GELU + Focal Loss)
Layer
Filter/Units
Output Shape
Remarks
Input
–
C×T×1
CSP/Non-CSP input
Conv2D
1×10 , F=8
C×T′×8
Temporal
GELU + BN
–
same
–
Conv2D
C×1 , F=16
1×T′×16
Spatial
GELU + BN
–
same
–
Conv2D
1×10 , F=32
1×T′′×32
Full 2D
Table 4: 2D CNN with Global Average Pooling
Layer
Details
Output Shape
Remarks
Input
–
C×T×1
CSP/Non-CSP input matrix
Conv2D
1×10 , F=8
C×T′×8
Temporal filtering
GELU + BN
–
same
Nonlinear activation and normalization
Conv2D
C×1 , F=16
1×T′×16
Spatial filtering
GELU + BN
–
same
–
Conv2D
1×10 , F=32
1×T′′×32
Full feature integration
Table 5: 2D CNN with Squeeze-and-Excitation (SE) Block
Layer
Filter/Units
Output Shape
Remarks
Input
–
C×T×1
CSP/Non-CSP input
Conv2D
1×10 , F=8
C×T′×8
Temporal
Swish + BN
–
same
–
Conv2D
C×1 , F=16
1×T′×16
Spatial
Swish + BN
–
same
–
Conv2D
1×10 , F=32
1×T′′×32
Full 2D
Table 6: 2D CNN with Swish Activation
Layer
Filter/Units
Output Shape
Remarks
Same as GELU model
–
same
Only loss function changed
Loss
WCE
–
Uses inverse class frequency
Table 7: 2D CNN with Weighted Cross-Entropy Loss
Layer
Filter Size / Units
Output Shape
Remarks
Input
–
32×64×5×1
Raw EEG tensor with shift augmentation
Conv3D
1×7×3 , F=16
same
Temporal filtering across T and D
GELU + BN
–
same
Non-linearity + normalization
Conv3D
32×1×1 , F=32
1×64×5×32
Spatial filter across channels
GELU + BN
–
same
–
Dropout
p=0.3
same
Regularization
Table 8: Baseline 3D CNN Architecture
Layer
Filter Size / Units
Output Shape
Remarks
Input
–
32×64×5×1
Augmented EEG input
Conv3D
1×7×3 , F=16
same
Temporal convolution
GELU + BN
–
same
–
Conv3D
32×1×1 , F=32
1×64×5×32
Spatial filtering
GELU + BN
–
same
–
Dropout
p=0.3
same
Regularization
Table 9: Deep 3D CNN with Additional Convolution
Layer
Filter Size / Units
Output Shape
Remarks
Input
–
32×64×5×1
Augmented EEG input
Conv3D
1×7×3 , F=16
same
Temporal filtering
GELU + BN
–
same
–
Conv3D
32×1×1 , F=32
1×64×5×32
Spatial filtering
GELU + BN
–
same
–
Dropout
p=0.3
same
–
Table 10: Best Performing 3D CNN (with GAP)
Participant
Baseline
WCE
Swish
GELU
GAP
SE Block (Best)
s1
0.529
0.612
0.709
0.845
0.855
0.868
s2
0.516
0.595
0.691
0.829
0.839
0.861
s3
0.523
0.604
0.700
0.836
0.846
0.835
s4
0.533
0.617
0.714
0.851
0.861
0.837
s5
0.519
0.598
0.695
0.832
0.842
0.874
s6
0.527
0.609
0.706
0.843
0.853
0.849
Table 11: Mean AUC for All 2D CNN Architectures (Without CSP Preprocessing)
Participant
Baseline
WCE
Swish
GELU
GAP
SE Block
s1
0.531
0.615
0.713
0.868
0.870
0.873
s2
0.518
0.598
0.695
0.853
0.855
0.858
s3
0.525
0.607
0.704
0.850
0.860
0.862
s4
0.535
0.619
0.718
0.869
0.872
0.875
s5
0.521
0.601
0.699
0.857
0.859
0.861
s6
0.529
0.612
0.710
0.861
0.863
0.866
Table 12: Mean AUC for All 2D CNN Architectures (With CSP Preprocessing)
Participant
Baseline
Deep Stack
Best Model (GAP)
s1
0.761
0.935
0.995
s2
0.730
0.918
0.991
s3
0.775
0.941
0.999
s4
0.748
0.929
0.993
s5
0.781
0.945
0.994
s6
0.735
0.921
0.992
Table 13: Comparative Per-Participant Mean AUC for All 3D CNN Architectures