On the Expressive Efficiency of Sum Product Networks

James Martens, Venkatesh Medabalimi

Introduction

Sum Product Networks (SPNs) (Poon and Domingos, 2011) are a recently developed class of deep generative models which compute their associated unnormalized density functions using a special type of arithmetic circuit. Like neural networks, arithmetic circuits (e.g. Shpilka and Yehudayoff, 2010) are feed-forward circuits whose gates/nodes compute real values, and whose connections have associated real-valued weights. Each node in an arithmetic circuit computes either a weighted sum or a product over their real-valued inputs.

For an important special class of SPNs called “valid SPNs”, computing the normalizing constant, along with any marginals, can be performed by what amounts to a single evaluation of the network. This is to be contrasted with other deep generative models like Deep Boltzmann Machines (Salakhutdinov and Hinton, 2009), where quantities crucial to learning and model evaluation (such as the normalizing constant) are provably intractable, unless P=#PP=\#P (Roth, 1996).

The tractability properties of valid SPNs are the primary reason they are interesting both from a theoretical and practical perspective. However, validity is typically enforced via the so-called “decomposability” and “completeness” conditions (which we will abbreviate as “D&C”). While easy to describe and verify, the D&C conditions impose stringent structural restrictions on SPNs which limit the kinds of architectures that are allowed. While some learning algorithms have been developed that can respect these conditions (e.g. Gens and Domingos, 2013; Peharz et al., 2013; Rooshenas and Lowd, 2014), the extent to which they limit the expressive efficiencyBy this we mean the extent to which they can efficiently capture various distribution. A distribution is “efficiently captured” if it is contained in the closure of the set of distributions corresponding to different settings of the models parameters, for polynomial sized (in the dimension nn of the data/input) instances of the model, where size is measured by the number of “units” or parameters. Often these will be realistic low-order polynomials, although this depends on how exactly the constructions are done. Note that a distribution being “efficiently captured” says nothing about how easily the marginal densities or partition function of its associated density can be computed (except in the case of D&C SPNs of course). The concept of expressive efficiency is also sometimes called “expressive power” or “representational power”, although we will use the word “efficiency” instead of “power” to emphasize our focus on the question of whether or not certain distributions which can be captured efficiently by the model, instead of the question of whether or not they can be captured at all (i.e. by super-polynomially sized instances of the model). This latter question is the topic of papers which present so-called “universality” results which show how some models can capture any distribution if they are allowed be exponentially large in nn (by essentially simulating a giant look-up table). Such results are fairly straightforward, and indeed it easy to show that D&C SPNs are universal in this sense. of SPNs versus various other deep generative models remains unclear.

Like most models, D&C SPNs are “universal” in the sense that they can capture any distribution if they are allowed to be of a size which is exponential in the dimension nn of the data/input. However, any distribution function which can be efficiently captured by D&C SPNs, which is to say by one of polynomial size, must therefore be tractable (in the sense of having computable marginals, etc). And given complexity theoretic assumptions like P≠#PP\neq\#P it is easy to come up with density functions whose marginals/normalizers are intractable, but which nonetheless correspond to distributions which can be efficiently captured by various other deep generative models (e.g. using the simulation results from Martens (2014)). Thus we see that the tractability properties enjoyed by D&C SPNs indeed come with a price.

However, one could argue that the intractability of these kinds of “hard” distributions would make it difficult or even impossible to learn them in practice. Moreover, any model which can efficiently capture them must therefor lack an efficient general-case inference/learning algorithm. This is a valid point, and it suggests the obvious follow-up question: is there a fully tractable distribution (in the sense that its marginal densities and partition function can be computed efficiently) which can be efficiently captured by other deep models, but not by D&C SPNs?

In this work we answer this question in the affirmative, without assuming any complexity theoretic conjectures. This result thus establishes that D&C SPNs are in some sense less expressively efficient than many other deep models (since, by the results of Martens (2014), such models can efficiently simulate D&C SPNs), even if we restrict our attention only to tractable distributions. Moreover, it suggests existence of a hypothetical model which could share the tractability properties of D&C SPNs, while being more expressively efficient.

In addition to this result, we also analyze the effect of depth, and other structural characteristics, on the expressive efficiency of D&C SPNs. Perhaps most notably, we use existing results from arithmetic circuit theory to establish that D&C SPNs gain expressive efficiency with each additional layer of depth. In particular, we show that the set of distributions which can be efficiently captured by D&C SPNs grows with each layer of depth permitted. This kind of “depth hierarchy” property has never before been shown to hold for any other well-known deep model, despite the widespread belief that it does hold for most of them (e.g. Bengio and Delalleau, 2011).

Along with these two results, we also make numerous other contributions to the theoretical understanding of SPNs which are summarized below.

In Section 2, we first propose a generalized definition of SPNs that captures all previous definitions. We then illuminate the various connections between SPNs and multilinear arithmetic circuits, allowing us to exploit the many powerful results which have already been proved for the latter.

In Section 3 we provide new insights regarding the D&C conditions and their relationship to validity, and introduce a slightly strengthened version of validity which we show to be equivalent to the D&C conditions (whereas standard validity is merely implied by them). We also show that for a slightly generalized definition of SPNs, testing for standard validity is a co-NP hard problem.

In Section 5 we give examples of various state-based models of computation which can be efficiently simulated by D&C SPNs, and show how these can be used to give constructive proofs that various simple density functions can be efficiently computed by D&C SPNs.

In Section 6 we address the prior work on the expressive efficiency of D&C SPNs due to Delalleau and Bengio (2011), and give a much shorter proof of their results using powerful techniques borrowed from circuit theory. We go on to show how these techniques allow us to significantly strengthen and extend the results of Delalleau and Bengio (2011), answering an open question which they posed.

In Section 7 we leverage prior work done on multilinear arithmetic circuits to prove several very powerful results regarding the relationship between depth and expressive efficiency of D&C SPNs. First, we show that with each extra layer of depth added, there is an expansion of the set of functions efficiently computable by D&C SPNs (thus giving a strict “hierarchy of depth”). Next we show that if depth is allowed to grow with the input dimension nn, that its effect on expressive efficiency greatly diminishes after it reaches O(log⁡(n)2)\mathcal{O}(\log(n)^{2}).

In Section 8 we show that when D&C SPNs are constrained to have a recursive “formula” structure, as they are when learned using the approach of (Gens and Domingos, 2013), they lose expressive efficiency. In particular we use prior work on multilinear arithmetic circuits to produce example functions which can be efficiently computed by general D&C SPNs, but not by ones constrained to have a formula structure.

Finally, in Section 9 we give what is perhaps our most significant and difficult result, which is the existence of a simple density function whose marginals and normalizer are computable by an O(n1.19)\mathcal{O}(n^{1.19}) time algorithm, and whose corresponding distribution can be efficiently captured by various other deep models (in terms of their size), but which cannot be efficiently computed, or even efficiently approximated, by a D&C SPN of any depth.

Definitions and Notation

Arithmetic circuits (e.g. Shpilka and Yehudayoff, 2010) are a type of circuit, similar to Boolean logic circuits, or neural networks. But instead of having gates/nodes which compute basic logical operations like AND, or sigmoidal non-linearities, they have nodes which perform one of the two fundamental operations of arithmetic: addition and multiplication. Their formal definition follows.

For a node uu in Φ\Phi, Φu\Phi_{u} denotes the subcircuit of Φ\Phi rooted at uu. This subcircuit is formed by taking only the nodes in Φ\Phi that are on a path to uu.

The scope of a node uu, denoted by yuy_{u}, is defined as the subset of the elements of yy which appear as labels in the sub-circuit rooted at uu. These are the variables which uu’s output essentially “depends on”.

The size of Φ\Phi, denoted by ∣Φ∣|\Phi|, is defined as the number of nodes in Φ\Phi, and its depth is defined as the length of the longest directed path in Φ\Phi. An alternative notion of depth, called product depth (Raz and Yehudayoff, 2009), is defined as the largest number of product nodes which appear in a directed path in Φ\Phi.

Note that in general, nodes in an arithmetic circuit can have out-degree greater than 1, thus allowing the quantities they compute to be used in multiple subsequent computations by other nodes. When this is not the case and the nodes of Φ\Phi each have out-degree at most 1, Φ\Phi is said to be an arithmetic formula, because it can be written out compactly as a formula.

2 Sum Product Networks (SPNs)

In this section we will give our generalized definition of Sum Product Networks (SPNs).

A Sum Product Network (SPN) Φ\Phi is defined as a monotone arithmetic circuit over ff. It inherits all of the properties of monotone arithmetic circuits, and gains some additional ones, which are discussed below.

Because an SPN is an arithmetic circuit over ff, any one of its nodes uu computes a polynomial function qu(f)q_{u}(f) in ff. But because the elements of ff are functions of the elements of xx, a node uu of an SPN can be also viewed as computing a function of xx, as given by qu(f(x))q_{u}(f(x)), where f(x)f(x) denotes the set/tuple obtained by replacing each element fi,jf_{i,j} in ff with the value of fi,j(xi)f_{i,j}(x_{i}).

The dependency-scope of a node uu is defined as the set of elements of xx on which members of uu’s scope fuf_{u} depend. The dependency-scope is denoted by xux_{u}.

A formula SPN is defined as an SPN which is also an arithmetic formula. In other words, a formula SPN is one whose nodes each have an out-degree of at most 1.

It is important to remember that the domains (the RiR_{i}’s) and the measures (MiM_{i}’s) can be defined however we want, so that SPNs can represent both continuous and discrete distributions. For example, to represent a discrete distribution, we can choose MiM_{i} to be the counting measure with support given by a finite subset, such as {0,1}\{0,1\}. In such a case, integration of some function g(xi)g(x_{i}) w.r.t. such a MiM_{i} amounts to the summation ∑xi∈{0,1}g(xi)\sum_{x_{i}\in\{0,1\}}g(x_{i}).

3 Validity, decomposability, and completeness

Treated as density models, general SPNs suffer from many of the same intractability issues that plague other deep density models, such as Deep Boltzmann Machines (Salakhutdinov and Hinton, 2009). In particular, there is no efficient general algorithm for computing their associated partition function ZZ or marginal densities.

However, it turns out that for a special class of SPNs, called valid SPNs, computing the the partition function and marginal densities can be accomplished by what is essentially a single evaluation of the network. Moreover, the validity of a given SPN can be established using certain easy-to-test structural conditions called decomposability and completeness, which we will discuss later.

Decoding the notation, this definition says that for a valid SPN Φ\Phi we can compute the integral of the output function qΦ(f(x))q_{\Phi}(f(x)) with respect to a subset of the input variables (given by the index set II) over corresponding subsets of their respective domains (the SiS_{i}’s), simply by computing the corresponding integrals over the respective univariate functions (the fi,jf_{i,j}’s) and evaluating the circuit by having nodes labeled by these fi,jf_{i,j}’s compute said integrals.

While validity may seem like a magical property for an SPN to have, as shown by Poon and Domingos (2011) there is a pair of easy to enforce (and verify) structural properties which, when they appear together, imply validity. These are known as “decomposability” and “completeness”, and are defined as follows.

Definition 2 (Decomposable) An SPN Φ\Phi is decomposable if for every product node uu in Φ\Phi the dependency-scopes of its children are pairwise disjoint.

Definition 3 (Completeness) An SPN Φ\Phi is complete if for every sum node uu in Φ\Phi the dependency-scopes of its children are all the same.

As was the case in the work of Poon and Domingos (2011), decomposability and completeness turn out to be sufficient conditions, but not necessary ones, for ensuring validity according to our more general set of definitions. Moreover, we will show that for a natural strengthening of the concept of validity, decomposability and completeness become necessary conditions as well.

The tractability of the partition function and marginal densities is a virtually unheard of property for deep probabilistic models, is the primary reason that decomposably and complete SPNs are so appealing.

For the sake of brevity we will call an SPN which satisfies the decomposability and completeness conditions a D&C SPN.

A notion related to decomposability which was discussed in Poon and Domingos (2011) is that of “consistency”, which is defined only for SPNs whose univariate functions ff are either the identity function g(z)=zg(z)=z or the negation function g(z)=1−zg(z)=1-z, and whose inputs variables xx are all 0/1-valued. Such an SPN is said to be consistent if each product node satisfies the property that if one of its children has the identity function of xix_{i} in its scope, then none of the other children can have the negation function of xix_{i} in their scopes. This is a weaker condition than decomposability, and is also known to imply validity (Poon and Domingos, 2011).

Note that for 0/10/1-valued variables we have xi2=xix_{i}^{2}=x_{i} and (1−xi)2=1−xi(1-x_{i})^{2}=1-x_{i}, and so it is possible to construct an equivalent decomposable SPN from a consistent SPN by modifying the children of each product node so as to remove the “redundant” factors of xix_{i} (or 1−xi1-x_{i}). Note that such a construction may require the introduction of polynomially many additional nodes, as in the proof of Proposition 10. In light of this, and the fact that consistency only applies to a narrowly defined sub-class of SPNs, we can conclude that consistency is not a particularly interesting property to study by itself, and so we will not discuss it any further.

4 Top-down view of D&C SPNs

For a D&C SPN Φ\Phi it is known (and is straightforward to show) that if the weights on the incoming edges to each sum node sum to 1, and the univariate functions have integrals of 1 (i.e. so they are normalized density functions), then the normalizing constant of Φ\Phi’s associated density is 1, and each node can be interpreted as computing a normalized density over the variables in its dependency scope. We will call such a Φ\Phi “weight-normalized”.

A weight-normalized D&C SPN Φ\Phi can be interpreted as a top-down directed generative model where each sum node corresponds to a mixture distribution over the distributions associated with its children (with mixture weights given by the corresponding edge weights), and where each product node corresponds to factorized distribution, with factors given by the distributions of its children (Gens and Domingos, 2013). Given this interpretation it is not hard to see that sampling from Φ\Phi can be accomplished in a top-down fashion starting at the root, just like in a standard directed acyclic graphical model.

One interesting observation we can make is that it is always possible to transform a general D&C SPN into an equivalent weight-normalized one, as is formalized in the following proposition:

Given a D&C SPN Φ\Phi there exists a weight-normalized D&C SPN Φ′\Phi^{\prime} with the same structure as Φ\Phi and with the same associated distribution.

5 Relationship to previous definitions

Our definitions of SPNs and related concepts subsume those given by Poon and Domingos (2011) and later by Gens and Domingos (2013). Thus the various results we prove in this paper will still be valid according to those older definitions.

The purpose of this subsection is justify the above claim, with a brief discussion which assumes pre-existing familiarity with the definitions given in the above cited works.

First, to see that our definition of SPNs generalizes that of Poon and Domingos (2011), observe that we can take the univariate functions to be of the form xix_{i} or xi‾=1−xi\overline{x_{i}}=1-x_{i}, and that we can choose the domains of measures so that the xix_{i}’s are discrete {0,1}\{0,1\}-valued variables, and choose the associated measures so that integration over values of xix_{i} becomes equivalent to summation.

Second, to see that our definition generalizes that of Gens and Domingos (2013), observe that we can take the univariate functions to be univariate density functions. And while Gens and Domingos (2013) formally defined SPNs as always being decomposable and complete, we will keep the concepts of SPNs and D&C SPNs separate in our discussions, as in the original paper by Poon and Domingos (2011).

6 Polynomials and multilinearity

In this section we will define some additional basic concepts which will be useful in our analysis of SPNs in the coming sections.

In general, polynomials over yy are defined as a finite sum of monomial terms. Given a monomial mm, its associated coefficient in a polynomial qq will refer to the coefficient of the monomial term whose associated monomial is mm (we will assume that like terms have been collected, so this is unique). As a short-hand, we will say that a monomial mm is “in qq” if the associated coefficient of mm in qq is non-zero.

