## Exploiting Symmetry in Model Expansion for Predicate and Propositional Logic

Jo Devriendt

Supervisor: Prof. dr. Marc Denecker

22/2/2017

# Artificial Intelligence

Self-driving cars

Image recognition

game playing

# Artificial Intelligence

Many problems remain...

???

# 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

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')
\neg \exists p, p'\colon p \neq p' \wedge hole(p)=hole(p')

# Declarative Languages

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

### Propositional logic

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

"Do 100 pigeons fit in 99 holes?"

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

• Computer keeps trying different assignments of pigeons to holes

• However, individual pigeons are interchangeable

## Exploiting Symmetryin Model Expansionfor 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

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

\neg p \vee q
\neg p \vee q

Computation

Result

## SAT solvers

Propositional description

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

Propositional description

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

## Shatter

Computation

Result

Graph automorphism detection

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

Symmetry breaking formulas

\ldots
\neg p \vee q

Propositional description

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

## BreakID

Computation

Result

Graph automorphism detection

Symmetry structure

\ldots

Strong symmetry breaking formulas

\neg {green}_{BE} \vee {blue}_{BE}
\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}

## Experimental evaluation

\neg p \vee q

Also performs well on pigeonhole and graph coloring :)

## Real life evaluation

\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)

Computation

Propositional description

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

Result

## SAT solvers

l \rightarrow \sigma(l)

Computation

Propositional description

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

Result

## SAT solvers

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

Search

Proof

l \rightarrow \sigma(l)

## Proof systems

• Resolution has exponential length for pigeonhole 
• Similar for stronger cutting plane proof system and clique coloring 
l \rightarrow \sigma(l)
\neg (green_{BE} \wedge green_{NL})
\ldots
blue_{BE} \wedge \neg blue_{BE}
\ldots
\neg (green_{FR} \wedge red_{NL} \wedge yellow_{LU})

Derived formulas

Inconsistency

Initial formulas

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

## Proof systems: symmetry rule

l \rightarrow \sigma(l)
\ldots
\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})
\neg (red_{FR} \wedge green_{NL} \wedge yellow_{LU})

Propositional description

\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})
\neg (green_{FR} \wedge red_{NL} \wedge yellow_{LU})
l \rightarrow \sigma(l)
\neg (green_{FR} \wedge red_{NL} \wedge blue_{LU})

## Experimental evaluation

Performs competitive to BreakID

l \rightarrow \sigma(l)

# Chapter 5

P(x) \vee Q(x)

Computation

Result

## Model expansion for predicate logic

P(x) \vee Q(x)

Propositional description

\neg (green_{BE} \wedge green_{NL})
\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})

Result

## Symmetry breaking for predicate logic

P(x) \vee Q(x)

Symmetry detection and breaking

\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})

Result

P(x) \vee Q(x)
\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

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)

1. Some forms of symmetry not captured

P(x) \vee Q(x)

# Chapter 6

## Automated Local Search via Symmetry*

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

## Our work

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

## Experimental evaluation

\neg p \vee q
P(x) \vee Q(x)
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

\neg p \vee q
P(x) \vee Q(x)
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!"

"Do 100 pigeons fit in 99 holes?"

"Of course not!"

"Beep. Death to all humans."

By Jo Devriendt

• 1,145