SlideShare a Scribd company logo
1 of 51
Download to read offline
Causal Repair of Learning-enabled
Cyber-physical Systems
Pengyuan (Eric) Lu*, Ivan Ruchkin+
, Matthew Cleaveland*,
Oleg Sokolsky* and Insup Lee*
*PRECISE Center, University of Pennsylvania
+
Trustworthy Engineered Autonomy Lab, University of Florida
The 2nd
International Conference on Assured Autonomy
June 6th
, 2023
Outline
1. Motivation
2. Background
3. Problem statement
4. Solution Part I: Constructing Halpern-Pearl Model
5. Solution Part II: Searching for Repair
6. Experiment results
2
1. Motivation
3
Motivation: What caused the failure?
Source: Nando’s Giphy page [link]
Source: Wall Street Journal [link]
4
● Failures can be formalized as violations
of specifications at runtime
● E.g. signal temporal logics (STL)
● Repair: failure → success
5
Motivation: Repair the Controller
Statistical/non-causal Repair
Moosbrugger et al., 2017:
● Runtime observation ⇒ statistical analysis ⇒ diagnosis and repair suggestion
But correlation ≠ causation!
I got perfect scores because I
wear this coat!
6
Observation:
● No coat, 90% exam score
● Coat, 100% exam score
Causal Diagnosis and Repair
Studying
hard
Going to
office hours
Perfect
scores
Ibrahim et al., 2019:
7
The Problem of Learning-enabled CPS
● They do not follow a “standard” internal structure!
Deep Q Network
Source: Renu Khandelwal [link]
8
Motivation: Diagnosis and Repair on I/Os
● We suspect the I/Os of a component, e.g.
controller of this mountain car
● A cause is a factual assignment of output values
to a subset of input values
○ “It is because x1
is mapped to y1
, x2
is
mapped to y2
, …, the CPS failed.”
● A repair is a reassignment of output values to
these input values
○ “Had we mapped x1
to y1
’, x2
to y2
’, …,
the CPS would have succeeded.”
Denote the factual behavior as a mapping
ctrl in ctrl out
(0, 0) 0.2
(0, 0.1) 0.21
… …
9
Challenges / Contributions
● Constructing a causal model to encode the dependency of a suspected
controller’s I/O behaviors to an STL outcome
○ Feasible for efficient search on the cause and repair
○ Repair on a cause must be a minimal repair
● Searching algorithm for a cause and corresponding repair on the model
○ What to do if our suspicion is wrong?
10
2. Background
11
Halpern-Pearl Causality Model (HP Model)
Studying hard
1
Going to
Office Hours
0
Perfect Scores
0
Alice is a
student
1
Avg sleeping
hours
7
Credits taken
this semester
10
PS = SH ∧ GtOH
SH = …
GtOH = …
● Endogenous nodes :
candidates to be blamed
● Exogenous nodes : a fixed
context, not to be blamed
● Value space of all nodes
● Dependency equations
12
Halpern-Pearl Causality Model (HP Model)
● An outcome is a proposition on endogenous nodes’ value assignments
○ E.g. perfect score := 1
● A candidate cause (of an outcome) is a conjunction on endogenous node’s
value assignments
○ E.g. (studying hard := 1) Λ (going to office hours := 0)
○ E.g. going to office hours := 0
○ Can be written in vector form
13
Halpern-Pearl Causality Model (HP Model)
Studying hard
1
Going to
Office Hours
1
Perfect Scores
1
Alice is a
student
1
Avg sleeping
hours
7
Credits taken
this semester
10
PS = SH ∧ GtOH
SH = …
GtOH = …
● Repair: Reassignment of a
subset of endogenous nodes
to change the outcome
● Here, cause = (GtOH := 0),
repair = (GtOH := 1)
14
What makes (going to office hours := 0) a cause of (perfect scores := 0), but not
(studying hard := 1) Λ (going to office hours := 0)?
● AC1: “Bad” outcome must be factual ✅
● AC2: Exists “good” reassignment of the candidate causes to make the
outcome “good” ✅
● AC3: Candidate cause must be minimal
○ No proper subset of the candidate cause satisfies AC2!
Three Criteria for a Cause (Informal)
15
Three Criteria for a Cause (Formal)
Based on a factual value assignment, what makes a cause of ?
● AC1: outcome must be true
● AC2: exists partition (candidate, circumstance, others)
○ AC2(a): exists counterfactual , , that flips outcome to
○ AC2(b): if we fix factual and only changes , no matter
how we change the values of any subset of , outcome maintains at
● AC3: no subset of satisfies AC1 and AC2
16
3. Problem
17
Problem Statement
On an observed trace with violation of property , how can we use HP causality
model to identify a subset of a suspected component’s I/O behaviors that
caused the violation, and provide an alternative behavior as a minimal repair?
● Sub-problem 1: Encode the dependency structure of the behaviors to
outcome of as an HP model
● Sub-problem 2: On the constructed HP model, design a search algorithm for a
cause, that
○ Upon success, return a corresponding repair
○ Upon failure, quantify the confidence of the violation is not caused by
Assume: (1) robust outcome and a simulator
(2) Lipschitz-continuous
18
Proposed Solution
19
1
u111
0
Outcome of φ
Component C
f
SIMULATE o
DECODE
ENCODE
0
u112
1
u121
0
u122
1
u211
0
u212
0
u221
0
u222
Step 1: HP model construction
1
u111
1
Outcome of φ
Component C
f
SIMULATE o
DECODE
ENCODE
1
u112
1
u121
0
u122
1
u211
0
u212
1
u221
0
u222
Step 2: Search for cause and
repair on the HP model
4. Solution Part I:
Constructing HP Model
20
Infinite HP Model
21
ctrl in ctrl out
(0, 0) 0.2
(0, 0.1) 0.21
… …
x1
x2
y1
y2
Issues of Infinite HP Model
● Infinitely many endogenous nodes!
○ Infinitely large search space for counterfactual value assignments
● Can we shrink down the search space?
22
Discretization of the Behaviors
23
Discretization of the Behaviors
cell cell
center of
24
Discretized HP Model
25
Issues of Discretized HP Model
● Recall AC3 of HP causality
○ Cause is found by the counterfactual node value assignment that flips
the outcome and minimally disagrees with the factual one
○ Minimality: no proper subset of the disagreeing nodes can repair the
outcome
● This needs to reflect a minimal repair
26
Goal: Partial Order Preservation
27
Only value changes at one node, but we need set containment
Goal: Partial Order Preservation
● Partial order on behaviors
○ For two , is closer to the factual than ?
● Partial order on endogenous node value assignments
○ For two , are the disagreeing nodes by and the factual
a subset of the disagreeing nodes by and ?
28
Encoding of Behaviors
1
0 2
10
11
12
5 6 7 dim 1
dim 2
In Out
[0, 1] [6, 7] × [10, 11]
[1, 2] [5, 6] × [10, 11]
29
Encoding of Behaviors
1
0 2
10
11
12
5 6 7 dim 1
dim 2
In Out
[0, 1] [6, 7] × [10, 11]
[1, 2] [5, 6] × [10, 11]
30
In Out dim1 Out dim2 Proposition
[0, 1] ≥ 5 ≥ 10 1
[0, 1] ≥ 5 ≥ 11 0
[0, 1] ≥ 6 ≥ 10 1
[0, 1] ≥ 6 ≥ 11 0
… … … …
Encoded
Proposition
Propositional HP Model
1
u111
0
Outcome of φ
Component C
f
SIMULATE o DECODE
ENCODE
0
u112
1
u121
0
u122
1
u211
0
u212
0
u221
0
u222
31
Propositional HP Model
1
u111
0
Outcome of φ
Component C
f
SIMULATE o DECODE
ENCODE
0
u112
1
u121
0
u122
1
u211
0
u212
0
u221
0
u222
32
5. Solution Part II:
Searching for Cause
and Repair
33
Random Sampling for a “Good” Counterfactual
● On the propositional HP model, we uniformly random sample (allowed) node
value assignments
● There is a chance that we are suspecting the wrong component
○ The component’s behaviors is not, or is not the only cause of the failure
● The more assignments we sampled without repairing the outcome, the more
confident we are that our suspicion is wrong
34
How Many Samples?
● is a portion threshold
● is a significance level
● denotes quantile of standard Normal distribution
Wilson 1927:
● If we uniformly sample assignments in a row without flipping the outcome,
then we are confident that the portion of “good” counterfactuals is
● E.g.
35
Interpolation for a Cause
● After sampling, we only found a “good” counterfactual behavior
● To find the cause, we need a counterfactual that is minimally different from the
factual and can repair the outcome
● There must exist such an assignment between and
⇔
36
Interpolation for a Cause
factual “bad”
sampled “good”
37
Interpolation for a Cause
factual “bad”
sampled “good”
38
✅
behavior in between
Interpolation for a Cause
factual “bad”
sampled “good”
39
✅
behavior in between
Interpolation for a Cause
factual “bad”
sampled “good”
40
❌
behavior in between
Interpolation for a Cause
factual “bad”
sampled “good”
41
✅
behavior in between
Interpolation for a Cause
factual “bad”
sampled “good”
42
behavior in between
❌
Interpolation for a Cause
factual “bad”
sampled “good”
43
final interpolated
Interpolation for a Cause
● We step from towards , until it no longer can repair the outcome
● Theorem: the interpolated is a repair, and the difference in node
assignments and is a cause based on the HP model
44
6. Experiments
45
OpenAI Gym Mountain Car + DNN Controllers
● Input space of controller:
● Output space of controller:
46
deep neural network
Results
● Input space is discretized into 18 x 14 = 252 cells
● 153 out of the 252 cells are mapped to a different value
● Repair = “had these 153 cells been mapped to the new values, the
mountain car would have succeeded from the initial state (-0.5, 0)”
47
Factual Controller Searched Controller
Interpolated/repaired
Controller
Results
48
Factual Controller Repaired Controller 1 Repaired Controller 2 Repaired Controller 3
pos
vel
time time time time
Conclusion
● We designed a causal diagnosis and repair algorithm for learning-enabled CPS
● The algorithm first constructs an Halpern-Pearl model, and then
○ Finds a cause and a corresponding repair on a component’s I/Os, or
○ Exit with a quantified confidence that the component’s I/Os are not to be
blamed
● We experimented with OpenAI Gym Mountain Car and successfully repaired a
DNN controller
49
Future Work
● From I/O to controller parameters
○ How does the repaired I/O help modify the neural network weights?
● Repairing from different initial states
○ How to repair one initial state without breaking others?
● Ongoing work: gradient-based repair by barrier methods
50
Acknowledgement
● We appreciate the support by ARO (W911NF-20-1-0080), AFRL and DARPA
(FA8750-18-C-0090).
● Any opinions expressed are those of the authors and do not necessarily
reflect the views of ARO, AFRL, DARPA, DoD or the United States
Government.
51

