Skip to content

Proposal: record pretraining corpora for foundation models and add a "held-out evaluation" check #1492

Open

Description

@YihengLi-1

Hi braindecode team,

I contributed #1033, #1034 and #1037, and I have been using the foundation models in braindecode for subject-independent evaluation. While doing that I ran into a problem that I think the library can help users avoid.

Several pretrained EEG models in braindecode were pretrained on datasets that are also standard downstream benchmarks. LaBraM, for example, lists both PhysioNet Motor Imagery and the Siena Scalp EEG Database in its pretraining corpus. A user who fine-tunes InterpolatedLaBraM on either dataset and reports "unseen subjects" is in fact testing on subjects whose unlabeled EEG the encoder has already seen. In my own runs, the motor-imagery advantage of LaBraM over EEGNet shrank from 24 to 13.5 points when I moved from PhysioNet to a dataset outside its corpus (Cho2017), and the seizure-detection advantage largely disappeared from Siena to CHB-MIT. Report and code: https://doi.org/10.5281/zenodo.23423535

Proposal, in two small steps:

  1. Metadata. Add a pretraining_datasets attribute (dataset names plus source) to each pretrained model class or to its Hugging Face card, filled from each paper's appendix. I have already compiled these lists, with page-cited quotes, for 20 EEG foundation models (142 reported results): https://github.com/YihengLi-1/eeg-motor-imagery-decoding/blob/main/docs/pretraining_overlap_eeg_fm.md. In that table, 33 results use a dataset that is in, or is a sub-corpus of, the model's own pretraining data (mostly TUAB/TUEV/TUSL/TUAR as subsets of TUEG), and only 4 of those report a re-pretraining control. I can open the PR.
  2. Check helper. A small utility, for example braindecode.util.check_pretraining_overlap(model, dataset), that warns when a MOABB or BIDS dataset being used for evaluation appears in the model's pretraining corpus, so users can label results as in-corpus or held-out.

I am happy to implement both, add tests and docs, and maintain the metadata as new models are added. Would this be welcome, and is there a preferred place for this kind of model metadata?

Thanks,
Yiheng Li (@YihengLi-1)

Activity

  1. bruAristimunha commented on Oct 29, 2026

    @bruAristimunha
    Collaborator

    It is mostly to evolve the model cards, right?

    I'm just wondering if I can adapt something closer to Hugging Face here.

  2. YihengLi-1 commented on Oct 31, 2026

    @YihengLi-1
    ContributorAuthor

    Yes, mostly evolving the model cards. I wrote up what the other libraries do and a three-step proposal on the PR: #1493.

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