First public release of deepSTRF — a PyTorch library and benchmark for fitting sensory neural responses with deep neural network models.
pip install deepSTRFHighlights
- Datasets — a zoo of auditory neural-recording datasets (NS1, CRCNS AA1/AA2/AA4, NAT4, CRCNS-AC1, Espejo, Downer 2025, Wingert 2026, Le 2025, Alice EEG) on a common
NeuralDatasetAPI, withdownload=Trueauto-download where data is publicly mirrored. Optional raw-waveform input with awav2specfront-end zoo. - Models — a four-slot encoding template (wav2spec → prefiltering → core → readout): Linear/LN, ConvNet2D, Transformer, StateNet (GRU/Mamba/S4/LMU), DNet, NRF. Strictly causal in eval mode, output rank
(B, N, R=1, T). - Metrics — NaN-aware functional metrics (corrcoef, normalized corrcoef / cc_norm, FVE, Sahani–Linden SNR, CCmax, coherence) and Poisson/MSE losses.
- Training — an opt-in
Fitter(early stopping + best-checkpoint), multi-seed sweeps (fit_multi_seed), optional W&B / TensorBoard loggers. - Pretrained weights — load checkpoints from the Hugging Face Hub via
from_pretrained. - Ships inline type hints (
py.typed).
Documentation: https://deepstrf.readthedocs.io/