{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/training-spiking-neural-networks-using-1","title":"Training Spiking Neural Networks Using Lessons From Deep Learning","arxiv_id":"2109.12894","date":"2021-09-27","proceeding":null,"authors":["Jason K. Eshraghian","Max Ward","Emre Neftci","Xinxin Wang","Gregor Lenz","Girish Dwivedi","Mohammed Bennamoun","Doo Seok Jeong","Wei D. Lu"],"abstract":"The brain is the perfect place to look for inspiration to develop more efficient neural networks. The inner workings of our synapses and neurons provide a glimpse at what the future of deep learning might look like. This paper serves as a tutorial and perspective showing how to apply the lessons learnt from several decades of research in deep learning, gradient descent, backpropagation and neuroscience to biologically plausible spiking neural neural networks. We also explore the delicate interplay between encoding data as spikes and the learning process; the challenges and solutions of applying gradient-based learning to spiking neural networks (SNNs); the subtle link between temporal backpropagation and spike timing dependent plasticity, and how deep learning might move towards biologically plausible online learning. Some ideas are well accepted and commonly used amongst the neuromorphic engineering community, while others are presented or justified for the first time here. The fields of deep learning and spiking neural networks evolve very rapidly. We endeavour to treat this document as a 'dynamic' manuscript that will continue to be updated as the common practices in training SNNs also change. A series of companion interactive tutorials complementary to this paper using our Python package, snnTorch, are also made available. See https://snntorch.readthedocs.io/en/latest/tutorials/index.html .","url_abs":"https://arxiv.org/abs/2109.12894v6","url_pdf":"https://arxiv.org/pdf/2109.12894v6.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"training-spiking-neural-networks-using-1","repo_url":"https://github.com/jeshraghian/snntorch","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"training-spiking-neural-networks-using-1","repo_url":"https://github.com/snntorch/Spiking-Neural-Networks-Tutorials","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"training-spiking-neural-networks-using-1","repo_url":"https://github.com/vinniesun/snntorch-ipu","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}}],"tasks":[{"task_slug":"deep-learning","task_name":"Deep Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2109.12894","atlas_url":"https://app.syntology.ai/?focus=2109.12894","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2109.12894"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/vinniesun/snntorch-ipu","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/jeshraghian/snntorch","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/snntorch/Spiking-Neural-Networks-Tutorials","reach":{"status":"ok"}}],"summary":{"ran":1,"unverified":12},"by_repo_kind":{"official":{"samples":13,"ran":1,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"9062106e0d1564e3","entry":"raster","repo":"jeshraghian/snntorch","repo_kind":"official","path":"snntorch/spikeplot.py","file_url":"https://github.com/jeshraghian/snntorch/blob/HEAD/snntorch/spikeplot.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9062106e0d1564e3"}},{"code_sha256_prefix":"6cf39cc2be131d04","entry":"BatchNormTT1d","repo":"jeshraghian/snntorch","repo_kind":"official","path":"snntorch/_layers/bntt.py","file_url":"https://github.com/jeshraghian/snntorch/blob/HEAD/snntorch/_layers/bntt.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6cf39cc2be131d04"}},{"code_sha256_prefix":"f4a25c42fc8dad96","entry":"BatchNormTT2d","repo":"jeshraghian/snntorch","repo_kind":"official","path":"snntorch/_layers/bntt.py","file_url":"https://github.com/jeshraghian/snntorch/blob/HEAD/snntorch/_layers/bntt.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f4a25c42fc8dad96"}},{"code_sha256_prefix":"6c10455418b336ce","entry":"animator","repo":"jeshraghian/snntorch","repo_kind":"official","path":"snntorch/spikeplot.py","file_url":"https://github.com/jeshraghian/snntorch/blob/HEAD/snntorch/spikeplot.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6c10455418b336ce"}},{"code_sha256_prefix":"80e94757dd7b5417","entry":"atan","repo":"jeshraghian/snntorch","repo_kind":"official","path":"snntorch/surrogate.py","file_url":"https://github.com/jeshraghian/snntorch/blob/HEAD/snntorch/surrogate.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"80e94757dd7b5417"}},{"code_sha256_prefix":"3896bb76fc243f68","entry":"data_subset","repo":"jeshraghian/snntorch","repo_kind":"official","path":"snntorch/utils.py","file_url":"https://github.com/jeshraghian/snntorch/blob/HEAD/snntorch/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3896bb76fc243f68"}},{"code_sha256_prefix":"6c43a215fc755545","entry":"delta","repo":"jeshraghian/snntorch","repo_kind":"official","path":"snntorch/spikegen.py","file_url":"https://github.com/jeshraghian/snntorch/blob/HEAD/snntorch/spikegen.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6c43a215fc755545"}},{"code_sha256_prefix":"39d6f28f7931cae4","entry":"fast_sigmoid","repo":"jeshraghian/snntorch","repo_kind":"official","path":"snntorch/surrogate.py","file_url":"https://github.com/jeshraghian/snntorch/blob/HEAD/snntorch/surrogate.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"39d6f28f7931cae4"}},{"code_sha256_prefix":"ff33f73bd101f4f4","entry":"latency","repo":"jeshraghian/snntorch","repo_kind":"official","path":"snntorch/spikegen.py","file_url":"https://github.com/jeshraghian/snntorch/blob/HEAD/snntorch/spikegen.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ff33f73bd101f4f4"}},{"code_sha256_prefix":"12c24fd008ad281c","entry":"rate","repo":"jeshraghian/snntorch","repo_kind":"official","path":"snntorch/spikegen.py","file_url":"https://github.com/jeshraghian/snntorch/blob/HEAD/snntorch/spikegen.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"12c24fd008ad281c"}},{"code_sha256_prefix":"21541b691597fa54","entry":"spike_count","repo":"jeshraghian/snntorch","repo_kind":"official","path":"snntorch/spikeplot.py","file_url":"https://github.com/jeshraghian/snntorch/blob/HEAD/snntorch/spikeplot.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"21541b691597fa54"}},{"code_sha256_prefix":"49b877a22da662f1","entry":"triangular","repo":"jeshraghian/snntorch","repo_kind":"official","path":"snntorch/surrogate.py","file_url":"https://github.com/jeshraghian/snntorch/blob/HEAD/snntorch/surrogate.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"49b877a22da662f1"}},{"code_sha256_prefix":"703181d83152439e","entry":"valid_split","repo":"jeshraghian/snntorch","repo_kind":"official","path":"snntorch/utils.py","file_url":"https://github.com/jeshraghian/snntorch/blob/HEAD/snntorch/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"703181d83152439e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}