{"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/spikezip-tf-conversion-is-all-you-need-for","title":"SpikeZIP-TF: Conversion is All You Need for Transformer-based SNN","arxiv_id":"2406.03470","date":"2024-06-05","proceeding":null,"authors":["Kang You","Zekai Xu","Chen Nie","Zhijie Deng","Qinghai Guo","Xiang Wang","Zhezhi He"],"abstract":"Spiking neural network (SNN) has attracted great attention due to its characteristic of high efficiency and accuracy. Currently, the ANN-to-SNN conversion methods can obtain ANN on-par accuracy SNN with ultra-low latency (8 time-steps) in CNN structure on computer vision (CV) tasks. However, as Transformer-based networks have achieved prevailing precision on both CV and natural language processing (NLP), the Transformer-based SNNs are still encounting the lower accuracy w.r.t the ANN counterparts. In this work, we introduce a novel ANN-to-SNN conversion method called SpikeZIP-TF, where ANN and SNN are exactly equivalent, thus incurring no accuracy degradation. SpikeZIP-TF achieves 83.82% accuracy on CV dataset (ImageNet) and 93.79% accuracy on NLP dataset (SST-2), which are higher than SOTA Transformer-based SNNs. The code is available in GitHub: https://github.com/Intelligent-Computing-Research-Group/SpikeZIP_transformer","url_abs":"https://arxiv.org/abs/2406.03470v1","url_pdf":"https://arxiv.org/pdf/2406.03470v1.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":"spikezip-tf-conversion-is-all-you-need-for","repo_url":"https://github.com/Intelligent-Computing-Research-Group/SpikeZIP-TF","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"spikezip-tf-conversion-is-all-you-need-for","repo_url":"https://github.com/intelligent-computing-research-group/spikezip_transformer","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"all","task_name":"All"},{"task_slug":null,"task_name":"SST-2"}],"methods":[{"method_slug":"snn","method_name":"SNN"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2406.03470","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2406.03470"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+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/Intelligent-Computing-Research-Group/SpikeZIP-TF","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/intelligent-computing-research-group/spikezip_transformer","reach":{"status":"ok"}}],"summary":{"ran":3,"ran_honours":2},"by_repo_kind":{"official":{"samples":5,"ran":5,"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":5,"samples":[{"code_sha256_prefix":"713fd1fe3368a910","entry":"floor_pass","repo":"Intelligent-Computing-Research-Group/SpikeZIP-TF","repo_kind":"official","path":"spike_quan_layer.py","file_url":"https://github.com/Intelligent-Computing-Research-Group/SpikeZIP-TF/blob/HEAD/spike_quan_layer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"713fd1fe3368a910"}},{"code_sha256_prefix":"59be98858afaeaf2","entry":"get_logits_loss","repo":"Intelligent-Computing-Research-Group/SpikeZIP-TF","repo_kind":"official","path":"engine_finetune.py","file_url":"https://github.com/Intelligent-Computing-Research-Group/SpikeZIP-TF/blob/HEAD/engine_finetune.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"59be98858afaeaf2"}},{"code_sha256_prefix":"a488bae52f1bfd5d","entry":"grad_scale","repo":"Intelligent-Computing-Research-Group/SpikeZIP-TF","repo_kind":"official","path":"spike_quan_layer.py","file_url":"https://github.com/Intelligent-Computing-Research-Group/SpikeZIP-TF/blob/HEAD/spike_quan_layer.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a488bae52f1bfd5d"}},{"code_sha256_prefix":"112ef145985695f2","entry":"replace_decimal_strings","repo":"Intelligent-Computing-Research-Group/SpikeZIP-TF","repo_kind":"official","path":"engine_finetune.py","file_url":"https://github.com/Intelligent-Computing-Research-Group/SpikeZIP-TF/blob/HEAD/engine_finetune.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"112ef145985695f2"}},{"code_sha256_prefix":"ed1a69e092272dba","entry":"round_pass","repo":"Intelligent-Computing-Research-Group/SpikeZIP-TF","repo_kind":"official","path":"spike_quan_layer.py","file_url":"https://github.com/Intelligent-Computing-Research-Group/SpikeZIP-TF/blob/HEAD/spike_quan_layer.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ed1a69e092272dba"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}