Anytime Anyspace ANDOR Search for Bounding the Partition
Anytime Anyspace AND/OR Search for Bounding the Partition Function Qi Lou, Rina Dechter, Alexander Ihler Feb. 8, 2017 1
Guideline q Anytime bounds for the partition function of a graphical model. § Estimate (bound) the partition function as a heuristic search problem on AND/OR search trees § Best-first search using pre-compiled variational heuristics and carefully designed priorities. § Operate with limited-memory settings 2
Background 3
Graphical Models q A graphical model (X, D, F): q Bayesian networks, Markov random fields (MRF), factor graphs, etc. § Example model (MRF): A 0 0 1 1 B 0 1 f(A, B) 0. 24 0. 56 1. 2 … B 0 0 1 1 C 0 1 f(B, C) 0. 12 0. 36 0. 3 1. 7 A 4 B C Primal Graph
Graphical Models q Typical Queries § Maximum A Posteriori (MAP) / Most Probable Explanation (MPE) § The Partition Function 5
Bounding the Partition Function Z q Deterministic methods § § § Elimination based (e. g. , mini-bucket elimination [Dechter and Rish 2001]) Variational approaches (e. g. , tree-reweighted belief propagation [Wainwright et al. 2003]) Search based (e. g. , [Viricel et al. 2016]) q Monte Carlo methods § § Importance sampling based (e. g. , [Liu et al. 2015, Bidyuk and Dechter 2007]) Approximate hash-based counting (e. g. , [Chakraborty et al. 2016]) 6
Algorithm 7
OR Search Tree F A G F C primal graph 1 B B 1 0 C 1 C C 0 1 0 1 D D D D 01 01 10 10 E E E E F F F 0 1 01 F A 0 C E D Solution path: corresponds to a complete configuration of all variables 0 B F F F F 10 1 0 F F F F F 0 1 0 1 0 1 01 1 0 1 0 1 0 1 0 GG GGG GG GG GGG GG GG GG 010101010101010101010101010101010 8
AND/OR Search Tree A F [Nillson 1980, Dechter and Mateescu 2007] A G Solution tree: corresponds to a OR complete configuration of all AND variables 0 1 OR B B AND OR C AND OR AND 1 C 0 E 1 D E C 0 D E 1 D E D E F E D C F G E pseudo tree 1 1 D C [Freuder and Quinn 1985] 0 0 E primal graph C 0 B D A 0 B D F F F 0 1 0 1 G G G G 0 1 0 10 1 0 10 1 0 1 0 1 9
Cost g(n): A Product of functions fully instantiated by the path from the root to node n. 0 1 B B 1 0 C C 0 E 1 D E C 0 D E 1 D E E 1 D F C 0 D 1 0 E 0 D E 1 D E D F F F 0 1 0 1 G G G G 0 1 0 10 1 0 10 1 0 1 0 1 10
Value and Heuristic A Value v(n): Mass of the subtree rooted at node n Heuristic h(n): Estimate of v(n) 0 1 B B 1 0 C C 0 E 1 D E C 0 D E 1 D E E 1 D F C 0 D 1 0 E 0 D E 1 D E D F F F 0 1 0 1 G G G G 0 1 0 10 1 0 10 1 0 1 0 1 11
Estimate Z via Search on AND/OR Trees A B C D E G pseudo tree A 0 F 1 15
Estimate Z via Search on AND/OR Trees A B C D 1 B 0 E G pseudo tree A 0 F 1 15
Key Issues q How to design high-quality heuristics? § Quality of the estimate largely depends on the quality of heuristics 14
Weighted Mini-Bucket (WMB) Heuristics [Liu and Ihler 2011] … A f(A) λB (A) q WMB heuristics are formed by messages from descendants. q WMB heuristics are upper (or lower) bounds of the node value. q WMB heuristics are monotonic. § Resolving mini-buckets makes heuristics more (no less) accurate. B f(A, B) λC (B) λD (A) λF (A, B) C f(B, C) λD (B, C) D f(A, D) D f(B, D) f(C, D) F λE (B, C) E f(B, E) f(C, E) 15 f(B, F) λG (A, F) G f(A, G) f(F, G)
Key Issues (revisited) q How to design high-quality heuristics? § Quality of the estimate largely depends on the quality of heuristics q How to design an effective search strategy? § Our goal: quickly close the bound gap U - L • U : = upper bound of Z • L : = lower bound of Z § Equivalent: how to set priority for frontier nodes. 16
Priority q Intuition: expand the frontier node that potentially reduces the bound gap U - L most A 1 0 B gap priority 0 B 1 0 upper priority 1 C F Strategy: Expand the frontier node 0 1 0 value! 1 with the largest priority q bounds the global bound gap reduction on Z if the subtree beneath n is fully expanded. 17
Overcome the Memory Limit q Main strategy (SMA*-like [Russell 1992]) § § Keep track of the lowest-priority node as well When reach the memory limit, delete the lowest-priority nodes, and keep expanding the top-priority ones 18
Experiment 19
AND/OR Best-first Search (AOBFS) q Variants of our algorithm § A-G: AND/OR search tree with gap priority § A-U: AND/OR search tree with upper priority § O-G: OR search tree with gap priority [Henrion 1991] 20
Baselines [Viricel et al. 2016] q § A recent depth-first branch-and-bound search algorithm that provides deterministic upper and lower bounds on Z. § For a given ɛ, it returns (non-anytime) bounds on ln. Z whose gap is at most ln(1+ɛ). q VEC [Dechter 1999, 2013] § Variable Elimination with Conditioning, also known as custetconditioning) § Apply variable elimination to each assignment of the cutset. q MMAP-DFS [Marinescu et al. 2014] (abbreviated M-D) § A state-of-the-art method for marginal MAP using AND/OR search § Solve the internal summation problem exactly using depth-first search aided by WMB heuristics. 21
Benchmarks q PIC’ 11: 23 instances selected by [Viricel et al. 2016] from the 2012 UAI competition q BN: Bayesian networks from the 2006 competition (50 randomly selected instances) q Protein: made from the “small” protein side-chains of [Yanover and Weiss 2002] (50 randomly selected instances) q CPD: computational protein design problems from [Viricel et al. 2016] (100 randomly selected instances) 22
Parameters q Implementation § all methods are implemented in C++ by the original authors q Runtime: § 1 hour q Memory: § 1 GB, 4 GB and 16 GB § i-bound determined by memory 23
Results q Anytime behavior of AOBFS (a) PIC’ 11/queen 5_5_4 (b) Protein/1 g 6 x 24
Results q Number of instances solved to “tight” tolerance interval. The best (most solved) for each setting is bolded. 25
Results q Number of instances solved to “loose” tolerance interval. The best (most solved) for each setting is bolded. 26
Results q A-G sometimes effectively solve (<1 e-3) instances with very high width given relatively few highweight configurations of the model. § § “ 1 who” is solved in 12 seconds and 1 GB memory, while the corresponding junction tree requires about 150 GB memory; “ 2 fcr” is solved in 21 minutes and 16 GB memory, while junction tree would require approximately 3. 5 PB. 27
Summary q Best-first search algorithm for bounding the partition function § Bounds in an anytime fashion within limited memory resources. § Search runs on AND/OR trees that enable exploiting conditional independence § Priority-driven best-first search scheme based on precompiled variational heuristics § Outperform state-of-the-art baselines on multiple benchmark & memory setups 28
Thank You! Q&A 29
- Slides: 29