Manuscript Offprint
arXiv:2609.08070A Gradient-based yet Spike-Timing-Dependent Solution to the Feedback Learning Problem in Neural Microcircuits
Abstract
The brain uses discrete spikes for dynamic computation, yet, how neural microcircuits (NMCs) solve temporal credit assignment using local spike timing remains a fundamental open question. Dominant spiking neural network (SNN) approaches circumvent this by approximating backpropagation through surrogate gradients, decoupling learning from biological spike timing. Here, we reformulate temporal credit assignment as a state separation problem: extracting task-required components induced by historical perturbations directly from the current neural state. This enables an online feedback learning framework for NMCs through a gradient tunneling (GT) algorithm and the lead-lag expansion technique that derives credit assignment from local synaptic spike timing, while remaining compatible with ANN-SNN hybrid architectures. Experimentally, GT-trained NMCs excel at long-timescale evidence integration and noise-robust memory retention, and perform comparably to leading SNN online learning methods on real-world benchmarks with far fewer parameters. The proposed framework addresses the two-decade-old NMC feedback learning problem and suggests a computationally plausible explanation for the brain's learning mechanisms.
Keywords: Spiking Neural Networks, Brain-inspired Computing, Neural Microcircuits, Online Learning, Biological Cybernetics
1 Introduction
Neural microcircuits (NMCs) of spiking neurons exhibit a powerful capacity for learning complex dynamic patterns in the brain [1, 2], making them a compelling subject for both understanding biological intelligence and developing bio-inspired computational frameworks [3]. Two architectural extremes pervade computational NMC research [4-7]. Liquid state machines (LSMs) fix all recurrent connections and adapt only the readout, supporting biomimetic online learning but capping performance at the edge of chaos [8]. Spiking recurrent neural networks (SRNNs) train all recurrent weights, offering greater dynamic flexibility at the cost of biological realism and higher computational demand.
The choice made by biological NMCs falls precisely between these two extremes. Maass et al. [9] mathematically proved that introducing sparse feedback connections within an NMC endows it with universal computational capability. However, this theoretical completeness has not translated into a practical learning rule: in the nearly two decades since, determining learning signals for feedback connections automatically has remained an open question [9-11]. We term this the NMC feedback learning problem, which constitutes the first challenge addressed in this work. Its fundamental difficulty lies in the fact that feedback learning inherently requires solving the temporal credit assignment problem online [12]: accurately attributing an output error signal, based on spike timing, to each preceding causal synaptic event.
This same problem has also been targeted by recent online learning algorithms for SRNNs, yet, from a fundamentally different perspective. The dominant approach treats SRNNs as differentiable recurrent networks [13], employing surrogate gradients [14] to approximate backpropagation through time (BPTT) [15]. Methods such as e-prop [16], FPTT [6], and pp-prop [17] have advanced this direction, yet, they share a common limitation: they solve credit assignment for differentiable operators implicitly on a computation graph, rather than for spike timing itself. Under this framework, achieving sparse feedback comparable to biological networks remains infeasible, and training is highly sensitive to suboptimal neural dynamics. This constitutes the second challenge addressed in this work: whether spike timing alone can carry the information required for temporal credit assignment. It is a question that has long been circumvented rather than answered.
This work argues that addressing both challenges requires a methodological shift: from tracking dynamics through a computation graph to extracting task-required history directly from the neural population state. Since the current state mixes all past inputs with useful components progressively attenuated, temporal credit assignment becomes a state separation problem: extracting and amplifying, through recurrent connections, those historical perturbations critical for the task (Fig. 1a). This reframing simultaneously enables credit assignment from local spike timing and provides learning signals for sparse feedback connections. The proposed Gradient Tunneling (GT) algorithm with lead-lag expansion implements this strategy, yielding a spike-timing-dependent [18] learning rule that requires only extremely sparse feedback, in contrast to mainstream methods relying on dense computation-graph tracking.
In summary, this work simultaneously addresses two longstanding challenges. First, we establish a practical gradient-based methodology for training NMCs with sparse feedback, realizing the potential of a model that has remained purely theoretical for two decades [9], while ensuring compatibility with artificial neural network (ANN) and spiking neural network (SNN) hybrid architectures. Second, we propose a purely spike-timing-dependent solution to temporal credit assignment that is biologically plausible and generalizable to arbitrary NMC dynamical systems. Since the required information, pre- and postsynaptic spike events, is physically available at biological synapses, the framework suggests a hypothesis: the cerebral cortex may achieve supervised dynamic reshaping relying solely on local spike timing, offering a computationally plausible explanation for the brain's learning mechanisms.
2.1 NMC Feedback Learning
The proposed NMC feedback learning framework recasts temporal credit assignment as a state separation problem (Fig. 1a), in which temporal history is extracted from the current neural state rather than traced backward through a computation graph. To realize this, we establish a stochastic NMC theory where the states of a neural population are modeled as the mathematical expectations of spiking events. This abstraction renders the underlying distributional parameters continuous and differentiable, forming the foundation for the principles derived below.
2.1.1 Intrinsic Stochastic Rate-coding
The key enabler of this stochastic abstraction is the observation that the recurrent component of NMC dynamics can be treated as intrinsic white noise injection. Within an NMC, the internal state of each neuron decomposes into a recurrent component and an autonomous component (see Methods

Fig. 1 The Proposed NMC Feedback Learning Framework. a, Methodologies and solutions for temporal credit assignment problem. b, Procedure of the proposed gradient tunneling algorithm. The blue-framed part denotes the output of each step. For NMC training, a firing rate regularization is also introduced, which is omitted in this figure for simplicity. This regularization mechanism, along with the definition of the causality matrix and other details, can be found in Methods. c, Lead-lag expansion of a feedback NMC. Throughout the entire process, the lag network is implicit and is therefore shown in a light color. Within the stationary window, the time-varying input is omitted and only the stationary firing process within the microcircuit is considered; accordingly, the input is shown in a light color.
for the full LIF formulation):
where is the spike vector, the recurrent weight matrix, the membrane decay coefficient, and the firing threshold. The recurrent component drives the NMC toward the edge of chaos [8], where its autocorrelation rapidly vanishes with increasing time lag [19]. Consequently, is functionally equivalent to white noise injection, endowing the NMC with intrinsic stochasticity. A similar theory, known as neural sampling, has already been demonstrated in SNNs [20]. This property persists robustly even as network dynamics shift during training (validated in Section 2.2).
Under this stochastic interpretation, the NMC executes a rate-coding scheme within a short temporal window, termed the stationary window. Within this window, the firing rate estimated by an iterative moving average (IMA) filter (see Methods) approximates the mathematical expectation of spike events. This stochastic rate-coding property constitutes the mathematical prerequisite for the feedback learning framework.
2.1.2 Lead-lag Expansion and Gradient Tunneling Algorithm
At long time scales, the recurrent connections of an NMC fundamentally shape its dynamical trajectory for effective state separation. But within the short stationary window, the intrinsic stochasticity allows us to temporarily set aside the structural role of recurrence and conceptually convert the NMC into a static two-layer feedforward network (Fig. 1c), where only the causality between current spikes and their lagged version needs to be considered. We term this technique lead-lag expansion.
Building on this expansion and former research by Zheng and Mazumder [21], we propose the causality-gradient theorem (Theorem 1 in Methods), proving that the Jacobian of postsynaptic firing rates can be estimated solely from the timing of pre- and postsynaptic spikes. The proposed Gradient Tunneling (GT) algorithm (Fig. 1b) implements this theorem. Without requiring a computation graph for error propagation, GT enables downstream learning signals to tunnel through the recurrently connected neural population and guide the supervised learning of sparse feedback weights, thereby amplifying and separating task-required state components from the current NMC state. The complete algorithm and its theoretical guarantees are detailed in Methods.
2.2 Verification of the Stochastic Rate-Coding Property
We verify the stochastic rate-coding property through two complementary experiments: theoretical Jacobian estimation under stationary conditions (Fig. 2a) and gradient estimation robustness under non-stationary EEG inputs (Fig. 2b, c).
2.2.1 Estimating Jacobian Matrices under Stationary Input Flows
The stochastic NMC model provides the theoretical foundation for the causality-gradient theorem, which estimates Jacobian matrices of postsynaptic firing rates from spike timing alone. Comparing the Jacobian trace estimated by the GT algorithm with numerical differentiation directly validates this stochastic abstraction: if the NMC's recurrent component indeed functions as intrinsic noise, the GT-estimated Jacobian should closely match the numerically computed one. As shown in Fig. 2a, the correlation coefficients between the GT-estimated and numerically computed Jacobians remain close to 1 for NMC across input firing rates from 0.1% to 0.4%, and are consistently higher than those of a simple LIF layer (the baseline model with zero recurrent weights). These persistent higher correlations align with the theoretical expectation that intrinsic stochasticity enhances the precision of Jacobian estimation. These results confirm the theoretical prediction of the causality-gradient theorem, demonstrating the precision of the stochastic NMC model and establishing the foundation for the GT algorithm. The Jacobian trace construction (Theorem 2 in Methods) explains why low input firing rates produce lower correlation: small denominators amplify the estimation error in the causality matrix. This motivates the firing rate regularization incorporated in the GT algorithm.
2.2.2 Precise Weight Update under Non-stationary Input Flows
The effectiveness of the GT algorithm relies on the stationary window approximation, but whether this approximation holds under non-stationary inputs must be verified. We therefore used strongly non-stationary EEG signals (SEED dataset[23]) for emotion classification with the readout layer frozen, ensuring that any loss reduction can only be attributed to accurate gradient estimation by GT. As shown in Fig. 2b, both loss and accuracy curves consistently improve across training, and this trend holds for various feedback ratios. These results demonstrate that GT can discover effective gradient directions under strongly non-stationary inputs with extremely sparse trainable feedback connections, and that the firing rate regularization successfully stabilizes the neural population activity throughout the learning process. Taken together with the stationary Jacobian estimation results, these findings confirm that the stochastic rate-coding property and its associated gradient estimation mechanism are robust across both stationary and non-stationary conditions.
A core claim of the stochastic rate-coding perspective is that the recurrent component of NMC dynamics can be viewed as intrinsic white noise injection. We verified this by tracing the recurrent component during inference under a randomly selected input segment and testing its properties from two complementary aspects unified by the Wiener-Khinchin theorem [22]. From the spectral perspective, the power a