More Related Content

Similar to Causal Repair of Learning-Enabled Cyber-physical Systems

20100522 software verification_sharygina_lecture02
20100522 software verification_sharygina_lecture0220100522 software verification_sharygina_lecture02
20100522 software verification_sharygina_lecture02Computer Science Club
 
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
 
HUDE 225Take Home Directions You are a psychologist working a.docx
HUDE 225Take Home Directions You are a psychologist working a.docxHUDE 225Take Home Directions You are a psychologist working a.docx
HUDE 225Take Home Directions You are a psychologist working a.docxwellesleyterresa
 
ALGORITHMS - SHORT NOTES
ALGORITHMS - SHORT NOTESALGORITHMS - SHORT NOTES
ALGORITHMS - SHORT NOTESsuthi
 
ManScie_Chapter1_Introduction (4).pdf
ManScie_Chapter1_Introduction (4).pdfManScie_Chapter1_Introduction (4).pdf
ManScie_Chapter1_Introduction (4).pdfMierukoChan2
 
Backtracking & branch and bound
Backtracking & branch and boundBacktracking & branch and bound
Backtracking & branch and boundVipul Chauhan
 
Madaari : Ordering For The Monkeys
Madaari : Ordering For The MonkeysMadaari : Ordering For The Monkeys
Madaari : Ordering For The MonkeysJ On The Beach
 
Hybrid Deep Neural Networks to Infer State Models of Black-Box Systems​
Hybrid Deep Neural Networks to Infer State Models of Black-Box Systems​Hybrid Deep Neural Networks to Infer State Models of Black-Box Systems​
Hybrid Deep Neural Networks to Infer State Models of Black-Box Systems​Mohammad Jafar Mashhadi
 
S6 l04 analytical and numerical methods of structural analysis
S6 l04 analytical and numerical methods of structural analysisS6 l04 analytical and numerical methods of structural analysis
S6 l04 analytical and numerical methods of structural analysisShaikh Mohsin
 
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
 
Data simulation basics
Data simulation basicsData simulation basics
Data simulation basicsDorothy Bishop
 
Satisfiability
SatisfiabilitySatisfiability
SatisfiabilityJim Kukula
 
Willump: Optimizing Feature Computation in ML Inference
Willump: Optimizing Feature Computation in ML InferenceWillump: Optimizing Feature Computation in ML Inference
Willump: Optimizing Feature Computation in ML InferenceDatabricks
 
Mathematical Analysis of Non-Recursive Algorithm.
Mathematical Analysis of Non-Recursive Algorithm.Mathematical Analysis of Non-Recursive Algorithm.
Mathematical Analysis of Non-Recursive Algorithm.mohanrathod18
 
Inconsistencies in Models of Adaptive Service Robots
Inconsistencies in Models of Adaptive Service RobotsInconsistencies in Models of Adaptive Service Robots
Inconsistencies in Models of Adaptive Service RobotsIvan Ruchkin
 
Question 1 1.   With CPM, we are able to calculate the probabi.docx
Question 1 1.   With CPM, we are able to calculate the probabi.docxQuestion 1 1.   With CPM, we are able to calculate the probabi.docx
Question 1 1.   With CPM, we are able to calculate the probabi.docxIRESH3
 
CompEng - Lec01 - Introduction To Optimum Design.pdf
CompEng - Lec01 - Introduction To Optimum Design.pdfCompEng - Lec01 - Introduction To Optimum Design.pdf
CompEng - Lec01 - Introduction To Optimum Design.pdfnooreldeenmagdy2
 

Similar to Causal Repair of Learning-Enabled Cyber-physical Systems (20)

20100522 software verification_sharygina_lecture02
20100522 software verification_sharygina_lecture0220100522 software verification_sharygina_lecture02
20100522 software verification_sharygina_lecture02
 
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
 
HUDE 225Take Home Directions You are a psychologist working a.docx
HUDE 225Take Home Directions You are a psychologist working a.docxHUDE 225Take Home Directions You are a psychologist working a.docx
HUDE 225Take Home Directions You are a psychologist working a.docx
 
ALGORITHMS - SHORT NOTES
ALGORITHMS - SHORT NOTESALGORITHMS - SHORT NOTES
ALGORITHMS - SHORT NOTES
 
ManScie_Chapter1_Introduction (4).pdf
ManScie_Chapter1_Introduction (4).pdfManScie_Chapter1_Introduction (4).pdf
ManScie_Chapter1_Introduction (4).pdf
 
