Reconfigurable Computation in Spiking Neural Networks

The computation of rank ordering plays a fundamental role in cognitive tasks and offers a basic building block for computing arbitrary digital functions. Spiking neural networks have been demonstrated to be capable of identifying the largest k out of N analog input signals through their collective nonlinear dynamics. By finding partial rank orderings, they perform k-winners-take-all computations. Yet, for any given study so far, the value of k is fixed, often to k equal one. Here we present a concept for spiking neural networks that are capable of (re)configurable computation by choosing k via one global system parameter. The spiking network acts via pulse-suppression induced by inhibitory pulse-couplings. Couplings are proportional to each units' state variable (neuron voltage), constituting an uncommon but straightforward type of leaky integrate-and-fire neural network. The result of a computation is encoded as a stable periodic orbit with k units spiking at some frequency and others at lower frequency or not at all. Orbit stability makes the resulting analog-to-digital computation robust to sufficiently small variations of both, parameters and signals. Moreover, the computation is completed quickly within a few spike emissions per neuron. These results indicate how reconfigurable k-winners-take-all computations may be implemented and effectively exploited in simple hardware relying only on basic dynamical units and spike interactions resembling simple current leakages to a common ground.


I. Introduction
Rank ordering of signals plays a fundamental role in natural and artificial cognitive computations, in particular in attention-related tasks [1][2][3] where a small set of relevant information must be computed in real time from an array of sensory inputs. Natural environments present a continuous stream of concurrent analog signals that often are simultaneously time-dependent, multimodal and high-dimensional. Yet such complex signals typically provide a basis for discrete decisions.
Partial rank ordering, determining a subset of strongest signals by comparing a variety of inputs, offers a fundamental option for providing a discrete judgment.
Finding the largest k out of a set of N analog inputs defines a k-winners-take-all (k-WTA) computation, which networks of spiking (formal) neurons have been shown to perform [4,5] via different approaches.
Tuning one global parameter, the coupling strength , selects k. A vector ξ, with ξ1 > ξ2 > ξ3 > · · · > ξN (gray arrows) serves as an input to a network of spiking neurons (black circles) that dynamically computes a 2-WTA function of the input vector ξ. Only those neurons receiving the largest two inputs send spikes whereas spikes from all other neurons are dynamically suppressed.
neural-circuit with promising scalability via careful network design, also a mix of excitation and inhibition.
In all these studies, however, either the number of winners k is fixed, hard to design, thus not easily (re)configurable, or computations typically take many spikes per unit or both [5, 10-12, 14, 16, 18, 19]. Here, we propose a class of spiking neural network models that not only computes fast, in as few as k spikes under ideal conditions (no noise and all starting from the same voltage), but moreover provides intrinsic (re)configurability via changes to a single global arXiv:2012.00434v1 [nlin.AO] 1 Dec 2020 parameter to perform k-WTA computations for different k, see Fig. 1 for a schematic illustration.
We thus present a system that is directly (re)configurable by setting a single parameter to different values in order to directly switch between different well-defined computational tasks. Such reconfiguration is in stark contrast to learning processes in neural networks during which many parameters (coupling weights) evolve in a self-organized way to adapt the system to become capable of solving a given task.