The zero polynomial is defined as a polynomial which has no monomials in it. While the zero polynomial clearly computes the zero function, non-zero polynomials can sometimes also compute the zero function over the domain of yy, and thus these are related but distinct concepts For example, y1(1−y1)y_{1}(1-y_{1}) computes the zero function when the domain of y1y_{1} is {0,1}\{0,1\} but is clearly not the zero polynomial..

A polynomial is called non-negative if the coefficients of each of its monomials are non-negative. Non-negativity is related to the monotonicity of arithmetic circuits in the following way:

If Φ\Phi is a monotone arithmetic circuit over yy (such as an SPN with y=fy=f), then qΦq_{\Phi} is a non-negative polynomial.

We will define the scope of a polynomial qq in yy, denoted by yqy_{q}, to be the set of variables which appear as factors in at least one of its monomials. Note that for an node uu in an arithmetic circuit, the scope yuy_{u} of uu can easily be shown to be a superset of the scope of its output polynomial quq_{u} (i.e. yquy_{q_{u}}), but it will not be equal to yquy_{q_{u}} in general.

A central concept in our analysis of D&C SPNs will be that of multilinearity, which is closely related to the decomposability condition.

Definition 6 (Multilinear Polynomial) A polynomial qq in yy is multilinear if the degree of each element of yy is at most one in each monomial in qq. For example, y1+y2y3y_{1}+y_{2}y_{3} is a multilinear polynomial.

Some more interesting examples of multilinear polynomials include the permanent and determinant of a matrix (where we view the entries of the matrix as the variables).

Definition 7 (Multilinear Arithmetic Circuit) If every node of an arithmetic circuit Φ\Phi over yy computes a multilinear polynomial in yy, Φ\Phi is said to be a (semantically) multilinear arithmetic circuit. And if for every product node in Φ\Phi, the scopes of its child nodes are pair-wise disjoint, Φ\Phi is said to be a syntactically multilinear arithmetic circuit.

It is easy to show that a syntactically multilinear arithmetic circuit is also a semantically multilinear circuit. However, it is an open question as to whether one can convert a semantically multilinear arithmetic circuit into a syntactically multilinear one without increasing its size by a super-polynomial factor Raz et al. (2008). In the case of formulas however, given a semantically multilinear formula of size ss one can transform it into an equivalent syntactically multilinear formula of size at most ss Raz (2004).

It should be obvious by this point that there is an important connection between syntactic multilinearity and decomposability. In particular, if our univariate functions of the xix_{i}’s are all identity functions, then scope and dependency-scope become equivalent, and thus so do syntactic multilinearity and decomposability.

Given this observation we have that a monotone syntactically multilinear arithmetic circuit over xx can be viewed as a decomposable SPN.

A somewhat less obvious fact (which will be very useful later) is that any decomposable SPN over 0/1-valued xix_{i}’s can be viewed as a syntactically multilinear arithmetic circuit over xx, of a similar size and depth. To see this, note that any arbitrary univariate function gg of a 0/1-valued variable zz can always be written as an affine function of zz, i.e. of the form az+baz+b with a=g(1)−g(0)a=g(1)-g(0) and b=g(0)b=g(0). Thus we can replace each node computing a univariate function of some xix_{i} with a subcircuit computing this affine function, and this yields a (non-monotone) syntactically multilinear arithmetic circuit over xx, with a single additional layer of sum nodes (of size O(n)\mathcal{O}(n)).

An extension of the concept of multilinearity is that of set-multilinearity (e.g. Shpilka and Yehudayoff, 2010). To define set-multilinearity we must first define some additional notation which we will carry through the rest of the paper.

Let G1,G2,G3,...,GkG_{1},G_{2},G_{3},...,G_{k} be a partitioning of the elements of yy into disjoint sets. The set-scope GqG_{q} of a polynomial qq is the sub-collection of the collection {G1,...,Gk}\{G_{1},...,G_{k}\} defined as consisting of those sets GiG_{i} which have some element in common with the scope yqy_{q} of qq. i.e. Gq={Gi:yq∩Gi≠∅}G_{q}=\{G_{i}:y_{q}\cap G_{i}\neq\varnothing\}. Similarly, the set-scope GuG_{u} of a node uu in an arithmetic circuit Φ\Phi is the sub-collection of the collection {G1,...,Gk}\{G_{1},...,G_{k}\} defined as consisting of those sets GiG_{i} which have some element in common with the scope of uu. i.e. Gu={Gi:yu∩Gi≠∅}G_{u}=\{G_{i}:y_{u}\cap G_{i}\neq\varnothing\}.

Definition 8 (Set-multilinear polynomial) A polynomial is set-multilinear if each of its monomials has exactly one factor from each of the GiG_{i}’s in its set-scope.

For example, 3y1y3−y2y43y_{1}y_{3}-y_{2}y_{4} is a set-multilinear polynomial when G1={y1,y2},G2={y3,y4}G_{1}=\{y_{1},y_{2}\},G_{2}=\{y_{3},y_{4}\}, while y1y2+2y2y4y_{1}y_{2}+2y_{2}y_{4} is not. The permanent and determinant of a matrix also turn out to be non-trivial examples of set-multilinear polynomials, if we define the collection of sets so that GiG_{i} consists of the entries in the ithi^{th} row of the matrix.

Definition 9 (Set-multilinear arithmetic circuits) An arithmetic circuit is called (semantically) set-multilinear if each of its nodes computes a set-multilinear polynomial. An arithmetic circuit Φ\Phi is called syntactically set-multilinear if it satisfies the following two properties:

for each product node uu in Φ\Phi, the set-scopes of the children of uu are pairwise disjoint

for each sum node uu, the set-scopes of the children of uu are all the same.

A crucial observation is that the concepts of set-multilineary in arithmetic circuits and decomposability and completeness in SPNs are even more closely related than syntactic multilinearity is to decomposability. In particular, it is not hard to see that if we take k=nk=n, y=fy=f and Gi=fiG_{i}=f_{i}, then set-scope (of nodes) and dependency-scope become analogous concepts, and D&C SPNs correspond precisely to monotone syntactically set-multilinear arithmetic circuits in ff. Because of the usefulness of this connection, we will use the above identifcations for the remainder of this paper whenever we discuss set-multilinearity in the specific context of SPNs.

This connection also motivates a natural definition for the dependency-scope for polynomials over ff. In particular, the dependency-scope of the polynomial qq over ff will be defined as the set of variables on which the members of qq’s scope fuf_{u} depend. We will denote the dependency-scope by xqx_{q}.

Analysis of Validity, Decomposability and Completeness

In this section we give a novel analysis of the relationship between validity, decomposability and completeness, making use of many of the concepts from circuit theory reviewed in the previous section.

First, we will give a quick result which shows that an incomplete SPN can always be efficiently transformed into a complete one which computes the same function of xx. Note that this is not a paradoxical result, as the new SPN will behave differently than the original one when used to evaluate integrals (in the sense of definition of valid SPNs in Section 2).

Given an SPN Φ\Phi of size ss there exists a complete SPN Φ′\Phi^{\prime} of size s+n+k∈O(s2)s+n+k\in\mathcal{O}(s^{2}), and an expanded set/tuple of univariate functions f′f^{\prime} s.t. qΦ′(f′(x))=qΦ(f(x))q_{\Phi^{\prime}}(f^{\prime}(x))=q_{\Phi}(f(x)) for all values of xx, where kk is the sum over the fan-in’s of the sum nodes of Φ\Phi. Moreover, Φ′\Phi^{\prime} is decomposable if Φ\Phi is.

So in some sense we can always get completeness “for free”, and of the two properties, decomposability will be the one which actually constrains SPNs in a way that affects their expressive efficiency.

Unlike with decomposability and completeness, validity depends on the particular definitions of univariate functions making up ff, and thus cannot be described in purely structural terms like set-multilinearity. This leads us to propose a slightly stronger condition which we call strong validity, which is independent of the particular choice of univariate functions making up ff.

Definition 11 An SPN Φ\Phi is said to be strongly valid if it is valid for every possible choice of the univiariate functions making up ff. Note: only the values computed by each fi,jf_{i,j} are allowed to vary here, not the identities of the dependent variables.

The following theorem establishes the fundamental connection between set-multilinearity and strong validity.

Suppose the elements of xx are all non-trivial variables (as defined below). Then an SPN Φ\Phi is strongly valid if and only if its output polynomial is set-multilinear.

A variable xix_{i} is non-trivial if there are at least two disjoint subsets of xix_{i}’s range RiR_{i} which have finite and non-zero measure under MiM_{i}.

Non-triviality is a very mild condition. In the discrete case, it is equivalent to requiring that there is more than one element of the range set RiR_{i} which has mass under the associated measure. Trivial variables can essentially be thought of as “constants in disguise”, and we can easily just replace them with constant nodes without affecting the input-output behavior of the circuit.

It is worth noting that the non-triviality hypothesis is a necessary one for the forward direction of Theorem 12 (although not the reverse direction). To see this, consider for example the SPN Φ\Phi which computes f1,1(x1)2f2,1(x2)f_{1,1}(x_{1})^{2}f_{2,1}(x_{2}) in the obvious way, where R1={1}R_{1}=\{1\} and R2={0,1}R_{2}=\{0,1\}, and the MiM_{i} are the standard counting measures. While Φ\Phi’s output polynomial qΦq_{\Phi} is not set-multilinear by inspection, it is relatively easy to show that Φ\Phi is indeed strongly valid, as it is basically equivalent to cf2,1(x2)cf_{2,1}(x_{2}) for a constant cc.

While Theorem 12 is interesting by itself as it provides a complete characterization of strong validity in terms of purely algebraic properties of an SPN’s output polynomial, its main application in this paper will be to help prove the equivalence of strong validity with the decomposability and completeness conditions.

Note that such an equivalence does not hold for standard validity, as was first demonstrated by Poon and Domingos (2011). To see this, consider the SPN which computes the expression (f1,1(x1)f1,2(x1)+1)f2,1(x2)(f_{1,1}(x_{1})f_{1,2}(x_{1})+1)f_{2,1}(x_{2}) in the obvious way, where the xix_{i} are 0/1-valued, the MiM_{i} are the standard counting measures, and f1,1(x1)=x1f_{1,1}(x_{1})=x_{1}, f1,2(x1)=x1‾=1−x1f_{1,2}(x_{1})=\overline{x_{1}}=1-x_{1}, and f2,1(x2)=x2f_{2,1}(x_{2})=x_{2}. Clearly this SPN is neither decomposable nor complete, and yet an exhaustive case analysis shows that it is valid for these particular choices of the fi,jf_{i,j}’s.

Before we can prove the equivalence of strong validity with the decomposability and completeness conditions, we need to introduce another mild hypothesis which we call “non-degeneracy”.

Definition 13 A monotone arithmetic circuit (such as an SPN) is called non-degenerate if all of its weights and constants are non-zero (i.e. strictly positive).

Like non-triviality, non-degeneracy is a very mild condition to impose, since weights which are zero don’t actually “affect” the output. Moreover, there is a simple and size-preserving procedure which can transform a degenerate monotone arithmetic circuit to a non-degenerate one which computes precisely the same output polynomial, and also preserves structural properties like decomposability and completeness in SPNs. The procedure is as follows. First we remove all edges with weight . Then we repeatedly remove any nodes with fan-out 0 (except for the original output node) or fan-in 0 (except input node and constant nodes), making sure to remove any product node which is a parent of a node we remove. It is not hard to see that deletion of a node by this procedure is a proof that it computes the zero-polynomial and thus doesn’t affect the final output.

Without non-degeneracy, the equivalence between strong validity and the decomposability and completeness conditions does not hold for SPNs, as can be seen by considering the SPN Φ\Phi which computes the expression 0f1,1(x1)2+f1,1(x1)f2,1(x2)0f_{1,1}(x_{1})^{2}+f_{1,1}(x_{1})f_{2,1}(x_{2}) in the obvious way, where the xix_{i} are 0/1-valued and the MiM_{i} are the standard counting measures, and the fi,jf_{i,j}’s are the identity function (i.e. fi,j(xi)=xif_{i,j}(x_{i})=x_{i}). Because the output polynomial qΦq_{\Phi} of Φ\Phi is equivalent to f1,1(x1)f2,1(x2)f_{1,1}(x_{1})f_{2,1}(x_{2}), it is indeed valid. However, the product node within Φ\Phi which computes f1,1(x1)2f_{1,1}(x_{1})^{2} violates the decomposability condition, even though this computation is never actually “used” in the final output (due to how it is weighted by 0).

Non-degeneracy allows us to prove many convenient properties, which are given in the lemma below.

Suppose Φ\Phi is a non-degenerate monotone arithmetic circuit. Denote by rr the root of Φ\Phi, and {ui}i\{u_{i}\}_{i} its child nodes.

Each of the Φui\Phi_{u_{i}}’s are non-degenerate monotone arithmetic circuits.

If rr is a product node, the set of monomials in qrq_{r} is equal to the set consisting of every possible product formed by taking one monomial from each of the quiq_{u_{i}}’s. NOTE: This is true even for degenerate circuits.

If rr is a sum node, the set of monomials in qrq_{r} is equal to the union over the sets of monomials in the quiq_{u_{i}}’s.

The set-scope of rr is equal to the set-scope of qrq_{r}.

We are now in a position to prove the following theorem.

A non-degenerate monotone arithmetic circuit Φ\Phi has a set-multilinear output polynomial if and only if it is syntactically set-multilinear.

Given this theorem, and utilizing the previously discussed connection between syntactic set-multilinearity and the decomposability and completeness conditions, the following corollary is immediate:

A non-degenerate SPN Φ\Phi has a set-multilinear output polynomial if and only if it is decomposable and complete.

And from this and Theorem 12, we have a 3-way equivalence between strong validity, the decomposability and completeness conditions, and the set-multilinearity of the output polynomial. This is stated as the following theorem.

Suppose Φ\Phi is a non-degenerate SPN whose input variables (the elements of xx) are all non-trivial. Then the following 3 conditions are equivalent:

Φ\Phi’s output polynomial is set-multilinear

Because SPNs can always be efficiently transformed so that the non-degeneracy and non-triviality hypotheses are both satisfied (as discussed above), this equivalence between strong validity and the D&C conditions makes the former easy to verify (since the D&C conditions themselves are).

However, as we will see in later sections, decomposability and completeness are restrictive conditions that limit the expressive power of SPNs in a fundamental way. And so a worthwhile question to ask is whether a set of efficiently testable criteria exist for verifying standard/weak validity.

We will shed some light on this question by proving a result which shows that a criterion cannot be both efficiently testable and capture all valid SPNs, provided that P≠NPP\neq NP. A caveat to this result is that we can only prove it for a slightly extended definition of SPNs where negative weights and constants are permitted.

Define an extended SPN as one which is allowed to have negative weights and constants. The problem of deciding whether a given extended SPN is valid is co-NP-hard.

We leave it as an open question as to whether a similar co-NP-hardness property holds for validity checking of standard SPNs.

Focusing on D&C SPNs

One of the main goals of this paper is to advance the understanding of the expressive efficiency of SPNs. In this section we explore possible directions we can take towards this goal, and ultimately propose to focus exclusively on D&C SPNs.

It is well known that standard arithmetic circuits can efficiently simulate Boolean logic circuits with only a constant factor overhead. Thus they are as efficient at computing a given function as any standard model of computation, up to a polynomial factor. However, we cannot easily exploit this fact to study SPNs, as this simulation requires negative weights, and the weights of an SPN are constrained to be non-negative (i.e. they are monotone arithmetic circuits). And while SPNs have access to non-negative valued univariate functions of the input which standard monotone arithmetic circuits do not, this fact cannot obviously be used to construct a simulation of Boolean logic circuits.

