Event-Based Classification of Features in Reconfigurable Time-Encoded Convolutional Spiking Neural Networks

An event-based classification system for image classification in spiking neural networks addresses the high power and computational demands of conventional methods, achieving efficient and accurate results through innovative hardware implementations.

JP7549645B2Active Publication Date: 2024-09-11BRAINCHIP INC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2022503896
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-07-25
Filing Date
2020-07-24
Publication Date
2024-09-11
Estimated Expiration
2040-07-24

AI Technical Summary

Technical Problem

Conventional deep convolutional neural networks require significant computational power and energy consumption for image classification tasks, while spiking neural networks struggle to meet accuracy demands.

Method used

Implementing an event-based classification system using a spike converter, inbound filter, memory for inverted kernel storage, packet collection, and convolutional neural processor to perform row-by-row strides in memory, reducing power consumption and improving accuracy.

Benefits of technology

The system achieves efficient and accurate image classification with lower power consumption by utilizing event-based convolutional neural networks, reducing operation count and memory requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007549645000014
    Figure 0007549645000014
  • Figure 0007549645000008
    Figure 0007549645000008
  • Figure 0007549645000020
    Figure 0007549645000020
Patent Text Reader

Abstract

Embodiments of the present invention provide a system and method for learning and classifying features to identify objects in images using a time-encoded deep spiking neural network, a classification method using a reconfigurable spiking neural network device or software including configuration logic, a plurality of reconfigurable spiking neurons, and a second plurality of synapses. The spiking neural network device or software further includes a plurality of user-selectable convolution and pooling engines. Each fully-connected and convolution engine is capable of learning features and thus generating a plurality of feature map layers corresponding to a plurality of regions, and each convolution engine is used to obtain the neuronal response in the corresponding region. The neurons are modeled as integrate-and-fire neurons with nonlinear time constants, and spike outputs are used to form individual integration threshold units, eliminating the need for floating-point multiplication and addition.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0001] This application claims the benefit of U.S. Provisional Patent Application No. 62 / 878,426, filed July 25, 2019, entitled “Event-based Classification of Features in a Reconfigurable and Temporally Coded Convolutional Spiking Neural Network,” which is incorporated by reference in its entirety for all purposes.

[0002]

[0002] This application is related to U.S. Patent Application Publication No. 16 / 670,368, filed October 31, 2019, and U.S. Provisional Patent Application No. 62 / 754,348, filed November 1, 2018, each of which is incorporated by reference in its entirety into this specification.

[0003] background Field

[0003] Embodiments herein relate to classification and object recognition, and more particularly to a classification method using neural temporal encoding in a deep spiking neural network. [Background technology]

[0004] background

[0004] A conventional deep convolutional neural network is composed of many layers of neurons that are composed of computed functions, whereby the input and output values ​​are floating point numbers. The largest application of convolutional neural networks is in object classification in digital images. The input values ​​to the first layer of the neural network are samples of the signal that is desired to be classified. Typical signals are sensory signals such as visual signals, auditory signals, etc. A sample of a visual signal includes pixel values ​​that represent color intensity in an image, while a sample of an auditory signal includes frequency component values ​​as input values. A deep convolutional neural network has three or more layers of neurons. Each layer receives an input from the previous layer. Each input value is multiplied by a value that represents the weight of the connection, which is typically a 32-bit integer or floating point number. Each neuron in a neural network can have many inputs, and the results of these multiplications can be summed to create a sum value. A nonlinear function, such as a rectified linear function (ReLU), is applied to the sum value to generate an output value. Convolutions are functions that are computationally applied to floating-point data to extract features from a defined area of ​​a previous layer. Pooling layers are typically inserted between convolution layers to downsize the data. Pooling layers operate on defined blocks of data from a previous layer, performing max, average, or mean pooling to reduce dimensionality.

[0005]

[0005] Deep convolutional neural networks have been very successful in object classification tasks using image data sets. A typical deep convolutional neural network may need to perform over 3 billion multiply-accumulate functions to classify a single object in an image. The processing nodes used in general-purpose computers are usually not fast enough to perform the billions of operations required for classification in a reasonable time. Arrays of dedicated multiply-accumulate devices, graphics processing units (GPUs), vector processors, analog multipliers, and digital signal processors have been used to increase the throughput and reduce the latency of deep convolutional neural networks. All these devices have in common that they run parallel computational cores, allowing them to perform a sequence of data processes at high speeds in succession, thereby processing large data sets in a short time. However, with high computational power comes high power consumption. A typical graphics processing unit may consume as much as 200-300 watts. Attempts have been made to create devices that work by the same principle but consume less power, but due to the limited number of processing cores, they are not able to process image data at the same speed. There is a need for a device that can classify objects in an image with high speed and low power consumption.

[0006]

[0006] Spiking neural networks have the advantage that they only consume power when the neural circuits are switching, i.e., when generating spikes. In sparse networks, the number of spikes is specified as a minimum. The power consumption of such circuits is very low, typically several thousand times less than the power consumed by a graphics processing unit used to perform a similar neural network function. However, until now, time-spiking neural networks have not been able to meet the accuracy demands of image classification. Spiking neural networks include a network of threshold units and spike inputs connected to weights that are additively integrated to create a value that is compared to one or more thresholds. No multiplication function is used. Previous attempts to use spiking neural networks in classification tasks have failed due to incorrect assumptions and subsequent inefficient spike rate approximations of conventional convolutional neural networks and architectures. In spike rate encoding, the values ​​transmitted between neurons in conventional convolutional neural networks are instead approximated as spike trains, whereby the spike numbers represent floating-point or integer values ​​that cannot be expected to benefit from accuracy gains or sparsity. Such rate-coded systems are also much slower than time-coded systems because it takes time to process enough spikes to convey a number in a rate-coded system. The present invention avoids those errors and returns superior results on complex data sets and frame-based images. Summary of the Invention [Means for solving the problem]

[0007] Summary of the Invention

[0007] An embodiment includes a system including a spike converter configured to generate spikes from digital input data and an inbound filter configured to select relevant spikes from the generated spikes. An embodiment further includes a memory configured to store the kernels in an inverted format and further configured to store weights indexed by channel. An embodiment also includes a packet collection module configured to collect relevant spikes in the memory until a predetermined number of relevant spikes are collected in a packet, and to organize the collected relevant spikes by channel and spatial coordinates in the packet. Finally, an embodiment includes a convolutional neural processor configured to perform a row-by-row stride in the memory, the convolutional neural processor using a scratch pad memory in the memory.

[0008]

[0008] An embodiment also includes a method including receiving digital input data and generating spikes from the digital input data with a spike converter. An embodiment further includes selecting relevant spikes from the generated spikes with an inbound filter and storing the kernel in an inverted format in memory, further including storing weights indexed by channel. An embodiment also includes collecting relevant spikes in memory until a predetermined number of relevant spikes are collected in a packet, and organizing the collected relevant spikes by channel and spatial coordinates in the packet. Finally, an embodiment further includes performing the convolution in hardware using a row-by-row stride in memory using a convolution neural processor and a scratchpad memory.

[0009]

[0009] Further features and advantages, as well as the structure and operation of various embodiments, are described in detail below with reference to the accompanying drawings. It should be noted that the specific embodiments described herein are not intended to be limiting. Such embodiments are presented herein for illustrative purposes only. Based on the teachings contained herein, additional embodiments will be apparent to those skilled in the relevant art.

[0010] Brief description of the drawing / diagram

