C ategorical A utomata L earning F ramework calf-project.org Gerco - - PowerPoint PPT Presentation

c ategorical a utomata l earning f ramework
SMART_READER_LITE
LIVE PREVIEW

C ategorical A utomata L earning F ramework calf-project.org Gerco - - PowerPoint PPT Presentation

C ategorical A utomata L earning F ramework calf-project.org Gerco van Heerdt Matteo Sammartino Alexandra Silva LiVe @ ETAPS 2017 Our team Alexandra Silva Joshua Moerman Maverick Chardet Matteo Sammartino Gerco van Heerdt UCL UCL UCL


slide-1
SLIDE 1

Categorical Automata Learning Framework

Gerco van Heerdt Matteo Sammartino Alexandra Silva LiVe @ ETAPS 2017 calf-project.org

slide-2
SLIDE 2

Our team

Alexandra Silva UCL Gerco van Heerdt UCL

Joshua Moerman Radboud University Maverick Chardet ENS Lyon

Collaborators:

Bartek Klin Warsaw University Michal Szynwelski Warsaw University Matteo Sammartino UCL

slide-3
SLIDE 3

Automata learning

Learner queries answers builds System black-box

S

automaton model of

S

slide-4
SLIDE 4

Automata learning

Learner queries answers builds System black-box

S

automaton model of

S

No formal specification available? Learn it!

slide-5
SLIDE 5

set of system behaviors is a regular language Finite alphabet of system’s actions A

L ⊆ A

L* algorithm (D.Angluin ’87)

slide-6
SLIDE 6

set of system behaviors is a regular language Finite alphabet of system’s actions A

L ⊆ A

L* algorithm (D.Angluin ’87)

Learner Teacher

L

slide-7
SLIDE 7

set of system behaviors is a regular language Finite alphabet of system’s actions A

L ⊆ A

L* algorithm (D.Angluin ’87)

Learner Teacher

L

Q:w ∈ L? A: Y/N

slide-8
SLIDE 8

set of system behaviors is a regular language Finite alphabet of system’s actions A

L ⊆ A

L* algorithm (D.Angluin ’87)

Learner Teacher

L

Q:w ∈ L? A: Y/N

L(H) = L?

Q: A: Y / N + counterexample H = hypothesis automaton

H

slide-9
SLIDE 9

set of system behaviors is a regular language Finite alphabet of system’s actions A

L ⊆ A

L* algorithm (D.Angluin ’87)

Learner Teacher

L

Q:w ∈ L? A: Y/N Minimal DFA accepting L

L

builds L(H) = L?

Q: A: Y / N + counterexample H = hypothesis automaton

H

slide-10
SLIDE 10

Non-deterministic Weighted Register Mealy Machines

A zoo of automata

Alternating Universal Probabilistic

slide-11
SLIDE 11

Non-deterministic Weighted Register Mealy Machines

Algorithms Correctness proofs

involved and hard to check

A zoo of automata

Alternating Universal Probabilistic

slide-12
SLIDE 12

Non-deterministic Weighted Register Mealy Machines

Algorithms Correctness proofs

involved and hard to check

A zoo of automata

Alternating Universal Probabilistic

Category theory comes to the rescue!

slide-13
SLIDE 13

Abstract automata

DFAs

FQ Q

”Q

I

initQ Q

Y

  • utQ

Endofunctor = automaton type

F : C → C

Category = universe of state-spaces

C

slide-14
SLIDE 14

Abstract automata

DFAs

FQ Q

”Q

I

initQ Q

Y

  • utQ

Endofunctor = automaton type

F : C → C

Category = universe of state-spaces

C

DFAs

F = (−) × A

C = Set

slide-15
SLIDE 15

Abstract automata

DFAs

FQ Q

”Q

I

initQ Q

Y

  • utQ

Endofunctor = automaton type

F : C → C

Category = universe of state-spaces

C

Q × A

DFAs

F = (−) × A

C = Set

slide-16
SLIDE 16

Abstract automata

DFAs

FQ Q

”Q

I

initQ Q

Y

  • utQ

Endofunctor = automaton type

F : C → C

Category = universe of state-spaces

C

Q × A

1

DFAs

F = (−) × A

C = Set

slide-17
SLIDE 17

Abstract automata

DFAs

FQ Q

”Q

I

initQ Q

Y

  • utQ

Endofunctor = automaton type

F : C → C

