Reliability of Critical Infrastructure Networks • G = ( V , E ); source node: s and terminal node t • failure probability g : E → [0 , 1] • Compute Pr[ s and t are disconnected]? • π : Configuration (of network) denoted by a 0 / 1 vector of size | E | • W ( π ) = Pr( π ) • π s , t : configuration where s and t are Figure: Plantersville, disconnected SC – Represented as a solution to set of constraints over edge variables • Pr[s and t are disconnected] = � π s , t W ( π s , t ) 13/35
Reliability of Critical Infrastructure Networks • G = ( V , E ); source node: s and terminal node t • failure probability g : E → [0 , 1] • Compute Pr[ s and t are disconnected]? • π : Configuration (of network) denoted by a 0 / 1 vector of size | E | • W ( π ) = Pr( π ) • π s , t : configuration where s and t are Figure: Plantersville, disconnected SC – Represented as a solution to set of constraints over edge variables • Pr[s and t are disconnected] = � π s , t W ( π s , t ) Constrained Counting ( DMPV, AAAI 17, RESS 2018) 13/35
Probabilistic Models Patient Cough Smoker Asthma Alice 1 0 0 Bob 0 0 1 Smoker ( S ) Asthma ( A ) Randee 1 0 0 Tova 1 1 1 Azucena 1 0 0 Georgine 1 1 0 Cough ( C ) Shoshana 1 0 1 Lina 0 0 1 Hermine 1 1 1 14/35
Probabilistic Models Patient Cough Smoker Asthma Alice 1 0 0 Bob 0 0 1 Smoker ( S ) Asthma ( A ) Randee 1 0 0 Tova 1 1 1 Azucena 1 0 0 Georgine 1 1 0 Cough ( C ) Shoshana 1 0 1 Lina 0 0 1 Hermine 1 1 1 14/35
Probabilistic Models Patient Cough Smoker Asthma Alice 1 0 0 Bob 0 0 1 Smoker ( S ) Asthma ( A ) Randee 1 0 0 Tova 1 1 1 Azucena 1 0 0 Georgine 1 1 0 Cough ( C ) Shoshana 1 0 1 Lina 0 0 1 Hermine 1 1 1 Pr[Asthma( A ) | Cough( C )] = Pr[ A ∩ C ] Pr[ C ] 14/35
Probabilistic Models Patient Cough Smoker Asthma Alice 1 0 0 Bob 0 0 1 Smoker ( S ) Asthma ( A ) Randee 1 0 0 Tova 1 1 1 Azucena 1 0 0 Georgine 1 1 0 Cough ( C ) Shoshana 1 0 1 Lina 0 0 1 Hermine 1 1 1 Pr[Asthma( A ) | Cough( C )] = Pr[ A ∩ C ] Pr[ C ] F = A ∧ C 14/35
Probabilistic Models Patient Cough Smoker Asthma Alice 1 0 0 Bob 0 0 1 Smoker ( S ) Asthma ( A ) Randee 1 0 0 Tova 1 1 1 Azucena 1 0 0 Georgine 1 1 0 Cough ( C ) Shoshana 1 0 1 Lina 0 0 1 Hermine 1 1 1 Pr[Asthma( A ) | Cough( C )] = Pr[ A ∩ C ] Pr[ C ] F = A ∧ C Sol( F ) = { ( A , C , S ) , ( A , C , ¯ S ) } 14/35
Probabilistic Models Patient Cough Smoker Asthma Alice 1 0 0 Bob 0 0 1 Smoker ( S ) Asthma ( A ) Randee 1 0 0 Tova 1 1 1 Azucena 1 0 0 Georgine 1 1 0 Cough ( C ) Shoshana 1 0 1 Lina 0 0 1 Hermine 1 1 1 Pr[Asthma( A ) | Cough( C )] = Pr[ A ∩ C ] Pr[ C ] F = A ∧ C Sol( F ) = { ( A , C , S ) , ( A , C , ¯ S ) } Pr[ A ∩ C ] = Σ y ∈ Sol( F ) W ( y ) = W ( F ) Constrained Counting (Roth, 1996) 14/35
Prior Work Strong guarantees but poor scalability • Exact counters (Birnbaum and Lozinskii 1999, Jr. and Schrag 1997, Sang et al. 2004, Thurley 2006) • Hashing-based approach (Stockmeyer 1983, Jerrum Valiant and Vazirani 1986) Weak guarantees but impressive scalability • Bounding counters (Gomes et al. 2007,Kroc, Sabharwal, and Selman 2008, Gomes, Sabharwal, and Selman 2006, Kroc, Sabharwal, and Selman 2008) • Sampling-based techniques (Wei and Selman 2005, Rubinstein 2012, Gogate and Dechter 2011) 15/35
Prior Work Strong guarantees but poor scalability • Exact counters (Birnbaum and Lozinskii 1999, Jr. and Schrag 1997, Sang et al. 2004, Thurley 2006) • Hashing-based approach (Stockmeyer 1983, Jerrum Valiant and Vazirani 1986) Weak guarantees but impressive scalability • Bounding counters (Gomes et al. 2007,Kroc, Sabharwal, and Selman 2008, Gomes, Sabharwal, and Selman 2006, Kroc, Sabharwal, and Selman 2008) • Sampling-based techniques (Wei and Selman 2005, Rubinstein 2012, Gogate and Dechter 2011) How to bridge this gap between theory and practice? 15/35
Constrained Counting • Given – Boolean variables X 1 , X 2 , · · · X n – Formula F over X 1 , X 2 , · · · X n – Weight Function W : { 0 , 1 } n �→ [0 , 1] • ExactCount( F , W ): Compute W ( F )? – #P-complete (Valiant 1979) 16/35
Constrained Counting • Given – Boolean variables X 1 , X 2 , · · · X n – Formula F over X 1 , X 2 , · · · X n – Weight Function W : { 0 , 1 } n �→ [0 , 1] • ExactCount( F , W ): Compute W ( F )? – #P-complete (Valiant 1979) • ApproxCount( F , W , ε, δ ): Compute C such that Pr[ W ( F ) 1 + ε ≤ C ≤ W ( F )(1 + ε )] ≥ 1 − δ 16/35
From Weighted to Unweighted Counting Boolean Formula F ′ Boolean Formula F and weight function W : { 0 , 1 } n → Q ≥ 0 W ( F ) = c ( W ) × | Sol( F ′ ) | • Key Idea: Encode weight function as a set of constraints 17/35
From Weighted to Unweighted Counting Boolean Formula F ′ Boolean Formula F and weight function W : { 0 , 1 } n → Q ≥ 0 W ( F ) = c ( W ) × | Sol( F ′ ) | • Key Idea: Encode weight function as a set of constraints • Caveat: | F ′ | = O ( | F | + | W | ) ( CFMV, IJCAI15) 17/35
From Weighted to Unweighted Counting Boolean Formula F ′ Boolean Formula F and weight function W : { 0 , 1 } n → Q ≥ 0 W ( F ) = c ( W ) × | Sol( F ′ ) | • Key Idea: Encode weight function as a set of constraints • Caveat: | F ′ | = O ( | F | + | W | ) ( CFMV, IJCAI15) How do we estimate | Sol( F ′ ) | ? 17/35
Counting in Chennai How many people in Chennai like coffee? • Population of Chennai = 7.1M • Assign every person a unique ( n =) 23 bit identifier (2 n = 7.1M) 18/35
Counting in Chennai How many people in Chennai like coffee? • Population of Chennai = 7.1M • Assign every person a unique ( n =) 23 bit identifier (2 n = 7.1M) • Attempt #1: Pick 50 people and count how many of them like coffee and multiple by 7.1M/50 18/35
Counting in Chennai How many people in Chennai like coffee? • Population of Chennai = 7.1M • Assign every person a unique ( n =) 23 bit identifier (2 n = 7.1M) • Attempt #1: Pick 50 people and count how many of them like coffee and multiple by 7.1M/50 – If only 5 people like coffee, it is unlikely that we will find anyone who likes coffee in our sample of 50 18/35
Counting in Chennai How many people in Chennai like coffee? • Population of Chennai = 7.1M • Assign every person a unique ( n =) 23 bit identifier (2 n = 7.1M) • Attempt #1: Pick 50 people and count how many of them like coffee and multiple by 7.1M/50 – If only 5 people like coffee, it is unlikely that we will find anyone who likes coffee in our sample of 50 • SAT Query: Find a person who likes coffee 18/35
Counting in Chennai How many people in Chennai like coffee? • Population of Chennai = 7.1M • Assign every person a unique ( n =) 23 bit identifier (2 n = 7.1M) • Attempt #1: Pick 50 people and count how many of them like coffee and multiple by 7.1M/50 – If only 5 people like coffee, it is unlikely that we will find anyone who likes coffee in our sample of 50 • SAT Query: Find a person who likes coffee • A SAT solver can answer queries like: – Q1: Find a person who likes coffee – Q2: Find a person who likes coffee and is not person y 18/35
Counting in Chennai How many people in Chennai like coffee? • Population of Chennai = 7.1M • Assign every person a unique ( n =) 23 bit identifier (2 n = 7.1M) • Attempt #1: Pick 50 people and count how many of them like coffee and multiple by 7.1M/50 – If only 5 people like coffee, it is unlikely that we will find anyone who likes coffee in our sample of 50 • SAT Query: Find a person who likes coffee • A SAT solver can answer queries like: – Q1: Find a person who likes coffee – Q2: Find a person who likes coffee and is not person y • Attempt #2: Enumerate every person who likes coffee 18/35
Counting in Chennai How many people in Chennai like coffee? • Population of Chennai = 7.1M • Assign every person a unique ( n =) 23 bit identifier (2 n = 7.1M) • Attempt #1: Pick 50 people and count how many of them like coffee and multiple by 7.1M/50 – If only 5 people like coffee, it is unlikely that we will find anyone who likes coffee in our sample of 50 • SAT Query: Find a person who likes coffee • A SAT solver can answer queries like: – Q1: Find a person who likes coffee – Q2: Find a person who likes coffee and is not person y • Attempt #2: Enumerate every person who likes coffee – Potentially 2 n queries Can we do with lesser # of SAT queries – O ( n ) or O (log n )? 18/35
As Simple as Counting Dots 19/35
As Simple as Counting Dots 19/35
As Simple as Counting Dots Pick a random cell Estimate = Number of solutions in a cell × Number of cells 19/35
Challenges Challenge 1 How to partition into roughly equal small cells of solutions without knowing the distribution of solutions? 20/35
Challenges Challenge 1 How to partition into roughly equal small cells of solutions without knowing the distribution of solutions? Challenge 2 How many cells? 20/35
Challenges Challenge 1 How to partition into roughly equal small cells of solutions without knowing the distribution of solutions? • Designing function h : assignments → cells (hashing) • Solutions in a cell α : Sol( F ) ∩ { y | h ( y ) = α } 20/35
Challenges Challenge 1 How to partition into roughly equal small cells of solutions without knowing the distribution of solutions? • Designing function h : assignments → cells (hashing) • Solutions in a cell α : Sol( F ) ∩ { y | h ( y ) = α } • Deterministic h unlikely to work 20/35
Challenges Challenge 1 How to partition into roughly equal small cells of solutions without knowing the distribution of solutions? • Designing function h : assignments → cells (hashing) • Solutions in a cell α : Sol( F ) ∩ { y | h ( y ) = α } • Deterministic h unlikely to work • Choose h randomly from a large family H of hash functions Universal Hashing (Carter and Wegman 1977) 20/35
2-Universal Hashing • Let H be family of 2-universal hash functions mapping { 0 , 1 } n to { 0 , 1 } m R ∀ y 1 , y 2 ∈ { 0 , 1 } n , α 1 , α 2 ∈ { 0 , 1 } m , h ← − H � 1 � Pr[ h ( y 1 ) = α 1 ] = Pr[ h ( y 2 ) = α 2 ] = 2 m � 1 � 2 Pr[ h ( y 1 ) = α 1 ∧ h ( y 2 ) = α 2 ] = 2 m 21/35
2-Universal Hashing • Let H be family of 2-universal hash functions mapping { 0 , 1 } n to { 0 , 1 } m R ∀ y 1 , y 2 ∈ { 0 , 1 } n , α 1 , α 2 ∈ { 0 , 1 } m , h ← − H � 1 � Pr[ h ( y 1 ) = α 1 ] = Pr[ h ( y 2 ) = α 2 ] = 2 m � 1 � 2 Pr[ h ( y 1 ) = α 1 ∧ h ( y 2 ) = α 2 ] = 2 m • The power of 2-universality – Z be the number of solutions in a randomly chosen cell – E[ Z ] = | Sol( F ) | 2 m – σ 2 [ Z ] ≤ E[ Z ] 21/35
2-Universal Hash Functions • Variables: X 1 , X 2 , · · · X n • To construct h : { 0 , 1 } n → { 0 , 1 } m , choose m random XORs • Pick every X i with prob. 1 2 and XOR them – X 1 ⊕ X 3 ⊕ X 6 · · · ⊕ X n − 2 – Expected size of each XOR: n 2 22/35
2-Universal Hash Functions • Variables: X 1 , X 2 , · · · X n • To construct h : { 0 , 1 } n → { 0 , 1 } m , choose m random XORs • Pick every X i with prob. 1 2 and XOR them – X 1 ⊕ X 3 ⊕ X 6 · · · ⊕ X n − 2 – Expected size of each XOR: n 2 • To choose α ∈ { 0 , 1 } m , set every XOR equation to 0 or 1 randomly X 1 ⊕ X 3 ⊕ X 6 · · · ⊕ X n − 2 = 0 ( Q 1 ) X 2 ⊕ X 5 ⊕ X 6 · · · ⊕ X n − 1 = 1 ( Q 2 ) ( · · · ) · · · X 1 ⊕ X 2 ⊕ X 5 · · · ⊕ X n − 2 = 1 ( Q m ) • Solutions in a cell: F ∧ Q 1 · · · ∧ Q m 22/35
2-Universal Hash Functions • Variables: X 1 , X 2 , · · · X n • To construct h : { 0 , 1 } n → { 0 , 1 } m , choose m random XORs • Pick every X i with prob. 1 2 and XOR them – X 1 ⊕ X 3 ⊕ X 6 · · · ⊕ X n − 2 – Expected size of each XOR: n 2 • To choose α ∈ { 0 , 1 } m , set every XOR equation to 0 or 1 randomly X 1 ⊕ X 3 ⊕ X 6 · · · ⊕ X n − 2 = 0 ( Q 1 ) X 2 ⊕ X 5 ⊕ X 6 · · · ⊕ X n − 1 = 1 ( Q 2 ) ( · · · ) · · · X 1 ⊕ X 2 ⊕ X 5 · · · ⊕ X n − 2 = 1 ( Q m ) • Solutions in a cell: F ∧ Q 1 · · · ∧ Q m • Performance of state of the art SAT solvers degrade with increase in the size of XORs (SAT Solvers != SAT oracles) 22/35
Improved Universal Hash Functions • Not all variables are required to specify solution space of F – F := X 3 ⇐ ⇒ ( X 1 ∨ X 2 ) – X 1 and X 2 uniquely determines rest of the variables (i.e., X 3 ) • Formally: if I is independent support, then ∀ σ 1 , σ 2 ∈ Sol( F ), if σ 1 and σ 2 agree on I then σ 1 = σ 2 – { X 1 , X 2 } is independent support but { X 1 , X 3 } is not 23/35
Improved Universal Hash Functions • Not all variables are required to specify solution space of F – F := X 3 ⇐ ⇒ ( X 1 ∨ X 2 ) – X 1 and X 2 uniquely determines rest of the variables (i.e., X 3 ) • Formally: if I is independent support, then ∀ σ 1 , σ 2 ∈ Sol( F ), if σ 1 and σ 2 agree on I then σ 1 = σ 2 – { X 1 , X 2 } is independent support but { X 1 , X 3 } is not • Random XORs need to be constructed only over I ( CMV DAC14) 23/35
Improved Universal Hash Functions • Not all variables are required to specify solution space of F – F := X 3 ⇐ ⇒ ( X 1 ∨ X 2 ) – X 1 and X 2 uniquely determines rest of the variables (i.e., X 3 ) • Formally: if I is independent support, then ∀ σ 1 , σ 2 ∈ Sol( F ), if σ 1 and σ 2 agree on I then σ 1 = σ 2 – { X 1 , X 2 } is independent support but { X 1 , X 3 } is not • Random XORs need to be constructed only over I ( CMV DAC14) • Typically I is 1-2 orders of magnitude smaller than X • Auxiliary variables introduced during encoding phase are dependent (Tseitin 1968) 23/35
Improved Universal Hash Functions • Not all variables are required to specify solution space of F – F := X 3 ⇐ ⇒ ( X 1 ∨ X 2 ) – X 1 and X 2 uniquely determines rest of the variables (i.e., X 3 ) • Formally: if I is independent support, then ∀ σ 1 , σ 2 ∈ Sol( F ), if σ 1 and σ 2 agree on I then σ 1 = σ 2 – { X 1 , X 2 } is independent support but { X 1 , X 3 } is not • Random XORs need to be constructed only over I ( CMV DAC14) • Typically I is 1-2 orders of magnitude smaller than X • Auxiliary variables introduced during encoding phase are dependent (Tseitin 1968) Algorithmic procedure to determine I ? 23/35
Improved Universal Hash Functions • Not all variables are required to specify solution space of F – F := X 3 ⇐ ⇒ ( X 1 ∨ X 2 ) – X 1 and X 2 uniquely determines rest of the variables (i.e., X 3 ) • Formally: if I is independent support, then ∀ σ 1 , σ 2 ∈ Sol( F ), if σ 1 and σ 2 agree on I then σ 1 = σ 2 – { X 1 , X 2 } is independent support but { X 1 , X 3 } is not • Random XORs need to be constructed only over I ( CMV DAC14) • Typically I is 1-2 orders of magnitude smaller than X • Auxiliary variables introduced during encoding phase are dependent (Tseitin 1968) Algorithmic procedure to determine I ? • FP NP procedure via reduction to Minimal Unsatisfiable Subset 23/35
Improved Universal Hash Functions • Not all variables are required to specify solution space of F – F := X 3 ⇐ ⇒ ( X 1 ∨ X 2 ) – X 1 and X 2 uniquely determines rest of the variables (i.e., X 3 ) • Formally: if I is independent support, then ∀ σ 1 , σ 2 ∈ Sol( F ), if σ 1 and σ 2 agree on I then σ 1 = σ 2 – { X 1 , X 2 } is independent support but { X 1 , X 3 } is not • Random XORs need to be constructed only over I ( CMV DAC14) • Typically I is 1-2 orders of magnitude smaller than X • Auxiliary variables introduced during encoding phase are dependent (Tseitin 1968) Algorithmic procedure to determine I ? • FP NP procedure via reduction to Minimal Unsatisfiable Subset • Two orders of magnitude runtime improvement ( IMMV CP15, Best Student Paper) ( IMMV Constraints16, Invited Paper) 23/35
Challenges Challenge 1 How to partition into roughly equal small cells of solutions without knowing the distribution of solutions? • Independent Support-based 2-Universal Hash Functions Challenge 2 How many cells? 24/35
Question 2: How many cells? ε ) 2 solutions thresh = 5(1 + 1 • A cell is small if it has 25/35
Question 2: How many cells? ε ) 2 solutions thresh = 5(1 + 1 • A cell is small if it has • We want to partition into 2 m ∗ cells such that 2 m ∗ = | Sol( F ) | thresh 25/35
Question 2: How many cells? ε ) 2 solutions thresh = 5(1 + 1 • A cell is small if it has • We want to partition into 2 m ∗ cells such that 2 m ∗ = | Sol( F ) | thresh – Check for every m = 0 , 1 , · · · n if the number of solutions ≤ thresh 25/35
ApproxMC( F , ε, δ ) # of sols ≤ thresh ? 26/35
ApproxMC( F , ε, δ ) No # of sols # of sols ≤ thresh ? ≤ thresh ? 26/35
ApproxMC( F , ε, δ ) No No # of sols # of sols ≤ thresh ? ≤ thresh ? 26/35
ApproxMC( F , ε, δ ) No No # of sols # of sols ≤ thresh ? ≤ thresh ? # of sols ≤ thresh ? No · · · # of sols ≤ thresh ? 26/35
ApproxMC( F , ε, δ ) No No # of sols # of sols ≤ thresh ? ≤ thresh ? # of sols ≤ thresh ? No Estimate = Yes # of sols × · · · # of cells # of sols ≤ thresh ? 26/35
ApproxMC( F , ε, δ ) • We want to partition into 2 m ∗ cells such that 2 m ∗ = | Sol( F ) | thresh – Query 1: Is #( F ∧ Q 1 ) ≤ thresh – Query 2: Is #( F ∧ Q 1 ∧ Q 2 ) ≤ thresh – · · · – Query n : Is #( F ∧ Q 1 ∧ Q 2 · · · ∧ Q n ) ≤ thresh • Stop at the first m where Query m returns YES and return estimate as #( F ∧ Q 1 ∧ Q 2 · · · ∧ Q m ) × 2 m • Observation: #( F ∧ Q 1 · · · ∧ Q i ∧ Q i +1 ) ≤ #( F ∧ Q 1 · · · ∧ Q i ) – If Query i returns YES, then Query i + 1 must return YES 27/35
ApproxMC( F , ε, δ ) • We want to partition into 2 m ∗ cells such that 2 m ∗ = | Sol( F ) | thresh – Query 1: Is #( F ∧ Q 1 ) ≤ thresh – Query 2: Is #( F ∧ Q 1 ∧ Q 2 ) ≤ thresh – · · · – Query n : Is #( F ∧ Q 1 ∧ Q 2 · · · ∧ Q n ) ≤ thresh • Stop at the first m where Query m returns YES and return estimate as #( F ∧ Q 1 ∧ Q 2 · · · ∧ Q m ) × 2 m • Observation: #( F ∧ Q 1 · · · ∧ Q i ∧ Q i +1 ) ≤ #( F ∧ Q 1 · · · ∧ Q i ) – If Query i returns YES, then Query i + 1 must return YES – Logarithmic search (# of SAT calls: O (log n )) 27/35
ApproxMC( F , ε, δ ) • We want to partition into 2 m ∗ cells such that 2 m ∗ = | Sol( F ) | thresh – Query 1: Is #( F ∧ Q 1 ) ≤ thresh – Query 2: Is #( F ∧ Q 1 ∧ Q 2 ) ≤ thresh – · · · – Query n : Is #( F ∧ Q 1 ∧ Q 2 · · · ∧ Q n ) ≤ thresh • Stop at the first m where Query m returns YES and return estimate as #( F ∧ Q 1 ∧ Q 2 · · · ∧ Q m ) × 2 m • Observation: #( F ∧ Q 1 · · · ∧ Q i ∧ Q i +1 ) ≤ #( F ∧ Q 1 · · · ∧ Q i ) – If Query i returns YES, then Query i + 1 must return YES – Logarithmic search (# of SAT calls: O (log n )) • Will this work? Will the “ m ” where we stop be close to m ∗ ? 27/35
ApproxMC( F , ε, δ ) • We want to partition into 2 m ∗ cells such that 2 m ∗ = | Sol( F ) | thresh – Query 1: Is #( F ∧ Q 1 ) ≤ thresh – Query 2: Is #( F ∧ Q 1 ∧ Q 2 ) ≤ thresh – · · · – Query n : Is #( F ∧ Q 1 ∧ Q 2 · · · ∧ Q n ) ≤ thresh • Stop at the first m where Query m returns YES and return estimate as #( F ∧ Q 1 ∧ Q 2 · · · ∧ Q m ) × 2 m • Observation: #( F ∧ Q 1 · · · ∧ Q i ∧ Q i +1 ) ≤ #( F ∧ Q 1 · · · ∧ Q i ) – If Query i returns YES, then Query i + 1 must return YES – Logarithmic search (# of SAT calls: O (log n )) • Will this work? Will the “ m ” where we stop be close to m ∗ ? – Challenge Query i and Query j are not independent – Independence crucial to analysis (Stockmeyer 1983, · · · ) 27/35
ApproxMC( F , ε, δ ) • We want to partition into 2 m ∗ cells such that 2 m ∗ = | Sol( F ) | thresh – Query 1: Is #( F ∧ Q 1 ) ≤ thresh – Query 2: Is #( F ∧ Q 1 ∧ Q 2 ) ≤ thresh – · · · – Query n : Is #( F ∧ Q 1 ∧ Q 2 · · · ∧ Q n ) ≤ thresh • Stop at the first m where Query m returns YES and return estimate as #( F ∧ Q 1 ∧ Q 2 · · · ∧ Q m ) × 2 m • Observation: #( F ∧ Q 1 · · · ∧ Q i ∧ Q i +1 ) ≤ #( F ∧ Q 1 · · · ∧ Q i ) – If Query i returns YES, then Query i + 1 must return YES – Logarithmic search (# of SAT calls: O (log n )) • Will this work? Will the “ m ” where we stop be close to m ∗ ? – Challenge Query i and Query j are not independent – Independence crucial to analysis (Stockmeyer 1983, · · · ) – Key Insight: The probability of making a bad choice of Q i is very small for i ≪ m ∗ ( CMV, IJCAI16) 27/35
Taming the Curse of Dependence Let 2 m ∗ = | Sol( F ) | thresh ( m ∗ = log( | Sol( F ) | thresh )) Lemma (1) ApproxMC ( F , ε, δ ) terminates with m ∈ { m ∗ − 1 , m ∗ } with probability ≥ 0.8 Lemma (2) For m ∈ { m ∗ − 1 , m ∗ } , estimate obtained from a randomly picked cell lies within a tolerance of ε of | Sol( F ) | with probability ≥ 0.8 28/35
ApproxMC( F , ε, δ ) Theorem (Correctness) � � | Sol( F ) | Pr ≤ ApproxMC ( F , ε, δ ) ≤ | Sol( F ) | (1 + ε ) ≥ 1 − δ 1+ ε Theorem (Complexity) log n log( 1 δ ) ApproxMC ( F , ε, δ ) makes O ( ) calls to SAT oracle. ε 2 n log n log( 1 δ ) • Prior work required O ( ) calls to SAT oracle (Stockmeyer ε 1983) 29/35
ApproxMC( F , ε, δ ) Theorem (Correctness) � � | Sol( F ) | Pr ≤ ApproxMC ( F , ε, δ ) ≤ | Sol( F ) | (1 + ε ) ≥ 1 − δ 1+ ε Theorem (Complexity) log n log( 1 δ ) ApproxMC ( F , ε, δ ) makes O ( ) calls to SAT oracle. ε 2 n log n log( 1 δ ) • Prior work required O ( ) calls to SAT oracle (Stockmeyer ε 1983) Theorem (FPRAS for DNF; (MSV, FSTTCS 17; CP 18, Invited Paper)) If F is a DNF formula, then ApproxMC is FPRAS – fundamentally different from the only other known FPRAS for DNF (Karp, Luby 1983) 29/35
Reliability of Critical Infrastructure Networks 1 , 000 800 Time(seconds) 600 Figure: Plantersville, 400 SC 200 • G = ( V , E ); source node: s • Compute Pr[ t is 10 20 30 40 50 60 disconnected]? Terminal Timeout = 1000 seconds ( DMPV, AAAI17) 30/35
Reliability of Critical Infrastructure Networks 1 , 000 RDA 800 Time(seconds) 600 Figure: Plantersville, 400 SC 200 • G = ( V , E ); source node: s • Compute Pr[ t is 10 20 30 40 50 60 disconnected]? Terminal Timeout = 1000 seconds ( DMPV, AAAI17) 30/35
Reliability of Critical Infrastructure Networks 1 , 000 RDA ApproxMC 800 Time(seconds) 600 Figure: Plantersville, 400 SC 200 • G = ( V , E ); source node: s • Compute Pr[ t is 10 20 30 40 50 60 disconnected]? Terminal Timeout = 1000 seconds ( DMPV, AAAI17) 30/35
Beyond Network Reliability (CFMSV, AAAI14), (IMMV, Probabilistic CP15), (CFMV, IJCAI15), (CMMV, Inference AAAI16), (CMV, IJCAI16) Quantified Network (DMPV, ApproxMC Information AAAI17) Reliability Flow Fremont, Rabe and Seshia 2017, BEHLM Q-18, Bang-2018 (CFMSV, AAAI14), Fremont Program et al 2017, Ellis et al 2017, Synthesis Raghothaman et al 2018 31/35
32/35
Speedup over 2012 state of the art 10 6 10 5 AAAI19 10 4 IJCAI 16a IJCAI16b AAAI16 10 3 IJCAI15 CP 15 TACAS 15 10 2 DAC 14 AAAI 14 CP 13 10 1 CAV 13 2012 2013 2014 2015 2016 2019 32/35
Mission 2025: Constrained Counting Revolution Speedup over 2012 state of the art 10 6 10 5 10 4 10 3 10 2 10 1 2012 2014 2016 2020 2022 2024 2025 Requires combinations of ideas from theory, statistics and systems 32/35
Mission 2025: Constrained Counting Revolution • Extending to SMT (CMMV, AAAI16) 33/35
Mission 2025: Constrained Counting Revolution • Extending to SMT (CMMV, AAAI16) • Tighter integration between solvers and algorithms (SM, AAAI19) 33/35
Mission 2025: Constrained Counting Revolution • Extending to SMT (CMMV, AAAI16) • Tighter integration between solvers and algorithms (SM, AAAI19) • Handling weighted distributions: Connections to theory of integration 33/35
Mission 2025: Constrained Counting Revolution • Extending to SMT (CMMV, AAAI16) • Tighter integration between solvers and algorithms (SM, AAAI19) • Handling weighted distributions: Connections to theory of integration • Verification of counting (CM, AAAI19) 33/35
Mission 2025: Constrained Counting Revolution • Extending to SMT (CMMV, AAAI16) • Tighter integration between solvers and algorithms (SM, AAAI19) • Handling weighted distributions: Connections to theory of integration • Verification of counting (CM, AAAI19) • Designing hardware accelerators – similar to advances in deep learning 33/35
Mission 2025: Constrained Counting Revolution • Extending to SMT (CMMV, AAAI16) • Tighter integration between solvers and algorithms (SM, AAAI19) • Handling weighted distributions: Connections to theory of integration • Verification of counting (CM, AAAI19) • Designing hardware accelerators – similar to advances in deep learning 33/35
Mission 2025: Constrained Counting Revolution • Extending to SMT (CMMV, AAAI16) • Tighter integration between solvers and algorithms (SM, AAAI19) • Handling weighted distributions: Connections to theory of integration • Verification of counting (CM, AAAI19) • Designing hardware accelerators – similar to advances in deep learning • Understanding and applying counting to real world use-cases 33/35
Recommend
More recommend