[0010] The accompanying drawings are incorporated in and form a part of this specification, illustrate the present invention, and together with the description, serve to explain the principles of the present invention and further enable those skilled in the relevant art to make and use the present invention. [Brief description of the drawings]

[0011] [Figure 1]

[0011] FIG. 1 shows a diagram of how a three-channel (red, green, and blue) convolution is performed in a conventional convolutional neural network. [Diagram 2]

[0012] An example of one channel convolution with a single 5x5x1 filter is shown. [Diagram 3]

[0013] 1 illustrates the difference between rate coding and event-based rank coding. [Figure 4]

[0014] The learning process at the fully connected layer and the convolutional layer is shown. [Diagram 5]

[0015] Shown are three different user-configurable modes of the Convolutional Neural Processor and the Fully Connected Neural Network. [Figure 6]

[0016] 1 is a high-level description of conventional neuron state storage techniques that can be contrasted with the innovative neuron state storage techniques of certain embodiments of the present technique. [Figure 7]

[0017] An exemplary manner in which each CNP handles an event is shown. [Figure 8]

[0018] A comparison between traditional convolution algorithms and the new event-based convolution algorithm is presented. [Figure 9]

[0019] 1 shows the main steps of processing spikes in a packet according to an event-based convolution. [Figure 10]

[0020] 1 shows an example of a filter SRAM layout for a ternary filter or a binary filter. [Figure 11]

[0021] 1 shows the inversion kernel. [Figure 12]

[0022] Indicates the step at which the max pooling operation is being performed. [Figure 13]

[0023] We describe event-based convolution using filters and neuron terms. [Figure 14]

[0024] 1 illustrates the context of an exemplary K-WTA hardware implementation. [Figure 15]

[0025] It is shown that the size of the groups can vary in size. [Figure 16]

[0026] Illustrates how a winner is selected in a "best offer" format. [Figure 17]

[0027] An example of K-WTA in "first good offer" mode is shown below. [Figure 18]

[0028] We show how one embodiment of this scheme can be adapted to an SNN. [Figure 19]

[0029] 1 shows a block diagram of one embodiment for generating the filter result input to the WTA block. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0012]

[0030] Features and advantages of the present invention will become more apparent from the following detailed description when taken in conjunction with the drawings, in which like reference characters identify corresponding elements throughout. In the drawings, like reference numbers generally indicate identical, functionally similar, and / or structurally similar elements. The drawing in which an element first appears is indicated by the leftmost digit(s) in the corresponding reference number.

[0013] Detailed Description of the Invention Glossary

[0031] In this description, the memory locations where the neuron's potential is incremented or decremented on an event-by-event basis are denoted as potentials. Each neuron has a 20-bit signed potential. After a neuron is fully processed, it outputs a neuron activation, which can be 1-4 bits and is unsigned. These activations are the events sent to the next layer and are stored in different CNPs. Neuron potentials can be interpreted as unprocessed neuron states, while activations can be seen as processed neuron states.

[0014]

[0032] Activation: An activation is a processed neuron state. A neuron processes multiple events in a packet of events. Every event, after it has been processed, is converted from potential (unprocessed neuron state) to activation via a transformation that defines how the 20-bit signed potential is converted to a 1-4 bit activation. This transformation is called the activation function.

[0015]

[0033] DVS Camera: DVS stands for Dynamic Vision Sensor. DVS cameras generate events that are directly processed by an event-based processor such as an embodiment of the present approach. Most cameras generate frame-based images. The main advantages of DVS cameras are their low latency and the potential for extremely low power operation.

[0016]

[0034] CNP: Convolutional Neural Processor. Each NP is a processing core in the chip that implements the methodology. Each can be either a CNP or a FNP, but not both, depending on user configuration. CNPs perform event-based convolution or separable convolution operations.

[0017]

[0035] FNP: Fully Connected Neural Processor. These processing cores are connected to the inputs by a fully connected topology.

[0018]

[0036] Input Event Buffer / Input Event Buffer Memory: The Input Event Buffer memory holds input events until they are ready for processing by the current layer. The Input Event Buffer memory can be used as a single buffer or a double ping-pong buffer.

[0019]

[0037] Inverted kernel format: The inverted kernel format is the format in which the individual filter kernels are stored. The kernel is a 180° rotation of the original filter kernel. The inverted kernel format allows the CNP hardware to quickly calculate the address of the potential to which the event weight product should be sent.

[0020]

[0038] Max Pooling: Max pooling is an operation that takes N inputs and produces a single output with the value of the maximum input. Spatial pooling is often performed only on the spatial components of the convolution. When max pooling is mentioned, it specifically refers to a 2x2 max pooling implementation, which has 2x2=4 input values ​​and a single output value. Max pooling is often used to reduce the dimensionality of the network inputs, thus reducing the number of parameters and the amount of computation required.

[0021]

[0039] NP: Neural Processor. A neural processor can be configured to be either an FNP or a CNP. The chip implementing the method has multiple NPs (currently 80).

[0022]

[0040] Ping-Pong Buffer: A ping-pong buffer is a buffer that is split into two separate buffers. The first buffer (the capture buffer) captures input as it arrives asynchronously, while the second buffer (the processing buffer) contains the input that is currently being processed by the NP. The ping-pong buffer is used to hold input events so that the CNP can collect events asynchronously as they arrive. After all current events are processed in the processing buffer and the capture buffer has all the events in a packet, the capture buffer forwards all the events to the processing buffer for processing.

[0023]

[0041] Potential: Potential is a raw neural state. In NP, potentials are stored as 20-bit signed integers. After all events are processed, the neuron converts the potential into an event using an activation function. It may happen that the potential does not cross the threshold to become an activation event. In this case, the event is not sent.

[0024]

[0042] Processed neuronal state: Another name for activation or neural activation.

[0025]

[0043] Scratch Pad Memory: The portion of the CNP memory where each of the eight neural processing engines needs to store neuron potentials as events are processed. The scratch pad memory is large enough to store 512 20-bit neuron potentials per neural processing engine. Each neural processing engine has its own scratch pad.

[0026]

[0044] Unprocessed neuronal state: Another name for electrical potential or neuronal potential.

[0027] preface

[0045] This specification discloses one or more embodiments incorporating the features of the present invention. The disclosed embodiments are merely exemplary of the present invention. The scope of the present invention is not limited to the disclosed embodiments.

[0028]

[0046] References herein to a described embodiment and "one embodiment," "embodiment," "example embodiment," and the like indicate that the described embodiment may include a particular feature, structure, or characteristic, but not every embodiment necessarily includes that particular feature, structure, or characteristic. Moreover, such phrases do not necessarily refer to the same embodiment. Furthermore, if a particular feature, structure, or characteristic is described in connection with one embodiment, it is understood that it is within the knowledge of one of ordinary skill in the art to practice such feature, structure, or characteristic in connection with other embodiments, whether or not expressly described.

[0029]

[0047] The embodiments of the present invention may be implemented in hardware, firmware, software, or any combination thereof. The embodiments of the present invention may also be implemented as instructions stored on a machine-readable medium that may be read and executed by one or more processors. A machine-readable medium may include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computing device). For example, a machine-readable medium may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media, optical storage media, flash memory devices, electrical, optical, acoustic or other forms of propagated signals (e.g., carrier waves, infrared signals, digital signals, etc.), and the like. Furthermore, firmware, software, routines, instructions may be described herein as performing certain actions. However, it should be understood that such description is merely for convenience and that such actions actually result from a computing device, processor, controller, or other device that performs the firmware, software, routines, instructions, etc.

[0030]

