BaRISTA-parcels / README.md
julien-gadonneix's picture
Upload README.md with huggingface_hub
69b2637 verified
|
Raw History Blame Contribute Delete
2.75 kB
---
library_name: braindecode
license: other
license_name: usc-academic-non-commercial
license_link: https://github.com/ShanechiLab/BaRISTA/blob/83b27375eba60e9eba9da4e7dd8fb283baace376/LICENSE.md
pipeline_tag: feature-extraction
tags:
- braindecode
- BaRISTA
- ieeg
- seeg
- foundation-model
- pytorch_model_hub_mixin
---
# BaRISTA, parcels scale
The released BaRISTA encoder of [Oganesian, Hashemi and Shanechi
(2025)](https://arxiv.org/abs/2512.12135) for the **parcels** spatial scale,
converted to
[`braindecode.models.BaRISTA`](https://braindecode.org/stable/generated/braindecode.models.BaRISTA.html).
Source: `pretrained_models/parcels_chans.ckpt` at revision
[`83b27375eba60e9eba9da4e7dd8fb283baace376`](https://github.com/ShanechiLab/BaRISTA/tree/83b27375eba60e9eba9da4e7dd8fb283baace376),
sha256 `6c234517d286a8e710b09716dc88c713618670df523cfffb89e4c9073f2657c1`. Conversion renames tensors and fuses the released gated
projections into the single projection this port uses; `convert_barista_weights.py`
in this repository reproduces it. Encoder tokens match the released forward
equations to 3.6e-06 in float32 on CPU.
## Usage
Supply the montage of each batch as `spatial_indices`, an ``(n_chans,)`` tensor of Destrieux parcels in ``[0, 121)``:
```python
import torch
from braindecode.models import BaRISTA
model = BaRISTA.from_pretrained("braindecode/BaRISTA-parcels", n_chans=64, n_outputs=2)
logits = model(torch.randn(8, 64, 6144), spatial_indices=torch.randint(0, 121, (64,)))
```
The saved geometry is 64 channels and 6144 samples at 2048 Hz, the
pretraining window. Mean pooling makes the encoder independent of both, so pass
your own `n_chans`, `n_times` and `n_outputs` when loading.
## Limitations
These files hold the encoder only, as does the release. Braindecode
initializes the classification head on load, so it needs fine-tuning, as does
the learned read-out of the paper's protocol (`pooling="learned"`), which was
never released. The check
above covers float32 CPU encoder tokens, not downstream accuracy, GPU kernels or
mixed precision.
## Citation
```bibtex
@inproceedings{oganesian2025barista,
title={BaRISTA: Brain Scale Informed Spatiotemporal Representation of Human Intracranial Neural Activity},
author={Oganesian, Lucine L. and Hashemi, Saba and Shanechi, Maryam M.},
booktitle={Advances in Neural Information Processing Systems},
year={2025}
}
```
## License
Copyright (c) 2025 University of Southern California. Educational, research and
non-profit use only; commercial use requires an agreement with the USC Stevens
Center for Innovation. See `NOTICE.txt` and the [original licence](https://github.com/ShanechiLab/BaRISTA/blob/83b27375eba60e9eba9da4e7dd8fb283baace376/LICENSE.md).