370 likes | 389 Views
Explore robust deep learning post-training verification for safe error classifications in road sign recognition using neural networks.
E N D
Self-Driving Cars Human drivers replaced by deep neural networks
Road Sign Classification Post Training Data Parameters W Parameters W perform multiclass classification Estimate W using training data
Road Sign Classification Post Test Image Parameters W Parameters W select the class of a new input image
Road Sign Classification Post Test Image Parameters W Small deformations can cause fatal errors Input Image Prediction Input Image Prediction Blurring, Saturation Aung et al., 2017 Evtimov et al., 2017 Pixel Errors
Spot the Difference “pig” (91%) “airliner” (99%)
Difference 0.005 x
Glasses Sharif, Bhagavatula, Bauer and Reiter, 2016
3D Object Athalye, Engstrom, Ilyas and Kwok, 2017
Audio Carlini and Wagner, 2018
Outline • Robust Deep Learning • Formulation • Black Box Solvers
Robust Deep Learning Post Training Data Parameters W Identify Deformation With Error Augment Training Data Set
Condition on inputs Robust Deep Learning Post Is there an erroneous output? Safe Error Classifications Image Deformations Re-estimate parameters W
Condition on inputs Robust Deep Learning Post Is there an erroneous output? Safe Error Classifications Image Deformations Re-estimate parameters W
Condition on inputs Robust Deep Learning Post Is there an erroneous output? Safe Error Classifications Image Deformations Terminate when all putative outputs are safe
Erroneous Output Post Set of possible inputs x ∈ X E.g. X is an l∞ ball around an input x* Ground-truth class is y* Score for input x and class y is s(y;x)
Erroneous Output Post Find x ∈ X such that miny≠y*(s(y*;x) – s(y;x)) < 0 I.e. an input that is misclassified Or prove that there does not exist such an x An instance of Neural Network Verification
Outline • Robust Deep Learning • Formulation • Black Box Solvers
Assumption Post Piecewise linear non-linearities ReLU, MaxPool… Covers many state of the art networks Intuitions can be transferred to more general settings
Neural Network Verification Post Neural network f Scalar output z = f(x) E.g. in binary classification, z = s(y*;x) – s(y;x) for y ≠ y* Property: f(x) > 0 for all x∈ X Formally prove the property, or provide counter-example
Complex Properties Post OR clause e.g. (z1 > 0) ∨(z2> 0) ∨(z3> 0) max(z1, z2, z3) > 0 Implement using a MaxPool layer at the end
Complex Properties Post AND clause e.g. (z1 > 0) ∧(z2> 0) ∧(z3> 0) min(z1, z2, z3) > 0 -max(-z1, -z2, -z3) > 0 Linear + MaxPool + Linear layer at the end
Complex Properties Post Boolean formulas OR over linear inequalities AND over linear inequalities Any Boolean formula over linear inequalities
Example Post min z s.t. -2 ≤ x1≤ 2 a 1 -2 ≤ x2 ≤ 2 -1 x1 1 [-2, 2] ain = x1 + x2 z x2 [-2, 2] 1 -1 bin = x1 - x2 -1 aout = max{ain,0} b Prove that z > -5 bout = max{bin,0} z = - aout - bout
Example Post min z Linear constraints s.t. -2 ≤ x1≤ 2 -2 ≤ x2 ≤ 2 Easy to handle ain = x1 + x2 bin = x1 - x2 aout = max{ain,0} bout = max{bin,0} z = - aout - bout
Example Post min z s.t. -2 ≤ x1≤ 2 -2 ≤ x2 ≤ 2 ain = x1 + x2 bin = x1 - x2 aout = max{ain,0} Non-linear constraints bout = max{bin,0} NP-hard problem z = - aout - bout
Outline • Robust Deep Learning • Formulation • Black Box Solvers Cheng et al., 2017; Lomuscio et al., 2017; Tjeng et al., 2017
Reformulation Post aout = max{ain,0} Large constant Ma(greater than any possible ain) Binary variable δa ∈ {0,1} aout ≥ ain aout ≥ 0 aout ≤ ain + (1-δa)Ma aout ≤ δaMa
Reformulation Post aout = max{ain,0} Large constant Ma(greater than any possible ain) Binary variable δa ∈ {0,1} Case I: δa = 0 aout ≥ ain aout ≥ 0 aout ≤ ain + (1-δa)Ma aout ≤ δaMa
Reformulation Post aout = max{ain,0} Large constant Ma(greater than any possible ain) Binary variable δa ∈ {0,1} Case I: δa = 0 aout ≥ ain aout ≥ 0 aout = 0 aout ≤ ain + (1-δa)Ma aout ≤ δaMa
Reformulation Post aout = max{ain,0} Large constant Ma(greater than any possible ain) Binary variable δa ∈ {0,1} Case II: δa = 1 aout ≥ ain aout ≥ 0 aout ≤ ain + (1-δa)Ma aout ≤ δaMa
Reformulation Post aout = max{ain,0} Large constant Ma(greater than any possible ain) Binary variable δa ∈ {0,1} Case II: δa = 1 aout ≥ ain aout ≥ 0 aout = ain aout ≤ ain + (1-δa)Ma aout ≤ δaMa
Example Post min z s.t. -2 ≤ x1≤ 2 -2 ≤ x2 ≤ 2 ain = x1 + x2 bin = x1 - x2 aout = max{ain,0} bout = max{bin,0} z = - aout - bout
Example Post min z s.t. -2 ≤ x1≤ 2 -2 ≤ x2 ≤ 2 ain = x1 + x2 bin = x1 - x2 aout ≥ ain aout ≥ 0 aout ≤ ain + (1-δa)Ma aout ≤ δaMa bout = max{bin,0} δa ∈ {0,1} z = - aout - bout
Example Post min z s.t. -2 ≤ x1≤ 2 Mixed Integer Linear Program -2 ≤ x2 ≤ 2 ain = x1 + x2 bin = x1 - x2 aout ≥ ain aout ≥ 0 aout ≤ ain + (1-δa)Ma aout ≤ δaMa bout ≥ bin bout ≥ 0 bout ≤ bin + (1-δb)Mb bout ≤ δbMb δa ∈ {0,1} δb ∈ {0,1} z = - aout - bout
MILP Formulation Post Neural network structure can help determine Ma Standard solvers e.g. Gurobi, Mosek, CPLEX Does not scale (we will see results later) Standard architectures have order of 107 parameters