Another possible way to gain insight into general SPNs would be to apply existing results for monotone arithmetic circuits. However, a direct application of such results is impossible, as SPNs are monotone arithmetic circuits over ff and not xx, and indeed their univariate functions can compute various non-negative functions of xx (such as 1−xi1-x_{i} for values of xix_{i} in {0,1}\{0,1\}) which a monotone circuit could not.

But while it seems that the existing circuit theory literature doesn’t offer much insight into general SPNs, there are many interesting results available for multilinear and set-multilinear arithmetic circuits. And as we saw in Section 3, these are closely related to D&C SPNs.

Moreover, it makes sense to study D&C SPNs, as they are arguably the most interesting class of SPNs, both from a theoretical and practical perspective. Indeed, the main reason why SPNs are interesting and useful in the first place is that valid SPNs avoid the intractability problems that plague conventional deep models like Deep Boltzmann Machines. Meanwhile the D&C conditions are the only efficiently testable conditions for ensuring validity that we are aware of, and as we showed in Section 3, they are also necessary conditions for a slightly strengthened notion of validity.

Thus, D&C SPNs will be our focus for the rest of the paper.

Capabilities of D&C SPNs

Intuitively, D&C SPNs seem very limited compared to general arithmetic circuits. In addition to being restricted to use non-negative weights and constants like general SPNs, decomposability heavily restricts the kinds of structure the networks can have, and hence the kinds of computations they can perform. For example, something as simple as squaring the number computed by some node uu becomes impossible.

In order to address the theoretical question of what kinds of functions D&C SPNs can compute efficiently, despite their apparent limitations, we will construct explicit D&C SPNs that efficiently compute various example functions.

This is difficult to do directly because the decomposability condition prevents us from using the basic computational operations we are accustomed to working with when designing algorithms or writing down formulae. To overcome this difficulty we will provide a couple of related examples of computational systems which we will show can be efficiently simulated by SPNs. These systems will be closer to more traditional models of computation like state-space machines, so that our existing intuitions about algorithm design will be more directly applicable to them.

The first such system we will call a Fixed-Permutation Linear Model (FPLM), which works as follows. We start by initializing a “working vector” vv with a value aa, and then we process the input (the xix_{i}’s) in sequence, according to a fixed order given by a permutation π\pi of [n][n]. At each stage we multiply vv by a matrix which is determined by the value of the current xix_{i}. After seeing the whole input, we then take the inner product of vv with another vector bb, which gives us our real-valued output.

More formally, we can define FPLMs as follows.

An FPLM can be viewed as a computational system which must process its input in a fixed order and maintains its memory/state as a kk-dimensional vector. Crucially, an FPLM cannot revisit inputs that it has already processed, which is a similar limitation to the one faced by read-once Turing Machines. The state vector can be transformed at each stage by a linear transformation which is a function of the current input. While its kk-dimensional state vector allows an FPLM to use powerful distributed representations which clearly possess enough information capacity to memorize the input seen so far, the fundamental limitation of FPLMs lies in their limited tools for manipulating this representation. In particular, they can only use linear transformations (given by matrices with positive entries). If they had access to arbitrary transformations of their state then it is not hard to see that any function could be efficiently computed by them.

The following result establishes that D&C SPNs can efficiently simulate FPLMs.

Given a FPLM of dimension kk there exists a D&C SPN of size O(nk2)\mathcal{O}(nk^{2}) which computes the same function.

Thus D&C SPNs are at least as expressively efficient as FPLMs. This suggests the following question: are they strictly more expressively efficient than FPLMs, or are they equivalent? It turns out that they are more expressively efficient. We sketch a proof of this fact below.

Suppose that xx takes values in {0,1}n\{0,1\}^{n}. As observed in Section 2.6, this allows us to assume without loss of generality that any univariate function of one of the xix_{i}’s is affine in xix_{i}. In particular, we can assume that the matrix-valued functions TiT_{i} used in FPLMs are affine functions of the respective xix_{i}’s. In this setting it turns out that FPLMs can be viewed as a special case of a computational system called “ordered syntactically multilinear branching programs”, as they are defined by Jansen (2008). Jansen (2008) showed that there exists a polynomial function in xx whose computation by such a system requires exponential size (corresponding to an FPLM with an exponentially large dimension kk). Moreover, this function is computable by a polynomially sized monotone syntactically multilinear arithmetic. As observed in Section 2.6, such a circuit can be viewed as a decomposable SPN whose univariate functions are just identity functions. Then using Proposition 10 we can convert such a decomposable SPN to a D&C SPN while only squaring its size. So the polynomial provided by Jansen (2008) is indeed computed by a D&C SPN of polynomial size, while requiring exponential size to be computed by a FPLM, thus proving that D&C SPNs are indeed more expressively efficient.

Given this result, we see that FPLMs do not fully characterize the capabilities of D&C SPNs. Nevertheless, if we can construct an FPLM which computes some function efficiently, this constitutes proof of existence of a similarly efficient D&C SPN for computing said function.

To make the construction of such FPLMs simpler, we will define a third computational system which we call a Fixed-Permutation State-Space Model (FPSSM) which is even easier to understand than FPLMs, and then show that FPLMs (and hence also D&C SPNs) can efficiently simulate FPSSMs.

An FPSSM works as follows. We initialize our “working state” uu as cc, and then we process the input (the xix_{i}’s) in sequence, according to a fixed order given by the permutation π\pi of [n][n]. At each stage we transform uu by computing gπ(i)(xπ(i),u)g_{\pi(i)}(x_{\pi(i)},u), where the transition function gπ(i)g_{\pi(i)} can be defined arbitrarily. After seeing the whole input, we then decode the state uu as the non-negative real number h(u)h(u).

More formally we have the following definition.

FPSSMs can be seen as general state-space machines (of state size kk), which like FPLMs, are subject to the restriction that they must process their inputs in a fixed order which is determined ahead of time, and are not allowed to revisit past inputs. If the state-space is large enough to be able to memorize every input seen so far, it is clear that FPSSMs can compute any function, given that their state-transition function can be arbitrary. But this would require their state-size constant kk to grow exponentially in nn, as one needs a state size of 2b2^{b} in order to memorize bb input bits. FPSSMs of realistic sizes can only memorize a number of bits which is logarithmic in nn. And this, combined with their inability to revisit past inputs, clearly limits their ability to compute certain functions efficiently. This is to be contrasted with FPLMs, whose combinatorial/distributed state have a high information capacity even for small FPLMs, but are limited instead in how they can manipulate this state.

The following result establishes that FPLMs can efficiently simulate FPSSMs.

Given a FPSSM of state-size kk there exists a FPLM of dimension kk which computes the same function.

Note that this result also implies that FPSSMs are no more expressively efficient than FPLMs, and are thus strictly less expressively efficient than D&C SPNs.

The following Corollary follows directly from Propositions 20 and 22:

Given a FPSSM of state-size kk there exists a D&C SPN of size O(nk2)\mathcal{O}(nk^{2}) which computes the same function.

Unlike with D&C SPNs, our intuitions about algorithm design readily apply to FPSSMs, making it easy to directly construct FPSSMs which implement algorithmic solutions to particular problems. For example, suppose we wish to compute the number of inputs whose value is equal to 1. We can solve this with an FPSSM with a state size of k=nk=n by taking π\pi to be the identity permutation, and the state uu to be the number of 1’s seen so far, which we increment whenever the current xix_{i} has value 1. We can similarly compute the parity of the number of ones (which is a well known and theoretically important function often referred to simply as “PARITY”) by storing the current number of them modulo 2, which only requires the state size kk to be 11. We can also decide if the majority of the xix_{i}’s are 1 (which is a well known function and theoretically important often referred to as “MAJORITY” or “MAJ”) by storing a count of the number of ones (which requires a state size of k=nk=n), and then outputting 11 if s≥n/2s\geq n/2 and otherwise.

It is noteworthy that the simulations of various models given in this section each require an D&C SPN of depth nn. However, as we will see in Section 7.2, the depth of any D&C SPN can be reduced to O(log(n)2)\mathcal{O}(log(n)^{2}), while only increasing its size polynomially.

Separating Depth 3 From Higher Depths

The only prior work on the expressive efficiency of SPNs which we are aware of is that of Delalleau and Bengio (2011). In that work, the authors give a pair of results which demonstrate a difference in expressive efficiency between D&C SPNs of depth 3, and those of higher depths.

Their first result establishes the existence of an nn-dimensional function gg (for each nn) which can be computed by a D&C SPN of size O(n)\mathcal{O}(n) and depth O(log⁡(n))\mathcal{O}(\log(n)), but which requires size Ω(2n)\Omega(2^{\sqrt{n}}) to be computed by a D&C SPN of depthNote that in our presentation the input layer counts as the first layer and contributes to the total depth. 3.

In their second result they show that for each d≥4d\geq 4 there is an nn-dimensional function hdh_{d} which can be computed by a D&C SPN of size O(dn)\mathcal{O}(dn) and depth dd, but which requires size Ω(nd)\Omega(n^{d}) to be computed by a D&C SPN of depth 3.

It is important to note that these results do not establish a separation in expressive efficiency between D&C SPNs of any two depths both larger than 3 (e.g. between depths 4 and 5). So in particular, despite how the size lower bound increases with dd in their second resultAs shown by our Theorem 29, there is a much stronger separation between depths 3 and 4 than is proved by Delalleau and Bengio (2011) to exist between depths 33 and dd for any d≥4d\geq 4, and thus this apparent increase in the size of their lower bound isn’t due to the increasing power of D&C SPNs with depth so much as it an artifact of their particular proof techniques. this does not imply that the set of efficiently computable functions is larger for D&C SPNs of depth d+kd+k than for those of depth dd, for any k>0k>0, except when d≤3d\leq 3. This is to be contrasted with our much stronger “depth hierarchy” result (Theorem 29 of Section 7.1) which shows that D&C SPNs do in fact have this property (even with k=1k=1) for all choices of dd, where depth is measured in terms of product-depth.

In the next subsection we will show how basic circuit theoretic techniques can be used to give a short proof of a result which is stronger than both of the separation results of Delalleau and Bengio (2011), using example functions which are natural and simple to understand. Beyond providing a simplified proof of existing results, this will also serve as a demonstration of some of the techniques underlying the more advanced results from circuit theory which we will later make use of in Sections 7.1 and 8.

Moreover, by employing these more general and powerful proof techniques, we are able to prove a stronger result which seperates functions that can be efficiently approximated by D&C SPNs of depth 3 from those which can be computed by D&C SPNs of depth 4 and higher. This addresses the open question posed by Delalleau and Bengio (2011).

We begin by defining some basic concepts and notation which are standard in circuit theory.

For an arbitrary function gg of xx, and a partition (A,B)(A,B) of the set [n][n] of indices of the elements of xx, define MgA,BM^{A,B}_{g} to be the 2∣A∣2^{|A|} by 2∣B∣2^{|B|} matrix of values that gg takes for different values of xx, where the rows of MgA,BM^{A,B}_{g} are indexed by possible values of xAx_{A}, and the columns of MgA,BM^{A,B}_{g} are indexed by possible values of xBx_{B}.

MgA,BM^{A,B}_{g} is called a “communication matrix” in the context of communication complexity, and appears frequently as a tool to prove lower bounds. Its usefulness in lower bounding the size of D&C SPNs of depth 33 is established by the following theorem.

Suppose Φ\Phi is a D&C SPN of depth 3 with kk nodes in its second layer. For any partition (A,B)(A,B) of [n][n] we have k≥rank⁡(MqΦ(f(x))A,B)k\geq\operatorname{rank}\left(M^{A,B}_{q_{\Phi}(f(x))}\right).

Note that the proof of this theorem doesn’t use the non-negativity of the weights of the SPN, and thus applies to the “extended” version of SPNs discussed in Section 3.

We will now define the separating function which we will use to separate the expressive efficiency of depth 3 and 4 D&C SPNs.

Define H1={1,2,...,n/2}H_{1}=\{1,2,...,n/2\} and H2={n/2+1,n/2+2,...,n}H_{2}=\{n/2+1,n/2+2,...,n\}. We will define the function EQUAL⁡\operatorname{EQUAL} for {0,1}n\{0,1\}^{n}-valued xx to be 11 when xH1=xH2x_{H_{1}}=x_{H_{2}} (i.e. the first half of the input is equal to the second half) and otherwise.

Observe that MEQUAL⁡H1,H2=IM^{H_{1},H_{2}}_{\operatorname{EQUAL}}=I and so this matrix has rank 2n/22^{n/2}. This gives the following simple corollary of the above theorem:

Any D&C SPN of depth 3 with computes EQUAL⁡(x)\operatorname{EQUAL}(x) must have at least 2n/22^{n/2} nodes in its second layer.

Meanwhile, EQUAL⁡(x)\operatorname{EQUAL}(x) is easily shown to be efficiently computed by a D&C SPN of depth 4. This is stated as the following proposition.

EQUAL⁡\operatorname{EQUAL} can be computed by an D&C SPN of size O(n)O(n) and depth 4.

Note that the combination of Corollary 25 and Proposition 26 gives a stronger separation result than both of the aforementioned results of Delalleau and Bengio (2011). Our result also has the advantage of using an example function which is easy to interpret, and can be easily extended to prove separation results for other functions which have a high rank communication matrix.

2 Separations for approximate computation

An open question posed by Delalleau and Bengio (2011) asked whether a separation in expressive efficiency exists between D&C SPNs of depth 3 and 4 if the former are only required to compute an approximation to the desired function. In this section we answer this question in the affirmative by making use of Theorem 24 and an additional technical result which lower bounds the rank of the perturbed versions of the identity matrix.

Suppose Φ\Phi is a D&C SPN of depth 3 whose associated distribution is such that each value of xx with EQUAL⁡(x)=1\operatorname{EQUAL}(x)=1 has an associated probability between a/2a/2 and aa for some a>0a>0 (so that all such values of xx have roughly equal probability), and that the total probability δ\delta of all of the values of xx satisfying EQUAL⁡(x)=0\operatorname{EQUAL}(x)=0 obeys δ≤1/4\delta\leq 1/4 (so that the probability of drawing a sample with EQUAL⁡(x)=0\operatorname{EQUAL}(x)=0 is ≤1/4\leq 1/4). Then Φ\Phi must have at least 2n/2−2/32^{n/2-2}/3 nodes in its second layer.

To prove this result using Theorem 24 we will make use of the following lemma which lower bounds the rank of matrices of the form I+D=MEQUAL⁡H1,H2+DI+D=M^{H_{1},H_{2}}_{\operatorname{EQUAL}}+D for some “perturbation matrix” DD, in terms of a measure of the total size of the entries of DD.

Depth Analysis

In this section we show that D&C SPNs become more expressively efficient as their product-depthProduct-depth is defined in Section 2.1. Note that it can be shown to be equivalent to standard depth up to a factor of 2 (e.g. by ‘merging’ sum nodes that are connected as parent/child). dd increases, in the sense that the set of efficiently computable density functions expands as dd grows. This is stated formally as follows:

For every integer d≥1d\geq 1 and input size nn there exists a real-valued function gd+1g_{d+1} of xx such that:

There is a D&C SPN of product-depth d+1d+1 and size O(n2)\mathcal{O}(n^{2}) which computes gd+1g_{d+1} for all values of xx in {0,1}n\{0,1\}^{n}, where the SPN’s univariate functions ff consist only of identity functions.

For any choice of the univariate functions ff, a D&C SPN of product-depth dd that computes gd+1g_{d+1} for all values of xx in {0,1}n\{0,1\}^{n} must be of size nΩ(log⁡(n)1/2d)n^{\Omega(\log(n)^{1/2d})} (which is super-polynomial in nn).

Previously, the only available result on the relationship of depth and expressive efficiency of D&C SPNs has been that of Delalleau and Bengio (2011), who showed that D&C SPNs of depth 3 are less expressively efficient than D&C SPNs of depth 4.