LIF Layer with Input Firing Rate 0.1
LIF Layer with Input Firing Rate 0.2
LIF Layer with Input Firing Rate 0.3
LIF Layer with Input Firing Rate 0.4
b
Accuracy Curve with Frozen Readout
Firing Rate Evolution
C
Power Spectrum of NMC Recurrent Part
Strength of Correlation with Different Time Delay
Fig. 2 Estimation of Jacobian matrix and weight gradient based on GT algorithm. a, Estimation result of Jacobian matrices for NMC and LIF layers. The NMC contained 512 neurons in a 3D spatial arrangement; the baseline LIF layer had zero recurrent weights. The Jacobian trace from the GT algorithm was compared against numerical differentiation with a 3% firing rate increment. b, Loss, accuracy, and firing rate evolution curves during EEG-based training with frozen readout (SEED dataset, four sub-frequency bands, stationary window set to input length). Results shown for session 1 subject 15 across 4 random seeds using the AdamW optimizer. c, White noise test results of the recurrent component of post-training NMC dynamics, evaluated through power spectrum uniformity (Wiener-Khinchin theorem [22]) and autocorrelation decay at non-zero time delays.
spectrum of the recurrent component was computed across frequency bins and found to be approximately uniform, a hallmark of white noise. From the temporal correlation perspective, the autocorrelation was measured at different time delays across multiple neuronal channels; as shown in Fig. 2c, the mean correlation drops to near zero at any non-zero time delay, indicating strong temporal independence across time steps. Critically, these tests were conducted on post-training NMCs. The results therefore demonstrate that training-induced dynamical drift does not invalidate the white-noise approximation: even as the NMC shifts from its initial dynamics during feedback weight optimization, the stochastic property of the recurrent component persists.
2.3 Temporal Pattern Recognition with GT-trained Feedback NMCs
Building on the validated mechanisms, we evaluate the temporal pattern recognition capability of the proposed NMC feedback learning framework. Our experiments draw from both cognitive science paradigms and real-world datasets, demonstrating the dual contribution of this work: theoretical advances in computational neuroscience and practical utility for machine intelligence systems. The cognitive tasks are designed as mechanism verification experiments with the Lyapunov-tuned LSM as a controlled baseline to isolate the contribution of feedback learning; the EEG tasks then serve as comprehensive benchmarks against a broad range of online learning methods.
2.3.1 Evidence Integration on the Cognitive Task
Evidence integration is an essential function of cortical neural networks. To verify whether the proposed NMC feedback learning framework can realize similar behavior, we implemented the T-maze experiment [16, 17], where the only supervised signal is provided at the end of each trial, making temporal credit assignment especially challenging for online learning algorithms.
a

b
C
Training Loss
Training Accuracy
d
Final States of 5% Feedback NMC

Final States of 15% Feedback NMC
Final States of 25% Feedback NMC
Final States of Lyapunov-tuned LSM
e
f
g
Output Probability (Left)
Population State Space (Left)
Population State Space (Right)
Fig. 3 Evidence Integration Experiment. a, Schematic of the T-maze experiment: seven cues are assigned left or right, and the system accumulates evidence to reach a final decision at the end of each trial. b, NMC model architecture with a residual readout [24], satisfying the universal approximation requirement for equivalence to arbitrary Turing machines [9]. c, Loss and accuracy curves during training for different feedback neuron ratios. The residual readout is identical across all architectures, isolating the effect of feedback connections. d, Distribution of neural population final states (500 test samples) after UMAP [25] dimensionality reduction from 1000D to 3D. e and f, Inference process of trained feedback NMC and corresponding input spike trains. g, Trajectory of neural population states during inference.
On the T-maze benchmark (Fig. 3c), NMCs with feedback connections achieve effective temporal credit assignment from the terminal signal alone, while the Lyapunov-tuned LSM—lacking trainable feedback—fails to do so. This contrast demonstrates that the proposed feedback learning framework endows NMCs with evidence integration capability, going beyond the approximation limits of fixed-reservoir LSMs [1, 9]. Notably, increasing the feedback ratio yields lower final loss and higher accuracy, but also introduces greater training instability. This is because denser feedback connections increase shared recurrent input among neurons, thereby strengthening cross-neural correlations and progressively violating the invariant conditional firing mechanism required by the causality-gradient theorem. This trade-off motivates the sparse uniform feedback scheme adopted in this work.
To investigate how feedback learning reshapes population dynamics, we visualized final state vectors via UMAP (Fig. 3d). Although both the feedback NMC and the Lyapunov-tuned LSM form two clusters, their nature differs fundamentally: the LSM clusters are task-independent because its fixed connectivity cannot adapt to the learning signal, making cluster separation invalid for classification. In contrast, the feedback NMC clusters clearly reflect the evidence integration outcome, where learned feedback connections actively separate states belonging to different terminal decisions.
We further examined how a well-trained feedback NMC integrates evidence during inference (Fig. 3e-g). Despite receiving only a terminal learning signal during training, the model preserves high certainty throughout inference, effectively reorganizing into a finite state machine where decisions are maintained rather than derived step by step. The firing rate trajectories are confined to a low-dimensional manifold of the neural state space that drives high-certainty readout outputs, aligning with the neural manifold literature [26, 27] and suggesting that the proposed feedback learning framework restricts neural dynamics to task-specific subspaces.
2.3.2 Exceeding the Memory Limit under Extreme Input Noise
The incremental add task tests whether the proposed NMC feedback learning framework remains robust under extreme input noise, while also revealing a warm-up phenomenon.
a
Input Spike Trains of Add Task (label = 6)

b
Error during Add Task Training