II. Spiking neural networks with proportional inhibition
We consider a network of N spiking neurons that are oscillatory, i.e. send spikes periodically in the absence of coupling and external signals. The neurons' continuoustime dynamics is a singular type of integrate-and-fire neurons [20] and is characterized by a one-dimensional phase-like variable as in the generic model introduced in [21]. Each neural unit i ∈ {1, . . . , N } exhibits a voltagelike state variable x i satisfying the differential equations where for x i ∈ [0, x θ ) where x θ is a spiking threshold. The parameter I i represents a constant current, γ is a dissipation parameter, ξ i an external signal serving as input and η i (t) represents an independent Gaussian white noise signal which strength is completely determined by its signal variance σ 2 . Numerically, by definition, the noise contribution within any given small time-interval ∆t is a random real number with zero mean and variance (∆t)σ 2 . Thus, one random number is generated at each integration interval and summed to the resulting voltage.
To avoid numerically driven synchronization, noise is added at randomly generated times [12,22,23] (201 points per time unit per neuron) drawn independently from a Poisson distribution. Whenever a threshold is reached x i (t − ) = x θ , the state variable is reset to x i (t) = 0 and a pulse (spike) is sent to all other neurons, mathematically reflected in the time t = t j, of the th threshold crossing, ∈ Z, by the neuron j. Without loss of generality we fixed x θ = 1. The sum in (2) is the contribution of all spikes arriving from the other N − 1 neurons j to i at time t, where P j is the set of all times t j, of spikes sent by neuron j. We propose to design the coupling function g(x j ), also known as sensitivity function in the research field of coupled phase oscillators [24,25], to be state dependent such that it is inhibitory , their voltages will be both decreased, xi(ts) < xi(t − s ) and more strongly synchronized than before the spike reception, i. with amplitude proportional to the voltage x i of the receiving neuron at times t − j, , i.e.
where < 1 is the coupling strength. As a consequence, the larger the voltage x i , the larger the inhibitory effect of a received spike signal. To the best of our knowledge, this model setting has not been analysed or exploited for solving computational tasks (via spiking neural networks). For illustration, we here focus on networks with fixed parameters γ = 1 and I i = 1.04 =: I. We vary the magnitudes of the input signals ξ i (t) and the coupling strength to select different k of the k-WTA computation by achieving different collective dynamics. Furthermore, as concrete examples, we present networks of sizes N = 5 and N = 50 to emphasize different collective dynamics' aspects and the pulse-suppression mechanism's independence of the network size.