An anologous result seperating very shallow networks from deeper ones also exists for neural networks. In particular, it is known that under various realistic constraints on their weights, threshold-based neural networks with one hidden layer (not counting the output layer) are less expressively efficient those with 2 or more hidden layers (Hajnal et al., 1993; Forster, 2002).

More recently, Martens et al. (2013) showed that Restricted Boltzmann Machines are incapable of efficiently capturing certain simple distributions, which by the results of Martens (2014), can be efficiently captured by Deep Boltzmann Machines.

A “depth-hierarchy” property analogous to Theorem 29 is believed to hold for various other deep models like neural networks, Deep Boltzmann Machines (Salakhutdinov and Hinton, 2009), and Sigmoid Belief Networks (Neal, 1992), but has never been proven to hold for any of them. Thus, to the best of our knowledge, Theorem 29 represents the first time that a practical and non-trivial deep model has been rigorously shown to gain expressive efficiency with each additional layer of depth added.

To prove Theorem 29, we will make use of the following analogous result which is a slight modification of one proved by Raz and Yehudayoff (2009) in the context of multilinear circuits.

(Adapted from Theorem 1.2 of Raz and Yehudayoff (2009)) For every integer d≥1d\geq 1 and input size nn there exists a real-valued function gd+1g_{d+1} of xx such that:

Note that the original Theorem 1.2 from Raz and Yehudayoff (2009) uses a slightly different definition of arithmetic circuits from ours (they do not permit weighted connections), and the constructed circuits are not stated to be monotone. However we have confirmed with the authors that their result still holds even with our definition, and the circuits constructed in their proof are indeed monotone (Raz, 2014).

There are several issues which must be overcome before we can use Theorem 30 to prove Theorem 29. The most serious one is that syntactically multilinear arithmetic circuits are not equivalent to D&C SPNs as either type of circuit has capabilities that the other does not. Thus the ability or inability of syntactically multilinear arithmetic circuits to compute certain functions does not immediately imply the same thing for D&C SPNs.

To address this issue, we will consider the case where xx is binary-valued (i.e. takes values in {0,1}n\{0,1\}^{n}) so that we may exploit the close relationship which exists between syntactically multilinear arithmetic circuits and decomposable SPNs over binary-valued inputs xx (as discussed in Section 2.6).

With these observations in place the proof of Theorem 29 from Theorem 30 becomes straightforward (and is given in the appendix).

2 The limits of depth

Next, we give a result which shows that the depth of any polynomially sized D&C SPN can be essentially compressed down to O(log⁡(n)2)\mathcal{O}(\log(n)^{2}), at the cost of only a polynomial increase in its total size. Thus, beyond this sublinear threshold, adding depth to a D&C SPN does not increase the set of functions which can be computed efficiently (where we use this term liberally to mean “with polynomial size”). Note that this does not contradict Theorem 29 from the previous subsection as that dealt with the case where the depth dd is a fixed constant and not allowed to grow with nn.

Because this depth-reducing transformation doesn’t explicitly preserve monotonicity, and deals with multilinear circuits instead of set-multilinear circuits, while using a slightly different definition of arithmetic circuits, it cannot be directly applied to prove an analogous statement for D&C SPNs. However, it turns out that the proof contained in Raz and Yehudayoff (2008) does in fact support a result which doesn’t have these issues (Raz, 2014). We state this as the following theorem.

Note that the size of the constructed circuit is smaller here than in Theorem 3.1 of Raz and Yehudayoff (2008) because we can avoid the “homogenization” step required in the original proof, as syntactically set-multilinear arithmetic circuits automatically have this property.

Given this theorem and the equivalence between monotone syntactically set-multilinear arithmetic circuits and D&C SPNs which was discussed near the end of Section 2.6, the following corollary is immediate.

Given a D&C SPN of size ss and arbitrary depth there exists a D&C SPN of size O(s3)\mathcal{O}(s^{3}) and depth O(log⁡(n)log⁡(s))\mathcal{O}(\log(n)\log(s)) which computes the same function.

Note that when the size ss is a polynomial function of nn, this depth bound is stated more simply as O(log⁡(n)2)\mathcal{O}(\log(n)^{2}).

Circuits vs Formulas

In Gens and Domingos (2013) the authors gave a learning algorithm for SPNs which produced D&C SPN formulas. Recall that formulas are distinguished from more general circuits in that each node has fan-out at most 1. They are called “formulas” because they can be written down directly as formula expressions without the need to define temporary variables.

It is worthwhile asking whether this kind of structural restriction limits the expressive efficiency of D&C SPNs.

As we show in this section, the answer turns out to be yes, and indeed D&C SPN formulas are strictly less expressively efficient than more general D&C SPNs. This is stated formally as the following theorem:

For every input size nn there exists a real-valued function gg of xx such that:

There is a D&C SPN of size O(n4/3)\mathcal{O}(n^{4/3}) which computes gg, where the SPN’s univariate functions ff consist only of identity functions.

For any choice of the univariate functions ff, a D&C SPN formula that computes gg must be of size nΩ(log⁡(n))n^{\Omega(\log(n))} (which is super-polynomial in nn).

As in Section 7.1, to prove Theorem 34, we will make use of an analogous result which is a slight modification of one proved by Raz and Yehudayoff (2008) in the context of multilinear circuits. This is stated below.

(Adapted from Theorem 4.4 of Raz and Yehudayoff (2008)) For every input size nn there exists a real-valued function gg of xx such that:

As in Section 7.1, the original Theorem 4.4 from Raz and Yehudayoff (2008) uses a slightly different definition of arithmetic circuits from ours (they do not permit weighted connections), and the constructed circuits are not stated to be monotone. However we have confirmed with the authors that their result still holds even with our definition, and the circuits constructed in their proof are indeed monotone (Raz, 2014).

When trying to use Theorem 35 to prove Theorem 34, we encounter similar obstacles to those encountered in Section 7.1. Fortunately, the transformation between decomposable SPNs and multilinear arithmetic circuits (for the case of binary-valued inputs) happens to preserve formula structure. Thus the ideas discussed in Section 7.1 for overcoming these obstacles also apply here.

A Tractable Distribution Separating D&C SPNs and Other Deep Models

The existence of a D&C SPN of size ss for computing some density function (possibly unnormalized) implies that the corresponding marginal densities can be computed by an O(s)\mathcal{O}(s) time algorithm. Thus, it follows that D&C SPNs cannot efficiently compute densities whose marginals are known to be intractable. And if we assume the widely believed complexity theoretic conjecture that P≠#PP\neq\#P, such examples are plentiful.

However, it is debatable whether this should be considered a major drawback of D&C SPNs, since distributions with intractable marginals are unlikely to be learnable using any model. Thus we are left with an important question: can D&C SPNs efficiently compute any density with tractable marginals?

In Poon and Domingos (2011) it was observed that essentially every known model with tractable marginal densities can be viewed as a D&C SPN, and it was speculated that the answer to this question is yes.

In this section we refute this speculation by giving a counter example. In particular, we construct a simple distribution D\mathcal{D} whose density function and corresponding marginals can be evaluated by efficient algorithms, but which provably cannot be computed by a sub-exponentially sized D&C SPN of any depth. Notably, this density function can be computed by a Boolean circuit of modest depth and size, and so by the simulation results of (Martens, 2014) the distribution can in fact be captured efficiently by various other deep probabilistic models like Deep Boltzmann Machines (DBMs).

Notably, our proof of the lower bound on the size of D&C SPNs computing this density function will not use any unproven complexity theoretic conjectures, such as P≠#PP\neq\#P.

It is worthwhile considering whether there might be distributions which can be efficiently modeled by D&C SPNs but not by other deep generative models like DBMs or Contrastive Backprop Networks (Hinton et al., 2004). The answer to this question turns out to be no.

To see this, note that arithmetic circuits can be efficiently approximated by Boolean circuits, and even more efficiently approximated by linear threshold networks (which are a simple type of neural network). Thus, by the simulations results of Martens (2014) the aforementioned deep models can efficiently simulate D&C SPNs of similar depths (up to a reasonable approximation factor). Here “efficiently” means “with a polynomial increase in size”, although in practice this polynomial can be of low order, depending on how exactly one decides to simulate the required arithmetic. For linear threshold networks (and hence also Contrastive Back-prop Nets), very efficient simulations of arithmetic circuits can be performed using the results of Reif and Tate (1992), for example.

To construct the promised distribution over values of xx we will view each xix_{i} as an indicator variable for the presence or absence of a particular labeled edge in a subgraph GxG_{x} of KmK_{m}, where KmK_{m} denotes the complete graph on mm vertices. In particular, xix_{i} will take the value 11 if the edge labeled by ii is present in GxG_{x} and otherwise. Note that there are (m2)\binom{m}{2} total edges in KmK_{m} and so the total input size is n=(m2)n=\binom{m}{2}.

The distribution D\mathcal{D} will then be defined simply as the uniform distribution over values of xx satisfying the property that GxG_{x} is a spanning tree of KmK_{m}. We will denote its density function by d(x)d(x).

Computing d(x)d(x) up to a normalizing constantThe normalizing constant in this case is given by Z=mm−2Z=m^{m-2} by Cayley’s Formula. amounts to deciding if the graph GxG_{x} represented by xx is indeed a spanning tree of KmK_{m}, and outputting 11 if it is, and otherwise. And to decide if the graph GxG_{x} is a spanning tree amounts to checking that it is connected, and that it has exactly m−1m-1 edges.

The first problem can be efficiently solved by a Boolean circuit with O(n)\mathcal{O}(n) gates and depth O(log⁡(n))\mathcal{O}(\log(n)) using the well-known trick of repeatedly squaring the adjacency matrix. The second can be solved by adding all of the entries of xx together, which can also be done with a Boolean circuit with O(n)\mathcal{O}(n) gates and depth O(log⁡(n))\mathcal{O}(\log(n)) (Paterson et al., 1990). Due to how neural networks with simple linear threshold nonlinearities can simulate Boolean circuits in a 1-1 manner (e.g Parberry, 1994), it follows that such networks of a similar size and depth can compute d(x)d(x). And since linear threshold gates are easily simulated by a few sigmoid or rectified linear units, it follows that neural networks of the same dimensions equipped with such nonlinearities can also compute d(x)d(x), or at least approximate it arbitrarily well (see Martens (2014) for a review of these basic simulation results).

Moreover, by the results of Martens (2014) we know that any distribution whose density is computable up to a normalization constant by Boolean circuits can be captured, to an arbitrarily small KL divergence, by various deep probabilistic models of similar dimensions. In particular, these results imply that Deep Boltzmann Machines of size O(n)\mathcal{O}(n) and Constrastive Backprop Networks of size O(n)\mathcal{O}(n) and depth O(log⁡(n))\mathcal{O}(\log(n)) can model the distribution D\mathcal{D} to an arbitrary degree of accuracy. And since we can sample (n−2)(n-2)-length Prüfer sequences (Prüfer, 1918) and implement the algorithm for converting these sequences to trees using a threshold network of size O(n2)\mathcal{O}(n^{2}) and depth O(n)\mathcal{O}(n) it follows from Martens (2014) that we can also approximate D\mathcal{D} using Sigmoid Belief Networks (Neal, 1992) of this size and depth.

While the existence of small circuits for computing d(x)d(x) isn’t too surprising, it is a somewhat remarkable fact that it is possible to evaluate any marginal of d(x)d(x) using an O(n1.19)\mathcal{O}(n^{1.19})-time algorithm. That is, given a subset II of {1,...,n}\{1,...,n\}, and associated fixed values of the corresponding variables (i.e. xIx_{I}), we can compute the sum of d(x)d(x) over all possible values of the remaining variables (i.e. x{1,...n}∖Ix_{\{1,...n\}\setminus I}) using an algorithm which runs in time O(n1.19)\mathcal{O}(n^{1.19}).

To construct this algorithm we first observe that the problem of computing these marginal densities reduces to the problem of counting the number of spanning trees consistent with a given setting of xIx_{I} (for a given II). And it turns out that this is a problem we can attack directly by first reducing it to the problem of counting the total number of spanning trees of a certain auxiliary graph derived from xIx_{I}, and then reducing it to the problem of computing determinants of the Laplacian matrix of this auxiliary graph via an application of generalized version of Kirchoff’s famous Matrix Tree Theorem (Tutte, 2001). This argument is formalized in the proof of the following theorem.

There exists a O(n1.19)\mathcal{O}(n^{1.19})-time algorithm, which given as input a set I⊂{1,...,n}I\subset\{1,...,n\} and corresponding fixed values of xIx_{I}, outputs the number of edge-labeled spanning trees TT of KmK_{m} which are consistent with those values.

2 Main lower bound result

The main result of this section is stated as follows:

Suppose that d(x)d(x) can be approximated arbitrarily well by D&C SPNs of size ≤s\leq s and m≥20m\geq 20. Then s≥2m/30240s\geq 2^{m/30240}.

By “approximated arbitrarily well by D&C SPNs of size ≤s\leq s” we mean that there is a sequence of D&C SPNs of size ≤s\leq s whose output approaches d(x)d(x), where the univariate functions ff are allowed to be different for each SPN in the sequence. Observe that d(x)d(x) being computed exactly by a D&C SPN of size ss trivially implies that it can approximated arbitrarily well by D&C SPNs of size ≤s\leq s.

Note that the large constant in the denominator of the exponent can likely be lowered substantially with a tighter analysis than the one we will present. However, for our purposes, we will be content simply to show that the lower bound on ss is exponential in mm (and hence also in n\sqrt{n}).

Our strategy for proving Theorem 37 involves two major steps. In the first we will show that the output polynomial of any D&C SPN of size ss can be “decomposed” into the sum of s2s^{2} “weak” functions. We will then extend this result to show that the same is true of any function which can computed as the limit of the outputs of an infinite sequence of D&C SPNs of size ≤s\leq s. This will be Theorem 39.

In the second step of the proof we will show that in order to express d(x)d(x) as the sum of such “weak” functions, the size kk of the sum must be exponentially large in mm, and thus so must ss. This will follow from the fact (which we will show) that each “weak” function can only be non-zero on a very small fraction of the all the spanning trees of KmK_{m} (to avoid being non-zero for a non-spanning tree graph), and so if a sum of them has the property of being non-zero for all of the spanning trees, then that sum must be very large. This will be Theorem 40.

Theorem 37 will then follow directly from Theorems 39 and 40.

3 Decomposing D&C SPNs

The following theorem shows how the output polynomial of a D&C SPN of size ss can be “decomposed” into a sum of s2s^{2} non-negatives functions which are “weak” in the sense that they factorize over two relatively equal-sized partitions of the set of input variables.

Suppose Φ\Phi is a D&C SPN over ff of size ss. Then we have:

where k≤s2k\leq s^{2}, and where the gig_{i}’s and hih_{i}’s are non-negative polynomials in ff satisfying the conditions:

It should be noted that this result is similar to an existing one proved by Raz and Yehudayoff (2011) for monotone multilinear circuits, although we arrived at it independently.

While Theorem 38 provides a useful characterization of the form of functions which can be computed exactly by a D&C SPN of size ss, it doesn’t say anything about functions which can only be computed approximately. To address this, we will strengthen this result by showing that any function which can be approximated arbitrarily well by D&C SPNs of size ss also has a decomposition which is analogous to the one in Theorem 38. This is stated as follows.

Suppose {Φj}j=1∞\{\Phi_{j}\}_{j=1}^{\infty} is a sequence of D&C SPNs of size at most ss (where the definitions of the univariate functions ff is allowed to be different for each), such that the sequence {qΦk}1∞\{q_{\Phi_{k}}\}_{1}^{\infty} of corresponding output polynomials converges pointwise (considered as functions of xx) to some function γ\gamma of xx. And further suppose that the size of the range of possible values of xx is given by some finite dd. Then we have that γ\gamma can be written as

