All models

snntorch_slstm_sequence

An LSTM cell that emits spikes when its membrane state crosses threshold, stepped one time step per call.

Spiking networks · 13 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (27 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
6.4K
Operations
13
Framework
PyTorch
Recurrent
No
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m10102
Graph hash
763b56d1825ff1831435da148935f0ad495206228e6f75b45ff9a7a9cdb5e89d
Skeleton hash
175135a4f919611090b5cb974b3e219175532d9d21cbaed0f16efa1ccc55e33d
Architecture hash
114a567dba81ec7904d562a193fbaa04eb6e0ab7a8f54bd4a0fa46a2cb2dda0a
Diagram SHA-256
9a175f55b1bf4885e4f1301df696c65499c46af4ce8a7158289010ebcdecd6da
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

SLSTM is snntorch's spiking long short-term memory cell: its hidden states are membrane potential and synaptic current, mem and syn, which correspond to the hidden and cell states h and c in the original LSTM formulation. The four gates are computed as in an LSTM, with the sigmoid function and the Hadamard product, and the output state is then thresholded to determine whether an output spike is generated. The surrogate gradient used for the spike's derivative defaults to the ATan surrogate gradient.

Unlike the LSTM module in PyTorch, only one time step is simulated each time the cell is called. The captured member runs one such step with 16 input features and a 32-wide hidden state, on an input of size (N, X) where N is the batch size, and returns the spike, synaptic current and membrane tensors. By default no reset is applied after a spike, to conform to standard LSTM state behavior; if a reset mechanism is chosen it applies to the membrane state only.

Key idea. A drop-in LSTM cell whose membrane state is thresholded into spikes, trained through a surrogate gradient.

  • SLSTM
  • spiking LSTM
  • snntorch
  • spikingjelly SpikingLSTM
  • spiking neural network
  • SNN
  • recurrent spiking
  • neuromorphic
  • LSTM

AI-written summary, based on the model's documentation and checked automatically against it; not reviewed by a person. Corrections welcome.