Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions deepSTRF/datasets/audio/crcns_aa1.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ class CRCNSAA1Dataset(AudioNeuralDataset):
Woolley et al. (2005). "Tuning for Spectro-temporal Modulations: a
Mechanism for Auditory Discrimination of Natural Sound."

Hsu et al. (2004). "Modulation and phase spectrum of natural sounds
enhance neural discrimination performed by single auditory neurons."
Hsu et al. (2004). "Modulation power and phase spectrum of natural
sounds enhance neural encoding performed by single auditory neurons."

Singh & Theunissen (2003). "Modulation spectra of natural sounds and
ethological theories of auditory processing."
Expand Down
4 changes: 2 additions & 2 deletions deepSTRF/datasets/audio/ns1.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

# The precomputed mel-spectrogram tensor (X_nfht: S=20, F=34, hopdim=1, T=999)
# used by the original Harper/Rahman analyses is NOT on OSF, but it IS in the
# DNet companion repo (Rahman et al. 2018 PLoS Comp Biol, doi: 10.1371/
# DNet companion repo (Rahman et al. 2019 PLoS Comp Biol, doi: 10.1371/
# journal.pcbi.1006618 — github.com/monzilur/DNet). The 5 ms version is
# ``test_data_5ms.mat`` (5.2 MB); the 1 ms version (``test_data.mat``, 52 MB)
# is also there but we don't use it. The same file also contains a ``y_nt``
Expand Down Expand Up @@ -93,7 +93,7 @@ def download_ns1(dest: Optional[str] = None) -> str:
per-neuron metadata (.mat), and the spike + wav zip (~155 MB total).
- **DNet GitHub** (https://github.com/monzilur/DNet, master branch): the
precomputed 5 ms mel-spectrogram tensor ``test_data_5ms.mat``
(5.2 MB) accompanying Rahman et al. 2018 PLoS Comp Biol. NOT on OSF.
(5.2 MB) accompanying Rahman et al. 2019 PLoS Comp Biol. NOT on OSF.

Idempotent: skips files that already exist; returns the destination path.

Expand Down
14 changes: 8 additions & 6 deletions deepSTRF/models/audio/audio_zoo.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,9 +548,10 @@ class Transformer(AudioEncodingModel):

References
----------
Rançon, Bornschein, King, Schnupp, Willmore (2025). "Temporal
recurrence as a general mechanism to explain neural responses in
the auditory system." Comm. Bio. (preprint on BioRxiv).
Rançon, Masquelier & Cottereau (2025). "Temporal recurrence as a
general mechanism to explain neural responses in the auditory
system." Communications Biology 8:1456.
https://doi.org/10.1038/s42003-025-08858-3

Vaswani et al. (2017). "Attention Is All You Need." NeurIPS.

Expand Down Expand Up @@ -710,9 +711,10 @@ class StateNet(AudioEncodingModel):

References
----------
Rançon, Bornschein, King, Schnupp, Willmore (2025).
"Temporal recurrence as a general mechanism to explain neural
responses in the auditory system." Comm. Bio. (preprint on BioRxiv).
Rançon, Masquelier & Cottereau (2025). "Temporal recurrence as a
general mechanism to explain neural responses in the auditory
system." Communications Biology 8:1456.
https://doi.org/10.1038/s42003-025-08858-3

Notes
-----
Expand Down
8 changes: 4 additions & 4 deletions deepSTRF/models/prefiltering.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,10 @@ class AdapTrans(nn.Module):

References
----------
Rançon, Bornschein, King, Schnupp, Willmore (2024). "A general
theoretical framework unifying the adaptive, transient and
sustained properties of ON and OFF auditory responses." BioRxiv.
https://doi.org/10.1101/2024.01.17.576002
Rançon, Masquelier & Cottereau (2024). "A general model unifying
the adaptive, transient and sustained properties of ON and OFF
auditory neural responses." PLOS Computational Biology
20(8):e1012288. https://doi.org/10.1371/journal.pcbi.1012288

Notes
-----
Expand Down
18 changes: 9 additions & 9 deletions docs/_source/md/README_models.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,22 @@ separable kernels. Similar to AdapTrans, prefiltering, hyperparameters for param
to the class constructor.*


Torch class: `Linear(...)`; Parameterization available
Torch class: [`Linear`](https://deepstrf.readthedocs.io/en/latest/_source/deepSTRF.models.audio.html#deepSTRF.models.audio.audio_zoo.Linear); Parameterization available


### Linear-Nonlinear (LN)

*Consists of a Linear model, with an added output activation which makes it nonlinear. The latter often takes the form of
a sigmoid or parameterized function (see e.g. [Rahman et al.]() or [Willmore et al.]()).*
a sigmoid or parameterized function (see e.g. Rahman et al. or Willmore et al.).*

Torch class: `LinearNonlinear(...)`; Parameterization available
Torch class: [`LinearNonlinear`](https://deepstrf.readthedocs.io/en/latest/_source/deepSTRF.models.audio.html#deepSTRF.models.audio.audio_zoo.LinearNonlinear); Parameterization available


### Network Receptive Field (NRF)

*In a nutshell, a LN model with several hidden units.*

Torch class: `NetworkReceptiveField(...)`; Parameterization available; Original paper: [Harper et al. (2016)](https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1005113)
Torch class: [`NetworkReceptiveField`](https://deepstrf.readthedocs.io/en/latest/_source/deepSTRF.models.audio.html#deepSTRF.models.audio.audio_zoo.NetworkReceptiveField); Parameterization available; Original paper: [Harper et al. (2016)](https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1005113)



Expand All @@ -72,7 +72,7 @@ Torch class: `NetworkReceptiveField(...)`; Parameterization available; Original
*In a nutshell, a NRF model in which hidden and output units follow leaky dynamics (as in LIF spiking neurons, but
without spikes), with learnable time constants.*

Torch class: `DNet(...)`; Parameterization available; Original paper: [Rahman et al. (2016)](https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1006618)
Torch class: [`DNet`](https://deepstrf.readthedocs.io/en/latest/_source/deepSTRF.models.audio.html#deepSTRF.models.audio.audio_zoo.DNet); Parameterization available; Original paper: [Rahman et al. (2019)](https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1006618)



Expand All @@ -83,7 +83,7 @@ Torch class: `DNet(...)`; Parameterization available; Original paper: [Rahman et
kernels do not entirely span all frequencies of the input spectrogram. Fully connected prediction head after a convlutional
extraction stage.

Torch class: `ConvNet2D(...)`; Original paper: [Pennington et al.](https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1011110)
Torch class: [`ConvNet2D`](https://deepstrf.readthedocs.io/en/latest/_source/deepSTRF.models.audio.html#deepSTRF.models.audio.audio_zoo.ConvNet2D); Original paper: [Pennington & David (2023)](https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1011110)


### Recurrent / state-space network (StateNet)
Expand All @@ -92,7 +92,7 @@ Torch class: `ConvNet2D(...)`; Original paper: [Pennington et al.](https://jour
/ S4 / LMU). It captures long-range temporal dependencies through the recurrent
state and is the strongest model in the zoo on NS1.*

Torch class: `StateNet(...)`; Original paper: [Rançon et al. (2025)](https://doi.org/10.1038/s42003-025-08858-3)
Torch class: [`StateNet`](https://deepstrf.readthedocs.io/en/latest/_source/deepSTRF.models.audio.html#deepSTRF.models.audio.audio_zoo.StateNet); Original paper: [Rançon et al. (2025)](https://doi.org/10.1038/s42003-025-08858-3)


### Transformer
Expand All @@ -101,7 +101,7 @@ Torch class: `StateNet(...)`; Original paper: [Rançon et al. (2025)](https://do
self-attention mask, so it generalizes to any sequence length. An optional
finite `context_window` makes attention band-causal.*

Torch class: `Transformer(...)`
Torch class: [`Transformer`](https://deepstrf.readthedocs.io/en/latest/_source/deepSTRF.models.audio.html#deepSTRF.models.audio.audio_zoo.Transformer); Architecture: [Vaswani et al. (2017)](https://arxiv.org/abs/1706.03762); designed as the attention baseline in [Rançon et al. (2025)](https://doi.org/10.1038/s42003-025-08858-3)


### ICNet
Expand All @@ -112,7 +112,7 @@ audio directly (no precomputed spectrogram). Designed for midbrain (IC)
recordings; it ports cleanly into deepSTRF but is oversized for small cortical
datasets like NS1.*

Torch class: `ICNet(...)`; Original paper: [Drakopoulos et al. (2025)](https://doi.org/10.1038/s42256-025-01104-9)
Torch class: [`ICNet`](https://deepstrf.readthedocs.io/en/latest/_source/deepSTRF.models.audio.html#deepSTRF.models.audio.ICNet); Original paper: [Drakopoulos et al. (2025)](https://doi.org/10.1038/s42256-025-01104-9)

---

Expand Down
Loading