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 Radboud University ENS Lyon Collaborators: Bartek Klin Michal Szynwelski Warsaw University Warsaw University
Automata learning queries System Learner black-box answers S automaton builds model of S
Automata learning queries System Learner black-box answers S automaton builds model of S No formal specification available? Learn it!
L* algorithm (D.Angluin ’87) Finite alphabet of system’s actions A L ⊆ A � set of system behaviors is a regular language
L* algorithm (D.Angluin ’87) Finite alphabet of system’s actions A L ⊆ A � set of system behaviors is a regular language Teacher Learner L
L* algorithm (D.Angluin ’87) Finite alphabet of system’s actions A L ⊆ A � set of system behaviors is a regular language Q: w ∈ L ? A: Y/N Teacher Learner L
L* algorithm (D.Angluin ’87) Finite alphabet of system’s actions A L ⊆ A � set of system behaviors is a regular language Q: w ∈ L ? A: Y/N L ( H ) = L ? Teacher Q: Learner A: Y / N + counterexample L H H = hypothesis automaton
L* algorithm (D.Angluin ’87) Finite alphabet of system’s actions A L ⊆ A � set of system behaviors is a regular language Q: w ∈ L ? A: Y/N L ( H ) = L ? Teacher Q: Learner A: Y / N + counterexample L H H = hypothesis automaton builds Minimal DFA L accepting L
A zoo of automata Weighted Probabilistic Alternating Universal Register Non-deterministic Mealy Machines
A zoo of automata Weighted Probabilistic Alternating Universal Register Non-deterministic Mealy Machines Algorithms Correctness proofs involved and hard to check
A zoo of automata Weighted Probabilistic Alternating Universal Register Non-deterministic Mealy Machines Category theory comes to the rescue! Algorithms Correctness proofs involved and hard to check
Abstract automata C Category = universe of state-spaces F : C → C Endofunctor = automaton type FQ ” Q init Q Q Q out Q I Y DFAs
Abstract automata C Category = universe of state-spaces F : C → C Endofunctor = automaton type FQ DFAs ” Q C = Set init Q Q Q out Q F = ( − ) × A I Y DFAs
Abstract automata C Category = universe of state-spaces F : C → C Endofunctor = automaton type FQ Q × A DFAs ” Q C = Set init Q Q Q out Q F = ( − ) × A I Y DFAs
Abstract automata C Category = universe of state-spaces F : C → C Endofunctor = automaton type FQ Q × A DFAs ” Q C = Set init Q Q Q out Q F = ( − ) × A 1 I Y DFAs
Abstract automata C Category = universe of state-spaces F : C → C Endofunctor = automaton type FQ Q × A DFAs ” Q C = Set init Q Q Q out Q F = ( − ) × A 1 I Y q 0 ∈ Q DFAs
Abstract automata C Category = universe of state-spaces F : C → C Endofunctor = automaton type FQ Q × A DFAs ” Q C = Set init Q Q Q out Q F = ( − ) × A 1 2 I Y q 0 ∈ Q DFAs
Abstract automata C Category = universe of state-spaces F : C → C Endofunctor = automaton type FQ Q × A DFAs ” Q C = Set init Q Q Q out Q F = ( − ) × A 1 2 I Y F ⊆ Q q 0 ∈ Q DFAs
Abstract learning Abstract observation data structure
Abstract learning Target minimal automaton approximates Abstract observation data FQ structure ” Q init Q Q Q out Q I Y
Abstract learning Target minimal automaton approximates Abstract observation data FQ structure ” Q init Q Q Q out Q abstract closedness I Y and consistency Hypothesis automaton FH ” H H out H init H I Y
Abstract learning Target minimal automaton approximates Abstract observation data FQ structure ” Q init Q Q Q out Q abstract closedness I Y and consistency = Hypothesis automaton General correctness theorem FH ” H Guidelines for implementation H out H init H I Y
Abstract learning Target minimal automaton approximates Abstract observation data FQ structure ” Q init Q Q Q out Q abstract closedness I Y and consistency = Hypothesis automaton General correctness theorem FH ” H Guidelines for implementation H out H init H I Y (arXiv:1704.05676) CALF: Categorical Automata Learning Framework Gerco van Heerdt, Matteo Sammartino, Alexandra Silva
Other automata & optimizations
Other automata & optimizations Change base category DFAs Set Nom Nominal automata Vect Weighted automata
Other automata & optimizations Change base category DFAs Set Nom Nominal automata Vect Weighted automata Side-effects (via monads) Powerset NFAs Powerset with intersection Universal automata Double powerset Alternating automata Partial automata Maybe monad
Other automata & optimizations Change base category Change main data structure DFAs Set Observation tables Nom Nominal automata Discrimination trees Vect Weighted automata Side-effects (via monads) Powerset NFAs Powerset with intersection Universal automata Double powerset Alternating automata Partial automata Maybe monad
Other automata & optimizations Change base category Change main data structure Learning Nominal Automata (POPL ’17) DFAs Set Joshua Moerman, Matteo Sammartino, Alexandra Silva, Bartek Klin, Michal Szynwelski Observation tables Nom Nominal automata Discrimination trees Vect Weighted automata Side-effects (via monads) Powerset NFAs Powerset with intersection Universal automata Double powerset Alternating automata Partial automata Maybe monad
Other automata & optimizations Change base category Change main data structure Learning Nominal Automata (POPL ’17) DFAs Set Joshua Moerman, Matteo Sammartino, Alexandra Silva, Bartek Klin, Michal Szynwelski Observation tables Nom Nominal automata Discrimination trees Vect Weighted automata Learning Automata with Side-effects (arXiv:1704.08055) Gerco van Heerdt, Matteo Sammartino, Alexandra Silva Side-effects (via monads) Powerset NFAs Powerset with intersection Universal automata Double powerset Alternating automata Partial automata Maybe monad
Connections with other algorithms Automaton type Automata Learning algorithms Minimization Testing algorithms algorithms Optimizations
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
Recommend
More recommend