You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
14 model files have no # License: header line #1141
Most model files start with an # Authors: / # License: header block. Fourteen do not carry a # License: line at all, so their terms are only inferable from the repository default.
This is lower severity than the mismatches in the two issues filed alongside this one, but it shares a root cause: the header convention is a habit rather than something enforced.
Files
braindecode/models/biot.py
braindecode/models/contrawr.py
braindecode/models/eegminer.py
braindecode/models/eegsym.py
braindecode/models/fbcnet.py
braindecode/models/fbmsnet.py
braindecode/models/ifnet.py
braindecode/models/labram.py
braindecode/models/luna.py
braindecode/models/msvtnet.py
braindecode/models/reve.py
braindecode/models/sinc_shallow.py
braindecode/models/sparcnet.py
braindecode/models/tidnet.py
(braindecode/models/config.py is also missing one but is not a model.)
eegminer.py is the notable case: NOTICE.txt already declares it CC BY-NC 4.0, but the file itself says nothing and its Hub metadata reports bsd-3-clause. Its terms currently live in exactly one place, and not the file they govern.
Reproduce:
forfin braindecode/models/*.py;do
sed -n '1,25p'"$f"| grep -qE "^#\s*License:"||echo"$f"done
Suggested fix
Add the header block to each file, matching the surrounding convention:
# Authors: <upstream authors, if a port> (original <name>)# <adapter> (Braindecode adaptation)## License: <license>
For files that are independent implementations from a paper, BSD-3 is presumably right; for ports of released code the upstream license governs and should be named explicitly. eegminer.py should be reconciled with what NOTICE.txt already claims about it.
Worth pairing with a lightweight check so new models cannot land without one.
I originally framed this as "add the missing header block", implying it could be done in one pass. Having fetched the actual LICENSE file from every upstream repository cited in braindecode/models/*.py, that framing was wrong. The information needed to write these headers is a per-file judgment, not a lookup.
Three distinct situations exist among the files without a header:
1. The license is stated, just not in a header line. These only need the text moved into the standard block:
luna.py — a docstring says "the LICENSE Of this file is APACHE-2.0"
eegminer.py — a docstring block states CC BY-NC 4.0 (and NOTICE.txt already lists it as such)
2. The file derives from a non-BSD upstream but claims BSD-3, or claims nothing. Verified upstream licenses:
File
Cited upstream
Upstream LICENSE
biot.py, contrawr.py, sparcnet.py
ycq091044/BIOT
MIT
labram.py
935963004/LaBraM
MIT
cbramod.py
wjq-learning/CBraMod
MIT
attn_sleep.py
emadeldeen24/AttnSleep
MIT
patchedtransformer.py
timonkl/PatchedBrainTransformer
MIT
steegformer.py
LiuyinYang1101/STEEGFormer
MIT
codebrain.py
jingyingma01/CodeBrain
Apache-2.0
eegpt.py
BINE022/EEGPT
Apache-2.0
3. The upstream declares no license at all. Unlicensed code grants no rights to copy, adapt, or redistribute, so a derivative has no license to inherit and no permission to rely on:
A clean-room reimplementation written from a published paper does not inherit the reference implementation's code license; a port of that code does. Several files already assert the former about themselves — fbcnet.py says it "has only been reimplemented from the paper" — and for those, BSD-3 is correct and the upstream license is irrelevant.
So for each file above the question is: was this written from the paper, or adapted from the code? Only the author of each port can answer that reliably. Guessing produces a confidently wrong license header, which is worse than the current missing one, because a wrong header will be relied upon.
Suggested approach: work through them individually rather than in one sweep, recording the answer in the header itself, e.g. # Reimplemented from <paper>; not derived from <repo> versus # Adapted from <repo> (<license>). Category 3 probably deserves reaching out to the upstream authors to ask them to add a license.
Complete sweep: all 65 models, every cited upstream cloned and read
I extracted every GitHub reference from all of braindecode/models/*.py (whole file, not just the header), shallow-cloned all 40 distinct upstream repositories, and read their licence files from disk. 39 models cite an upstream; 41 model→repo references total. Ordered by how much the delta actually matters.
Everything below is conditional on one question that the files do not answer: was each implementation written from the paper, or adapted from the code? A clean-room reimplementation inherits nothing. Only the person who wrote each file knows. That is the work this issue is really about; the table just says which files need the question asked.
Tier 1 — copyleft or noncommercial upstream (a real incompatibility if derived)
File
Declares
Upstream
Upstream licence, read from clone
eegconformer.py
BSD-3
eeyhsong/EEG-Conformer
GNU GPL v3
tsinception.py
BSD-3
deepBrains/TSception
CBCR 1.0 — BSD text with "for non-commercial purpose" in the grant
emg2qwerty.py
CC BY-NC 4.0
facebookresearch/emg2qwerty
CC BY-NC-SA 4.0 — file understates its own terms
GPL is copyleft: if eegconformer.py derives from that code, BSD-3 redistribution is not a notice defect but an incompatibility. Note the only reference to that repo inside eegconformer.py is a hot-linked figure URL, and the file makes no derivation claim either way — so this needs a person, not a script. emg2qwerty.py is the one item here that is unambiguous and fixable today, since the file's own claim is simply wrong.
Apache-2.0 is permissive but carries NOTICE-retention and an explicit patent grant that BSD-3 does not reproduce.
Tier 3 — MIT upstream, BSD-3 or nothing declared
attentionbasenet, attn_sleep, cbramod, eegnex, fblightconvnet, labram, patchedtransformer, steegformer, tcn, usleep, signal_jepa (via facebookresearch/fairseq), and — with no licence line at all — biot, contrawr, sparcnet (all ycq091044/BIOT), eegsym, fbcnet.
Lowest risk: MIT permits relicensing provided the original copyright notice is retained. Mostly an attribution question.
Confirmed two ways — a sparse clone finding no licence file, and the contents API listing no licence file at the repository root. Unlicensed code grants no rights at all, so a derivative has nothing to inherit and no permission to rely on. Where these are reimplementations from papers this is moot; where they are ports it is worth asking the upstream authors to add a licence.
Could not verify
eeginception_erp.py cites Grifcc/EEG, which no longer resolves — renamed, deleted, or private.
Reproduce
grep -ohE "github\.com/[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+" braindecode/models/*.py | sort -u
git clone --depth 1 --filter=blob:none --no-checkout https://github.com/<slug>.git d
git -C d sparse-checkout set --no-cone '/LICENSE*''/COPYING*''/NOTICE*'
git -C d checkout && head -3 d/LICENSE*
Note the GitHub API's license field is not sufficient here — it returned NOASSERTION for both Tier 1 entries that matter most, because CBCR and the Creative Commons texts are not in its classifier.
The GPL finding is resolved — the upstream author contributed the port themselves
Checking git history rather than only the file headers changes the picture substantially, and removes the most serious item in the tier list above.
braindecode/models/eegconformer.py was introduced by commit dfbcf36f (2023-07-28, "Adding Convolutional Transformer model"), authored by eeyhsong <[email protected]> — the owner of eeyhsong/EEG-Conformer, the GPL-3.0 upstream. They have ten commits to the file.
A copyright holder may license their own work under any terms they choose. When the upstream author contributes the port to braindecode, that contribution is made under braindecode's BSD-3, and no GPL obligation attaches. This is not a licensing conflict. Apologies for raising the alarm on it.
The same reasoning covers files where the upstream author contributed directly, and is the correct resolution for a substantial share of the deltas listed above — a point better made in the header than left to be rediscovered.
The one Tier 1 item this does not resolve
braindecode/models/tsinception.py was introduced by commit 01a3e478 (2024-10-01), authored by a braindecode maintainer, not by the Centre for Brain Computing Research who hold the CBCR License 1.0 on deepBrains/TSception. So the author-contribution argument does not apply, and the question stays as originally posed: was it written from Ding et al.'s paper, or adapted from the CBCR-licensed code? If the former, BSD-3 is correct and nothing needs to change.
Suggested framing for the rest
Rather than auditing every delta, the cheaper and more durable fix is to record why each one is fine, in the file where someone will look:
# Contributed by the upstream author under braindecode's BSD-3 license.
or
# Independently implemented from <paper>; not derived from <repo>.
Either line closes the question permanently for that file. Without one, the same audit produces the same false alarms every time someone runs it — as this one just did.
Activity
bruAristimunha commentedon Aug 27, 2026
This is not a mechanical fix — evidence
I originally framed this as "add the missing header block", implying it could be done in one pass. Having fetched the actual
LICENSEfile from every upstream repository cited inbraindecode/models/*.py, that framing was wrong. The information needed to write these headers is a per-file judgment, not a lookup.Three distinct situations exist among the files without a header:
1. The license is stated, just not in a header line. These only need the text moved into the standard block:
luna.py— a docstring says "the LICENSE Of this file is APACHE-2.0"eegminer.py— a docstring block states CC BY-NC 4.0 (andNOTICE.txtalready lists it as such)2. The file derives from a non-BSD upstream but claims BSD-3, or claims nothing. Verified upstream licenses:
biot.py,contrawr.py,sparcnet.pyycq091044/BIOTlabram.py935963004/LaBraMcbramod.pywjq-learning/CBraModattn_sleep.pyemadeldeen24/AttnSleeppatchedtransformer.pytimonkl/PatchedBrainTransformersteegformer.pyLiuyinYang1101/STEEGFormercodebrain.pyjingyingma01/CodeBraineegpt.pyBINE022/EEGPT3. The upstream declares no license at all. Unlicensed code grants no rights to copy, adapt, or redistribute, so a derivative has no license to inherit and no permission to rely on:
abbassalami/eeg-itnet→eegitnet.pySheepTAO/MSVTNet→msvtnet.pySalvoCalcagno/eeg-music-challenge-icassp-2025-baselines→syncnet.pySPOClab-ca/ThinkerInvariance→tidnet.pyWhy this needs a human decision per file
A clean-room reimplementation written from a published paper does not inherit the reference implementation's code license; a port of that code does. Several files already assert the former about themselves —
fbcnet.pysays it "has only been reimplemented from the paper" — and for those, BSD-3 is correct and the upstream license is irrelevant.So for each file above the question is: was this written from the paper, or adapted from the code? Only the author of each port can answer that reliably. Guessing produces a confidently wrong license header, which is worse than the current missing one, because a wrong header will be relied upon.
Suggested approach: work through them individually rather than in one sweep, recording the answer in the header itself, e.g.
# Reimplemented from <paper>; not derived from <repo>versus# Adapted from <repo> (<license>). Category 3 probably deserves reaching out to the upstream authors to ask them to add a license.bruAristimunha commentedon Aug 27, 2026
Complete sweep: all 65 models, every cited upstream cloned and read
I extracted every GitHub reference from all of
braindecode/models/*.py(whole file, not just the header), shallow-cloned all 40 distinct upstream repositories, and read their licence files from disk. 39 models cite an upstream; 41 model→repo references total. Ordered by how much the delta actually matters.Everything below is conditional on one question that the files do not answer: was each implementation written from the paper, or adapted from the code? A clean-room reimplementation inherits nothing. Only the person who wrote each file knows. That is the work this issue is really about; the table just says which files need the question asked.
Tier 1 — copyleft or noncommercial upstream (a real incompatibility if derived)
eegconformer.pyeeyhsong/EEG-Conformertsinception.pydeepBrains/TSceptionemg2qwerty.pyfacebookresearch/emg2qwertyGPL is copyleft: if
eegconformer.pyderives from that code, BSD-3 redistribution is not a notice defect but an incompatibility. Note the only reference to that repo insideeegconformer.pyis a hot-linked figure URL, and the file makes no derivation claim either way — so this needs a person, not a script.emg2qwerty.pyis the one item here that is unambiguous and fixable today, since the file's own claim is simply wrong.Tier 2 — Apache-2.0 upstream, BSD-3 declared
atcnet.py(Altaheri/EEG-ATCNet),codebrain.py(jingyingma01/CodeBrain),eegpt.py(BINE022/EEGPT).Apache-2.0 is permissive but carries NOTICE-retention and an explicit patent grant that BSD-3 does not reproduce.
Tier 3 — MIT upstream, BSD-3 or nothing declared
attentionbasenet,attn_sleep,cbramod,eegnex,fblightconvnet,labram,patchedtransformer,steegformer,tcn,usleep,signal_jepa(viafacebookresearch/fairseq), and — with no licence line at all —biot,contrawr,sparcnet(allycq091044/BIOT),eegsym,fbcnet.Lowest risk: MIT permits relicensing provided the original copyright notice is retained. Mostly an attribution question.
Tier 4 — upstream declares no licence at all
eegitnet,eegsimpleconv,fbmsnet,msvtnet,sinc_shallow,sstdpn,syncnet,tidnet, andsignal_jepa(viaSPOClab-ca/BENDR).Confirmed two ways — a sparse clone finding no licence file, and the contents API listing no licence file at the repository root. Unlicensed code grants no rights at all, so a derivative has nothing to inherit and no permission to rely on. Where these are reimplementations from papers this is moot; where they are ports it is worth asking the upstream authors to add a licence.
Could not verify
eeginception_erp.pycitesGrifcc/EEG, which no longer resolves — renamed, deleted, or private.Reproduce
Note the GitHub API's
licensefield is not sufficient here — it returnedNOASSERTIONfor both Tier 1 entries that matter most, because CBCR and the Creative Commons texts are not in its classifier.bruAristimunha commentedon Aug 27, 2026
The GPL finding is resolved — the upstream author contributed the port themselves
Checking git history rather than only the file headers changes the picture substantially, and removes the most serious item in the tier list above.
braindecode/models/eegconformer.pywas introduced by commitdfbcf36f(2023-07-28, "Adding Convolutional Transformer model"), authored byeeyhsong <[email protected]>— the owner ofeeyhsong/EEG-Conformer, the GPL-3.0 upstream. They have ten commits to the file.A copyright holder may license their own work under any terms they choose. When the upstream author contributes the port to braindecode, that contribution is made under braindecode's BSD-3, and no GPL obligation attaches. This is not a licensing conflict. Apologies for raising the alarm on it.
The same reasoning covers files where the upstream author contributed directly, and is the correct resolution for a substantial share of the deltas listed above — a point better made in the header than left to be rediscovered.
The one Tier 1 item this does not resolve
braindecode/models/tsinception.pywas introduced by commit01a3e478(2024-10-01), authored by a braindecode maintainer, not by the Centre for Brain Computing Research who hold the CBCR License 1.0 ondeepBrains/TSception. So the author-contribution argument does not apply, and the question stays as originally posed: was it written from Ding et al.'s paper, or adapted from the CBCR-licensed code? If the former, BSD-3 is correct and nothing needs to change.Suggested framing for the rest
Rather than auditing every delta, the cheaper and more durable fix is to record why each one is fine, in the file where someone will look:
# Contributed by the upstream author under braindecode's BSD-3 license.or
# Independently implemented from <paper>; not derived from <repo>.Either line closes the question permanently for that file. Without one, the same audit produces the same false alarms every time someone runs it — as this one just did.