Category = universe of state-spaces

C

Q × A

1

q0 ∈ Q

DFAs

F = (−) × A

C = Set

slide-18
SLIDE 18

Abstract automata

DFAs

FQ Q

”Q

I

initQ Q

Y

  • utQ

Endofunctor = automaton type

F : C → C

Category = universe of state-spaces

C

Q × A

1

q0 ∈ Q

2

DFAs

F = (−) × A

C = Set

slide-19
SLIDE 19

Abstract automata

DFAs

FQ Q

”Q

I

initQ Q

Y

  • utQ

Endofunctor = automaton type

F : C → C

Category = universe of state-spaces

C

Q × A

1

q0 ∈ Q F ⊆ Q

2

DFAs

F = (−) × A

C = Set

slide-20
SLIDE 20

Abstract learning

Abstract observation data structure

slide-21
SLIDE 21

Abstract learning

Abstract observation data structure approximates

FQ Q

”Q

I

initQ Q

Y

  • utQ

Target minimal automaton

slide-22
SLIDE 22

Abstract learning

Abstract observation data structure approximates

FQ Q

”Q

I

initQ Q

Y

  • utQ

Target minimal automaton Hypothesis automaton

FH H I Y

”H

  • utH

initH

abstract closedness and consistency

slide-23
SLIDE 23

Abstract learning

Abstract observation data structure

General correctness theorem

=

Guidelines for implementation

approximates

FQ Q

”Q

I

initQ Q

Y

  • utQ

Target minimal automaton Hypothesis automaton

FH H I Y

”H

  • utH

initH

abstract closedness and consistency

slide-24
SLIDE 24

Abstract learning

Abstract observation data structure

General correctness theorem

=

Guidelines for implementation

approximates

FQ Q

”Q

I

initQ Q

Y

  • utQ

Target minimal automaton Hypothesis automaton

FH H I Y

”H

  • utH

initH

abstract closedness and consistency

CALF: Categorical Automata Learning Framework

Gerco van Heerdt, Matteo Sammartino, Alexandra Silva

(arXiv:1704.05676)

slide-25
SLIDE 25

Other automata & optimizations

slide-26
SLIDE 26

Nom Vect Set DFAs Nominal automata Weighted automata

Change base category

Other automata & optimizations

slide-27
SLIDE 27

Nom Vect Set DFAs Nominal automata Weighted automata

Change base category

Other automata & optimizations

Side-effects (via monads)

NFAs Partial automata Universal automata Alternating automata Powerset Powerset with intersection Double powerset Maybe monad

slide-28
SLIDE 28

Nom Vect Set DFAs Nominal automata Weighted automata

Change base category

Observation tables Discrimination trees

Change main data structure

Other automata & optimizations

Side-effects (via monads)

NFAs Partial automata Universal automata Alternating automata Powerset Powerset with intersection Double powerset Maybe monad

slide-29
SLIDE 29

Nom Vect Set DFAs Nominal automata Weighted automata

Change base category

Observation tables Discrimination trees

Change main data structure

Learning Nominal Automata (POPL ’17)

Joshua Moerman, Matteo Sammartino, Alexandra Silva, Bartek Klin, Michal Szynwelski

Other automata & optimizations

Side-effects (via monads)

NFAs Partial automata Universal automata Alternating automata Powerset Powerset with intersection Double powerset Maybe monad

slide-30
SLIDE 30

Nom Vect Set DFAs Nominal automata Weighted automata

Change base category

Observation tables Discrimination trees

Change main data structure

Learning Nominal Automata (POPL ’17)

Joshua Moerman, Matteo Sammartino, Alexandra Silva, Bartek Klin, Michal Szynwelski

Other automata & optimizations

Side-effects (via monads)

NFAs Partial automata Universal automata Alternating automata Powerset Powerset with intersection Double powerset Maybe monad

Learning Automata with Side-effects

Gerco van Heerdt, Matteo Sammartino, Alexandra Silva

(arXiv:1704.08055)

slide-31
SLIDE 31

Automaton type Optimizations

Minimization algorithms Testing algorithms

Automata Learning algorithms

Connections with other algorithms

slide-32
SLIDE 32

Ongoing and future work

  • Library & tool to learn control + data-flow models

(as nominal automata)

  • Applications:
  • Specification mining
  • Network verification, with
  • Verification of cryptographic protocols
  • Ransomware detection