[0048] Before describing such embodiments in greater detail, however, it is useful to provide an example environment in which embodiments of the invention may be implemented.

[0031]

[0049] A deep neural network (DNN) is defined as an artificial neural network with multiple hidden layers between an input layer and an output layer, each layer containing a perceptron. A convolutional neural network (CNN) is a type of DNN that performs convolution and is mainly used for visual processing. A CNN shares synaptic weights between neurons. The neurons in a perceptron that share weight values ​​are called filters (also called kernels). Each layer in a traditional CNN is a perceptron. In this embodiment, event-based convolution is implemented in a spiking neural network (SNN) using event-based rank coding instead of perceptrons, which has the advantages of speed and significantly lower power consumption. Rank coding differs from rate coding of spike events in that values ​​are coded in the order of spikes sent. In rate coding, the repetition rate of spikes sent represents a real number. A CNN processes color images, which are defined as imageWidth (image width) x imageHeight (image height) x channelNumber (number of channels). A color image generally has three channels (red, green, and blue). A CNN often has many layers, so the output of a convolutional layer is the input to the next convolutional layer. To discuss the event-based convolutional method implemented in the present invention, we provide an explanation of how convolution is performed in a perceptron-based CNN, and show that the results of convolution in a CNN and the results of event-based convolution in the present invention return the same results.

[0032] Convolution

[0050] FIG. 1 shows a convolution method 100. Two 5×5 filters 120, 130 from a number of filters are shown. Filters #1 (120) and #2 (130) have three color channel kernels 170a, 170b, 170c, one for each color red, green, and blue from each input channel 140, 150, 160. The width and height of the filters are smaller than the image, with 3×3, 5×5, and 7×7 being the most common sizes. The filter array moves across the image area. The results of the convolution are summed to one value in an array that stores neural potentials. The dotted outlines indicate where filter #1's convolutions are made across the inputs. The smaller dotted boxes in filter #1's (120) 3×3 potential array indicate where these inputs are summed.

[0033]

[0051] One unique feature of the present invention is that there are no multiplications when the inputs, weights, or both inputs and weights are represented as ternary or 1-bit values. The values ​​are summed and compared to a variable threshold, and if the threshold is reached or exceeded, a spike event occurs. The spike event is sent to the next layer of the network via an internal bus. The lack of multiplications results in a notable speed advantage over the prior art.

[0034]

[0052] Figure 2 shows three convolution methods implemented in an embodiment of the invention using rank coding. In an effective convolution, the filter region moves around the center of the image and does not consider edges, so the resulting image area is smaller than the original image area. In a full convolution, the image region is padded with zeros so that the entire image region, including edges, can be included in the convolution. In the same convolution, edges are included, but the convolved region is the same as the original image region.

[0035]

[0053] 3 shows the difference between neural network spike rate coding, conventional perceptron neuron multiply-accumulate (MAC) and conventional binary coding of characters in a computer system. In the present invention, spike-rank coding is used to perform the functions of a convolutional neural network.

[0036]

[0054] Rate coding is shown in the top panel 310. Spikes received by two input synapses 320, 330 of the multiple synapses are shown over one complete integration period, marked t1, in the multiple integration periods. During this integration period, the first synapse received 25 spikes while the second synapse received 27 spikes. The sum of all synapses is 52, which is the simulated membrane potential of the neuron. A nonlinear function such as Tanh(n) or a linear rectifier (ReLU) function is then applied to the simulated output value. The resulting output value is sent as a series of spikes to one or more synapses in the next neural layer. The integration time is long enough to allow enough spikes to occur to receive a value. In the bottom left panel 330, rank coding is shown. Spikes received by four of the multiple synapses are shown over six integration periods, marked t0 to t5. The integration times are short and repeating spikes within each integration period are ignored. The integral value of the first integration period is 3, and for the following four integration periods it is 4. The last integration period has a value of 2. These values ​​are the simulated membrane potential of the neuron. If the simulated membrane potential reaches or exceeds a threshold, a spike is sent to one or more synapses in the next neural layer. In the center right panel 350, a method of integrating a section of a neuron among multiple neurons in a conventional perceptron is shown. A set of weight values, labeled W11-W95, are multiplied by input values ​​I0-I9. The resulting values ​​are accumulated to form the simulated membrane potential of the neuron. Subsequently, a nonlinear function such as Tanh(n) or a linear rectifier (ReLU) function is applied to the simulated output values. The resulting output values ​​are sent as integer or floating point values ​​to one or more synapses in the next neural layer. In the bottom right panel 370, a conventional binary encoding method is shown for reference. Binary encoding methods are widely used in conventional computer systems to encode letters and numbers. Boolean algebra is applied to calculations with binary encoded numbers and letters.

[0037]

[0055] Figure 4 illustrates the learning method used in an embodiment of the invention. Two on-chip memory blocks and their contents are shown. (1) An array of simulated membrane potentials of five neurons with values ​​5, 1, 0, 3 and 4 is loaded from a data structure in memory into the working memory. These values ​​are derived from spikes received by the neuron at synapses with non-zero weight values. (2) A neuron is selected that has a potential above the learning threshold. In the figure this is 5. (3) The event packets are sorted from low to high. (4) The event packet of that neuron is loaded into memory along with its associated weight vector. (5) An unused weight entry is created in the array whenever the weight vector does not match the event packet value, and an unused input entry is created in the second entry whenever an input event has an associated zero weight value. (6) Both the unused input and unused weight arrays are shuffled to introduce randomness into the learning rule. (7) An initial position in the unused inputs and unused weights is selected. (8) The next entry in the unused weight and unused input arrays is then selected and the process is repeated until all entries have been iterated. (9) The connection list array is loaded into the working memory and (10-11) the connection list array is iterated to remove the neuron ID with the maximum potential. (12) Unused spikes are spikes that have an associated weight value of 0. (13) After the neuron ID has been added to the connection list, the unused spike locations are swapped with unused weight values ​​(14-15). The weight vector is stored in a sorted form (16).

[0038]

[0056] FIG. 5 shows the organization of neural processors (NPs). Each neural processor is composed of a number of neurons and a second number of synapses. (A) Four neural processors are in a group consisting of three convolutional neural processors (CNP1-CNP3) and one fully connected neural processor (FNP1) that can be configured during initialization as a fourth CNP (CNP4) or (B) as a fully connected neural processor with limited connectivity (Type 2). Type 2 FNP connectivity can be increased using off-chip DRAM. In yet another configuration (C) (Type 3), the FNP uses all the resources of the CNPs in the same group. In this case, the FNP does not need to use any external memory, which is beneficial in standalone applications. The multiple groups communicate via a common network on the chip called the mesh shown in (D). Input events are placed in a dual buffer (ping-pong buffer), whereby one buffer is processed while the other buffer is filled. Each NP has eight parallel engines that update neurons and synapses in parallel. Synaptic weights are stored in a weight SRAM that is on-chip. Each of the eight parallel engines also communicates with a common mesh bus. When a neuron generates a spike or sends a potential to the next NP, it places the neuron's address in a packet on the bus. At the receiving NP, the packet is received and placed in an input event buffer SRAM, also called a ping-pong buffer, for processing by that NP. t+n (where n is the value) in the image indicates the timing of the event, and t+30 indicates that the information is received in the buffer at time t+30 cycles, and the value is stored in the buffer at time t.

[0039]

[0057] As known in the art, deep neural networks (DNNs) have become a popular choice for tasks such as image classification, face recognition, etc. However, typical implementations require extensive computations in von Neumann architectures that use significant energy and require large area. Thus, efforts have seen a shift to implementing neural algorithms from traditional digital hardware, including various types of dedicated hardware. However, prominent among the issues of dedicated hardware are the need for scalability, efficiency, and power consumption.

