12
Summary of the DeepTest paper Presentation on DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Car Presented by : Ji Gao 1 Department of Computer Science, University of Virginia https://qdata.github.io/deep2Read/ August 26, 2018 Presented by : Ji Gao Presentation on DeepTest: Automated Testing of Deep-Neural-N

Presentation on DeepTest: Automated Testing of Deep-Neural ... · Presented by : Ji Gao Presentation on DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Car Summary

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Presentation on DeepTest: Automated Testing of Deep-Neural ... · Presented by : Ji Gao Presentation on DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Car Summary

Summary of the DeepTest paper

Presentation on DeepTest: Automated Testing ofDeep-Neural-Network-driven Autonomous Car

Presented by : Ji Gao

1Department of Computer Science, University of Virginiahttps://qdata.github.io/deep2Read/

August 26, 2018

Presented by : Ji Gao Presentation on DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Car

Page 2: Presentation on DeepTest: Automated Testing of Deep-Neural ... · Presented by : Ji Gao Presentation on DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Car Summary

Summary of the DeepTest paper

DeepTest: Automated Testing ofDeep-Neural-Network-driven Autonomous Cars

DNN is popular. DNN based autonomous car is popular.

DNN still get erroneous behaviors: Accidents happen.

Existing testing techniques: manual collection of test data.They miss fatal corner cases.

Need for automatically detecting erroneous behaviors ofDNN-driven vehicles

Presented by : Ji Gao Presentation on DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Car

Page 3: Presentation on DeepTest: Automated Testing of Deep-Neural ... · Presented by : Ji Gao Presentation on DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Car Summary

Summary of the DeepTest paper

Motivation: Previous work

Research problem: Build automatic and systematic ways totest DNN-based autonomous cars.

Issue: DNN is different from traditional software.

According to previous paper, the logic flow in DNN is notencoded in the training code. Therefore, traditional branch orcode coverage.Current Satisfiability Modulo Theory (SMT) solvers can’thandle such formulas involving floating-point arithmetic andhighly nonlinear constraintsSeveral research projects try to test DNN, but doesn’t scalewell to real-world-sized DNNs. [Verification papers, Reluplex:An Efficient SMT Solver for Verifying Deep Neural Networks.]

Presented by : Ji Gao Presentation on DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Car

Page 4: Presentation on DeepTest: Automated Testing of Deep-Neural ... · Presented by : Ji Gao Presentation on DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Car Summary

Summary of the DeepTest paper

Neuron coverage

Systematic way to partition the test space into equivalenceclasses: neuron coverage.

Neuron coverage: #activated neurons#total neurons

Activated :=? (Output > Threshold)

Work on the simple DNN in the DeepXplore paper.

CNN: Take an average on the output of all filters.

RNN: Unrolling all the layers.

Presented by : Ji Gao Presentation on DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Car

Page 5: Presentation on DeepTest: Automated Testing of Deep-Neural ... · Presented by : Ji Gao Presentation on DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Car Summary

Summary of the DeepTest paper

Increasing coverage

Generating arbitrary inputs that maximize neuron coveragemay not be very useful if the inputs are not likely to appear inthe real-world.

Nine different realistic image transformations (changingbrightness, changing contrast, translation, scaling, horizontalshearing, rotation, blurring, fog effect, and rain effect)

Justify by experiment result

Presented by : Ji Gao Presentation on DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Car

Page 6: Presentation on DeepTest: Automated Testing of Deep-Neural ... · Presented by : Ji Gao Presentation on DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Car Summary

Summary of the DeepTest paper

Combining Transformations to Increase Coverage

Greedy search to generate sample that maximize neuroncoverage.

Presented by : Ji Gao Presentation on DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Car

Page 7: Presentation on DeepTest: Automated Testing of Deep-Neural ... · Presented by : Ji Gao Presentation on DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Car Summary

Summary of the DeepTest paper

Creating a Test Oracle with Metamorphic Relations

Metamorphic relations: Necessary properties of the system orfunction to be implemented.

if a DNN model infers a steering angle θo for an input seedimage Io and a steering angle θt for a new synthetic image It ,which is generated by applying the transformation t on Io ,one may define a simple metamorphic relation where θo andθt are identical

In their case, they didn’t have the only solution.

What they do is:

(θ̂i − θti )2 ≤ λMSEorig

Presented by : Ji Gao Presentation on DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Car

Page 8: Presentation on DeepTest: Automated Testing of Deep-Neural ... · Presented by : Ji Gao Presentation on DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Car Summary

Summary of the DeepTest paper

Experiment

1. Do different input-output pairs result in different neuroncoverage?

Categorize inputs in different categories.

Calculate Spearman rank correlation between neuronscoverage and steering angle

Result: Correlation exists.

Presented by : Ji Gao Presentation on DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Car

Page 9: Presentation on DeepTest: Automated Testing of Deep-Neural ... · Presented by : Ji Gao Presentation on DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Car Summary

Summary of the DeepTest paper

Experiment

2. Do different transformations activate different neurons?

Measure the dissimilarities between N1 and N2 by measuringtheir Jaccard distance:

1− |N1 ∩ N2||N1 ∪ N2|

Result: They activate different neurons.

Presented by : Ji Gao Presentation on DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Car

Page 10: Presentation on DeepTest: Automated Testing of Deep-Neural ... · Presented by : Ji Gao Presentation on DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Car Summary

Summary of the DeepTest paper

Experiment

3. Can neuron coverage be further increased by combiningdifferent image transformations?

Two ways: Cumulative/ Their greedy guided search

Result: Combining image transformations does increase theneuron coverage.

Presented by : Ji Gao Presentation on DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Car

Page 11: Presentation on DeepTest: Automated Testing of Deep-Neural ... · Presented by : Ji Gao Presentation on DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Car Summary

Summary of the DeepTest paper

Experiment

4. Can we automatically detect erroneous behaviors usingmetamorphic relations?

Presented by : Ji Gao Presentation on DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Car

Page 12: Presentation on DeepTest: Automated Testing of Deep-Neural ... · Presented by : Ji Gao Presentation on DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Car Summary

Summary of the DeepTest paper

Retraining

Accuracy of a DNN can be improved by up to 46% byretraining the DNN with synthetic data generated byDeepTest.

Presented by : Ji Gao Presentation on DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Car