Out-of-distribution (OoD) detectors, built on top of models trained on a single dataset (in-distribution, ID), should flag test-time inputs that don't belong to that distribution. Spike-like models replace standard ReLU activations with leaky integrate-and-fire (LIF) neurons on conventional ResNet backbones,
operating at a single inference time step to achieve binary spike activations and substantially reduced arithmetic complexity, while remaining competitive with full-precision CNN baselines on OpenOOD benchmarks.
Two difficulties are evaluated: near-OoD (a semantically similar dataset, e.g. CIFAR-100 against a CIFAR-10 model) and far-OoD (a very different one, e.g. SVHN/MNIST). Detectors are scored by AUROC (higher is better) and FPR95 (false-positive rate at 95% true-positive rate, lower is better).
The experiments conform to the OpenOoD benchmark.
How this repository is organized
The code includes the inference-only pipeline, the OoD benchmarks, and one folder per model "family" (architecture + dataset). Within each family, checkpoints are grouped by experiment (loss function + training time steps), then by expansion/seed:
spikingresnet/
├── code/ <- inference and OoD code
├── checkpoints.csv <- every checkpoint in this repo, one row each
└── <family>/<experiment>/T<T>_E<E>_S<seed>/
├── config.json
└── model.safetensors
Every experiment sweeps all 5 seeds (42, 1987, 1991, 2020, 2024) across its listed expansions -- checkpoints.csv gives the exact seed of
every checkpoint -- see "Running an OoD benchmark" below to reproduce the results.
The option --experiment picks which detector to run:
posthoc (default) -- scoring computed directly from a trained model's outputs, no extra training or feature bank needed:
MSP (max softmax probability), Energy, MLS (max logit score), and ASH (activation shaping);
knn -- a k-nearest-neighbors detector over penultimate-layer features.
By default, the benchmark only uses datasets that torchvision downloads automatically (CIFAR-10/100, SVHN, MNIST). The full benchmark also evaluates on Textures (DTD), Places365, and Tiny-ImageNet-200; fetch those directly from their original hosts with:
1@article{spikingresnet_ood,
2 title = {Out-of-Distribution Detection with Spike-Like Networks: Population Coding, Training Depth, and Single-Step Feature Representations},
3 author = {A. Avramović, S. Gajić, V. Jovanović, V. Risojević, D. Sluga},
4 journal = {},
5}