Skip to content

EEGITNet: missing source max-norm constraints + doubled dimensionality-reduction width #1068

Description

@bruAristimunha

braindecode/models/eegitnet.py diverges from the authors' EEG-ITNet (Salami et al. 2022, Main.ipynb) in two ways that materially hurt within-subject accuracy (~11pp on BCI-IV-2a in a replicability study; the model overfits without them):

1. Missing max_norm weight constraints

The source constrains the regularizing weights; braindecode applies none (grep -c max_norm eegitnet.py == 0):

  • the 3 inception spatial depthwise convs (Spatial_filter_1/2/3) use depthwise_constraint = MaxNorm(max_value=1);
  • the final dense uses kernel_constraint = max_norm(0.25).

braindecode already ships the primitives (Conv2dWithConstraint, MaxNormLinear, MaxNormParametrize) and uses them in EEGNetv4 — they were just omitted here. The dilated TC blocks correctly have no constraint in the source, so leave those unconstrained.

2. Dimensionality-reduction width doubled (28 vs 14)

The source DR conv has 14 filters (paper III-C: "the number of filters in the 1×1 convolutional layer … was selected to be 14"; source Conv2D(14,(1,1))). braindecode doubles it (eegitnet.py:188):

nn.Conv2d(tcn_in_channel, tcn_in_channel * 2, kernel_size=(1, 1)),   # 14 -> 28
nn.BatchNorm2d(tcn_in_channel * 2),

This inflates the classifier input (644 vs 322 features) and adds capacity.

Fix

Apply MaxNormParametrize(1.0) to the 3 inception spatial depthwise convs and MaxNormLinear(max_norm=0.25) (or parametrize) to the final layer; set the DR conv width to tcn_in_channel (14). Both are verified against the authors' code. Happy to PR.

Activity

  1. added a commit that references this issue on Jun 24, 2026
    0e262ec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions