Exploiting Symmetry
in Model Expansion
for Predicate and Propositional Logic

Jo Devriendt

Supervisor: Prof. dr. Marc Denecker

22/2/2017

Research Group

Declarative Languages &
Artificial Intelligence

Artificial Intelligence

Question answering

Self-driving cars

Image recognition

game playing

Artificial Intelligence

Many problems remain...

"Please translate this poem?"

???

Artificial Intelligence

Many problems remain...

"This is a lie."

Artificial Intelligence

Many problems remain...

"Do 100 pigeons fit in 99 holes?"

"......calculating......"

Declarative Languages

Imperative programming:

step-by-step instructions

Declarative programming:

description of end result

Declarative Languages

Computation

Result

Data

Description

Declarative Languages

Vehicle routing

Nurse rostering

Planning

Graph coloring

Pigeon allocation

Declarative Languages

\forall c, c'\colon Border(c, c') \Rightarrow color(c)\neq color(c')
c,c:Border(c,c)color(c)color(c)\forall c, c'\colon Border(c, c') \Rightarrow color(c)\neq color(c')
\neg \exists p, p'\colon p \neq p' \wedge hole(p)=hole(p')
¬p,p:pphole(p)=hole(p)\neg \exists p, p'\colon p \neq p' \wedge hole(p)=hole(p')

Predicate logic

Declarative Languages

\neg (b_{cc'} \wedge green_{c} \wedge green_{c'})
¬(bccgreencgreenc)\neg (b_{cc'} \wedge green_{c} \wedge green_{c'})

Propositional logic

\neg (p\neq p' \wedge firsthole_{p} \wedge firsthole_{p'})
¬(ppfirstholepfirstholep)\neg (p\neq p' \wedge firsthole_{p} \wedge firsthole_{p'})
\ldots
\ldots
\ldots
\ldots

"Do 100 pigeons fit in 99 holes?"

"......calculating......"

  • Computer keeps trying different assignments of pigeons to holes

  • However, individual pigeons are interchangeable

key property: Symmetry

Exploiting Symmetry
in Model Expansion
for Predicate and Propositional Logic

Jo Devriendt

Supervisor: Prof. dr. Marc Denecker

22/2/2017

Or: how to put pigeons in holes

??

Overview

  • Introduction (Chapter 1 & 2)
  • Symmetry in Propositional Logic (Chapter 3)
  • Symmetric Propagation and Learning (Chapter 4)
  • Symmetry in Predicate Logic (Chapter 5)
  • Automated Local Search through Symmetry (Chapter 6)
  • Conclusion

Combinatorial problems

Pick a satisfying solution from a set of candidate solutions

Combinatorial problems

Pick a satisfying solution from a set of candidate solutions

Permutation on
the set of candidate solutions
preserving satisfaction

Symmetry

Permutation on
the set of candidate solutions
preserving satisfaction

Symmetry

Permutation on
the set of candidate solutions
preserving satisfaction

Symmetry

Symmetry

Partitions candidate solutions into symmetry classes

Symmetry classes can be huge: 100! = ~157 digits

Potential blow-up of search space.

"......calculating......"

Workaround: make symmetrical solutions "invisible" to computer.

Symmetry

Challenges:

  1. Detect non-trivial symmetry
  2. Exploit symmetry optimally

Chapter 3

Static Symmetry Breaking in Propositional Logic

\neg p \vee q
¬pq\neg p \vee q
\neg p \vee q
¬pq\neg p \vee q

Computation

Result

SAT solvers

Propositional description

\neg (green_{BE} \wedge green_{NL})
¬(greenBEgreenNL)\neg (green_{BE} \wedge green_{NL})
\ldots
\ldots
\neg p \vee q
¬pq\neg p \vee q

Propositional description

\neg (green_{BE} \wedge green_{NL})
¬(greenBEgreenNL)\neg (green_{BE} \wedge green_{NL})

Shatter

Computation

Result

Graph automorphism detection

\neg {green}_{BE} \vee {blue}_{BE}
¬greenBEblueBE\neg {green}_{BE} \vee {blue}_{BE}

Symmetry breaking formulas

\ldots
\ldots
\neg p \vee q
¬pq\neg p \vee q

Propositional description

\neg (green_{BE} \wedge green_{NL})
¬(greenBEgreenNL)\neg (green_{BE} \wedge green_{NL})

BreakID

Computation

Result

Graph automorphism detection

Symmetry structure

\ldots
\ldots

Strong symmetry breaking formulas

\neg {green}_{BE} \vee {blue}_{BE}
¬greenBEblueBE\neg {green}_{BE} \vee {blue}_{BE}
\neg p \vee q
¬pq\neg p \vee q

BreakID

Strong symmetry breaking formulas

Symmetry structure

Inferred structural properties:

  • Row interchangeability
  • Stabilizer subgroups

Drawback:

  • Approximative
\neg {green}_{BE} \vee {blue}_{BE}
¬greenBEblueBE\neg {green}_{BE} \vee {blue}_{BE}

Experimental evaluation

\neg p \vee q
¬pq\neg p \vee q

Also performs well on pigeonhole and graph coloring :)

Real life evaluation

\neg p \vee q
¬pq\neg p \vee q
  • Independent test of BreakID at the French National Office of Aerospace Research
  • "Critical systems [...] made of lots of redundant components for enhanced safety"
  • "solving times can be halved in the best cases"

Chapter 4

Symmetrical Propagation and Learning

l \rightarrow \sigma(l)
lσ(l)l \rightarrow \sigma(l)

Computation

Propositional description

\neg (green_{BE} \wedge green_{NL})
¬(greenBEgreenNL)\neg (green_{BE} \wedge green_{NL})
\ldots
\ldots

Result

SAT solvers

l \rightarrow \sigma(l)
lσ(l)l \rightarrow \sigma(l)

Computation

Propositional description

\neg (green_{BE} \wedge green_{NL})
¬(greenBEgreenNL)\neg (green_{BE} \wedge green_{NL})
\ldots
\ldots

Result

SAT solvers

\neg (green_{FR} \wedge red_{NL} \wedge yellow_{LU})
¬(greenFRredNLyellowLU)\neg (green_{FR} \wedge red_{NL} \wedge yellow_{LU})

Search

Proof

l \rightarrow \sigma(l)
lσ(l)l \rightarrow \sigma(l)

Proof systems

  • Resolution has exponential length for pigeonhole [54]
  • Similar for stronger cutting plane proof system and clique coloring [20]
l \rightarrow \sigma(l)
lσ(l)l \rightarrow \sigma(l)
\neg (green_{BE} \wedge green_{NL})
¬(greenBEgreenNL)\neg (green_{BE} \wedge green_{NL})
\ldots
\ldots
blue_{BE} \wedge \neg blue_{BE}
blueBE¬blueBEblue_{BE} \wedge \neg blue_{BE}
\ldots
\ldots
\neg (green_{FR} \wedge red_{NL} \wedge yellow_{LU})
¬(greenFRredNLyellowLU)\neg (green_{FR} \wedge red_{NL} \wedge yellow_{LU})

Derived formulas

Inconsistency

Initial formulas

\neg (green_{BE} \wedge green_{NL})
¬(greenBEgreenNL)\neg (green_{BE} \wedge green_{NL})
\ldots
\ldots

Proof systems: symmetry rule

l \rightarrow \sigma(l)
lσ(l)l \rightarrow \sigma(l)
\ldots
\ldots
\neg (green_{FR} \wedge red_{NL} \wedge yellow_{LU})
¬(greenFRredNLyellowLU)\neg (green_{FR} \wedge red_{NL} \wedge yellow_{LU})

Symmetrical  formulas

  • Resolution with symmetry has polynomial length for pigeonhole
  • Try to learn this proof during search
  • Crucial restriction:
    Only add formulas symmetrical to propagating formulas
\neg (green_{FR} \wedge red_{NL} \wedge blue_{LU})
¬(greenFRredNLblueLU)\neg (green_{FR} \wedge red_{NL} \wedge blue_{LU})
\neg (red_{FR} \wedge green_{NL} \wedge yellow_{LU})
¬(redFRgreenNLyellowLU)\neg (red_{FR} \wedge green_{NL} \wedge yellow_{LU})

Propositional description

\neg (green_{BE} \wedge green_{NL})
¬(greenBEgreenNL)\neg (green_{BE} \wedge green_{NL})

BreakID and Symmetric Explanation Learning

Computation with SEL

Result

Graph automorphism detection

BreakID infers symmetry structure

\neg (red_{FR} \wedge green_{NL} \wedge yellow_{LU})
¬(redFRgreenNLyellowLU)\neg (red_{FR} \wedge green_{NL} \wedge yellow_{LU})
\neg (green_{FR} \wedge red_{NL} \wedge yellow_{LU})
¬(greenFRredNLyellowLU)\neg (green_{FR} \wedge red_{NL} \wedge yellow_{LU})
l \rightarrow \sigma(l)
lσ(l)l \rightarrow \sigma(l)
\neg (green_{FR} \wedge red_{NL} \wedge blue_{LU})
¬(greenFRredNLblueLU)\neg (green_{FR} \wedge red_{NL} \wedge blue_{LU})