[0040]

[0058] In response to these problems, the inventors have identified at least three contributions to derive an innovative architecture: (a) event-based computation, (b) designing the hardware to control the amount of information pushed through, thereby controlling the precision and power consumption of the process, and (c) designing the actual steps and precision / bits of the weights and activations in the neural network such that less memory space is used.

[0041]

[0059] The selection of the number of bits is one important consideration in the design of layers in a neural network architecture. The default number of bits commonly used for neural networks is 32 bits, and the multipliers are 32 bits by 32 bits. Fewer bits used result in less power consumption and chip area required, but with precision loss. Thus, the 1 bit by 1 bit multiplier represents a lower bound on the bit selection. Initial experiments have shown that 92% accuracy is achievable using ternary weights. Experiments by the inventors have also shown that the 4 by 4 bit multiplier provides a sweet spot in terms of relatively low precision loss (compared to the traditional 32 bit by 32 bit approach) without increasing power consumption and chip area requirements much more than required for a 1 bit by 1 bit solution. The sweet spot selection results in a reduction of the overall number of parameters used by 1 / 3 to 1 / 4. In various embodiments, the number of bits used may be different for different layers, i.e., in these embodiments, a layer-by-layer selection of the number of bits to use (1×1, 2×2, 4×4, etc.) may be made.

[0042]

[0060] To make progress in hardware-only implementations of spiking neural networks, the inventors sought to reduce the operation count. In various embodiments, the approach is event-based, where spikes are coded instead of every convolution stride. Because spikes occur only when there is activation, and events are processed only when spikes occur (not every convolution stride), the number of events is much smaller. Because the number of events is much smaller, this leads to a lower number of operations. In exemplary embodiments of the present disclosure, by employing an innovative approach, the operation count can be reduced by a factor of 3 or 4.

[0043]

[0061] In a further innovative advance, the inventors have attempted to use certain convolution types that require fewer parameters (e.g., weights). These parameters require storage to perform the necessary neural computations, resulting in a reduction in physical memory entry requirements. Although the computations involved in such separate convolutions are more involved, the additional computations are manageable, leading to a significant reduction in the number of parameters and associated physical memory entries. Such a reduction in the number of physical memory entries allows a much larger neural computation capacity to fit within a given RAM area of ​​a particular chip.

[0044]

[0062] Convolutional neural network implementations typically require significant memory (e.g., SRAM) to store the potential values ​​at each neuron. In a typical neural network, because of the large number of neurons, most of the available memory (e.g., SRAM) is used to store the potentials associated with the neurons. Thus, the total number of neurons available in a hardware implementation of an SNN neural network is ultimately limited by the available memory (e.g., SRAM). To advance in hardware-only implementations of spiking neural networks, the inventors sought to use memory differently by storing activation levels rather than potentials. The magnitude of activation levels typically requires 12-20 bits to capture the value, while spikes can be captured with only 1, 2, or 4 bits. This reduces the bit requirements by a factor of 6, substantially increasing the effective storage capacity.

[0045]

[0063] Traditional implementations of neural networks perform computations on the network by following its structure, one layer at a time. This approach generates a large amount of intermediate data that is steadily output to memory as the computation proceeds. As the layers are computed, the intermediate data is fed back to the same computation hardware and the process is repeated until all layers have been computed. The amount of intermediate data that must be transported between the computation hardware and memory increases with increasing neural network size. In an additional benefit, the inventors have utilized fusion of computations across multiple layers. Rather than processing each layer and completing it before proceeding to the next layer, the inventors restructure the computation so that multiple layers are computed together, avoiding the need to store intermediate data or retrieve intermediate data from memory. In essence, fusion takes the operations of two or more layers and fuses them into one operation.

[0046] Quantitative metrics for new methods

[0064] Here, with reference to a quantitative evaluation of the improvements, we provide a description of three areas of quantitative improvement: (1) the storage efficiency of the "neuron potential" representation within the Convolutional Neural Processor (CNP), (2) the approach to the event-based convolution algorithm, i.e., filtering of events, ordering of filters, and individual application of increments or decrements to neuron potentials, and (3) a new unsupervised learning algorithm for the convolution operation in neural networks.

[0047] Figure of merit for efficient neuronal state storage into CNP

[0065] Before going into the details of how neurons are stored in the CNP, various terminology and the manner in which the CNP processes events will be explained. The memory locations where the values ​​of neuron potentials are stored are incremented or decremented with each event and are simply known as potentials. As an example, each neuron may have a 20-bit signed potential. After a neuron has been fully processed, it outputs a neuron activation. Again, as an example, this activation may be 1-4 bits and is unsigned. These activations are the events sent to the next layer in the neural network that are stored in a different CNP. Neuron potentials can be interpreted as unprocessed neuron states, while activations can be seen as processed neuron states. If the input to a particular CNN layer has dimensions M×N×C, where M is the height of the input, N is the width of the input, C is the number of input channels of the input, and the dimensions of the filters are H×W×C (H and W are the height and width of the filter), and there are F filters in the layer, then the total number of resulting potentials (and therefore activations) is M×N×F. One key innovation by the inventors is that a small number of 20-bit signed potentials are temporarily stored in the CNP where the layer resides, while all activations are stored in the CNP where these activations are sent as events to the target layer. Because only a small subset of the 20-bit potentials are stored, neuronal states can be stored very densely.

[0048]

[0066] FIG. 6 is a high-level description of a conventional neuron state storage approach that can be contrasted with the innovative neuron state storage approach of a particular embodiment of the present approach. Roughly speaking, when processing a single input, the entire unprocessed neuron state is not stored at once, but rather a small subset of it. The stored subset of unprocessed neuron states is then overwritten with new unprocessed neuron states until all calculations associated with the input data are completed. By taking this approach, the amount of memory used to store unprocessed neuron states using the present approach in FIG. 6B is less than the amount of memory used in the conventional approach in FIG. 6A. The same number of unprocessed neuron states can be processed using a hardware implementation of the present approach.

[0049]

[0067] Referring now to the description of the neuron state memory management technique in more detail, there are three main operations that must be performed on a packet, i.e., a collection of events, to be completely processed. The first two operations are performed for each event. The third operation is performed for each neuron. Before processing, the events are sorted by neuron. For each event, if the weight value or activation is both greater than the ternary, the event value must first be multiplied by the weight value (step 1) (if 1-bit or ternary bits are used, no multiplication operation is necessary), and the resulting product must then be added to the potential corresponding to the neuron under calculation (step 2). Third, each potential value is exposed to a unique function that converts the 20-bit signed potential into a 1-4-bit unsigned activation (signed in the case of ternary activation). Next is a description of when and where the neuron state for each step is stored.

[0050]

[0068] FIG. 7A is an exemplary manner in which each CNP processes events. In a particular example, each CNP has eight neural processing engines running in parallel. Memory within these neural processing engines is used and reused to store potentials. Steps 1-3 are performed across the eight neural processing engines for each CNP. A small subset of the total events are processed simultaneously across the eight neural processing engines. During this time, each of the eight neural processing engines has enough memory to store 512 20-bit signed potentials. This memory is called the scratch pad memory of the neural processing engine. The combined scratch pad memory across all eight neural processing engines (green rectangle in FIG. 2B) then contains 512 * 20 * 8=81,920 bits. This means that each neural processing engine processes 512 neurons at a time. After the 512 neurons are processed, the neural processing engine places 1-4 bit activation events in a mesh where these events are sent to the CNP running the layer to which they are connected. The 1-4 bit activation events are routed to the target CNP and stored in the input event buffer memory (blue rectangle in FIG. 2B) of this CNP. The size of the input event buffer memory is 344,064 bits. Therefore, the total amount of memory per CNP used to store all neuron states is 81,920 bits + 344,064 bits = 425,984 bits. As one skilled in the art will appreciate, the above numbers are exemplary and not limiting values ​​of embodiments of the present invention.

