SlideShare a Scribd company logo
1 of 40
Download to read offline
Hybrid Deep Neural Networks to Infer State Models of
Black-Box Systems
▹ Mohammad Jafar Mashhadi
▹ Hadi Hemmati
ASE 2020
Problem context: Black-box Automated Systems
Automated systems are all around us.
At their core they use either:
▹ AI: Self driving cars
▹ Feedback loop controllers: Autopilot, cruise
control, plant controllers, etc.
2
Problem context: Understanding their behaviour
▹ Understanding their behaviour
▸ Verification
▸ Anomaly detection
▸ Automated Testing
▹ They are often state based
3
Problem context: Specification Mining and Model Inference4
Problem context: white-box model inference
▹ Most of the prior work focuses on white-box analysis
▹ But, black-box systems are quite often used in practice
5
Problem context: white-box vs. black-box analysis
▹ Static analysis is out of question
▹ Dynamic analysis has limitations
6
Test
Instrumenter
Attach
Generate
Execution Traces
Abstractor Abstract
Model
Generates
Runs on
Source Code
Abstractor Abstract
Model
Generates
???
Problem: Inferring state models from black-box systems
▹ How to go about inferring states in a black-box controller?
7
Abstractor Abstract
Model
Generates
???
Solution Context: Feedback loop controllers
▹ Car cruise control
▸ Goal: Keep current speed ≈ desired speed
▸ Input: Speed
▸ Output: Throttle increase/decrease
8
Solution Context: Feedback loop controllers
▹ Autopilot
▸ Goal: Depends on the internal state
▸ Input: Airspeed, AOA, attitude, MSL altitude, etc.
▸ Outputs: Throttle, control surfaces’ deflections
9
Aircraft illustration from Kopyt and Żugaj 20
Solution Context: Control loops in Autopilot (PID)
▹ “Goal: depends on the internal state”:
▸ During takeoff:
⬩ Heading: keep constant, align with runway
⬩ Throttle: keep constant, maximum
▸ In cruise:
⬩ Heading: constant, based on flight plan
⬩ Throttle: reacts to altitude changes
⬩ Pitch: reacts to airspeed changes
▹ Hypothesis: The reverse should be possible
▸ Observing which inputs/outputs are coupled at each moment to infer
what the internal state is
10
Solution Context: Prior work
▹ Change point detection in time series is promising
▹ But they have limitations:
▸ Assumptions on the data:
⬩ Univariate
⬩ One change point
⬩ Known number of change points
⬩ Specific distributions
▸ Being too general:
⬩ Not exploiting the knowledge about the system
11
The Solution: A hybrid deep neural network12
Training a neural network model that can infer the state from
the stream of input and outputs
More on Hybrid Deep Neural Network Models
▹ Hybrid in this context: CNN + RNN
▹ Showed to be effective in similar problems
13
Sofma
Convolutional LayersAll Signals Fully Connected Layers
Seq2Seq
Recurrent Layers
Saeoeime
Black-Box
System
Inputs Outputs
More on Hybrid Deep Neural Network Models
▹ Convolutional layers
▸ Can detect local features (lines, circles, patterns, etc.)
▸ Can learn preprocessing (rolling average, discreate derivative, etc.)
14
Input
Kernel
Output
Images credit: mlnotebook
More on Hybrid Deep Neural Network Models
▹ Recurrent layers
▸ Output depends on current input, and history: It has memory
▸ Can discover long-term relations
▸ Perfect for processing sequential data (text, time series, etc.)
15
Image credit: Wiley
The final Solution16
GRU
GRU
LeakyReLu
Softmax
C 1D 3 C 1D 10C 1D 5 C 1D 15 C 1D 20 S 2S GRU F C c La
▹ Proposed architecture:
▸ 5 Convolutions with increasing kernel size
▸ 2 large Recurrent layers
▹ based on:
▸ Similar architectures in literature
▸ Experiments and tuning
Experiments and Results
17
State Change Detection Internal State Detection Non-Hybrid Models
Case Study: Autopilot software18
Icons made by DinosoftLabs from Flaticon is licensed by CC 3.0 BY
500K
LoC in C
1000+
Customers
In 85 Countries
UAVs
Experiment setup: Dataset
▹ 888 MicroPilot system tests
▹ In-house simulator
▹ 5 inputs + 5 outputs
▹ Test lengths: 200 – 20,000 samples
(5Hz sampling rate)
19
20
Experiment
Internal State Detection Non-Hybrid Models
RQ1) How does the proposed technique perform in detecting the state changes?
When the state change happens
What the source and target states are
State Change Detection
21
Experiment (RQ1)
Internal State Detection Non-Hybrid Models
▹ Metrics
▹ Baselines
▹ Design
Precision, Recall, and F1 Score with a tolerance
State Change Detection
Ground truth:
Prediction:
TP TP FP FN FN TN
Precision =
TP
P
Recall =
TP
T
F1 = 2
Prec × Recall
Prec + Recall
22
Experiment (RQ1)
Internal State Detection Non-Hybrid Models
▹ Metrics
▹ Baselines
▹ Design
Ruptures library [Truong et al. ‘18]
State Change Detection
23
Experiment (RQ1)
Internal State Detection Non-Hybrid Models
▹ Metrics
▹ Baselines
▹ Design
State Change Detection
Different configurations of baseline algos
▹Search Method:
▸ Pelt (Exact method)
▸ Bottom-up Segmentation
▸ Window based
▹Penalty: 3 values
▹Cost functions: 7 values
24
Results (RQ1)
Internal State Detection Non-Hybrid ModelsState Change Detection
25
Results (RQ1)
Internal State Detection Non-Hybrid ModelsState Change Detection
+102%
+88%
+92%
26
Results (RQ1)
Internal State Detection Non-Hybrid ModelsState Change Detection
Baselines Our Method
16 CPUs 1 GPU
64 GB Memory 8 GB Memory
12H+
1H training (once) +
<1m prediction
27
Results (RQ1)
Internal State Detection Non-Hybrid ModelsState Change Detection
Compared to traditional CPD algorithms the proposed model is both
faster and less resource intensive; All while it showed an improvement of
88 to 102%, measured by F1 score, compared to the best baseline.
28
Experiment
Internal State DetectionState Change Detection Non-Hybrid Models
RQ2) How well does the proposed technique predict the internal state of the
system?
RQ1 was a binary classification, here we have a multiclass classification problem
29
Experiment (RQ2)
Internal State DetectionState Change Detection Non-Hybrid Models
▹ Metrics
▹ Baselines
▹ Design
▹Multi-class classification
▸ Classes = The Possible States
▸ Average of precision and recalls per class
Ground truth:
Prediction:
30
Experiment (RQ2)
Internal State DetectionState Change Detection Non-Hybrid Models
▹ Metrics
▹ Baselines
▹ Design
Traditional ML Classifiers
▹Ridge Classifier
▹3 Decision Trees
31
Experiment (RQ2)
Internal State DetectionState Change Detection Non-Hybrid Models
Input: A rolling window of size 𝑤 over the 10 inputs: 10𝑤 features
𝑤 ∈ 3, 5, 10, 15, 20
48 Configurations overall
▹ Metrics
▹ Baselines
▹ Design
32
Results (RQ2)
Internal State DetectionState Change Detection Non-Hybrid Models
+18% +16% +17%
▹Larger window size is better,
because there are many long-
term relations to discover
▹Training complexity increases
dramatically with growing
window size
33
Results (RQ2)
Internal State DetectionState Change Detection Non-Hybrid Models
▹
▸
▹
▹
The proposed model, improved classical ML models’ best performance by
up to 17%, measured by F1 score, in a shorter execution time and using
less computational resources.
34
Experiment
Internal State DetectionState Change Detection Non-Hybrid Models
RQ3) How much does the proposed model owe its performance to being a hybrid
model?
35
Experiment (RQ3)
Internal State DetectionState Change Detection Non-Hybrid Models
▹ Fully convolutional
▹ Fully recurrent
▹ Baselines
▹ Metrics
36
Experiment (RQ3)
Internal State DetectionState Change Detection Non-Hybrid Models
▹ Baselines
▹ Metrics▹Metrics: the same as RQ1 and RQ2
▸ CPD Precision and recall with 3 tolerances
▸ Classification precision and recall
37
Results (RQ3)
Internal State DetectionState Change Detection Non-Hybrid Models
▹Larger recurrent layers is
more effective than
larger convolutions
▸ Discovering long-term
relations
▸ Training larger convolutions
requires more data
38
Results (RQ3)
Internal State DetectionState Change Detection Non-Hybrid Models
▹
▸
▸
The hybrid architecture performs better than a comparable RNN model or fully
convolutional model, however the recurrent section plays a more important role in
the model’s performance.
Potential future extensions
▹ More case studies
▹ Applying it to other types of controller systems
▹ Using the inferred model in a downstream task
▹ Systematic hyper-parameter tuning
39
Summary40

