Sum-Product Networks: A New Deep Architecture
H. Poon, P. Domingos, Sum-Product Networks: A New Deep Architecture, ICCV (2011), Best Paper
摘要
图模型(graphical model)推理(inference)和学习(learning)的主要制约因素(key limiting factor)为配分函数(partition function)的复杂度。
本文提出一种和积网络(SPN):以变量为叶节点,中间节点为和、积运算,且对边加权的有向无环图(SPNs are directed acyclic graphs with variables as leaves, sums and products as internal nodes, and weighted edges)。
若SPN完备(complete)且一致(consistent),则该SPN表示图模型的配分函数及所有边缘、SPN的节点表示语义(the partition function and all marginals of some graphical model, and give semantics to its nodes)。
本文提出一种基于反向传播(backpropagation)和EM的SPN学习算法(learning algorithms)
SPN的学习和推理速度、准确性均优于传统深度网络。
1 引言
图模型(graphical models)将分布表示为因子的归一化乘积(graphical models represent distributions compactly normalized products of factors): ,其中,
-
为 维向量
-
势(potential) 为变量子集(作用域) 的函数(each potential is a function of a subset of the variables (its scope))
-
表示配分函数(partition function)。
图模型的缺点:
-
一些分布无法表示成上述形式;
-
最坏情况下(in the worst case),推理(inference)的时间复杂度呈指数(exponential)增长;
-
最坏情况下,学习所需样本数量(sample size required for accurate learning)随变量数量(scope size)呈指数增长;
-
由于学习过程涉及推理,即使固定变量,其时间复杂度依然为指数(because learning requires inference as a subroutine, it can take exponential time even with fixed scopes)。
通过假设隐含变量(hidden variables) ,可显著提高图模型的紧凑性(compactness):
多层隐藏变量的模型能够在类别数量众多的分布上高效推理(models with multiple layers of hidden variables allow for efficient inference in a much larger class of distributions)。
若能通过分配律将 改写为多项式数量的和、积项(if can be reorganized using the distributive law into a computation involving only a polynomial number of sums and products),则配分函数 可高效计算。
本文提出和积网络(sum-product networks,SPNs)。SPN可视为混合模型的广义有向无环图(generalized directed acyclic graphs of mixture models),其和节点对应变量子集的混合(sum nodes corresponding to mixtures over subsets of variables)、积节点对应混合的特征(product nodes corresponding to features or mixture components)。SPN可采用反向传播或EM学习(efficient learning by backpropagation or EM)。
2 和积网络(Sum-Product Networks)
考虑布尔变量(Boolean variables) ,其反(negation)记为 。
指示函数(indicator function) :当输入(argument)为真时,其值为1;反之为0。本文中,变量指示器 、 分别简记为 、 。
网络多项式(network polynomial):令 表示非归一化概率分布(unnormalized probability distribution),则 的网络多项式为 ,其中 表示在状态 上值为1的指示器之积(the product of the indicators that have value 1 in state )。
网络多项式为指示器变量的多重线性函数(a multilinear function)。
证据(evidence) : 的部分实例化;证据 的非归一化概率:与 兼容的所有指示器设为1、其余设为0时,网络多项式的值,(the unnormalized probability of evidence (partial instantiation of ) is the value of the network polynomial when all indicators compatible with are set to 1 and the remainder are set to 0)。
定义1:和积网络(SPN)为变量 的有向无环有根图,其叶节点为 和 的指示器,中间节点为和、积运算(a sum-product network (SPN) over variables is a rooted directed acyclic graph whose leaves are the indicators and and whose internal nodes are sums and products):
-
和节点各边 的权值 非负(each edge emanating from a sum node has a non-negative weight )。
-
积节点的值为其所有子节点值之积(the value of a product node is the product of the values of its children)
-
和节点的值为 ,其中 表示节点 的子节点、 为节点 的值(the value of a sum node is , where are the children of and is the value of node )。
-
SPN的值为其根节点的值(the value of an SPN is the value of its root)。
假设:和、积节点层交替排列(sums and products are arranged in alternating layers, i.e., all children of a sum are products or leaves, and vice-versa)。
将和积网络 记为指示变量(indicator variables) 和 的函数, :
-
若指示器指定一个完全状态(the indicators specify a complete state ),即每个状态 的指示器都分配一个值( 、 或 、 ),和积网络的输出记为 ;
-
若指示器指定一个证据 ,和积网络的输出记为 ;
-
若所有指示器的值均设为1,和积网络的输出记为 ;
-
和积网络中,以任意节点 为根的子网络(the subnetwork rooted at an arbitrary node)仍为和积网络,记为 ;
-
定义了 上的非归一化概率分布(the values of for all define an unnormalized probability distribution over );
-
在 定义的分布下,证据 的非归一化概率为 ,其中 表示对所有与 一致的状态求和(the unnormalized probability of evidence under this distribution is , where the sum is over states consistent with );
-
由 定义的分布,其配分函数为
-
的作用域(scope)为 中的变量集合(the scope of an SPN is the set of variables that appear in )
-
若 为 的叶节点,则 中变量 取反;反之亦然(a variable appears negated in if is a leaf of and non-negated if is a leaf of )。
例:图1中,SPN为 ,网络多项式为 。给定完全状态 : 、 , ;给定证据 : , ;
定义2:称和积网络 是有效的(valid),当且仅当对 ,满足 (a sum-product network is valid iff for all evidence )。
定义3:称和积网络 是完备的(complete),当且仅当 中任意和节点的所有子节点作用域均相同(a sum-product network is complete iff all children of the same sum node have the same scope)。
定义4:称和积网络 是一致的(consistent),当且仅当 中任意积节点的所有子节点不相悖(a sum-product network is consistent iff no variable appears negated in one child of a product node and non-negated in another)。■即积节点中不存在 ■
定理1:当该网络完备且一致时,和积网络有效(a sum-product network is valid if it is complete and consistent)。
完备性(completeness)和一致性(consistency)不是网络有效(validity)的必要条件。
若和积网络 完备但不一致(complete but inconsistent),其展开式(expansion)中包含网络多项式中不存在的单项式(monomial),故 ;若和积网络 一致但不完备(consistent but incomplete),其展开式中缺少网络多项式中的部分单项式,故 。因此,无效SPN可用于近似推理(approximate inference)。
定义5:称非归一化概率分布 是可由和积网络 表示的,当且仅当对 ,满足 且 有效(an unnormalized probability distribution is representable by a sum-product network iff for all states and is valid)。
则通过 ,可实现 所有边缘及其配分函数的高效计算。
定理2:若马尔科夫网络的配分函数 可通过包含 的多项式条边(edges)的和积网络表示,其中 表示 维向量,则 的计算时间复杂度为 的多项式(the partition function of a Markov network , where is a -dimensional vector, can be computed in time polynomial in if is representable by a sum-product network with a number of edges polynomial in )。
定义6:称和积网络是可分解的,当且仅当任意变量至多出现在积节点的一个子节点中(a sum-product network is decomposable iff no variable appears in more than one child of a product node)。
可分解比一致性更严格(decomposability is more restricted than consistency)。
3 和积网络与其它模型(Sum-Product Networks and Other Models)
4 和积网络学习(Learning Sum-Product Networks)
5 实验
图像补全(completing images)问题