EP4498284A1 - Method and device for on-device learning based on multiple instances of inference workloads - Google Patents
Method and device for on-device learning based on multiple instances of inference workloads Download PDFInfo
- Publication number
- EP4498284A1 EP4498284A1 EP24154497.2A EP24154497A EP4498284A1 EP 4498284 A1 EP4498284 A1 EP 4498284A1 EP 24154497 A EP24154497 A EP 24154497A EP 4498284 A1 EP4498284 A1 EP 4498284A1
- Authority
- EP
- European Patent Office
- Prior art keywords
- activations
- modulated
- layer
- pass
- forward inference
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/084—Backpropagation, e.g. using gradient descent
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/044—Recurrent networks, e.g. Hopfield networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/047—Probabilistic or stochastic networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N5/00—Computing arrangements using knowledge-based models
- G06N5/04—Inference or reasoning models
- G06N5/046—Forward inferencing; Production systems
Definitions
- the present disclosure relates generally to the field of artificial intelligence, and in particular to a method and circuit for training a neural network.
- Machine learning based on neural networks provides a powerful tool for many applications in which new solutions are to be developed for performing tasks, such as classification, regression and other inferences.
- Machine learning generally involves a learning phase, during which training data is used to learn the parameters of the neural network that result in a desired behavior at inference deployment. Once trained, an inference workload is then entered which involves using the neural network to process input data and provide desired outputs.
- Deploying deep learning models on systems with limited resources allows to realize the advantages of decentralized, distributed AI (Artificial Intelligence) deployed as close as possible to the raw data being generated.
- AI Artificial Intelligence
- the severely limited embedded memory and processing resources, available in such edge devices generally leads to the use of hand-crafted design approaches.
- the common development approach generally involves: training the model off-device in a supervised fashion using back-propagation and stochastic gradient descent techniques, tweaking the learning hyper-parameters, and then reducing the model size through methods such as pruning, compression and quantization. Finally, the solution is deployed on the small or tiny devices to perform low-power inference.
- the learning process therefore, occurs in advance of the model being deployed on the device. This can rapidly become a problem as AI models succumb to problems like accuracy performance degradation as time passes, known as concept drift, since the last training cycle. Another reason for activating the learning process on-device is to be able to fine-tune a previously learned model to personalize it for specific patterns of usage.
- a drawback of back-propagation techniques is that they lead to a memory bottleneck due to the storage of intermediate activations.
- a method of training a neural network using a circuit comprising a memory and a processing device, the method comprising: performing a first forward inference pass through the neural network based on input features to generate first activations, and generating an error based on a target value, and storing said error to the memory; and performing, for each layer of the neural network: a modulated forward inference pass based on said error to generate one or more modulated activations, and storing the one or more modulated activations to the memory; before, during or after the modulated forward inference pass, a second forward inference pass based on said input features to regenerate one or more of said first activations, and storing said one or more regenerated first activations to the memory; and updating one or more weights in the neural network based on the modulated activations and said one or more regenerated first activations.
- storing said one or more regenerated first activations to the memory comprises at least partially overwriting one or more previously-generated activations.
- the second forward inference pass is performed at least partially in parallel with said modulated forward inference pass.
- the modulated forward inference pass is performed using a first processing circuit of the processing device, and the second forward inference pass is performed using a second processing circuit of the processing device at least partially in parallel with said modulated forward inference pass.
- the modulated forward inference pass is performed using a first processing circuit of the processing device, and the second forward inference pass is also performed using said first processing circuit before or after said modulated forward inference pass.
- updating the one or more weights in the neural network based on the modulated activations and on said one or more regenerated first activations comprises updating a weight of a first layer of the neural network prior to the generation of said regenerated activations and/or modulated activations for a last layer of the neural network.
- the weights are updated for a first layer of said network based on the regenerated activations generated by the second forward interface pass and on the modulated activations generated during the modulated interference pass, prior to regenerating the activations and/or generating the modulated activations for a second layer of the said network, the second layer being the next layer after the first layer.
- a circuit for training a neural network comprising a memory and a processing device, the processing device being configured to: perform a first forward inference pass through the neural network based on input features to generate first activations; generate an error based on a target value, and store said error to the memory; and perform, for each layer of the neural network: a modulated forward inference pass based on said error to generate one or more modulated activations, and store the one or more modulated activations to the memory; before, during or after the modulated forward inference pass, a second forward inference pass based on said input features to regenerate one or more of said first activations, and store said one or more regenerated first activations to the memory; and update one or more weights in the neural network based on the modulated activations and on said one or more regenerated first activations.
- the processing device is configured to store said one or more regenerated first activations to the memory comprises at least partially overwriting one or more previously-generated activations.
- the processing device is configured to perform said second forward inference pass at least partially in parallel with said modulated forward inference pass.
- the processing device is configured to perform said modulated forward inference pass using a first processing circuit of the processing device, and to perform the second forward inference pass using a second processing circuit of the processing device at least partially in parallel with said modulated forward inference pass.
- the processing device is configured to perform said modulated forward inference pass using a first processing circuit of the processing device, and to perform the second forward inference pass using said first processing circuit before or after said modulated forward inference pass.
- the processing device is configured to update at least one weight of a first layer of the neural network based on the modulated activations and on said one or more regenerated first activations prior to the generation of said regenerated activations and/or modulated activations for a last layer of the neural network.
- the processing device is configured to update the weights for a first layer of said network based on the regenerated activations generated by the second forward interface pass and on the modulated activations generated during the modulated interference pass, prior to regenerating the activations and/or generating the modulated activations for a second layer of the said network, the second layer being the next layer after the first layer.
- the circuit further comprises:
- Figure 1 schematically illustrates an electronic device 100 with on-device learning according to an example embodiment of the present disclosure.
- the device 100 is for example an IoT edge device, capable of sensing, processing, storing information and actuation of any outcome of the processing.
- the electronic device 100 for example comprises a processing device (P) 102 having one or more processors under control of instructions stored in a memory 104 (RAM) of the device.
- the memory 104 is for example a volatile memory, such as a random-access memory (RAM).
- the one or more processors of the processing device 102 are for example CPUs (Central Processing Units), MCUs (Micro-controllers), NPUs (Neural Processing Units), and/or GPUs (Graphics Processing Units).
- the electronic device 100 also for example comprises a non-volatile memory 106 (FLASH), which is for example a Flash memory.
- the processing device 102 is for example coupled to the memories 104 and 106 via a bus 108.
- the non-volatile memory 106 for example stores, in a region 110, the weights of an artificial neural network (ANN) Net1.
- ANN artificial neural network
- the set of parameters of the neural network Net1 is fully defined in the region 110 of the memory 106, including the definition of the topology of the ANN, i.e. the number of neurons in the input and output layers and in the hidden layers, the number of hidden layers, the activation functions applied by the neuron circuits, etc.
- the data defining the network Net1 also for example includes parameters of the ANN learnt during training, such as its weights.
- the ANN Net1 is for example applied using the definition of the network stored in the non-volatile memory 106.
- the ANN Net1 is for example loaded to a region 112 of the volatile memory 112, where its weights can be modified at run time by the learning algorithm.
- the memory 104 for example stores activations 114 (ACTIVATIONS) of the neuron network, and also for examples stores the contents of a scratch pad 116 (SCRATCHPAD) containing the results of intermediate computations.
- the updated version of the ANN Net1 is for example stored back to the non-volatile memory 106 at the end of a learning phase. In this way, the ANN Net1 is trained and/or used for inference within the computing environment of the edge device 100.
- the electronic device 100 also for example comprises one or more sensors (SENSOR(S)) 118 coupled to the bus 108, and/or one or more actuators (ACTUATOR (S)) 120, coupled to the bus 108.
- the sensors 118 provide input features, such as data samples, and the electronic device 100 is configured to perform inference on the input features in order to generate one or more predictions, labels or measures.
- the electronic device 100 is also for example configured to control the one or more actuators 120 as a function of a result of the inference operation.
- one or more of the sensors 118 may be configured to generate data forming a ground truth used during a learning operation, and in this way the device 102 is for example capable of on-device continuous learning.
- the one or more sensors 118 for example comprise one or more image sensors, depth sensors, heat sensors, microphones, or any other type of sensor.
- the one or more sensors 118 comprise an image sensor having a linear or 2-dimensional array of pixels.
- the image sensor is for example a visible light image sensor, an infrared image sensor, an ultrasound image senor, or an image depth sensor, such as a LIDAR (LIght Detection And Ranging) image sensor.
- LIDAR LIght Detection And Ranging
- the electronic device 100 is configured to attempt to recognize the identity of a person based on an image of the person captured by an image sensor of the device 100, and to unlock a door, such as a home entrance door, if the identity is confirmed, or otherwise to keep the entrance door locked.
- the one or more actuators 120 for example comprise an electric motor control loop, a steering or breaking system for a vehicle, or an electronic actuator, which is for example configured to control the operation of one or more circuits, such as waking up a circuit from sleep mode, causing a circuit to enter into a sleep mode, causing a circuit to generate a text output, to perform a data encoding or decoding operation, etc.
- the actuators 120 comprise a control circuit causing the generation and transmission of a data packet by the electronic device 100 comprising sensor data from the one or more sensors 118, and/or data generated based on the sensor data.
- FIG. 2 schematically illustrates the neural network Net1 according to an example embodiment of the present disclosure.
- Net1 comprises four layers of neurons L1 to L4, the layer L1 for example being an input layer, the layer L4 for example being an output layer, and the layers L2 and L3 being hidden layers.
- Each layer comprises neurons, represented by circles in Figure 2 , there being four neurons in the input layer L1, eight neurons in each of the hidden layers L2, L3, and three neurons in the output layer L4, in the particular example of Figure 2 .
- the network Net1 could comprise a different number of neurons in each layer.
- Each neuron applies an activation function when it is activated by an input signal, the activation functions for example being the same for all of the neurons of the network, or varying among the neurons, and for example being different between the neurons of different layers.
- each neuron in each of the layers L2 to L4 is connected to the output of one or more neurons from the previous layer L-1 via a synapse, represented in Figure 2 by lines between the neurons. Each synapse for example multiples, by a weight, the signal between the output of one neuron and the input of the next.
- the network Net1 could be a fully-connected network in which the input of each neuron in each layer L2, L3, L4 is connected to the output of each neuron in the previous layer L-1.
- Figure 3 schematically illustrates an example of operations of a learning algorithm based on backpropagation. This algorithm can for example be applied to the neural network Net1 of Figure 2 .
- the terms "previous” and “output or next” in Figure 3 refer to a layer, for example an input, hidden or output layer of a neural network topology.
- the backpropagation algorithm is for example as follows: [Math 1]
- the algorithm comprises, for each learning operation involving a ground truth and resulting in a weight update: i) a forward pass; ii) a backward pass for the last layer L of the network; and iii) backward passes for each previous layer of the network.
- a loss is calculated, using a loss function ( a L , target ) , with respect to the ground truth ( target ) and the final output a L of the network.
- a gradient ⁇ aL of the loss in then computed, and the derivative ⁇ L of the loss function for the output layer Lin Figure 3 , is then computed as the Hadamard product with respect to the derivative ⁇ ' ( z L ) of the output activations z L , before a NL (Non-Linearity) block 302.
- the weight matrix W L of the output layer, or W l +1 of the next layer, labelled “Output or next” in Figure 3 (where “Output” refers to the output layer, or last layer L of the network, and “next” refers to the next layer with respect to the layer l, in other words the layer l+1) is then updated by subtracting from the weights W L , the derivative ⁇ L of the loss function multiplied by the input activations of the previous layer a previous T determined and stored in memory during the forward pass.
- the derivative ⁇ l of the loss function of the previous layer (NL 304 in Figure 3 ) is computed as the product of the weights W l + 1 T of the next layer with the derivative ⁇ l +1 calculated in the previous step and the Hadamard product of the derivative ⁇ ' ( z l ) of the nonlinearity with respect to the output activations z l of the previous layer.
- the weight matrix W l of the previous layer l (operation labelled "previous” in Figure 3 ) is then updated by subtracting from the weights W l the derivative ⁇ l of the loss function multiplied by the input activations of the previous layer a l ⁇ 1 T determined and stored during the forward pass.
- a drawback of the backpropagation algorithm of Figure 3 is that the activations a previous T and a l ⁇ 1 T of each layer should be stored in memory during the forward pass and kept until the backward pass has been completed. This leads to a relatively high memory burden.
- FIG. 4 schematically illustrates an example of operations of a learning algorithm based on forward-only propagation.
- This algorithm has been named PEPITA (Present the Error to Perturb the Input To modulate Activity), and is described in more detail in the publication G. Dellaferrera and G. Kreiman, "Error-driven input modulation: Solving the credit assignment problem without a backward pass," ArXiv, vol. abs/2201.11665, 2022 , the content of which is hereby incorporated by reference to the extent permitted by the law.
- the algorithm is detailled below. [Math 2]
- the PEPITA algorithm involves two passes, a standard forward inference pass and a modulated forward inference pass.
- a forward inference is generated based on input data x to a first layer a 0 , and activations are propagated forward through each layer of the network to the output layer L, the activations of each layer l being based on an activation function ⁇ l of the layer l, applied to the activations a l -1 generated in the previous layer 1-1, and based on the weight matrix W l of the synapses between layer l-1 and layer l.
- an error projection operation is performed in which the error e at the output is calculated based on the difference between the ground truth ( target ) and the final output a L of the network.
- modulated activations are generated, corresponding to activations that consider the error e.
- the product of the error e and a matrix F is added to the input data x in order to generate modulated activations a 0 err from the input layer.
- the matrix F is for example a matrix having a zero mean and a relatively small variance.
- the matrix F is randomly generated with a Gaussian or uniform distribution with zero mean and variance equal to, for example, 0.05 sqrt(2/FANIN), where FANIN is the input tensor shape to the neural network. For example, if the input tensor is a 28*28 image, FANIN is equal to 784.
- the modulated activations a l err are calculated as the activation function ⁇ l of the layer l, applied to the product of the weight matrix W l of the synapses between layer l-1 and the layer l, and the modulated activations a l ⁇ 1 err generated for the previous layer l-1.
- the weights are updated based on a difference between the activations a l of the layer l and the modulated activations a l err of the layer l.
- the new weight matrix W l is calculated by subtracting from the existing matrix the product of the difference ( a l - a l err ) and the transposed modulated activations a l ⁇ 1 err T from the previous layer, wherein the activations a l and a l ⁇ 1 err have been stored in memory.
- FIG. 5 is a flow diagram illustrating the operations of a learning algorithm 500 corresponding to that of Figure 4 shown in more detail.
- the PEPITA algorithm involves a standard pass 502 (Standard Pass), followed by an operation 504 (Activations in RAM) of storing the activations in such a memory.
- an operation of error projection 506 (Error projection) is also performed, followed by a modulated forward inference pass 508 (Modulated Pass).
- the parameters are updated in an operation 510 (Parameters Update), based on the modulated activations of the modulated pass, and on the activations generated during the standard pass.
- a drawback of the PEPITA algorithm of Figures 4 and 5 is that the activations a l of each layer should be stored in memory during the standard forward pass and kept until the weights have been updated for each layer. This leads to a relatively high memory burden, which is as high as the one required by the back propagation method described above.
- Figure 6 is a flow diagram illustrating operations of a learning algorithm 600 based on memory efficient forward-only propagation according to an example embodiment of the present disclosure.
- the learning algorithm 600 of Figure 6 is for example implemented by the electronic device 100 of Figure 1 .
- the processing device 102 is configured to execute instructions stored in the memory 104 causing the operations of the learning algorithm to be implemented on the neural network Net1, such that the weights of this neural network are updated.
- the parameters of the neural network Net1 are for example loaded to the region 112 of the volatile memory 104 from the region 110 of the non-volatile memory 106.
- the updated neural network Net1 is for example stored back to the non-volatile memory 106.
- the updated neural network Net1 may then be used for inference, for example by receiving input data from the one or more sensors 118, generating one or more predictions, and controlling the one or more actuators 120 as a function of these predictions.
- the algorithm 600 involves three forward passes through the neural network, a first standard forward inference pass 602 (Standard Pass), followed by a step of error projection 604 (Error projection), a second standard forward inference pass 606 (Standard pass) to recompute the activations without storing all of them as in PEPITA, and a modulated forward inference pass 608 (Modulated Pass) performed at least partially in parallel with the second standard pass 606. Finally, parameters are updated in an operation 610 (Parameters Update) based on the activations and modulated activations of the standard and modulated passes 606, 608.
- the standard passes 602 and 606 are indicated as "standard” simply because they are not modulated passes that propagate the error. All of the passes 602, 606 are forward inferences.
- the algorithm 600 is based on the following calculation: [Math 3]
- a forward inference is generated based on input data x to a first layer a 0 of the neural network Net1, and then activations are propagated through each layer of the network to the output layer L, the activations of each layer l being based on an activation function ⁇ l of the layer l, applied to the activations a l -1 generated in the previous layer 1-1, and based on the weight matrix W l of the synapses between layer l-1 and layer l.
- the error projection operation 604 is performed in which the error e at the output is calculated based on the difference between the ground truth ( target ) and the final output a L of the network.
- some or all of the activations generated during the first forward pass are deleted from the memory 104, and/or they are allowed to be overwritten.
- the second standard inference pass 606 is for example executed in the same manner as the first standard inference pass 602.
- the activations generated during the second standard inference pass are for example stored in memory and used for calculating the updates to be made to the weights.
- modulated activations are generated, corresponding to activations that consider the error e.
- the product of the error e and the matrix F is added to the input data x in order to generate modulated activations a 0 err from the input layer.
- the modulated activations a l err are calculated as the activation function ⁇ l of the layer l, applied to the product of the weight matrix W l of the synapses between layer l-1 and the layer l, and the modulated activations a l ⁇ 1 err generated for the previous layer 1-1.
- the processing device 102 comprises first and second processing units or circuits configured to operate in parallel, the first processing unit for example being configured to regenerate the activations associated with the second forward interference pass, at the same time as the second processing unit is configured to generate the modulated activations.
- the regeneration of the activations and the generation of the modulated activations is performed by a same processing unit or circuit in an interleaved fashion.
- the weights of each layer l of the neural network Net1 are updated based on a difference between the activations a l of the layer l and the modulated activations a l err of the layer 1.
- the new weight matrix W l is calculated by subtracting from the existing matrix the product of the difference ( a l ⁇ a l err ) and the transposed modulated activations a l ⁇ 1 err T from the previous layer, wherein the activations a t and a l ⁇ 1 err have been stored in memory.
- the operation of updating the weights is performed at least partially in parallel with the second forward pass 606 and/or at least partially in parallel with the modulated pass 608.
- performing these operations at least partially in parallel implies updating the one or more weights W l involves updating the weights of at least one layer of the neural network prior to the generation of the activations and/or modulated activations for the last layer L of the neural network Net1.
- the operations of the second forward interference pass, the modulated interference pass, and the updating of the weights are completed for the current layer l prior to performing the corresponding operations on the next layer l+1 of the network.
- the processing device 102 is configured to update the weights W l for each layer of the network based on the regenerated activations generated by the second forward interface pass 606 and on the modulated activations generated during the modulated interference pass 608, prior to regenerating the activations and/or generating the modulated activations for the next layer l+1 of the network.
- the activations and/or modulated activations can for example be deleted, or be allowed to be overwritten, in the memory 104 once they have been processed in the next layer of the network.
- An advantage of the embodiments described herein is that, by performing first and second forward passes through the neural network, the activations generated during the first pass can be used only for generating the error, and do not need to be stored until the step of updating the weights, which can be performed based on the activations generated during the second forward pass.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Software Systems (AREA)
- Evolutionary Computation (AREA)
- Data Mining & Analysis (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Computational Linguistics (AREA)
- Artificial Intelligence (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Probability & Statistics with Applications (AREA)
- Feedback Control In General (AREA)
- Image Analysis (AREA)
Abstract
The present disclosure relates to a method of training a neural network (Net1) using a circuit comprising a memory (104) and a processing device (102), the method comprising: performing a first forward inference pass through the neural network based on input features to generate first activations, and generating an error based on a target value, and storing said error to the memory (104); and performing, for each layer of the neural network (Net1): a modulated forward inference pass; before, during or after the modulated forward inference pass, a second forward inference pass based on said input features to regenerate one or more first activations; and updating one or more weights in the neural network (Net1) based on the modulated activations and said one or more regenerated first activations.
Description
- The present disclosure relates generally to the field of artificial intelligence, and in particular to a method and circuit for training a neural network.
- Machine learning based on neural networks provides a powerful tool for many applications in which new solutions are to be developed for performing tasks, such as classification, regression and other inferences. Machine learning generally involves a learning phase, during which training data is used to learn the parameters of the neural network that result in a desired behavior at inference deployment. Once trained, an inference workload is then entered which involves using the neural network to process input data and provide desired outputs.
- Deploying deep learning models on systems with limited resources, such as those prevalent in IoT (Internet of Things), automotive micro-controllers (MCUs) and sensor devices, allows to realize the advantages of decentralized, distributed AI (Artificial Intelligence) deployed as close as possible to the raw data being generated. The severely limited embedded memory and processing resources, available in such edge devices generally leads to the use of hand-crafted design approaches. The common development approach generally involves: training the model off-device in a supervised fashion using back-propagation and stochastic gradient descent techniques, tweaking the learning hyper-parameters, and then reducing the model size through methods such as pruning, compression and quantization. Finally, the solution is deployed on the small or tiny devices to perform low-power inference. The learning process, therefore, occurs in advance of the model being deployed on the device. This can rapidly become a problem as AI models succumb to problems like accuracy performance degradation as time passes, known as concept drift, since the last training cycle. Another reason for activating the learning process on-device is to be able to fine-tune a previously learned model to personalize it for specific patterns of usage.
- Hence, to keep tiny devices delivering highly accurate services through time, it would be desirable that they are capable of adapting their knowledge to the incoming data properties collected in streaming mode through the sensors, by continuous learning according to an on-device learning solution.
- A drawback of back-propagation techniques is that they lead to a memory bottleneck due to the storage of intermediate activations.
- Recently "Forward-only algorithms" have been proposed as biologically plausible alternatives to backpropagation. However, generally, the gain in terms of reducing memory and processing resources offered by existing forward-only algorithms is limited, and there is a need in the art for an improved method and device for machine learning allowing significant reductions in memory requirements and associated power consumption, particularly in the case of on-device learning.
- According to one aspect, there is provided a method of training a neural network using a circuit comprising a memory and a processing device, the method comprising: performing a first forward inference pass through the neural network based on input features to generate first activations, and generating an error based on a target value, and storing said error to the memory; and performing, for each layer of the neural network: a modulated forward inference pass based on said error to generate one or more modulated activations, and storing the one or more modulated activations to the memory; before, during or after the modulated forward inference pass, a second forward inference pass based on said input features to regenerate one or more of said first activations, and storing said one or more regenerated first activations to the memory; and updating one or more weights in the neural network based on the modulated activations and said one or more regenerated first activations.
- According to one embodiment, storing said one or more regenerated first activations to the memory comprises at least partially overwriting one or more previously-generated activations.
- According to one embodiment, the second forward inference pass is performed at least partially in parallel with said modulated forward inference pass.
- According to one embodiment, the modulated forward inference pass is performed using a first processing circuit of the processing device, and the second forward inference pass is performed using a second processing circuit of the processing device at least partially in parallel with said modulated forward inference pass.
- According to one embodiment, the modulated forward inference pass is performed using a first processing circuit of the processing device, and the second forward inference pass is also performed using said first processing circuit before or after said modulated forward inference pass.
- According to one embodiment, updating the one or more weights in the neural network based on the modulated activations and on said one or more regenerated first activations comprises updating a weight of a first layer of the neural network prior to the generation of said regenerated activations and/or modulated activations for a last layer of the neural network.
- According to one embodiment, the weights are updated for a first layer of said network based on the regenerated activations generated by the second forward interface pass and on the modulated activations generated during the modulated interference pass, prior to regenerating the activations and/or generating the modulated activations for a second layer of the said network, the second layer being the next layer after the first layer.
- According to a further aspect, there is provided a circuit for training a neural network, the circuit comprising a memory and a processing device, the processing device being configured to: perform a first forward inference pass through the neural network based on input features to generate first activations; generate an error based on a target value, and store said error to the memory; and perform, for each layer of the neural network: a modulated forward inference pass based on said error to generate one or more modulated activations, and store the one or more modulated activations to the memory; before, during or after the modulated forward inference pass, a second forward inference pass based on said input features to regenerate one or more of said first activations, and store said one or more regenerated first activations to the memory; and update one or more weights in the neural network based on the modulated activations and on said one or more regenerated first activations.
- According to one embodiment, the processing device is configured to store said one or more regenerated first activations to the memory comprises at least partially overwriting one or more previously-generated activations.
- According to one embodiment, the processing device is configured to perform said second forward inference pass at least partially in parallel with said modulated forward inference pass.
- According to one embodiment, the processing device is configured to perform said modulated forward inference pass using a first processing circuit of the processing device, and to perform the second forward inference pass using a second processing circuit of the processing device at least partially in parallel with said modulated forward inference pass.
- According to one embodiment, the processing device is configured to perform said modulated forward inference pass using a first processing circuit of the processing device, and to perform the second forward inference pass using said first processing circuit before or after said modulated forward inference pass.
- According to one embodiment, the processing device is configured to update at least one weight of a first layer of the neural network based on the modulated activations and on said one or more regenerated first activations prior to the generation of said regenerated activations and/or modulated activations for a last layer of the neural network.
- According to one embodiment, the processing device is configured to update the weights for a first layer of said network based on the regenerated activations generated by the second forward interface pass and on the modulated activations generated during the modulated interference pass, prior to regenerating the activations and/or generating the modulated activations for a second layer of the said network, the second layer being the next layer after the first layer.
- According to one embodiment, the circuit further comprises:
- one or more sensors configured to sense said input features; and/or
- one or more actuators configured to perform an action as a function of the one or more of said activations or regenerated activations.
- The foregoing features and advantages, as well as others, will be described in detail in the following description of specific embodiments given by way of illustration and not limitation with reference to the accompanying drawings, in which:
-
Figure 1 schematically illustrates an electronic device with on-device learning according to an example embodiment of the present disclosure; -
Figure 2 schematically illustrates a neural network according to an example embodiment of the present disclosure; -
Figure 3 schematically illustrates an example of operations of a learning algorithm based on backpropagation; -
Figure 4 schematically illustrates an example of operations of a learning algorithm based on forward-only propagation; -
Figure 5 is a flow diagram illustrating the operations of the learning algorithm ofFigure 4 in more detail; and -
Figure 6 is a flow diagram illustrating operations of a learning algorithm based on memory efficient forward-only propagation according to an example embodiment of the present disclosure. - Like features have been designated by like references in the various figures. In particular, the structural and/or functional features that are common among the various embodiments may have the same references and may dispose identical structural, dimensional and material properties.
- For the sake of clarity, only the operations and elements that are useful for an understanding of the embodiments described herein have been illustrated and described in detail.
- Unless indicated otherwise, when reference is made to two elements connected together, this signifies a direct connection without any intermediate elements other than conductors, and when reference is made to two elements coupled together, this signifies that these two elements can be connected or they can be coupled via one or more other elements.
- In the following disclosure, unless indicated otherwise, when reference is made to absolute positional qualifiers, such as the terms "front", "back", "top", "bottom", "left", "right", etc., or to relative positional qualifiers, such as the terms "above", "below", "higher", "lower", etc., or to qualifiers of orientation, such as "horizontal", "vertical", etc., reference is made to the orientation shown in the figures.
- Unless specified otherwise, the expressions "around", "approximately", "substantially" and "in the order of" signify within 10 %, and preferably within 5 %.
-
Figure 1 schematically illustrates anelectronic device 100 with on-device learning according to an example embodiment of the present disclosure. Thedevice 100 is for example an IoT edge device, capable of sensing, processing, storing information and actuation of any outcome of the processing. - The
electronic device 100 for example comprises a processing device (P) 102 having one or more processors under control of instructions stored in a memory 104 (RAM) of the device. Thememory 104 is for example a volatile memory, such as a random-access memory (RAM). The one or more processors of theprocessing device 102 are for example CPUs (Central Processing Units), MCUs (Micro-controllers), NPUs (Neural Processing Units), and/or GPUs (Graphics Processing Units). - The
electronic device 100 also for example comprises a non-volatile memory 106 (FLASH), which is for example a Flash memory. Theprocessing device 102 is for example coupled to the 104 and 106 via amemories bus 108. Thenon-volatile memory 106 for example stores, in aregion 110, the weights of an artificial neural network (ANN) Net1. For example, the set of parameters of the neural network Net1 is fully defined in theregion 110 of thememory 106, including the definition of the topology of the ANN, i.e. the number of neurons in the input and output layers and in the hidden layers, the number of hidden layers, the activation functions applied by the neuron circuits, etc. Furthermore, the data defining the network Net1 also for example includes parameters of the ANN learnt during training, such as its weights. - During inference, the ANN Net1 is for example applied using the definition of the network stored in the
non-volatile memory 106. During learning, the ANN Net1 is for example loaded to aregion 112 of thevolatile memory 112, where its weights can be modified at run time by the learning algorithm. Furthermore, during inference and/or learning, thememory 104 for example stores activations 114 (ACTIVATIONS) of the neuron network, and also for examples stores the contents of a scratch pad 116 (SCRATCHPAD) containing the results of intermediate computations. The updated version of the ANN Net1 is for example stored back to thenon-volatile memory 106 at the end of a learning phase. In this way, the ANN Net1 is trained and/or used for inference within the computing environment of theedge device 100. - The
electronic device 100 also for example comprises one or more sensors (SENSOR(S)) 118 coupled to thebus 108, and/or one or more actuators (ACTUATOR (S)) 120, coupled to thebus 108. In some embodiments, thesensors 118 provide input features, such as data samples, and theelectronic device 100 is configured to perform inference on the input features in order to generate one or more predictions, labels or measures. Theelectronic device 100 is also for example configured to control the one ormore actuators 120 as a function of a result of the inference operation. In some embodiments, one or more of thesensors 118 may be configured to generate data forming a ground truth used during a learning operation, and in this way thedevice 102 is for example capable of on-device continuous learning. - The one or
more sensors 118 for example comprise one or more image sensors, depth sensors, heat sensors, microphones, or any other type of sensor. For example, the one ormore sensors 118 comprise an image sensor having a linear or 2-dimensional array of pixels. The image sensor is for example a visible light image sensor, an infrared image sensor, an ultrasound image senor, or an image depth sensor, such as a LIDAR (LIght Detection And Ranging) image sensor. In this case, input data samples captured by thesensors 118 and provided to theelectronic device 100 are images, and theelectronic device 100 is configured to perform image processing on the images in order to determine one or more actions to be applied via theactuators 120. As an example, theelectronic device 100 is configured to attempt to recognize the identity of a person based on an image of the person captured by an image sensor of thedevice 100, and to unlock a door, such as a home entrance door, if the identity is confirmed, or otherwise to keep the entrance door locked. - The one or
more actuators 120 for example comprise an electric motor control loop, a steering or breaking system for a vehicle, or an electronic actuator, which is for example configured to control the operation of one or more circuits, such as waking up a circuit from sleep mode, causing a circuit to enter into a sleep mode, causing a circuit to generate a text output, to perform a data encoding or decoding operation, etc. For example, in one embodiment theactuators 120 comprise a control circuit causing the generation and transmission of a data packet by theelectronic device 100 comprising sensor data from the one ormore sensors 118, and/or data generated based on the sensor data. -
Figure 2 schematically illustrates the neural network Net1 according to an example embodiment of the present disclosure. In the example ofFigure 2 , Net1 comprises four layers of neurons L1 to L4, the layer L1 for example being an input layer, the layer L4 for example being an output layer, and the layers L2 and L3 being hidden layers. Each layer comprises neurons, represented by circles inFigure 2 , there being four neurons in the input layer L1, eight neurons in each of the hidden layers L2, L3, and three neurons in the output layer L4, in the particular example ofFigure 2 . Of course, in alternative embodiments, the network Net1 could comprise a different number of neurons in each layer. Each neuron applies an activation function when it is activated by an input signal, the activation functions for example being the same for all of the neurons of the network, or varying among the neurons, and for example being different between the neurons of different layers. Furthermore, each neuron in each of the layers L2 to L4 is connected to the output of one or more neurons from the previous layer L-1 via a synapse, represented inFigure 2 by lines between the neurons. Each synapse for example multiples, by a weight, the signal between the output of one neuron and the input of the next. In the example ofFigure 2 , there are connections between the inputs of each neurons in each layer L2, L3, L4 and the outputs of certain, but not all of the neurons in the previous layer L-1. In alternative embodiments, the network Net1 could be a fully-connected network in which the input of each neuron in each layer L2, L3, L4 is connected to the output of each neuron in the previous layer L-1. -
Figure 3 schematically illustrates an example of operations of a learning algorithm based on backpropagation. This algorithm can for example be applied to the neural network Net1 ofFigure 2 . The terms "previous" and "output or next" inFigure 3 refer to a layer, for example an input, hidden or output layer of a neural network topology. -
- The algorithm comprises, for each learning operation involving a ground truth and resulting in a weight update: i) a forward pass; ii) a backward pass for the last layer L of the network; and iii) backward passes for each previous layer of the network.
- During the forward pass, activations al are calculated in each layer l and stored, starting with the input layer l=1, and ending with the output layer l=L, based on an activation function σl of the layer l, applied to the activations a l-1 generated in the previous layer 1-1, and based on the weight matrix Wl of the synapses between layer l-1 and layer l, and based on a bias bl associated with layer l.
- During the backward pass for a final layer L, a loss is calculated, using a loss function (aL , target), with respect to the ground truth (target) and the final output aL of the network. As represented by an
operation 301 inFigure 3 , a gradient ∇ aL of the loss in then computed, and the derivative δL of the loss function for the output layer LinFigure 3 , is then computed as the Hadamard product with respect to the derivative σ'(zL ) of the output activations zL, before a NL (Non-Linearity) block 302. The weight matrix WL of the output layer, or W l+1 of the next layer, labelled "Output or next" inFigure 3 (where "Output" refers to the output layer, or last layer L of the network, and "next" refers to the next layer with respect to the layer l, in other words the layer l+1) is then updated by subtracting from the weights WL, the derivative δL of the loss function multiplied by the input activations of the previous layer determined and stored in memory during the forward pass. - During the backward passes for each previous layer of the network, in reverse pipeline order, the derivative δl of the loss function of the previous layer (
NL 304 inFigure 3 ) is computed as the product of the weights of the next layer with the derivative δ l+1 calculated in the previous step and the Hadamard product of the derivative σ'(zl ) of the nonlinearity with respect to the output activations zl of the previous layer. The weight matrix Wl of the previous layer l (operation labelled "previous" inFigure 3 ) is then updated by subtracting from the weights Wl the derivative δl of the loss function multiplied by the input activations of the previous layer determined and stored during the forward pass. -
-
Figure 4 schematically illustrates an example of operations of a learning algorithm based on forward-only propagation. This algorithm has been named PEPITA (Present the Error to Perturb the Input To modulate Activity), and is described in more detail in the publication G. Dellaferrera and G. Kreiman, "Error-driven input modulation: Solving the credit assignment problem without a backward pass," ArXiv, vol. abs/2201.11665, 2022, the content of which is hereby incorporated by reference to the extent permitted by the law. The algorithm is detailled below.
[Math 2] - The PEPITA algorithm involves two passes, a standard forward inference pass and a modulated forward inference pass.
- During the standard pass, labelled 402 in
Figure 4 , a forward inference is generated based on input data x to a first layer a 0, and activations are propagated forward through each layer of the network to the output layer L, the activations of each layer l being based on an activation function σl of the layer l, applied to the activations a l-1 generated in the previous layer 1-1, and based on the weight matrix Wl of the synapses between layer l-1 and layer l. In some cases, like in the back propagation algorithm, it would be possible to calculate the activations al also based on a bias bl associated with layer l. - After the forward inference has been completed, an error projection operation is performed in which the error e at the output is calculated based on the difference between the ground truth (target) and the final output aL of the network.
- During the modulated forward inference pass, labelled 404 in
Figure 4 , modulated activations are generated, corresponding to activations that consider the error e. In particular, the product of the error e and a matrix F is added to the input data x in order to generate modulated activations from the input layer. The matrix F is for example a matrix having a zero mean and a relatively small variance. For example, the matrix F is randomly generated with a Gaussian or uniform distribution with zero mean and variance equal to, for example, 0.05 sqrt(2/FANIN), where FANIN is the input tensor shape to the neural network. For example, if the input tensor is a 28*28 image, FANIN is equal to 784. Then, for each subsequent layer l, with l=1..L, the modulated activations are calculated as the activation function σl of the layer l, applied to the product of the weight matrix Wl of the synapses between layer l-1 and the layer l, and the modulated activations generated for the previous layer l-1. - As represented by a
block 406 inFigure 4 , after the modulated pass has been completed, the weights are updated based on a difference between the activations al of the layer l and the modulated activations of the layer l. For example, the new weight matrix Wl is calculated by subtracting from the existing matrix the product of the difference ( al - ) and the transposed modulated activations from the previous layer, wherein the activations al and have been stored in memory. -
Figure 5 is a flow diagram illustrating the operations of alearning algorithm 500 corresponding to that ofFigure 4 shown in more detail. As explained above, the PEPITA algorithm involves a standard pass 502 (Standard Pass), followed by an operation 504 (Activations in RAM) of storing the activations in such a memory. After the standard pass 503, an operation of error projection 506 (Error projection) is also performed, followed by a modulated forward inference pass 508 (Modulated Pass). Finally, the parameters are updated in an operation 510 (Parameters Update), based on the modulated activations of the modulated pass, and on the activations generated during the standard pass. - A drawback of the PEPITA algorithm of
Figures 4 and 5 is that the activations al of each layer should be stored in memory during the standard forward pass and kept until the weights have been updated for each layer. This leads to a relatively high memory burden, which is as high as the one required by the back propagation method described above. -
Figure 6 is a flow diagram illustrating operations of alearning algorithm 600 based on memory efficient forward-only propagation according to an example embodiment of the present disclosure. - The
learning algorithm 600 ofFigure 6 is for example implemented by theelectronic device 100 ofFigure 1 . For example, theprocessing device 102 is configured to execute instructions stored in thememory 104 causing the operations of the learning algorithm to be implemented on the neural network Net1, such that the weights of this neural network are updated. Initially, the parameters of the neural network Net1 are for example loaded to theregion 112 of thevolatile memory 104 from theregion 110 of thenon-volatile memory 106. Following one or more learning phases, the updated neural network Net1 is for example stored back to thenon-volatile memory 106. The updated neural network Net1 may then be used for inference, for example by receiving input data from the one ormore sensors 118, generating one or more predictions, and controlling the one ormore actuators 120 as a function of these predictions. - The
algorithm 600 involves three forward passes through the neural network, a first standard forward inference pass 602 (Standard Pass), followed by a step of error projection 604 (Error projection), a second standard forward inference pass 606 (Standard pass) to recompute the activations without storing all of them as in PEPITA, and a modulated forward inference pass 608 (Modulated Pass) performed at least partially in parallel with the second standard pass 606. Finally, parameters are updated in an operation 610 (Parameters Update) based on the activations and modulated activations of the standard and modulatedpasses 606, 608. - The standard passes 602 and 606 are indicated as "standard" simply because they are not modulated passes that propagate the error. All of the
passes 602, 606 are forward inferences. -
- During the first
standard pass 602, a forward inference is generated based on input data x to a first layer a 0 of the neural network Net1, and then activations are propagated through each layer of the network to the output layer L, the activations of each layer l being based on an activation function σl of the layer l, applied to the activations a l-1 generated in the previous layer 1-1, and based on the weight matrix Wl of the synapses between layer l-1 and layer l. For example, the activations al of each layer l are generated based on the following equation:
where σl is the activation function of the layer l. - After the forward inference has been completed, the error projection operation 604 is performed in which the error e at the output is calculated based on the difference between the ground truth (target) and the final output aL of the network. For example, the error e is generated based on the following equation:
- In some embodiments, after the error e has been calculated, some or all of the activations generated during the first forward pass are deleted from the
memory 104, and/or they are allowed to be overwritten. - The second standard inference pass 606 is for example executed in the same manner as the first
standard inference pass 602. The activations generated during the second standard inference pass are for example stored in memory and used for calculating the updates to be made to the weights. - During the modulated
forward inference pass 608, modulated activations are generated, corresponding to activations that consider the error e. In particular, the product of the error e and the matrix F is added to the input data x in order to generate modulated activations from the input layer. Then, for each subsequent layer l, with l=1..L, the modulated activations are calculated as the activation function σl of the layer l, applied to the product of the weight matrix Wl of the synapses between layer l-1 and the layer l, and the modulated activations generated for the previous layer 1-1. For example, the activations al of each layer l are generated based on the following equation:
- In some embodiments, the
processing device 102 comprises first and second processing units or circuits configured to operate in parallel, the first processing unit for example being configured to regenerate the activations associated with the second forward interference pass, at the same time as the second processing unit is configured to generate the modulated activations. Alternatively, the regeneration of the activations and the generation of the modulated activations is performed by a same processing unit or circuit in an interleaved fashion. - In an
operation 610, the weights of each layer l of the neural network Net1 are updated based on a difference between the activations al of the layer l and the modulated activations of thelayer 1. For example, the new weight matrix Wl is calculated by subtracting from the existing matrix the product of the difference ( ) and the transposed modulated activations from the previous layer, wherein the activations at and have been stored in memory. For example, the weights Wl of each layer l are generated based on the following equation:
- In some embodiments, the operation of updating the weights is performed at least partially in parallel with the second forward pass 606 and/or at least partially in parallel with the modulated
pass 608. For example, performing these operations at least partially in parallel implies updating the one or more weights Wl involves updating the weights of at least one layer of the neural network prior to the generation of the activations and/or modulated activations for the last layer L of the neural network Net1. - Furthermore, in some embodiments, for each layer l, the operations of the second forward interference pass, the modulated interference pass, and the updating of the weights, are completed for the current layer l prior to performing the corresponding operations on the next layer l+1 of the network. For example, the
processing device 102 is configured to update the weights Wl for each layer of the network based on the regenerated activations generated by the second forward interface pass 606 and on the modulated activations generated during the modulatedinterference pass 608, prior to regenerating the activations and/or generating the modulated activations for the next layer l+1 of the network. In this way, the activations and/or modulated activations can for example be deleted, or be allowed to be overwritten, in thememory 104 once they have been processed in the next layer of the network. - An advantage of the embodiments described herein is that, by performing first and second forward passes through the neural network, the activations generated during the first pass can be used only for generating the error, and do not need to be stored until the step of updating the weights, which can be performed based on the activations generated during the second forward pass.
- Various embodiments and variants have been described. Those skilled in the art will understand that certain features of these embodiments can be combined and other variants will readily occur to those skilled in the art.
- Finally, the practical implementation of the embodiments and variants described herein is within the capabilities of those skilled in the art based on the functional description provided hereinabove.
Claims (15)
- A method of training a neural network (Net1) using a circuit comprising a memory (104) and a processing device (102), the method comprising:- performing a first forward inference pass (602) through the neural network based on input features (x) to generate first activations (al ), and generating an error (e) based on a target value (target) , and storing said error to the memory (104); and- performing, for each layer (l) of the neural network (Net1):a modulated forward inference pass (608) based on said error to generate one or more modulated activations (
), and storing the one or more modulated activations to the memory (104);before, during or after the modulated forward inference pass (608), a second forward inference pass (606) based on said input features (x) to regenerate one or more of said first activations (al ), and storing said one or more regenerated first activations to the memory (104); andupdating one or more weights (Wl ) in the neural network (Net1) based on the modulated activations and said one or more regenerated first activations. - The method of claim 1, wherein storing said one or more regenerated first activations to the memory (104) comprises at least partially overwriting one or more previously-generated activations.
- The method of claim 1 or 2, wherein said second forward inference pass (606) is performed at least partially in parallel with said modulated forward inference pass (608).
- The method of claim 1 or 2, wherein said modulated forward inference pass (608) is performed using a first processing circuit of the processing device (102), and the second forward inference pass (606) is performed using a second processing circuit of the processing device (102) at least partially in parallel with said modulated forward inference pass (608).
- The method of any of claims 1 to 4, wherein said modulated forward inference pass (608) is performed using a first processing circuit of the processing device (102), and the second forward inference pass (606) is also performed using said first processing circuit before or after said modulated forward inference pass (608).
- The method of any of claims 1 to 5, or wherein updating the one or more weights (Wl ) in the neural network (Net1) based on the modulated activations and on said one or more regenerated first activations comprises updating a weight of a first layer of the neural network (Net1) prior to the generation of said regenerated activations and/or modulated activations for a last layer (L) of the neural network (Net1).
- The method of any of claims 1 to 6, wherein the weights (Wl ) are updated for a first layer of said network based on the regenerated activations generated by the second forward interface pass and on the modulated activations generated during the modulated interference pass (608), prior to regenerating the activations and/or generating the modulated activations for a second layer of the said network, the second layer being the next layer after the first layer.
- A circuit for training a neural network (Net1), the circuit comprising a memory (104) and a processing device (102), the processing device (102) being configured to:- perform a first forward inference pass (602) through the neural network (Net1) based on input features (x) to generate first activations (al );- generate an error (e) based on a target value (target), and store said error to the memory (104); and- perform, for each layer (l) of the neural network (Net1):a modulated forward inference pass (608) based on said error (e) to generate one or more modulated activations (
), and store the one or more modulated activations to the memory (104);before, during or after the modulated forward inference pass (608), a second forward inference pass (606) based on said input features (x) to regenerate one or more of said first activations (al ), and store said one or more regenerated first activations to the memory (104); andupdate one or more weights (Wl ) in the neural network (Net1) based on the modulated activations and on said one or more regenerated first activations. - The circuit of claim 7, wherein the processing device (102) is configured to store said one or more regenerated first activations to the memory (102) comprises at least partially overwriting one or more previously-generated activations.
- The circuit of claim 7 or 8, wherein the processing device (102) is configured to perform said second forward inference pass (606) at least partially in parallel with said modulated forward inference pass (608).
- The circuit of claim 7 or 8, wherein the processing device (102) is configured to perform said modulated forward inference pass (608) using a first processing circuit of the processing device (102), and to perform the second forward inference pass (606) using a second processing circuit of the processing device (102) at least partially in parallel with said modulated forward inference pass (608).
- The circuit of any of claims 7 to 10, wherein the processing device (102) is configured to perform said modulated forward inference pass (608) using a first processing circuit of the processing device (102), and to perform the second forward inference pass (606) using said first processing circuit before or after said modulated forward inference pass.
- The circuit of any of claims 7 to 12, wherein the processing device (102) is configured to update at least one weight of a first layer of the neural network (Net1) based on the modulated activations and on said one or more regenerated first activations prior to the generation of said regenerated activations and/or modulated activations for a last layer (L) of the neural network (Net1).
- The circuit of any of claims 7 to 13, wherein the processing device (102) is configured to update the weights (Wl ) for a first layer of said network based on the regenerated activations generated by the second forward interface pass and on the modulated activations generated during the modulated interference pass (608), prior to regenerating the activations and/or generating the modulated activations for a second layer of the said network, the second layer being the next layer after the first layer.
- The circuit of any of claims 7 to 14, further comprising:- one or more sensors (118) configured to sense said input features (x); and/or- one or more actuators (120) configured to perform an action as a function of the one or more of said activations or regenerated activations.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US18/779,807 US20250053807A1 (en) | 2023-07-24 | 2024-07-22 | Method and device for on-device learning based on multiple instances of inference workloads |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP23425036 | 2023-07-24 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| EP4498284A1 true EP4498284A1 (en) | 2025-01-29 |
Family
ID=88237494
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| EP24154497.2A Pending EP4498284A1 (en) | 2023-07-24 | 2024-01-29 | Method and device for on-device learning based on multiple instances of inference workloads |
Country Status (2)
| Country | Link |
|---|---|
| US (1) | US20250053807A1 (en) |
| EP (1) | EP4498284A1 (en) |
-
2024
- 2024-01-29 EP EP24154497.2A patent/EP4498284A1/en active Pending
- 2024-07-22 US US18/779,807 patent/US20250053807A1/en active Pending
Non-Patent Citations (1)
| Title |
|---|
| WAHEEB WADDAH ET AL: "Ridge Polynomial Neural Network with Error Feedback for Time Series Forecasting", PLOS ONE, vol. 11, no. 12, 13 December 2016 (2016-12-13), US, pages e0167248, XP093179373, ISSN: 1932-6203, DOI: 10.1371/journal.pone.0167248 * |
Also Published As
| Publication number | Publication date |
|---|---|
| US20250053807A1 (en) | 2025-02-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Pearlmutter | Gradient calculations for dynamic recurrent neural networks: A survey | |
| Xie et al. | Learning in neural networks by reinforcement of irregular spiking | |
| US9256215B2 (en) | Apparatus and methods for generalized state-dependent learning in spiking neuron networks | |
| US9129221B2 (en) | Spiking neural network feedback apparatus and methods | |
| US9098811B2 (en) | Spiking neuron network apparatus and methods | |
| US20130325766A1 (en) | Spiking neuron network apparatus and methods | |
| US20130297539A1 (en) | Spiking neural network object recognition apparatus and methods | |
| US20180101957A1 (en) | Neural network for image processing | |
| US20130297542A1 (en) | Sensory input processing apparatus in a spiking neural network | |
| CN112633463B (en) | Dual recurrent neural network architecture for modeling long-term dependencies in sequential data | |
| KR20160112186A (en) | Method and apparatus for event-based learning in neural network | |
| US11210559B1 (en) | Artificial neural networks having attention-based selective plasticity and methods of training the same | |
| US11410040B2 (en) | Efficient dropout inference for bayesian deep learning | |
| CN116080688B (en) | Brain-inspiring-like intelligent driving vision assisting method, device and storage medium | |
| Kim et al. | Building deep random ferns without backpropagation | |
| Amari | Mathematical theory of neural learning | |
| CN114723097A (en) | Method and system for determining weights for attention-based trajectory prediction methods | |
| Huo et al. | Research on SNN Learning Algorithms and Networks Based on Biological Plausibility | |
| EP4498284A1 (en) | Method and device for on-device learning based on multiple instances of inference workloads | |
| Lv et al. | Towards biologically plausible computing: A comprehensive comparison | |
| Galatolo et al. | Using stigmergy to incorporate the time into artificial neural networks | |
| Licata | Are neural networks imitations of mind | |
| Scott | Knowledge-based artificial neural networks for process modelling and control | |
| Kim et al. | Artificial Intelligence and Methods | |
| Kubo et al. | Biologically-inspired neuronal adaptation improves learning in neural networks |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PUAI | Public reference made under article 153(3) epc to a published international application that has entered the european phase |
Free format text: ORIGINAL CODE: 0009012 |
|
| STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: REQUEST FOR EXAMINATION WAS MADE |
|
| 17P | Request for examination filed |
Effective date: 20240129 |
|
| AK | Designated contracting states |
Kind code of ref document: A1 Designated state(s): AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC ME MK MT NL NO PL PT RO RS SE SI SK SM TR |