III. k-winners-take-all via Pulse-Suppression
How may spiking neural networks with pulsesuppression perform k-WTA functions?
Its overall dynamics is dictated by a simple mechanism: every time a neuron reaches the firing threshold, it emits a spike and inhibits all other neurons proportionally to their voltages, thereby bringing their state variables x i closer together, . Furthermore, in the absence of external signals or noise, a neuron will also never overtake another [21,26]. This implies that all neurons repetitively reach the threshold sequentially one after the other and send a spike, see Fig. 3a. The order in which they reach the threshold is determined by the ordering in their initial condition, i.e. their voltages at time zero. Thus, all neurons will exhibit the same spiking frequency in the absence of external signals and noise.
In the presence of noise (and still without external signals), sporadic overtaking becomes possible. Some neurons may by chance skip a spike emission (and a reset) due to inhibition. These events are random and the average number of spikes emitted by all neurons are still (almost) the same for any sufficiently large time interval, thus assuming identical average frequencies in the theoretical limit of infinite observation times. (Re)configurable choice of computational task. The computed k depends on the differences ∆ξ and the coupling strength . For a small network of five neurons, we observed five different response regions in the given parameter range: white, there is not ranking k = 5; computing k ∈ {1, 2, 3, 4} are represented by different shades of gray or black. For any fixed input signal (horizontal value), a sorting type (k) can be selected by changing the global parameter .
The external signals ξ i (t) that we define as inputs may induce much richer and more interesting collective network dynamics. If input signals with components of different intensities are concurrently applied to all neurons, neurons exhibit different intrinsic frequencies for the duration of the signal and the faster neurons may repeatedly overtake others, see Fig. 3b. As a result, some neurons may never reach the threshold and deliver a spike, i.e. they will always skip their turn, (Fig. 3b). We may thus interprete that the system evaluates some aspects of the external continuous-time analog input signal to make a decision about which spike emissions to skip and which to keep. As we will show below, the system performs a k-winners-take-all computation with k depending on a combination of the network parameters and the magnitude of the difference between input signal's components.
Whether and how many neurons will skip their turn depends on two factors -driving signals and coupling strength. First, we observe that if neurons are driven with input signals of different average values, neurons overtake each other (Fig. 3b). If the input signals are constant in time, the neurons i receiving the larger driving signals ξ i exhibit faster voltage changes and are thereby candidates for being neurons with larger output spiking frequencies. We remark that even if a neuron exhibits a fast change in voltages it may not elicit any spike if inhibited, and the voltage is lowered by means of leakage rather than spikes delivered to the network. Details of their dynamics depend on how fast (or if at all) the neurons driven more strongly can catch up with more weakly driven ones ahead of them and overtake these. Second, the coupling strength determines how close all neurons' voltage variables are squeezed together during a spike reception.
Whereas the first factor, different rates of change dx i /dt of the neurons' voltages, provides a simple mechanism for spreading the network voltages proportionally to their total input current into N different voltage values, the effect of inhibitory spikes is more convoluted. It has two aspects: first, arriving spikes provide a synchronizing force for the group of (N − 1) neurons concurrently receiving the spike (Fig. 2); second, whether the voltage difference from a neuron j to the spike-sending neuron i will increase or decrease depends on the phase x j (t − s ) at the spike time and . For example, for x j (t − s ) close to one (almost synchronized) most increase the voltage difference |x i (t s ) − x j (t s )| as x i (t − s ) → 0 and thus decrease the degree of synchrony; on the other hand, for initially large is near 0, all would increase synchrony. Furthermore, large values of provides a global synchronization force, e.g. if close to one all x j (t s ) are close to zero independent of x j (t s ). Moreover, whereas the first factor (different dx i /dt) is acting continuously in time, the spike interaction is only acting at a discrete set of spike reception times. These observations imply that an intricate interplay of overall spiking frequency, differences in input signal strengths and coupling strength determines which type of output spike pattern results and how many neurons spike in the presence of a given input signal.
To quantify the contribution of these two factors, we simulate a system of N = 5 neurons varying the global coupling strength and the degree of separation of input signal components. Specifically, we generate temporally constant signals of the form where ∆ξ is a constant that characterizes the input signal. The smallest input difference between any two inputs therefore equals ∆ξ. For all other system parameters fixed as above, we find that the system is capable of computing any given k, that is k ∈ {1, 2, 3, 4, 5} neurons spiking repeatedly whereas N − k neurons remain silent without spikes. Fig. 4 shows that for a single parameter , the system will perform the same computation for a broad range of input differences ∆ξ. Furthermore, for the entire range of ∆ξ considered the system can compute k-WTA for all k ∈ {1, . . . , 5}, depending on the coupling strength . The computation is thus reconfigurable in this sense. We remark that needs to be sufficiently large, otherwise no neuron is capable of overtaking another and thus k = 5, i.e. no ranking is performed. Finally, in Fig. 5 we present a larger network example with N = 50. As expected, we found that the mechanism described above applies in the same manner, and the global parameter controls the computed k. Specifically, k decreases monotonically as increases. Furthermore, every k ≤ N is in principle possible for sufficiently well-tuned .
As the voltages of many neurons may approach the threshold almost at the same time, see Fig. 3, it is important to understand the concurrent effect of noise and input signals. We here consider a Gaussian white noise signal and inputs as in (4) for a N = 5 network. In particular, we compute which fraction of all spikes comes from which neurons during a 3-WTA computation for different noise levels. To quantify noise in our system we define a signal-to-noise measure as where sigma is the standard deviation of the Gaussian signal and ∆ξ characterizes our signal strength as in (4). Let us consider the limiting cases first: in the absence of noise (σ 2 → 0), we expect that the two neurons subject to the weaker inputs would not elicit any spike while the other three neurons exhibit the same fraction (≈ 33%) of spikes; for strong noise (σ 2 ∆ξ), we expect that most of the information about the input is lost, thus all neurons contribute roughly with the same ≈ 20% of elicited spikes. As shown in Fig. 6, our numerical results corroborate those predictions. Furthermore, as the signal to noise ratio (SNR) is reduced, the previously silent neurons start to send a fraction of the spikes inversely proportional to the SNR. This is particularly interesting, because it shows a form of robustness, that the computation can still be achieved up to SNRs approximately 0.01 (Fig. 6d), if the system computes with the average number of spikes, for example by imposing a threshold on the firing rates as a readout.
So far, we have shown that the system introduced above is (re)configurable and how it responds to noise. Adjusting the coupling strength selects some k for a k-WTA computation via changes in the spike rates. A fundamental feature of spiking systems it that a major part of consumed power is due to spike generation, i.e. the smaller the number of spikes the smaller the power consumed. Let us now briefly estimate how many spikes our system requires to compute at different SNR.
The number of spikes n * required to rank the driving current from a pair of neurons, say i and j depends on how fast their individual numbers of generated spikes n i (t) and n j (t) diverge as function of time. Specifically, the difference ∆n ij (t) = n i (t) − n j (t) encodes the rank result in its magnitude and sign, e.g. ∆n ij (t) > 0 suggests that ξ i > ξ j and ∆n ij (t) < 0 indicates that ξ i < ξ j . We remark that the sign of ∆n ij (t) alone is not enough to determine which neuron received the stronger input, due to variability caused by noise and initial conditions. We thus numerically estimate an expected failure rate function F (σ, ∆ξ, n(t)) measuring how often ∆n ij (t) indicates either the wrong signal order, e.g. ∆n ij (t) > 0 for ξ i < ξ j , or is inconclusive (∆n ij (t) = 0) after a total of n(t) network spikes, calculated over 500 simulations per parameter set. The minimum number n * of spikes from the whole network to compute the partial rank order with an acceptable failure rate δ, noise standard deviation σ and input amplitude ∆ξ, is then estimated as n * (σ, ∆ξ, δ) = min{n | F (σ, ∆ξ, n) < δ for all n > n }.
(6) The quantity n * thus define the minimum (total) number of spikes after which the failure rate will never exceed δ afterwards within a much larger number of spikes, interval [0, 2000].  7. Number of spikes required to compute with a coupled and an uncoupled systems. (a) For small SNR, the coupled system computes with few spikes, consistent across different input magnitudes and fixed SNR, thus is robuts against ∆ξ changes. (b) the uncoupled system requires a large variety of number of spikes (n * ) for the same SNR, depending on the input strength (results for coupled system in green). Because all N = 5 neurons have similar spike frequencies, an oscillation with period close to 5 is observed, as ∆nij has a larger probability to be zero for all i, j pairs at times in which n(t) is a multiple of five (one spike per unit). Deviations on this period are cause by spike frequency variability (overtakes). (c) The coupled system consistently exhibits a smaller number of spikes and a smaller variation at the same SNR when compared to the uncoupled system. At small SNRs and ideal initial conditions (Vi = 0 for all i), in red, only the absolute minimum number of spikes 3 (n=k) is required. Parameters used are = 0.3 and δ = 0.002.
As an example, we consider a N = 5 network set to compute a 3-WTA ranking over five inputs chosen as in (4). In this experiment k = 3 is known and we are interested on comparing the three winners to the two losers. Among those comparisons the smallest difference among input strengths is ξ 3 − ξ 4 = ∆ξ, between neurons 3 and 4. Their difference in spike frequency determines the overall computing time because it dictates the longest relevant computing time in the process. Notice that the in-group differences are irrelevant for the desired computation. Moreover, the in-group rankings may take longer than determining the three stronger inputs and not possible to compute for large SNRs. For reference, we compare our results to a set of independent integrators. For clarity, we consider the exact same model of neurons described above, but now uncoupled, thus stressing the computational aspects provided by the network dynamics rather than model specific features. Let us first consider the limit case of no noise (σ → 0) and an ideal initial condition where all neurons start at the same voltage V i (0) = 0. In this limit, in the coupled system, neuron 4 does not spike and the number of spikes to compute is simply n = 3, one spike from each winner, and decoding the resulting spike trains reduces to detecting the first three spikes. On the other hand, the number of spikes to compute with the uncoupled system is proportional to ∆ξ and is given by the n(t) in which |∆n 34 (t)| > 2, with no actual limit to how large the number of spikes may become (minimum of 2).
In the other extreme limit of very large noise, ∆n 34 (t) is approximately a discrete random walk with step size one and zero mean, thus no computation is performed in either system.
More interestingly, Fig. 7 illustrate the intermediary cases where noise may (or may not) promote spike variability on all five neurons. In particular it shows how the number of spikes needed to compute scales with the SNR in both coupled and uncoupled systems. We found that not only the coupled system consistently computes with less spikes across a broad range of SNRs but also exhibits a small variability when the input magnitude is varied (Fig. 7a). Furthermore, for ideal initial conditions, V i (0) = 0 for all i, the coupled system computes with the absolute minimum number of spikes n * = 3 for SNR ≥ 25. In contrast, the uncoupled system (Fig. 7b) does not exhibit a predictable number of spikes n * to compute as a function of the SNR, as it is also a function of the input signal differences ∆ξ, and presents a spike response variability with orders of magnitude of difference for the same SNR (Fig. 7c). In practice, given an interval of possible SNRs and input strengths, the largest estimated n * should be chosen as an effective number of spikes to finish a computation.
The increase in computing speed due to reduced noise observed on the coupled system occurs because it is itself computing the rank order as it goes, i.e. the neurons are not only mapping the input strength to spike trains with different frequencies but actively inhibiting other components in a self-organized way. In summary, k-WTA by pulse-suppression is computed with reasonably few spikes (3 ≤ n * ≤ 70, numerically estimated) if the SNR is kept relatively large ( ≥ 1) and for SNR ≥ 25 only the absolute minimum number of spikes n * = k is required, thus the computing time is only limited by the neurons' intrinsic spike frequency. As the mechanism of self-organized pulse suppression is independent of both model details and network size, these results should hold qualitatively to other models and network sizes.

