US 12,406,171 B2
System, method and storage medium for processing probability distributions in neural networks
Zichun Ye, Toronto (CA); Peixu Ren, Toronto (CA); and Xun Deng, Toronto (CA)
Assigned to HUAWEI TECHNOLOGIES CO., LTD., Shenzhen (CN)
Filed by Huawei Technologies Co., Ltd., Shenzhen (CN)
Filed on May 11, 2021, as Appl. No. 17/302,745.
Prior Publication US 2022/0366222 A1, Nov. 17, 2022
Int. Cl. G06N 3/047 (2023.01)
CPC G06N 3/047 (2023.01) 20 Claims
OG exemplary drawing
 
1. A computer implemented method for efficiently processing probability distributions in a neural network using a probabilistic programming language (PPL), the neural network having a plurality of layers, each layer comprising a plurality of nodes, the method comprising:
storing, in a data storage, a plurality of probability distribution data structures organized as distribution tensors, and storing corresponding distribution-Application Programming Interfaces (APIs) provided as part of the PPL, each probability distribution data structure of the plurality of probability distribution data structures comprising:
an identification of a probability distribution type, and
a list of parameters representative of the probability distribution type;
calling, by a node of a layer of the neural network, one of the corresponding distribution-APIs to retrieve from the data storage a probability distribution data structure of the plurality of probability distribution data structures needed by the layer, based on the identification of the probability distribution type;
inputting the probability distribution data structure as a distribution tensor into the node of the layer, by storing parameters of the distribution tensor in a memory;
modifying the distribution tensor within the layer, the node comprising processor-executable instructions causing at least one processor to conduct at least one probability distribution operation on the stored parameters, the at least one probability distribution operation including at least one of sampling and calculating entropy, the processor-executable instructions being written with the PPL, the modifying including:
accessing a dummy probability distribution class object from a dummy distribution class object library,
assembling a complete distribution class object by combining the parameters of the distribution tensor with the dummy probability distribution class object,
executing one or more methods of the complete distribution class object to modify the parameters, and
extracting the modified parameters from the complete distribution class object into a modified distribution tensor and releasing the complete distribution class object from the memory; and
outputting, by the node of the layer, the modified distribution tensor to a downstream node of a downstream layer of the layer of the neural network, by referencing the modified parameters in the memory, thereby limiting dataflow in between the layers of the neural network.