[0051]

[0069] Figure 7 is also an example of how the CNP processes events (in ping-pong buffer mode). The outward-facing buffer of the ping-pong buffer (top box in the input event RAM) places input events (blue arrows) in the corresponding location of the buffer as they come in from the mesh. An "end of packet signal" (red arrow) is eventually received, moving the events (black arrows) from the outward-facing buffer to the inward-facing buffer (bottom box in the input event RAM). These events are processed by the eight NP engines. Output events (green arrows) are placed in the mesh as soon as they are calculated to be routed to the next NP, thus eliminating the need to store 20-bit potentials. The units of time are arbitrary and are only meant to show the order in which things happen.

[0052]

[0070] A useful figure of merit, the total number of neurons that can be represented per unit of memory, can be used to capture the quantitative benefit of the advances of various embodiments of the present approach. A neuron is defined as being represented when both its raw state (potential) and its processed state (activation) are stored in memory (e.g., on-chip memory) at some point during the event processing computation. By memory, we refer only to memory dedicated to holding neuron states, and not to the entire on-chip memory.

[0053]

[0071] In calculating the various scenarios of the figure of merit, two considerations should be acknowledged as part of the calculation of the figure of merit. First, in these exemplary calculations, the size of the activation events may range from 1 to 4 bits. Second, the CNP may be configured to use a single-buffered input event buffer or a double-buffered (aka ping-pong) input event buffer. A single buffer can handle twice the number of events that a double buffer can handle, at the expense of increased latency. With these two considerations in mind, a systematic description of high-end and low-end neuron density scenarios may be provided.

[0054]

[0072] In the high-end neuron density scenario, the activation events are only 1 bit, and a single-buffer input event buffer is used. This means that the entire input event buffer memory can be dedicated to storing 1-bit activation events, which can represent 344,064 neurons. However, when the total memory used is calculated, the cost of the scratchpad memory must be included. The ratio of neurons to memory in the high-end neuron density scenario is then: Represented neurons / unit memory = (344,064 neurons) / (425,984 bits) = (344,064 neurons) / (425,984 bits) = 0.81 neurons / bit It is.

[0055]

[0073] In the low-end neuron density scenario, activation events are 4-bit and a double-buffered input event buffer is used. The double buffer means that only half the amount of input event buffer memory is available, as in the single-buffered case. Replacing 1-bit activations with 4-bit activations also means that 4 bits of storage are required for each activation instead of 1 bit, which reduces the total number of activations that can be stored by a factor of 4. The total number of neurons that can be represented per unit of memory is reduced by a factor of 8. Represented neurons / unit memory = (344,064 neurons) / (8 * 425,984 bits) = (43,008 neurons) / (425,984 bits) = 0.10 neurons / bit

[0056]

[0074] The range of values ​​for these two scenarios is 0.81 to 0.10 neurons / bit. If it were possible to use smaller potentials than 20 bits with a smaller scratch pad memory and / or 1-bit activation, perhaps even higher densities could be achieved. If no compression is used to store the activations, the practical neuron density limit of the embodiment appears to be close to 1 neuron / bit. In this scenario, we calculate the neuron potentials one at a time and have a single register as a scratch pad memory. If some type of compression is utilized, the theoretical limit could be a value greater than 1. However, the computational cost of encoding or decoding the activations potentially outweighs the benefit.

[0057]

[0075] In various embodiments, the memory may be implemented with various types of memory including volatile SRAM and non-volatile memory technologies.

[0058] Figures of merit for event-based convolution

[0076] The following figure of merit captures the progress of event-based convolution in CNP. CNP is designed to efficiently process events and increment (or decrement) the corresponding potential in the scratchpad memory of each neural processing engine. To ensure that events can be processed quickly and in parallel by the neural processing engines, several optimizations have been integrated into various embodiments of the present approach.

[0059]

[0077] Figure 8 shows a comparison between the traditional convolution algorithm and the new event-based convolution algorithm. In Figure 8A, all entries must be calculated, even if they are zero. The convolution filter (blue) "slides" across the input. Note that in the traditional convolution algorithm, all contributions to a given potential entry are calculated at once. Figure 8B shows the event-based convolution approach. The frame-based image must first be converted to an event-based image. This can be done by pre-processing or by a dedicated spike-only area on the chip using the new event-based convolution algorithm. The event-based image from the DVS camera can be directly processed by the algorithm. The gray entries in the pre-processed input are the events that must be processed. Note that the number of calculations that the event-based convolution must perform is directly proportional to the number of events (gray squares). The term event sparsity is the ratio of events to pixels as event sparsity. Note that not all contributions to a given neuron's potential are calculated simultaneously. Before two events can affect the same neuron and therefore an event-based convolution computation can be called complete, all events must be processed.

[0060]

[0078] In Figure 8, it is assumed that the input is a frame-based image. The grey input squares indicate entries that must be calculated. Only the calculations for a single input channel are shown. Part A shows that a traditional convolution must calculate every entry in the input by sliding a weight kernel (blue) over the input image. The light orange squares indicate entries in the potential array, and the dark orange entry corresponds to the entry currently being calculated. Part B has an event-based convolution. First, note that the frame-based image must be converted to an event-based image via pre-processing. The filter must be rotated 180°. This allows the hardware to send the product of the weight and the input to the current potential location. In this picture, the event-based convolution requires only four of the calculations shown in the figure.

[0061]

[0079] We next provide the process by which event-based convolution is performed, followed by a description of the main innovations. Note that in this description, the terms "event" and "spike" are used synonymously. Also recall that an event consists of four pieces of information: the x-location of the event, the y-location of the event, the channel of the event, and a 1-4 bit value of the event. Events are organized into event groups called packets.

[0062] Event-Based Convolution

[0080] An overview of the architecture of an exemplary Convolutional Neural Processor (basic unit of processing) includes the following blocks: (1) Inbound Filter Block, (2) Packet Collection Block, (3) Filter Memory and Kernel, and (4) Convolution Operation. These blocks are preceded by a spike converter that takes the input data in its native format and converts it into spikes that can be processed by subsequent blocks.

[0063]

[0081] The purpose of the first block, the inbound filter block, is to select the spikes of interest for each neuron. Each neuron has a certain portion of its input that it is interested in, and therefore will only activate when the spike is within its zone of interest. In a color image, one embodiment of the filter for each neuron might have three RGB channels.

[0064]

[0082] The packet collection block accumulates incoming spikes over time until there are enough spikes to form a packet to process. A packet is a collection of events (spikes) of a fixed, constant size. A memory is included with the packet collection block, which may be SRAM or other form of memory, to store the packets as they are formed. A packet is a collection of events of a predefined, fixed size. In the memory, the events (spikes) are organized by channel (e.g., RGB for color image data) and sorted by two-dimensional coordinates. In other words, the events (spikes) are accessible based on C, I, J indexes, where C represents the channel and I, J represent indexes into the two-dimensional spatial coordinates of the image data.

[0065]

