{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/arxiv-2603-16739","title":"SpecMoE: Spectral Mixture-of-Experts Foundation Model for Cross-Species EEG Decoding","arxiv_id":"2603.16739","date":"2026-03-17","proceeding":null,"authors":["Davy Darankoum","Chloé Habermacher","Julien Volle","Sergei Grudinin"],"abstract":"Decoding the orchestration of neural activity in electroencephalography (EEG) signals is a central challenge in bridging neuroscience with artificial intelligence. Foundation models have made strides in generalized EEG decoding, yet many existing frameworks primarily relying on separate temporal and spectral masking of raw signals during self-supervised pretraining. Such strategies often tend to bias learning toward high-frequency oscillations, as low-frequency rhythmic patterns can be easily inferred from the unmasked signal. We introduce a foundation model that utilizes a novel Gaussian-smoothed masking scheme applied to short-time Fourier transform (STFT) maps. By jointly applying time, frequency, and time-frequency Gaussian masks, we make the reconstruction task much more challenging, forcing the model to learn intricate neural patterns across both high- and low-frequency domains. To effectively recover signals under this aggressive masking strategy, we design SpecHi-Net, a U-shaped hierarchical architecture with multiple encoding and decoding stages. To accelerate large-scale pretraining, we partition the data into three subsets, each used to train an independent expert model. We then combine these models through SpecMoE, a mixture of experts framework guided by a learned spectral gating mechanism. SpecMoE achieves state-of-the-art performance across a diverse set of EEG decoding tasks, including sleep staging, emotion recognition, motor imagery classification, abnormal signal detection, and drug effect prediction. Importantly, the model demonstrates strong cross-species and cross-subject generalization, maintaining high accuracy on both human and murine EEG datasets.","url_abs":"https://arxiv.org/abs/2603.16739","url_pdf":"https://arxiv.org/pdf/2603.16739","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2603.16739","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2603.16739"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/wjq-learning/CBraMod","reach":{"status":"ok","spdx":"MIT"}},{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/eeyhsong/EEG-Conformer","reach":null},{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/yuchen2199/CSBrain","reach":null},{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/TeraXj78/SpecMoE","reach":null},{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/935963004/LaBraM","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":5,"ran_draft_wrong":2,"ran_honours":1,"unverified":9},"by_repo_kind":{"found_in_text":{"samples":17,"ran":8,"repositories":3}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":10,"samples":[{"code_sha256_prefix":"68a5e3257881152d","entry":"Attention","repo":"935963004/LaBraM","repo_kind":"found_in_text","path":"modeling_pretrain.py","file_url":"https://github.com/935963004/LaBraM/blob/HEAD/modeling_pretrain.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"68a5e3257881152d"}},{"code_sha256_prefix":"972c0c1c965c0524","entry":"CSBrain_TransformerEncoder","repo":"yuchen2199/CSBrain","repo_kind":"found_in_text","path":"models/CSBrain_transformer.py","file_url":"https://github.com/yuchen2199/CSBrain/blob/HEAD/models/CSBrain_transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"972c0c1c965c0524"}},{"code_sha256_prefix":"ea7880551588ee9f","entry":"DropPath","repo":"935963004/LaBraM","repo_kind":"found_in_text","path":"modeling_pretrain.py","file_url":"https://github.com/935963004/LaBraM/blob/HEAD/modeling_pretrain.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ea7880551588ee9f"}},{"code_sha256_prefix":"e71525ebf968c4c3","entry":"Mlp","repo":"935963004/LaBraM","repo_kind":"found_in_text","path":"modeling_pretrain.py","file_url":"https://github.com/935963004/LaBraM/blob/HEAD/modeling_pretrain.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e71525ebf968c4c3"}},{"code_sha256_prefix":"a3961caa3c8c736d","entry":"TemporalConv","repo":"935963004/LaBraM","repo_kind":"found_in_text","path":"modeling_pretrain.py","file_url":"https://github.com/935963004/LaBraM/blob/HEAD/modeling_pretrain.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a3961caa3c8c736d"}},{"code_sha256_prefix":"99d2502ce9270700","entry":"_get_clones","repo":"yuchen2199/CSBrain","repo_kind":"found_in_text","path":"models/CSBrain_transformer.py","file_url":"https://github.com/yuchen2199/CSBrain/blob/HEAD/models/CSBrain_transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"99d2502ce9270700"}},{"code_sha256_prefix":"a3722169bbc81569","entry":"clones","repo":"TeraXj78/SpecMoE","repo_kind":"found_in_text","path":"Model_architectures/Finetuning_model.py","file_url":"https://github.com/TeraXj78/SpecMoE/blob/HEAD/Model_architectures/Finetuning_model.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a3722169bbc81569"}},{"code_sha256_prefix":"f6b944f50d3f15ae","entry":"count_parameters","repo":"TeraXj78/SpecMoE","repo_kind":"found_in_text","path":"Finetuning_main.py","file_url":"https://github.com/TeraXj78/SpecMoE/blob/HEAD/Finetuning_main.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f6b944f50d3f15ae"}},{"code_sha256_prefix":"b8c87f15b20f0ad5","entry":"Block","repo":"935963004/LaBraM","repo_kind":"found_in_text","path":"modeling_pretrain.py","file_url":"https://github.com/935963004/LaBraM/blob/HEAD/modeling_pretrain.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b8c87f15b20f0ad5"}},{"code_sha256_prefix":"a0cec3eb78975411","entry":"NeuralTransformerForMaskedEEGModeling","repo":"935963004/LaBraM","repo_kind":"found_in_text","path":"modeling_pretrain.py","file_url":"https://github.com/935963004/LaBraM/blob/HEAD/modeling_pretrain.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a0cec3eb78975411"}},{"code_sha256_prefix":"08a12a7320ac5af6","entry":"data_generator_maco","repo":"TeraXj78/SpecMoE","repo_kind":"found_in_text","path":"Data_loaders/Finetuning_data_loader.py","file_url":"https://github.com/TeraXj78/SpecMoE/blob/HEAD/Data_loaders/Finetuning_data_loader.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"08a12a7320ac5af6"}},{"code_sha256_prefix":"28ce87f26ae8ccce","entry":"regression_Loss","repo":"TeraXj78/SpecMoE","repo_kind":"found_in_text","path":"Utils/loss.py","file_url":"https://github.com/TeraXj78/SpecMoE/blob/HEAD/Utils/loss.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"28ce87f26ae8ccce"}},{"code_sha256_prefix":"f72b10a64ad58192","entry":"stats","repo":"TeraXj78/SpecMoE","repo_kind":"found_in_text","path":"Trainers/Finetuning_trainer.py","file_url":"https://github.com/TeraXj78/SpecMoE/blob/HEAD/Trainers/Finetuning_trainer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"f72b10a64ad58192"}},{"code_sha256_prefix":"08b4b321d2acf3db","entry":"trunc_normal_","repo":"935963004/LaBraM","repo_kind":"found_in_text","path":"modeling_pretrain.py","file_url":"https://github.com/935963004/LaBraM/blob/HEAD/modeling_pretrain.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"08b4b321d2acf3db"}},{"code_sha256_prefix":"f093ae99d7a7ca0c","entry":"weighted_CrossEntropyLoss","repo":"TeraXj78/SpecMoE","repo_kind":"found_in_text","path":"Utils/loss.py","file_url":"https://github.com/TeraXj78/SpecMoE/blob/HEAD/Utils/loss.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"f093ae99d7a7ca0c"}},{"code_sha256_prefix":"f21c66a6ee126b8d","entry":"welch_psd","repo":"TeraXj78/SpecMoE","repo_kind":"found_in_text","path":"Model_architectures/Finetuning_model.py","file_url":"https://github.com/TeraXj78/SpecMoE/blob/HEAD/Model_architectures/Finetuning_model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"f21c66a6ee126b8d"}},{"code_sha256_prefix":"e5c1c3c93fc46866","entry":"zscore","repo":"TeraXj78/SpecMoE","repo_kind":"found_in_text","path":"Data_loaders/Finetuning_data_loader.py","file_url":"https://github.com/TeraXj78/SpecMoE/blob/HEAD/Data_loaders/Finetuning_data_loader.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"e5c1c3c93fc46866"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.LG","source":"arxiv_2026.jsonl"},"syntology_extracted_results":null}