More Related Content

What's hot

Iwsm2014 on automatically collectable metrics for software maintainability ...
Iwsm2014   on automatically collectable metrics for software maintainability ...Iwsm2014   on automatically collectable metrics for software maintainability ...
Iwsm2014 on automatically collectable metrics for software maintainability ...Nesma
 
Test Case Prioritization for Acceptance Testing of Cyber Physical Systems
Test Case Prioritization for Acceptance Testing of Cyber Physical SystemsTest Case Prioritization for Acceptance Testing of Cyber Physical Systems
Test Case Prioritization for Acceptance Testing of Cyber Physical SystemsLionel Briand
 
A Search-based Testing Approach for XML Injection Vulnerabilities in Web Appl...
A Search-based Testing Approach for XML Injection Vulnerabilities in Web Appl...A Search-based Testing Approach for XML Injection Vulnerabilities in Web Appl...
A Search-based Testing Approach for XML Injection Vulnerabilities in Web Appl...Lionel Briand
 
TMPA-2017: Unity Application Testing Automation with Appium and Image Recogni...
TMPA-2017: Unity Application Testing Automation with Appium and Image Recogni...TMPA-2017: Unity Application Testing Automation with Appium and Image Recogni...
TMPA-2017: Unity Application Testing Automation with Appium and Image Recogni...Iosif Itkin
 
Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"Ra'Fat Al-Msie'deen
 