IV. Discussion
Our results show that fast-computing (re)configurable k-WTA can be implemented by simple symmetrical systems of spiking neurons with only inhibitory interactions, providing a versatile model capable of performing a variety of functions using the same underlying network structure. We believe our model bridges and complements a variety of other approaches to k-WTA that trade versatility, e.g. reconfigurability and/or simple topology, for specific features as output stability and sensitivity to weak input signals. For example Heteroclinic Computing [5,19,27] offers sensitivity to arbitrarily small signals (up to the noise level), because it relies only on unstable states, while neural fields [8,28] provide a soft-WTA with macroscopic stability (population dynamics) via shortrange excitation and long-range inhibition. Our model makes use of stable orbits and can robustly compute in a given time over a broad range of input magnitudes. Moreover, we expect the results on the influence of noise to stay qualitatively the same across other types of noise as long as they exhibit zero mean and exhibit no longterm (power law) correlations. Such types would add a bias proportional to the mean amplitude because noise is simply integrated in-between pulse-events.
Due to its simplicity, our model may provide the basis for novel hardware implementations. That is, our neuronal model is one-dimensional and generic, thus has a variety of well-established implementations, while the amplitude of interacting spikes is simply proportional to the voltage of the neuron receiving them, resembling a simple leakage of current to a common ground. Furthermore, the network topology employed is symmetrical, so it does not rely on any specifically weighted or complex topological interactions. We remark that system symmetry is not a necessary condition for such types of computations even though our theoretical model represents ideal symmetrical components. Small variations in parameters, e.g. coupling weights and neuron spiking frequencies, would add a bias to the results with strength proportional to the given variations because after integration all elements on the right-hand side of Equation (1) represent simple currents. As a versatile model capable of, in principle, performing any k-WTA computation for a given network size N and using only few spikes, it may be a good candidate for implementing functionality on autonomous systems. Varying k means that a small network is already capable of performing many different functions while the low spike count may translate in low power approaches to computation. Thus, our results may potentially also contribute to the growing field of artificial cognitive computing and related topics [28][29][30][31][32][33][34][35].