where k≤s2k\leq s^{2} and ∀i\forall i, gig_{i} and hih_{i} are real-valued non-negative functions of yiy_{i} and ziz_{i} (resp.) where yiy_{i} and ziz_{i} are sub-sets/tuples of the variables in xx satisfying n3≤∣yi∣,∣zi∣≤2n3\frac{n}{3}\leq|y_{i}|,|z_{i}|\leq\frac{2n}{3}, yi∩zi=∅y_{i}\cap z_{i}=\varnothing, yi∪zi=xy_{i}\cup z_{i}=x.

4 A lower bound on k

In this section we will show that if d(x)d(x) is of the same form of γ(x)\gamma(x) from eqn. 2, then the size of the size kk of the sum must grow exponentially with mm (and hence n\sqrt{n}). In particular, we will prove the following theorem.

Suppose d(x)d(x) is of the form from eqn. 2, and m≥20m\geq 20. Then we must have that k≥2m/15120k\geq 2^{m/15120}.

Our strategy to prove this result will be to show that each term in the sum can only be non-zero on an exponentially small fraction of all the spanning trees of KmK_{m} (and is thus “weak”). And since the sum must be non-zero on all the spanning trees in order to give d(x)d(x), it will follow that kk will have to be exponentially large.

We will start with the simple observation that, due to the non-negativity of the gig_{i}’s and hih_{i}’s, each factored term gihig_{i}h_{i} in the sum d=∑i=1kgihid=\sum_{i=1}^{k}g_{i}h_{i} must agree with dd wherever dd is 0 (i.e. because we have d(x)≥gi(yi)hi(zi)d(x)\geq g_{i}(y_{i})h_{i}(z_{i}) for each ii). And in particular, for each value of xx with d(x)=0d(x)=0, either gi(yi)g_{i}(y_{i}) or hi(zi)h_{i}(z_{i}) must be 0.

Intuitively, this is a very stringent requirement. As an analogy, we can think of each factor (gig_{i} or hih_{i}) as “seeing” roughly half the input edges, and voting “yes, I think this is a spanning tree”, or “no, I don’t think this is a spanning tree” by outputting either a value >0>0 for “yes” or for “no”, with tie votes always going “no”. The requirement can thus be stated as: “each pair of factors is never allowed to reach an incorrect ‘yes’ decision”.

Despite both factors in each pair being arbitrary functions of their respective inputs (at least in principle), each only “sees” the status of roughly half the edges in the input graph, and so cannot say much about whether the entire graph actually is a spanning tree. While some potential cycles might be entirely visible from the part of the graph visible to one of the factors, this will not be true of most potential cycles. Thus, to avoid ever producing an incorrect “yes” decision, the factors are forced to vote using a very conservative strategy which will favor “no”.

The remainder of this section is devoted to formalizing this argument by essentially characterizing this conservative voting strategy and showing that it leads to a situation where only a very small fraction of all of the possible spanning trees of KmK_{m} can receive two “yes” votes.

Suppose g(y)g(y) and h(z)h(z) are real-valued non-negative functions of the same form as those described in eqn. 2, and that for any value of xx, d(x)=0d(x)=0 implies g(y)=0g(y)=0 or h(z)=0h(z)=0. Define P=∣{x∈{0,1}m:d(x)=1\mboxandg(y)h(z)>0}∣P=|\{x\in\{0,1\}^{m}:d(x)=1\mbox{ and }g(y)h(z)>0\}| and Z=∣{x∈{0,1}m:d(x)=1}∣=mm−2Z=|\{x\in\{0,1\}^{m}:d(x)=1\}|=m^{m-2}. Then for m≥20m\geq 20 we have

It is not hard to see that this lemma will immediately imply Theorem 40. In particular, provided that d(x)=0d(x)=0 implies that each term in the sum is , we have each term can be non-zero on at most a proportion 12m/15120\frac{1}{2^{m/15120}} of the values of xx for which d(x)=1d(x)=1, and thus the entire sum can be non-zero on at most a proportion at most k2m/15120\frac{k}{2^{m/15120}}. Thus we must have that k12m/15120≥1k\frac{1}{2^{m/15120}}\geq 1, i.e. k≥2m/15120k\geq 2^{m/15120}.

The rest of this section will be devoted to the proof of Lemma 41, which begins as follows.

Suppose we are given such a gg and hh. We will color all of the edges of the complete graph KmK_{m} as red or blue according to whether they correspond to input variables from yy or zz (resp.).

We define a “triangle” of a graph to be any complete subgraph on 3 vertices. KmK_{m} has (m3)\binom{m}{3} triangles total since it is fully connected. After coloring KmK_{m}, each triangle is either monochromatic (having edges with only one color), or dichromatic, having 2 edges of one color and 1 edge of the other color. We will refer to these dichromatic triangles as “constraint triangles”, for reasons which will soon become clear.

Clearly any graph GxG_{x} which is a spanning tree of KmK_{m} can’t contain any triangles, as these are simple examples of cycles. And determining whether GxG_{x} contains all 3 edges of a given constraint triangle is impossible for gg or hh by themselves, since neither of them gets to see the status of all 3 edges. Because of this, gg and hh must jointly employ one of several very conservative strategies with regards to each constraint triangle in order to avoid deciding “yes” for some graph containing said triangle. In particular, we can show that either gg must always vote ‘no’ whenever all of the red edges of the triangle are present in the input graph GxG_{x}, or hh must vote “no” whenever all of the blues edges of the triangle are present in GxG_{x}.

This is formalized in the following proposition.

Let a,ba,b and cc be edges that form a constraint triangle in KnK_{n}. Suppose that aa and bb are both of a different color from cc.

Then one of the following two properties holds:

g(y)h(z)=0g(y)h(z)=0 for all values of xx such that GxG_{x} contains both aa and bb

g(y)h(z)=0g(y)h(z)=0 for all values of xx such that GxG_{x} contains cc

Thus we can see that each constraint triangle over edges aa, bb, and cc in KmK_{m} gives rise to distinct constraint which must be obeyed by any graph GxG_{x} for which g(y)h(z)>0g(y)h(z)>0. These are each one of two basic forms:

We now give a lower bound on the number of constraint triangles (i.e. the number of dichromatic triangles) in KmK_{m} as a function of the number edges of each color.

Given any coloring of the complete graph KmK_{m} with m≥20m\geq 20 which has rr red edges and n−rn-r blue edges (recall n=(m2)n=\binom{m}{2} is the total number of edges), for n/3≤r≤2n/3n/3\leq r\leq 2n/3, the total number of dichromatic triangles is lower bounded by m3/60m^{3}/60.

Our proof of the above lemma makes use of a known upper bound of the number of triangles in an arbitrary graph due to Fisher (1989).

As the choice of yy and zz implies the hypothesis n/3≤r≤2n/3n/3\leq r\leq 2n/3 we can apply this lemma to conclude that there are at least m3/60m^{3}/60 constraint triangles, and thus any graph GxG_{x} for which g(y)h(z)>0g(y)h(z)>0 must obey m3/60m^{3}/60 distinct constraints of the forms given above.

It remains to show that the requirement of obeying m3/60m^{3}/60 such constraints limits the number of graphs GxG_{x} for which g(y)h(z)>0g(y)h(z)>0 to be an exponentially small proportion of the total. Our strategy for doing this will be as follows. We will consider a randomized procedure (due to Aldous, 1990) that samples uniformly from the set of all spanning trees of KmK_{m} by performing a type of random walk on KmK_{m}, adding an edge from the previous vertex whenever it visits a previously unvisited vertex. We will then show that the sequence of vertices produced by this random walk will, with very high probability, contain a length-3 subsequence which implies that the sampled tree violates at least one of the constraints.

This argument is formalized in the proof of the following lemma.

Suppose we are given CC distinct constraints which are each one of the two forms discussed above. Then, of all the spanning trees of KmK_{m}, a proportion of at most

As we have C≥m3/60C\geq m^{3}/60 constraints, this lemma tells us that the proportion of spanning trees GxG_{x} for which g(y)h(z)>0g(y)h(z)>0 is upper bounded by

This finally proves Lemma 41, and thus Theorem 40.

Discussion and future directions

We have shown that there are tractable distributions which D&C SPNs cannot efficient capture, but other deep models can. However, our separating distribution D\mathcal{D}, which is the uniform distribution over adjacency matrices of spanning trees of the complete graph, is a somewhat “complicated” one, and seems to require log⁡(n)\log(n) depth to be efficiently captured by other deep models. Some questions worth considering are:

Is a distribution like D\mathcal{D} learnable by other deep models in practice?

Is there a simpler example than D\mathcal{D} of a tractable separating distribution?

Can we extend D&C SPNs in some natural way that would allow them to capture distributions like D\mathcal{D}?

Should we care that D&C SPNs have this limitation, or are most “natural” distributions that we might want to model with D&C SPNs of a fundamentally different character than D\mathcal{D}?

Far from showing that D&C SPNs are uninteresting, we feel that this paper has established that they are a very attractive objects for theoretical analysis. While the D&C conditions limit SPNs, they also make it possible for us to prove much stronger statements about them than we otherwise could.

Indeed, it is worth underlining the point that the results we have proved about the expressive efficiency of D&C SPNs are much stronger and more thorough than results available for other deep models. This is likely owed to the intrinsically tractable nature of D&C SPNs, which makes them amenable to analysis using known mathematical methods, avoiding the various proof barriers that exist for more general circuits.

One aspect of SPNs which we have not touched on in this work is their learnability. It is strongly believed that for conditional models like neural networks, which are capable of efficiently simulating Boolean circuits, learning is hard in general (Daniely et al., 2014). However, D&C SPNs don’t seem to fall into this category, and to the best of our knowledge, it is still an open question as to whether there is a provably effective and efficient learning algorithm for them. It seems likely that the “tractable” nature of D&C SPNs, which has allowed us to prove so many strong statements about their expressive efficiency, might also make it possible to prove strong statements about their learnability.

The authors would like to thank Ran Raz for his helpful discussions regarding multilinear circuits. James Martens was supported by a Google Fellowship.

References

Appendix A Proofs for Section 2

We will sketch a proof of this result by describing a simple procedure to transform Φ\Phi into Φ′\Phi^{\prime}.

This procedure starts with the leaf nodes and then proceeds up the network, processing a node only once all of its children have been processed. After being processed, a node will have the property that it computes a normalized density, as will all of its descendant nodes.

To process a node uu, we first compute the normalizing constant ZuZ_{u} of its associated density. If it’s a sum node, we divide its incoming weights by ZuZ_{u}, and if it’s a leaf node computing some univariate funciton of an xix_{i}, we transform this function by dividing it by ZuZ_{u}. Clearly this results in uu computing a normalized density. Note that processing a product node is trivial since it will be automatically normalized as soon its children are (which follows from decomposability).

After performing this normalization, the effect on subsequent computations performed by ancestor nodes of uu is described as follows. For every sum node vv which is a parent of uu, the effect is equivalent to dividing the weight on edge (u,v)(u,v) by ZuZ_{u}. And for every product node vv which is a parent of uu, the effect is to divide its output by ZuZ_{u}, which affects subsequent ancestor nodes of vv by applying this analysis recursively. The recursive analysis fails only once we reach the root node rr, in which case the effect is to divide the output of the SPN by the constant ZuZ_{u}, which won’t change the SPN’s normalized density function (or distribution).

Thus we can compensate for the normalization and leave the distribution associated with the SPN unchanged by multiplying certain incoming edge weights of certain ancestor sum nodes of uu by ZuZ_{u} (as specified by the above analysis). This is the second step of processing a node uu.

Note that because we only process a sum node uu after its children have been processed and thus each compute normalized densities themselves, ZuZ_{u} is given simply by the sum of the weights of the incoming edges to uu.

Denote by rr the root/output node of Φ\Phi, and {ui}i\{u_{i}\}_{i} its child nodes.

This proof is a simple induction on the depth dd of Φ\Phi.

Suppose the claim is true for Φ\Phi’s of depth dd, and consider a Φ\Phi of depth d+1d+1.

Each Φu\Phi_{u} is clearly a monotone arithmetic circuit since Φ\Phi is, and so by induction we have that the coefficients of each of the quq_{u}’s are non-negative.

If the root node rr is a product node then the coefficients of monomials in qΦq_{\Phi} are given by sums of products over coefficients of monomials from the quq_{u}’s, and are thus non-negative. And if the root node rr is a sum node, then since the weights are non-negative, the coefficients of the monomials in qΦq_{\Phi} are non-negatively weighted linear combinations of the coefficients of monomials in the quq_{u}’s, and are thus also non-negative.

Thus qΦq_{\Phi} is indeed a non-negative polynomial.

The base case is trivial since a depth 1 circuit consists of a single node which computes either a non-negative constant or the value of a single variable, and both of these correspond to a non-negative polynomial in the input variables.

Appendix B Proofs for Section 3

We will form Φ′\Phi^{\prime} from Φ\Phi via a modification procedure which is described as follows.

Given a sum node uu in Φ\Phi, with dependency-scope xux_{u}, for each child vv of uu, if vv’s dependency-scope xvx_{v} doesn’t coincide with xux_{u} (i.e. xv≠xux_{v}\neq x_{u}, where ≠\neq means inequality of sets), we add a new product node to Φ\Phi and make this node a child of uu in place of vv. This product node’s children consist of the original vv and a set of nodes computing univariate functions of each xi∈xu∖xvx_{i}\in x_{u}\setminus x_{v} which are each constant and equal to 11 for all values of xix_{i}. Note that the dependency scope of this new node is thus xv∪xu∖xv=xux_{v}\cup x_{u}\setminus x_{v}=x_{u}.

Note that these modifications enlarge the set/tuple ff of univariate functions to one which we will denote by f′f^{\prime}.

Also note that these modifications add k∈O(s2)k\in\mathcal{O}(s^{2}) product nodes, and an additional nn nodes for computing the constant univariate functions of each xix_{i}. Thus the size of Φ′\Phi^{\prime} is given by s+n+k∈O(s2)s+n+k\in\mathcal{O}(s^{2}).

To see that qΦ′(f′(x))=qΦ(f(x))q_{\Phi^{\prime}}(f^{\prime}(x))=q_{\Phi}(f(x)) for all values of xx, observe that each node we add computes the same function as the node it replaces, as long as the network is evaluated in the standard way for a particular value of xx (i.e. where the input to the underlying arithmetic circuit is f(x)f(x)). This is because the node computes the product between the aforementioned replaced node and a set of nodes which will always output 11 when evaluated for a particular value of xx.

To see that Φ′\Phi^{\prime} is complete, consider any sum node uu in Φ′\Phi^{\prime}. By construction, a given child node zz of uu is either the original child node vv from Φ\Phi in the case where xv=xux_{v}=x_{u} (as sets), or is one of the above constructed product nodes, and thus has dependency-scope xux_{u}. Thus uu satisfies the condition required for completeness. And since uu was general we can conclude that Φ′\Phi^{\prime} is complete.

Finally, it remains to show that Φ′\Phi^{\prime} is decomposable if Φ\Phi is. But this is easy, since we didn’t modify any of the dependency-scopes of any existing nodes, and the new product nodes we added had children whose dependency-scopes were disjoint by construction.

We will first show the reverse direction, that set-multilinearity of the output polynomial of Φ\Phi implies that Φ\Phi is strongly valid.

Suppose qΦq_{\Phi} is set-multilinear. Then we have that by definition qΦq_{\Phi} is a polynomial of the form

for some coefficients ckc_{k} and indices ji,kj_{i,k}.

Then for any choice of the fi,jf_{i,j}’s and x[n]∖Ix_{[n]\setminus I} we have