Mutual Exclusion using Peterson's Algorithm
Mutual Exclusion using Peterson's AlgorithmMutual Exclusion using Peterson's Algorithm
Mutual Exclusion using Peterson's AlgorithmSouvik Roy
 
TMPA-2017: A Survey of High-Performance Computing for Software Verification
TMPA-2017: A Survey of High-Performance Computing for Software VerificationTMPA-2017: A Survey of High-Performance Computing for Software Verification
TMPA-2017: A Survey of High-Performance Computing for Software VerificationIosif Itkin
 
Practical Byzantine Fault Tolernace
Practical Byzantine Fault TolernacePractical Byzantine Fault Tolernace
Practical Byzantine Fault TolernaceYongraeJo
 
Practical byzantine fault tolerance by altanai
Practical byzantine fault tolerance by altanaiPractical byzantine fault tolerance by altanai
Practical byzantine fault tolerance by altanaiALTANAI BISHT
 
Process synchronization(deepa)
Process synchronization(deepa)Process synchronization(deepa)
Process synchronization(deepa)Nagarajan
 
Critical section problem in operating system.
Critical section problem in operating system.Critical section problem in operating system.
Critical section problem in operating system.MOHIT DADU
 
Peterson Critical Section Problem Solution
Peterson Critical Section Problem SolutionPeterson Critical Section Problem Solution
Peterson Critical Section Problem SolutionBipul Chandra Kar
 
Testing: ¿what, how, why?
Testing: ¿what, how, why?Testing: ¿what, how, why?
Testing: ¿what, how, why?David Rodenas
 
CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)
CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)
CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)Sung Kim
 
Chapter 6 - Process Synchronization
Chapter 6 - Process SynchronizationChapter 6 - Process Synchronization
Chapter 6 - Process SynchronizationWayne Jones Jnr
 
Ch7 Process Synchronization galvin
Ch7 Process Synchronization galvinCh7 Process Synchronization galvin
Ch7 Process Synchronization galvinShubham Singh
 

What's hot (20)

Iwsm2014 on automatically collectable metrics for software maintainability ...
Iwsm2014   on automatically collectable metrics for software maintainability ...Iwsm2014   on automatically collectable metrics for software maintainability ...
Iwsm2014 on automatically collectable metrics for software maintainability ...
 
Test Case Prioritization for Acceptance Testing of Cyber Physical Systems
Test Case Prioritization for Acceptance Testing of Cyber Physical SystemsTest Case Prioritization for Acceptance Testing of Cyber Physical Systems
Test Case Prioritization for Acceptance Testing of Cyber Physical Systems
 