[0083] The next block contains a filter memory and a kernel, where the filter memory stores the weights (parameters) of the convolution operation.

[0066]

[0084] The next block performs the convolution operation, including summation, to provide the final result. In one embodiment, the convolution uses an efficient hardware implementation, resulting in reduced memory requirements and a reduced number of neurons required in a layer in the neural network. Such reduction is subject to the number of logical inputs and filters, which form the overall limit of the network.

[0067]

[0085] Efficient hardware implementation is made possible by the order in which the data from the input packets are provided. This order allows each calculation to focus on row-by-row calculations. Thus, the net effect of this efficient ordering is that following the completion of one row, the next stride in the operation is one row down. Thus, the row may be reused for the next input row spike. The net effect is that the top row is no longer needed for the calculation, and therefore only a small amount of memory is required to store the potentials. In essence, instead of having to store the entire set of potentials, the ordering means that only one buffer needs to be stored, which is a large reduction in memory requirements at each convolutional neural processor. The results from one calculation are then forwarded to the next convolutional neural processor.

[0068]

[0086] Further details are shown in FIG. 9, which shows the main steps of performing an event-based convolution. In step 1, the inbound (IB) mesh sends events from other cores. In step 2, the event is filtered if the x,y location is not found in the current CNP. If the event's x,y location belongs to that CNP, the x and y coordinates are converted to local CNP coordinates, if necessary. In step 3, all events are collected until an end of packet (EOP) signal is received. When an EOP signal is received, the input event buffers are swapped (if they are ping-pong buffers). Note that the second part of the pooling operation (row pooling) is also performed in this step. Column pooling was performed before the event was sent. Both row and column pooling are performed only if a max pooling operation is associated with the output of a particular layer. Thus, some layers perform pooling operations while others do not.

[0069]

[0087] In step 4, the event's channel is read and used as an offset address to index into the filter SRAM (where the weights are stored). Then, all filter kernels corresponding to the event's channel are copied from the filter SRAM memory. This can be done by the way the filters are arranged in the filter SRAM. This is shown in Figure 10.

[0070]

[0088] In FIG. 10, there is an example filter SRAM layout for a ternary filter or binary filter configuration. In both ternary and binary filters, positive and negative values ​​are separated into different filters. The same applies to multi-bit filter values ​​(not shown). An important thing to note is that the filters containing the neural network weights are arranged by channel in the filter SRAM memory. This configuration allows the hardware to quickly index (find) the correct filter kernel based only on the input channel. Because the filter kernels are arranged contiguously in memory, they can be efficiently copied to the neural processing engine for convolution calculation.

[0071]

[0089] Since the filters are spread across multiple CNPs, the start and end filter indexes are calculated. Each neural processing engine processes one filter at a time. Thus, the first eight filters in the CNP are processed by eight neural processing engines. The eight neural processing engines now have the appropriate filter kernel addresses and can perform the following operations in step 5: 1) Each neural processor initializes (zeroes) the potentials in its scratchpad memory. The scratchpad memory is arranged in 8 rows and 64 columns, leading to temporary storage of 512 20-bit potentials. The potentials in the scratchpad memory are arranged in row-major order, so that the column entries are contiguous in the memory. 2) Input events are read from the input event buffer in x, ch, y order, allowing the neural processing engine to process all events associated with one potential at once. 3) The neural processor starts processing the event. Each engine: a. Get the channel of the first event, i. The filter on which the current neural processing engine is working, ii. Channels from the event Load the corresponding 1×1, 3×3, 5×5 or 7×7 kernel. b. Then find the rows of the kernel that are non-zero. c. Load a single non-zero kernel row. d. Calculate the potentials and output the event SRAM addresses for each row using an inverted kernel format (see Figure 6). e. Multiply all kernel row elements by the event value (a 1-4 bit value). f. Using the address from part d, increment the corresponding potential by the product. g. After all events of the current filter have been processed, convert the potential into an output activation (event). h. If the output activation is non-zero, update the status firing array with a true or 1 entry. This array is a list of neurons that have fired and whose activation values ​​should be sent to the next layer.

[0072]

[0090] Figure 11 shows the inversion kernel. The neural processing engine uses the inversion kernel element location along with the local x,y coordinates of the event to find the address of the potential that must be updated. The filter kernel must be stored in inversion kernel format to allow the neural processing core to quickly calculate the address of the potential.

[0073]

[0091] Step 6 consists of checking the status firing array to see if the neuron fired or not, and calculating the x, y, ch of the neuron. If pooling is enabled in this layer, the column-wise component of pooling is performed at this time. It is important to note here that implementing the max pooling operation (see glossary) in two steps is efficient from a computational point of view. Figure 12 shows the steps in which the max pooling operation is performed. Step 7 converts the x, y, ch coordinates of the activation event, which are local to the CNP, into global network coordinates, and finds all NPs to send the event to. Finally, in step 8, the event is sent to the relevant NPs through the routing mesh.

[0074]

[0092] Figure 12 is an example of a 2x2 max pooling operation in action. In step 3, row pooling is performed on the 1x2 activation array to generate one 1x1 activation, which is used to compute the convolution during step 4. Step 5 generates a new 2x2 activation array. Step 6 performs column pooling to reduce the 2x2 activation array to a 1x2 activation array.

[0075] Key Innovations in Event-Based Convolution Implementation

[0093] The main innovations in the event-based convolution implementation are:

[0076]

[0094] Performing a 2x2 max pooling operation in two parts, where row pooling is performed in step 3 and column pooling is performed in step 6 of the event-based convolution algorithm.

[0077]

[0095] Performing row pooling in step 3 is efficient because both elements (activations) of a row are always sent if they are computed. If one of the elements is already present in the input event buffer, the second element only needs to compare itself to the current element to see if it is greater than the current element. If so, the second element simply overwrites the current element with its own value. This allows the hardware to perform row pooling asynchronously.

[0078]

[0096] By performing column pooling in step 6, the CNP can transmit only half of the four possible elements across the mesh network, which reduces the event traffic on the mesh network.

[0079]

[0097] The filters contain the neural network weights and are arranged by channel in the filter's SRAM memory. This organization allows the hardware to quickly index (find) the correct kernel based solely on the input channel. Sequential sorting of the kernel filters by channel also allows for efficient copying from the filter SRAM to the eight neural processor engines that perform the convolution operations.

[0080]

[0098] During step 5, when the convolution is being calculated within each neural processor engine, the filter kernels are stored in inverted kernel form so that the coordinates of the affected neurons (i.e. their potentials) can be quickly calculated.

[0081]

[0099] The description then discusses some possible figures of merit (or possibly ways to calculate the figures of merit) for the design of event-based convolution in CNP. The initial concept of the figure of merit was based on the relationship between the size of the input image, which has dimensions M×N×C, where M is the height of the image, N is the width of the image, and C is the number of channels in the image (which is typically 3 for color images), the total number of events across the image, and the speed at which the convolution operation can be performed across the image. We begin the discussion with the following basic concept: for large (M, N, and C) images with very few events per pixel (aka high event sparsity), event-based convolution implementations compute convolutions much faster than any traditional convolution approach.

[0082]

[0100] However, there are several problems associated with this approach. First, the implementation is specific, so some people may be likely to use different event-based convolution implementations that can perform similarly. This is only an issue if the patent was not broad enough to encompass all event-based convolution implementations that result in a given figure of merit. Second, the majority of camera techniques and image processing techniques are frame-based (not event-based) and therefore do not have event sparsity per se. To include frame-based images in the figure of merit discussion, additional assumptions must be made. Third, for current problems of interest in computing, the relationship between image size and event sparsity is such that traditional convolution techniques are faster (but less efficient and more power-hungry) than event-based techniques. This is because it is possible to parallelize traditional convolution operations using GPUs and other dedicated hardware devices.