Backtracking & branch and bound
Backtracking & branch and boundBacktracking & branch and bound
Backtracking & branch and bound
 
XAI (IIT-Patna).pdf
XAI (IIT-Patna).pdfXAI (IIT-Patna).pdf
XAI (IIT-Patna).pdf
 
Madaari : Ordering For The Monkeys
Madaari : Ordering For The MonkeysMadaari : Ordering For The Monkeys
Madaari : Ordering For The Monkeys
 
Hybrid Deep Neural Networks to Infer State Models of Black-Box Systems​
Hybrid Deep Neural Networks to Infer State Models of Black-Box Systems​Hybrid Deep Neural Networks to Infer State Models of Black-Box Systems​
Hybrid Deep Neural Networks to Infer State Models of Black-Box Systems​
 
S6 l04 analytical and numerical methods of structural analysis
S6 l04 analytical and numerical methods of structural analysisS6 l04 analytical and numerical methods of structural analysis
S6 l04 analytical and numerical methods of structural analysis
 
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...
 
Data simulation basics
Data simulation basicsData simulation basics
Data simulation basics
 
Satisfiability
SatisfiabilitySatisfiability
Satisfiability
 
Willump: Optimizing Feature Computation in ML Inference
Willump: Optimizing Feature Computation in ML InferenceWillump: Optimizing Feature Computation in ML Inference
Willump: Optimizing Feature Computation in ML Inference
 
Ch04lect1 ud
Ch04lect1 udCh04lect1 ud
Ch04lect1 ud
 
Mathematical Analysis of Non-Recursive Algorithm.
Mathematical Analysis of Non-Recursive Algorithm.Mathematical Analysis of Non-Recursive Algorithm.
Mathematical Analysis of Non-Recursive Algorithm.
 
Inconsistencies in Models of Adaptive Service Robots
Inconsistencies in Models of Adaptive Service RobotsInconsistencies in Models of Adaptive Service Robots
Inconsistencies in Models of Adaptive Service Robots
 
Question 1 1.   With CPM, we are able to calculate the probabi.docx
Question 1 1.   With CPM, we are able to calculate the probabi.docxQuestion 1 1.   With CPM, we are able to calculate the probabi.docx
Question 1 1.   With CPM, we are able to calculate the probabi.docx
 
Housing price prediction
Housing price predictionHousing price prediction
Housing price prediction
 
CompEng - Lec01 - Introduction To Optimum Design.pdf
CompEng - Lec01 - Introduction To Optimum Design.pdfCompEng - Lec01 - Introduction To Optimum Design.pdf
CompEng - Lec01 - Introduction To Optimum Design.pdf
 

More from Ivan Ruchkin

Poster: Conservative Safety Monitors of Stochastic Dynamical Systems
Poster: Conservative Safety Monitors of Stochastic Dynamical SystemsPoster: Conservative Safety Monitors of Stochastic Dynamical Systems
Poster: Conservative Safety Monitors of Stochastic Dynamical SystemsIvan Ruchkin
 
Poster: How Safe Am I Given What I See? Calibrated Prediction of Safety Chanc...
Poster: How Safe Am I Given What I See? Calibrated Prediction of Safety Chanc...Poster: How Safe Am I Given What I See? Calibrated Prediction of Safety Chanc...
Poster: How Safe Am I Given What I See? Calibrated Prediction of Safety Chanc...Ivan Ruchkin
 
Verify-then-Monitor: Calibration Guarantees for Safety Confidence
Verify-then-Monitor: Calibration Guarantees for Safety ConfidenceVerify-then-Monitor: Calibration Guarantees for Safety Confidence
Verify-then-Monitor: Calibration Guarantees for Safety ConfidenceIvan Ruchkin
 
Conservative Safety Monitors of Stochastic Dynamical Systems
Conservative Safety Monitors of Stochastic Dynamical SystemsConservative Safety Monitors of Stochastic Dynamical Systems
Conservative Safety Monitors of Stochastic Dynamical SystemsIvan Ruchkin
 
Confidence Composition for Monitors of Verification Assumptions
Confidence Composition for Monitors of Verification AssumptionsConfidence Composition for Monitors of Verification Assumptions
Confidence Composition for Monitors of Verification AssumptionsIvan Ruchkin
 
Overcoming Heterogeneity in Autonomous Cyber-Physical Systems
Overcoming Heterogeneity in Autonomous Cyber-Physical SystemsOvercoming Heterogeneity in Autonomous Cyber-Physical Systems
Overcoming Heterogeneity in Autonomous Cyber-Physical SystemsIvan Ruchkin
 
High-Confidence Data Programming for Evaluating Suppression of Physiological ...
High-Confidence Data Programming for Evaluating Suppression of Physiological ...High-Confidence Data Programming for Evaluating Suppression of Physiological ...
High-Confidence Data Programming for Evaluating Suppression of Physiological ...Ivan Ruchkin
 
Data Generation with PROSPECT: a Probability Specification Tool
Data Generation with PROSPECT: a Probability Specification ToolData Generation with PROSPECT: a Probability Specification Tool
Data Generation with PROSPECT: a Probability Specification ToolIvan Ruchkin
 