C
Final Error for Different Sequence Length
Error during Add Task Training (Partial View)
d
Error with Fixed Effective Length
Fig. 4 Scheme and Results of Incremental Add Task. a, Example input spike trains (label 6) with the effective sequence highlighted in blue. Two input channels: a sample channel (firing rate 50%) and an enable channel (square waves). The target is the total number of spikes occurring between two enable signals. b, Root mean square error during training with incremental effective sequence length L, which increases from 15 to 75 in steps of 15 every 4,000 iterations (total input length fixed at 90). Model architecture is identical to that in Fig. 3b. c, Final root mean square error at each L (computed from the last 10 time steps before each increment). d, Root mean square error when training directly at L = 75 for 20,000 iterations. The warmed-up NMC was taken from iteration 1,600 of the incremental training (panel b).
The incremental add task extends the standard add task [6] by introducing an effective sequence length L that controls the signal-to-noise ratio. Specifically, the SNR is determined by the duty cycle of the enable square wave on a 50%-rate sample channel: a larger L narrows the enable window, lowering the SNR and making the task harder. Because NMC dynamics possess fading memory [28], increasing pushes the integration window beyond the network's intrinsic timescale, requiring the network to transcend its temporal capacity.
On this benchmark (Fig. 4b), both the feedback NMC and the classical LSM converge rapidly at short sequence lengths (, SNR dB). When increases at iteration 4,000, however, the LSM's error spikes and never recovers, while the feedback NMC swiftly returns to a low error level. This divergence persists up to (SNR dB), demonstrating that the proposed feedback framework enables NMCs to transcend the memory limits of fixed-reservoir LSMs under severe noise. The terminal errors at each (Fig. 4c) further confirm this progressive performance gap. These findings provide a mechanistic explanation for the superior performance observed in the preceding evidence integration experiment, as the same memory-transcending mechanism also enables evidence accumulation over long temporal horizons.
Apart from the comparison with fixed reservoirs, the incremental training paradigm itself reveals a warm-up effect (Fig. 4d). A feedback NMC pre-trained under incremental complexity converges to a substantially lower final error at than one trained directly from scratch, which—despite outperforming the LSM—shows no sign of further decline. This warm-up effect can be understood through the interplay between state separation and fading memory. The GT algorithm relies on extracting task-critical history from the current neural state, but the NMC's inherent fading memory limits the temporal horizon over which state separation is effective. Direct training at long sequence lengths forces the network to separate state components outside its intrinsic timescale, where the relevant historical signals are too attenuated for reliable gradient estimation. Incremental training circumvents this by first establishing effective feedback connectivity at shorter, tractable timescales, then progressively extending the operating range as the network dynamics adapt. This strategy echoes curriculum learning [29]: by matching the difficulty of the temporal credit assignment problem to the NMC's current dynamical capacity, warm-up enables the network to exceed this intrinsic memory limit.
2.3.3 Generalization Capability on Real-world Temporal Pattern Recognition Tasks
The evidence integration experiment and the incremental add task generate unlimited synthetic data, whereas real-world applications must learn from limited datasets. To assess practical applicability, we therefore evaluated the proposed framework on a speech recognition task and an EEG-based emotion recognition (EER) task (Fig. 5).
For the speech recognition task, we used the SHD dataset [30] and repeated the experiment under four random seeds. Without surrogate gradients and using only local spike timing, the GT-trained feedback NMC achieved 73.61 % accuracy. Compared with online learning methods relying on surrogate gradients, the feedback NMC significantly outperformed e-prop (67.54 %, under -test) and FPTT (67.24 %, ), although it still lags the most recent pp-prop method (Table E2 in Appendix E). However, as the EER results below show, there is insufficient evidence that the proposed method is inherently inferior to pp-prop in temporal credit assignment capability. To verify that this capability stems from the GT algorithm rather than the readout network alone, we set the GT learning rate to 0. Accuracy dropped significantly (Fig. 5a), and GT training visibly reshaped the NMC's firing-rate trajectories in a state separation manner (Fig. 5b, see also Supplementary Movie 1, in which firing rates of task-required dimensions increase and vice versa). These results demonstrate that the proposed feedback learning framework generalizes to real-world speech recognition without surrogate gradients.
To further probe generalization under low SNR, strong non-stationarity, and inter-subject variability, we applied the LibEER standard to three EER tasks. These are three-category classification on the SEED dataset and valence and arousal binary classification on the DEAP dataset (DEAP-V and DEAP-A). Compared with all the baselines (see Section 4.5), the feedback NMC achieved the best performance across all four SEED metrics (accuracy 60.22 %, F1 58.04 %, substantially above the 33.3 % chance level for three-class classification). It also attained the highest accuracy on DEAP-V (73.93 %) and the highest precision (64.37 %), recall (65.21 %), and F1 score (63.36 %) on DEAP-A (Fig. 5c). These results demonstrate that GT-trained NMCs generalize effectively to real-world biological signals under limited data conditions.
Finally, we compared the computational cost of temporal credit assignment across these SNN online learning methods. The sparse uniform feedback mechanism (Section 4.4) and sparse weight initialization (Appendix B) sharply reduce recurrent connectivity. Relative to the two fully connected SRNN baselines, the number of trainable recurrent connections falls to 0.43% of the original count (Fig. 5d). This yields a a
b


C

d
e


f
g


