US 12,205,020 B2
Bayesian neural network with resistive memory hardware accelerator and method for programming the same
Thomas Dalgaty, Grenoble (FR); Niccolo Castellani, Grenoble (FR); and Elisa Vianello, Grenoble (FR)
Assigned to COMMISSARIAT A L'ENERGIE ATOMIQUE ET AUX ENERGIES ALTERNATIVES, Paris (FR)
Filed by COMMISSARIAT A L'ENERGIE ATOMIQUE ET AUX ENERGIES ALTERNATIVES, Paris (FR)
Filed on Apr. 7, 2021, as Appl. No. 17/224,696.
Claims priority of application No. 20305450 (EP), filed on May 6, 2020.
Prior Publication US 2021/0350218 A1, Nov. 11, 2021
Int. Cl. G06N 3/065 (2023.01); G06N 3/047 (2023.01); G06N 3/08 (2023.01); G11C 13/00 (2006.01)
CPC G06N 3/065 (2023.01) [G06N 3/047 (2023.01); G06N 3/08 (2013.01); G11C 13/0021 (2013.01)] 12 Claims
OG exemplary drawing
 
1. A method for programming a Bayesian neural network comprising an input layer and an output layer, each neuron of a layer being fed with a plurality of synapses, wherein said plurality of synapses are implemented as a RRAM array of cells being organized into columns and rows, each column of the RRAM array being associated with a synapse, each row of the array corresponding to a sample of a posterior probability of synaptic coefficients after the neural network has been trained, each cell comprising at least a first resistor in series with a first transistor, drains of the first transistors of the cells of a row in the array being connected together with an input of a neuron, gates of the first transistors of a row being connected together with a control line, the control lines connecting the gates of the first transistors of the N rows being configured to be switched in turn, voltages output by all the neurons of a layer being simultaneously propagated to a next, or being output if the layer is the output layer, successive voltages output by output layer providing a probability distribution (p(z)) of an inference from a vector of data when said vector of data is input to the input layer, said method comprising:
(a) training a model of the Bayesian neural network on a training dataset, D, a posterior probability distribution of the synaptic coefficients p(w|D) of the network being sampled by a Markov Chain Monte Carlo (MCMC) algorithm, thereby providing a matrix WS of size S×Q, each row of said matrix corresponding to a sample of the synaptic coefficients and each column of said matrix corresponding to a synapse of said network;
(b) decomposing a marginal posterior probability distribution of each synaptic coefficient, wq into a plurality K of Gaussian components, the kth Gaussian component of synaptic coefficient wq having a median value μq,k;
(c) transforming each sample of a synaptic coefficient, wq, in matrix WS into a quantized value to obtain a programming matrix WS, said quantized value being selected as a mean value of a Gaussian component obtained at step (b) which is closest to said sample of synaptic coefficient; and
(d) programming the first resistors of each row, n, of the RRAM array, by injecting therein a current of intensity

OG Complex Work Unit Math
during a SET operation, where wn,q is an element at row n and column q of programming matrix WS and α, γ are coefficients characteristic of the RRAM array.