Experimental evaluation

Performs competitive to BreakID

l \rightarrow \sigma(l)
lσ(l)l \rightarrow \sigma(l)

Chapter 5

Symmetry in Predicate Logic

P(x) \vee Q(x)
P(x)Q(x)P(x) \vee Q(x)

Computation

Result

Model expansion for predicate logic

P(x) \vee Q(x)
P(x)Q(x)P(x) \vee Q(x)

Propositional description

\neg (green_{BE} \wedge green_{NL})
¬(greenBEgreenNL)\neg (green_{BE} \wedge green_{NL})
\forall c, c'\colon Border(c, c') \Rightarrow color(c)\neq color(c')
c,c:Border(c,c)color(c)color(c)\forall c, c'\colon Border(c, c') \Rightarrow color(c)\neq color(c')

Predicate logic description

Computation

Propositional description

\neg (green_{BE} \wedge green_{NL})
¬(greenBEgreenNL)\neg (green_{BE} \wedge green_{NL})

Result

Symmetry breaking for predicate logic

P(x) \vee Q(x)
P(x)Q(x)P(x) \vee Q(x)

Symmetry detection and breaking

\forall c, c'\colon Border(c, c') \Rightarrow color(c)\neq color(c')
c,c:Border(c,c)color(c)color(c)\forall c, c'\colon Border(c, c') \Rightarrow color(c)\neq color(c')

Predicate logic description

Computation

Propositional description

\neg (green_{BE} \wedge green_{NL})
¬(greenBEgreenNL)\neg (green_{BE} \wedge green_{NL})

Result

P(x) \vee Q(x)
P(x)Q(x)P(x) \vee Q(x)
\forall c, c'\colon Border(c, c') \Rightarrow color(c)\neq color(c')
c,c:Border(c,c)color(c)color(c)\forall c, c'\colon Border(c, c') \Rightarrow color(c)\neq color(c')

Predicate logic description

Local Domain Symmetry

LDS detection

Strong symmetry breaking formulas

Advantages

  1. More structure in local domain symmetry group
  2. Efficient detection
    • Often without graph encoding
  3. Complete symmetry breaking for local domain interchangeability
P(x) \vee Q(x)
P(x)Q(x)P(x) \vee Q(x)

Disadvantage

  1. Some forms of symmetry not captured

Experimental evaluation

P(x) \vee Q(x)
P(x)Q(x)P(x) \vee Q(x)

Chapter 6

Automated Local Search via Symmetry*

*No longer about pigeons...

Solutions have a preference value

Local Search

Alternative to complete solvers

Local Search

Applying transformation
==
performing a move

Alternative to complete solvers

Transform solutions to maximize value

Writing local search algorithms is hard work

Problem: how to construct good moves?

  • Information is present in specification
  • Automatization should be possible

New idea

moves are symmetry applications

We can detect symmetry automatically

Our work

  • Use (quasi)symmetry to perform moves
  • Combine with complete search

Experimental evaluation

\neg p \vee q
¬pq\neg p \vee q
P(x) \vee Q(x)
P(x)Q(x)P(x) \vee Q(x)
l \rightarrow \sigma(l)
lσ(l)l \rightarrow \sigma(l)

BreakID: new symmetry breaking preprocessor for propositional logic

SEL: successful symmetric learning scheme

LDS: useful notion of symmetry on predicate level

Link between symmetry and local search

"Do 100 pigeons fit in 99 holes?"

"......calculating......"

Conclusion

Conclusion

\neg p \vee q
¬pq\neg p \vee q
P(x) \vee Q(x)
P(x)Q(x)P(x) \vee Q(x)
l \rightarrow \sigma(l)
lσ(l)l \rightarrow \sigma(l)

BreakID: new symmetry breaking preprocessor for propositional logic

SEL: successful symmetric learning scheme

LDS: useful notion of symmetry on predicate level

Link between symmetry and local search

"Do 100 pigeons fit in 99 holes?"

"Of course not!"

Thanks for your attention

"Do 100 pigeons fit in 99 holes?"

"Of course not!"

"Beep. Death to all humans."

PublicDefense

By krr

PublicDefense

  • 1,392