A Search-based Testing Approach for XML Injection Vulnerabilities in Web Appl...
A Search-based Testing Approach for XML Injection Vulnerabilities in Web Appl...A Search-based Testing Approach for XML Injection Vulnerabilities in Web Appl...
A Search-based Testing Approach for XML Injection Vulnerabilities in Web Appl...
 
TMPA-2017: Unity Application Testing Automation with Appium and Image Recogni...
TMPA-2017: Unity Application Testing Automation with Appium and Image Recogni...TMPA-2017: Unity Application Testing Automation with Appium and Image Recogni...
TMPA-2017: Unity Application Testing Automation with Appium and Image Recogni...
 
Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"
 
Mutual Exclusion using Peterson's Algorithm
Mutual Exclusion using Peterson's AlgorithmMutual Exclusion using Peterson's Algorithm
Mutual Exclusion using Peterson's Algorithm
 
TMPA-2017: A Survey of High-Performance Computing for Software Verification
TMPA-2017: A Survey of High-Performance Computing for Software VerificationTMPA-2017: A Survey of High-Performance Computing for Software Verification
TMPA-2017: A Survey of High-Performance Computing for Software Verification
 
Practical Byzantine Fault Tolernace
Practical Byzantine Fault TolernacePractical Byzantine Fault Tolernace
Practical Byzantine Fault Tolernace
 
Practical byzantine fault tolerance by altanai
Practical byzantine fault tolerance by altanaiPractical byzantine fault tolerance by altanai
Practical byzantine fault tolerance by altanai
 
Process synchronization(deepa)
Process synchronization(deepa)Process synchronization(deepa)
Process synchronization(deepa)
 
Critical section problem in operating system.
Critical section problem in operating system.Critical section problem in operating system.
Critical section problem in operating system.
 
Peterson Critical Section Problem Solution
Peterson Critical Section Problem SolutionPeterson Critical Section Problem Solution
Peterson Critical Section Problem Solution
 
Testing: ¿what, how, why?
Testing: ¿what, how, why?Testing: ¿what, how, why?
Testing: ¿what, how, why?
 
OS_Ch7
OS_Ch7OS_Ch7
OS_Ch7
 
CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)
CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)
CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)
 
Chapter 6 - Process Synchronization
Chapter 6 - Process SynchronizationChapter 6 - Process Synchronization
Chapter 6 - Process Synchronization
 
Operating system critical section
Operating system   critical sectionOperating system   critical section
Operating system critical section
 
Os module 2 c
Os module 2 cOs module 2 c
Os module 2 c
 
Ch7 Process Synchronization galvin
Ch7 Process Synchronization galvinCh7 Process Synchronization galvin
Ch7 Process Synchronization galvin
 
Spyglass dft
Spyglass dftSpyglass dft
Spyglass dft
 

Similar to Hybrid Deep Neural Networks to Infer State Models of Black-Box Systems​

Black-box Behavioral Model Inference for Autopilot Software Systems
Black-box Behavioral Model Inference for Autopilot Software SystemsBlack-box Behavioral Model Inference for Autopilot Software Systems
Black-box Behavioral Model Inference for Autopilot Software SystemsMohammad Jafar Mashhadi
 
Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...
Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...
Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...Lionel Briand
 
Improving the Unification of Software Clones Using Tree and Graph Matching Al...
Improving the Unification of Software Clones Using Tree and Graph Matching Al...Improving the Unification of Software Clones Using Tree and Graph Matching Al...
Improving the Unification of Software Clones Using Tree and Graph Matching Al...Nikolaos Tsantalis
 
A Performance Study of BDD-Based Model Checking
A Performance Study of BDD-Based Model CheckingA Performance Study of BDD-Based Model Checking
A Performance Study of BDD-Based Model CheckingOlivier Coudert
 
230208 MLOps Getting from Good to Great.pptx
230208 MLOps Getting from Good to Great.pptx230208 MLOps Getting from Good to Great.pptx
230208 MLOps Getting from Good to Great.pptxArthur240715
 
The DEBS Grand Challenge 2017
The DEBS Grand Challenge 2017The DEBS Grand Challenge 2017
The DEBS Grand Challenge 2017Roman Katerinenko
 
