Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

CS781:

A Quick Primer on
Abstract Interpretation for
Neural Networks

Supratik Chakraborty
IIT Bombay
Notion of State in Neural
Network
x3 x6 x9
x12
x15 x17
x1

x4 x10

x7 x13 x16
x18
x2 x5 x11
x8 x14

State: (x1, x2, ... x18) in R18


State Change in Feed-Forward
Neural Network
x3 x6 x9

x1

x4

x7

x2 x5
x8

(x’1, x’2, ... x’i-1, x’i) = fi(x1, x2, ... xi-1), for i in {3, ..., 18 }
State Change in Feed-Forward
NN as a sequence of instrns
x3
x1

x2

(x’1, x’2, x’3) = f3 (x1, x2);


(x’’1, x’’2, x’’3, x’’4) = f4 (x’1, x’2 , x’3);

NN computation: a sequence of state transitions


caused by seq of instructions
Proving Property of a FF NN
x3
x1 x17
Pre- Post-
condition condition on
on (x1, x2) (x17, x18)
x18
x2

{Pre-condition on (x1, x2)}

(x’1, x’2, x’3) = f 3 (x1, x2);


(x’’1, x’’2, x’’3, x’’4)
= f4 (x’1, x’2 , x’3);

{Post-condition on (x17, x18) }
NN Computation as a State Transition
System

{Pre-condition on (x1, x2)}

(x’1, x’2, x’3) = f3 (x1, x2);


(x’’1, x’’2, x’’3, x’’4)
= f4 (x’1, x’2 , x’3);

{Post-condition on (x17, x18) }
Dealing with State Space Size

Infinite state space

Difficult to represent using state transition diagram

Can we still do some reasoning?
Concrete states

Solution: Use of abstraction

Naive view

Bunch sets of states together “intelligently”

Don't talk of individual states, talk of a representation of a set
of states

Transitions between state set representations

Granularity of reasoning shifted Abstract states

Extremely powerful general technique

Allows reasoning about large/infinite state spaces
A Generic View of Abstraction
Set of concrete states Set of abstract states
Abstraction (a)

Concretization (g)


Every subset of concrete states mapped to
unique abstract state

Desirable to capture containment relations

Transitions between state sets (abstract states)
The Game Plan

C A
O a B
N S
C T
R R
E A
T C
E T Yes,
Pre-condition: g Proof
S S
T T
NN computation A A
as a T T
sequence of
state transitions
E E
S S No,
Counterexample
Post-condition:
Abstract analysis engine
The Game Plan

C A
O a B
N S
C T
R R
E A
T C
E T Yes,
g Proof
How do we S choose the right
S abstraction?
Is there a method
T beyond domain
T expertise?
Can we learnA from errors in A
abstraction to build
T (refined) abstractions?
better T
E E
CanSrefinement be automated?
S No,
Counterexample

Abstract analysis engine


The Game Plan

C A
Abstract state spaces
O can be
a infinite.
B
What can we do toN make abstractS
C
analysis practical? T
R R
Finite ascending
E chains A
what beyond?
T C
E T Yes,
g Proof
S S
T T
A A
T T
E E
S S No,
Counterexample

Abstract analysis engine


Desirable Properties of Abstraction
Set of concrete states Set of abstract states
Abstraction (a)

Concretization (g)


Suppose : subsets of concrete states

Any behaviour starting from can also happen starting from


If , we want this monotonicity in
behaviour in abstr state space too

Need ordering of abstract states, similar in spirit to
Structure of Concrete State Space


Set of concrete states: S

Concrete lattice C =

Powerset of S

Bottom
element
Partial order

Least upper bound Top element

Greatest lower bound


Structure of Abstract State Space


Abstract lattice A=

Abstraction function


Monotone: for all


Concretization function


Monotone: for all 2

You might also like