NeuroBench / neurobench

Benchmark harness and baseline results for the NeuroBench algorithm track.
https://neurobench.readthedocs.io
Apache License 2.0
64 stars 13 forks source link

Membrane Updates Metric #205

Closed ben9809 closed 6 months ago

ben9809 commented 7 months ago

Description

This pull request introduces a new performance metric, membrane_updates. This metric counts the number of membrane potential updates within spiking neural networks (SNNs). It tracks these updates across different network neurons.

Motivation

The membrane_updates metric aims to capture membrane potential development over multiple steps by counting stateful operations that, together with the synaptic operations, reflect the actual workload in neuromorphic computing models.

Recent research (https://arxiv.org/pdf/2306.15749v4.pdf) has highlighted the importance of considering stateful operations in the analysis of SNNs.

jasonlyik commented 7 months ago

Looks good @ben9809, could you also cover with a test in tests/test_metrics.py?

Hoping that the memory requirements don't blow up from saving all info under same hook, it should be fine for now since it's just for SNN, but maybe in the future we could use separate hooks.

Could you also add in the docstring of the metric that this metric should only be used with SNNs / also only currently works for SNNTorch?

ben9809 commented 7 months ago

Sure @jasonlyik!!