[0083]

[0101] It seems more appropriate to develop a figure of merit centered on efficiency or power consumption. To do this, we first define a synaptic operation (SO) as the addition or subtraction of an integer representing a neuron potential to another integer. Power calculations (not shown) suggest that the hardware spends 5 pJ / SO (picojoules per synaptic operation). This is a measure of efficiency, independent of the network structure or input data, but specific to CNP design. The more efficient the hardware, the smaller this number. This number changes slightly with different convolution kernel sizes, but the choice is close to the worst case. Thus, this figure of merit is for a system that performs event-based convolution with an efficiency of 5 pJ / SO. It may be possible to pair this figure of merit with the previous one, since both are figures of merit for event-based convolution.

[0084] Performance indices for novel unsupervised learning rules.

[0102] The proposed new unsupervised learning rule consists of a simple but large set of modifications to the conventional learning rule. In essence, the new unsupervised learning rule applies the conventional learning rule to a convolutional connection topology instead of the fully connected layer topology for which the conventional learning rule was developed, with the addition of modifications to ensure that the same patterns are not learned too frequently. The original conventional algorithm is first described, followed by the modifications that allow the conventional learning rule to be applied to a convolutional connection topology.

[0085]

[0103] Traditional unsupervised learning rules find repeating patterns in data. They are robust to noise and often only need a pattern to be repeated 2-5 times. Traditional rules can perform dimensionality reduction because neurons learn to be sensitive to only one pattern and therefore send only a small number of events indicating whether a particular pattern has been detected or not. Traditional learning rules detect patterns because they can only detect patterns within packets, which are collections of events that are close together in time. Traditional learning rules assume binary synapses (weights) that can be either 0 or 1, and binary or ternary activations that can have values ​​of either 0, 1, and -1 in addition to those in the ternary case. The illustration considers the case of binary weights / binary activations.

[0086]

[0104] At its core, a traditional learning rule consists of M classes of inputs arranged into packets of events of length N, where N must be less than M. Then connect P neurons to all M inputs, except that each neuron may have only W connections (weights) of value 1 and MW connections of value 0. To form the packets, the N unique events may be arranged into a bit array of length M, with a "1" entry used to represent the presence of an event and a "0" entry used to represent the absence of an event, as shown in Table 1.

[0087] [Table 1]

[0088]

[0105] Each neuron "processes" a packet by calculating the number of common events between W (the neuron's weight) and the input packet. This calculation can be done efficiently because it can be done using a bitwise logical AND function. The number of matches is the neuron potential. Table 2 shows the matches found in red. Each neuron has a different firing threshold (T Fire ).

[0089] [Table 2]

[0090]

[0106] The conventional learning algorithm is as follows: After all neurons have calculated the potential, each neuron calculates the potential as T Fire and the learning threshold T Learn As mentioned earlier, when the potential is T Fire If the neuron's potential exceeds T, the output of the neuron is set to 1. Learn Whenever the number of unused weights, n swap are moved to active but unused inputs. Unused weights and unused weights are both randomly selected. Unused weights are defined as weights that have a "1" in a position that has a corresponding "0" in the input packet. Unused inputs are defined as inputs that have a "1" in a position that has a corresponding "0" in the weight array. For example, in Table 2, neuron 1 has an unused weight in position 2 because it has a "1" entry in its weight array but the corresponding input packet entry is a "0". Furthermore, input event 5 is an unused input when compared to neuron 1's weight array. The effect of this learning is to make the neuron's weight array gradually more similar to the repeated input pattern over time. The neuron's weights are randomly initialized. This allows different neurons to look for different patterns. Equally important is that the number of non-zero weights W remains constant during the learning process. This is crucial for unsupervised learning rules because without a homeostatic process (i.e. consistency in W), the learning rule can easily become unstable and much more difficult to use.

[0091]

[0107] Learning rate n swap and the learning threshold T Learn varies independently for each neuron. When learning begins, a low T LearnAs learning progresses, the potential generated by a repetitive pattern tends to increase. This is because T Learn This means that n can grow slowly, lowering the false alarm rate without missing any patterns. At this point, swap n until =0 swap It is also useful to increase T. At this point, the neuron is no longer learning new patterns. Learn and n swap The formula used to adjust is: T Learn =min(T max ,potential) n swap =min(n min ,n swap -dn swap * (Potential-T Learn )) In the formula, dn swap is a parameter that adjusts how quickly the learning rate decreases.

[0092]

[0108] Before describing the novel unsupervised learning rule, a few terms need to be defined. Figure 13 describes the event-based convolution using filter terms and neuron terms. A filter is a 3D collection of weights (shown in blue), while a neuron is a specific application of a single filter to a specific spatial location of the input. A single filter is applied to every spatial location of the input, generating a full plane of neuron potential entries. During the discussion of the novel unsupervised learning rule, it is important to understand the distinction between these two concepts.

[0093]

[0109] A filter is a 3D collection of weights with spatial and channel span. Each filter has a different set of weights. The filter is shown in blue and has dimensions 3x3x3 (height=3, width=3, channels=3). A neuron can be defined as a filter applied to a specific x,y location of the input shown in the bottom half. A single neuron has a single entry in the potential array shown in light orange. Each plane of the potential array is generated when a single filter is applied (centered) to every spatial location of the input. The grey single neuron entry in the potential array was calculated from the weights of filter 1 applied to the location of the input shown in the bottom left view of the input. The red dotted lines indicate each field of a neuron centered on an event.

[0094]

[0110] The new unsupervised learning rule can be described as based on the traditional learning rule, with the following main changes: (1) In the traditional learning rule, the learning threshold T Learn Any neurons above are allowed to learn. A novel unsupervised learning rule allows only one neuron per filter to learn. An additional modification limits the number of neurons in a layer that can learn to only one. (2) During weight exchange, the input events are filtered to include only events relevant to the particular neuron undergoing learning. (3) The algorithm now supports pseudo-supervised learning, allowing neurons to learn different patterns.

[0095]

[0111] Modification 1 (Limiting the neurons allowed to learn): Recall that a single filter is applied at every spatial location of the input. The number of neurons per filter that are allowed to learn with a single event packet must be reduced to zero. This is because all neurons of a single filter share a single set of filter weights. The convolution operation allows the system to look for the same pattern at every spatial input location. If the algorithm can find a pattern at any spatial input location, the algorithm is said to be translation invariant. To preserve translation invariance, only one spatial location (neuron) per filter should be allowed to learn per input packet.

[0096]

[0112] Note further that the present implementation further limits the number of neurons allowed to learn in a single event packet to one per CNP. After some experimentation, it was found that the neurons still learned the repetitive patterns fairly quickly. The present hardware design uses this restriction because the weight-swapping component of the learning rule, while simple, is still relatively expensive to implement. However, to be clear, the inventors would like to patent both versions.

[0097]

[0113] Modification 2 (Filtering input events during training): When a neuron is selected for training, the weight exchange rule is applied only to the subset of input events that overlap with (1) the weights corresponding to the neuron's filter and (2) each field of the neuron's location.

[0098]

[0114] The subset of input events that overlap with each field of neuron's position is shown in FIG. 13. The events that fall within the red dotted line are the events that are used during the learning rule weight exchange. Note that the red dotted line in FIG. 13 extends to all channels, not just the current channel. In FIG. 13, for example, this means that filter 1, which has size 3×3×3, has 27 weights, and 27 corresponding input events are used during the weight exchange portion of the learning rule. It can now be seen that the 3×3×3 weights and inputs can be flattened into two 1×1×27 linear bit arrays. The original conventional learning rule weight exchange algorithm can now be applied to these bit arrays.

[0099]

[0115] Modification 3 (Pseudo-Supervised Learning and Competition): Unsupervised learning algorithms often have a redundancy problem. Without a mechanism to integrate similar patterns or allow neurons representing similar patterns to compete or block each other, one can easily have many neurons finding and learning the same pattern. This is wasteful and should be avoided. Traditional learning rules had no mechanism to avoid this. Pseudo-supervised learning solves this problem by separating filters into different groups and associating a group label with each filter group. When an input event packet is presented, the group label is presented along with the input event packet. Only filters in a group that have the same label as the input event packet are eligible to learn from the input event packet. This allows different filter groups to be assigned different input event packet labels. Note that it is still possible for filters (and neurons) in a group to learn the same pattern. However, the user now has a mechanism to plan the amount of redundancy to allow for a given set of input event packets. This is a major improvement from the efficiency of traditional algorithms.

[0100]

[0116] The innovation is a system and method for performing unsupervised learning on an event-based convolutional neural network architecture. The two components that combine to form the unique system and method are (1) the use of an unsupervised learning algorithm on a device, and (2) the use of an event-based convolutional neural network together with the learning algorithm simultaneously on the same device.

[0101]

[0117] Our approach is unique due to the type of research that has been done between two research communities: neuromorphic engineering and machine learning. Neuromorphic engineering researchers typically use unsupervised learning algorithms with event-based systems. However, they only very rarely use event-based convolutions. Machine learning researchers routinely use both supervised and unsupervised learning algorithms with convolution operations. However, they very rarely venture into event-based algorithms. The uniqueness of our approach stems from the fact that our system bridges the gap between two different research communities.

[0102] Winner takes all

[0118] Winner-Take-All (WTA) selects at most one winning feature at each location. In large feature fields, too much relevant information may be discarded. Without WTA, the best-fit feature at a location would still spike, but it would also be accompanied by a spike of less-fit features. These less-fit features would cost power and processing time. By applying WTA in strategically selected groups, the less-fit features can be eliminated while retaining all the best fits.

[0103]

[0119] The power consumption and processing speed of an SNN are strongly tied to the sparsity of spikes in the SNN. The objective of the present invention is to strategically group filters from each location in the input stream and apply WTA techniques to those groups to reduce the number of propagated spikes. The situation of K-WTA hardware implementation is shown in Figure 14. If the kernel is a predefined structure, the WTA grouping can be hand designed or a clustering algorithm can be used to define groups with similar or dissimilar characteristics. The size of the group can be variable size (Figure 15).

[0104]

[0120] K-WTA can take and operate in several modes. Figure 16 shows how a winner is selected in the "best offer" mode.

[0105]

[0121] For some features, it is only necessary to know that any one of the potentials in the group exceeds the threshold. This is the case for dissimilar features where only one of the features is expected to exceed the threshold. In this case, processing speed can be increased and power reduced by processing the filters in the group only until any one of them exceeds the threshold. To reduce bias, the order of the potentials in each group is permuted with each pass. Figure 17 is an example of K-WTA in "First Good Offer" mode.

[0106]

[0122] In this regard, Figure 18 shows how one embodiment of this scheme can fit into a spiking neural network architecture. A block diagram of one embodiment that generates the filter results that are input to the WTA block is shown in Figure 19.

[0107]

[0123] The above description of specific embodiments sufficiently reveals the general nature of the invention so that others can easily modify and / or adapt such specific embodiments for various applications without undue experimentation by applying knowledge within the skill of the art (including the contents of documents cited and incorporated herein by reference) without departing from the general concept of the invention. Such adaptations and modifications are therefore intended to be within the meaning and equivalents of the disclosed embodiments, based on the teaching and guidance set forth herein. It should be understood that the phrases and terms used herein are for the purpose of description, not limitation, and thus should be interpreted by those of skill in the art in light of the teaching and guidance set forth herein, in combination with the knowledge of those of skill in the art.

[0108]

[0124] While various embodiments of the present invention have been described above, it should be understood that they have been presented by way of example, not limitation. It will be apparent to those skilled in the relevant art that various changes in form and detail can be made therein without departing from the spirit and scope of the invention. Thus, the present invention should not be limited by any of the above-described exemplary embodiments, but should be defined only in accordance with the following claims and their equivalents.

Claims

1. a spike converter configured to generate spikes from the digital input data; an inbound filter configured to select relevant spikes from the generated spikes, the relevant spikes being associated with a neuron; and a memory configured to store the kernels in an inverted form and further configured to store weights indexed by channels; a packet collection module configured to collect relevant spikes in a packet in a memory until a predetermined number of the relevant spikes are collected, and to organize the collected relevant spikes by channel and spatial coordinates in the packet; a convolutional neural processor configured to perform row-by-row strides in the memory, the convolutional neural processor using a scratch pad memory in the memory; wherein the inbound filter removes events outside the range of the convolutional neural processor.

2. The system of claim 1 , further comprising a pooling layer, wherein row pooling and column pooling are performed separately.

3. The system of claim 1 , which executes a learning algorithm that limits learning to one neuron per filter.

4. The system of claim 1 , which executes a learning algorithm that limits learning to one neuron per layer.

5. The system of claim 1 , wherein the system executes a learning algorithm that includes a winner-take-all algorithm.

6. The system of claim 1 , wherein the ratio of neurons to memory bits ranges from 0.10 to 0.

81.

7. 2. The system of claim 1, wherein the ratio of energy used per synaptic operation (SO) is less than 7 pJ / SO.

8. 2. The system of claim 1, wherein the ratio of energy used per synaptic operation (SO) is less than 3.5 pJ / SO.

9. The system of claim 1 , wherein the memory is a SRAM.

10. The system of claim 1 , wherein the digital input data is digital image data.

11. Receiving digital input data; generating spikes from the digital input data with a spike converter; selecting relevant spikes from the generated spikes with an inbound filter; storing the kernels in a memory in an inverted format, further comprising storing weights indexed by channels; collecting relevant spikes in a packet in memory until a predetermined number of relevant spikes are collected; Organizing the collected relevant spikes by channel and spatial coordinates in the packets; performing the convolution in hardware using a convolution neural processor and a scratchpad memory with row-by-row strides in said memory; The method includes:

12. The method of claim 11 , further comprising pooling in a pooling layer, wherein row pooling and column pooling are performed separately.

13. The method of claim 11 , further comprising executing a learning algorithm that limits learning to one neuron per filter.

14. The method of claim 11 , further comprising executing a learning algorithm that limits learning to one neuron per layer.

15. The method of claim 11 , further comprising executing a learning algorithm comprising a winner-take-all algorithm.

16. The method of claim 11, wherein the ratio of neurons to memory bits is in the range of 0.10 to 0.

81.

17. 12. The method of claim 11, wherein the ratio of energy used per synaptic operation (SO) is less than 7 pJ / SO.

18. 12. The method of claim 11, wherein the ratio of energy used per synaptic operation (SO) is less than 3.5 pJ / SO.

19. The method of claim 11 , wherein the memory is a SRAM.

20. The method of claim 11 , wherein the digital input data is digital image data.

Citation Information

Patent Citations

  • Method for object detection in digital image and video using spiking neural networks

    US20170300788A1