and so Φ\Phi is valid for these choices.

Now suppose that Φ\Phi is strongly valid and suppose by contradiction that qΦq_{\Phi} is not set-multilinear.

One way that this can happen (“case 1”) is if there is some monomial mm in qΦq_{\Phi} such that for some i0∈[n]i_{0}\in[n], mm has a factor of the form fi0,j1fi0,j2f_{i_{0},j_{1}}f_{i_{0},j_{2}} depending on the same xi0x_{i_{0}} (it might be the case that j1=j2j_{1}=j_{2}). The other way this can happen (“case 2”) is mm has no factors which are functions depending on some xi0x_{i_{0}} in qΦq_{\Phi}’s dependency-scope.

As remarked before, we select values of x[n]∖{i0}x_{[n]\setminus\{i_{0}\}} so that each fi,j(xi)f_{i,j}(x_{i}) is positive. Fix such values. Then it is not hard to see that qΦA{i0}(S,x[n]∖{i0})q_{\Phi}A_{\{i_{0}\}}(S,x_{[n]\setminus\{i_{0}\}}) and qΦA{i0}(T,x[n]∖{i0})q_{\Phi}A_{\{i_{0}\}}(T,x_{[n]\setminus\{i_{0}\}}) can be viewed as a polynomial functions of bb. Moreover, they are both equal to the same polynomial, which we will denote g(b)g(b). Combining the positivity of each fi,j(xi)f_{i,j}(x_{i}) with Fact 5 (which says that all coefficients on monomial terms in qΦq_{\Phi} are positive) we have that each monomial term in qΦq_{\Phi}, when viewed as a monomial term in g(b)g(b), has a positive coefficient. Collecting like terms in gg we have that since all coefficients are positive, there can be no cancellation of terms, and thus there is some monomial in gg of the form bkb^{k} for k≥2k\geq 2 (case 1) or k=0k=0 (case 2).

Similarly, for the same fixed values of x[n]∖{i0}x_{[n]\setminus\{i_{0}\}} we have that qΦA{i0}(S∪T,x[n]∖{i0})q_{\Phi}A_{\{i_{0}\}}(S\cup T,x_{[n]\setminus\{i_{0}\}}) can be viewed as a polynomial function of bb. Moreover, using the fact that

Because Φ\Phi is strongly valid, we have for all values of bb

Thus we have that 2g(b)=g(2b)2g(b)=g(2b) for all positive values of bb, or in other words, h(b)=2g(b)−g(2b)=0h(b)=2g(b)-g(2b)=0. Since h(b)h(b) is a finite degree polynomial which is 0 for all positive bb, it must be the zero polynomial (non-zero polynomials can only have finitely many roots). Thus it has no monomials. But if cc is the coefficient associated with the monomial bkb^{k} in gg, it is easy to see that the coefficient of bkb^{k} is 2c−2kc=c(2−2k)2c-2^{k}c=c(2-2^{k}) in hh. But because k≠1k\neq 1, this is clearly non-zero, a contradiction.

Thus our assumption that qΦq_{\Phi} was not set-multilinear was incorrect.

This is self-evident from the definition of non-degeneracy.

If rr is a product node, qrq_{r} is given by the product of the quiq_{u_{i}}’s. Expanding out this product yields a polynomial expression whose monomial terms (monomial times coefficients) have monomials given by every possible product formed by multiplying together one monomial from each of the quiq_{u_{i}}’s. Collecting like terms, we have that the coefficients associated with each of the above described monomials are given by sums of products of the coefficients associated with the monomials from the quiq_{u_{i}}’s. Since the coefficients associated with the monomials from the quiq_{u_{i}}’s are all positive (by Fact 5), so are the coefficients associated with each of the above described monomials in the product expansion, and thus they all appear in qrq_{r}.

If rr is a sum node, qrq_{r} is given by a weighted sum of the quiq_{u_{i}}’s. Performing this weighted sum yields a polynomial expression whose monomial terms have monomials given by taking the union over all of the monomials in the quiq_{u_{i}}’s. Collecting like terms, we have that the coefficients associated with each of the above described monomials are given by weighted sums of the coefficients associated with monomials from the quiq_{u_{i}}’s. Since the coefficients associated with monomials from the quiq_{u_{i}}’s are all positive (by Fact 5), and since by non-degeneracy the weights are all positive, so are the coefficients associated with each of the above described monomials, and thus they all appear in qrq_{r}.

We will prove this statement by induction on the depth of Φ\Phi.

Suppose that it is true for depth dd and consider the case where Φ\Phi is of depth d+1d+1.

In the case where rr is a product node, we observe that qrq_{r} is the product of the quiq_{u_{i}}’s. Since each of the quiq_{u_{i}}’s are non-zero by the inductive hypothesis, it follows that qrq_{r} is non-zero (in general, the product of non-zero polynomials is a non-zero polynomial).

In the case where rr is a sum node, we have that by the inductive hypothesis that qu1q_{u_{1}} is not the zero polynomial and so it contains some monomial mm. By Part 3, this is also a monomial of qq, and so qq is not the zero polynomial.

For the base case, where the circuit is a single node, it can either be a constant node or a node labeled with some element of yy. Because Φ\Phi is non-degenerate, if it is a constant node we know that the constant it computes is non-zero, and thus it doesn’t compute the zero polynomial. If it is labeled with an element of yy, then it computes the polynomial given by that element, which is clearly not the zero polynomial.

Observe that this statement is equivalent to the following one: for every member GkG_{k} of rr’s set-scope, there exists some monomial in qrq_{r} which has an element of GkG_{k} as a factor.

We will prove that this restatement is true by induction on the depth of Φ\Phi.

Suppose that it is true for depth dd and consider the case where Φ\Phi is of depth d+1d+1.

Note that the set-scope of rr is by definition the union of the set-scopes of the uiu_{i}’s.

Suppose GkG_{k} is some member of the set-scope of rr. Then it is a member of the set-scope of some uiu_{i}. By the inductive hypothesis this means that there is some monomial mm in quiq_{u_{i}} which has an element of GkG_{k} as a factor. Also, by applying Part 4 to each of the uju_{j}’s we have that none of the qujq_{u_{j}}’s are the zero polynomial, and thus each of them have at least one monomial.

In the case where rr is a product node, we can apply Part 2 to Φ\Phi, so that there is a monomial in qrq_{r} which has mm as a factor, and thus an element of GkG_{k} as a factor.

In the case where rr is a sum node, we can apply Part 3 to Φ\Phi, so that mm is a monomial in qrq_{r} (which has an element of GkG_{k} as a factor).

Denote by rr the root/output node of Φ\Phi, and {ui}i\{u_{i}\}_{i} its child nodes.

For the forward direction we will give a proof by induction on the depth of Φ\Phi.

Suppose the claim is true for Φ\Phi’s of depth dd, and consider a Φ\Phi of depth d+1d+1.

The first case we consider is where the root node rr is a product node.

Thus we have that the set-scope of the uiu_{i}’s are disjoint, which is the condition that rr, being a product node, must satisfy in order for Φ\Phi to be syntactically set-multilinear.

Thus, to show that the Φ\Phi is syntactically set-multilinear, it remains to show that each of the Φui\Phi_{u_{i}}’s are also syntactically set-multilinear arithmetic circuits. And by the inductive hypothesis this amounts to establishing that their output polynomials (the quiq_{u_{i}}’s) are set-multilinear.

Suppose by contradiction that this is not the case, and that some quiq_{u_{i}} is not set-multilinear. The first way this can happen is if some monomial m1m_{1} in quiq_{u_{i}} has 2 distinct factors which are members of the same GkG_{k}. By Part 4 of Lemma 14, we have that each of the other qujq_{u_{j}}’s are not zero polynomials and thus each contain at least one monomial. Combining this fact with Part 2 of Lemma 14 we thus have that qrq_{r} contains at least one monomial which is of the form m1m2m_{1}m_{2}, where m2m_{2} is the product of monomials from the other qujq_{u_{j}}’s. This monomial has 2 distinct factors which are members of GkG_{k} (since m1m_{1} does), which contradicts the set-multilinearity of qrq_{r}. The second way that some quiq_{u_{i}} can fail to be set-multilinear is if there is some monomial m1m_{1} in quiq_{u_{i}} such that none of the elements of GkG_{k} are a factor of m1m_{1}, for some GkG_{k} in quiq_{u_{i}}’s set-scope. As in the previous case this means that there is a monomial in qiq_{i} which of the form m1m2m_{1}m_{2} where m2m_{2} is the product of monomials from the other qujq_{u_{j}}’s. Since the set-scopes of the other qujq_{u_{j}}’s are disjoint from quiq_{u_{i}}’s set-scope, this means that m1m2m_{1}m_{2} doesn’t have any element of GkG_{k} as a factor. But this contradicts the set-multilinearity of qrq_{r}, since qrq_{r}’s set-scope contains GkG_{k} (because, by Part 5 of Lemma 14, it is equal to rr’s set-scope, which contains uiu_{i}’s set-scope, which itself is equal to quiq_{u_{i}}’s set-scope).

The second case we consider is where rr is a sum node.

Suppose by contradiction that the set-scopes of some uiu_{i} and uju_{j} are distinct. By Part 5 of Lemma 14 it follows then that the set-scopes of quiq_{u_{i}} and qujq_{u_{j}} are distinct. Let GkG_{k} be a member of the set-scope of quiq_{u_{i}} which is not in the set-scope of qujq_{u_{j}}. By Part 4 of Lemma 14 we know that qujq_{u_{j}} is not the zero polynomial and so there is some monomial mm in qujq_{u_{j}} (which doesn’t have any element of GkG_{k} as a factor). And thus mm is also a monomial in qrq_{r} by Part 3 of Lemma 14. But, similarly to the product node case, this contradicts the set-multilinearity of qrq_{r}.

Thus we have that the set-scope of the uiu_{i}’s are all identical, which is necessary condition that the sum node rr must satisfy in order for Φ\Phi to be syntactically set-multilinear.

Thus, to show that Φ\Phi is syntactically set-multilinear, it remains to show that each of the Φui\Phi_{u_{i}}’s is syntactically set-multilinear. By the inductive hypothesis this amounts to establishing that their output polynomials (the quiq_{u_{i}}’s) are set-multilinear.

Suppose by contradiction that this is not the case, and that some quiq_{u_{i}} is not set-multilinear. The first way this can happen is if a monomial mm in quiq_{u_{i}}’s has 2 distinct factors which are elements of the same GkG_{k} (might be the same element twice). But then by Part 3 of Lemma 14 mm must be in qrq_{r}, which contradicts the set-multilinearity of qrq_{r}. The second way that some quiq_{u_{i}} can fail to be set-multilinear is if there is some monomial mm in quiq_{u_{i}} for which none of the elements of GkG_{k} are a factor, for a GkG_{k} in quiq_{u_{i}}’s set-scope. As before, this contradict the set-multilinearity of qrq_{r}.

The base case, where Φ\Phi has a single node (which must be a node labeled with an element of yy or a constant node), is simple to verify.

Thus by induction we have that the forward direction of the theorem’s statement holds.

For the reverse direction we will give a similar proof by induction on the depth.

Suppose the claim is true for Φ\Phi’s of depth dd, and consider a Φ\Phi of depth d+1d+1.

Since Φ\Phi is syntactically set-multilinear, each of the Φui\Phi_{u_{i}}’s are as well. So by the inductive hypothesis we have that the quiq_{u_{i}}’s are all set-multilinear.

Consider the case where the root node rr is a product node. By the syntactic set-multilinearity of Φ\Phi we have that set-scopes of the uiu_{i}’s are pairwise disjoint, and by Part 5 of Lemma 14 we have that these are equal to the set-scopes of their respective output polynomials (the quiq_{u_{i}}’s), and so these are disjoint as well. Because the quiq_{u_{i}}’s are set-multilinear, we have that their monomials consist of products between elements of the members of their set-scope, one for each such member. By Part 2 of Lemma 14, qrq_{r}’s monomials are given by taking every possible product formed by taking exactly one monomial from each of the quiq_{u_{i}}’s (by Part 2 of Lemma 14), and thus these monomials are each a product over elements of the GkG_{k}’s, with exactly one element from each GkG_{k} in the disjoint union of the set-scopes of the quiq_{u_{i}}’s (which is equal to the union of the set-scope of the uiu_{i}’s, which is equal to the set-scope of rr, which is itself equal to the set-scope of qrq_{r} [by Part 5 of Lemma 14]). Thus qrq_{r} is set-multilinear.

Now consider the case where rr is a sum node. By the syntactic set-multilinearity of Φ\Phi we have that set-scopes of the uiu_{i}’s are all equal to some set SS, and by Part 5 of Lemma 14 we have that these are equal to the set-scopes of their respective output polynomials (the quiq_{u_{i}}’s), and so these are all equal to SS as well. Because the quiq_{u_{i}}’s are set-multilinear, we have that their monomials consist of products between elements of the members GkG_{k} of their set-scope, one for each such GkG_{k}. By Part 3 of Lemma 14 we have that the set of monomials appearing in qrq_{r} is given by the union over the sets of monomials appearing in each of the quiq_{u_{i}}’s, and thus these monomials are each a product over elements of the GkG_{k}’s, with exactly one element from each GkG_{k} in SS (which, similarly to before, is equal to the set-scope of rr). Thus qrq_{r} is set-multilinear.

The base case, where Φ\Phi has a single node (which must be a node labeled with an element of yy or a constant node), is simple to verify.

Informally, the idea of the reduction is as follows. Given a Boolean CNF formula ψ\psi over the set of 0/10/1-valued variables in xx we will construct a poly-sized SPN over xx whose output for a particular value of xx will be non-zero if and only if this value represents an assignment to the variables which satisfies ψ\psi. By adding some additional circuitry to the SPN (which will involve a few negative weights) we can ensure when the SPN is evaluated for an input corresponding to an integral over one or more of the xix_{i}’s, that it always outputs . Thus, the SPN will be valid if and only if it outputs whenever it is evaluated for a particular value of xx, or in other words, if ψ\psi has no satisfying assignment.

It is clear from this definition that Φ(f(x))>0\Phi(f(x))>0 if and only if xx corresponds to a satisfying assignment of ψ\psi.

We then augment Φ\Phi with additional circuitry, so that for any choice of I≠∅I\neq\varnothing and values of x[n]∖Ix_{[n]\setminus I} we have Φ(AI(SI,x[n]∖I))=0\Phi(A_{I}(S_{I},x_{[n]\setminus I}))=0, while the standard evaluation of Φ(f(x))\Phi(f(x)) for particular values of xx remains unchanged.

Notice that an input to Φ\Phi of the form AI(SI,x[n]∖I)A_{I}(S_{I},x_{[n]\setminus I}) for I≠∅I\neq\varnothing can be distinguished from an input of the form f(x)f(x), by the condition fi,1=fi,2=1f_{i,1}=f_{i,2}=1 for some ii. Thus, to achieve the required property we can augment Φ\Phi by giving it a new output node which computes the product of the original ouput node and a subcircuit which computes ∏i(1−fi,1fi,2)\prod_{i}(1-f_{i,1}f_{i,2}) in the obvious way. Note that this requires the use of negative weights.

Clearly this construction of Φ\Phi can be accomplished in time polynomial in the size of ψ\psi. Moreover, it is easy to see that qΦq_{\Phi} is non-negative valued for all values of xx in {0,1}n\{0,1\}^{n}.

Suppose ψ\psi has no satisfying assignment. Then as constructed, Φ(f(x))=0\Phi(f(x))=0 for all values of xx, and we also have that f(AI(SI,x[n]∖I))=0f(A_{I}(S_{I},x_{[n]\setminus I}))=0 for all values of II and SIS_{I}, and thus Φ\Phi is valid. If, on the other hand, ψ\psi has some satisfying assignment given by some value x′x^{\prime} of xx, then Φ(f(x′))>0\Phi(f(x^{\prime}))>0. Validity of Φ\Phi requires that