Confidence Monitoring and Composition for Dynamic Assurance of Learning-Enabl...
Confidence Monitoring and Composition for Dynamic Assurance of Learning-Enabl...Confidence Monitoring and Composition for Dynamic Assurance of Learning-Enabl...
Confidence Monitoring and Composition for Dynamic Assurance of Learning-Enabl...Ivan Ruchkin
 
Confidence Composition (CoCo) for Dynamic Assurance of Learning-Enabled Auton...
Confidence Composition (CoCo) for Dynamic Assurance of Learning-Enabled Auton...Confidence Composition (CoCo) for Dynamic Assurance of Learning-Enabled Auton...
Confidence Composition (CoCo) for Dynamic Assurance of Learning-Enabled Auton...Ivan Ruchkin
 
Confidence Monitoring and Composition for Dynamic Assurance of Learning-Enabl...
Confidence Monitoring and Composition for Dynamic Assurance of Learning-Enabl...Confidence Monitoring and Composition for Dynamic Assurance of Learning-Enabl...
Confidence Monitoring and Composition for Dynamic Assurance of Learning-Enabl...Ivan Ruchkin
 
On the Role of Assumptions in Engineering Smart Systems
On the Role of Assumptions in Engineering Smart SystemsOn the Role of Assumptions in Engineering Smart Systems
On the Role of Assumptions in Engineering Smart SystemsIvan Ruchkin
 
Compositional Probabilistic Analysis of Temporal Properties over Stochastic D...
Compositional Probabilistic Analysis of Temporal Properties over Stochastic D...Compositional Probabilistic Analysis of Temporal Properties over Stochastic D...
Compositional Probabilistic Analysis of Temporal Properties over Stochastic D...Ivan Ruchkin
 
Overview of Epidemic Models for COVID-19
Overview of Epidemic Models for COVID-19Overview of Epidemic Models for COVID-19
Overview of Epidemic Models for COVID-19Ivan Ruchkin
 
Thesis Defense: Integration of Modeling Methods for Cyber-Physical Systems
Thesis Defense: Integration of Modeling Methods for Cyber-Physical SystemsThesis Defense: Integration of Modeling Methods for Cyber-Physical Systems
Thesis Defense: Integration of Modeling Methods for Cyber-Physical SystemsIvan Ruchkin
 
Towards a Formal Framework for Hybrid Planning in Self-Adaptation
Towards a Formal Framework for Hybrid Planning in Self-AdaptationTowards a Formal Framework for Hybrid Planning in Self-Adaptation
Towards a Formal Framework for Hybrid Planning in Self-AdaptationIvan Ruchkin
 
IPL: An Integration Property Language for Multi-Model Cyber-Physical Systems
IPL: An Integration Property Language for Multi-Model Cyber-Physical SystemsIPL: An Integration Property Language for Multi-Model Cyber-Physical Systems
IPL: An Integration Property Language for Multi-Model Cyber-Physical SystemsIvan Ruchkin
 
Challenges in Physical Modeling for Adaptation of Cyber-Physical Systems
Challenges in Physical Modeling for Adaptation of Cyber-Physical SystemsChallenges in Physical Modeling for Adaptation of Cyber-Physical Systems
Challenges in Physical Modeling for Adaptation of Cyber-Physical SystemsIvan Ruchkin
 
Hardware Power Modeling for Turtlebot
Hardware Power Modeling for TurtlebotHardware Power Modeling for Turtlebot
Hardware Power Modeling for TurtlebotIvan Ruchkin
 
Integration Beyond Components and Models: Research Challenges and Directions
Integration Beyond Components and Models: Research Challenges and DirectionsIntegration Beyond Components and Models: Research Challenges and Directions
Integration Beyond Components and Models: Research Challenges and DirectionsIvan Ruchkin
 

More from Ivan Ruchkin (20)

Poster: Conservative Safety Monitors of Stochastic Dynamical Systems
Poster: Conservative Safety Monitors of Stochastic Dynamical SystemsPoster: Conservative Safety Monitors of Stochastic Dynamical Systems
Poster: Conservative Safety Monitors of Stochastic Dynamical Systems
 
Poster: How Safe Am I Given What I See? Calibrated Prediction of Safety Chanc...
Poster: How Safe Am I Given What I See? Calibrated Prediction of Safety Chanc...Poster: How Safe Am I Given What I See? Calibrated Prediction of Safety Chanc...
Poster: How Safe Am I Given What I See? Calibrated Prediction of Safety Chanc...
 
Verify-then-Monitor: Calibration Guarantees for Safety Confidence
Verify-then-Monitor: Calibration Guarantees for Safety ConfidenceVerify-then-Monitor: Calibration Guarantees for Safety Confidence
Verify-then-Monitor: Calibration Guarantees for Safety Confidence
 
Conservative Safety Monitors of Stochastic Dynamical Systems
Conservative Safety Monitors of Stochastic Dynamical SystemsConservative Safety Monitors of Stochastic Dynamical Systems
Conservative Safety Monitors of Stochastic Dynamical Systems
 
Confidence Composition for Monitors of Verification Assumptions
Confidence Composition for Monitors of Verification AssumptionsConfidence Composition for Monitors of Verification Assumptions
Confidence Composition for Monitors of Verification Assumptions
 
