H IGH - PERFORMANCE RNN S WITH SPIKING NEURONS
Anonymous authors
Paper under double-blind review
A BSTRACT
The increasing need for compact and low-power computing solutions for machine learning applications has triggered signiﬁcant interest in energy-efﬁcient neuromorphic systems.
However, most of these architectures rely on spiking neural networks, which typically perform poorly compared to their non-spiking counterparts in terms of accuracy.
In this paper, we propose a new adaptive spiking neuron model that can be abstracted as a low-pass ﬁlter.
This abstraction enables faster and better training of spiking networks using back-propagation, without simulating spikes.
We show that this model dramatically improves the inference performance of a recurrent neural network and validate it with three complex spatio-temporal learning tasks: the temporal addition task, the temporal copying task and a spoken-phrase recognition task.
We estimate at least 500 × higher energy-efﬁciency using our models on compatible neuromorphic chips in comparison to Cortex-M4, a popular embedded microprocessor
I NTRODUCTION
Exponential growth in computational power and efﬁciency have played a vital role in the development of neural networks and their training algorithms.
However, it has also led to higher design complexity and increasing difﬁculty to keep up with Moore’s law (Schaller, 1997; Waldrop, 2016).
Recent years have also seen the movement of computation from data-centres to compact, distributed, and portable embedded systems.
These factors have created a demand for energy-efﬁcient AI-capable devices, leading to the development of dedicated and optimized von Neumann-style Artiﬁcial Neural
Network (ANN) accelerators (Aimar et al., 2018; Cavigelli and Benini, 2016; Chen et al., 2016) and a renewed interest in neuromorphic systems (Chicca et al., 2014; Frenkel et al., 2019; Davies et al., 2018; Moradi et al., 2018; Akopyan et al., 2015; Qiao et al., 2015; Neckar et al., 2019).
A key difference between neural networks deployed on von Neumann systems and most neuromorphic platforms is the use of spikes or train of pulses to represent signals in the latter.
Such networks are called Spiking Neural Networks (SNNs).
Spiking neuromorphic systems have a number of features that inhibit their use in real-world problems: (1) mixed-signal circuits suffer from Complementary
Metal-Oxide-Semiconductor (CMOS) mismatch (Pelgrom et al., 1989) that degrades performance; (2) rate-based SNNs generate a large number of spikes to represent signals that reduces their energy beneﬁt; (3) complex spiking dynamics makes it difﬁcult to train them using gradient-descent methods.
In this paper, we describe a new neuron model that addresses these problems and discuss how its
Low-Pass Filter (LPF) abstraction enables training spiking Recurrent Neural Networks (RNNs) using the backpropagation algorithm (or Backprop).
This is a signiﬁcant breakthrough as it enables training and deployment of energy-efﬁcient spiking neural network devices without simulating complex spiking dynamics.
P ROCESSING - IN - MEMORY FOR RNN S
Consider an RNN layer with n nodes.
At each time-step, the processor computes one or several matrix products of the form y
=
W.x , where y and x are vectors of length n , and W is a 2-D matrix of size n × n .
When operating on a von Neumann system with batch-size 1 , as is common in most edge applications, the bottleneck in throughput and energy-efﬁciency is the O ( n 2 ) memory fetches of W at every timestep.
An in-memory matrix multiplier addresses this problem.
It is a module where a “read” from the memory location of the W matrix, using “X” as the “address” gives out “Y”, without ever moving W .
This leads to a quadratic reduction in energy consumption.
Processing in-memory systems have been implemented for various tasks such as DNA sequencing (Ghose et al., 2018), graph processing (Ahn et al., 2015), etc and with dramatic reduction in energy consumption.
The energy reduction from in-memory computing is well established, but the key challenge with deploying such systems is the absence of compatible algorithms.
In this paper, we propose an RNN model for such a system.
The implementation of the in-memory module depends on how x and y are encoded and transported.
It can be synchronous or asynchronous and analogue or digital.
We adopt an asynchronous digital approach as it offers some implementation advantages.
Encoding information in binary digital format is less susceptible to noise in comparison to analogue.
Asynchronous signalling allows the energy-consumption to scale in proportion to chip activity, while also permitting lowlatency response.
Chips implementing such schemes have been published in literature (Qiao et al., 2015; Moradi et al., 2018).
The model presented in this paper is designed to integrate on similar chips (A reference framework is described in supplementary section D).
However, most of the algorithmic ideas presented in this paper are general and applicable to a range of compute systems.
T HE SPIKING NEURON MODEL
Spiking neuron models for encoding signals typically use rate- or time-coded spike-generation schemes (Diehl et al., 2015; Rueckauer et al., 2017; Bohte, 2012; Mostafa, 2017).
In rate-coding, the ﬁring rate of the neuron is proportional to the input signal.
Therefore, achieving high data-resolution with rate-coding requires a large number of spikes, which is not energy-efﬁcient (Nair and Indiveri, 2019).
To address this problem, several time-coding schemes have been proposed.
In this work, we build on existing models to propose an Adaptive Integrate and Fire (aI&F) neuron model, which can also be interpreted as an asynchronous Σ∆ circuit (Nair and Indiveri, 2019; Bohte, 2012; Yoon, 2016).
This mechanism reduces the spike count by only transmitting the error between an internal state and the input.
The aI&F neuron model implemented with current-mode neuromorphic circuits (Nair and
Indiveri, 2019) can be described by the following equations:
[Equation]
[Equation]
where the currents I mem and I L represent the “membrane potential” and “leak reversal potential” variables.
The term s represents the neuron adaptation current, i the input current, τ mem the membrane time constant, α L a gain factor, ∆ the threshold, α s the adaptation coupling parameter and τ w is the adaptation time constant.
The aI&F model is a feedback loop that tries to decrease the difference between the i ( t ) and s ( t ) .
The difference, i ( t ) − s ( t ) , is ﬁltered with gain, α L , and time constant, τ mem .
When the output of this ﬁlter, I mem , exceeds the spiking threshold, ∆ , I mem is reset and a spike is generated.
The Σ∆ circuit model used in this work is different from the aI&F model in the computation of the feedback term.
Instead of ﬁltering I mem , we operate on the spike train generated by the spiking neuron.
This ensures that the noise inserted by the spike-generation mechanism is also suppressed by the Σ∆ feedback.
The modiﬁed feedback equation is as follows:
[Equation]
Where, δ i indicates the spike train and I in is a programmable maximum current value that the analogue ﬁlter implementation can generate.
The product δ i I in models the feedback ﬁlter that integrates a current I in for the duration of the spikes.
Figure 1a shows a block diagram of the circuit implementation of the Equation 3 with the modiﬁcation described by Equation 4.
In this diagram,
F ( s ) is a ﬁrst order LPF that receives inputs to the neuron.
H ( s ) is a ﬁrst-order low-pass ﬁlter that produces s ( t ) in response to spikes generated by the neuron.
E ( s ) is also a ﬁrst-order low-pass ﬁlter on the difference between the input current i ( t ) and the feedback signal s ( t ) .
When the output of E ( s ) , I mem , exceeds the spiking threshold ( ∆ ) of the neuron, a spike-event is produced.
With each spike-event, s ( t ) increases and i ( t ) − s ( t ) decreases.
Figure 1b shows the asynchronous Σ∆ feedback loop in action for a test-case.
It can be shown that the Laplace domain representation of the output spike train can be expressed by the equation:
[Equation]
[Figure]
y(
[Figure]
[Figure] [Figure]
(s)
[Figure]
(t)
[Figure] [Figure]
where, N ( s ) indicates the Laplace-domain representation of the noise introduced into the loop, for example by the spike generation mechanism.
The Σ∆ loop described by Equation 5 is similar to a continuous-time Σ∆ modulation loop (Pavan et al., 2017) with the key difference being that the output spikes are unipolar.
This is valuable because the output of a conventional Σ∆ loop is always active ( +1 or − 1 ), whereas the asynchronous model is only active at the time of a spike event, making the model more energy-efﬁcient.
The input signals to the neuron may be encoded as spikes trains or as continuous analogue values from a sensor.
The transmitted analogue signal is reconstructed from a spike train by simply low-pass ﬁltering it.
An advantage of the Σ∆ neuron model is that it comes with a low-pass ﬁlter in its input stage.
Therefore, a Σ∆ neuron is a “codec” - It can both encode an analogue signal into a spike train and decode an incoming spike train back to the transmitted analogue signal.
As the low-pass ﬁlter at the input stage is agnostic of the type of input to it, a Σ∆ can encode and decode both types of signals - spike trains or continuous analogue ones.
A description of the biological motivation and noise-ﬁltering properties of the model is provided in supplementary section A.
The circuit implementing this model has been fully characterized in Nair and Indiveri (2019).
T RAINING A SPIKING RNN WITHOUT SIMULATING SPIKES
The neuron model introduced in the previous section allows us to train a recurrent SNN by treating the spiking neurons as LPFs and modifying the recurrent ANN equations suitably.
We will show that the trained weight parameters of the recurrent ANN model can be mapped to a recurrent SNN, without additional training.
We measure the effectiveness of this mapping procedure by comparing the temporal dynamics of the neurons in the recurrent ANN to the low-pass ﬁltered spike trains generated by the spiking neurons in the corresponding recurrent SNN.
In this demonstration, we use high precision synaptic weights.
This is typically not available in most spiking neuromorphic platforms.
However, the same mapping procedure can be used for mapping ANNs trained with binary or noisy weights.
Before introducing the mapping procedure, we describe three operations that are needed for it.
Input re-scaling: When implementing an SNN in mixed-signal neuromorphic systems, the state variables of the neuron are represented by voltages or currents that are of the order of mV or nA. Using such small values when training an ANN in software may lead to computational instability.
To avoid this we train the network with normalized input signals and re-scale the parameters and activation functions after training.
For example, if a single layer calculation is represented as y =
σ nl ( W · x ) , where σ nl is a non-linear activation function, x , W and y are the inputs, weights, and outputs from the layer, respectively, then, to re-scale the inputs by a factor γ , the activation function used in the
ANN will be modiﬁed, during inference, as y =
σ nl ( W · γ · x ) , where, σ nl ( . )
=
σ nl (cid:16) .γ
(cid:17)
Low-pass ﬁltering: The input signal can be reconstructed from the spikes trains generated by the Σ∆ neuron if s ( t ) tracks i ( t ) (Equation 4).
This is because s ( t ) is obtained by ﬁltering the neuron spike train.
This is why a Σ∆ neuron can be modelled as an LPF with time constant τ w .
The LPF approximation ignores the high-frequency components injected by the spiking mechanism, as they are suppressed by feedback loop (the N ( s ) term in the transfer function of Σ∆ neuron, Equation 5).
We model this by using a discrete-time Euler approximation to incorporate a LPF-term at the output of the RNN stage.
This results in the Low-Pass Recurrent Neural Network (lpRNN) cell by a simple tweak to the classical equation:
[Equation]
where, σ , (cid:12) and · denote non-linearity, element-wise Hadamard product and matrix multiplication functions, respectively.
The variables α , y n , x n , W rec , W in , and b represent the retention ratio vector, input vector, output vector, recurrent connectivity weight matrix, input connectivity weight matrix, and biases, respectively.
The subscripts on variable y and x indicate the time step.
α models the time constant of the recurrent ANN, and it is matched to the SNN time constant by setting it to α = e − Tsτs where, Ts is the time-step of the input data-stream fed to the recurrent ANN, and τ s is the feedback time constant of the Σ∆ neurons used in the desiredSNN.
For example, if the recurrent ANN is being trained to detect speech from an audio-signal, then Ts should be set equal to the time difference between the consecutive samples.
The value of τ s , for the
ANN set to min ( τ w , τ mem ) in the Σ∆ equations.
τ s must therefore be chosen such that the signals being transmitted lie well within the pass-band of the feedback ﬁlter.
This ensures that all the in-band components are transmitted well, even when different neurons in the systems have different values of τ s , for example, due to mismatch.
This is an important observation for mixed-signal systems, where mismatch effects may result in different neurons to have differing time-constants.
We will demonstrate that the effect of device mismatch is well-tolerated for most practical cases and leads to gradual degradation in performance as it increases.
It must be noted that while computing Ts or the bandwidth of an audio or sensor measurement is easy, it is not trivial for data-sets such as text.
Saturating non-linearity: It has already been shown in the literature that the Rectiﬁed Linear
Unit (ReLU) non
-linearity is a good non-linear model of the aI&F neuron (Yoon, 2016; Bohte, 2012).
However, the Σ∆ neuron also ﬁlters incoming spike trains using a low-pass ﬁlter which limits its maximum output current to I in (see Equation 4).
To model this effect we can either set I in in the
SNN to the largest activation output found in the ANN simulation or clamp the maximum output of the activation function in the ANN simulation to I in .
In our experiments, we do the latter.
4. T HE MAPPING PROCEDURE
First, the recurrent ANN cell is modiﬁed by replacing the RNN units with the lpRNN.
The modiﬁed network is then trained using Backprop with conventional Autograd tools provided by libraries such as PyTorch or Tensorﬂow.
This gives us the synaptic weights for the recurrent SNN.
Then, the largest value attained by the state variables in the trained network is mapped to I in .
This ensures that the spiking neurons do not saturate.
Finally, the inputs to the SNN are re-scaled to suitable currents or voltage values as described earlier.
Limitation: A recurrent SNN is a continuous-time system that spikes hundreds to thousands of times per second to achieve the necessary transmission accuracy.
Therefore, the time step of the transient simulation needs to be made very ﬁne.
The mapping algorithm assumes that the mapped
SNN operates on the same sequence that the original ANN is trained on.
This is a problem.
Training a recurrent ANN on a long sequence using back-propagation is computationally expensive and often intractable because of vanishing and exploding gradients.
For example, with speech signals sampled at the standard rate of 44.1 kHz, even a short utterance is thousands of samples long.
If we are unable to train an ANN for the desired task, the mapping mechanism is useless.
Our approach to addressing this issue is to train the ANN with sub-sampled signals.
After we compute the desired weights, we rescale the time-constants of the network before mapping it to the SNN.
If the simulation time-step for the SNN is T s SNN and that of ANN is T s ANN , then the time constants of the two simulations are given by α ANN =
e − TsANNτ and α SNN =
e − TsSNNτ .
We only rescale the time constants without changing the weights of the mapped network, introducing inaccuracies in the mapped network.
The mismatch arises because a single time-step of the ANN corresponds to several simulation time-steps in the mapped SNN ( = T sANN T sSNN ).
The mapping is exact for a ﬁrst-order LPF because of the Linear
Time-Invariant (LTI) property.
However, even though an RNN is non-linear, by making the low-pass ﬁltering effect more dominant (for example, with α = 0 . 99) , we observe that the mapped dynamics match well.
E XPERIMENTAL RESULTS
All the spiking simulations in the following sections are run on a custom transient mixed-signal modeling library, called spiking simulator for systems of 1st-order LPFs (Spiker).
The motivation for design and operation of Spiker is described in supplementary section E.
5. E NCODING PERFORMANCE OF THE S IGMA –D ELTA NEURON MODEL
The Σ∆ neuron model used in the mapped SNN is not an ideal transmitter of information as the spiking mechanism introduces error akin to quantization noise.
This is analogous to use of low bit-precision in conventional ANNs.
It is important to measure how much precision is available using a metric that is meaningful for the proposed spiking architecture.
We measure this using a
Signal-to-Distortion ratio (SDR) metric when encoding a sinusoidal input and reconstructing it with an LPF.
The SDR is the ratio between the energy contained in the transmitted signal and total energy in all other frequency components generated by the distortions introduced in the signal chain.
The results of these experiments are shown in Figure 2.
We note in Figure 2a that highest SDR of the Σ∆ neuron is 55dB, with a 20 dB/decade roll-off as a function of frequency with a pole corresponding to τ mem .
Figure 2b highlights the input amplitude-dependence of the SDR.
We note in Figure 2b that the SDR improves as a logarithmic function of the input amplitude and then drops suddenly.
The logarithmic improvement in SDR is because the error component corresponding to the spiking threshold, ∆ , becomes a smaller fraction of the input amplitude.
The sudden drop occurs when the input amplitude approaches and exceeds I in in Equation 4.
This is because the maximum attainable value of the feedback term, s ( t ) in Equation 4 is I in .
Under these conditions, I mem is always greater than s ( t ) , causing the neuron to ﬁre at a very high rate.
For the rest of the SNN simulations in this paper, the Σ∆ neuron settings listed in Figure 2 caption are used.
[Figure]
SDR of the Σ∆ neuron as a function of sinusoidal input parameters.
The Σ∆ neuron is fed a single-tone sinusoid riding on a DC bias to ensures that the input is non-negative.
The transient simulations are run with a simulation time step of 1 µ s.
This is the reason for the saturation in the ﬁring rate in (b).
The SDR ratio is reported after subtracting the DC component.
The neuron parameters for the simulation are τ mem = 0 .
007 s , τ w = 0 .
0014 s , α L = 5000 , α s = 1 , ∆ = 0 .
1 nA ,
I in = 40 nA , I L = 0 nA .
5. D EMONSTRATION OF THE MAPPING MECHANISM
We demonstrate the mapping mechanism using multi-layer RNNs.
The ANN dynamics are compared against a signal obtained by low-pass ﬁltering the spike trains generated by the Σ∆ neuron.
Our assertion is that the mapping mechanism will map any recurrent ANN to an equivalent recurrent
SNN.
Therefore, instead of demonstrating the mapping for a particular task, we set synaptic weights to random samples from a Gaussian distribution.
We then compare the dynamics of all the neuron units in the mapped and original networks.
To ensure that our nodes do not saturate, we constrain the largest eigenvalue of the recurrent weight matrices to 1.4.
The motivation for this trick was from obtained from Echo-State Networks (ESNs)(Jaeger, 2002; Jaeger et al., 2007).
The quality or goodness of ﬁt is measured using an Normalized mean square error (NMSE) metric, which measures the mean square error normalized by the signal power.
It is used to compare two time series signals x ref and x using the following formulation:
[Equation]
where, || .
|| indicates the L2 norm.
The NMSE metric lies between 1 and −∞ , with 1 indicating a perfect match and −∞ indicating a very bad ﬁt.
If NMSE = 0 , then x is at least as good a ﬁt as a straight line at x ref ..
In our results, we report the mean and standard deviation in the NMSE scores for all the units in a layer.
The effectiveness of the mapping mechanism is demonstrated using a four-layer RNN.
The input and output stages are implemented as fully-connected feed-forward layers, and the recurrent layers are also interleaved with fully-connected layers.
The input feature dimension was set to two and the output to three.
The input data was a weighted sum of sinusoidal signals that were band-limited to 50 Hz and sampled at 1 MHz for 0.2 seconds.
The high sampling rate is necessary to accurately capture the dynamics of the SNN, whose neuron models are highly non-linear, in a transient simulation.
The length of the simulation is a key consideration as we want our mapped SNN implementation to remain matched for arbitrarily long sequences.
Computational considerations limited the duration of our simulations, but this should be tested before large scale deployment in real-world use.
Fully-digital neuromorphic platforms, such as Intel Loihi, IBM TrueNorth, or SpinNaker, do not suffer for mismatch issues.
However, mixed-signal neuromorphic chips, such as Qiao et al. (2015);
Neckar et al.
; Schemmel et al.
(2012), are potentially more energy-efﬁcient than their digital counterparts but suffer from device mismatch.
A Σ∆ feedback loop naturally compensates for such effects (Pavan et al., 2017) but there are many components in the model that lies outside the feedback loop.
To study this, we add the effect of mismatch in our simulations by sampling the parameters, p of the mapped SNN:
[Equation]
where, c v p is the coefﬁcient of variation ( = standard deviation mean ) in the parameter, p .
To understand the statistics in the quality of the mapping mechanism, we generate multiple samples of network parameters and measure the quality of ﬁt.
These results are tabulated in Tables 1 and 2, where we list the measured mean of and standard deviation in NMSE values for a 4-layer RNN with 51 andunits per layer, respectively.
With no mismatch effects, the reconstruction is very good to all layers, in both cases.
Furthermore, we observe nearly perfect reproduction of the network dynamics for up to 2 layers, and a gradual degradation as the size, depth and mismatch of the network increases.
We note that the mapping mechanism is robust for c v p < 0 .
Reduced mismatch sensitivity is useful for design of neuromorphic chips because it simpliﬁes the design, and that, in turn, reduces the energy and area consumed by these chips.
Visualization of the transient dynamics of all the nodes in the original and mapped RNNs is provided in supplementary section F. Finally, the performance of the mapping algorithm comparing the dynamics of the ANN with sub-sampled data to that of the SNN is shown in Table 3.
The length of the SNN simulation is 0 .
2 s , translating to input sequence lengths, L. We note that the mapping technique works well for fairly high sub-sampling ratios and shows signiﬁcant degradation only for L = 20 .
Note that a near perfect match ( NMSE > 0 . 5 ) is achieved up for depth of two.
This restricts the models used for benchmarking in Section 5.3.
5. L EARNING PERFORMANCE OF THE LP RNN CELL
The key idea behind enabling the mapping between an recurrent ANN to its spiking equivalent was the addition of a low pass ﬁlter to the the state variables.
It must be highlighted that the idea of using a low-pass ﬁlter model for neurons is fairly old and has been studied in various contexts (Beer, 1995;
Mozer, 1992; Jaeger et al., 2007).
The novelty in this work is in identifying its use in the mapping mechanism and in the study of its learning properties.
The mapping procedure would be of no use if the resulting ANN was unable to perform as well as their unﬁltered counterparts in learning tasks, and it is the focus of this section.
In our experiments, we set α in Equation 6 by sampling from a distribution with a common mean value shared by all the neuron units in the network.
This simpliﬁes the design of the neuromorphic system by eliminating the need to create precise tunable time constants in the neuron implementations.
[Table]
[Table] [Table]
s
[Table]
s
[Table]
s
[Table]
s
[Table]
Rec. layer1.
[Table] [Table]
Rec. layer0.
[Table] [Table]
[Table] [Table]
[Table] [Table]
Rec
[Table] [Table]
[Table] [Table]
[Table] [Table]
[Table] [Table]
Spoken phrase (acc.)
[Table] [Table]
(Sainath and Parada, 2015) lpRNN and SimpleRNN networks for the add and copy tasks used a single layer with 128 hidden units.
Arjovsky et al.
(2016) use unitary recurrent weight matrices and Li et al.
(2018) use two layers of 128-unit IndRNN layers.
The spoken phrase task reference is a CNN model released as a
Tensorﬂow example (Google, 2019).
First, we study the short-term memory capabilities of the lpRNNs using the synthetic addition and copying tasks (Hochreiter and Schmidhuber, 1997; Arjovsky et al., 2016; Le et al., 2015).
Next, we compare the performance of the lpRNN cell vs a SimpleRNN cell in a speech recognition task.
We summarize the key observations in this section and details are in the supplementary material.
Temporal addition task: The addition task (Le et al., 2015) involves processing two parallel input data streams of equal length.
The ﬁrst stream comprises random numbers ∈ (0 , 1) and the second is full of zeros except at two time steps.
The network is trained to generate the sum of the two numbers in the ﬁrst data stream corresponding to the time-steps when the second stream had non-zero entries.
The baseline to beat is a mean square error (mse) of 0.1767, corresponding to a network that always generates 1.
We adopt a curriculum learning (Bengio et al., 2009) procedure for this task, by ﬁrst training the RNN cell on a short sequence and progressively increasing the number of time steps.
Each curriculum used 10,000 training and 1000 test samples.
The length of the task was incremented when the mse went below 0.001.
The SimpleRNN cell failed to converge beyond sequences of length 40, while the lpRNN cell converged to mse < 0 .
001 for sequences up to 642 steps.
Interestingly, the
Long Short-Term Memory (LSTM) cell learnt a general solution when trained by this procedure and could solve arbitrarily long sequences, even with just two hidden units in the cell!
Temporal copying task: We train the RNN cells on a varying length copying task as deﬁned in (Graves et al., 2014) instead of the original deﬁnition (Hochreiter and Schmidhuber, 1997; Arjovsky et al., 2016).
This problem is harder to solve than the temporal addition task.
The network receives a sequence of up to S symbols (in the original deﬁnition, S is ﬁxed) drawn from an alphabet of size
K. At the end of S symbols, a sequence of T blank symbols ending with a trigger symbol is passed.
The trigger symbol indicates that the network should reproduce the ﬁrst S symbols in the same order.
We adopt a curriculum learning procedure here too
and ﬁrst train the network on a short sequence (T=3) and gradually increase it (T ≤ 200).
The sequence length is incremented when the categorical accuracy is better than 99%.
The SimpleRNN cell failed at this task even for T=30.
The lpRNN cell was able to achieve 99% accuracy for up to 120 time steps.
After that, it generates T blank entries accurately but the accuracy of the last S symbols drops (For T=200, it was 96%).
Spoken phrase classiﬁcation: The target for the lpRNN cell are neuromorphic platforms that are typically resource-constrained, due to power, memory, and area restrictions.
Therefore, we test the performance of the lpRNN cell on a problem that is compatible with such systems (see supplementary section D).
We chose a limited vocabulary spoken commands detection task using the Google commands dataset (Warden, 2018), which comprises 36 classes of short-length spoken commands such as “left”, “up”, or “go”.
The dataset was created for hardware and algorithm developers to evaluate their low footprint neural network models in limited dictionary speech recognition tasks.
The neural network receives a Mel-spectrogram as inputs, and comprises, from input to output, two fully-connected dense layers with 128 and 32 units with batch normalization, two RNN layers with 128 units, two fully-connected dense layers, topped by a softmax readout.
In total, the network has about 80K trainable parameters.
We use Adam optimizer (Kingma and Ba, 2014), with a learning rate of 0.001 for training.
We note that all lpRNN variants massively outperform the SimpleRNN and slightly outperform the LSTM variants, all with the same number of parameters.
We further note that the performance of the network peaks for certain values of α and the random sampling case.
The high performance of the lpRNN cell is a crucial result because not only did the addition of the low-pass ﬁlter enable mapping of the recurrent ANN model to neuromorphic platforms, it also resulted in a much-improved performance.
[Table]
Energy-efﬁciency estimation: We compare the energy cost of computing a two-layer RNN with 128 hidden units (used in the audio task) for an in-memory lpRNN system with Σ∆ neurons against
Cortex-M4, a popular low-power microprocessor used in milliWatt-range applications.
We conservatively estimate that our implementation yields 500 × better energy-efﬁciency in this instance.
Larger networks will see a dramatic increase in this difference.
(see supplementary section J).
C ONCLUSION AND OUTLOOK
We presented a novel aI&F spiking neuron model and discussed its spike-coding and noise-tolerance beneﬁts.
Then, we discussed how the LPF abstraction of the aI&F neuron model enables training of recurrent SNNs without having to simulate the complex dynamics of a large network of spiking neurons.
This strategy enables training a recurrent SNN using standard optimization algorithms such as backpropagation.
The mapping technique that allowed us to achieve this result is studied in detail, including its limitations..
We observe a dramatic improvement in the performance of the RNN cell with the addition of the low-pass ﬁltering term.
We think that this improvement is because the LPF acts as a temporal regularizer (see supplementary section C).
Current spiking RNNs are benchmarked on much simpler tasks than presented in this paper, often due to the computational cost and lack of algorithms for training them.
The importance of this work lies in proposing algorithmic solutions to address this key problem, to enable a new generation of ultra-low-power neuromorphic chips.
A M OTIVATION FOR THE USE OF THE SIGMA - DELTA NEURON MODEL A. C ODING MECHANISM
A neuron in deep learning has one primary function - the non-linear transformation of its input.
However, a biological neuron and its neuromorphic counterpart have the added job of encoding information in spike trains.
The most popular model for this encoding mechanism is rate coding, where the neuron ﬁres at a rate proportional to the incoming signal.
This mechanism is not efﬁcient for transmitting high-resolution data.
For example, to transmit a signal at 8-bit resolution, it will require
O(256) spikes for each sample.
An improvement to this coding mechanism is theaI&F model (Brette and Gerstner, 2005), which can be interpreted as an asynchronous delta-sigma ( ∆Σ ) loop (Yoon, 2016; Bohte, 2012; Nair and Indiveri, 2019).
The ∆Σ mechanism is a time-coding model that is more efﬁcient in its use of spike trains (Nair and Indiveri, 2019) than rate-coding models.
Other time-coding schemes have also been proposed in literature (Rueckauer et al., 2017; Gerstner and Kistler, 2002).
However, the advantage of the ∆Σ interpretation is that it leads to highly power-efﬁcient circuit implementations (Nair and Indiveri, 2019) that is tolerant to mismatch and noise effects.
Furthermore, the model allows us to treat the neuron state as an analogue variable and ignoring the speciﬁc timing details of the encoding spike trains (Nair and Indiveri, 2019).
The independence from the monitoring precise spike-times is beneﬁcial because state-dependency, noise and device mismatch cause different neurons to generate spikes at different times for the same input.
Modelling it is computationally expensive.
The ∆Σ feedback loop ensures that they all represent the same signal with the same accuracy in spite of their differences (Nair and Indiveri, 2019).
This abstraction enables the network designer to only look at the internal state of the neuron when optimizing the network weights for an SNN.
It is a crucial enabler for this paper as simulating and training mismatch-prone SNNs is computationally much more expensive than ANNs.
A. B IOLOGICAL NEURAL NETWORKS ARE LOW PASS FILTERING
Activation functions used in neural networks and apply a non-linearity to a weighted sum of input signals.
However, ANNs assume that when the input changes, the internal state of the neuron or dendrites can also change immediately to reﬂect the new input.
This behaviour ignores the fact that biological neuronal channels are LPFs (Gerstner and Kistler, 2002).
Modelling the inertial or low-pass ﬁltering property is essential to implement and study recurrent neural networks in any neuromorphic system as the transitional dynamics deviate completely in its absence.
The ∆Σ neuron models the ﬁltering behaviour with a ﬁrst-order low pass ﬁlter.
We argue that not only is this modelling essential, it is also a useful constraint to impose on RNNs.
A. C HANNEL NOISE AND RECONSTRUCTION ACCURACY IN A SPIKING NEURON
The Σ∆ scheme encodes the information in the relative timing of the spikes.
This implies that any noise in the spike timing, i.e. jitter, introduced during transmission of the spikes will result in distortion of the reconstructed signal, for example, in situations when the transmitting and receiving neurons are on separate chips.
The distortions are modelled by a random variable ∆ t , which is sampled from a normal random distribution, ∆ t ∼ N (0 , j 2 σ ) with probability distribution function
Pr (∆ t ) .
Note that a ﬁxed delay does not contribute to distortion and is ignored.
To compute the effect of spike timing noise, we calculate the Laplace domain representation of the transmitted signal as follows.
If I D ( t ) is the Dirac delta function, the transmitted spike train y ( t ) , jitter-affected spike train, y (cid:48) ( t ) , the desired ﬁltered spike train, s ( t ) , and the ﬁltered version of the jitter-affected spike-train,
[Figure]
( i
[Figure]
r ( t ) can be expressed as,
[Equation] [Equation]
The mean value of r ( t ) can then be computed as
[Equation]
=
[Equation]
14) =
[Equation]
(15) where, P ( s )
=
L { Pr( t ) }
=
e s 2 j 2 σ 2 .
R ( s ) is plotted in Figure A.1 as the recovery transfer function (RTF) with j σ = 1 ms .
We see that for sufﬁciently band-limited signal, the channel noise does not affect the signal transmission accuracy.
B C OMPARISON TO OTHER RNN MODELS
The low pass ﬁltering behaviour of neurons is well-known in neuro-scientiﬁc literature (and in other ﬁelds) and has been studied in the past with RNNs as well(Beer, 1995; Mozer, 1992; Jaeger et al., 2007).
For example, ESNs as proposed by Herbert Jaeger (Jaeger et al., 2007) has an identical formulation to the lpRNN where the recurrent layer uses leaky integration units.
In ESNs, the spectral radius of the initialization values of the recurrent kernel is constrained to confers an “echo-state property” to the network.
The recurrent or input connectivity weights are not trained during the learning process.
Instead, only the read-out linear classiﬁer is trained.
In the lpRNN model, the spectral radius of the recurrent kernel is not constrained and all the weight matrices, including the retention ratios if required, are trained.
lpRNN also shares similarities with recurrent residual networks proposed by Yiren Wang (Wang and Tian, 2016), which are described by the following equations
[Equation]
where W denotes input and recurrent kernels, and other symbols have the same meaning as equation 6.
In equation 16, g and f are identity and a hyperbolic tangent functions, respectively.
A comparison can also be made with the LT-RNN model proposed by Mikael Henaff (Henaff et al., 2016), whose update equations are:
[Equation]
where W and V are 2-D transition matrices that are learned during the training process.
In this case, it is possible that the LT-RNN cell reduces to an lpRNN, but is unlikely to occur in practice.
Similar analogies can also be made to the IndRNN model (Li et al., 2018) and recurrent identity networks (Hu et al., 2018).
Generally speaking, the main difference between the lpRNN cells and popular RNN models in use today is the(re)indroduction of the ﬁltering term into the RNN model with impositions on boundary and train-ability conditions.
We see that in addition to enabling their use in neuromorphic platforms, this results in more stable convergence properties due to a temporal regularization effect, as described in the Section C.
C M EMORY IN AN LP RNN
We can analyze the evolution of an lpRNN cell by using an approach similar to the power iteration method, described by Razvan Pascanu (Pascanu et al., 2013).
To do this analysis, we approximate the lpRNN update equation as
[Equation]
where, for simplicity, we also make the added assumption that all units of the lpRNN layer have the same retention factor, α .
The gradient terms during back-propagation through time can now be expressed as a product of several terms that have the form:
[Equation]
where, t and k , are time step indices with t > k and l = t − k .
If an eigenvalue of the W Trec matrix is λ , then the corresponding eigenvalue of the matrix [(1 − α ) W Trec
+ α ] can be written as
[Equation]
Looking at the eigenvalue of the gradient terms as computed in equation 21, we note that α acts like a temporal regularizer on the eigenvalues of the recurrent network.
It can also be seen that by scaling α to lie between 0 and 1, the operation of the network shifts between that of purely non-inertial recurrent to a completely inertial network stuck in its initial state, respectively.
This insight helps us understand why lpRNNs perform well in long memory tasks.
Hochreiter (Hochreiter and Schmidhuber, 1997) deﬁned the constant error carousel (CEC) as a central feature of the LSTM networks that allowed it to remember past events.
In a crude sense, this corresponds to setting the retention ratio, α = 1 .
Forget gates were subsequently added by Felix
A. Gers (Gers et al., 2000) to the original LSTM structure, that allowed the network to also erase unnecessary events that were potentially trapped in the CEC.
This means that the average effective weight of the self-connection in the CEC was made < 1 .
A randomly initialized set of α values with a reasonably large number of cells appears to have similar functionality.
By setting α < 1 , the network is guaranteed to lose memory over time, but if some of the α s are close to 1, it may retain the information for a longer time frame.
Moreover, the regularization effect of α s also prevents the eigenvalues of the recurrent network from becoming too small, ensuring that memory is never lost immediately.
We expect that the lpRNN model has a reduced representational power than gated RNN cells, not simply because it has 4x fewer parameters, but because the lpRNN state is guaranteed to fade with time whereas a gated cell can potentially store a state indeﬁnitely.
D T HE NEUROMORPHIC SIGNAL CHAIN
The ∆Σ mapping mechanism requires deﬁning suitable time constants for the lpRNN cell being trained by backprop.
This can be derived for continuous-time signals from sensors or real-world signals such as an audio input by taking into account the bandwidth of the incoming signals as described earlier.
We illustrate a reference neuromorphic signal chain for processing audio input in Figure D.2.
The data received from the audio sensor is ﬁrst ﬁltered by an audio ﬁltering stage such as the cochlea chips (Chan et al., 2007; Sarpeshkar, 1998; Hamilton et al., 2008).
These systems typically implement mel-spaced ﬁlter banks.
A neural network processes the ﬁlter outputs and drives an actuator system.
A minimal conﬁguration of weights and connectivity required to implement the lpRNN cell in a neuromorphic platform is illustrated in Figure D.2.
It is a memory array with spiking neurons attached to the periphery of the system.
Each memory cell acts as a transconductance stage - it receives voltage spikes and generates a scaled output current.
These currents are summed by the Kirchoff’s current law and integrated by the neurons.
Readers familiar with memory design and computer architecture may identify this as an in-memory computational unit.
An in-memory neural network accelerator is energy-efﬁcient, primarily because it eliminates movement of synaptic weights (Ghose et al., 2018; Qiao et al., 2015) from the memory to a far-away processing module.
Instead, the activations of the neurons are transmitted to the other nodes in the network.
The computation is no longer memory-bound unlike RNN computation on von Neumann style architecture.
Figure D.2 implements a single spiking RNN stage (equivalent to an lpRNN), with green and red boxes highlighting the input and recurrent kernels, respectively.
The architecture can be modiﬁed to implement a fully connected layer by eliminating recurrent connections.
Note that an equivalent conﬁguration can be also set up in fully-digital neuromorphic systems such as (Frenkel et al., 2019; Davies et al., 2018; Akopyan et al., 2015) that do not suffer from noise and mismatch issues, but may consume more area and power.
Sensor
Filtering
Spiking NN
Actuator // w w w w w w w w w w w w w w w w w w w w w
Voltage spike train from previous stage
[Figure]
E S PIKER : A SYSTEM - LEVEL SPIKING SIMULATOR
Spiker is a transient-simulator for simulating large networks of spiking neurons and synapses using the Basic Linear Algebra Subprogams (BLAS) libraries.
It is written in Python and uses the
Numpy (Oliphant, 2006) library.
There is also a PyTorch (Paszke et al., 2017) version that supports
Graphical Processing Unit (GPU)-acceleration.
Unlike spiking simulation tools like Brian2 (Stimberg et al., 2019) or NEST (Gewaltig and Diesmann, 2007), which are general-purpose solvers of Ordnary
Differential Equations (ODEs), Spiker is a highly-speciﬁc simulator for systems where the only differential equation implemented is that of a ﬁrst-order LPFs.
The simulator is not designed to solve any differential equation.
Instead, it allows us to run massive simulations of large networks comprising neuron and synapse models whose building blocks include ﬁrst-order LPFs.
E. H OW DOES S PIKER WORK ?
Key idea #1 Constraining the support to ﬁrst-order LPFs has the advantage that it allows us to create closed-form solutions to the differential equations at all time-step resolutions without loss of accuracy.
The differential equation corresponding to a ﬁrst-order LPF is the following:
[Equation]
The closed-form solution to this, ignoring the initial conditions takes the form
[Equation]
A useful property of the exponential function is that e − t 1+ t 2 =
e − t 1 · e − t 2 .
Therefore, we have a simple closed-form method to compute the state of a LPF at any arbitrary time, given an initial condition.
This implies that if all the building blocks of a system are made of modules which have an exponential solution, then, given their initial state, it is possible to compute the state of the entire system at some arbitrary time in the future, precisely.
This is a well-known property of all LTI systems.
Key idea #
However, a spiking system is not LTI.
Therefore, it is not possible to predict the state of a spiking neural network at an arbitrary time in the future.
Instead, the Spiker simulator takes tiny temporal steps and computes the state of the network variables at each step using the closed-form solution.
At the end of each time-step, the neuron models check if it should spike and then resets the corresponding variable to zero.
The spiking input to the synapses is a train of 1-bit values corresponding to the presence or absence of an incident spike from an upstream neuron.
This implies that the precision of the spike-event is limited to the resolution of the simulation time-step.
However, the key insight here is that, if the signals being transmitted have a bandwidth much smaller than the simulation time-step, the higher-order effects can be safely assumed to be gone.
Moreover, in spiking neurons, small amounts of jitter in the spike-timing is well-tolerated.
This is because of the noise-cancelling property of the feedback loop.
Therefore, the Spiker simulator allows the user to set the simulation time-step to a large value that offers fast transient simulations — a fast-simulation trades-off against the precision of the simulated spike-timing.
Finally, the simulator also allows us to program and simulate noise and mismatch effects in the neuron parameters, such as mismatch in the spiking threshold and time-constants.
The Spiker simulator was used to run all the SNN simulations in this paper.
F V ISUALIZING MAPPING OF A RECURRENT SNN
The top row of Figure F.3 shows the mapping mechanism in action for a single test case.
We note that as the depth of the network increases, the quality of ﬁt degrades, but is still close to perfect as measured by the NMSE metric.
The bottom row of Figure F.3 shows the mapping mechanism in action for devices with a very large c v p = 1 .
We note that even in such cases, the performance in lower layers remains fairly stable and only gradually degrades as the depth increases.
G C ONVERGENCE PLOTS FOR THE G OOGLE SPOKEN COMMANDS TASK
Figure G.4 shows the convergence plots for various values of α .
         (SRFK     
$ FF X U D F\ >@%HVW
 %HVW %HVW %HVW %HVW
 %HVW 
 
%HVW
 %HVW
          (SRFK    
   & D W HJR U L F D O  O R VV
>@ 
   H M APPING THE G OOGLE SPOKEN COMMANDS NETWORK
Each 1-second recording from the dataset is transformed using the Mel-spectrogram into 25 frequency and 128 temporal bins. This sequence represents a single speech command for the ANN. Mapping the trained ANN to an SNN is challenging because of the limitation described earlier; A short length sequence does not give the SNN enough time to generate the spikes required to transmit information.
On the other hand, it is too difﬁcult to train a longer length sequence that is several thousand samples long. To address this issue, we train the ANN using the short sequence with 128 bins and demonstrate the mapped SNN by feeding it the same spectrogram data that is up-sampled to 1 MHz.
The quality of the mapped recurrent SNN is demonstrated using the weights from the trained recurrent ANN for a single case in Figure H.5.
The bottom row of Figure H.5 also shows the mapping mechanism in action for RNN layers that are affected by mismatch with c v p = 0 .
The results indicate an excellent ﬁt between the mapped and the original networks, even with mismatch. The prediction made by the
SNN also matched that of the ANN.
Unfortunately, it is computationally prohibitive to compare the accuracy results of the SNN to the reference model on the full dataset.
We only demonstrate the mapping accuracy for the two recurrent layers of the network in Figure H.5 for a single command in this paper.
A complete analysis of the accuracy performance will require testing on a neuromorphic system and will be the focus of a follow-up work.
I E XTENDING THE LOW - PASS FILTERING IDEA TO OTHER RNN MODELS
Our goal with introducing lpRNN cell was to enable faster and better training of SNNs.
However, the analysis performed here indicates that low pass ﬁltering also provides temporal regularization features which can beneﬁt ANN-RNNs such as LSTMs. Therefore, we propose to extend the LSTM formulation by applying a low pass ﬁlter at the output ( h ), and call it an lpLSTM cell:
Forget gate: f t = Sigmoid ( W f x t + W rec f h t − 1 + b f )
Input gate: i t = Sigmoid ( W i x t + W
rec i
h t − 1 + b i )
Output gate: o t =
Sigmoid ( W o x t + W rec o h t − 1 + b o )
State : c t = f t (cid:12) c t − 1 + i t (cid:12) Relu
( W c x t + W rec c h t − 1 + b c )
Output : ¯ h t =
o t (cid:12) Relu ( c t )
Filtered Output : h t = α (cid:12) h t − 1 + (1 − α ) (cid:12) ¯ h t (24) where, W rec x , W x , b x indicate the recurrent kernel, input kernel, and bias for the corresponding gate or state.
Similar formulations for other RNN cells such as GRU (Chung et al., 2014), IndRNN (Li et al., 2018), Phased-LSTMs (Neil et al., 2016), Convolutional LSTMs (Xingjian et al., 2015), etc can be easily made.
I. E XPERIMENTAL RESULTS FOR THE LP LSTM CELL
In this section, we benchmark the Low-Pass Long Short-Term Memory (lpLSTM) cells to their unﬁltered variants.
In our experiments, the learning rate was set to 0.005 and normalized gradient was clipped to 1.
Current works describe use of various task-speciﬁc initialization constraints to solve the addition and copying tasks better (Henaff et al., 2016; Le et al., 2015).
Instead of that, we use a data-driven curriculum learning protocol in our experiments and are able to obtain dramatically improved performance on these tasks.
The networks used for the copying and addition tasks are fairly small.
We also test it on a character-level language modelling task with the Penn Treebank dataset (Marcus et al., 1994) using a large network with roughly 19M parameters(Kim et al., 2016).
We swap the lpLSTM cells with an LSTM cells in our experiments and the network architecture and hyper-parameter settings were left unchanged from the values reported by the original authors.
A summary of our observations are as follows:
The lpRNN cell exhibits a dramatically improved performance over the SimpleRNN cell.
The low pass ﬁlter appears to have a temporal stabilization effect even for LSTM cells.
However, when other regularization and stabilization techniques such as
Dropout(Srivastava et al., 2014) are introduced, the beneﬁt appears muted.
It is possible that the large networks with low-pass RNN layers require network architecture tweaks to beneﬁt from the ﬁltering property, but it was not investigated in this work.
I.1. T EMPORAL ADDITION TASK
The addition task (Le et al., 2015) involves processing two parallel input data streams of equal length.
The ﬁrst stream comprises random numbers ∈ (0 , 1) and the second is full of zeros except at 2 time steps.
At the end of the sequence, the network should output the sum of the two numbers in the ﬁrst data stream corresponding to the time-steps when the second stream had non-zero entries.
The baseline to beat is a mean square error (mse) of 0.1767, corresponding to a network that always generates 1.
We ﬁrst train the RNN cell being tested on a short sequence and progressively increase the length.
Each curriculum used 10,000 training and 1000 test samples.
The results are shown in Figures I.6, where each stage of the curriculum learning process is marked with bands of different colours.
The width of the band indicates the number of epochs taken for convergence.
The length of the task was incremented when the mse went below 0.001.
With random initialization, the SimpleRNN cell failed to converge beyond sequence length 40, even with curriculum learning.
On the other hand, both the lpRNN and LSTM cells beneﬁt from the curriculum learning protocol.
The lpRNN cell was able to transfer learning for sequences shorter than 150 steps.
While, the beneﬁts of curriculum learning appears to have reduced beyond that, the lpRNN cells were able to achieve better than 0.001 mse for sequences up to 642.
The performance of the lpRNN cell is at par or slightly inferior to other works in literature (Hochreiter and Schmidhuber, 1997; Arjovsky et al., 2016; Le et al., 2015;
Hu et al., 2018), we achieved this result purely by random initialization.
Another interesting outcome of this experiment was the effectiveness of a 2-unit LSTM cell in solving this task.
It was was able to add sequences much longer(we tested up to 100K) than any reported work (where the networks are only able to solve the task for about 1/100th of the sequence length).
Given the effectiveness of the training protocol, we made the task more complex by allowing the second stream to have up to 10 unmasked entries during training.
The trained cell was tested with a data stream having more than 10 masked entries.
The LSTM cell was successful in solving this problem a mse less than 1e-3, indicating that it learnt a general add and accumulate operation.
Figure I.6c shows the evolution of the gating functions, internal state, and the state variables of an
LSTM cell that was trained only on a ﬁxed length sequence of 100 with mse less than 0.001.
Contrast this against the stable dynamics of the network trained by curriculum learning in Figure I.6d in a 100K sequence with mse less than 1e-3 (Figure I.6) indicating almost perfect long-term memory and addition.
To our knowledge, this kind of generalized learning by an LSTM cell has not been shown before.
I.1. T EMPORAL COPYING TASK
We train the RNN cells on a varying length copying task as deﬁned in (Graves et al., 2014) instead of the original deﬁnition (Hochreiter and Schmidhuber, 1997; Arjovsky et al., 2016).
This problem is harder to solve than the temporal addition task.
The network receives a sequence of up to S symbols (in the original deﬁnition, S is ﬁxed) drawn from an alphabet of size
K.
At the end of S symbols, a sequence of T blank symbols ending with a trigger symbol is passed.
The trigger symbol indicates that the network should reproduce the ﬁrst S symbols in the same order.
We ﬁrst train the network on a short sequence (T=3) and gradually increase it (T ≤ 200).
The sequence length is incremented when the categorical accuracy is better than 99%.
[Figure]
[Figure]

[Figure]
    
[Figure]
The SimpleRNN cell failed at this task even for T=30 with categorical accuracy dropping to 84% when it predicted only S + T blank symbols.
The lpRNN cell was able to achieve 99% accuracy for up to 120 time steps.
After that, it generates T blank entries accurately but the accuracy of the last
S symbols drops (For T=200, it was 96%).
However, the LSTM cell achieves more than 99.5+% accuracy for all tested sequence lengths, highlighting the advantage of curriculum learning.
This is a big improvement over reported results (Arjovsky et al., 2016; Graves et al., 2014; Bai et al., 2018) where LSTM cells solved the task for much smaller values of S and T .
We observed stability issues when training an LSTM cell for sequences longer than 30, even if it eventually converged by using smaller learning rates and gradient norm scaling.
This makes a good test case to validate the temporal regularization property of the lpLSTM cell.
In our tests, the lpLSTM cell converged without instability with categorical accuracy higher than 99.5% for all tested values of
T( ∈ [3 , 500] ).
It also to generalized larger values of S than the other cells ( ≤ 25 ).
The lpLSTM cell exhibited a gradual degradation in performance for larger values of S.
We stop our simulations when the categorical accuracy fell below 96%.
These results are summarized in Figure I.7.
I.1. P ENN T REEBANK (PTB) CHARACTER MODEL
We studied temporal regularization in a network trained on the PTB dataset (Marcus et al., 1994) by replacing the LSTM cells by its low pass variants.
We choose a model with 19M parameters (Kim et al., 2016) and trained all variants using the same settings as described in (Kim et al., 2016) forepochs.
We note that both lpLSTM cells converge to a better score on the training set and a marginally poorer score on the train/validation set (refer Table 6).
The lpLSTM cell with relu activation also converges unlike the plain relu LSTM cell validating our claim on temporal regularization. [Table]
J E NERGY CONSUMPTION ESTIMATION
In this section, we describe the procedure used for comparing the power consumption of the inmemory architecture against a Cortex-M4 processor.
This processor was chosen as it is one of the most common low-power MCU platforms in use today.
In our analysis, we make a highly-optimistic estimate for the performance of the Cortex-M4 (ARM, 2019).
We assume that there are no cache misses, that multiply and add operations take one clock cycle, the read from DRAM only consumes 6 pJ/bit, and also assume that the MCU is fully available for RNN computation.
In particular, note that the memory cost per DRAM access should also include the address and data bus power consumption.
This has been completely ignored in this analysis to keep things highly optimal on the Cortex-M4 side.
We see that in such a conﬁguration, the Cortex-M consumes only a few mW of power.
In practice, the active power consumption of such processors tend to be in hundreds of mW (Rethinagiri et al., 2014).
We estimate the performance of the in-memory unit (also in 180nm technology for the known neuron implementation (Nair and Indiveri, 2019)).
These results are then tabulated and system activity is modelled for two RNN models in Figure J.8a (2 layer RNN with 128 units/layer) and Figure J.8b ( layer RNN with 500 units/layer).
The energy cost for the Cortex-M4 is modelled by the following equation:
[Equation]
where
• E tot : Total power consumed • Clk mul : Number of clocks for multiply • N mul : Number of multiply operations in the task.
• Clk add : Number of clocks for addition.
• N add : Number of add operations in the task.
• E clk : Energy consumed by the processor per clock.
• M : Number of memory bit accesses • E mem : Energy cost of a accessing a single bit.
The energy cost for the in-memory architecture is modelled by the following equation:
[Equation]
where
• N: Number of neurons • E spike : Energy per spike • N spikes : Total number of spikes.
This is computed for the Σ∆ model by computing the average ﬁring rate as a function of the desired bit precision.
This is approximating by equating the desired ﬁring rate of the Σ∆ neuron to that of an oversampled clock necessary to achieve a desired Signal to Noise Ratio (SNR) (Pavan et al., 2017).
• M: Memory access cost.
This is modelled by the the product of the read current while a spike is active.
Each of the terms in the computation of the power consumption of the Cortex and in-memory systems are in turn calculated based on a number of hardware and operational assumptions that are listed in the tables.
We note an improved energy-efﬁciency of several hundred times across the board in both conﬁgurations.
We also note that the energy-savings is much higher for the larger network.
This is simply because the number of sequential compute operations increases quadratically
[Figure]
[Table]
[Table]
(a) For a two-layer RNN with 128 units per layer
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Figure]
[Figure]