Intrusion Tolerance for Networked Systems through Two-level Feedback Control
Intrusion Tolerance for Networked Systems through Two-level Feedback ControlIntrusion Tolerance for Networked Systems through Two-level Feedback Control
Intrusion Tolerance for Networked Systems through Two-level Feedback ControlKim Hammar
 
Credit Card Fraudulent Transaction Detection Research Paper
Credit Card Fraudulent Transaction Detection Research PaperCredit Card Fraudulent Transaction Detection Research Paper
Credit Card Fraudulent Transaction Detection Research PaperGarvit Burad
 
Semi-Supervised Insight Generation from Petabyte Scale Text Data
Semi-Supervised Insight Generation from Petabyte Scale Text DataSemi-Supervised Insight Generation from Petabyte Scale Text Data
Semi-Supervised Insight Generation from Petabyte Scale Text DataTech Triveni
 
Crossing the Boundaries: Development Strategies for (P)SoCs
Crossing the Boundaries: Development Strategies for (P)SoCsCrossing the Boundaries: Development Strategies for (P)SoCs
Crossing the Boundaries: Development Strategies for (P)SoCsAndreas Koschak
 
powerpoint feb
powerpoint febpowerpoint feb
powerpoint febimu409
 
Generation of Random EMF Models for Benchmarks
Generation of Random EMF Models for BenchmarksGeneration of Random EMF Models for Benchmarks
Generation of Random EMF Models for BenchmarksMarkus Scheidgen
 
A study of Machine Learning approach for Predictive Maintenance in Industry 4.0
A study of Machine Learning approach for Predictive Maintenance in Industry 4.0A study of Machine Learning approach for Predictive Maintenance in Industry 4.0
A study of Machine Learning approach for Predictive Maintenance in Industry 4.0Mohsen Sadok
 
KaoNet: Face Recognition and Generation App using Deep Learning
KaoNet: Face Recognition and Generation App using Deep LearningKaoNet: Face Recognition and Generation App using Deep Learning
KaoNet: Face Recognition and Generation App using Deep LearningVan Huy
 
Lecture 6-cs648 Randomized Algorithms
Lecture 6-cs648 Randomized AlgorithmsLecture 6-cs648 Randomized Algorithms
Lecture 6-cs648 Randomized AlgorithmsAnshul Yadav
 
Applications of Search-based Software Testing to Trustworthy Artificial Intel...
Applications of Search-based Software Testing to Trustworthy Artificial Intel...Applications of Search-based Software Testing to Trustworthy Artificial Intel...
Applications of Search-based Software Testing to Trustworthy Artificial Intel...Lionel Briand
 
Conducting and reporting the results of a cfd simulation
Conducting and reporting the results of a cfd simulationConducting and reporting the results of a cfd simulation
Conducting and reporting the results of a cfd simulationMalik Abdul Wahab
 
MiL Testing of Highly Configurable Continuous Controllers
MiL Testing of Highly Configurable Continuous ControllersMiL Testing of Highly Configurable Continuous Controllers
MiL Testing of Highly Configurable Continuous ControllersLionel Briand
 
Policy Based reinforcement Learning for time series Anomaly detection
Policy Based reinforcement Learning for time series Anomaly detectionPolicy Based reinforcement Learning for time series Anomaly detection
Policy Based reinforcement Learning for time series Anomaly detectionKishor Datta Gupta
 

Similar to Hybrid Deep Neural Networks to Infer State Models of Black-Box Systems​ (20)

Black-box Behavioral Model Inference for Autopilot Software Systems
Black-box Behavioral Model Inference for Autopilot Software SystemsBlack-box Behavioral Model Inference for Autopilot Software Systems
Black-box Behavioral Model Inference for Autopilot Software Systems
 
Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...
Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...
Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...
 
Improving the Unification of Software Clones Using Tree and Graph Matching Al...
Improving the Unification of Software Clones Using Tree and Graph Matching Al...Improving the Unification of Software Clones Using Tree and Graph Matching Al...
Improving the Unification of Software Clones Using Tree and Graph Matching Al...
 
A Performance Study of BDD-Based Model Checking
A Performance Study of BDD-Based Model CheckingA Performance Study of BDD-Based Model Checking
A Performance Study of BDD-Based Model Checking
 
230208 MLOps Getting from Good to Great.pptx
230208 MLOps Getting from Good to Great.pptx230208 MLOps Getting from Good to Great.pptx
230208 MLOps Getting from Good to Great.pptx
 