Overcoming Heterogeneity in Autonomous Cyber-Physical Systems
Overcoming Heterogeneity in Autonomous Cyber-Physical SystemsOvercoming Heterogeneity in Autonomous Cyber-Physical Systems
Overcoming Heterogeneity in Autonomous Cyber-Physical Systems
 
High-Confidence Data Programming for Evaluating Suppression of Physiological ...
High-Confidence Data Programming for Evaluating Suppression of Physiological ...High-Confidence Data Programming for Evaluating Suppression of Physiological ...
High-Confidence Data Programming for Evaluating Suppression of Physiological ...
 
Data Generation with PROSPECT: a Probability Specification Tool
Data Generation with PROSPECT: a Probability Specification ToolData Generation with PROSPECT: a Probability Specification Tool
Data Generation with PROSPECT: a Probability Specification Tool
 
Confidence Monitoring and Composition for Dynamic Assurance of Learning-Enabl...
Confidence Monitoring and Composition for Dynamic Assurance of Learning-Enabl...Confidence Monitoring and Composition for Dynamic Assurance of Learning-Enabl...
Confidence Monitoring and Composition for Dynamic Assurance of Learning-Enabl...
 
Confidence Composition (CoCo) for Dynamic Assurance of Learning-Enabled Auton...
Confidence Composition (CoCo) for Dynamic Assurance of Learning-Enabled Auton...Confidence Composition (CoCo) for Dynamic Assurance of Learning-Enabled Auton...
Confidence Composition (CoCo) for Dynamic Assurance of Learning-Enabled Auton...
 
Confidence Monitoring and Composition for Dynamic Assurance of Learning-Enabl...
Confidence Monitoring and Composition for Dynamic Assurance of Learning-Enabl...Confidence Monitoring and Composition for Dynamic Assurance of Learning-Enabl...
Confidence Monitoring and Composition for Dynamic Assurance of Learning-Enabl...
 
On the Role of Assumptions in Engineering Smart Systems
On the Role of Assumptions in Engineering Smart SystemsOn the Role of Assumptions in Engineering Smart Systems
On the Role of Assumptions in Engineering Smart Systems
 
Compositional Probabilistic Analysis of Temporal Properties over Stochastic D...
Compositional Probabilistic Analysis of Temporal Properties over Stochastic D...Compositional Probabilistic Analysis of Temporal Properties over Stochastic D...
Compositional Probabilistic Analysis of Temporal Properties over Stochastic D...
 
Overview of Epidemic Models for COVID-19
Overview of Epidemic Models for COVID-19Overview of Epidemic Models for COVID-19
Overview of Epidemic Models for COVID-19
 
Thesis Defense: Integration of Modeling Methods for Cyber-Physical Systems
Thesis Defense: Integration of Modeling Methods for Cyber-Physical SystemsThesis Defense: Integration of Modeling Methods for Cyber-Physical Systems
Thesis Defense: Integration of Modeling Methods for Cyber-Physical Systems
 
Towards a Formal Framework for Hybrid Planning in Self-Adaptation
Towards a Formal Framework for Hybrid Planning in Self-AdaptationTowards a Formal Framework for Hybrid Planning in Self-Adaptation
Towards a Formal Framework for Hybrid Planning in Self-Adaptation
 
IPL: An Integration Property Language for Multi-Model Cyber-Physical Systems
IPL: An Integration Property Language for Multi-Model Cyber-Physical SystemsIPL: An Integration Property Language for Multi-Model Cyber-Physical Systems
IPL: An Integration Property Language for Multi-Model Cyber-Physical Systems
 
Challenges in Physical Modeling for Adaptation of Cyber-Physical Systems
Challenges in Physical Modeling for Adaptation of Cyber-Physical SystemsChallenges in Physical Modeling for Adaptation of Cyber-Physical Systems
Challenges in Physical Modeling for Adaptation of Cyber-Physical Systems
 
Hardware Power Modeling for Turtlebot
Hardware Power Modeling for TurtlebotHardware Power Modeling for Turtlebot
Hardware Power Modeling for Turtlebot
 
Integration Beyond Components and Models: Research Challenges and Directions
Integration Beyond Components and Models: Research Challenges and DirectionsIntegration Beyond Components and Models: Research Challenges and Directions
Integration Beyond Components and Models: Research Challenges and Directions
 

Recently uploaded

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 

