{"title": "Lifted Symmetry Detection and Breaking for MAP Inference", "book": "Advances in Neural Information Processing Systems", "page_first": 1315, "page_last": 1323, "abstract": "Symmetry breaking is a technique for speeding up propositional satisfiability testing by adding constraints to the theory that restrict the search space while preserving satisfiability. In this work, we extend symmetry breaking to the problem of model finding in weighted and unweighted relational theories, a class of problems that includes MAP inference in Markov Logic and similar statistical-relational languages. We introduce term symmetries, which are induced by an evidence set and extend to symmetries over a relational theory. We provide the important special case of term equivalent symmetries, showing that such symmetries can be found in low-degree polynomial time. We show how to break an exponential number of these symmetries with added constraints whose number is linear in the size of the domain. We demonstrate the effectiveness of these techniques through experiments in two relational domains. We also discuss the connections between relational symmetry breaking and work on lifted inference in statistical-relational reasoning.", "full_text": "Lifted Symmetry Detection and\nBreaking for MAP Inference\n\nTim Kopp\n\nUniversity of Rochester\n\nRochester, NY\n\nParag Singla\nI.I.T. Delhi\n\nHauz Khas, New Delhi\n\nHenry Kautz\n\nUniversity of Rochester\n\nRochester, NY\n\ntkopp@cs.rochester.edu\n\nparags@cse.iitd.ac.in\n\nkautz@cs.rochester.edu\n\nAbstract\n\nSymmetry breaking is a technique for speeding up propositional satis\ufb01ability test-\ning by adding constraints to the theory that restrict the search space while preserv-\ning satis\ufb01ability. In this work, we extend symmetry breaking to the problem of\nmodel \ufb01nding in weighted and unweighted relational theories, a class of problems\nthat includes MAP inference in Markov Logic and similar statistical-relational\nlanguages. We introduce term symmetries, which are induced by an evidence\nset and extend to symmetries over a relational theory. We provide the important\nspecial case of term equivalent symmetries, showing that such symmetries can\nbe found in low-degree polynomial time. We show how to break an exponential\nnumber of these symmetries with added constraints whose number is linear in the\nsize of the domain. We demonstrate the effectiveness of these techniques through\nexperiments in two relational domains. We also discuss the connections between\nrelational symmetry breaking and work on lifted inference in statistical-relational\nreasoning.\n\nIntroduction\n\n1\nSymmetry-breaking is an approach to speeding up satis\ufb01ability testing by adding constraints, called\nsymmetry-breaking predicates (SBPs), to a theory [7, 1, 16]. Symmetries in the theory de\ufb01ne a\npartitioning over the space of truth assignments, where the assignments in a partition either all satisfy\nor all fail to satisfy the theory. The added SBPs rule out some but not all of the truth assignments in\nthe partitions, thus reducing the size of the search space while preserving satis\ufb01ability.\nWe extend the notion of symmetry-breaking to model-\ufb01nding in relational theories. A relational\ntheory is speci\ufb01ed by a set of \ufb01rst-order axioms over \ufb01nite domains, optional weights on the axioms\nor predicates of the theory, and a set of ground literals representing evidence. By model \ufb01nding\nwe mean satis\ufb01ability testing (unweighted theories), weighted MaxSAT (weights on axioms), or\nmaximum weighted model \ufb01nding (weights on predicates). The weighted versions of model \ufb01nding\nencompass MAP inference in Markov Logic and similar statistical-relational languages.\nWe introduce methods for \ufb01nding symmetries in a relational theory that do not depend upon solving\ngraph isomorphism over its full propositional grounding. We show how graph isomorphism can be\napplied to just the evidence portion of a relational theory in order to \ufb01nd the set of what we call term\nsymmetries. We go on to de\ufb01ne the important subclass of term equivalent symmetries, and show that\nthey can be found in O(nM log M ) time where n is the number of constants and M is the size of\nthe evidence.\nNext we provide the formulation for breaking term and term equivalent symmetries. An inherent\nproblem in symmetry-breaking is that a propositional theory may have an exponential number of\nsymmetries, so breaking them individually would increase the size of the theory exponentially. This\nis typically handled by breaking only a portion of the symmetries. We show that term equivalent\nsymmetries provide a compact representation of exponentially many symmetries, and an exponen-\n\n1\n\n\ftially large subset of these can be broken by a small (linear) number of SBPs. We demonstrate these\nideas on two relational domains and compare our approach to other methods for MAP inference in\nMarkov Logic.\n2 Background\nSymmetry Breaking for SAT Symmetry-breaking for satis\ufb01ability testing, introduced by Craw-\nford et. al.[7], is based upon concepts from group theory. A permutation \u03b8 is a mapping from a set L\nto itself. A permutation group is a set of permutations that is closed under composition and contains\nthe identity and a unique inverse for every element. A literal is an atom or its negation. A clause\nis a disjunction over literals. A CNF theory T is a set (conjunction) of clauses. Let L be the set of\nliterals of T . We consider only permutations that respect negation, that is \u03b8(\u00acl) = \u00ac\u03b8(l) (l \u2208 L).\nThe action of a permutation on a theory, written \u03b8(T ), is the CNF formula created by applying \u03b8 to\neach literal in T . We say \u03b8 is a symmetry of T if it results in the same theory i.e. \u03b8(T ) = T .\nA model M is a truth assignment to the atoms of a theory. The action of \u03b8 on M, written \u03b8(M ),\nis the model where \u03b8(M )(P ) = M (\u03b8(P )). The key property of \u03b8 being a symmetry of T is that\nM |= T iff \u03b8(M ) |= T . The orbit of a model M under a symmetry group \u0398 is the set of models\nthat can be obtained by applying any of the symmetries in \u0398. A symmetry group divides the space\nof models into disjoint sets, where the models in an orbit either all satisfy or all do not satisfy the\ntheory. The idea of symmetry-breaking is to add clauses to T rule out many of the models, but are\nguaranteed to not rule out at least one model in each orbit. Note that symmetry-breaking preserves\nsatis\ufb01ability of a theory.\nSymmetries can be found in CNF theories using a reduction to graph isomorphism, a problem that is\nthought to require super-polynomial time in the worst case, but which can often be ef\ufb01ciently solved\nin practice [18]. The added clauses are called symmetry-breaking predicates (SBPs). If we place\na \ufb01xed order on the atoms of theory, then a model can be associated with a binary number, where\nthe i-th digit, 0 or 1, speci\ufb01es the value of the i-th atom, false or true. Lex-leader SBPs rule out\nmodels that are not the lexicographically-smallest members of their orbits. The formulation below\nis equivalent to the lex-leader SBP given by Crawford et. al. in [7]:\n\n(cid:94)\n\n(cid:16) (cid:94)\n\nSBP (\u03b8) =\n\n1\u2264i\u2264n\n\n1\u2264j<i\n\n(cid:17) \u21d2 vi \u21d2 \u03b8(vi)\n\nvj \u21d4 \u03b8(vj)\n\n(1)\n\nwhere vi is the ith variable in the ordering of n variables, and \u03b8 is a symmetry over variables.\nEven though graph isomorphism is relatively fast in practice, a theory may have exponentially many\nsymmetries. Therefore, breaking all the symmetries is often impractical, though partial symmetry-\nbreaking is still useful. It is possible to devise new SBPs that can break exponentially more symme-\ntries than the standard form described above; we do so in Section 5.2.\nRelational Theories We de\ufb01ne a relational theory as a tuple T = (F, W,E), where F is a set\nof \ufb01rst-order formulas, W a mapping of predicates and negated predicates to strictly positive real\nnumbers (weights), and E is a set of evidence. We restrict the formulas in F to be built from\npredicates, variables, quanti\ufb01ers, and logical connectives, but no constants or function symbols. E\nis a set of ground literals; that is, literals built from predicates and constant symbols. The predicate\narguments and constant symbols are typed. Universal and existential quanti\ufb01cation is over the set of\nthe theory\u2019s constants D (i.e. the constants that appear in its evidence). Any constants not appearing\nexplicitly in the evidence can be incorporated by introducing a unary predicate for each constant\ntype and adding the groundings for those constants to the evidence. Any formula containing a\nconstant can be made constant-free, by introducing a new unary predicate for each constant, and\nthen including that predicate applied to that constant in the evidence. A ground theory can be seen\nas a special case of a relational theory where each predicate is argument free.\nWe de\ufb01ne the weight of a positive ground literal P (C1, . . . , Ck) of a theory as W (P ), and the weight\nof negative ground literal \u00acP (C1, . . . , Ck) as W (\u00acP ). In other words, all positive groundings of a\nliteral have the same weight, as do all negative groundings. The weight of model M with respect\nto a theory (F, W,E) is 0 if M fails to satisfy any part of F or E; otherwise, it is the product of the\nweights of the ground atoms that are true in M. Maximum weighted model-\ufb01nding is the task for\n\ufb01nding a model of maximum weight with respect to T . A relational theory can be taken to de\ufb01ne a\nprobability distribution over the set of models, where the probability of model is proportional to its\n\n2\n\n\fweight. Maximum weighted model-\ufb01nding thus computes MAP (most probable explanation) for a\ngiven theory. Ordinary satis\ufb01ability corresponds to the case where W simply sets the weights of all\nliterals to 1.\nLanguages such as Markov Logic [12] use an alternative representation and specify real-valued\nweights on formulas rather than positive weights on predicates and their negations. The MAP prob-\nlem can be formulated as the weighted-MaxSAT problem, i.e. \ufb01nding a model maximizing the sum\nof the weights of satis\ufb01ed clauses. This can be translated to our notation by introducing a new pred-\nicate for each original formula, whose arguments are the free variables in the original formula. F\nasserts that the predicate is equivalent to the original formula, and W asserts that the weight of the\nnew predicate is e raised to the weight of the original formula. Solving weighted MaxSAT in the\nalternate representation is thus identical to solving maximum weighted model-\ufb01nding in the trans-\nlated theory. For the rest of the discussion in this paper, we will assume that the theory is speci\ufb01ed\nwith weights on predicates (and their negations).\n3 Related Work\nOur work has connections to research in both the machine learning and constraint-satisfaction re-\nsearch communities. Most research in statistical-relational machine learning has concentrated on\nmodifying or creating novel probabilistic inference algorithms to exploit symmetries, as opposed to\nsymmetry-breaking\u2019s solver-independent approach. Developments include lifted versions of vari-\nable elimination [27, 8], message passing [29, 30, 23], and DPLL [14]. Our approach of de\ufb01ning\nsymmetries using group theory and detecting them by graph isomorphism is shared by Bui et al.\u2019s\nwork on lifted variational inference [5] and Apsel et al.\u2019s work on cluster signatures [2]. Bui notes\nthat symmetry groups can be de\ufb01ned on the basis of unobserved constants in the domain, while we\nhave developed methods to explicitly \ufb01nd symmetries among constants that do appear in the evi-\ndence. Niepert also gives a group-theoretic formalism of symmetries in relational theories [24, 25],\napplying them to MCMC methods. Another line of work is to make use of problem transformations.\nFirst-order knowledge compilation [10, 11] transforms a relational problem into a form for which\nMAP and marginal inference is tractable. This is a much more extensive and computationally com-\nplex transformation than symmetry-breaking. Mladenov et al. [22] propose an approach to translate\na linear program over a relational domain into an equivalent lifted linear program based on message\npassing computations, which can then be solved using any off-the-shelf LP solver. Recent work\non MAP inference in Markov Logic has identi\ufb01ed special cases where a relational formula can be\ntransformed by replacing a quanti\ufb01ed formula with a single grounding of the formula [21].\nRelatively little work in SRL has explicitly examined the role of evidence, separate from the \ufb01rst-\norder part of a theory, on symmetries. One exception is [31], which presents a heuristic method\nfor approximating an evidence set in order to increase the number of symmetries it induces. Bui et\nal. [4] consider the case of a theory plus evidence pair, where the theory has symmetries that are\nbroken by the evidence. They show that if the evidence is soft and consists only of unary predicates,\nthen lifting based on the theory followed by incorporation of evidence enables polynomial time\ninference. Extending the results of [4], Van Den Broeck and Darwiche [9] show that dealing with\nbinary evidence is NP-hard in general but can be done ef\ufb01ciently if there is a corresponding low\nrank Boolean matrix factorization. They also propose approximation schemes based on this idea.\nWe brie\ufb02y touch upon the extensive literature that has grown around the use of symmetries in con-\nstraint satisfaction. Symmetry detection has been based either on graph isomorphism on proposi-\ntional theories as in the original work by by Crawford et. al [7]; by interchangeability of row and/or\ncolumns in CSPs speci\ufb01ed in matrix form [20]; by checking for other special cases of geometric\nsymmetries [28], or by determining that domain elements for a variable are exchangeable [3]. (The\nlast is a special case of our term equivalent symmetries.) Researchers have suggested symmetry-\naware modi\ufb01cations to backtracking CSP solvers for variable selection, branch pruning, and no-\ngood learning [20, 13]. A recent survey of symmetry breaking for CSP [32] described alternatives\nto the lex-leader formulation of SBPs, including one based on Gray codes.\n4 Symmetries in Relational Theories\nIn this section, we will formally introduce the notion of symmetries over relational theories and\ngive ef\ufb01cient algorithms to \ufb01nd them. Symmetries of a relational theory can be de\ufb01ned in terms of\nsymmetries over the corresponding ground theory.\n\n3\n\n\fDe\ufb01nition 4.1. Let T denote a relational theory. Let the T G denote the theory obtained by grounding\nthe formulas in T . Let L denote the set of (ground) literals in T G. We say that a permutation \u03b8 of\nthe set L is a symmetry of the relational theory T if \u03b8 maps the ground theory T G back to itself\ni.e. \u03b8(T G) = T G. We denote the action of \u03b8 on the original theory as \u03b8(T ) = T .\nA straightforward way to \ufb01nd symmetries over a relational theory T is to \ufb01rst map it to correspond-\ning ground theory T G and then \ufb01nd symmetries over it using reduction to graph isomorphism. The\ncomplexity of \ufb01nding symmetries in this way is the same as that of graph isomorphism, which is\nbelieved to be worst-case super-polynomial. Further, the number of symmetries found is potentially\nexponential in the number of ground literals. This is particularly signi\ufb01cant for relational theories\nsince the number of ground literals itself is exponential in the highest predicate arity. Computing\nsymmetries at the ground level can therefore be prohibitively expensive for theories with high pred-\nicate arity and many constants. In our work below, we exploit the underlying template structure of\nthe relational theory to directly generate symmetries based on the evidence.\n\n4.1 Term Symmetries\nWe introduce the notion of symmetries de\ufb01ned over terms (constants) appearing in a theory T , called\nterm symmetries.\nDe\ufb01nition 4.2. Let T be a relational theory. Let D be the set of constants appearing in the theory.\nThen, a permutation \u03b8 over the term set D is said to be a term symmetry with respect to evidence E\nif application of \u03b8 on the terms appearing in E, denoted by \u03b8(E), maps E back to itself. We will also\nrefer to \u03b8 as an evidence symmetry for the set E.\nThe problem of \ufb01nding term symmetries can be reduced to colored graph isomorphism. We con-\nstruct a graph G as follows: for each predicate P and it\u2019s negation, G has a node and a unique color\nis assigned to every such node. G also has a unique color for each type in the domain. There is a\nnode for every term which takes the color of its type. We call an ordered list of terms an argument\nlist, e.g., given the literal P (C1, C2), where C1, C2 \u2208 D, the argument list is (C1, C2). The type of\nan argument list is simply the cross-product of the types of the terms appearing in it. G has a node\nfor every argument list appearing in the evidence, which takes the color of its type.\nFor every evidence literal, there is an edge between the predicate node (or its negation) and the\ncorresponding argument list node. There is also an edge between the argument list node and each of\nthe terms appearing in the list. Thus, for the previous example, an edge will be placed between the\nnode for P and the node for (C1, C2), as well as an edge each between (C1, C2) and the nodes for\nC1 and C2.\nAny automorphism of G will map (negated) predicate nodes to themselves and terms will be mapped\nin a manner that their association with the corresponding predicate node in the evidence is preserved.\nHence, automorphisms of G will correspond to term symmetries in evidence E. Next, we will\nestablish a relationship between permutation of terms in the evidence to the permutations of literals\nin the ground theory.\nDe\ufb01nition 4.3. Let T be a relational theory. Let E be the evidence set and let D be the set of\nterms appearing in E. Given a permutation \u03b8 of the terms in the set D, we associate a corre-\nsponding permutation \u03b8T over the ground literals of the form P (C1, C2, . . . , Ck) in T , such that\n\u03b8T (P (C1, C2, . . . , Ck)) = P (\u03b8(C1), \u03b8(C2), . . . , \u03b8(Ck)) (and similarly for negated literals).\nWe can now associate a symmetry \u03b8 over the terms with a symmetry of the theory T . The following\nlemma is proven in the supplementary material:\nLemma 4.1. Let T be a relational theory. Let E denote the evidence set. Let D be the set of terms\nappearing in E. If \u03b8 is term symmetry for the evidence E, then, the associated theory permutation\n\u03b8T is also a symmetry of T .\nIn order to \ufb01nd the term symmetries, we can resort to solving a graph isomorphism problem of\nsize O(|E|), where |E| is the number of literals in the evidence. Directly \ufb01nding symmetries over the\nground literals requires solving a problem of size O(|D|k), |D| being the set of constants and k being\nthe highest predicate arity. In the worst case where everything is fully observed, |E| = O(|D|k), but\nin practice it is much smaller. Next, we present an important subclass of term symmetries, called\nterm equivalent symmetries, which capture a wide subset of all the symmetries present in the theory,\nand can be ef\ufb01ciently detected and broken.\n\n4\n\n\f4.2 Term Equivalent Symmetries\nA term equivalent symmetry is a set of term symmetries that divides the set of terms into equivalence\nclasses such that any permutation which maps terms within the same equivalence class is a symmetry\nof the evidence set. Let Z = {Z1, Z2, . . . , Zm} denote a partition of the term set D into m disjoint\nsubsets. Given a partition Z, we say that two terms are term equivalent (with respect to Z) if they\noccur in the same component of Z. We de\ufb01ne a partition preserving permutation as follows.\nDe\ufb01nition 4.4. Given a set of terms D and its disjoint partition Z, we say that a permutation \u03b8 of the\nterms in D is a partition preserving permutation of D with respect to the partition Z if \u2200Cj, Ck \u2208\nD, \u03b8(Cj) = Ck implies that \u2203 Zi \u2208 Z st Cj, Ck \u2208 Zi. In other words, \u03b8 is partition preserving if it\npermutes terms within the same component of Z.\nThe set of all partition preserving permutations (with respect to a partition Z) forms a group. We\nwill denote this group by \u0398Z. It is easy to see that \u0398Z divides the set of terms in equivalence classes.\nNext, we de\ufb01ne the notion of term equivalent symmetries.\nDe\ufb01nition 4.5. Let T be a relational theory and E denote the evidence set. Let D be the set of terms\nin E and Z be a disjoint partition of terms in D. Then, given the partition preserving permutation\n\u0398Z, we say that \u0398Z is a term equivalent symmetry group of D, if \u2200\u03b8 \u2208 \u0398Z, \u03b8 is a symmetry of E.\nWe will refer to each symmetry \u03b8 \u2208 \u0398Z as a term equivalent symmetry of E.\nA partition Z of term set D is a term equivalent partition if the partition preserving group \u0398Z is\na symmetry group of D. We refer to each partition element Zi as a term equivalent subset. The\nterm equivalent symmetry group can be thought of as a set of symmetry subgroups \u0398Zi\u2019s, one for\neach term subset Zi, such that, Zi allows for all possible permutations of terms within the set Zi\nand de\ufb01nes an identity mapping for terms in other subsets. Note that the size of term equivalent\ni=1|Zi|!. Despite its large size, it can be very ef\ufb01ciently represented\nsymmetry group is given by \u03a0m\nby simply storing the partition Z over the term set D. Note that this formulation works equally well\nfor typed as well untyped theories; in a typed theory no two terms of differing types can appear in the\nsame subset. Next, we will look at an ef\ufb01cient algorithm for \ufb01nding a partition Z which corresponds\nto a term equivalent symmetry group over D.\nLet the evidence be given by E = {l1, l2, . . . , lk}, where each li is a ground literal. Intuitively,\ntwo terms are term equivalent if they occur in exactly the same context in the evidence. For\nexample, if evidence for constant A is {P1(A, X), P2(A, Y, A)}, then the context for term A is\nP1(\u2217, X), P2(\u2217, Y,\u2217). Note that here the positions where A occurred in the evidence has been\nmarked by a \u2217. Any other term sharing the same context would be term equivalent to A. To \ufb01nd\nthe set of all the equivalent terms, we \ufb01rst compute the context for each term. Then, we sort each\ncontext based on some lexicographic order de\ufb01ned over predicate symbols and term symbols. Once\nthe context has been sorted, we can simply hash the context for each term and put those which have\nthe same context in the same equivalence class. If the evidence size is given by |E| = M and number\nof terms in evidence is n, then, the above procedure will take O(nM log(M )) time. The M log(M )\nfactor is for sorting the context for a single term. Hashing the sorted term takes constant time. This\nis done for each term, hence the factor of n. See the supplement for more details and an example.\n5 Breaking Symmetries Over Terms\nIn this section, we provide the SBP formulation for term as well as term equivalent symmetries.\n5.1 Breaking Term Symmetries\nConsider a relational theory T that has term symmetries {\u03b81, . . . , \u03b8k}. Fix an ordering P1, . . . , Pr\nover the predicates, an ordering over the predicate positions, and an ordering C1, . . . , C|D| over the\nterms. If T is typed, \ufb01x an ordering over types and an ordering over the terms within each type.\nThis induces a straightforward ordering over the ground atoms of the theory G1, . . . , Gn.\nLet \u03b8 be a term symmetry. Consider the following SBP (based on Equation 1) to break \u03b8:\n\n(cid:17) \u21d2 Gi \u21d2 \u03b8(Gi)\n\nGj \u21d4 \u03b8(Gj)\n\n(cid:94)\n\n(cid:16) (cid:94)\n\nSBP (\u03b8) =\n\n1\u2264i\u2264n\n\n1\u2264j<i\n\nTheorem 5.1. If T is weighted, the max model for T \u2227 SBP (\u03b8) is a max model for T , and it has\nthe same weight in both theories.\n\n5\n\n\fThe proof of this theorem follows from [7]. Essentially, an ordering is placed on the atoms of the\ntheory, which induces an ordering on the models. The SBP constraints ensure that if a set of models\nare in the same orbit, i.e. symmetric under \u03b8, then only the \ufb01rst of those models in the ordering is\nadmitted.\n5.2 Breaking Term Equivalent Symmetries\nLet Z = {Z1, . . . , Z|Z|} be the term equivalent partitioning over the terms. Let \u03b8i\nj,k be the term\nsymmetry that swaps Cj and Ck, the jth and kth constants in an ordering over the term equivalent\nsubset Zi, and maps everything else to identity. We next show how to break exponentially many\nsymmetries that respect the term equivalent partition Z, using a linear-sized SBP. Consider the\nfollowing SBP (CSBP stands for Composite SBP):\n\n|Z|(cid:94)\n\n|Zi|\u22121(cid:94)\n\nCSBP (Z) =\n\nSBP (\u03b8i\n\nj,j+1)\n\ni=1\n\nj=1\nFor each term (equivalent) symmetry of the form \u03b8i\nj,j+1, we apply the SBP formulation from Sec-\ntion 5.1 to break it. The formulation is cleverly choosing which symmetries to explicitly break, so\nthat exponentially many symmetries are broken. The inner conjunction iterates over all of the terms\nin a term equivalent class. An ordering is placed on the terms, and the only symmetries that are\nexplicitly broken are those that swap two adjacent terms and map everything else to identity. All\nof the adjacent pairs of terms in the ordering are broken in this way, with a linear number of calls\nto SBP. As we show below, this excludes \u2126(2|Zi|) models from the search space, while preserving\nat least one model in each orbit. The outer conjunction iterates over the different term equivalent\nsubsets, breaking each one of them in turn. The following theorem states this in formal terms (see\nthe supplement for a proof):\n\nTheorem 5.2. CSBP (Z) removes \u2126((cid:80)|Z|\n\ni=1 2|Zi|) models from the search space while preserving\nat least one model in each orbit induced by the term equivalent symmetry group \u0398Z.\nCorollary 5.1. If T is weighted, the max model for T \u2227 CSBP (Z) is a max model for T , and it\nhas the same weight in both theories.\n6 Experiments\nWe pitted our term and term equivalent SBP formulations against other inference systems to demon-\nstrate their ef\ufb01cacy. For each domain we tested on, we compared the following algorithms:\n(1) Vanilla: running an exact MaxSAT solver on the grounded instance (2) Shatter: running an\nexact MaxSAT solver on the grounded instance with SBPs added by the Shatter tool [1], (3) Term:\nrunning an exact MaxSAT solver on the grounded instance with SBPs added by our term symmetry\ndetection algorithm, (4) Tequiv: running an exact MaxSAT solver on the grounded instance with\nSBPs added by our term equivalent symmetry detection algorithm (5) RockIt: running RockIt [26]\non the MLN, (6) PTP: running the PTP algorithm [14] for marginal inference 1 on the MLN and\n(7) MWS: running the approximate MaxWalkSAT algorithm used by Alchemy-22 on the grounded\ninstance. These algorithms were chosen so that our methods would be compared against a variety of\nother techniques: ground techniques including regular MaxSAT (Vanilla), propositional symmetry-\nbreaking (Shatter), local search (MWS), and lifted techniques including cutting planes (RockIt) and\nlifted rules (PTP). It should be noted that all the algorithms except MWS and RockIt are exact.\nRockIt solves an LP relaxation but it always gave us an exact solution (whenever it could run).\nTherefore, we report the solution quality only for MWS. All the experiments were run on a system\nwith a 2.2GHz Xeon processor and 62GB of memory.\nThe algorithms for Term and Tequiv were implemented as a pre-processing step before running a\nMaxSAT solver. The MWS runs were allowed a varying number of \ufb02ips and up to \ufb01ve restarts.\nFor MWS, the reported results are with equal probability (0.5) of making a random or a greedy\nmove; other settings were tried, and the results were similar. Both PTP and RockIt were run using\nthe default setting of their parameters. We experimented on two relational domains: the classic\npigeonhole problem (PHP) with two different variants, and an Advisor domain (details below).\n\n1The publicly available implementation of PTP only supports marginal inference. Though marginal infer-\n\nence is somewhat harder problem than MAP, PTP failed to run even on the smallest of instances.\n\n2https://code.google.com/p/alchemy-2/\n\n6\n\n\fFor ground instances that required an exact MaxSAT solver, we experimented with three different\nsolvers: MiniMaxSAT [15], Open-WBO [19], and Sat4j [17]. This was done because different\nsolvers and heuristics tend to work better on different application domains. We found that for PHP\n(variant 1) Sat4j worked best, for PHP (variant 2) Open-WBO was the best and for Advisor Mini-\nMaxSAT worked the best. We used the best MaxSAT solver for each domain.\nPHP: In the PHP problem, we are given n pigeons and n\u22121 holes. The goal is to \ufb01t each pigeon in a\nunique hole (the problem is unsatis\ufb01able). We tried two variants of this problem. In the \ufb01rst variant,\nthere are hard constraints that ensure that every hole has at most one pigeon and every pigeon is\nin at most one hole. There is a soft constraint that states that every pigeon is in every hole. The\ngoal is to \ufb01nd a max-model of the problem. The comparison with various algorithms is given in\nTable 1a. Vanilla times out except for the smallest instance. PTP times out on all instances. Our\nalgorithms consistently outperform RockIt but are not able to outperform shatter (except for smaller\ninstances where they are marginally better). MWS was run on the largest instance (n=60) and results\nare shown in Table 1d. MWS is unable to \ufb01nd the optimal solution after 10 million \ufb02ips.\nIn the second PHP variant, there are hard constraints that ensure that every pigeon is in precisely one\nhole. There is a soft constraint that each hole has at most one pigeon. The comparison with various\nalgorithms is given in in Table 1b. Vanilla times out except for the two smallest instances, and PTP\ntimes out for all the instances. Our systems consistently outperform RockIt, and outperform shatter\nfor the larger instances. Tequiv outperforms Term because the detection step is much faster. MWS\n(Table 1d) is able to \ufb01nd the optimal within 100,000 \ufb02ips and is signi\ufb01cantly faster than all other\nalgorithms. Though MWS does better on this variant of PHP, it fails badly on the \ufb01rst one. Further,\nthere is no way for MWS to know if it has reached the optimal unlike our (exact) approaches.\nAdvisor Domain: The advisor-advisee domain has three types: student, prof, and a research area.\nThere are predicates to indicate student/prof interest in an area and an advisor relationship between\nstudents and profs. The theory has hard constraints that ensure that a) each student has precisely one\nadvisor b) students and their advisors share an interest. It also has a small negatively-weighted (soft)\nconstraint saying that a prof advises two different students. The interests of all students and profs\nare fully observed. Students have one interest, profs have one or more (chosen randomly). There\nis at least one prof interested in each area. The results for this domain are given in Table 1c gives\nthe comparisons. Vanilla is able to run only on the two smallest instances. PTP times out on every\ninstance as before. Our algorithms outpeform shatter but is outperformed by RockIt. MWS was run\non the two larger sized instances (see Table 1c) and it is able to outperform our system.\nIn order to make sure that poor performance of PTP is not due to evidence, we modi\ufb01ed the PHP\nformulation to work with a no evidence formulation. This did not help PTP either. Based on these\nresults, there is no clear winner among the algorithms which performs the best on all of these do-\nmains. Among all the algorithms, Term, Tequiv and Shatter are the only ones which could run to\ncompletion on all the instances that we tried. Among these, our algorithms won on PHP variant\n2 (large instances) and the Advisor domain. Tequiv outperformed Term on PHP variant 2 (large\ninstances), and they performed similarly in the Advisor domain.\nIn the PHP variants, all of the pigeons are in one term equivalent symmetry group, and all of the\nholes are in another. The PHP is of special interest, because pigeonhole structure was shown to be\npresent in hard random SAT formulas with very high probability [6]. In the advisor domain, there\nis a term equivalent symmetry group of students for each area, and term equivalent symmetry group\nof professors for each set of areas.\n7 Conclusion and Future Work\nIn this work, we have provided the theoretical foundation for using symmetry-breaking techniques\nfrom satis\ufb01ability testing for MAP inference in weighted relational theories. We have presented the\nclass of term symmetries, and a subclass of term equivalent symmetries, both of which are found in\nthe evidence given with the theory. We have presented ways to detect and break both these classes.\nFor the class of term equivalent symmetries, the detection method runs in low-polynomial time, and\nthe number of SBPs required to break the symmetries is linear in the domain size. the algorithms\npresented, and compared them against other systems on a set of relational domains. Future work\nincludes carefully characterizing the cases where our algorithms perform better than other systems,\nexperimenting on additional real-world domains, comparing with more lifted inference approaches,\nand the application of similar techniques to the problem of marginal inference.\n\n7\n\n\fTable 1: Experiments with Lifted Symmetries for MAP Inference\n\n#Pigeon Vanilla\n0.246\n\n(a) Soft Pigeon Hole Domain \u2014 Variant 1\nTerm\n\nShatter\n\nTequiv\n\n0.01 + 0.39\nTO 0.02 + 0.88\nTO 0.08 + 1.85\nTO 0.22 + 3.1\nTO\n1.6 + 12.7\nTO\nTO\n\n7 + 72\n54 + 889\n\n0.01 + 0.24\n0.04 + 0.74\n0.13 + 1.37\n0.36 + 3.9\n1.4 + 20\n4.06 + 93.3\n18 + 1128\n\n0.03 + 0.26\n0.09 + 0.68\n0.21 + 1.27\n0.51 + 3.7\n2.2 + 14\n6.30 + 88.3\n28 + 1128\n\nRockIt\n1.15\n1.47\n2.46\n2.70\n3.88\nF\nF\n\nPTP\nTO\nTO\nTO\nTO\nTO\nTO\nTO\n\n5\n10\n15\n20\n30\n40\n60\n\n(b) Soft Pigeon Hole Domain \u2014 Variant 2\n\n#Pigeon Vanilla\n0.002\n37.44\nTO\nTO\nTO\nTO\n\n5\n10\n15\n40\n80\n125\n\nShatter\n\n0.003 + 0.001\n0.01 + 0.006\n0.06 + 0.01\n3.7 + 0.59\n115 + 8.36\n1090 + 20.98\n\nTequiv\n\n1.28 + 0.002\n1.19 + 0.004\n1.29 + 0.01\n4.9 + 0.17\n50 + 1.7\n269 + 10\n\nTerm\n\n0.04 + 0.001\n0.07 + 0.005\n0.19 + 0.01\n6.2 + 0.21\n86 + 2.9\n486 + 18\n\nRockIt\n\n1.1\n6.6\nTO\nF\nF\nF\n\nPTP\nTO\nTO\nTO\nTO\nTO\nTO\n\n(c) Advisor Domain\nShatter\n\nTequiv\n\n#Prof\u2013#Student\u2013#Area Vanilla\n0.01 + 0.10\n2.3\n168\n0.01 + 0.17\nTO 0.02 + 0.90\nTO 0.03 + 105\nTO 0.07 + 62\n\n4\u201312\u20132\n4\u201316\u20132\n6\u201318\u20133\n6\u201324\u20133\n8\u201324\u20134\n\n0.02 + 0.01\n0.03 + 0.05\n0.05 + 0.84\n0.07 + 45\n0.10 + 56\n\nTerm\n\n0.11 + 0.01\n0.08 + 0.04\n0.09 + 0.80\n0.15 + 47\n0.16 + 55\n\nRockIt\n1.25\n2.06\n6.56\n1.47\n13.4\n\nPTP\nTO\nTO\nTO\nTO\nTO\n\n(d) MaxWalkSAT Results\n\nProblem\n\nSize\n\nOptimal\n\npigeon1\npigeon2\nadvisor\nadvisor\n\n60\n125\n\n6\u201318\u20133\n8\u201324\u20134\n\n3481\n\n1\n\n2094\n3552\n\n100,000\n\nbest\n3496\n\n1\n\n2094\n3552\n\ntime\n4.4\n3.8\n0.4\n0.5\n\n1,000,000\ntime\nbest\n39\n3494\n\u2014\n\u2014\n\u2014\n\u2014\n\u2014\n\u2014\n\n10,000,000\ntime\nbest\n383\n3491\n\u2014\n\u2014\n\u2014\n\u2014\n\u2014\n\u2014\n\nAll times are given in seconds. \u201cTO\u201d indicates the program timed out (30min). \u201cF\u201d indicates the program failed\nwithout timeout (instance too large). The vanilla column is the time to \ufb01nd the max model of the ground theory.\nThe \ufb01rst three subtables give results for exact algorithms. The Shatter, Term, and Tequiv columns are the\nsame with propositional, term and term equivalent symmetries broken, respectively. These columns are given\nas x + y, where x is the time to detect and break the symmetries, and y is the time to \ufb01nd the max model.\nThe RockIt column is the time it takes RockIt to \ufb01nd the max model. The lifted PTP algorithm was run on\nevery instance, and timed out on each instance. The last table gives the results for the approximate algorithm\nMaxWalkSAT, giving the time it takes to perform a certain number of iterations, as well as the comparison\nbetween the best model found on that run and the optimal model.\n\nReferences\n[1] Fadi A. Aloul, Igor L. Markov, and Karem A. Sakallah. Shatter: ef\ufb01cient symmetry-breaking for boolean\n\nsatis\ufb01ability. In Proc. of DAC, pages 836\u2013839, 2003.\n\n[2] Udi Apsel, Kristian Kersting, and Martin Mladenov. Lifting relational MAP-LPs using cluster signatures.\n\nIn Proc. of AAAI, pages 2403\u20132409, 2014.\n\n[3] Gilles Audemard, Belaid Benhamou, and Laurent Henocque. Predicting and detecting symmetries in FOL\n\n\ufb01nite model search. J. Automated Reasoning, 36(3):177\u2013212, 2006.\n\n[4] Hung B. Bui, Tuyen N. Huynh, and Rodrigo de Salvo Braz. Exact lifted inference with distinct soft\n\nevidence on every object. In Proc. of AAAI, 2012.\n\n8\n\n\f[5] Hung Hai Bui, Tuyen N. Huynh, and Sebastian Riedel. Automorphism groups of graphical models and\n\nlifted variational inference. In Proc. of UAI, pages 132\u2013141, 2013.\n\n[6] Vasek Chv\u00b4atal and Endre Szemer\u00b4edi. Many hard examples for resolution. J. ACM, 35(4):759\u2013768, 1988.\n[7] James Crawford, Matthew Ginsberg, Eugene Luks, and Amitabha Roy. Symmetry-breaking predicates\n\nfor search problems. In Proc. of KR, pages 148\u2013159, 1996.\n\n[8] Rodrigo de Salvo Braz, Eyal Amir, and Dan Roth. Lifted \ufb01rst-order probabilistic inference. In Proc. of\n\nIJCAI, pages 1319\u20131325, 2005.\n\n[9] Guy Van den Broeck and Adnan Darwiche. On the complexity and approximation of binary evidence in\n\nlifted inference. In Proc. of NIPS, pages 2868\u20132876, 2013.\n\n[10] Guy Van den Broeck and Jesse Davis. Conditioning in \ufb01rst-order knowledge compilation and lifted\n\nprobabilistic inference. In Proc. of AAAI, 2012.\n\n[11] Guy Van den Broeck, Nima Taghipour, Wannes Meert, Jesse Davis, and Luc De Raedt. Lifted probabilistic\n\ninference by \ufb01rst-order knowledge compilation. In Proc. of IJCAI, pages 2178\u20132185, 2011.\n\n[12] Pedro Domingos and Daniel Lowd. Markov Logic: An Interface Layer for Arti\ufb01cial Intelligence. Synthe-\n\nsis Lectures on Arti\ufb01cial Intelligence and Machine Learning. Morgan & Claypool Publishers, 2009.\n\n[13] Pierre Flener, Justin Pearson, Meinolf Sellmann, Pascal Van Hentenryck, and Magnus Agren. Dynamic\n\nstructural symmetry breaking for constraint satisfaction problems. Constraints, 14(4):506\u2013538, 2009.\n\n[14] Vibhav Gogate and Pedro M. Domingos. Probabilistic theorem proving. In Proc. of UAI, pages 256\u2013265,\n\n2011.\n\n[15] Federico Heras, Javier Larrosa, and Albert Oliveras. MiniMaxSAT: An Ef\ufb01cient Weighted Max-SAT\n\nsolver. J. Arti\ufb01cial Intelligence Research, 31:1\u201332, 2008.\n\n[16] Hadi Katebi, Karem A. Sakallah, and Igor L. Markov. Symmetry and satis\ufb01ability: An update. In Theory\n\nand Applications of Satis\ufb01ability Testing, volume 6175, pages 113\u2013127, 2010.\n\n[17] Daniel Le Berre and Anne Parrain. The Sat4j library, release 2.2. JSAT, 7:59\u201364, 2010.\n[18] E. M. Luks. Isomorphism of graphs of bounded valence can be tested in polynomial time. J. of Computer\n\nSystem Science, 25:42\u201365, 1982.\n\n[19] Ruben Martins, Vasco Manquinho, and In\u02c6es Lynce. Open-WBO: A modular maxsat solver,. In Theory\n\nand Applications of Satis\ufb01ability Testing, volume 8561 of Lecture Notes in Computer Science. 2014.\n\n[20] Pedro Meseguer and Carme Torras. Exploiting symmetries within constraint satisfaction search. Arti\ufb01cial\n\nIntelligence, 129(1-2):133\u2013163, 2001.\n\n[21] Happy Mittal, Prasoon Goyal, Vibhav G. Gogate, and Parag Singla. New rules for domain independent\n\nlifted MAP inference. In Proc. of NIPS, pages 649\u2013657, 2014.\n\n[22] Martin Mladenov, Babak Ahmadi, and Kristian Kersting. Lifted linear programming. In Proc, of AISTATS,\n\npages 788\u2013797, 2012.\n\n[23] Martin Mladenov, Amir Globerson, and Kristian Kersting. Lifted message passing as reparametrization\n\nof graphical models. In Proc. of UAI, pages 603\u2013612, 2014.\n\n[24] Mathias Niepert. Markov chains on orbits of permutation groups. In Proc, of UAI, pages 624\u2013633, 2012.\n[25] Mathias Niepert. Symmetry-aware marginal density estimation. In Proc. of AAAI, 2013.\n[26] Jan Noessner, Mathias Niepert, and Heiner Stuckenschmidt. Rockit: Exploiting parallelism and symmetry\n\nfor MAP inference in statistical relational models. In Proc. of AAAI, 2013.\n\n[27] David Poole. First-order probabilistic inference. In Proc. of IJCAI, pages 985\u2013991, 2003.\n[28] Meinolf Sellmann and Pascal Van Hentenryck. Structural symmetry breaking. In Proc. of IJCAI, pages\n\n298\u2013303, 2005.\n\n[29] Parag Singla and Pedro Domingos. Lifted \ufb01rst-order belief propagation. In Proc. of AAAI, pages 1094\u2013\n\n1099, 2008.\n\n[30] Parag Singla, Aniruddh Nath, and Pedro M. Domingos. Approximate lifting techniques for belief propa-\n\ngation. In Proc. of AAAI, pages 2497\u20132504, 2014.\n\n[31] Deepak Venugopal and Vibhav Gogate. Evidence-based clustering for scalable inference in Markov logic.\n\nIn Proc. of ECML/PKDD, pages 258\u2013273, 2014.\n\n[32] Toby Walsh. Symmetry breaking constraints: Recent results. In Proc. of AAAI, 2012.\n\n9\n\n\f", "award": [], "sourceid": 815, "authors": [{"given_name": "Timothy", "family_name": "Kopp", "institution": "University of Rochester"}, {"given_name": "Parag", "family_name": "Singla", "institution": "Indian Institute of Technology"}, {"given_name": "Henry", "family_name": "Kautz", "institution": "University of Rochester"}]}