Skip to content

ENH record foundation-model pretraining corpora and add check_pretraining_overlap (#1492) - #1493

Merged
bruAristimunha merged 4 commits into
braindecode:masterfrom
YihengLi-1:pretraining-metadata
Nov 1, 2026
Merged

bruAristimunha merged 4 commits into
braindecode:masterfrom
YihengLi-1:pretraining-metadata

Conversation

@YihengLi-1

@YihengLi-1 YihengLi-1 commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

First step of the proposal in #1492: record the pretraining datasets of the foundation models in braindecode, and give users one call to check whether an evaluation dataset overlaps a model's pretraining data, so results can be labelled in-corpus or held-out.

Changes

  • braindecode/models/pretraining.py:
    • PRETRAINING_CORPORA maps 11 model classes (BENDR, BIOT, Labram, EEGPT, CBraMod, LUNA, REVE, CSBrain, CodeBrain, BrainOmni, EEGDINO) to the datasets listed in their papers, with the source. complete=False marks papers that do not itemise every dataset (LaBraM's self-collected data, REVE's 92 datasets, BrainOmni's MEG part).
    • check_pretraining_overlap(model, dataset) accepts a class, an instance or a name, plus a dataset name or a MOABB/braindecode dataset object. It returns "in_corpus", "same_collection" (a TUH sub-corpus such as TUAB/TUEV while the model saw TUEG data), "held_out" or "unknown", and warns unless the result is held out.
    • Common MOABB names are aliased (e.g. PhysionetMI to EEGMMIDB, BNCI2014_004 to BCIC-IV-2b).
  • test/unit_tests/models/test_pretraining_overlap.py: in-corpus warning, TUH collection, held-out and unknown without warnings, aliases, and a check that every key is a braindecode model.
  • docs/whats_new.rst entry.

The lists come from a page-cited audit of 20 EEG foundation models: https://github.com/YihengLi-1/eeg-motor-imagery-decoding/blob/main/docs/pretraining_overlap_eeg_fm.md

Testing

  • pytest test/unit_tests/models/test_pretraining_overlap.py: 5 passed (local, Python 3.12).

  • ruff check and ruff format on the two new files: clean.

  • Full suite not run locally; relying on CI.

  • New or changed behavior is covered by relevant regression tests

  • Style checks recorded (ruff check / ruff format on changed files)

  • docs/whats_new.rst updated

Notes for reviewers

@codecov

codecov Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.21%. Comparing base (05b764d) to head (9aa1bae).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1493      +/-   ##
==========================================
+ Coverage   91.19%   91.21%   +0.02%     
==========================================
  Files         168      169       +1     
  Lines       21862    21940      +78     
==========================================
+ Hits        19937    20013      +76     
- Misses       1925     1927       +2     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…foundation model

Shows check_pretraining_overlap on one model/dataset pair, explains the four
return values and the complete=False caveat, prints an overlap table for the
recorded models against common benchmarks, and lists practical options for
reporting results.
@YihengLi-1

Copy link
Copy Markdown
Contributor Author

Added a short tutorial, examples/model_building/plot_pretraining_overlap.py: it checks one model/dataset pair, explains the four return values and the complete=False caveat, prints the overlap table for the recorded models against common benchmarks (PhysionetMI, BNCI2014_001, Cho2017, Lee2019_MI, TUAB, SEED), and lists options for reporting results. It runs without downloading data. Happy to trim it or fold it into an existing example if you prefer.

@YihengLi-1
YihengLi-1 force-pushed the pretraining-metadata branch from cda277a to 2adb5fc Compare October 26, 2026 14:08
Comment thread braindecode/models/pretraining.py Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not a fan of listing this...

Seems like a bad idea, because it will not scale up well...

Comment thread braindecode/models/pretraining.py Outdated
Comment on lines +69 to +89
PRETRAINING_CORPORA = {
"BENDR": PretrainingCorpus(
frozenset({"TUEG"}), "Kostas et al. 2021, arXiv:2101.12037"
),
"BIOT": PretrainingCorpus(
frozenset({"SHHS", "PREST"}), "Yang et al. 2023, arXiv:2305.10351"
),
"Labram": PretrainingCorpus(
frozenset(
{
"BCIC-IV-1",
"Emobrain",
"GAL",
"KaggleERN",
"EEGMMIDB",
"Trujillo2020",
"Trujillo2017",
"SEED",
"SEED-IV",
"SEED-GER",
"SEED-FRA",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be in the model card on Hugging Face, and maybe we need to find a better way to show this once you load the pre-trained.... Can you please dig a little more to see how other libraries around Hugging Face handle this?

@YihengLi-1

Copy link
Copy Markdown
Contributor Author

Thanks for the review, Bruno. I agree the Python registry does not scale, and I looked at how the libraries around the Hub handle this.

What I found:

  • The one machine-readable convention everyone writes to is the model-card front matter datasets: (Hub dataset ids). timm cards (datasets: [imagenet-1k, imagenet-21k]), sentence-transformers (SentenceTransformerModelCardData(train_datasets=...)) and transformers.Trainer.create_model_card(dataset_tags=...) all end up there. The Hub turns each entry into a dataset:<id> tag, HfApi.list_models(trained_dataset=...) filters on it, and ModelCard.load(repo_id).data.datasets or model_info(repo_id).card_data reads it back.
  • No library exposes training provenance on the loaded object: timm's PretrainedCfg has no dataset field, and torchvision Weights.meta and open_clip encode it only in the tag name. No library ships an overlap check; the closest thing is the CONDA data-contamination database, which is a hand-maintained CSV.
  • None of the braindecode/* Hub repos currently carries a datasets: entry or a dataset: tag.

So yes, this is mostly about evolving the model cards. Proposal, in three small steps, replacing this PR:

  1. Metadata only: add datasets: (and base_model: where the weights were converted from the authors' release) to the braindecode/* model cards. I already have the itemised lists for LaBraM, BIOT, EEGPT, CBraMod, CodeBrain and BENDR with sources, and the CodeBrain list was confirmed by its authors. One question for you: most EEG corpora have no Hub dataset repo (TUEG, SEED, Siena, ...). Should datasets: carry free-form names, which the Hub accepts but cannot filter on, or should braindecode create a braindecode/<corpus> placeholder dataset repo per corpus so the dataset: tags and the filter work? I would lean to the second, at least for the TUH family.
  2. Have push_to_hub write it: the mixin already supports model_card_kwargs and a class-level model_card_template, which would also close the TODO in base.py. A model that carries a pretraining_datasets attribute would get the field for free.
  3. Reduce check_pretraining_overlap to a thin helper that reads the card (hf_hub_download(repo_id, "README.md"), cached, so it works offline after the first load), maps braindecode and MOABB dataset classes to the same ids, and warns. The Python dict goes away.

One side note: the 2026 challenge rules ask participants to declare every external corpus they pretrained on. A datasets: field on the checkpoint would make that declaration machine-readable.

If this direction works for you, I will close this PR and open the metadata PR first.

@bruAristimunha

Copy link
Copy Markdown
Collaborator

Thanks @YihengLi-1, the problem is real and your audit is very useful. I looked at how this is done on the Hugging Face side, and I think we can get the same result with much less code and without a table to maintain in braindecode.

What HF already gives us

  • The model card (the README.md of each Hub repo) has a standard YAML field for this: datasets: (huggingface_hub.ModelCardData.datasets, "datasets used to train this model"), plus base_model: for fine-tuned checkpoints. It is versioned with the weights, the Hub indexes it, and anyone can read it with HfApi().model_info(repo).card_data. LUNA's upstream card already uses it (PulpBio/LUNA: datasets: [TUEG, Siena, ...]).
  • On our side the field is empty: 124 of the 125 braindecode/* model repos have no datasets:. from_pretrained never reads the card, it only downloads config.json and the weights. Also, push_to_hub(model_card_kwargs=...) only passes the kwargs to the card's Jinja template. model_card_kwargs={"datasets": [...]} never reaches the metadata today.

Why per checkpoint and not per class

BIOT shows the problem. We host three BIOT checkpoints, each trained on different data (BIOT README):

  • biot-pretrained-prest-16chs: PREST only
  • biot-pretrained-shhs-prest-18chs: PREST + SHHS
  • biot-pretrained-six-datasets-18chs: PREST + SHHS + the training sets of TUAB, TUEV, CHB-MIT and IIIC

A class-level BIOT: {SHHS, PREST} is wrong for two of the three. With the six-datasets weights, check_pretraining_overlap(BIOT, "TUAB") returns held_out, but TUAB was in the training data. The same is true for every fine-tuned checkpoint a user pushes: the class can't know what a given set of weights has seen, only the checkpoint can.

Proposal

I have a small patch ready (about 30 lines of code in models/base.py plus 2 tests, no new dependency, no network in the tests):

  1. from_pretrained reads the checkpoint's README.md using the same revision / cache_dir / local_files_only / token as the weights, and sets model.card_data (a ModelCardData). This is best effort: if you are offline with no cached card, or the repo has no README, you still get the model and card_data is None. It also logs which datasets the card lists.
    model = BIOT.from_pretrained("braindecode/biot-pretrained-six-datasets-18chs")
    model.card_data.datasets   # what these weights saw
    model.card_data.base_model # parent checkpoint, for fine-tunes
  2. push_to_hub(..., model_card_kwargs={"datasets": [...], "base_model": "..."}) now writes those two keys to the card's YAML header.
  3. Your lists become content instead of code. We fill datasets: on the braindecode/* cards with huggingface_hub.metadata_update(repo_id, {"datasets": [...]}), one call per checkpoint, and no braindecode release is needed. Your page-cited sources and the "not itemised" caveat (LaBraM's self-collected data, REVE's 92 datasets) go into the card text.

With that in place, the overlap check is one line, set(model.card_data.datasets or []) & {"PhysionetMI"}, so I would show it in the example rather than add a public function. Names are the one thing we need to agree on: I'd prefer one convention in the cards (Hub dataset ids where they exist, otherwise the MOABB/braindecode class name) over an alias table in the code. The TUH note (TUAB/TUEV/... are subsets of TUEG) is a nice touch, and it fits well in the example text.

Would you be ok to repurpose the PR this way? Concretely:

  • drop braindecode/models/pretraining.py and its test,
  • take the patch below (I can also push it to your branch if you prefer),
  • adapt the example to model.card_data,
  • post your per-checkpoint lists here (one per braindecode/* repo, not per class), and we update the cards.
Patch (models/base.py + tests)
diff --git a/braindecode/models/base.py b/braindecode/models/base.py
index ce3efec2..ec26a8d1 100644
--- a/braindecode/models/base.py
+++ b/braindecode/models/base.py
@@ -8,6 +8,7 @@ from __future__ import annotations
 import functools
 import inspect
 import json
+import logging
 import warnings
 from collections import OrderedDict
 from pathlib import Path, PurePosixPath, PureWindowsPath
@@ -35,6 +36,7 @@ huggingface_hub = _soft_import(
 )
 
 HAS_HF_HUB = huggingface_hub is not False
+log = logging.getLogger(__name__)
 
 # __init__ args that from_pretrained fills from config.json when not given.
 _GEOMETRY_KWARGS = (
@@ -61,6 +63,26 @@ def _validate_weights_filename(filename):
         raise ValueError("filename must be a relative weight path without traversal")
 
 
+def _load_card_data(pretrained_model_name_or_path, **kwargs):
+    """Metadata of a checkpoint's model card (``README.md``), or None.
+
+    Best effort: the card is informational, so a missing or unreadable card
+    (offline, no README, bad YAML) never blocks loading the weights.
+    """
+    keys = ("revision", "cache_dir", "force_download", "token", "local_files_only")
+    try:
+        card = Path(pretrained_model_name_or_path) / "README.md"
+        if not card.parent.is_dir():
+            card = huggingface_hub.hf_hub_download(
+                str(pretrained_model_name_or_path),
+                "README.md",
+                **{k: kwargs[k] for k in keys if k in kwargs},
+            )
+        return huggingface_hub.ModelCard.load(card, ignore_metadata_errors=True).data
+    except Exception:
+        return None
+
+
 def _local_weights_path(model_id, filename):
     """Reject local weight paths (including symlinks) outside the model folder."""
     root = Path(model_id).resolve()
@@ -212,6 +234,11 @@ class EEGModuleMixin(_BaseHubMixin, metaclass=_BraindecodeDocstringMeta):
     there will be an attempt to infer them from the other parameters.
     """
 
+    #: Hub model card metadata (:class:`huggingface_hub.ModelCardData`) of the
+    #: checkpoint, set by :meth:`from_pretrained` when the card can be read,
+    #: e.g. ``model.card_data.datasets`` lists the data the weights saw.
+    card_data = None
+
     #: Template for model-specific Hub integration notes appended by
     #: ``__init_subclass__``.  ``{name}`` is replaced with the concrete
     #: model class name.
@@ -234,10 +261,11 @@ class EEGModuleMixin(_BaseHubMixin, metaclass=_BraindecodeDocstringMeta):
         model = {name}(n_chans=22, n_outputs=4, n_times=1000)
         # ... training code ...
 
-        # Push to the Hub
+        # Push to the Hub; ``datasets`` and ``base_model`` go to the card
         model.push_to_hub(
             repo_id="username/my-{name_lower}-model",
             commit_message="Initial model upload",
+            model_card_kwargs={{"datasets": ["BNCI2014_001"]}},
         )
 
     **Loading a model from the Hub:**
@@ -248,6 +276,8 @@ class EEGModuleMixin(_BaseHubMixin, metaclass=_BraindecodeDocstringMeta):
 
         # Load pretrained model
         model = {name}.from_pretrained("username/my-{name_lower}-model")
+        # Data the weights were trained on, from the Hub model card
+        print(model.card_data.datasets if model.card_data else None)
 
         # Load with a different number of outputs (head is rebuilt automatically)
         model = {name}.from_pretrained("username/my-{name_lower}-model", n_outputs=4)
@@ -1015,7 +1045,26 @@ class EEGModuleMixin(_BaseHubMixin, metaclass=_BraindecodeDocstringMeta):
                 kwargs.setdefault("chs_info", None)
             if "n_times" in kwargs or "sfreq" in kwargs:
                 kwargs.setdefault("input_window_seconds", None)
-            return super().from_pretrained(*args, **kwargs)
+            model = super().from_pretrained(*args, **kwargs)
+            card_data = _load_card_data(*args, **kwargs)
+            if card_data is not None:
+                model.card_data = card_data
+                if card_data.datasets:
+                    log.info(
+                        "%s weights were trained on (model card): %s",
+                        cls.__name__,
+                        card_data.datasets,
+                    )
+            return model
+
+        def generate_model_card(self, *args, **kwargs):
+            # ``model_card_kwargs`` only fill the card's Jinja template; also
+            # write these two to its YAML header so the Hub indexes them.
+            card = super().generate_model_card(*args, **kwargs)
+            for key in ("datasets", "base_model"):
+                if key in kwargs:
+                    setattr(card.data, key, kwargs[key])
+            return card
 
         @classmethod
         def _from_pretrained(
diff --git a/test/unit_tests/models/test_huggingface.py b/test/unit_tests/models/test_huggingface.py
index ef09a6c9..8744d213 100644
--- a/test/unit_tests/models/test_huggingface.py
+++ b/test/unit_tests/models/test_huggingface.py
@@ -593,3 +593,43 @@ def test_custom_weights_legacy_options_do_not_reach_constructor(tmp_path, monkey
     assert calls[-1]["resume_download"] is True
     for key, value in model.state_dict().items():
         torch.testing.assert_close(restored.state_dict()[key], value, rtol=0, atol=0)
+
+
+def test_model_card_datasets_roundtrip(tmp_path):
+    from .test_base import DummyModuleConfigRoundTrip
+
+    model = DummyModuleConfigRoundTrip(n_chans=2, n_times=8, n_outputs=2)
+    card = {"datasets": ["TUEG", "Siena"], "base_model": "org/parent"}
+    model.save_pretrained(tmp_path / "a", model_card_kwargs=card)
+    model.save_pretrained(tmp_path / "b")  # card kwargs must not leak
+
+    restored = DummyModuleConfigRoundTrip.from_pretrained(tmp_path / "a")
+    assert restored.card_data.datasets == ["TUEG", "Siena"]
+    assert restored.card_data.base_model == "org/parent"
+    assert "braindecode" in restored.card_data.tags
+    assert DummyModuleConfigRoundTrip.from_pretrained(tmp_path / "b").card_data.datasets is None
+
+    (tmp_path / "a" / "README.md").unlink()  # no card: still loads
+    assert DummyModuleConfigRoundTrip.from_pretrained(tmp_path / "a").card_data is None
+
+
+def test_model_card_read_from_hub_cache_without_network(tmp_path, monkeypatch):
+    import huggingface_hub
+
+    from braindecode.models.base import _load_card_data
+
+    readme = tmp_path / "README.md"
+    readme.write_text("---\ndatasets:\n- PREST\n- SHHS\n---\ncard\n")
+    calls = []
+
+    def download(*args, **kwargs):
+        calls.append((args, kwargs))
+        return str(readme)
+
+    monkeypatch.setattr(huggingface_hub, "hf_hub_download", download)
+    data = _load_card_data("org/repo", revision="v1", local_files_only=True, n_outputs=3)
+    assert data.datasets == ["PREST", "SHHS"]
+    assert calls == [(("org/repo", "README.md"), {"revision": "v1", "local_files_only": True})]
+
+    monkeypatch.undo()  # real hub, nothing cached, no network: None, no error
+    assert _load_card_data("braindecode/no-such-repo", cache_dir=tmp_path / "c", local_files_only=True) is None

@bruAristimunha

Copy link
Copy Markdown
Collaborator

And we have almost all the dataset at hugging face eegdash org, that try to be the dataset part of braindecode

Replace the Python registry (braindecode/models/pretraining.py) with the
Hugging Face convention: from_pretrained reads the checkpoint's README.md
and exposes it as model.card_data, and save_pretrained/push_to_hub write
datasets and base_model from model_card_kwargs to the card's YAML header.
The tutorial now shows the round trip and the one-line overlap check.

Co-authored-by: Bruno Aristimunha <[email protected]>
@YihengLi-1

Copy link
Copy Markdown
Contributor Author

Yes, let's do it this way. Pushed to the branch (9aa1bae): pretraining.py and its test are gone, your patch is in as-is with you as co-author, the example now does the save/load round trip and the one-line check (I kept the TUH note and the completeness caveat as text), and whats_new is updated. test_huggingface.py passes locally (268 passed, 32 skipped) and pre-commit is clean on the changed files.

On names, agreed: the Hub id where one exists (EEGDash/ds002718 style for OpenNeuro sets), otherwise the MOABB/braindecode class name, otherwise the usual short name the way PulpBio/LUNA does it. Private or un-itemised corpora stay out of datasets: and go in the card text, so the field only holds things one can check.

Batch 1 of the per-checkpoint lists, for the checkpoints the audit already covers (sources and page quotes are in the table linked above):

repo paper variant datasets (card YAML) complete note
braindecode/labram-pretrained, braindecode/Labram-Braindecode LaBraM, arXiv 2405.18765, App. D base BCIC-IV-1, KaggleERN (Inria BCI Challenge), PhysionetMI (EEGMMIDB), Trujillo2020, Trujillo2017, SEED, SEED-IV, SEED-GER, SEED-FRA, Siena, SPIS, BrainInvaders (bi2013a), Emobrain, GraspAndLift, TUAR, TUEP, TUSZ, TUSL no plus 342 h self-collected EEG not itemised; TUAB/TUEV are same-collection (TUH)
braindecode/cbramod-pretrained CBraMod, arXiv 2412.07236 released weights TUEG yes TUAB/TUEV/TUSL/TUAR/TUSZ same-collection
braindecode/biot-pretrained-prest-16chs BIOT, arXiv 2305.10351 PREST PREST (private) yes private corpus; no public overlap checkable
braindecode/biot-pretrained-shhs-prest-18chs BIOT PREST+SHHS PREST (private), SHHS yes SHHS used without labels
braindecode/biot-pretrained-six-datasets-18chs BIOT, Sec. 3.6 6 EEG datasets PREST (private), SHHS, TUAB (train split, labeled), TUEV (train split, labeled), CHB-MIT (train split), IIIC (train split) yes supervised exposure to TUAB/TUEV/CHB-MIT/IIIC train splits; evaluating on their test splits is in-corpus at the dataset level
braindecode/eegpt-pretrained EEGPT (Wang et al.), NeurIPS 2024, Table 1 released PhysionetMI (EEGMMIDB), Schirrmeister2017 (HGD), TSU-SSVEP, SEED, M3CV yes no TUH
braindecode/codebrain-pretrained CodeBrain, arXiv 2506.09110 released TUEG yes authors confirmed (Ziyu Jia, 2026-10-26)
braindecode/braindecode-bendr, braindecode/BENDR BENDR, arXiv 2101.12037 released TUEG (v1.1, v1.2) yes
braindecode/brainomni-tiny-pretrained, braindecode/brainomni-base-pretrained BrainOmni, arXiv 2505.18185 tiny / base MEG-MASC, MEG-Narrative, OMEGA, CC700 (Cam-CAN), Go-Nogo, MusicEEG, HFO, AversiveMEG, SRM, MIND, RestCog, SMN4Lang, HBN-EEG (EO/EC + releases), THINGS-MEG, ASWR-MEG, ImageLine, Features-EEG, PEARL-Neuro, NeuroMorph, Kymata-SOTO, Awakening yes no TUH; several are OpenNeuro sets -> map to EEGDash/ds ids where present
braindecode/eegdino-small-pretrained, braindecode/eegdino-medium-pretrained EEG-DINO, MICCAI small / medium TUEG yes authors state TUH downstream sets are subsets of pretraining

Batch 2 (SignalJEPA, STEEGFormer, Brant, MVPFormer, BrainBERT, PoPT, SleepFM, ZUNA, MIREPNet, BaRISTA, DIVER-1, BrainTokenizer, MAPA, NeuroRVQ, DuIN, EpInT, the EMG models, EEGSym) is in progress. I'll post it here in the same format in a few days, each row tied to the variant the card says it is. Once you've checked the names I can turn the lists into a metadata_update script.

@YihengLi-1

Copy link
Copy Markdown
Contributor Author

Batch 2, the remaining braindecode/* checkpoints with weights. Same convention as batch 1; private or un-itemised corpora are kept out of datasets: and noted instead. Page-cited quotes for every row are in the audit JSON linked in the PR description (updated with these rows). Three findings the maintainers may want to act on independently of this PR are flagged with [card].

repo paper variant (per card / verified against weights) datasets: complete note
signal-jepa, signal-jepa_without-chans, SignalJEPA, SignalJEPA-pretrained arXiv 2403.11772 same SSL backbone, 16 s / 60 % mask (byte-identical to authors' signal-jepa_16s-60_adeuwv4s.pth) Lee2019_MI, Lee2019_ERP, Lee2019_SSVEP yes pretrained on subjects 1–40 of 54. [card] the "pre-trained channel embedding" is a positional encoding built from electrode positions, not trained weight
SignalJEPA-Contextual-pretrained, -PostLocal-, -PreLocal- (deprecated) 2403.11772 SSL backbone (or feature encoder only) + untrained default-initialised head Lee2019_MI, Lee2019_ERP, Lee2019_SSVEP no [card] these are not fine-tuned models; heads sit at PyTorch default-init bounds
STEEGFormer-small / -base / -large ICLR 2026 (OpenReview 5Xwm8e6vbh, no arXiv) checkpoints 300 / 288 / 196 epochs Cho2017, Schirrmeister2017, BNCI2014_001, BNCI2014_004, Kaya2018, Won2022 (P300), BETA, Stieger2021, KUL-Auditory, SEED-V no plus an in-house KU Leuven multi-paradigm set of unstated size; paper states BNCI2014_001 is both pretraining and benchmark
STEEGFormer-largeV2 same + undocumented continued pretraining further pretrained on HBN-EEG for the 2025 challenge as above + EEGDash/ds005505 … ds005516 (HBN releases used not stated) no
brant-pretrained NeurIPS 2023 (no arXiv) authors' checkpoint (~508M) (none public) no 2,528 h private SEEG, 9 patients
Labram-Braindecode 2405.18765 LaBraM-Base, inferred from file name and 5.85M params (card cites no paper) BCIC-IV-1, KaggleERN, PhysionetMI, Trujillo2020, Trujillo2017, SEED, SEED-IV, SEED-GER, SEED-FRA, Siena, SPIS, BI2015a, Emobrain, GraspAndLift, TUAR, TUEP, TUSZ, TUSL no plus 342 h self-collected; same list as labram-pretrained
mvpformer-s-pretrained, mvpformer-m-pretrained 2506.20354 backbones (genie-s/m-base.pt) SWEC_iEEG (HF NeuroTec/SWEC_iEEG_Dataset; subjects 1–18) S: no, M: yes S: paper also trains a 58-subject variant; which one was released is undocumented
mvpformer-s-swec, mvpformer-m-swec 2506.20354 backbone + SWEC LoRA + seizure head SWEC_iEEG (subjects 1–18) ; base_model: the corresponding -pretrained S: no, M: yes fine-tuned on the same 18 subjects; test = other 50
mvpformer-s-mayo, mvpformer-s-fnusa 2506.20354 App. G.12 backbone + MAYO / FNUSA LoRA + head SWEC_iEEG + MAYO (first 4 patients) / FNUSA (first 4) no [card] adapter files not found in any public source; card's "rank 2" for MAYO contradicts the paper's rank 8
brainbert-pretrained 2302.14367 authors' "large" STFT checkpoint BrainTreebank (19 of 26 sessions, all 10 subjects) yes downstream = held-out sessions of the same subjects
popt-pretrained 2406.03044 PopT on frozen BrainBERT-STFT BrainTreebank (19 of 26 movies) ; base_model: brainbert yes the TUEG-pretrained EEG PopT is not the released checkpoint
SleepFM, SleepFMStager Nature Medicine 2026 (not arXiv 2405.17766) sleepfm-clinical base (+ staging head) MESA, MrOS (NSRR) no SSC (Stanford) and BioSerenity cohorts are proprietary and make up most of the 585k h; staging head may have used SHHS train
ZUNA 2602.18478 ZUNA v1 380M (same safetensors as Zyphra/ZUNA) TUEG no plus 208 OpenNeuro datasets with no manifest anywhere; overlap with any EEGDash set cannot be excluded
mirepnet-pretrained 2507.20254 official MIRepNet.pth BNCI2014_002, PhysionetMI, Dreyer2023A, Dreyer2023B, Dreyer2023C, Weibo2014, Zhou2016, Lee2019_MI, Cho2017 yes note for evaluators: PhysionetMI and Cho2017 are inside its pretraining
BaRISTA-coords / -parcels / -lobes 2512.12135 three encodings, same corpus BrainTreebank (17 of 26 sessions, all 10 subjects) yes downstream = held-out sessions of the same subjects
DIVER-1-0.1s-tiny 2512.19097 v3 iEEG-only tiny AJILE12 (DANDI 000055) no plus 25-patient self-collected iEEG (76 % of hours)
DIVER-1-1s-small 2512.19097 v1/v2 joint iEEG+EEG small AJILE12, TUEG, EEGDash/ds005505 … ds005516 (HBN), NCHSDB, EEGDash/ds004395 (PEERS) no plus self-collected iEEG; v2 evaluates on TUEV, a TUEG sub-corpus
braintokenizer-pretrained, brainomni-tiny-pretrained, brainomni-base-pretrained 2505.18185 stage-1 tokenizer; tiny / base MEG-MASC, MEG-Narrative, OMEGA, Cam-CAN, EEGDash/ds003682, ds004107, ds004078, ds004212, ds004276, ds004330, ds005241, Kymata-SOTO, ds002680, ds002721, ds003555, ds003775, ds004148, ds004186, ds004357, ds004796, ds005505 … ds005512, ds005620 yes (names) per-dataset hours not reported
mapa-pretrained 2609.13507 mapa_vits384 BrainTreebank (13 of 26 sessions, 7 subjects) yes downstream Neuroprobe Lite = same corpus
duin-pretrained 2405.11459 24 per-subject checkpoints (12 subjects × vqvae/mae) (none public; ~3 h/subject task portion released as HF liulab-repository/Du-IN) no subject-specific; if the 15 h variant, the downstream task data is inside pretraining
epint-pretrained 2506.17068 backbone representations.bin EEGDash/ds003029, ds003498, ds003555, ds003844, ds003876, ds004100, ds004752, ds005398, TUEP, TUSZ, Siena, ZJNU, AUB yes all public
neurorvq-eeg-pretrained, neurorvq-tokenizer-eeg-pretrained 2510.13068 FM v1 / tokenizer v1 BCIC-IV-1, GraspAndLift, PhysionetMI, BI2015a, KaggleERN, Trujillo2020, Trujillo2017, SPIS, TUAR, Siena, TUEP, TUSZ yes (list) plus ~235 h proprietary motor-imagery EEG (Cogitat)
neurorvq-ecg-pretrained, neurorvq-tokenizer-ecg-pretrained 2510.13068 ECG PTB, MIMIC-IV-ECG, Chapman-Shaoxing yes
neurorvq-emg-pretrained, neurorvq-tokenizer-emg-pretrained 2510.13068 EMG emg2pose, emg2qwerty yes
neurorvq-tokenizer-ppg-pretrained 2510.13068 (PPG not in paper) PPG tokenizer (unknown) no pretraining corpus documented nowhere; needs the authors
NeuroPose-emg2pose, VEMG2Pose-emg2pose(-tracking), EMG2Pose-emg2pose(-tracking) 2412.02725 Meta's released generic checkpoints emg2pose (train split, 158 users) yes [card] EMG2Pose-* cards say window 11,790; Table 7 gives 5,790 for the MLP variant
emg2qwerty-generic 2410.20081 upstream generic.ckpt emg2qwerty (generic split, 100 users) yes [card] card says 108 users and ≈16 % CER; paper: 100 users, generic CER > 50 % (Table 3); license upstream is CC BY-NC, not BY-NC-SA
eegsym-original-keras-8ch-pytorch IEEE TNSRE 2022 (no arXiv) authors' 8-electrode .h5 PhysionetMI, Lee2019_MI, Kaya2018, Meng2019, Stieger2021 yes released weights trained on all five sets, whereas the paper's protocol is leave-one-dataset-out
eegdino-small-pretrained, eegdino-medium-pretrained MICCAI 2025 (no arXiv) EEG-DINO-S / -M TUEG yes card gives no upstream revision

Two cross-cutting points for the card text rather than the field: (1) BrainTreebank is the pretraining corpus of BrainBERT, PoPT, BaRISTA and MAPA and also the usual iEEG benchmark (Neuroprobe), so every published number for those checkpoints is same-subject, different-session; (2) three models (ZUNA, STEEGFormer, DIVER-1) cannot be fully declared because the authors did not itemise, which is exactly the case where datasets: should stay short and the prose should say why.

If this looks right I will update the audit JSON with these rows and prepare the metadata_update script.

@bruAristimunha bruAristimunha left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @YihengLi-1. This now does what we discussed: the pretraining data lives in each checkpoint's model card, from_pretrained exposes it as model.card_data, and push_to_hub/save_pretrained write datasets/base_model into the YAML header. The code matches the patch we tested offline (new tests RED on master, GREEN here; the existing Hub-loading tests unchanged), CI is green, and the tutorial reads well. Your two audit tables are the content for the metadata_update script; please go ahead with it in a follow-up. Merging.

@bruAristimunha
bruAristimunha merged commit de192c3 into braindecode:master Nov 1, 2026
10 checks passed
@bruAristimunha

Copy link
Copy Markdown
Collaborator

I am doing some follow-up PR to incorporate your well-curated list across all the Hugging Face and improve also the HTML view of the model in the Jupyter to make this clearer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants