Papers › SpikingBERT: Distilling BERT to Train Spiking Language Models Using Implicit Differentiation

SpikingBERT: Distilling BERT to Train Spiking Language Models Using Implicit Differentiation

21 Aug 2023arXiv:2308.10873archive 2025-07-28

Malyaban Bal, Abhronil Sengupta

Large language Models (LLMs), though growing exceedingly powerful, comprises of orders of magnitude less neurons and synapses than the human brain. However, it requires significantly more power/energy to operate. In this work, we propose a novel bio-inspired spiking language model (LM) which aims to reduce the computational cost of conventional LMs by drawing motivation from the synaptic information flow in the brain. In this paper, we demonstrate a framework that leverages the average spiking rate of neurons at equilibrium to train a neuromorphic spiking LM using implicit differentiation technique, thereby overcoming the non-differentiability problem of spiking neural network (SNN) based algorithms without using any type of surrogate gradient. The steady-state convergence of the spiking neurons also allows us to design a spiking attention mechanism, which is critical in developing a scalable spiking LM. Moreover, the convergence of average spiking rate of neurons at equilibrium is utilized to develop a novel ANN-SNN knowledge distillation based technique wherein we use a pre-trained BERT model as "teacher" to train our "student" spiking architecture. While the primary architecture proposed in this paper is motivated by BERT, the technique can be potentially extended to different kinds of LLMs. Our work is the first one to demonstrate the performance of an operational spiking LM architecture on multiple different tasks in the GLUE benchmark.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2308.10873")

Code

Syntology Ran 13 of 17 code samples harvested from 1 repository linked to this paper; 4 have no recorded run. Of those that ran: 2 ran · honoured contract; 4 ran · our draft was wrong; 1 ran · fixture could not drive it; 6 ran with no contract checked.

By repository: official repository: 17 samples from 1 repository, 13 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

neurocomplab-psu/spikingbert officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

17 samples harvested; 13 ran; 2 honoured the contract we drafted; 4 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · honoured contract
4ran · our draft was wrong
1ran · fixture could not drive it
6ran
4unverified

Licence: 17 of the 17 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from neurocomplab-psu/spikingbert. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: 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. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

swish neurocomplab-psu/spikingbert/transformer/modeling.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · 0f786c407fb1ee4c · report
acc_and_f1 neurocomplab-psu/spikingbert/spiking_bert_task_distill.py official repository ran · fixture could not drive it no licence file found · pointer only · cac113ca87b9d9f3 · report
compute_spectral_norm neurocomplab-psu/spikingbert/implicit_bert/modules/optimizations.py official repository ran fingerprinted no licence file found · pointer only · 3dce841898f3d634 · report
convert_example_to_features neurocomplab-psu/spikingbert/spiking_bert_general_distill.py official repository ran no licence file found · pointer only · f2f5b170e5141470 · report
convert_examples_to_features neurocomplab-psu/spikingbert/spiking_bert_task_distill.py official repository ran no licence file found · pointer only · ca4a60dd9a4dee68 · report
create_instances_from_document neurocomplab-psu/spikingbert/preprocess_training_data.py official repository ran no licence file found · pointer only · 6376a70f6dfc27d6 · report
create_masked_lm_predictions neurocomplab-psu/spikingbert/preprocess_training_data.py official repository ran no licence file found · pointer only · c1f215df4049f030 · report
gelu neurocomplab-psu/spikingbert/transformer/modeling.py official repository ran · honoured contract fingerprinted no licence file found · pointer only · fdc64f4c72036ae4 · report
get_tasks neurocomplab-psu/spikingbert/download_glue_data.py official repository ran · our draft was wrong no licence file found · pointer only · 3caf26b311c98658 · report
line_search neurocomplab-psu/spikingbert/implicit_bert/modules/broyden.py official repository ran · our draft was wrong no licence file found · pointer only · cf5710371bcfb0ab · report
rmatvec neurocomplab-psu/spikingbert/implicit_bert/modules/broyden.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · 968a8f446ad3c5b1 · report
scalar_search_armijo neurocomplab-psu/spikingbert/implicit_bert/modules/broyden.py official repository ran · honoured contract no licence file found · pointer only · b2b5022f654ee4d3 · report
weight_norm neurocomplab-psu/spikingbert/implicit_bert/modules/optimizations.py official repository ran no licence file found · pointer only · f0fda38cdd52aefb · report
create_training_file neurocomplab-psu/spikingbert/preprocess_training_data.py official repository unverified no licence file found · pointer only · a8d00bf9b456b3f6 · report
load_tf_weights_in_bert neurocomplab-psu/spikingbert/transformer/modeling.py official repository unverified no licence file found · pointer only · 0453ed29d1aecc4c · report
simple_accuracy neurocomplab-psu/spikingbert/spiking_bert_task_distill.py official repository unverified no licence file found · pointer only · 3c241ecfe3749a6d · report
weight_spectral_norm neurocomplab-psu/spikingbert/implicit_bert/modules/optimizations.py official repository unverified no licence file found · pointer only · e2f5c84554d935f4 · report

Tasks

Knowledge DistillationLanguage Modelling

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

AdamAttentionAttention DropoutBERTDense ConnectionsDropoutKnowledge DistillationLayer NormalizationLinear LayerLinear Warmup With Linear DecayMulti-Head AttentionResidual ConnectionSoftmaxWeight DecayWordPiece

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections