CPC G06N 3/065 (2023.01) [G06N 3/047 (2023.01); G06N 3/08 (2013.01); G11C 13/0021 (2013.01)] | 12 Claims |
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
![]() 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.
|