MtReNIRS pretrained encoder

The pretrained MtReNIRS encoder by Chae et al. (2026), for braindecode.models.MtReNIRS. model.safetensors and config.json hold the encoder of mtrenirs_10s.pt, which is models/weights/mtrenirs_10s.pt of microsoft/MtReNIRS at commit 16c3082, converted by convert.py.

from braindecode.models import MtReNIRS

# raw: MNE Raw of HbO/HbR at 10 Hz with the Standard 10-05 slot positions in loc[:3]
model = MtReNIRS.from_pretrained(
    "braindecode/mtrenirs-pretrained",
    chs_info=raw.info["chs"],
    n_outputs=3,
    n_times=100,
)
features = model(x, return_features=True)["features"]

The classification head (final_layer) is not part of the release: its input width depends on the montage, so from_pretrained builds it for your chs_info and n_outputs. Fine-tune or linear-probe before use.

Input the weights expect

10 Hz HbO/HbR in 100-sample (10 s) windows, each channel z-scored over its run and clipped at 6, with channel positions in Standard 10-05 space. The authors' model card describes the intended and out-of-scope uses.

Changes from the original release

convert.py unwraps the checkpoint's {"config", "model"} payload, renames 6 keys of the token embedding and writes the encoder with save_pretrained. The renames are plain prefix replacements: braindecode names the two layers directly instead of wrapping each in a one-child Sequential.

original key this repository keys
embed.signal.proj.{weight,bias} embed.signal_proj.{weight,bias} 2
embed.spatial.mlp.{0,2}.{weight,bias} embed.spatial_mlp.{0,2}.{weight,bias} 4

The other 98 keys keep their names. config.json no longer lists channel_strategy and channel_strategy_kwargs, which MtReNIRS has not taken since braindecode#1688.

No value is changed: each of the 104 tensors is bitwise equal to its tensor in mtrenirs_10s.pt (the six renamed ones under their new names). The original file, mtrenirs_10s.pt (sha256 0960d02f9437d86f0f1a670eace8905d58b33f3394e58d5c17a6451bbcb9484d), is kept in this repository unchanged; revision bbc68ce5 is the mirror without the conversion, and revision 7c5e6053 holds the same tensors under the authors' names.

Verification

MtReNIRS.from_pretrained on these files (braindecode 32850d0b) against braindecode's MtReNIRS on revision 7c5e6053 (master before the renames, 252a0172), on CPU and the same seeded inputs: the pinned input at 100 and at 300 samples, pool="channel_temporal_mean" with a NaN window and a ch_mask, pool="flatten" and explicit coordinates. In float32 and in float64 the features, the outputs (same head), the tokens and their validity, and the features and outputs in train mode under one seed (the dropout draws) are bitwise equal: 60 of 60 comparisons, max abs difference 0.0. A change of 1e-3 in one value of each renamed tensor shows as a difference of 4e-4 or more in the features.

Licence

MIT, Copyright (c) Microsoft Corporation. LICENSE.txt is the source repository's licence file, unchanged.

Citation

@article{microsoft2026mtrenirs,
  author  = {Chae, Tony and Avramidis, Kleanthis and Emmanouilidou, Dimitra and Tashev, Ivan J.},
  title   = {{MtReNIRS}: A Self-Supervised Foundation Model for Transferable Neurovascular Representations},
  journal = {arXiv preprint arXiv:2610.36159},
  year    = {2026},
}

Conversion

convert.py (in this repository) was run with braindecode at 32850d0b:

python convert.py mtrenirs_10s.pt <out_dir>
file sha256
model.safetensors e73ec45447b21213b7dfa861ac80ebf7b6ac362a115e3b465bfde054e22198e4
config.json 29d2bc9b2f67fb495f43f1e14a33daa4b47f327f43f78b506015e7b68151e5f4
convert.py 7913624b7c276a4dca45bc39a638552fdca259a47227d0ebf595085cdb127bfe
original models/weights/mtrenirs_10s.pt (microsoft/MtReNIRS@16c3082) 0960d02f9437d86f0f1a670eace8905d58b33f3394e58d5c17a6451bbcb9484d
Downloads last month
35
Safetensors
Model size
1.23M params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Paper for braindecode/mtrenirs-pretrained