But due to the construction of Φ\Phi, the RHS is , while the LHS is clearly positive since Φ(f(x′))\Phi(f(x^{\prime})) is positive and Φ(f(x1′‾,x[n]∖{1}′))\Phi(f(\overline{x^{\prime}_{1}},x^{\prime}_{[n]\setminus\{1\}})) is non-negative. Thus this requirement of validity is not satisfied by Φ\Phi and so Φ\Phi is not valid.

Appendix C Proofs for Section 5

To produce the promised D&C SPN, we will design an arithmetic circuit which implements the algorithm for running an FPLM in the obvious way using basic matrix-vector arithmetic.

In particular, for each stage ii, the kk-dimensional working vector is represented by a group of kk nodes, and the required matrix multiplication of the working vector by the matrix Tπ(i)(xπ(i))T_{\pi(i)}(x_{\pi(i)}) is implemented by k2k^{2} product nodes and kk sum nodes. Each such product node has two children: one corresponding to a component of the working vector, and the other being a univariate function of the current xπ(i)x_{\pi(i)}, which determines the corresponding entry of the matrix Tπ(i)(xπ(i))T_{\pi(i)}(x_{\pi(i)}). The output of these product nodes are summed as appropriate by the kk sum nodes (each of which takes as input the product nodes corresponding to a single row of the matrix) to produce the representation of the working vector at the next stage.

The initialization of the current working vector by aa is implemented with constant-valued nodes, and the inner product of the final working vector with bb is implemented by a sum node in the obvious way.

It is not hard to see that this construction produces an SPN which is both decomposable and complete. In particular, decomposability follows from the fact that product nodes each have two children: one which computes a univariate function which depends on some xjx_{j} and one whose dependency-scope clearly doesn’t contain xjx_{j} (because xjx_{j} has not yet been processed in the fixed order in which the FPLM processes its input).

The size of the SPN is clearly O(k2n)\mathcal{O}(k^{2}n).

We observe that FPSSMs are structurally and functionally identical to FPLMs in every respect (including how the state transitions are determined by the current xπ(i)x_{\pi(i)}) except in their definitions of states, and kinds of functions and transformations that are performed on them.

We also observe that an FPSSM’s working state uu can be represented as a vector vv using a 11-of-kk encoding, where uu being in state ii corresponds to v=eiv=e_{i}. Here, eie_{i} is the kk-dimensional vector which is 11 in position ii, and elsewhere.

Moreover, arbitrary state transition functions can be accomplished within this representation by linear transformations. In particular, a mapping gg from [k][k] to [k][k] can be implemented in the vector representation by multiplication with the matrix TT, where

Thus, using this 11-of-kk encoded vector representation scheme allows us to construct, in the obvious way, a FPLM of dimension kk which will behave identically to a given FPSSM of state-size kk.

Appendix D Proofs for Section 6

First note that due to decomposability and completeness conditions, the nodes in the second layer of Φ\Phi must compute either weighted sums over univariate functions of the same variable, or products between univariate functions of distinct input variables. In either case, they compute functions which “factorize” over the xix_{i}’s (in the sense that they are of the form g(x)=∏i=1nhi(xi)g(x)=\prod_{i=1}^{n}h_{i}(x_{i}) for some hih_{i}’s).

So if the root/output node of Φ\Phi is a sum node we therefore have that Φ\Phi computes a weighted sum over kk functions, each of which factorizes over the xix_{i}’s. And if the root/output node is a product node we have that Φ\Phi computes a product between functions with disjoint sets of dependent variables (by decomposability), each of which factorizes over its respective dependent variables, and is therefore a function which factorizes over the xix_{i}’s.

So in either case we have that the function computed by Φ\Phi is the weighted sum of ≤k\leq k functions (11 if rr is a product node), each of which factorizes over the xix_{i}’s.

Consider a general function gg over xx which factorizes over the xix_{i}’s. We claim that MgA,BM^{A,B}_{g} has a rank of 1. To see this, note that gg can be expressed as the product

Let vAv_{A} be the vector consisting of the values of ∏i∈Ahi(xi)\prod_{i\in A}h_{i}(x_{i}) for different values of xAx_{A} indexed according to the same order in which we index the rows of MgA,BM^{A,B}_{g}, and define vBv_{B} analogously. Then we have MgA,B=vAvB⊤M^{A,B}_{g}=v_{A}v_{B}^{\top}, which has rank 1.

Since qΦq_{\Phi} is the weighted sum of kk functions g1,g2,...,gkg_{1},g_{2},...,g_{k} each of which factorizes over xx, we have that MqΦ(f(x))A,B=∑i=1kwiMgiA,BM^{A,B}_{q_{\Phi}(f(x))}=\sum_{i=1}^{k}w_{i}M^{A,B}_{g_{i}} for some weights wiw_{i}. Then using the subadditivity of rank, we get

The construction of the promised D&C SPN proceeds as follows.

In the second layer we have, for each ii, a pair of product nodes which compute xixi+n/2x_{i}x_{i+n/2} and xi‾ xi+n/2‾\overline{x_{i}}\>\overline{x_{i+n/2}} in the obvious way, where z‾≡1−z\overline{z}\equiv 1-z (which is a non-negative valued univariate function of zz).

In the third layer we have, for each ii, a sum node which computes xixi+n/2+xi‾ xi+n/2‾x_{i}x_{i+n/2}+\overline{x_{i}}\>\overline{x_{i+n/2}} from the outputs of the second layer. It is easy to see that the ii-th such node outputs 11 if xi=xi+n/2x_{i}=x_{i+n/2}, and otherwise.

The forth and final layer consists of a single product node which computes the product over all of the nodes in the third layer, i.e. ∏ixixi+n/2+xi‾ xi+n/2‾\prod_{i}x_{i}x_{i+n/2}+\overline{x_{i}}\>\overline{x_{i+n/2}}. It is easy to see that this function is 11 if xi=xi+n/2x_{i}=x_{i+n/2} for all i≤n/2i\leq n/2, and is otherwise. ∎

Since the output of Φ\Phi is proportional to the density function of its associated distribution, we have that there is some α>0\alpha>0 s.t. α/2≤qΦ(x)≤α\alpha/2\leq q_{\Phi}(x)\leq\alpha each values of xx satisfying EQUAL⁡(x)=1\operatorname{EQUAL}(x)=1.

Note that there are 2n/22^{n/2} values of xx with EQUAL⁡(x)=1\operatorname{EQUAL}(x)=1.

Let β=∑x:EQUAL⁡(x)=0qΦ(f(x))\beta=\sum_{x:\operatorname{EQUAL}(x)=0}q_{\Phi}(f(x)). Then bounding the total probability δ\delta under Φ\Phi’s distribution of the set of values of xx with EQUAL⁡(x)=0\operatorname{EQUAL}(x)=0 we have

Now consider the matrix MqΦ(f(x))H1,H2M^{H_{1},H_{2}}_{q_{\Phi}(f(x))}. The sum of the values of the off-diagonal entries is β\beta by definition, and each of the 2n/22^{n/2} diagonal entries differs from α\alpha by at most α2\frac{\alpha}{2}. Thus we have that MqΦ(f(x))H1,H2=α(I+D)M^{H_{1},H_{2}}_{q_{\Phi}(f(x))}=\alpha(I+D) where DD is a matrix satisfying

Plugging in δ≤1/4\delta\leq 1/4 we have rank⁡(MqΦ(f(x))H1,H2)=rank⁡(I+D)≥2n/2−2/3\operatorname{rank}\left(M^{H_{1},H_{2}}_{q_{\Phi}(f(x))}\right)=\operatorname{rank}(I+D)\geq 2^{n/2-2}/3. The result then follows from Theorem 24.

Let E=D+D⊤E=D+D^{\top}, and S=E⊤ES=E^{\top}E (which is positive-semidefinite).

It is known that among the matrices CC s.t. C⊤C=SC^{\top}C=S (i.e. the “square roots” of SS), there is a unique symmetric positive semi-definite root RR.

It is also known that the nuclear norm ∥E∥∗\|E\|_{*} of EE, which is defined as the sum of the singular values (denoted σi\sigma_{i}) of EE, is equal to the trace of RR.

By the “unitary freedom” of matrix square roots we know that since EE is a square root of SS, it is related to RR by E=URE=UR (i.e. R=U⊤ER=U^{\top}E), for some unitary matrix UU. And because UU is unitary, we have that ∣[U]i,j∣≤1|[U]_{i,j}|\leq 1 for all ii and jj.

Also, because EE is a real symmetric matrix, we have that σi=∣λi∣\sigma_{i}=|\lambda_{i}|, where λi\lambda_{i} are its eigenvalues.

Now consider the matrix 2I+E2I+E. The eigenvalues of this matrix, denoted by γi\gamma_{i}, are given by γi=λi+2\gamma_{i}=\lambda_{i}+2 for each ii. The rank of 2I+E2I+E is given by the number of non-zero eigenvalues it has, or in other words, the number of eigenvalues λi\lambda_{i} of EE which are not equal to −2-2. Since ∑i∣λi∣≤2Δ\sum_{i}|\lambda_{i}|\leq 2\Delta we have that at most Δ\Delta of the λi\lambda_{i}’s can be equal to −2-2, and thus the rank of E+2IE+2I is at least k−Δk-\Delta.

Then using the fact that 2I+E=(I+D)+(I+D)⊤2I+E=(I+D)+(I+D)^{\top} we have that

and thus rank⁡(I+D)≥k/2−Δ/2\operatorname{rank}(I+D)\geq k/2-\Delta/2.

Appendix E Proofs for Section 7

Define q(y)=q1(y)−q2(y)q(y)=q_{1}(y)-q_{2}(y). Clearly this is a multilinear polynomial as well. Also observe that q1(y)=q2(y)  ⟺  q(y)≡q1(y)−q2(y)=0q_{1}(y)=q_{2}(y)\iff q(y)\equiv q_{1}(y)-q_{2}(y)=0. Thus, in order to prove the lemma it suffices to establish the following proposition.

Appendix F Proofs for Section 8

Appendix G Proofs for Section 9

We first construct the subgraph HH of KmK_{m} whose edges are given precisely by those elements of i∈Ii\in I for which xi=1x_{i}=1. In other words, HH is the minimal subgraph of KmK_{m} which is consistent with the values of xIx_{I}.

Next, we verify that HH is acyclic, which can be done in O(m2)\mathcal{O}(m^{2}) time using a depth first search.

If HH is not acyclic, then the algorithm returns , as any GG which is consistent with the given values of xIx_{I} must have HH as a subgraph, and thus cannot be a tree.

Otherwise, HH is a forest (i.e. each connected component is a tree, including lone vertices with no incident edges) and we proceed as follows.

We construct a new edge-labeled multi-graph MM where each vertex of MM corresponds to a connected component of HH. For each edge with a label in {1,...,n}∖I\{1,...,n\}\setminus I (i.e. those edges ii for which xix_{i} is not given a fixed value), which will be between vertices in distinct connected components of HH, we add an edge (with the same label) between the corresponding vertices of MM.

We now claim that the number of (edge labeled) spanning trees of MM is equal to the number of spanning trees of KmK_{m} consistent with the values of xIx_{I}. To establish this, we will exhibit a bijection between the two sets.

Consider a spanning tree T′T^{\prime} of MM. We can construct a subgraph TT of KmK_{m} by taking HH and adding to it the edges of KmK_{m} corresponding to labels of the edges of T′T^{\prime}. Since the labels of the edges of T′T^{\prime} are disjoint from II by construction, and HH is clearly consistent with the values of xIx_{I}, this extended graph will be as well. It is also not hard to see that it is a spanning tree of KmK_{m}, and that this mapping is 1-1.

Now consider a spanning tree TT of KmK_{m} consistent with the values of xIx_{I}. We can construct a subgraph T′T^{\prime} of MM whose set of edges are given precisely by S∖IS\setminus I where SS is the set of labels of edges in TT. Because TT has HH as a subgraph, it clearly cannot contain any edges between vertices in the same connected component of HH (as this would cause a cycle), and so S∖IS\setminus I indeed contains only labels of edges in MM. Again, it is not hard see that T′T^{\prime} is a spanning tree of MM, and that this mapping is 1-1.

Thus it remains to count the (edge-labeled) spanning trees of MM.

To do this, we form the generalized Laplacian matrix LL of MM given by

and compute one of its co-factors. For example, we can compute the determinant of LL with the first row and column removed. The asymptotic cost of this is, by the results of Bunch and Hopcroft , are the same as the asymptotic cost of matrix multiplication, which is known to be at worst O(m2.38)≈O(n1.19)\mathcal{O}(m^{2.38})\approx\mathcal{O}(n^{1.19}) [Coppersmith and Winograd, 1987].

By a generalization of the Matrix Tree Theorem [Tutte, 2001], the value of any of the cofactors of LL is equal to the number of spanning trees of MM.

Next, we decompose Φ\Phi according to the following iterative procedure.

Starting with Φ0=Φ\Phi_{0}=\Phi, at each stage ii, we find a node viv_{i} in Φi−1\Phi_{i-1} whose dependency-scope xvix_{v_{i}} satisfies n/3≤∣xvi∣≤2n/3n/3\leq|x_{v_{i}}|\leq 2n/3 (we will show later why this is always possible). We then remove viv_{i} from Φi−1\Phi_{i-1} (effectively just replacing it with 0), and pruning any orphaned children that result, noting that the resulting circuit Φi\Phi_{i} is also a decomposable and complete SPN over the same input variables (xx), or is the empty circuit.

The procedure stops at the step kk, when Φk\Phi_{k} becomes the empty circuit (so that qΦkq_{\Phi_{k}} is the zero polynomial). Clearly, k≤tk\leq t, since Φ0\Phi_{0} starts with tt nodes, and each step of the procedure removes at least one node.

We can express the output of qΦq_{\Phi} as a telescoping sum of differences as follows

Suppose that viv_{i} is the node removed at stage ii, and consider the SPN Φi−1′\Phi^{\prime}_{i-1} obtained by replacing viv_{i} in Φi−1\Phi_{i-1} with an input node labeled with a new variable ziz_{i}. If we define the dependency-scope xzix_{z_{i}} of ziz_{i} to be xvix_{v_{i}} (thinking of it as a ‘function’ which depends on xvix_{v_{i}} analogously to how each of the elements of ff are functions which depend on one of the xjx_{j}’s) then clearly Φi−1′\Phi^{\prime}_{i-1} is an SPN and inherits decomposability and completeness from Φi−1\Phi_{i-1}. Moreover, since qΦiq_{\Phi_{i}} is clearly obtained by setting zi=0z_{i}=0 in qΦi−1′q_{\Phi^{\prime}_{i-1}}, we have that qΦi−1′−qΦiq_{\Phi^{\prime}_{i-1}}-q_{\Phi_{i}} is a polynomial in ziz_{i} and ff consisting precisely of those monomials from qΦi−1′q_{\Phi^{\prime}_{i-1}} which have ziz_{i} as a factor, with the same corresponding coefficients (which are all non-negative).

Because Φi−1′\Phi^{\prime}_{i-1} is a D&C SPN, we have from Theorem 17 that each monomial mm in qΦi−1′q_{\Phi^{\prime}_{i-1}} with ziz_{i} as a factor is of the form zm′zm^{\prime} where xm′∩xzi=∅x_{m^{\prime}}\cap x_{z_{i}}=\varnothing. Thus qΦi−1′−qΦi=ziψiq_{\Phi^{\prime}_{i-1}}-q_{\Phi_{i}}=z_{i}\psi_{i} for some non-negative polynomial ψi\psi_{i} over ff with xψi∩xzi=∅x_{\psi_{i}}\cap x_{z_{i}}=\varnothing and xψi∪xzi=xx_{\psi_{i}}\cup x_{z_{i}}=x.

