Skip to main content

Dataset

The Spiking Heidelberg Digits (SHD) dataset contains recordings of spoken digits (0–9 in English and German, 20 classes total) converted to spike trains by a cochlear model. Each sample consists of events from 700 auditory channels over a variable duration. The dataset is available under CC BY 4.0.

Architecture

Two hidden layers, feedforward, no recurrence. This matches the architecture class in Zheng et al. 2025’s “without conditions” category. Why threshold=0.3? SHD has ~0.3–0.7% spike density per bin — about 20× sparser than rate-encoded image data. A threshold of 1.0 (suited for dense inputs) produces zero firing on SHD: neurons never accumulate enough charge to spike, and no gradient flows. 0.3 places the firing threshold where surrogate gradients can flow from the first epoch.

Preprocessing

Each SHD sample is a stream of (time_s, channel) events. We bin them into T=100 discrete timesteps at 14 ms per bin (matching the 1.4s maximum sample duration):
Multiple spikes in the same bin and channel are deduplicated (the bin is already 1.0 after the first event).

Training

The complete training script is at templates/keyword-spotting/train.py. Key hyperparameters:
The script downloads the dataset automatically on first run.

Results

Reference band (Zheng et al. 2025, feedforward LIF without special conditions): 63.2–74.8%. The committed result sits within this band, confirming the surrogate-gradient LIF implementation is correct for sparse event-based inputs. See benchmarks/spiking-heidelberg-digits for the full epoch curve and comparisons.

Learning curve highlights

The network learns rapidly in the first 14 epochs (21% → 64.66% best) and then enters a noisy plateau. This is characteristic of feedforward LIF on SHD: the small training set (8,156 samples) and absence of regularisation limit further gains. The best checkpoint is saved and compiled.

Compile and run

The artifact at templates/keyword-spotting/model.thx contains the weights from the committed training run. Three real SHD test samples are bundled in templates/keyword-spotting/samples/ for offline inference.

What to try next

  • Increase hidden size to 1024 and observe the accuracy improvement.
  • Add a learning rate schedule (CosineAnnealingLR) — empirically improves stability after epoch 30.
  • Reduce tau_mem to 10ms and observe faster but noisier dynamics.