Recently uploaded (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 

Causal Repair of Learning-Enabled Cyber-physical Systems

  • 1. Causal Repair of Learning-enabled Cyber-physical Systems Pengyuan (Eric) Lu*, Ivan Ruchkin+ , Matthew Cleaveland*, Oleg Sokolsky* and Insup Lee* *PRECISE Center, University of Pennsylvania + Trustworthy Engineered Autonomy Lab, University of Florida The 2nd International Conference on Assured Autonomy June 6th , 2023
  • 2. Outline 1. Motivation 2. Background 3. Problem statement 4. Solution Part I: Constructing Halpern-Pearl Model 5. Solution Part II: Searching for Repair 6. Experiment results 2
  • 4. Motivation: What caused the failure? Source: Nando’s Giphy page [link] Source: Wall Street Journal [link] 4
  • 5. ● Failures can be formalized as violations of specifications at runtime ● E.g. signal temporal logics (STL) ● Repair: failure → success 5 Motivation: Repair the Controller
  • 6. Statistical/non-causal Repair Moosbrugger et al., 2017: ● Runtime observation ⇒ statistical analysis ⇒ diagnosis and repair suggestion But correlation ≠ causation! I got perfect scores because I wear this coat! 6 Observation: ● No coat, 90% exam score ● Coat, 100% exam score
  • 7. Causal Diagnosis and Repair Studying hard Going to office hours Perfect scores Ibrahim et al., 2019: 7
  • 8. The Problem of Learning-enabled CPS ● They do not follow a “standard” internal structure! Deep Q Network Source: Renu Khandelwal [link] 8
  • 9. Motivation: Diagnosis and Repair on I/Os ● We suspect the I/Os of a component, e.g. controller of this mountain car ● A cause is a factual assignment of output values to a subset of input values ○ “It is because x1 is mapped to y1 , x2 is mapped to y2 , …, the CPS failed.” ● A repair is a reassignment of output values to these input values ○ “Had we mapped x1 to y1 ’, x2 to y2 ’, …, the CPS would have succeeded.” Denote the factual behavior as a mapping ctrl in ctrl out (0, 0) 0.2 (0, 0.1) 0.21 … … 9
  • 10. Challenges / Contributions ● Constructing a causal model to encode the dependency of a suspected controller’s I/O behaviors to an STL outcome ○ Feasible for efficient search on the cause and repair ○ Repair on a cause must be a minimal repair ● Searching algorithm for a cause and corresponding repair on the model ○ What to do if our suspicion is wrong? 10
  • 12. Halpern-Pearl Causality Model (HP Model) Studying hard 1 Going to Office Hours 0 Perfect Scores 0 Alice is a student 1 Avg sleeping hours 7 Credits taken this semester 10 PS = SH ∧ GtOH SH = … GtOH = … ● Endogenous nodes : candidates to be blamed ● Exogenous nodes : a fixed context, not to be blamed ● Value space of all nodes ● Dependency equations 12
  • 13. Halpern-Pearl Causality Model (HP Model) ● An outcome is a proposition on endogenous nodes’ value assignments ○ E.g. perfect score := 1 ● A candidate cause (of an outcome) is a conjunction on endogenous node’s value assignments ○ E.g. (studying hard := 1) Λ (going to office hours := 0) ○ E.g. going to office hours := 0 ○ Can be written in vector form 13
  • 14. Halpern-Pearl Causality Model (HP Model) Studying hard 1 Going to Office Hours 1 Perfect Scores 1 Alice is a student 1 Avg sleeping hours 7 Credits taken this semester 10 PS = SH ∧ GtOH SH = … GtOH = … ● Repair: Reassignment of a subset of endogenous nodes to change the outcome ● Here, cause = (GtOH := 0), repair = (GtOH := 1) 14
  • 15. What makes (going to office hours := 0) a cause of (perfect scores := 0), but not (studying hard := 1) Λ (going to office hours := 0)? ● AC1: “Bad” outcome must be factual ✅ ● AC2: Exists “good” reassignment of the candidate causes to make the outcome “good” ✅ ● AC3: Candidate cause must be minimal ○ No proper subset of the candidate cause satisfies AC2! Three Criteria for a Cause (Informal) 15
  • 16. Three Criteria for a Cause (Formal) Based on a factual value assignment, what makes a cause of ? ● AC1: outcome must be true ● AC2: exists partition (candidate, circumstance, others) ○ AC2(a): exists counterfactual , , that flips outcome to ○ AC2(b): if we fix factual and only changes , no matter how we change the values of any subset of , outcome maintains at ● AC3: no subset of satisfies AC1 and AC2 16
  • 18. Problem Statement On an observed trace with violation of property , how can we use HP causality model to identify a subset of a suspected component’s I/O behaviors that caused the violation, and provide an alternative behavior as a minimal repair? ● Sub-problem 1: Encode the dependency structure of the behaviors to outcome of as an HP model ● Sub-problem 2: On the constructed HP model, design a search algorithm for a cause, that ○ Upon success, return a corresponding repair ○ Upon failure, quantify the confidence of the violation is not caused by Assume: (1) robust outcome and a simulator (2) Lipschitz-continuous 18
  • 19. Proposed Solution 19 1 u111 0 Outcome of φ Component C f SIMULATE o DECODE ENCODE 0 u112 1 u121 0 u122 1 u211 0 u212 0 u221 0 u222 Step 1: HP model construction 1 u111 1 Outcome of φ Component C f SIMULATE o DECODE ENCODE 1 u112 1 u121 0 u122 1 u211 0 u212 1 u221 0 u222 Step 2: Search for cause and repair on the HP model
  • 20. 4. Solution Part I: Constructing HP Model 20
  • 21. Infinite HP Model 21 ctrl in ctrl out (0, 0) 0.2 (0, 0.1) 0.21 … … x1 x2 y1 y2
  • 22. Issues of Infinite HP Model ● Infinitely many endogenous nodes! ○ Infinitely large search space for counterfactual value assignments ● Can we shrink down the search space? 22
  • 23. Discretization of the Behaviors 23
  • 24. Discretization of the Behaviors cell cell center of 24
  • 26. Issues of Discretized HP Model ● Recall AC3 of HP causality ○ Cause is found by the counterfactual node value assignment that flips the outcome and minimally disagrees with the factual one ○ Minimality: no proper subset of the disagreeing nodes can repair the outcome ● This needs to reflect a minimal repair 26
  • 27. Goal: Partial Order Preservation 27 Only value changes at one node, but we need set containment
  • 28. Goal: Partial Order Preservation ● Partial order on behaviors ○ For two , is closer to the factual than ? ● Partial order on endogenous node value assignments ○ For two , are the disagreeing nodes by and the factual a subset of the disagreeing nodes by and ? 28
  • 29. Encoding of Behaviors 1 0 2 10 11 12 5 6 7 dim 1 dim 2 In Out [0, 1] [6, 7] × [10, 11] [1, 2] [5, 6] × [10, 11] 29
  • 30. Encoding of Behaviors 1 0 2 10 11 12 5 6 7 dim 1 dim 2 In Out [0, 1] [6, 7] × [10, 11] [1, 2] [5, 6] × [10, 11] 30 In Out dim1 Out dim2 Proposition [0, 1] ≥ 5 ≥ 10 1 [0, 1] ≥ 5 ≥ 11 0 [0, 1] ≥ 6 ≥ 10 1 [0, 1] ≥ 6 ≥ 11 0 … … … … Encoded Proposition
  • 31. Propositional HP Model 1 u111 0 Outcome of φ Component C f SIMULATE o DECODE ENCODE 0 u112 1 u121 0 u122 1 u211 0 u212 0 u221 0 u222 31
  • 32. Propositional HP Model 1 u111 0 Outcome of φ Component C f SIMULATE o DECODE ENCODE 0 u112 1 u121 0 u122 1 u211 0 u212 0 u221 0 u222 32
  • 33. 5. Solution Part II: Searching for Cause and Repair 33
  • 34. Random Sampling for a “Good” Counterfactual ● On the propositional HP model, we uniformly random sample (allowed) node value assignments ● There is a chance that we are suspecting the wrong component ○ The component’s behaviors is not, or is not the only cause of the failure ● The more assignments we sampled without repairing the outcome, the more confident we are that our suspicion is wrong 34
  • 35. How Many Samples? ● is a portion threshold ● is a significance level ● denotes quantile of standard Normal distribution Wilson 1927: ● If we uniformly sample assignments in a row without flipping the outcome, then we are confident that the portion of “good” counterfactuals is ● E.g. 35
  • 36. Interpolation for a Cause ● After sampling, we only found a “good” counterfactual behavior ● To find the cause, we need a counterfactual that is minimally different from the factual and can repair the outcome ● There must exist such an assignment between and ⇔ 36
  • 37. Interpolation for a Cause factual “bad” sampled “good” 37
  • 38. Interpolation for a Cause factual “bad” sampled “good” 38 ✅ behavior in between
  • 39. Interpolation for a Cause factual “bad” sampled “good” 39 ✅ behavior in between
  • 40. Interpolation for a Cause factual “bad” sampled “good” 40 ❌ behavior in between
  • 41. Interpolation for a Cause factual “bad” sampled “good” 41 ✅ behavior in between
  • 42. Interpolation for a Cause factual “bad” sampled “good” 42 behavior in between ❌
  • 43. Interpolation for a Cause factual “bad” sampled “good” 43 final interpolated
  • 44. Interpolation for a Cause ● We step from towards , until it no longer can repair the outcome ● Theorem: the interpolated is a repair, and the difference in node assignments and is a cause based on the HP model 44
  • 46. OpenAI Gym Mountain Car + DNN Controllers ● Input space of controller: ● Output space of controller: 46 deep neural network
  • 47. Results ● Input space is discretized into 18 x 14 = 252 cells ● 153 out of the 252 cells are mapped to a different value ● Repair = “had these 153 cells been mapped to the new values, the mountain car would have succeeded from the initial state (-0.5, 0)” 47 Factual Controller Searched Controller Interpolated/repaired Controller
  • 48. Results 48 Factual Controller Repaired Controller 1 Repaired Controller 2 Repaired Controller 3 pos vel time time time time
  • 49. Conclusion ● We designed a causal diagnosis and repair algorithm for learning-enabled CPS ● The algorithm first constructs an Halpern-Pearl model, and then ○ Finds a cause and a corresponding repair on a component’s I/Os, or ○ Exit with a quantified confidence that the component’s I/Os are not to be blamed ● We experimented with OpenAI Gym Mountain Car and successfully repaired a DNN controller 49
  • 50. Future Work ● From I/O to controller parameters ○ How does the repaired I/O help modify the neural network weights? ● Repairing from different initial states ○ How to repair one initial state without breaking others? ● Ongoing work: gradient-based repair by barrier methods 50
  • 51. Acknowledgement ● We appreciate the support by ARO (W911NF-20-1-0080), AFRL and DARPA (FA8750-18-C-0090). ● Any opinions expressed are those of the authors and do not necessarily reflect the views of ARO, AFRL, DARPA, DoD or the United States Government. 51