SPARCNet
Seizures, Periodic and Rhythmic pattern Continuum Neural Network (SPaRCNet) from Jing et al (2023) [jing2023].
Architecture-only repository. Documents the
braindecode.models.SPARCNetclass. No pretrained weights are distributed here. Instantiate the model and train it on your own data.
Quick start
pip install braindecode
from braindecode.models import SPARCNet
model = SPARCNet(
n_chans=22,
sfreq=250,
input_window_seconds=4.0,
n_outputs=4,
)
The signal-shape arguments above are illustrative defaults โ adjust to match your recording.
Documentation
- Full API reference: https://braindecode.org/stable/generated/braindecode.models.SPARCNet.html
- Interactive browser (live instantiation, parameter counts): https://huggingface.co/spaces/braindecode/model-explorer
- Source on GitHub: https://github.com/braindecode/braindecode/blob/master/braindecode/models/sparcnet.py#L13
Parameters
| Parameter | Type | Description |
|---|---|---|
block_layers |
int, optional | Number of layers per dense block. Default is 4. |
growth_rate |
int, optional | Growth rate of the DenseNet. Default is 16. |
bn_size |
int, optional | Bottleneck size. Default is 16. |
drop_prob |
float, optional | Dropout rate. Default is 0.5. |
conv_bias |
bool, optional | Whether to use bias in convolutional layers. Default is True. |
batch_norm |
bool, optional | Whether to use batch normalization. Default is True. |
activation: nn.Module, default=nn.ELU |
โ | Activation function class to apply. Should be a PyTorch activation module class like nn.ReLU or nn.ELU. Default is nn.ELU. |
References
- Jing, J., Ge, W., Hong, S., Fernandes, M. B., Lin, Z., Yang, C., ... & Westover, M. B. (2023). Development of expert-level classification of seizures and rhythmic and periodic patterns during eeg interpretation. Neurology, 100(17), e1750-e1762.
- Yang, C., Westover, M.B. and Sun, J., 2023. BIOT Biosignal Transformer for Cross-data Learning in the Wild. GitHub https://github.com/ycq091044/BIOT (accessed 2024-02-13)
Citation
Cite the original architecture paper (see References above) and braindecode:
@article{aristimunha2025braindecode,
title = {Braindecode: a deep learning library for raw electrophysiological data},
author = {Aristimunha, Bruno and others},
journal = {Zenodo},
year = {2025},
doi = {10.5281/zenodo.17699192},
}
License
BSD-3-Clause for the model code (matching braindecode). Pretraining-derived weights, if you fine-tune from a checkpoint, inherit the licence of that checkpoint and its training corpus.