Fig. 5 Generalization Capability Analysis and Computational Efficiency Comparison. a, GT ablation results on the SHD dataset, on the same NMC model with 1000 LIF neurons. The experiment was repeated under four random seeds, and Welch's t-test confirms the drop is significant (p = 0.0004). Full SHD metrics are provided in Table E2 in Appendix E. b, Firing rate trajectories at the beginning and the end of SHD training on the same arbitrarily selected sample, showing that the GT algorithm reshapes NMC dynamics. The firing rates are approximated as IMA outputs. c, Classification accuracies on the SEED, DEAP-Valence and DEAP-Arousal tasks under the LibEER benchmark (mean ± standard error). Detailed results, including additional ANN baselines, are provided in Tables E3 and E4 in Appendix E. d, Total and trainable recurrent connections of SNN online learning methods. Detailed data are provided in Table E5 in Appendix E. e, Training speed (seconds per iteration) comparison. f, Schematic diagram of the nested sub-network within a feedback NMC. g, Ablation results on the SEED dataset comparing sub-network output (readout from the 25-neuron nested sub-network) with peripheral output (readout from peripheral neurons at maximal distance from the nested sub-network, selected via Eq. 9 with offset 10).
training speed approximately 2.0× faster than LTC-SNN with FPTT and 6.9× faster than SRNN with D-RTRL (Fig. 5e). Notably, this speedup remains modest relative to the parameter reduction, suggesting that training efficiency would improve substantially on specialized neuromorphic processors.
2.4 Nested Sub-network of a Feedback NMC
In contrast to classical LSM reservoirs, the proposed feedback NMC implicitly exhibits a heterogeneous architecture comprising a peripheral network and a nested sub-network (Fig. 5f). The nested sub-network, though containing significantly fewer neurons, consists of interconnected feedback neurons with fully trainable weights and plays a fundamental role in shaping NMC dynamics.
The ablation experiment (Fig. 5g) confirms its functional significance: accuracy with sub-network output consistently exceeds that of peripheral output across all three sessions, with negligible drop relative to the full model, whereas peripheral output degrades substantially. These results indicate that the nested sub-network serves as the functional core driving temporal pattern recognition, aligning with biological observations of distributed mixed selectivity [27], wherein neurons bound to a common neural manifold are sparsely distributed across a broader cortical circuit.
3 Discussion
In the Introduction, we asked two questions: whether feedback connections in an NMC can be trained by a practical online rule, and whether spike timing alone suffices for temporal credit assignment. The proposed NMC feedback learning framework answers both through state separation, yielding a sparse, spike-timing-dependent learning rule that is theoretically grounded, empirically validated, and computationally plausible as a model of cortical learning. Moreover, its stochastic computing and sparse feedback align naturally with neuromorphic hardware design for its robustness and efficiency requirements [31, 32].
3.1 Searching and Emerging Mechanism for Long Timescale
Although single-step update directions are theoretically guaranteed only for the terminal state of the NMC trajectory, the GT algorithm remains effective even when the stationary window is far shorter than the input length. This is because each update step simultaneously serves two objectives: shaping the global attractor and optimizing the terminal output for the task. Only weight changes that benefit both objectives accumulate, whereas those that favor one at the expense of the other are progressively overwritten. This implicit selection pressure lets robust feedback connectivity emerge without the direct output feedback of traditional methods [9–11], making the framework a generally applicable spike-based learning approach.
3.2 Bridging the Contradiction Between Gradient and Spike-timing
In dominant SNN frameworks, gradient-based learning treats spike discreteness as a mathematical obstruction, thereby decoupling learning from the signals, i.e., the spikes, that define neural computation. Gradient-based learning, the most powerful learning paradigm in use today [33], would therefore appear inherently incompatible with the spike-timing-dependent learning employed by the brain. However, the proposed gradient-based yet spike-timing-dependent solution bridges this apparent contradiction by operating on the distributional parameters of spiking activity rather than on the spike events themselves.
This approach simultaneously echoes the spike-timing-dependent plasticity (STDP) rule and the Neural Gradient Representation by Activity Differences (NGRAD) hypothesis [34], both central to computational neuroscience. While STDP has served as a cornerstone of unsupervised adaptation [35, 36], classical rules remain largely descriptive and lack a mechanism for propagating task-specific error signals across time [18]. Formalizing this timing dependency into a mathematically grounded eligibility trace, the GT algorithm bridges phenomenological plasticity and rigorous supervised learning, showing how local spike coincidences enable temporal credit assignment. The causality-gradient theorem is also consistent with the NGRAD hypothesis: the variation in conditional postsynaptic firing probability corresponds to an activation difference that GT estimates, though without explicit perturbation. Since the required information, i.e., pre- and postsynaptic spike events, is locally available at biological synapses, the stochastic NMC theory and the GT algorithm offer a computationally plausible hypothesis for cortical learning. Whether the cortex actually exploits this mechanism remains a question for neurophysiological investigation, as the present evidence is computational rather than biological.
3.3 Limitations and Future Works on Spiking Neural Circuits
Sparse feedback endows an NMC with universal computational capacity [9]. The GT algorithm fulfills this promise because it imposes no new architectural constraints. Theoretical universality, however, does not fully translate into practical generality. First, inherent fading memory makes state separation difficult for long sequences with complex dynamical features. Second, the absence of spatial feature-extraction components limits its suitability for high-dimensional visual streams such as DVS inputs [37]. Moreover, although the non-stationary EEG experiments (Fig. 2b) demonstrate that the network's spiking statistics do not necessarily become non-stationary beyond what the window can track, the precise boundary at which the stationary window approximation breaks down has not been characterized theoretically in this work.
While the current framework addresses feedback learning within a single NMC, cortical networks operate as hierarchical dynamic systems [38, 39]. In principle, the GT algorithm can support backpropagation of learning signals across multiple NMCs, enabling supervised learning in hierarchical systems. This capability suggests a novel architecture termed Spiking Neural Circuits (SNCs), in which multiple NMCs are organized under supervised feedback. The feedback NMC presented here constitutes the minimal realization of an SNC. Further exploration lies beyond the current scope but presents a promising avenue for future research.
4 Methods
We develop the stochastic NMC theory in three successive steps: first formulating the stochastic NMC model as a theoretical abstraction of recurrent microcircuit dynamics, then deriving the causality-gradient theorem and its implementable form from this model, and finally constructing the gradient tunneling (GT) algorithm on this foundation.
The theoretical framework developed in this work encompasses both deterministic dynamical systems and stochastic models. For the deterministic formulation, boldface lowercase letters (e.g., ) denote vectors, uppercase letters (e.g., ) matrices, hat notation (e.g., ) estimators, and tilde notation (e.g., ) expanded forms of the original variables. Specifically, is the spike vector of the neural population at hierarchical level , and the pair describes the pre- and postsynaptic activity between adjacent populations, which are internally recurrently connected rather than strictly feedforward. For the stochastic formulation, uppercase letters (e.g., ) denote scalar random variables, with and the presynaptic and postsynaptic firing events of a specific synapse. The Hadamard product and element-wise division formulate the core operations of the GT algorithm.
4.1 Stochastic NMC Model
Following Ref. [21], a layer of spiking neurons with threshold can be described stochastically as
where the pre- and postsynaptic spike trains are modeled as realizations of the stochastic Bernoulli processes and , respectively. The vector-valued stochastic process captures the internal state of the neurons. Here, we posit that this formulation can equally describe the input–output relationship of an NMC. If the spike processes and remain strictly stationary within a discrete time interval , we refer to as a stationary window. Applying Eq. 2 within this window forms the theoretical foundation of our feedback learning framework, and we term this formulation the stochastic NMC model. Presynaptic trains can thus model both the inputs to an NMC and the spike trains generated by its feedback neurons (Section 4.4).
While the stochastic NMC model serves primarily for theoretical analysis, the actual system dynamics correspond to the following classical deterministic formulation widely used in NMC research:
This deterministic dynamical system, also introduced in Section 2.1, represents a concrete NMC implementation based on leaky integrate-and-fire (LIF) neurons and adhering to Dale's principle [40]. To clarify the correspondence between Eqs. 3 and 2, we decompose the membrane potential dynamics in Eq. 3 into a recurrent component and an autonomous component , defined as:
By simplifying Eq. 3 to focus exclusively on the relationship between the bipolar input spikes and the unsigned output spikes , the dynamics can be rewritten as
Because the NMC operates near the edge-of-chaos regime (Section 2.1.1), the recurrent component can be approximated as a realization of intrinsic white noise injection , whereas the autonomous component encapsulates the membrane potential history and thereby preserves the neuronal state. Comparing Eq. 4 with Eq. 2, the sum serves as the realization of the intrinsic state process . After absorbing the polarity of into , the unsigned spike trains and correspond to the realizations of and . The stochastic NMC model thus provides a theoretical abstraction of classical NMC dynamics. For all numerical simulations and algorithmic implementations in this work, however, we exclusively employ the deterministic LIF-based formulation.
Although the stationary window is a conceptual prerequisite for strict stationarity in the theoretical analysis, in practice its duration is a hyperparameter used exclusively for firing rate estimation, whereas evidence integration is realized by the intrinsic state evolution (Section 3.1). For highly non-stationary and bursty inputs, the window should therefore be kept significantly narrower than the total sequence length, so that the network processes approximately stationary spiking events at the late stage of evolution. Window configuration details are given in Section 4.5.
4.2 Basic Theorems
Together with lead-lag expansion, the GT algorithm constitutes the proposed feedback learning framework, and the theorems in this section form its theoretical foundation. Although the core ideas were preliminarily discussed in Ref. [21], we rigorously formalize them here and refine the assumptions. Proofs are provided in Appendix A. Because the stochastic NMC model characterizes only the instantaneous input-output relationship at each time step, these theorems are its natural extensions to the temporal causal dependencies required for gradient estimation, thereby ensuring full mathematical compatibility.
4.2.1 Causality-Gradient Theorem
The causality-gradient theorem (Theorem 1) establishes that the Jacobian of postsynaptic firing rates with respect to presynaptic firing rates can be expressed as a difference of conditional firing probabilities, thereby bridging spike timing and synaptic weight updates.
Theorem 1 (Causality-Gradient Theorem).
Let denote the firing event of a postsynaptic neuron, which depends on the firing events of presynaptic neurons , where . For any given , assuming that the conditional firing mechanism is invariant to changes in the presynaptic firing rate, i.e.,
the partial derivative of the postsynaptic expectation with respect to the -th presynaptic expectation is given by the difference in conditional probabilities:
The invariance assumption holds when the distributional parameters governing presynaptic activity, rather than the spike events themselves, are not tightly coupled: in network terms, presynaptic neurons converging onto a common target should not exhibit strong recurrent interconnections. Although feedback neurons are influenced by the circuit's recurrent dynamics, the sparse uniform feedback scheme suppresses these cross-neural correlations (Section 4.4). The invariance condition therefore remains numerically robust and practically valid throughout training.
Because the effective connectivity of a lead-lag expanded NMC depends not only on synaptic weights but also on the dynamical trajectory preceding the stationary window, this invariance is especially important for feedback learning in NMC neuronal populations [28, 41].
4.2.2 Implementable Form Based on Local Spike-Timing
While Theorem 1 establishes a theoretical link between spike timing and synaptic weight updates, its reliance on explicit conditional firing probabilities precludes direct algorithmic implementation. To bridge this gap, Theorem 2 extends the causality-gradient theorem to a stochastic process framework. Consequently, within a stationary window, the desired gradient can be estimated from the expectation of a stochastic process (extending the prototype of Zheng et al. [21]), making it implementable for the stochastic NMC model.
Theorem 2 (Implementable Form Based on Local Spike-Timing)
Let and denote the postsynaptic and presynaptic firing processes, respectively, governed by the stochastic NMC model. If the following conditions hold:
(C1) Both processes are strictly stationary, i.e., and for any ;
(C2) For any time indices h and k, the pair satisfies the invariance of conditional firing mechanism (cf. Theorem 1);
(C3) For any , the postsynaptic firing event and synchronous firing event are separately uncorrelated with time-shifted presynaptic firing event , i.e., and .
Then, the gradient of the postsynaptic firing rate with respect to the presynaptic firing rate can be expressed as:
where process is defined as:
and is arbitrarily given.
Condition C3 requires rapid decorrelation with increasing time lag, a property that emerges naturally in sequentially evolving NMC systems (verified in Section 2.2). Condition C1 requires network stability but imposes no constraints on input stream stability.
4.3 Gradient Tunneling Algorithm
Given a mini-batch of samples, the GT algorithm optimizes the generalized input weight matrix by back-propagating learning signals using input and output spike trains , where denotes the sample index. For recurrently connected NMCs, encompasses both feedforward input weights and feedback weights (Section 4.4), enabling GT to be applied to NMC feedback learning. The batch size is unrestricted; when it reduces to unity, GT operates as a strictly online learning method. The overall procedure is shown in Fig. 1b.
To apply the causality-gradient theorem, a causality matrix is constructed as
(5) where is a hyperparameter that controls spike-count smoothing, set to 3 throughout this work. The matrix extends the stochastic process from Theorem 2 to the mini-batch setting. Based on this matrix, the GT algorithm comprises a local tracing step, a global tunneling step, and a firing rate regularization mechanism.
4.3.1 Local Tracing
The IMA filter with coefficient is defined as:
where denotes the initial state of the filter. During the forward propagation, the following two variables are continuously tracked using this filter:
The above variables can be regarded as approximations of mathematical expectations within a stationary window, and the coefficient of the IMA filter can be determined by the preferred window length (see Appendix B). As an online learning method, the downstream learning signal can be implemented at any time. Once the downstream learning signal arrives at time , the approximation of the presynaptic firing rate is first rearranged into the following form:
Since the shape of is the same as the weight matrix , can be called the synaptic form of firing rates. Based on and , we define the eligibility trace as
and the Jacobian trace as
Serving simultaneously as the output of local tracing and the input of global tunneling, the eligibility trace is a key component for solving temporal credit assignment and echoes biological eligibility traces [16]. The Jacobian trace, an approximation of the Jacobian matrix, back-propagates learning signals.
4.3.2 Global Tunneling
The learning signal estimates the partial derivative of the loss with respect to the expected postsynaptic firing events. Since back-propagation is recursive, given with respect to the postsynaptic spikes , the corresponding learning signal for upstream neurons is
When the GT algorithm is combined with stochastic gradient descent (SGD), the learning signal and the eligibility trace yield the weight update rule
where denotes the learning rate (set to 1 or 0.1), and is the synaptic form of :
The matrix in Equation 8 constitutes the gradient estimate, so the optimizer is not limited to SGD; we use AdamW [42] for faster convergence.
Since the definition of the causality matrix (Equation 5) does not account for the connectivity status of neuron pairs, the eligibility trace may remain non-zero even when an input connection weight is zero. In such cases, Equation 8 would yield an infinite weight increment, which is numerically unrealizable. Therefore, the connectivity structure remains consistent with the initialization throughout training, ensuring that only initially non-zero weights are updated. The feedback weight initialization is integrated into the input weight initialization process, as detailed in Appendix B.
4.3.3 Firing Rate Regularization
Because the stochastic property of an NMC is strongly modulated by neuronal firing rates (Section 2.1) and ultra-low rates degrade gradient estimation (Section 2.2), the GT algorithm regularizes the population firing rate toward a pre-defined target . For any sample with index and NMC neuronal population with index , a regularization term is constructed from the average firing rate across all neurons:
For a whole mini-batch containing samples, regularization terms are averaged in the final loss. Letting the regularization coefficient be , the regularized loss with respect to can be described as
where denotes the original loss. Treating the regularization as approximately independent of upstream microcircuits lets it be implemented locally during weight updating. With the regularization term, the implementable update rule of the GT algorithm becomes
where
where . Since the regularization term is decoupled from upstream weights, it does not enter learning signal back-propagation; Equation 7 therefore holds in the final GT algorithm.
4.4 Scheme for Feedback Connection
Feedback learning based on the GT algorithm requires two conditions. First, since the only trainable weight in GT is the generalized input weight , the feedback signals must be treated as input channels, so that the trainable feedback weights are incorporated into . Second, to satisfy the causality-gradient theorem, feedback signals generated by the NMC must be approximately uncorrelated in their firing mechanisms.
The above constraints lead to a key technique for modeling the trainable feedback explicitly, namely lead-lag expansion with sparse uniform feedback. As illustrated in Fig. 1c, the lead-lag expansion treats a single NMC as a cascade of its instantaneous version (lead) and a time-lagged version (lag), with feedback signals derived from the previous spiking state . Because the recurrent connections are generated from Euclidean distances (Appendix B), correlations weaken with inter-neuron distance, so the scheme selects a small proportion of (sparse), preferring widely separated neurons (uniform). This sparse uniform feedback scheme is realized by
(9) where denotes the -th entry of , denotes the offset (generally ), and satisfies . Thus, the dynamics of the proposed feedback microcircuit can be described as
where is trainable by the gradient tunneling algorithm. All neurons share a common threshold, so all entries of are set to . Notably, the input spike train is not required to follow the stochastic rate-coding scheme. In this scenario, the input weight matrix is stochastically generated and frozen, allowing the entire NMC model to act as a general learner for arbitrary dynamic patterns (see Section 3.3 for further discussion).
Within the stationary window, the lead-lag expanded NMC therefore reduces to a two-layer fully connected network (Fig. 1c), with the original inputs and non-trainable recurrent connections omitted.
4.5 Experiment Setup for Dynamic Pattern Recognition
4.5.1 Evidence Integration Task
The T-maze evidence accumulation task, adapted from [5] and [17], serves as a classical cognitive benchmark. Each training iteration utilizes input spike trains comprising 100 channels, which are equally partitioned into four functional groups representing left cues, right cues, recall signals, and background noise. The total sequence spans 360 time steps and is uniformly divided into nine temporal blocks: seven dedicated to cue presentation, one for a resting interval, and one for recall. Within both the cue and recall blocks, the corresponding channels remain inactive during the initial 20% of their duration and subsequently generate spikes stochastically at a 50% firing rate for the remaining 80%. In contrast, the noise channels maintain a constant 10% firing rate throughout the entire trial. For the model configuration, the NMC consists of 1,000 LIF neurons, spatially embedded within a 3-dimensional Euclidean cube of edge length 10 to facilitate distance-based recurrent weight generation (see Appendix B; this spatial configuration is maintained consistently across all experiments). Since the model makes its final decision during the recall block, the stationary window width is set to half the recall block length (20 time steps). A fully connected residual readout module is employed at the output stage, wherein the 1,000-dimensional state vector is first projected into a 100-dimensional latent space and subsequently mapped back to the original dimensionality to establish the residual connection.
4.5.2 Incremental Add Task
The incremental add task is implemented as a spike-based variant adapted from Refs. [6, 43]. During training, the effective sequence length is progressively increased from 15 to 75, while the total input sequence length remains fixed at 90 time steps. The sample channel generates spikes at a constant firing rate of 50%, whereas the enabling channel comprises two square-wave pulses, each spanning 4 time steps. The network architecture is identical to that of the evidence integration task, with the exception of the population scale, which consists of 512 neurons arranged in a cubic lattice with an edge length of 8. The feedback ratio is maintained at 10%. To ensure training stability, the learning rate for the GT algorithm is initialized at 1 and halved every 4,000 iterations, whereas the readout learning rate is kept constant at throughout the entire training process. The stationary window width should be as narrow as possible to ensure accurate rate estimation, since the enable signal may appear at any position in the effective sequence. Following the lower bound in Appendix B that unifies causality matrix and firing rate estimation, we set the width to 15 time steps.
4.5.3 Speech Recognition on the SHD Dataset
To evaluate the generalization capability of the feedback learning framework in temporal credit assignment, we applied it to the SHD dataset [30]. All models were selected by the same test-set-based criterion which follows the convention [17, 44]. Raw event streams were binned into 100 time steps of 14 ms across 700 cochlear channels, and only the first 50 time steps of each sample were presented to the models; the remaining half of the sequence, which contains almost no spike events, was discarded to reduce training cost. As a controlled condition of the comparison, all models observed the same 50-step input window and updated their weights using only a single terminal loss computed at the final time step, without any intermediate or auxiliary classification loss. All models used 1,000 spiking neurons in a single recurrent branch. For the feedback NMC, the feedback dimensionality was set to 700, matching the number of SHD input channels. Performance differences between methods were assessed with independent-samples t-test.
To demonstrate the compatibility of the feedback learning framework with ANN-SNN hybrid architectures, the feedback NMC was combined with a GLU-Residual readout [24, 45] that maps the terminal firing rates of the NMC to class logits; its architecture and training configuration are summarized in Table C1. In contrast, the readouts of all baselines were designed following the original papers and official implementations of the respective methods, so that the comparison isolates the online learning rules operating in the recurrent layer; the readout configurations of the baselines are detailed in Appendix C.
4.5.4 EEG-based Emotion Recognition
To evaluate generalization capability on real-world benchmarks, we adopted the LibEER subject-dependent standard [46] on three EEG-based emotion recognition (EER) tasks: three-category classification on the SEED dataset [23], and valence/arousal binary classification on the DEAP dataset [47]. For each subject, data were split into training, validation, and test sets (6:2:2) and segmented into 3-second clips (200 time steps for SEED, 128 for DEAP). In preprocessing, a well-adopted 14-electrode scheme [48, 49] was applied, and simplified frequency-domain entropy sequences (FES) for four sub-frequency bands (Theta 4–8 Hz, Alpha 8–14 Hz, Beta 14–31 Hz, Gamma 31–40 Hz [50]) were extracted. Analog signals were converted into spike trains via an improved Ben's Spiker Algorithm (BSA, see Appendix D), yielding 14 spike channels per frequency band. For NMC-based methods, four independent neuronal populations were trained, one per frequency band, each processing 14-channel spike trains. Because emotion features in nonstationary input streams are expected to be time-invariant, the stationary window widths were set equal to the input clip length. Final states of the four populations were concatenated and classified via Softmax regression. For a rigorous comparison, the reproduced baseline models span three categories: (1) fundamental RNNs trained by offline BPTT (LSTM, GRU); (2) the EER-specific ANN EEGNet [51]; (3) SNN baselines covering Lyapunov-tuned LSM, LTC-SNN with FPTT [6], LSNN with e-prop [16], and SRNN with D-RTRL and pp-prop [17]. All recurrent models (LSTM, GRU, LTC-SNN, LSNN, SRNN and LSM) used 512 hidden neurons, with NMC neural populations substituted by the corresponding dynamical modeling method while keeping the same experimental design. Experiments were conducted on an NVIDIA RTX 4090 GPU and AMD EPYC 9354 CPU under PyTorch v2.2.2 (D-RTRL and pp-prop used BrainTrace [17] v0.1.2 with JAX v0.9.1), with JIT compilation disabled during top-level temporal traversal and batch size 512.
Data availability
The datasets analyzed during the current study are publicly available in the following repositories: http://www.eecs.qmul.ac.uk/mmv/datasets/deap/ (DEAP dataset [47]), http://bcmi.sjtu.edu.cn/seed/ (SEED dataset [23]).
Code availability
All code is made available under https://github.com/OskajhZ/NMC-Gradient-Tunneling.
Acknowledgment
This work is supported by Beijing Natural Science Foundation under grant QY25261. We are also grateful to Siyu Meng for verifying the mathematical formulations.
Author contributions
Xiangnan Zhang developed the stochastic NMC theory and derived the NMC feedback learning framework. Xiangnan Zhang and Jingxin Liu performed the simulation experiments, and wrote and revised the original draft. Ranqi Lu assisted in refining the theory and improving the manuscript. Jingyu Liu, Fuze Tian, Lixian Zhu, and Björn W. Schuller critically revised the manuscript. Qunxi Dong, Lixian Zhu, Bin Hu, and Björn W. Schuller supervised the project and acquired funding for it.
Competing interests
The authors declare no competing interests.
References
[1] Maass, W. & Markram, H. On the computational power of circuits of spiking neurons. J. Comput. Syst. Sci. 69, 593–616 (2004).
[2] Peng, Y. et al. Directed and acyclic synaptic connectivity in the human layer 2-3 cortical microcircuit. Science 384, 338–343 (2024).
[3] Li, G. et al. Brain-inspired computing: A systematic survey and future trends. Proc. IEEE 112, 544–584 (2024).
[4] Maass, W., Natschläger, T. & Markram, H. Real-time computing without stable states: A new framework for neural computation based on perturbations. Neural Comput. 14, 2531–2560 (2002).
[5] Bellec, G., Salaj, D., Subramoney, A., Legenstein, R. & Maass, W. Long short-term memory and learning-to-learn in networks of spiking neurons. Proceedings of the 32nd International Conference on Neural Information Processing Systems (NeurIPS), 795–805 (2018).
[6] Yin, B., Corradi, F. & Bohté, S. M. Accurate online training of dynamical spiking neural networks through forward propagation through time. Nat. Mach. Intell. 5, 518–527 (2023).
[7] Li, S., Wang, J. & Zareen, S. S. Achieving optimal accuracy and robustness through tight excitatory–inhibitory balance in shallow spiking recurrent neural network. Int. J. Neural Syst. 36, 2650017 (2026).
[8] Legenstein, R. & Maass, W. Edge of chaos and prediction of computational performance for neural circuit models. Neural Netw. 20, 323–334 (2007).
[9] Maass, W., Joshi, P. & Sontag, E. D. Computational aspects of feedback in neural circuits. PLoS Comput. Biol. 3, e165 (2007).
[10] Sussillo, D. & Abbott, L. Generating coherent patterns of activity from chaotic neural networks. Neuron 63, 544–557 (2009).
[11] George, A. M., Dey, S., Banerjee, D., Mukherjee, A. & Suri, M. Online time-series forecasting using spiking reservoir. Neurocomputing 518, 82–94 (2023).
[12] Güttig, R. & Sompolinsky, H. The tempotron: a neuron that learns spike timing-based decisions. Nat. Neurosci. 9, 420–428 (2006).
[13] Wu, Y., Deng, L., Li, G., Zhu, J. & Shi, L. Spatio-temporal backpropagation for training high-performance spiking neural networks. Front. Neurosci. 12, 331 (2018).
[14] Neftci, E. O., Mostafa, H. & Zenke, F. Surrogate gradient learning in spiking neural networks: Bringing the power of gradient-based optimization to spiking neural networks. IEEE Signal Process. Mag. 36, 51–63 (2019).
[15] Werbos, P. Backpropagation through time: what it does and how to do it. Proc. IEEE 78, 1550–1560 (1990).
[16] Bellec, G. et al. A solution to the learning dilemma for recurrent networks of spiking neurons. Nat. Commun. 11, 3625 (2020).
[17] Wang, C. et al. Model-agnostic linear-memory online learning in spiking neural networks. Nat. Commun. 17, 1745 (2026).
[18] Morrison, A., Diesmann, M. & Gerstner, W. Phenomenological models of synaptic plasticity based on spike timing. Biol. Cybern. 98, 459–478 (2008).
[19] Sompolinsky, H., Crisanti, A. & Sommers, H. J. Chaos in random neural networks. Phys. Rev. Lett. 61, 259–262 (1988).
[20] Buesing, L., Bill, J., Nessler, B. & Maass, W. Neural dynamics as sampling: A model for stochastic computation in recurrent networks of spiking neurons. PLoS Comput. Biol. 7, e1002211 (2011).
[21] Zheng, N. & Mazumder, P. Online supervised learning for hardware-based multilayer spiking neural networks through the modulation of weight-dependent spike-timing-dependent plasticity. IEEE Trans. Neural Netw. Learn. Syst. 29, 4287–4302 (2018).
[22] Zbilut, J. P. & Marwan, N. The Wiener-Khinchin theorem and recurrence quantification. Phys. Lett. A 372, 6622–6626 (2008).
[23] Zheng, W.-L. & Lu, B.-L. Investigating critical frequency bands and channels for EEG-based emotion recognition with deep neural networks. IEEE Trans. Auton. Ment. Dev. 7, 162–175 (2015).
[24] He, K., Zhang, X., Ren, S. & Sun, J. Deep residual learning for image recognition. 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 770–778 (2016).
[25] McInnes, L., Healy, J., Saul, N. & Großberger, L. UMAP: Uniform manifold approximation and projection for dimension reduction. J. Open Source Softw. 3, 861 (2018).
[26] Perich, M. G., Narain, D. & Gallego, J. A. A neural manifold view of the brain. Nat. Neurosci. 28, 1582–1597 (2025).
[27] Langdon, C., Genkin, M. & Engel, T. A. A unifying perspective on neural manifolds and circuits for cognition. Nat. Rev. Neurosci. 24, 363–377 (2023).
[28] Maass, W., Natschläger, T. & Markram, H. Fading memory and kernel properties of generic cortical microcircuit models. J. Physiol.-Paris 98, 315–330 (2004).
[29] Wang, X., Chen, Y. & Zhu, W. A survey on curriculum learning. IEEE Trans. Pattern Anal. Mach. Intell. 44, 4555–4576 (2022).
[30] Cramer, B., Stradmann, Y., Schemmel, J. & Zenke, F. The Heidelberg spiking data sets for the systematic evaluation of spiking neural networks. IEEE Trans. Neural Netw. Learn. Syst. 33, 2744–2757 (2022).
[31] Sun, P. et al. Algorithm–hardware co-design of neuromorphic networks with dual memory pathways. Nat. Mach. Intell. 8, 901–912 (2026).
[32] Jiang, M., Xu, Y., Li, Z. & Li, C. Current opinions on memristor-accelerated machine learning hardware. Curr. Opin. Solid State Mater. Sci. 37, 101226 (2025).
[33] LeCun, Y. A path towards autonomous machine intelligence version 0.9.2, 2022-06-27. Preprint at https://openreview.net/forum?id=BZ5a1r-kVsf (2022).
[34] Lillicrap, T. P., Santoro, A., Marris, L., Akerman, C. J. & Hinton, G. Backpropagation and the brain. Nat. Rev. Neurosci. 21, 335–346 (2020).
[35] Xue, F., Hou, Z. & Li, X. Computational capability of liquid state machines with spike-timing-dependent plasticity. Neurocomputing 122, 324–329 (2013).
[36] Diehl, P. U. & Cook, M. Unsupervised learning of digit recognition using spike-timing-dependent plasticity. Front. Comput. Neurosci. 9 (2015).
[37] Amir, A. et al. A low power, fully event-based gesture recognition system. 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 7388–7397 (2017).
[38] Friston, K. Hierarchical models in the brain. PLoS Comput. Biol. 4, e1000211 (2008).
[39] Bastos, A. et al. Canonical microcircuits for predictive coding. Neuron 76, 695–711 (2012).
[40] Cornford, J. et al. Learning to live with Dale's principle: ANNs with separate excitatory and inhibitory units. International Conference on Learning Representations (ICLR) (2021).
[41] Al Zoubi, O., Awad, M. & Kasabov, N. K. Anytime multipurpose emotion recognition from EEG data using a liquid state machine based framework. Artif. Intell. Med. 86, 1–8 (2018).
[42] Loshchilov, I. & Hutter, F. Decoupled weight decay regularization. International Conference on Learning Representations (ICLR) (2019).
[43] Kag, A. & Saligrama, V. Training recurrent neural networks via forward propagation through time. Proceedings of the 38th International Conference on Machine Learning (ICML), 5189–5200 (2021).
[44] Schöne, M. et al. Scalable event-by-event processing of neuromorphic sensory signals with deep state-space models. 2024 International Conference on Neuromorphic Systems (ICONS), 124–131 (2024).
[45] Shazeer, N. GLU variants improve transformer. Preprint at https://arxiv.org/abs/2002.05202 (2020).
[46] Liu, H. et al. LibEER: A comprehensive benchmark and algorithm library for EEG-based emotion recognition. IEEE Trans. Affect. Comput. 1–18 (2025).
[47] Koelstra, S. et al. DEAP: A database for emotion analysis using physiological signals. IEEE Trans. Affect. Comput. 3, 18–31 (2012).
[48] Anubhav & Fujiwara, K. Reservoir splitting method for EEG-based emotion recognition. 2023 11th International Winter Conference on Brain-Computer Interface (BCI), 1–5 (2023).
[49] Liu, Y., Liang, R., Xu, S. & Guo, X. Structural investigations of multi-reservoir echo state networks for EEG-based emotion classification. Neurocomputing 632, 129856 (2025).
[50] Li, D., Xie, L., Chai, B., Wang, Z. & Yang, H. Spatial-frequency convolutional self-attention network for EEG emotion recognition. Appl. Soft Comput. 122, 108740 (2022).
[51] Lawhern, V. J. et al. EEGNet: a compact convolutional neural network for EEG-based brain-computer interfaces. J. Neural Eng. 15, 056013 (2018).
[52] Zhang, Y., Li, P., Jin, Y. & Choe, Y. A digital liquid state machine with biologically inspired learning and its application to speech recognition. IEEE Trans. Neural Netw. Learn. Syst. 26, 2635–2649 (2015).
[53] Ivanov, V. A. & Michmizos, K. P. Increasing liquid state machine performance with edge-of-chaos dynamics organized by astrocyte-modulated plasticity. Proceedings of the 35th International Conference on Neural Information Processing Systems (NeurIPS), 1–12 (2021).
[54] Manna, S., Das, D., Bhattacharya, S., Pal, U. & Chanda, S. PLSM: A parallelized liquid state machine for unintentional action detection. IEEE Trans. Emerg. Top. Comput. 11, 474–484 (2023).
[55] Petro, B., Kasabov, N. & Kiss, R. M. Selection and optimization of temporal spike encoding methods for spiking neural networks. IEEE Trans. Neural Netw. Learn. Syst. 31, 358–370 (2020).
[56] Schrauwen, B. & Van Campenhout, I. BSA, a fast and accurate spike train encoding scheme. Proceedings of the 2003 International Joint Conference on Neural Networks (IJCNN), 2825–2830 (2003).
Appendix A Proofs of the Theoretical Basis
A.1 Proof of Theorem 1
Proof. Given that both and follow Bernoulli distributions, we have:
Using the law of total probability, can be expanded as:
Substituting Equation A1 into the expression above yields:
Under the invariance assumption of the conditional firing mechanism, the terms and are independent of and can be treated as constants. Therefore, taking the partial derivative with respect to :
Finally, recalling the property of Bernoulli distributions where , i.e.,
we obtain the desired result:
Remark. It is worth noting that compared to the original proposition proposed by Zheng et al. [21], which relies on the independence of presynaptic spike events, our proof relies on the invariance of the conditional firing mechanism. This assumption rectification is indispensable for the validity of the gradient expression. In other words, presynaptic neurons need not be statistically independent. Rather, the neural dynamics must ensure that the conditional distribution of the postsynaptic firing event remains stable with respect to perturbations in presynaptic firing rates.
A.2 Proof of Theorem 2
Proof. By expanding the expectation of , we obtain
For the first term, Conditions C1 and C3 imply that and are uncorrelated. Specifically,
Consequently, the expectation factorizes as
Similarly, for the second term, Condition C3 ensures that and are uncorrelated:
Thus, the second expectation simplifies to
Under Condition C1, the conditional probability is independent of the time index . Therefore, all temporal indices can be dropped. Substituting the derived expressions into Equation (A2) yields
Finally, invoking Condition C2 allows us to apply the Causality-Gradient Theorem (Theorem 1), which gives
Remark. Considering the mean-field approximation of an NMC:
where denotes the polarity of the input spikes with respect to the firing rate . Based on Theorem 2, the partial derivative with respect to the input weight is derived as:
Notably, the above equation operates on nonpolar firing events. Consequently, even when presynaptic neurons are inhibitory, the underlying weight update adheres to a unified rule, meaning that the corresponding synaptic plasticity rule, i.e., the GT algorithm, naturally respects Dale's principle [40].
Appendix B Methods for Hyperparameter Setup
Generation of Recurrent Weights and Neuron Polarity
According to the classical LSM configuration method [52–54], the connection probability between neuron and neuron is determined by the Euclidean distance , which is described as
For sparsity, is set as 0.2, and is set as 3 (in keeping with [53]). Once neurons and are connected, the weight is randomly sampled from a Gaussian process with mean 0.1 and standard deviation 0.05, and the negative value is truncated with zero. For the spike polarity vector , 20% entries are set as , and the rest of them are set as 1, i.e., 20% neurons are set as inhibitory neurons.
Initialization of Input Weights
Connectivity probabilities for entries of are equal, and the values are independently sampled from a Gaussian distribution. Let the connectivity be , the mean value of the Gaussian distribution is determined by the following rule
The standard deviation is set as . The setting rule of indicates that, once the input is saturated (i.e., all spikes input), the postsynaptic neuron is expected to fire, which guarantees the actuating effect of input spike trains.
In order to ensure that the influence of the feedback channel on the NMC model is fully corrected by the loss function, it is necessary to ensure that the majority of postsynaptic neurons have trainable feedback input weights. This is realized by the setting of connectivity probability . Since the events of connectivity are independent, for any postsynaptic neuron, the probability of no feedback signal input can be described as
Reversely, for a given , is determined by
In practice, is set as to guarantee adequate input and feedback effect.
Setup of IMA Filters
Hyperparameters for an IMA filter include the initial state and coefficient . In the proposed gradient tunneling algorithm, two IMA filters are implemented, i.e., the filter for firing rate tracing and that for causality matrix tracing. Since values in a spike train must be 0 or 1, we set for firing rate tracing. Similarly, entries in the causality matrix must be or , thus, we set . In both of the two conditions, once the expected stationary window is wide enough (), the IMA filter coefficients can be simultaneously set as
where is the width of the expected stationary window which can be identified as the input sequence length, and the error is set as 5 %. The idea is that, an IMA filter can be considered as a first-order damp element in discrete time domain, thus, can be viewed as the settling time. From this perspective, the step response of an IMA filter with zero initial state can be expressed as
Based on the definition of error , we get
For any given and , the precise expression of is
When , the result can be derived as Equation B3. Now, we consider the rationality to set the same coefficient for firing rate tracing. Let , one holds
To compare with Equation B3, the only difference happens on the coefficient . In order to make the results as close as possible, this coefficient should be close to 1. We consider the maximum tolerant error to be , then, the following relationship should hold
Thus,
We also consider the condition that , then, . This condition is fully satisfied in this research.
Appendix C Readout Configuration for SHD Dataset
For the SHD speech recognition experiment, the feedback NMC is followed by a GLU-Residual Readout network [24, 45] that maps the NMC's terminal firing rates to class logits. The name reflects its two structural components: a gated linear unit (GLU) compression and a residual block. The readout is trained by standard backpropagation, whereas the recurrent weights of the NMC are updated by the GT algorithm. Its architecture and training configuration are summarized in Table C1.
In contrast to the GLU-Residual readout used for the feedback NMC, the baseline readouts were kept source-native, following each method's original paper and official implementation. The shared design principle was that the readout should not perform temporal dynamics modeling on its own, so that the comparison isolates the online learning rule operating in the recurrent layer rather than any decoder-side temporal integration. Accordingly, all three baselines use lightweight linear or leaky-integrator readouts that map the recurrent spikes to the 20 class logits, and classification uses the terminal logits at step 50 directly, without summing or averaging per-step outputs. Specifically, the LSNN with e-prop [16] uses 20 non-spiking leaky-integrator output units () with readout time constant (), matching the fixed low-pass coefficient of the pp-prop SHD reference readout), whereas its eligibility traces use the longer decay so that the credit-assignment window covers the full 50-step evidence interval. The LTC-SNN with FPTT [6] adopts the official shallow DVS-Gesture leaky-integrator readout, with and , in which the 20 per-class leak time constants are learnable time-shared parameters initialized to zero (i.e., initially). The SRNN with pp-prop [17] (BrainTrace) applies a fixed low-pass filter with , the midpoint of the official learnable leak range , followed by a static affine projection that is trained by the terminal cross-entropy rule without eligibility traces. All baselines retain their source-native optimizers and learning-rate schedules (Adam with learning rate for e-prop and pp-prop; with cosine decay for FPTT).
Appendix D The Improved BSA Spike Coding Scheme
Our spike coding scheme builds upon the Ben's Spiking Algorithm (BSA) described in [55]. However, two limitations persist: (1) the reverse convolution relies on a finite impulse response (FIR) filter, yet, determining the optimal FIR coefficients for maximum SNR is challenging; and (2) traditional BSA cannot encode input signals lacking a predetermined bound.
Table C1 Configuration of the GLU-Residual Readout for the SHD Dataset
| Item | Setting |
|---|---|
| Input | NMC terminal firing rates at the last time step, dim. 1000 |
| Input normalization | LayerNorm(1000) |
| GLU compression | Linear(1000→500) ∘ [Linear(1000→500) → Sigmoid]; bottleneck dim. 500 |
| Residual block | Linear(500→500) → GELU → Linear(500→500) with a skip connection; BatchNorm1d(500) → GELU applied to the sum |
| Classifier | Linear(500→20), output logits over the 20 SHD classes |
| Loss function | Cross-entropy loss with label smoothing of 0.05 |
| Optimizer | AdamW with two parameter groups: readout lr , weight decay ; NMC lr , weight decay 0 |
| Batch size | 256 (training), 512 (test) |
| Training schedule | Up to 1000 epochs; early stopping from epoch 100 (patience 100, test macro-F1); readout lr constant, NMC lr multiplied by 0.9 every 50 epochs while above |
To determine the FIR coefficients of length , we employ the following formulation:
where and are time constant parameters. In this study, we set , , and . This configuration yields a distribution of similar to the recommended settings in [56], while requiring the tuning of only two parameters. Moreover, can be interpreted as the postsynaptic potential of a LIF neuron with first-order synapses [12, 52], thereby enhancing biological plausibility.
Since the FIR filter coefficients are normalized, the BSA based on can only encode inputs within the interval . However, the input signals in this study, specifically the FES for four EEG sub-frequency bands, lack explicit bounds. Therefore, we incorporate an input normalization step followed by a squeezing step. Let the original analog input be . We first compute a normalized input with mean 0 and standard deviation . Consequently, assuming follows a Gaussian distribution, the majority of values will fall within , though bounds are not strictly guaranteed. Subsequently, a squeezing step is applied using the hyperbolic tangent function , defined as:
We set and in this study, ensuring is strictly constrained within , after which the BSA encoding steps are applied. This retains a lower margin of relative to the BSA definition domain , mitigating encoding artifacts occurring at small values.
Appendix E Additional Experimental Results
Table E2 Test Metrics of Learning Algorithms on the SHD Dataset (Mean Standard Error % over Four Seeds).
| Algorithm | Accuracy | Precision | Recall | F1 |
|---|---|---|---|---|
| e-prop | ||||
| FPTT | ||||
| pp-prop | ||||
| GT Ablation | ||||
| GT |