Substituting zi=qviz_{i}=q_{v_{i}} in qΦi−1′q_{\Phi^{\prime}_{i-1}} recovers qΦi−1q_{\Phi_{i-1}}, and thus it follows that qΦi−1−qΦi=qviψiq_{\Phi_{i-1}}-q_{\Phi_{i}}=q_{v_{i}}\psi_{i}.

Define gi=qvig_{i}=q_{v_{i}} and hi=ψih_{i}=\psi_{i}. Then we can rewrite eqn. 4 as qΦ=∑i=1kgihiq_{\Phi}=\sum_{i=1}^{k}g_{i}h_{i}. Noting that viv_{i} was chosen so that n/3≤∣xvi∣≤2n/3n/3\leq|x_{v_{i}}|\leq 2n/3, this gives the result.

It remains to show that at each stage ii we can find a node viv_{i} in Φi−1\Phi_{i-1} satisfying n/3≤∣xvi∣≤2n/3n/3\leq|x_{v_{i}}|\leq 2n/3. To do this we perform the following procedure. Starting with the root node of Φi−1\Phi_{i-1} we procede down along the circuit towards the input nodes, following a path given by always taking the child with the largest-sized dependency-scope among the children of the current node. We follow this path until we arrive at a node which satisfies the required properties. To see that we eventually do find such a node, note first that if the current node uu is a sum node, the dependency-scope of any of its children will be the same as its own (due to completeness), and if uu is a product node, then since the number of children is ≤2\leq 2, at least one child must have an dependency-scope whose size is at least half that of uu’s dependency-scope (due to decomposability). If the size of the current node’s dependency-scope is >2n/3>2n/3 it must be the case that at least one child has an dependency-scope of size ≥n/3\geq n/3. Because the size of the dependency-scope never increases along this path, and must eventually become 1 (at an input node), it thus follows that the first node on the path whose dependency-scope is of size ≤2n/3\leq 2n/3 will satisfy the required properties.

Let {Φj}j=1∞\{\Phi_{j}\}_{j=1}^{\infty} be such a sequence.

Applying Theorem 38 to each Φj\Phi_{j} we have that

where for each jj, kj≤s2k_{j}\leq s^{2} and the gi,jg_{i,j}’s and hi,jh_{i,j}’s are polynomials in the different ff’s (and thus functions of xx) satisfying the conditions in Theorem 38 (eqn. 1).

For notational convenience we will redefine {Φj}j=1∞\{\Phi_{j}\}_{j=1}^{\infty} (and all quantities which are derived from it, such as the gi,jg_{i,j}’s and hi,jh_{i,j}’s) to be this subsequence, as we will do going forward whenever we talk about “replacing” the current {Φj}j=1∞\{\Phi_{j}\}_{j=1}^{\infty} with a subsequence.

For all values of xx, we have that each term in the sum qΦj(x)=∑i=1kgi,j(yi)hi,j(zi)q_{\Phi_{j}}(x)=\sum_{i=1}^{k}g_{i,j}(y_{i})h_{i,j}(z_{i}) is non-negative, and thus qΦj(x)≥gi,j(yi)hi,j(zi)≥0q_{\Phi_{j}}(x)\geq g_{i,j}(y_{i})h_{i,j}(z_{i})\geq 0. And since qΦj(x)q_{\Phi_{j}}(x) converges to γ(x)\gamma(x) as j→∞j\to\infty, it then follows that the sequence of real-values {gi,j(yi)hi,j(zi)}j=1∞\{g_{i,j}(y_{i})h_{i,j}(z_{i})\}_{j=1}^{\infty} is bounded.

Now given that the new {νj}j=1∞\{\nu_{j}\}_{j=1}^{\infty} converges it thus follows by definition of νj\nu_{j} that for each value of xx, {gi,j(yi)hi,j(zi)}j=1∞\{g_{i,j}(y_{i})h_{i,j}(z_{i})\}_{j=1}^{\infty} converges to some value which we will denote ηi(x)\eta_{i}(x), where we note that ∑i=1kηi(x)=γ(x)\sum_{i=1}^{k}\eta_{i}(x)=\gamma(x).

By Lemma 46 (below) it follows that each ηi\eta_{i} can be written as gihig_{i}h_{i} for functions gig_{i} and hih_{i} of yiy_{i} and ziz_{i} (resp.). Thus we have that γ(x)=∑i=1kηi(x)=∑i=1kgi(yi)hi(zi)\gamma(x)=\sum_{i=1}^{k}\eta_{i}(x)=\sum_{i=1}^{k}g_{i}(y_{i})h_{i}(z_{i}) for each value of xx, which completes the proof.

Suppose {gj}j=1∞\{g_{j}\}_{j=1}^{\infty} and {hj}j=1∞\{h_{j}\}_{j=1}^{\infty} are sequences of real-valued functions of yy and zz (resp.), where yy and zz are disjoint subsets/tuples of xx, and that the size of the range of possible values of xx is given by some d<∞d<\infty, and finally that {gjhj}j=1∞\{g_{j}h_{j}\}_{j=1}^{\infty} converges pointwise to some function η\eta of xx. Then there exists functions gg and hh of yy and zz (resp.) such that η=gh\eta=gh.

Consider a subsequence of {gj}j=1∞\{g_{j}\}_{j=1}^{\infty} where each gjg_{j} is not the zero function, and replace {gj}j=1∞\{g_{j}\}_{j=1}^{\infty} with this subsequence, and {hj}j=1∞\{h_{j}\}_{j=1}^{\infty} with its corresponding subsequence (according to the index jj). Note that if such a subsequence of {gj}j=1∞\{g_{j}\}_{j=1}^{\infty} doesn’t exist, then after some point in the sequence, gjg_{j} is always the zero function and thus it follows that η\eta is the zero function, and we can take both gg and hh to be the zero functions.

Define αj=max⁡y∣gj(y)∣\alpha_{j}=\max_{y}|g_{j}(y)| for each jj. We note that for all jj, αj≠0\alpha_{j}\neq 0 by how the sequence {gj}1∞\{g_{j}\}_{1}^{\infty} was sub-selected above.

Now define a pair of new sequences of functions by

For all values of xx, we have that since gj(y)hj(z)=gj′(y)hj′(z)g_{j}(y)h_{j}(z)=g^{\prime}_{j}(y)h^{\prime}_{j}(z), {gj′(y)hj′(z)}j=1∞\{g^{\prime}_{j}(y)h^{\prime}_{j}(z)\}_{j=1}^{\infty} thus converges to η(x)\eta(x).

Let λj\lambda_{j} denote the finite dimensional vector formed by evaluating gj′g^{\prime}_{j} for every possible value of yy (there are ≤d\leq d of these, since there are dd possible values of xx). Note that construction, ∣gj(y)∣≤1|g_{j}(y)|\leq 1 for all values of yy, and thus the sequence {λj}j=1∞\{\lambda_{j}\}_{j=1}^{\infty} is bounded. By the Bolzano-Weierstrass theorem it has convergent subsequence. Replace {gj′}j=1∞\{g^{\prime}_{j}\}_{j=1}^{\infty} and {hj′}j=1∞\{h^{\prime}_{j}\}_{j=1}^{\infty} with the corresponding subsequences (i.e. the subsequence given by the corresponding jj’s).

Now we have that {gj′}j=1∞\{g^{\prime}_{j}\}_{j=1}^{\infty} converges point-wise to some function gg of yy. And it remains to find the promised hh.

Note that since there are only finitely many possible values of yy, there is some particular value of y′y^{\prime} of yy, for which gj′(y′)=βg_{j}^{\prime}(y^{\prime})=\beta for infinitely many jj’s, for some β≠0\beta\neq 0. To see this, note that we can pick y′y^{\prime} so that ∣gj′(y)∣|g_{j}^{\prime}(y)| is maximized infinitely often, and so that we have that either gj′(y′)=1g_{j}^{\prime}(y^{\prime})=1 infinitely often, or gj′(y′)=−1g_{j}^{\prime}(y^{\prime})=-1 infinitely often. Replace {gj′}j=1∞\{g^{\prime}_{j}\}_{j=1}^{\infty} with this subsequence (and {hj′}j=1∞\{h^{\prime}_{j}\}_{j=1}^{\infty} with its corresponding subsequence).

Note that since {gj′(y)hj′(z)}j=1∞\{g^{\prime}_{j}(y)h^{\prime}_{j}(z)\}_{j=1}^{\infty} converges for all values of xx, and that the variables in yy are disjoint from those in zz, it is certainly true that {gj′(y′)hj′(z)}j=1∞\{g^{\prime}_{j}(y^{\prime})h^{\prime}_{j}(z)\}_{j=1}^{\infty} converges for all values of zz. But this is equal to {βhj′(z)}j=1∞\{\beta h^{\prime}_{j}(z)\}_{j=1}^{\infty}, and since β≠0\beta\neq 0 it follows that {hj′(z)}j=1∞\{h^{\prime}_{j}(z)\}_{j=1}^{\infty} converges to some h(z)h(z) for all values of zz.

Since both gj′g^{\prime}_{j} and hj′h^{\prime}_{j} individually converge point-wise to gg and hh (resp.), and we know that {gj′hj′}j=1∞\{g^{\prime}_{j}h^{\prime}_{j}\}_{j=1}^{\infty} converges point-wise to η\eta, it follows that η=gh\eta=gh.

We can assume without loss of generality that aa and bb are red, and cc is blue (since gg and hh are interchangeable).

Suppose by contradiction that there are a pair of values x′x^{\prime} and x′′x^{\prime\prime} of xx s.t. Gx′G_{x^{\prime}} contains both aa and bb, and Gx′′G_{x^{\prime\prime}} contains cc, and g(y′)h(z′)>0g(y^{\prime})h(z^{\prime})>0 and g(y′′)h(z′′)>0g(y^{\prime\prime})h(z^{\prime\prime})>0, where (y′,z′)(y^{\prime},z^{\prime}), and (y′′,z′′)(y^{\prime\prime},z^{\prime\prime}) are the values of (y,z)(y,z) corresponding to x′x^{\prime} and x′′x^{\prime\prime} respectively.

Let x′′′x^{\prime\prime\prime} denote a value of xx which agrees with y′y^{\prime} on yy and z′′z^{\prime\prime} on zz. Then clearly Gx′′′G_{x^{\prime\prime\prime}} contains all three edges of the constraint triangle and so cannot be a spanning tree, implying that d(x′′′)=0d(x^{\prime\prime\prime})=0.

But we have that both g(y′)>0g(y^{\prime})>0 and h(z′′)>0h(z^{\prime\prime})>0 (which follow from g(y′)h(z′)>0g(y^{\prime})h(z^{\prime})>0 and g(y′′)h(z′′)>0g(y^{\prime\prime})h(z^{\prime\prime})>0 respectively), and so d(x′′′)>0d(x^{\prime\prime\prime})>0, which is a contradiction.

Our strategy for lower bounding the number of dichromatic triangles will be to instead upper bound the total number of monochromatic triangles of KmK_{m}.

We will make use of a result of Fisher which says that given an arbitrary graph GG with ee edges, the number of triangles in GG is upper bounded by

Let G1G_{1} be the subgraph of KmK_{m} formed by taking only the red edges, and G2G_{2} the subgraph of KmK_{m} formed by taking only the blue ones. Clearly the number of monochromatic red (or blue) triangles in the original graph is just the number of total triangles in G1G_{1} (or G2G_{2}).

Applying the above upper bound to both G1G_{1} and G2G_{2} it thus follows that the total number of monochromatic triangles of the original colored graph is upper bounded by

For rr satisfying n/3≤r≤2n/3n/3\leq r\leq 2n/3 the function attains its maximum value at both r=n/3r=n/3 and r=2n/3r=2n/3, and is given by 2/3((1/3)3/2+(2/3)3/2)n3/2≤0.742/3 n3/2\sqrt{2}/3((1/3)^{3/2}+(2/3)^{3/2})n^{3/2}\leq 0.74\sqrt{2}/3\>n^{3/2} (by calculation). Using n=(m2)≤m2/2n=\binom{m}{2}\leq m^{2}/2, this upper bound can be written as 0.7423m3/23/2=0.74m3/60.74\frac{\sqrt{2}}{3}m^{3}/2^{3/2}=0.74m^{3}/6.

There are (m3)\binom{m}{3} total triangles in KmK_{m}. For m≥20m\geq 20, it is straightforward to verify that (m3)≥0.84m3/6\binom{m}{3}\geq 0.84m^{3}/6.

By subtracting the upper bound on the number of monochromatic triangles from the lower bound on the number of total triangles we arrive at the following lower bound on the total number of dichromatic triangles

Note that the proportion of spanning trees of KmK_{m} which obey all of the constraints can be interpreted as the probability that a sample from uniform distribution over all spanning trees of KmK_{m} (i.e. the distribution D\mathcal{D}) obeys all of the constraints. We will upper bound this probability by analyzing the behavior of a simple algorithm due to Aldous which samples from D\mathcal{D}.

The algorithm is described as follows. Starting with an empty graph TT and a uniformly sampled initial choice for the “current vertex” vv, it iterates the following steps. Uniformly sample one of the vertices uu of those adjacent to vv in GG, and make this the current vertex. If uu has not been previously visited, add the edge (v,u)(v,u) to TT.

The algorithm terminates once every vertex has been visited at least once.

For ease of exposition we will perform a minor modification to this algorithm by allowing the current vertex vv to be re-sampled (with the same probability as sampling any one of the adjacent vertices). Clearly this doesn’t change the distribution sampled by the algorithm.

Consider applying this algorithm with G=KmG=K_{m}. In this case it becomes particularly simple, since at each step it samples the next vertex uniformly at random from the set of all mm vertices, thus performing a uniform random walk on the graph.

For the sake of simplicity we will consider the sequence of vertices produced by this random walk in consecutive “stages” of 33 at a time. Note that the 3 vertices sampled at any given stage are done so uniformly from the set of all vertex triples (allowing repeats).

We will encode constraints as ordered triples of vertices, which we will call “constraint triples”. Each constraint of the first form is represented by a pair of constraint triples (u,v,w)(u,v,w) and (w,v,u)(w,v,u), where a=(u,v)a=(u,v) and b=(v,w)b=(v,w). And for convenience, we encode constraints of the second form similarly as triples (u,v,w)(u,v,w) and (w,v,u)(w,v,u) where c=(u,v)c=(u,v) and w≠u,vw\neq u,v can be any other vertex from KmK_{m}. This gives 2C2C total distinct constraint triples.

Note that if during the random walk on KmK_{m} the algorithm visits the vertices uu, vv and ww in consecutive order, and vv and ww have not yet been visited before, both the edges (u,v)(u,v) and (v,w)(v,w) will be added to TT. Thus, if such a uu, vv and ww are encountered where (u,v,w)(u,v,w) is a constraint triple, it is easy to see that the final TT will be in violation of the corresponding constraint.

Thus, of the m3m^{3} possible triples that can be sampled at stage i+1i+1, there at least 2C−3im(2m−3i)2C-3im(2m-3i) of them which correspond to constraint triples of the form (u,v,w)(u,v,w) where neither vv nor ww has been visited at a previous stage.

Conditioned on any previous choices made by the algorithm, the probability that the 3 vertices picked at stage i+1i+1 imply a constraint violation is lower bounded by the worst-case probability that they correspond to one of the remaining constraint triples. This is

and so the probability of no such violation occurring at stage i+1i+1, conditioned on any previous choices made by the algorithm, is upper bounded by

The probability of no such constraint violation occurring during the entire run of the algorithm is upper bounded by the probability of no such violation occurring by stage tt, which is itself upper bounded by