The DEBS Grand Challenge 2017
The DEBS Grand Challenge 2017The DEBS Grand Challenge 2017
The DEBS Grand Challenge 2017
 
Intrusion Tolerance for Networked Systems through Two-level Feedback Control
Intrusion Tolerance for Networked Systems through Two-level Feedback ControlIntrusion Tolerance for Networked Systems through Two-level Feedback Control
Intrusion Tolerance for Networked Systems through Two-level Feedback Control
 
Credit Card Fraudulent Transaction Detection Research Paper
Credit Card Fraudulent Transaction Detection Research PaperCredit Card Fraudulent Transaction Detection Research Paper
Credit Card Fraudulent Transaction Detection Research Paper
 
Semi-Supervised Insight Generation from Petabyte Scale Text Data
Semi-Supervised Insight Generation from Petabyte Scale Text DataSemi-Supervised Insight Generation from Petabyte Scale Text Data
Semi-Supervised Insight Generation from Petabyte Scale Text Data
 
Crossing the Boundaries: Development Strategies for (P)SoCs
Crossing the Boundaries: Development Strategies for (P)SoCsCrossing the Boundaries: Development Strategies for (P)SoCs
Crossing the Boundaries: Development Strategies for (P)SoCs
 
HUGenomics: a support for personalized medicine research
HUGenomics: a support for personalized medicine researchHUGenomics: a support for personalized medicine research
HUGenomics: a support for personalized medicine research
 
powerpoint feb
powerpoint febpowerpoint feb
powerpoint feb
 
Generation of Random EMF Models for Benchmarks
Generation of Random EMF Models for BenchmarksGeneration of Random EMF Models for Benchmarks
Generation of Random EMF Models for Benchmarks
 
A study of Machine Learning approach for Predictive Maintenance in Industry 4.0
A study of Machine Learning approach for Predictive Maintenance in Industry 4.0A study of Machine Learning approach for Predictive Maintenance in Industry 4.0
A study of Machine Learning approach for Predictive Maintenance in Industry 4.0
 
KaoNet: Face Recognition and Generation App using Deep Learning
KaoNet: Face Recognition and Generation App using Deep LearningKaoNet: Face Recognition and Generation App using Deep Learning
KaoNet: Face Recognition and Generation App using Deep Learning
 
Lecture 6-cs648 Randomized Algorithms
Lecture 6-cs648 Randomized AlgorithmsLecture 6-cs648 Randomized Algorithms
Lecture 6-cs648 Randomized Algorithms
 
Applications of Search-based Software Testing to Trustworthy Artificial Intel...
Applications of Search-based Software Testing to Trustworthy Artificial Intel...Applications of Search-based Software Testing to Trustworthy Artificial Intel...
Applications of Search-based Software Testing to Trustworthy Artificial Intel...
 
Conducting and reporting the results of a cfd simulation
Conducting and reporting the results of a cfd simulationConducting and reporting the results of a cfd simulation
Conducting and reporting the results of a cfd simulation
 
MiL Testing of Highly Configurable Continuous Controllers
MiL Testing of Highly Configurable Continuous ControllersMiL Testing of Highly Configurable Continuous Controllers
MiL Testing of Highly Configurable Continuous Controllers
 
Policy Based reinforcement Learning for time series Anomaly detection
Policy Based reinforcement Learning for time series Anomaly detectionPolicy Based reinforcement Learning for time series Anomaly detection
Policy Based reinforcement Learning for time series Anomaly detection
 

Recently uploaded

Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 

Recently uploaded (20)

Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 