Fig. E1 Generalization Performance Comparison between Lyapunov-based Tuning and Gradient Tunneling across different neural population scales. The proposed method demonstrates superior performance starting at an edge length of 7, with this advantage becoming increasingly pronounced as the neuron amount expands.
Table E3 Classification Performances on EEG Pattern Recognition with LibEER Benchmark (Average ± Standard Error %)
| Task | Model | Algorithm | Accuracy | Precision | Recall | F1 Score |
|---|---|---|---|---|---|---|
| SEED | LSTM | BPTT | 56.17±2.91 | 56.76±3.00 | 56.17±2.91 | 54.75±2.99 |
| GRU | BPTT | 58.18±2.80 | 58.86±2.99 | 58.18±2.80 | 56.29±3.02 | |
| EEGNet | BP | 57.33±3.21 | 55.11±3.72 | 57.33±3.21 | 54.04±3.48 | |
| LTC-SNN | FPTT | 54.04±2.93 | 54.70±3.16 | 54.04±2.93 | 52.30±3.05 | |
| LSNN | e-prop | 56.62±3.16 | 57.82±3.33 | 56.62±3.16 | 55.09±3.27 | |
| SRNN | D-RTRL | 48.87±2.14 | 50.15±2.28 | 48.87±2.14 | 46.93±2.37 | |
| SRNN | pp-prop | 44.46±2.58 | 43.74±3.27 | 44.46±2.58 | 40.23±2.90 | |
| LSM | Lyapunov | 58.42±2.78 | 58.50±3.28 | 58.42±2.78 | 55.22±2.98 | |
| f-NMC | GT | 60.22±2.52 | 61.60±2.70 | 60.22±2.52 | 58.04±2.74 | |
| DEAP-V | LSTM | BPTT | 58.30±3.29 | 46.66±3.73 | 41.35±4.81 | 42.21±4.19 |
| GRU | BPTT | 65.35±3.97 | 53.01±2.32 | 49.13±3.05 | 49.98±2.57 | |
| EEGNet | BP | 58.84±4.44 | 52.35±3.75 | 45.40±5.14 | 46.16±4.42 | |
| LTC-SNN | FPTT | 67.32±6.39 | 51.75±3.17 | 50.29±3.47 | 49.91±3.33 | |
| LSNN | e-prop | 73.89±6.97 | 66.02±7.98 | 66.90±7.37 | 63.35±8.23 | |
| SRNN | D-RTRL | 62.06±6.39 | 55.72±3.83 | 50.46±4.74 | 49.56±4.75 | |
| SRNN | pp-prop | 60.47±5.40 | 50.98±3.18 | 48.57±3.80 | 46.59±3.32 | |
| LSM | Lyapunov | 57.73±8.32 | 45.53±5.66 | 43.84±6.11 | 41.04±5.99 | |
| f-NMC | GT | 73.93±6.77 | 58.54±8.63 | 61.74±7.48 | 58.25±8.25 | |
| DEAP-A | LSTM | BPTT | 61.24±3.84 | 46.78±2.90 | 41.24±3.72 | 42.52±3.32 |
| GRU | BPTT | 66.57±3.94 | 51.85±1.47 | 47.90±2.60 | 48.99±1.91 | |
| EEGNet | BP | 60.68±5.67 | 49.48±4.12 | 45.32±4.55 | 44.22±4.10 | |
| LTC-SNN | FPTT | 72.12±6.65 | 61.13±6.65 | 60.13±6.88 | 59.90±6.87 | |
| LSNN | e-prop | 79.01±6.39 | 61.68±7.84 | 64.31±6.75 | 61.30±7.47 | |
| SRNN | D-RTRL | 58.19±8.77 | 52.42±8.34 | 51.99±8.36 | 50.07±8.38 | |
| SRNN | pp-prop | 62.43±6.19 | 53.64±4.20 | 50.08±5.15 | 48.98±5.04 | |
| LSM | Lyapunov | 73.66±6.59 | 58.02±7.04 | 58.95±6.76 | 57.06±7.01 | |
| f-NMC | GT | 76.85±6.53 | 64.37±7.51 | 65.21±7.16 | 63.36±7.59 |
Table E4 Complete Results of Classification Performance on the SEED Dataset with LibEER Benchmark (Average ± Standard Error %)
| Algorithm | Session | Accuracy | Precision | Recall | F1 Score |
|---|---|---|---|---|---|
| LSTM & BPTT | 1 | ||||
| 2 | |||||
| 3 | |||||
| Avg | |||||
| GRU & BPTT | 1 | ||||
| 2 | |||||
| 3 | |||||
| Avg | |||||
| EEGNet & BP | 1 | ||||
| 2 | |||||
| 3 | |||||
| Avg | |||||
| LTC-SNN & FPTT | 1 | ||||
| 2 | |||||
| 3 | |||||
| Avg | |||||
| LSNN & e-prop | 1 | ||||
| 2 | |||||
| 3 | |||||
| Avg | |||||
| SRNN & D-RTRL | 1 | ||||
| 2 | |||||
| 3 | |||||
| Avg | |||||
| SRNN & pp-prop | 1 | ||||
| 2 | |||||
| 3 | |||||
| Avg | |||||
| LSM & Lyapunov | 1 | ||||
| 2 | |||||
| 3 | |||||
| Avg | |||||
| f-NMC & GT | 1 | ||||
| 2 | |||||
| 3 | |||||
| Avg |
Table E5 Comparison of Resource Consumption During the Training Process on the DEAP Dataset
| Method | Total Connections | Trainable Connections | Training Speed |
|---|---|---|---|
| LTC-SNN with FPTT | 1048576 | 1048576 | |
| LSNN with e-prop | 1048576 | 1048576 | |
| SRNN with D-RTRL | 1048576 | 1048576 | |
| SRNN with pp-prop | 1048576 | 1048576 | |
| f-NMC with GT | 32328 | 4492 |