Gamma oscillations are widespread in cortical activity but are largely absent from trained spiking neural networks, which typically operate in a current-based regime or impose oscillations as an external input. We train a spiking network with a fixed pyramidal–interneuron gamma (PING) loop on MNIST under surrogate-gradient descent, with the recurrent E↔I weights held at biophysical values. At matched test accuracy on the accuracy–rate frontier, the post-training excitatory firing rate is roughly an order of magnitude below a conductance-based control (-fold by total population spike count once the higher-rate inhibitory pool is included), and the trained rate is well described by an affine relation with the measured gamma frequency (). When the loop weights are released for training under a Dale’s-law clamp, the rhythmicity collapses within one epoch and is not recovered from any initial condition tested. The trained network classifies a continuously concatenated digit stream without retraining or a segmentation cue; streaming accuracy is approximately governed by the product of presentation duration and input rate, remains below for durations of ms or less, and at ms rises from chance below 0.5 Hz to clearly informative performance by 2 Hz. These results are consistent with an interpretation of gamma as a structural constraint on excitatory firing rates that does not require learned tuning of the inhibitory connectivity.
Gamma oscillations in the 30–80 Hz band have been associated with attention, binding, and gating in cortical activity[1, 2, 3], with the original visual-cortex observation reported by[4]. Two generation mechanisms are commonly distinguished, ING and PING[5, 6] the present work focuses on PING. PING arises from the dynamics of a recurrent excitatory–inhibitory (E↔I) loop[7]. Optogenetic activation of fast-spiking interneurons in intact cortical circuits drives gamma rhythms[8, 9, 10, 11]. Earlier in vitro recordings[12] and biophysical models[13] characterised interneuron-driven gamma in isolated inhibitory networks, and the synaptic mechanisms that synchronise the interneuron pool have been described[14].
PING has been studied extensively in biophysical[15, 16, 17] and neural-mass / mean-field models[18, 19, 20, 21], but these models are descriptive: they are not trained on a task. The parallel literature on trainable spiking neural networks uses surrogate-gradient descent for end-to-end optimisation[22, 23, 24] the resulting networks are typically current-based and non-rhythmic. The rhythmic variants either impose the oscillation as an external input[25] or obtain it as an emergent property of unconstrained surrogate-gradient training[26] in neither case is the rhythm carried by a fixed, biophysically-calibrated PING loop, and the present work is to our knowledge the first task-trained spiking network of that kind.
Cortical pyramidal cells fire at low rates (typically below 10 Hz) under strong recurrent input[27], and the cortical metabolic budget is dominated by excitatory spike generation, with inhibitory spikes substantially less costly per spike[28, 29]. The mechanism that constrains pyramidal firing rates under these conditions is not fully understood. We test the hypothesis that a fixed E↔I loop, by generating a gamma rhythm, constrains the post-training excitatory firing rate. A spiking network with a fixed PING loop is trained on MNIST and the post-training firing rate is compared with a non-rhythmic baseline at matched accuracy. In the architecture studied here the measured rhythm and firing rate are tightly linked, so rate and timing are synergistic descriptions of a single dynamics rather than independent codes[30].
The remainder of the paper is organised as follows. §2.1 describes the model; §2.2 characterises the gamma onset in theory and simulation; §2.3 reports the trained accuracy–rate frontier; §2.4 reports two experiments that test whether the firing-rate reduction is acquired during training; §2.5 reports the relationship between the gamma frequency and the post-training firing rate; §2.6 reports robustness of the post-training firing rate to spike perturbations and to integration timestep; and §2.7 reports a streaming-classification protocol.
The network is a two-population conductance-based spiking model with a single hidden layer of excitatory (E) and inhibitory (I) leaky integrate-and-fire (LIF) units, driven by feedforward input weights and read out by a non-spiking leaky-integrator layer over the excitatory population (§5.2). Recurrence is confined to one excitatory–inhibitory (E↔I) loop: E projects to I through the weight and I back to E through , with no E→E or I→I connection. Throughout the paper we compare two configurations of this single architecture: with the loop disabled () it is a conductance-based (COBA) control in which input drives the excitatory population alone, and with the loop engaged it is the pyramidal–interneuron gamma (PING) configuration. The same network is trained on MNIST by surrogate-gradient descent from §2.3 onward (§5.4); in this section we characterise its free-running dynamics.
Free-running, the COBA configuration fires asynchronously: its power spectral density (PSD) has no peak in the gamma band, and the excitatory firing-rate–current (–) curve rises to Hz under the strongest drive tested. Engaging the E→I→E loop instead produces synchronous inhibitory bursts and gamma-banded excitatory rasters with a PSD peak at Hz, and holds the excitatory firing rate approximately an order of magnitude below the COBA baseline across two decades of input drive (Figure 1).
Across the coupling plane the excitatory firing rate decreases, the inhibitory firing rate increases, and the lobe–trough rhythmicity score (a normalised, dimensionless measure of periodicity in the population autocorrelation, bounded in ; §5.5) increases monotonically with coupling strength: along the COBA edges and at strong coupling. The four-dimensional mean-field reduction (§5.3) predicts a supercritical Hopf bifurcation at external drive nA with crossing frequency Hz. The classification as supercritical is supported by quasi-static up/down ramps with peak hysteresis below in rate units and by the linear scaling of the squared steady-state oscillation amplitude , (). The predicted gamma frequency is in qualitative agreement with the spiking measurement across the GABA synaptic decay time constant ms (Figure 2).
Both architectures, trained on MNIST under surrogate-gradient descent (§5.4), converge to approximately test accuracy. Sweeping the spike-budget penalty generates an accuracy–rate frontier; at every value of tested, PING attains higher accuracy at lower mean hidden-E firing rate than COBA. At the operating point with disabled, PING reaches accuracy at Hz mean hidden-E rate, against at Hz for COBA (Figure 3). The operating-point endpoints are reported as means over three seeds (42, 43, 44) and are approximately seed-invariant; interior points of the sweep that trace the frontier are run at a single seed (42). Seed-invariance of the post-training firing rate at finer resolution is established in §2.5–§2.7, where three seeds per condition are reported throughout. The PING rate does not decrease further when is lowered, consistent with a structural lower bound on the rate.
Whether the firing-rate reduction in §2.3 is acquired during training or follows from the canonical loop weights is tested by two complementary experiments. We distinguish the two senses of “architectural”: (a) the reduction occurs without gradient-based tuning of the loop weights (which §2.4 establishes), as opposed to (b) the reduction emerges from generic E↔I structure without any hand-set values (which is not tested; the loop weights are held at the canonical biophysical values of[7]). The claim in this work is (a): the inductive bias is paid for at design time, not during training.
In the first, the recurrent loop is activated at inference on a trained COBA network, without retraining any weight. The network immediately produces gamma-banded rasters; the mean excitatory rate falls by approximately a factor of ( Hz), and test accuracy falls by pp (Figure 4). The rate reduction therefore occurs without training. The accuracy loss is consistent with the absence of a learned compensation in the feedforward weights, which were optimised in the absence of the loop.
In the second, the loop weights are released for training under the Dale’s-law clamp. Both matrices represent non-negative conductance magnitudes; pathway identity fixes their reversal potentials, and the negative GABA reversal potential makes the I→E pathway inhibitory (§5.4). After each optimiser step, the trained magnitudes are projected onto the non-negative cone. In all conditions tested, the rhythmicity score collapses within a single training epoch: the first logged metric, after epoch 1, shows , compared with the canonical initial value (Figure 5). The collapse is faster than the per-epoch logging interval, so no intermediate state is recorded. From every initial condition tested (canonical PING values, zero, and canonical), the inhibitory firing rate remains near zero, stays in –, and final test accuracy is approximately at Hz mean E rate for the frozen-PING control (Figure 5). These numbers differ from the §2.3 frontier endpoint (≈91% at ≈12.3 Hz) because the §2.4 setup omits the spike-budget penalty and isolates the within-experiment contrast between frozen and trainable conditions rather than tracing the accuracy–rate frontier. Within this setup, gradient descent does not preserve or recover effective E→I recruitment from any tested initial condition.
The second result is conditional on the gradient-damping scheme that stabilises PING training (the gradient flowing through the loop is attenuated by a factor on the backward pass, with ; §5.4); a constrained-training scheme (§4 future directions) would test whether the loop’s pruning depends on the damping regime. The first experiment (inference-time activation) uses no gradients and is unaffected by this caveat, and carries most of the weight of the §2.4 conclusion.
The post-training excitatory firing rate covaries approximately affinely with the measured gamma frequency. Across a sweep of , which jointly changes the inhibitory decay kinetics, integrated inhibitory influence, and realised , the trained is well fit by (, three seeds per point; Figure 6). Mean test accuracy declines from at ms to at ms, a percentage-point tradeoff across the sweep. The association has a cycle-resolved counterpart. Resolving spikes by (cell, cycle) pair, contain at most one spike across the full sweep: , , and the multi-spike fraction () is (Figure 7). Because changes more than frequency alone, these experiments do not identify as the sole causal variable.
The gating depends on the timing of inhibition, not its mean level. Perturbations of the trained PING network at inference reveal a deletion-versus-addition asymmetry. From an unperturbed baseline of approximately accuracy, PING retains approximately accuracy under deletion of of emitted spikes (little degradation); addition of off-phase Poisson noise instead drives accuracy down to chance as the injected rate grows, because those spikes recruit the inhibitory pool at arbitrary phase and disrupt the rhythm[31]. COBA exhibits the opposite asymmetry (Figure 8). Two inference-time jitter perturbations of the inhibitory spike train, both holding the mean inhibitory rate fixed, produce opposite effects on the excitatory rate: per-cell jitter smears each burst into a continuous shunt and reduces the excitatory rate to zero, while cycle-coherent jitter preserves within-burst synchrony and raises the excitatory rate from Hz to Hz (Figure 9)[32].
The post-training firing rate is also approximately invariant under change of integration timestep: across ms (a range), the trained excitatory rate stays in – Hz and accuracy varies by less than pp (Figure 10). The rate is therefore a property of the continuous dynamics, not an artefact of the discretisation.
The preceding subsections evaluate the network on isolated single-digit presentations. The streaming protocol tests whether the firing-rate reduction is preserved under continuous input.
A PING network trained on single-digit MNIST classifies a continuously concatenated input stream without retraining and without a segmentation cue. The streaming protocol (§5.7) uses a time-averaged non-spiking LIF readout over a sliding window whose duration is matched exactly to each segment’s presentation duration. On a representative stream of five digits, each with its own duration (– ms) and input rate (– Hz), 3 of 5 are classified correctly (Figure 11). Across the (, input-rate) grid, accuracy is approximately a function of the product . Accuracy does not exceed for ms regardless of input rate (Figure 12A). For reference, ms is approximately times the canonical gamma period ms. Accuracy saturates by – ms, and the trained operating point ( ms, rate Hz) reaches accuracy. Extending the ms slice below the grid’s Hz minimum locates a separate encoder floor: performance remains at chance through 0.5 Hz, becomes clearly informative by 2 Hz, and reaches 79.1% at 5 Hz (Figure 12B). The failed ms, 10 Hz segment in Figure 11 occurs at a population-level accuracy of 87.3%, so it is a natural weak-evidence classification error rather than evidence that the encoding rate is intrinsically nonviable. Together the panels establish requirements for sufficient integration time and sufficient encoded input evidence; because gamma frequency is not independently varied, they do not identify the gamma cycle as the cause or temporal unit of either requirement.
A recurrent E↔I loop, held fixed during training, generates a gamma rhythm and reduces the post-training excitatory firing rate by approximately an order of magnitude relative to the COBA baseline at matched accuracy (§2.3). The reduction does not require gradient-based learning of the loop weights: activating the loop at inference on a trained COBA network reduces the firing rate without retraining (§2.4), and gradient descent does not preserve the loop within a single epoch when its weights are released (§2.4, conditional on the §5.4 damping scheme). The inductive bias is paid for at design time, via the canonical biophysical loop weights[7], not during training. Within the mean-field reduction, the gamma onset is a supercritical Hopf bifurcation (§2.2), and the empirical data support this classification. Its continuous, reversible character fits the inference-time loop activation of §2.4, which produces a graded change in firing rate without hysteresis; a direct test would require an inference-time hysteresis sweep on the E→I gain (§4).
The mechanism of the gate is the temporal structure of inhibition, not its mean level. The jitter perturbation experiment (Figure 9) is a direct test: holding the mean per-cell inhibitory rate fixed and varying its temporal structure produces opposite effects on the excitatory rate depending on whether within-burst synchrony is preserved, consistent with prior characterisations of temporal-synchrony patterns within PING circuits[32]. The robustness asymmetry under spike addition versus deletion (Figure 8) follows from this dependence on phase: removal of spikes does not alter the phase structure of the population output, while addition of off-phase spikes does. The asymmetry constitutes a testable prediction for biological gamma circuits and would speak to long-standing rate-vs-timing debates[33, 34]. It echoes prior reports that oscillations sharpen spike-timing precision[31].
Across the sweep, post-training rate covaries with the realised gamma frequency, and the majority of (cell, cycle) pairs contain at most one spike (Figures 6–7). This is consistent with cycle-structured rate control, but simultaneously changes inhibitory decay, integrated conductance, and burst duty cycle; the experiment does not isolate frequency as the sole cause of the rate change. An independent manipulation of oscillation frequency at matched inhibitory influence would be needed for that attribution. The streaming experiment (Figure 12) instead separates two evidence bounds: panel A shows low accuracy at short presentation durations and an approximate dependence on , whereas panel B locates the ms encoder floor below 0.5 Hz. Errors above that floor are ordinary trial-level failures under weak evidence, not evidence that the rate is categorically unusable. The numerical proximity of the short-duration floor to the canonical gamma period is descriptive, not mechanistic, because gamma frequency is not independently varied. A gamma-frequency sweep or a cycle-aligned analysis showing discontinuities at integer multiples of would be required to test whether gamma defines a temporal unit for classification.
PING is a structured alternative to the asynchronous balanced state[36, 37]. The architectural treatment of the loop adopted here differs from the inhibitory-plasticity literature, in which the inhibitory connectivity is plastic and learns E/I balance[38, 39, 40, 41]. The §2.4 result, that gradient descent does not preserve the loop from any tested initial condition (under the §5.4 damping regime), provides empirical support for the architectural treatment in this setting. We propose a functional interpretation: gamma may act as a structural constraint on excitatory firing rates without requiring learned tuning of the inhibitory connectivity.
Relative to the two closest recent trainable-SNN precedents in the bibliography, the present work differs in how the rhythm is obtained rather than in claiming better performance.[25] imposes the oscillation as an external input to spiking neurons;[26] trains an adaptive-LIF network on speech, all parameters free, and reports that oscillatory synchronisation and cross-frequency coupling emerge from end-to-end optimisation, correlating with task performance. The §2.4 result that gradient descent does not preserve the loop is therefore not a claim that surrogate-gradient training cannot discover rhythm in general ([26] shows it can) but a narrower one: it does not maintain a fixed, biophysically-calibrated PING loop whose weights are released under the Dale’s-law clamp and the damping regime of §5.4. The two findings are complementary poles of the same question: rhythm acquired by training versus rhythm supplied by architecture. Neither[25] nor[26] uses a conductance-based E↔I loop, and neither attributes a firing-rate reduction to the rhythm via inference-time activation, frequency tuning, or jitter perturbation as §2.4–§2.6 do; their firing rates are roughly an order of magnitude higher than the rates reported here, and neither frames a per-spike economy. We do not provide a head-to-head numerical comparison:[25] and[26] evaluate on temporally structured tasks (SHD; speech perception) where the present static-MNIST protocol is not directly comparable. The contribution is mechanistic, not benchmark-driven.
The reduction reported in §2.3 should be considered net of the inhibitory contribution. PING uses a smaller, higher-rate inhibitory population, so the reduction in total spike count () is approximately a factor of rather than a factor of . Excitatory glutamatergic signalling accounts for a larger share of the cortical energy budget than inhibitory transmission[28, 29] weighting spikes by metabolic cost recovers the order-of-magnitude figure. The argument is complicated by the substantial per-cell metabolic demands of fast-spiking interneurons, which sustain high firing rates and dense synaptic activity[42] for this reason we treat the uniform-spike-counting reduction (approximately -fold) as the more conservative claim. We do not attempt a quantitative metabolic comparison with cortex, given the architectural differences (no or , idealised synapse counts).
Several limitations apply. The evaluation uses a single dataset (MNIST), a single readout, and a fixed loop topology. MNIST is a simple, near-saturated benchmark on which many architectures reach comparable accuracy, so the classification results here should be read as evidence that the firing-rate reduction survives training to competence, not as a claim about task difficulty or about generalisation to harder problems; whether the mechanism holds on datasets with intrinsic temporal structure is left to future work (SHD, §4). The rhythmicity metric is one of several available options. The mean-field reduction is biophysically calibrated but is a reduction of the full network. The architecture excludes and , conduction delays, and cell-type heterogeneity; the implications for cortical microcircuits with richer connectivity are open[15]. The streaming evaluation does not include temporally structured inputs in which classification depends on input timing. The capacity of a single gamma cycle and its scaling with assembly size are not characterised here[43]. Classification accuracy on MNIST is approximately –; the contribution of the present work concerns the mechanism by which the firing rate is reduced rather than the absolute accuracy. The §2.4 released-loop result depends on the gradient-damping scheme (, §5.4) and the Dale clamp; whether the loop’s collapse persists under weaker damping is not addressed here. The paper does not benchmark against rhythmic-SNN baselines[25, 26] the PING-specific attribution rests on the within-architecture experiments of §2.4–§2.6 rather than on an external rhythmic-SNN comparison.
A recurrent E↔I loop held fixed during training reduces the post-training excitatory firing rate by approximately an order of magnitude relative to the COBA baseline at matched accuracy, and approximately -fold by total spike count when the higher-rate inhibitory pool is included (§3 para 5). The reduction is invariant to the integration timestep across a range (Figure 10, retrained at each ) and is preserved under evaluation on continuously concatenated input streams (Figures 11–12).
Empirical extensions include evaluation on the SHD dataset[44], which tests the gating on a spiking benchmark with intrinsic temporal structure, and tasks in which classification accuracy depends on input timing, which could test whether the gamma cycle acts as a temporal unit. This is the regime in which the emergent-oscillation route of[26] operates; a direct comparison there would set the imposed, biophysically-calibrated PING loop studied here against a network free to learn its own rhythmic structure, on the same temporally structured task. A more comprehensive characterisation of the plane would test the supercritical Hopf classification directly.
Theoretical extensions include multi-layer PING architectures, an independent two-dimensional sweep of the two loop-weight gains , multi-rhythm and theta-nested gamma models[19, 20], and characterisation of capacity limits for single cycles and minimal assemblies[43]. A constrained-training scheme, in which the loop weights are regularised toward biophysical values rather than held fixed, would connect the present result to the inhibitory-plasticity literature[38]. The rate law of §2.5 admits a testable biological prediction: perturbing the timing of inhibitory neurons in vivo (e.g. by optogenetic stimulation, as in[8, 9, 10]) should change the excitatory firing rate without altering the mean inhibitory rate, the in vivo analogue of Figure 9.
Gamma may act as a structural mechanism by which the cortical microcircuit maintains sparse excitatory firing rates at low metabolic cost. The present work provides one architecture in which this mechanism is realised explicitly.
The model uses a conductance-based leaky integrate-and-fire (LIF) representation with two populations, excitatory (E) and inhibitory (I). The sub-threshold membrane potential of each population evolves as
where is the membrane capacitance, the leak conductance, the leak reversal potential, and , the excitatory and inhibitory synaptic reversal potentials. The I population has no inhibitory term because there is no I→I connection in this architecture (§5.2).
A neuron emits a spike when crosses threshold from below; the membrane potential is then reset to for a refractory period :
Each synaptic conductance is an exponential trace driven by presynaptic spikes; a presynaptic spike adds its full weight as an instantaneous jump in conductance, which then decays with the relevant channel time constant ( for AMPA-like excitation, for GABA-like inhibition):
The first equation describes input-driven excitation onto E via feedforward weights ; the second is inhibition onto E from I via ; the third is excitation onto I from E via . There is no equation for (no I→I connection) and no recurrent contribution to (no E→E connection). Canonical parameter values are listed in the parameters table; the E and I populations differ in membrane capacitance, leak conductance, membrane time constant, and refractory period.
Canonical parameter values for the spiking network are given below. Where E and I populations use different values they are listed as “E / I”; otherwise the value is shared. The ms value is the canonical PING value of[7].
| Symbol | Description | Value |
| Membrane capacitance | 1.0 / 0.5 nF | |
| Leak conductance | 0.05 / 0.1 μS | |
| Refractory period | 3.0 / 1.5 ms | |
| Leak reversal potential | −65 mV | |
| Spike threshold | −50 mV | |
| Reset potential | −65 mV | |
| AMPA reversal potential | 0 mV | |
| GABA reversal potential | −80 mV | |
| AMPA decay time constant | 2 ms | |
| GABA decay time constant | 9 ms | |
| Integration timestep | 0.1 ms (train) / 0.25 ms (inference) | |
| Hidden excitatory pool size | 1024 | |
| Inhibitory pool size | 256 |
The network has one hidden layer with excitatory and inhibitory units, and a non-spiking leaky-integrator readout layer with weights over the excitatory population. The readout units follow LIF membrane dynamics with no spike, reset, or refractory period; per-class logits are computed as the membrane potentials averaged over the presentation window. Input spikes drive the excitatory population via feedforward weights . Recurrence is restricted to the E↔I loop: E projects to I via , and I projects back to E via . There is no and no .
The restriction to the E↔I loop is intended to make the rhythm unambiguously PING: excluding rules out ING, and excluding rules out recurrent-E driven oscillation[7, 45]. The conductance-based (COBA) baseline used as a non-PING control is the loop-off limit of the same architecture, obtained by setting .
The loop weights and are held fixed (untrained) in the experiments reported in §2.3 and §2.5–§2.7. The loop is treated as a structural prior, consistent with the inhibitory-plasticity literature, in which inhibitory synapses serve an experience-dependent E/I balance role rather than carrying the feedforward computational features that the excitatory pathway acquires[38, 39]. The choice is also supported empirically by the result in §2.4 (Figures 4–5) that gradient descent does not preserve effective E→I recruitment when the recurrent conductances are released. A Dale’s-law clamp constrains all trained conductance magnitudes to remain non-negative throughout training (§5.4).
To locate the gamma-onset bifurcation analytically (§2.2), the spiking network is reduced to a four-dimensional rate model in the state
where and are the population-mean firing rates of the E and I cells (in spikes per millisecond), and , are the population-mean cross-population synaptic conductances onto the I and E populations. The two cross-population conductances are sufficient because the architecture has no and no (§5.2); the within-population conductances vanish identically.
The reduction replaces the spike-driven conductance dynamics with rate-driven first-order filters, and replaces each cell’s stochastic spike output with the population-averaged firing rate of a noise-driven LIF cell at a given mean input current. The closed 4D system is
where is an external tonic drive to E (the bifurcation control parameter, below), and the driving forces are mV and mV evaluated at rest. The membrane time constants are the passive ratios ms and ms, computed from the capacitances and leak conductances in the §5.1 parameters table; the synaptic time constants , are taken directly from that table. The fan-in-normalised coupling strengths are μS and μS, inherited from the spiking network.
The population gain functions and are the noise-driven LIF rate functions in Ricciardi–Siegert form[46]. For mean input current delivered to a cell with leak conductance , leak reversal , threshold , reset , membrane time constant , and refractory period ,
with mean membrane potential and effective membrane-noise scale . The integral is evaluated by numerical quadrature. All parameters of are taken from the §5.1 parameters table (with ) separately for the E and I populations. The noise scale is set to mV; the predicted Hopf frequency varies by less than Hz across mV.
The silent (non-oscillating) fixed point is tracked as is swept from to nA in μA steps. At each , the fixed point is obtained by solving the algebraic system in (at steady state the two conductances are determined by the rates, and ) using scipy.optimize.fsolve. The numerical Jacobian of the full 4D system at each fixed point is computed by central finite differences. The Hopf threshold is the smallest at which the eigenvalue with largest real part crosses zero with non-zero imaginary part; the crossing frequency is .
The onset is classified numerically by a quasi-static amplitude sweep. is ramped up across from a small perturbation of the silent fixed point and then ramped down; at each step the 4D system is integrated to its steady-state oscillation amplitude . The onset is classified as supercritical when (i) the up- and down-ramp branches coincide within a peak hysteresis of in rate units, and (ii) the squared amplitude scales linearly with the bifurcation distance,
with . For the canonical parameter set the criterion is met with hysteresis below and .
The mean-field prediction is compared with the gamma frequency measured in the spiking network, extracted as in §5.5, across a sweep of ms (Figure 2). Both curves decrease monotonically with ; the spiking measurement is consistently higher than the rate-equation prediction across the sweep. The reduction captures the qualitative dependence on the GABA decay time, which is the use to which it is put. The treatment follows the Wilson–Cowan tradition for cortical-rhythm modelling[18] and the broader population-dynamics and next-generation neural-mass literature[19, 47, 48].
The network is trained on MNIST by surrogate-gradient descent through backpropagation in time[22, 23]. Each digit is rate-encoded as a Poisson spike train over a 200 ms presentation window at a peak rate of 25 Hz per active pixel (Bernoulli per timestep with ). The loss is cross-entropy on the time-averaged membrane potentials of the non-spiking LIF readout, with a per-neuron firing-rate penalty active when a unit’s mean rate exceeds a soft ceiling :
where is the per-trial mean spike count of E neuron , is a per-neuron rate ceiling expressed in spikes per trial, and is the penalty strength. Sweeping over spikes per 200 ms trial (equivalent peak rates of Hz) generates the accuracy–rate frontier reported in §2.3.
The discrete spike nonlinearity has zero gradient almost everywhere; in the backward pass it is replaced by a fast-sigmoid surrogate of the distance to threshold ,
with slope [23, 49]. The forward pass evaluates the Heaviside exactly. Optimisation uses Adam[50] with learning rate , batch size , and 50 epochs. Each baseline condition is repeated across three seeds (42, 43, 44); the spike-budget sweep uses a single seed (42).
Gradient damping for the PING configuration. Surrogate-gradient training of the PING configuration is unstable without intervention on the gradient. A single loop weight ( or ) contributes to the membrane-voltage update of every cell at every subsequent timestep within a trial; combined with the spike-driven impulse updates of the synaptic conductances and the non-zero surrogate gradient at the spike threshold, the gradient propagates through a tightly coupled feedback loop with millisecond-scale conductance dynamics. Over the 2,000-step backpropagation-through-time window of a single 200 ms trial at ms, multiplicative contributions across timesteps cause gradient norms to grow by many orders of magnitude, and training does not converge. The mechanism is the same multiplicative compounding through long unrolled recurrences that characterises the exploding-gradient pathology in standard recurrent networks[51].
We address this by attenuating the gradient flowing through the membrane-voltage increment on the backward pass by a factor of , implemented as a straight-through identity that scales the gradient without modifying the forward value:
The operator is applied to at every integration step in every layer; the forward simulation is exact (the network still solves the same ODE), and the gradient flowing through that update is attenuated by a factor of per step, eliminating the multiplicative compounding. All experiments reported here use , applied identically to the PING and COBA training pipelines. The COBA configuration is trainable at the module default ; the PING configuration is not.
Dale’s-law clamp. The synaptic matrices store conductance magnitudes, not signed currents. After each optimiser step, , , and are therefore projected onto the non-negative cone[52, 53]. Excitatory or inhibitory action is set by the pathway-specific reversal potential in the membrane current: the I→E term is hyperpolarising for the GABA reversal potential mV. The projection permits either recurrent conductance to grow while preventing an unphysical negative conductance. The §2.4 collapse primarily reflects weakened or absent E→I recruitment and loss of inhibitory firing, not crossing into a negative sign.
Mean firing rates and are computed as time-averaged spike counts per neuron over the presentation window. The gamma frequency is extracted as the peak of the Welch power spectral density[54] of the summed population E spike train at sampling rate Hz, using a single segment of length equal to the trial, mean-centred (not z-scored) signal, no detrending, and a peak search restricted to the gamma band Hz; the peak frequency is refined by parabolic sub-bin interpolation.
The rhythmicity score is the Michelson contrast between the first side lobe and the first trough of the autocorrelation of the binned population E spike count, computed via zero-padded FFT and normalised by the squared mean of the rate. After a 3-point smoothing kernel is applied to the autocorrelogram, the first trough is identified as the first local minimum starting from lag 2, and the lobe as the maximum between lag 1 and the trough; then
is bounded and dimensionless. We use it in preference to spectral-peak measures because the latter become unreliable at the low firing rates encountered in some of the regimes of interest. is qualitatively consistent with the spectral-peak and population-coherence measures used elsewhere in the gamma literature[55, 56].
The spikes-per-cycle distribution (Figure 7) is constructed by binning each cell’s spikes into gamma cycles inferred from peaks of the population I-burst rate (Gaussian-smoothed with ms), detected with scipy.signal.find_peaks using a minimum inter-peak separation of half the expected gamma period and a height threshold of of the maximum. Cycle boundaries are placed at midpoints between consecutive I-burst peaks; each E spike is assigned to its enclosing cycle.
Spike-economy claims report both the mean E rate and the total population spike count , so the reduction is stated net of the inhibitory contribution. The metabolic argument that excitatory spikes incur larger costs than inhibitory spikes[28, 29] is invoked where relevant but is not modelled quantitatively.
The membrane and synaptic-conductance ODEs are integrated by an exponential-Euler scheme[57] with zero-order hold on the synaptic conductances over each step. With the total instantaneous conductance, effective time constant , and instantaneous steady state , the closed-form update is
Training uses ms; smaller timesteps are required for numerical stability of the backpropagation through the recurrent E↔I dynamics. Inference uses ms. Firing rates and frequencies are reported in Hz. The §2.6 result (Figure 10) is obtained by retraining the network at each value in the swept range, and confirms invariance of training+inference at matched within the range tested (not invariance of inference at a fixed-Δt-trained network to a varied inference Δt).
Default parameters used by all experiments are listed in the parameters table. Per-experiment values of the loop weights , and the input rate, and ranges swept by experiment (e.g. , ), are stated in the corresponding figure captions.
The classification task is MNIST[58], rate-encoded as in §5.4 (200 ms presentation, 25 Hz peak Poisson rate per active pixel). MNIST is used under its standard train/test split, and test-set accuracy is reported. For the streaming protocol used in §2.7, the trained network is presented with a continuously concatenated input stream. The output-LIF membrane potentials are averaged over a trailing window and their argmax gives the streaming class label. For every segment, the readout-window duration is matched exactly to the presentation duration, ; it is not varied independently. This explicit averaging window is distinct from the output neuron’s fixed membrane time constant. The duration–rate grid uses ms and rates in Hz. Additional evaluations hold both durations fixed at ms while sweeping below Hz to locate the encoder’s chance floor, using the same three trained seeds. Reported metrics are test accuracy, mean E and I firing rates, and .
Each reported result is produced by a standalone experiment script in the project repository (linked under §6). Each experiment hardcodes its own run scale (the sample count, seed set, and any parameter sweeps) and records those settings, together with the git commit and a run identifier, in the run’s provenance file; every run number quoted in this manuscript and its captions is interpolated from those files rather than typed by hand, so a figure and the text that describes it cannot drift apart. The figure-render pipeline regenerates every print-quality figure from the experiments, so a clean re-run of the repository reproduces the figures and numbers reported here.
The model, training, and analysis are implemented in Python (). Spiking dynamics and surrogate-gradient training use PyTorch (2.11; with snnTorch 0.9 for baseline spiking primitives). Numerical analysis uses NumPy (2.2) and SciPy (1.15). All figures are produced with Matplotlib (3.10).
Source code, per-notebook reproduction scripts, trained-weight artefacts, and the figure-render pipeline are available at https://github.com/eoinmurray/pinglab. MNIST is obtained from its standard public distributor. Library versions are listed in §5.9.
Claude Code (Anthropic; model Opus 4.8), an agentic large-language-model coding tool, was used extensively and interactively in the development of this work. Its use covers writing the simulation, training, analysis, and figure-rendering code in the project repository; debugging, refactoring, and code review; drafting, revising, and copy-editing the manuscript prose; and iteration on experimental design and presentation. No figure, illustration, table, or visualisation in this manuscript is produced by a generative AI model; all figures are rendered by Matplotlib from Python code in the project repository. The authors set the research questions, designed the experiments and analyses, ran the simulations, reviewed model-generated code prior to commit, and verified the reported results and the manuscript text. The authors are responsible for the content, accuracy, and claims of this work.