Hybrid Deep Neural Networks to Infer State Models of Black-Box Systems​

  • 1. Hybrid Deep Neural Networks to Infer State Models of Black-Box Systems ▹ Mohammad Jafar Mashhadi ▹ Hadi Hemmati ASE 2020
  • 2. Problem context: Black-box Automated Systems Automated systems are all around us. At their core they use either: ▹ AI: Self driving cars ▹ Feedback loop controllers: Autopilot, cruise control, plant controllers, etc. 2
  • 3. Problem context: Understanding their behaviour ▹ Understanding their behaviour ▸ Verification ▸ Anomaly detection ▸ Automated Testing ▹ They are often state based 3
  • 4. Problem context: Specification Mining and Model Inference4
  • 5. Problem context: white-box model inference ▹ Most of the prior work focuses on white-box analysis ▹ But, black-box systems are quite often used in practice 5
  • 6. Problem context: white-box vs. black-box analysis ▹ Static analysis is out of question ▹ Dynamic analysis has limitations 6 Test Instrumenter Attach Generate Execution Traces Abstractor Abstract Model Generates Runs on Source Code Abstractor Abstract Model Generates ???
  • 7. Problem: Inferring state models from black-box systems ▹ How to go about inferring states in a black-box controller? 7 Abstractor Abstract Model Generates ???
  • 8. Solution Context: Feedback loop controllers ▹ Car cruise control ▸ Goal: Keep current speed ≈ desired speed ▸ Input: Speed ▸ Output: Throttle increase/decrease 8
  • 9. Solution Context: Feedback loop controllers ▹ Autopilot ▸ Goal: Depends on the internal state ▸ Input: Airspeed, AOA, attitude, MSL altitude, etc. ▸ Outputs: Throttle, control surfaces’ deflections 9 Aircraft illustration from Kopyt and Żugaj 20
  • 10. Solution Context: Control loops in Autopilot (PID) ▹ “Goal: depends on the internal state”: ▸ During takeoff: ⬩ Heading: keep constant, align with runway ⬩ Throttle: keep constant, maximum ▸ In cruise: ⬩ Heading: constant, based on flight plan ⬩ Throttle: reacts to altitude changes ⬩ Pitch: reacts to airspeed changes ▹ Hypothesis: The reverse should be possible ▸ Observing which inputs/outputs are coupled at each moment to infer what the internal state is 10
  • 11. Solution Context: Prior work ▹ Change point detection in time series is promising ▹ But they have limitations: ▸ Assumptions on the data: ⬩ Univariate ⬩ One change point ⬩ Known number of change points ⬩ Specific distributions ▸ Being too general: ⬩ Not exploiting the knowledge about the system 11
  • 12. The Solution: A hybrid deep neural network12 Training a neural network model that can infer the state from the stream of input and outputs
  • 13. More on Hybrid Deep Neural Network Models ▹ Hybrid in this context: CNN + RNN ▹ Showed to be effective in similar problems 13 Sofma Convolutional LayersAll Signals Fully Connected Layers Seq2Seq Recurrent Layers Saeoeime Black-Box System Inputs Outputs
  • 14. More on Hybrid Deep Neural Network Models ▹ Convolutional layers ▸ Can detect local features (lines, circles, patterns, etc.) ▸ Can learn preprocessing (rolling average, discreate derivative, etc.) 14 Input Kernel Output Images credit: mlnotebook
  • 15. More on Hybrid Deep Neural Network Models ▹ Recurrent layers ▸ Output depends on current input, and history: It has memory ▸ Can discover long-term relations ▸ Perfect for processing sequential data (text, time series, etc.) 15 Image credit: Wiley
  • 16. The final Solution16 GRU GRU LeakyReLu Softmax C 1D 3 C 1D 10C 1D 5 C 1D 15 C 1D 20 S 2S GRU F C c La ▹ Proposed architecture: ▸ 5 Convolutions with increasing kernel size ▸ 2 large Recurrent layers ▹ based on: ▸ Similar architectures in literature ▸ Experiments and tuning
  • 17. Experiments and Results 17 State Change Detection Internal State Detection Non-Hybrid Models
  • 18. Case Study: Autopilot software18 Icons made by DinosoftLabs from Flaticon is licensed by CC 3.0 BY 500K LoC in C 1000+ Customers In 85 Countries UAVs
  • 19. Experiment setup: Dataset ▹ 888 MicroPilot system tests ▹ In-house simulator ▹ 5 inputs + 5 outputs ▹ Test lengths: 200 – 20,000 samples (5Hz sampling rate) 19
  • 20. 20 Experiment Internal State Detection Non-Hybrid Models RQ1) How does the proposed technique perform in detecting the state changes? When the state change happens What the source and target states are State Change Detection
  • 21. 21 Experiment (RQ1) Internal State Detection Non-Hybrid Models ▹ Metrics ▹ Baselines ▹ Design Precision, Recall, and F1 Score with a tolerance State Change Detection Ground truth: Prediction: TP TP FP FN FN TN Precision = TP P Recall = TP T F1 = 2 Prec × Recall Prec + Recall
  • 22. 22 Experiment (RQ1) Internal State Detection Non-Hybrid Models ▹ Metrics ▹ Baselines ▹ Design Ruptures library [Truong et al. ‘18] State Change Detection
  • 23. 23 Experiment (RQ1) Internal State Detection Non-Hybrid Models ▹ Metrics ▹ Baselines ▹ Design State Change Detection Different configurations of baseline algos ▹Search Method: ▸ Pelt (Exact method) ▸ Bottom-up Segmentation ▸ Window based ▹Penalty: 3 values ▹Cost functions: 7 values
  • 24. 24 Results (RQ1) Internal State Detection Non-Hybrid ModelsState Change Detection
  • 25. 25 Results (RQ1) Internal State Detection Non-Hybrid ModelsState Change Detection +102% +88% +92%
  • 26. 26 Results (RQ1) Internal State Detection Non-Hybrid ModelsState Change Detection Baselines Our Method 16 CPUs 1 GPU 64 GB Memory 8 GB Memory 12H+ 1H training (once) + <1m prediction
  • 27. 27 Results (RQ1) Internal State Detection Non-Hybrid ModelsState Change Detection Compared to traditional CPD algorithms the proposed model is both faster and less resource intensive; All while it showed an improvement of 88 to 102%, measured by F1 score, compared to the best baseline.
  • 28. 28 Experiment Internal State DetectionState Change Detection Non-Hybrid Models RQ2) How well does the proposed technique predict the internal state of the system? RQ1 was a binary classification, here we have a multiclass classification problem
  • 29. 29 Experiment (RQ2) Internal State DetectionState Change Detection Non-Hybrid Models ▹ Metrics ▹ Baselines ▹ Design ▹Multi-class classification ▸ Classes = The Possible States ▸ Average of precision and recalls per class Ground truth: Prediction:
  • 30. 30 Experiment (RQ2) Internal State DetectionState Change Detection Non-Hybrid Models ▹ Metrics ▹ Baselines ▹ Design Traditional ML Classifiers ▹Ridge Classifier ▹3 Decision Trees
  • 31. 31 Experiment (RQ2) Internal State DetectionState Change Detection Non-Hybrid Models Input: A rolling window of size 𝑤 over the 10 inputs: 10𝑤 features 𝑤 ∈ 3, 5, 10, 15, 20 48 Configurations overall ▹ Metrics ▹ Baselines ▹ Design
  • 32. 32 Results (RQ2) Internal State DetectionState Change Detection Non-Hybrid Models +18% +16% +17% ▹Larger window size is better, because there are many long- term relations to discover ▹Training complexity increases dramatically with growing window size
  • 33. 33 Results (RQ2) Internal State DetectionState Change Detection Non-Hybrid Models ▹ ▸ ▹ ▹ The proposed model, improved classical ML models’ best performance by up to 17%, measured by F1 score, in a shorter execution time and using less computational resources.
  • 34. 34 Experiment Internal State DetectionState Change Detection Non-Hybrid Models RQ3) How much does the proposed model owe its performance to being a hybrid model?
  • 35. 35 Experiment (RQ3) Internal State DetectionState Change Detection Non-Hybrid Models ▹ Fully convolutional ▹ Fully recurrent ▹ Baselines ▹ Metrics
  • 36. 36 Experiment (RQ3) Internal State DetectionState Change Detection Non-Hybrid Models ▹ Baselines ▹ Metrics▹Metrics: the same as RQ1 and RQ2 ▸ CPD Precision and recall with 3 tolerances ▸ Classification precision and recall
  • 37. 37 Results (RQ3) Internal State DetectionState Change Detection Non-Hybrid Models ▹Larger recurrent layers is more effective than larger convolutions ▸ Discovering long-term relations ▸ Training larger convolutions requires more data
  • 38. 38 Results (RQ3) Internal State DetectionState Change Detection Non-Hybrid Models ▹ ▸ ▸ The hybrid architecture performs better than a comparable RNN model or fully convolutional model, however the recurrent section plays a more important role in the model’s performance.
  • 39. Potential future extensions ▹ More case studies ▹ Applying it to other types of controller systems ▹ Using the inferred model in a downstream task ▹ Systematic hyper-parameter tuning 39