Asking the Right Questions: Active Action-Model Learning

34
AAAI 2021 Workshop on Explainable Agency in Artificial Intelligence Asking the Right Questions: Active Action-Model Learning Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava Arizona State University 08 February 2021

Transcript of Asking the Right Questions: Active Action-Model Learning

Page 1: Asking the Right Questions: Active Action-Model Learning

AAAI 2021 Workshop on Explainable Agency in Artificial Intelligence

Asking the Right Questions: Active Action-Model Learning

Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava

Arizona State University

08 February 2021

Page 2: Asking the Right Questions: Active Action-Model Learning

How Would End Users Assess Their AI Systems?

β€’ How would a lay user determine whether an AI agent will be safe/reliable for a certain task?

β€’ More challenging in settings where agent’s internal code is not available (black-box).

β€’ Can we get insights from how we assess humans in such situations?

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 2

Page 3: Asking the Right Questions: Active Action-Model Learning

Will it be able to safely rearrange my lab for the next round of experiments?

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava

3AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 3

Page 4: Asking the Right Questions: Active Action-Model Learning

Response

Query

Which Questions to ask? How to extrapolate?

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 4

Page 5: Asking the Right Questions: Active Action-Model Learning

Preferences on Interpretability

User-Interpretable model of robot’s

capabilities

Response

Agent-AssessmentModule

Query

Now I understandwhat it can do!

Doesn’t knowuser’s preferred modeling language

Arbitrary internal implementation

Reveals instruction set (names of possible actions)

simulation

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 5

Page 6: Asking the Right Questions: Active Action-Model Learning

Example of an Interaction

What do you thinkwill happen if your hands

were empty and you pickup beaker b1, then pickup

beaker b2?

I can execute onlythe first step. After this

both hands will be holding b1.

simulation

Agent-AssessmentModule

Preferences on Interpretability

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 6

Page 7: Asking the Right Questions: Active Action-Model Learning

Key Challenges β€’ Which queries to ask?

β€’ In which order to ask them?

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 7

Preferences on Interpretability

User-Interpretable model of robot’s

capabilities

Response

Agent-AssessmentModule

Query?

Page 8: Asking the Right Questions: Active Action-Model Learning

Our Approach: Autonomous, User-Specific Agent Assessment

β€’ Generate an interrogation policy.

β€’ Use agent’s answers to queries to estimate a user-interpretable relational model.

β€’ In this work: user-interpretable means STRIPS-like model.

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 8

Page 9: Asking the Right Questions: Active Action-Model Learning

Why STRIPS-like Modeling Language?

Advantages

β€’ Support counterfactuals, assessment of causality

β€’ Easy to convert into natural language text

(:action pickup

:parameters (?ob)

:precondition (and (handempty)

(onrack ?ob))

:effect (and (not (handempty))

(not (onrack ?ob))

(holding ?ob)))

Disadvantages

β€’ Too many possible models (9 β„™ Γ— 𝔸 )

β€’ β„™: variable-instantiated predicates

β€’ 𝔸: parameterized actions[Deterministic, Fully Observable]

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 9

Page 10: Asking the Right Questions: Active Action-Model Learning

What is a Query?

β€’ Every query can be viewed as a function from models to responses.

Plan Outcome Queries:

Query: 𝒔𝑰, 𝝅Initial State and Plan

Agent’s Response: βŸ¨β„“, π’”π‘­βŸ©Length of plan that can be executed successfully and the final state.

How do we generate these queries?How do we use them?

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 10

Page 11: Asking the Right Questions: Active Action-Model Learning

Example of Model Abstraction

Concrete model

Abstracted model

(:action pickup

:parameters (?ob)

:precondition (and (handempty)

(ontable ?ob))

:effect (and (not (handempty))

(not (ontable ?ob)))))

abstraction

(:action pickup

:parameters (?ob)

:precondition (and (handempty)

(+/-/βˆ…)(ontable ?ob))

:effect (and (not (handempty))

(not (ontable ?ob)))))

Abstract model

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 11

Page 12: Asking the Right Questions: Active Action-Model Learning

Algorithm for Hierarchical Query Synthesis(:action pickup

:parameters (?ob)

:precondition (and (+/-/βˆ…) (handempty)

(+/-/βˆ…) (ontable ?ob))

:effect (and (+/-/βˆ…) (handempty)

(+/-/βˆ…) (ontable ?ob)))

𝑛1𝑛2

𝑛3𝑛4

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 12

Page 13: Asking the Right Questions: Active Action-Model Learning

Algorithm for Hierarchical Query Synthesis(:action pickup

:parameters (?ob)

:precondition (and (+/-/βˆ…) (handempty)

(+/-/βˆ…) (ontable ?ob))

:effect (and (+/-/βˆ…) (handempty)

(+/-/βˆ…) (ontable ?ob)))

𝑛2 𝑛3𝑛1 𝑛4

𝑛1𝑛2

𝑛3𝑛4

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 13

Page 14: Asking the Right Questions: Active Action-Model Learning

Algorithm for Hierarchical Query Synthesis(:action pickup

:parameters (?ob)

:precondition (and (+/-/βˆ…) (handempty)

(+/-/βˆ…) (ontable ?ob))

:effect (and (+/-/βˆ…) (handempty)

(+/-/βˆ…) (ontable ?ob)))

𝑛2 𝑛3𝑛1 𝑛4

β„Žπ‘Žπ‘›π‘‘π‘’π‘šπ‘π‘‘π‘¦Β¬β„Žπ‘Žπ‘›π‘‘π‘’π‘šπ‘π‘‘π‘¦

Generate a distinguishing query:

𝑄 such that 𝑄 𝑀𝐴 β‰  𝑄 𝑀𝐡

Query-plan generated automatically by reduction to planning

𝑀𝐴 𝑀𝐢

(βˆ…)β„Žπ‘Žπ‘›π‘‘π‘’π‘šπ‘π‘‘π‘¦

𝑀𝐡

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 14

Page 15: Asking the Right Questions: Active Action-Model Learning

Algorithm for Hierarchical Query Synthesis(:action pickup

:parameters (?ob)

:precondition (and (+/-/βˆ…) (handempty)

(+/-/βˆ…) (ontable ?ob))

:effect (and (+/-/βˆ…) (handempty)

(+/-/βˆ…) (ontable ?ob)))

𝑛2 𝑛3𝑛1 𝑛4

β„Žπ‘Žπ‘›π‘‘π‘’π‘šπ‘π‘‘π‘¦Β¬β„Žπ‘Žπ‘›π‘‘π‘’π‘šπ‘π‘‘π‘¦

𝑄 Pose the query to the agent

𝑀𝐴 𝑀𝐢

(βˆ…)β„Žπ‘Žπ‘›π‘‘π‘’π‘šπ‘π‘‘π‘¦

𝑀𝐡

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 15

Page 16: Asking the Right Questions: Active Action-Model Learning

Algorithm for Hierarchical Query Synthesis(:action pickup

:parameters (?ob)

:precondition (and (+/-/βˆ…) (handempty)

(+/-/βˆ…) (ontable ?ob))

:effect (and (+/-/βˆ…) (handempty)

(+/-/βˆ…) (ontable ?ob)))

𝑛2 𝑛3𝑛1 𝑛4

πœƒ = 𝑄(𝐴𝑔𝑒𝑛𝑑) Check the consistency of refinements with the agent response

𝑄 𝑀𝐴 β‰  𝑄 𝑀𝐡

β„Žπ‘Žπ‘›π‘‘π‘’π‘šπ‘π‘‘π‘¦Β¬β„Žπ‘Žπ‘›π‘‘π‘’π‘šπ‘π‘‘π‘¦

𝑀𝐴 𝑀𝐢

(βˆ…)β„Žπ‘Žπ‘›π‘‘π‘’π‘šπ‘π‘‘π‘¦

𝑀𝐡

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 16

Page 17: Asking the Right Questions: Active Action-Model Learning

Algorithm for Hierarchical Query Synthesis(:action pickup

:parameters (?ob)

:precondition (and (+/-/βˆ…) (handempty)

(+/-/βˆ…) (ontable ?ob))

:effect (and (+/-/βˆ…) (handempty)

(+/-/βˆ…) (ontable ?ob)))

𝑛2 𝑛3𝑛1 𝑛4

β„Žπ‘Žπ‘›π‘‘π‘’π‘šπ‘π‘‘π‘¦Β¬β„Žπ‘Žπ‘›π‘‘π‘’π‘šπ‘π‘‘π‘¦

Rejectrefinement(s) that are

not consistent with the agent

𝑀𝐴 𝑀𝐢

(βˆ…)β„Žπ‘Žπ‘›π‘‘π‘’π‘šπ‘π‘‘π‘¦

𝑀𝐡

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 17

Page 18: Asking the Right Questions: Active Action-Model Learning

Algorithm for Hierarchical Query Synthesis(:action pickup

:parameters (?ob)

:precondition (and (+/-/βˆ…) (handempty)

(+/-/βˆ…) (ontable ?ob))

:effect (and (+/-/βˆ…) (handempty)

(+/-/βˆ…) (ontable ?ob)))

𝑛2 𝑛3𝑛1 𝑛4

β„Žπ‘Žπ‘›π‘‘π‘’π‘šπ‘π‘‘π‘¦Β¬β„Žπ‘Žπ‘›π‘‘π‘’π‘šπ‘π‘‘π‘¦

Generate a distinguishing query for these two refinements

𝑀𝐴 𝑀𝐢

(βˆ…)β„Žπ‘Žπ‘›π‘‘π‘’π‘šπ‘π‘‘π‘¦

𝑀𝐡

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 18

Page 19: Asking the Right Questions: Active Action-Model Learning

Algorithm for Hierarchical Query Synthesis(:action pickup

:parameters (?ob)

:precondition (and (+/-/βˆ…) (handempty)

(+/-/βˆ…) (ontable ?ob))

:effect (and (+/-/βˆ…) (handempty)

(+/-/βˆ…) (ontable ?ob)))

𝑛2 𝑛3𝑛1 𝑛4

β„Žπ‘Žπ‘›π‘‘π‘’π‘šπ‘π‘‘π‘¦Β¬β„Žπ‘Žπ‘›π‘‘π‘’π‘šπ‘π‘‘π‘¦

𝑀𝐴 𝑀𝐢

Reject the refinementthat is not consistent with the agent

At least one of the refinementswill be consistent with the agent.

(βˆ…)β„Žπ‘Žπ‘›π‘‘π‘’π‘šπ‘π‘‘π‘¦

𝑀𝐡

Lemma

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 19

Page 20: Asking the Right Questions: Active Action-Model Learning

Algorithm for Hierarchical Query Synthesis(:action pickup

:parameters (?ob)

:precondition (and (handempty)

(+/-/βˆ…) (ontable ?ob))

:effect (and (+/-/βˆ…) (handempty)

(+/-/βˆ…) (ontable ?ob)))

𝑛2 𝑛3𝑛1 𝑛4

β„Žπ‘Žπ‘›π‘‘π‘’π‘šπ‘π‘‘π‘¦Β¬β„Žπ‘Žπ‘›π‘‘π‘’π‘šπ‘π‘‘π‘¦

(βˆ…)β„Žπ‘Žπ‘›π‘‘π‘’π‘šπ‘π‘‘π‘¦

𝑀𝐡

𝑀𝐴 𝑀𝐢

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 20

Page 21: Asking the Right Questions: Active Action-Model Learning

Algorithm for Hierarchical Query Synthesis

𝑛2 𝑛3𝑛1 𝑛4

𝑛2 𝑛3 𝑛4

𝑛3 𝑛4

𝑛4

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 21

Page 22: Asking the Right Questions: Active Action-Model Learning

Algorithm for Hierarchical Query Synthesis

𝑛2 𝑛3𝑛1 𝑛4

𝑛2 𝑛3 𝑛4

𝑛3 𝑛4

𝑛4

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 22

Page 23: Asking the Right Questions: Active Action-Model Learning

Algorithm for Hierarchical Query Synthesis

𝑛2 𝑛3𝑛1 𝑛4

𝑛2 𝑛3 𝑛4

𝑛3 𝑛4

𝑛4

… … …

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 23

Page 24: Asking the Right Questions: Active Action-Model Learning

Algorithm for Hierarchical Query Synthesis

𝑛2 𝑛3𝑛1 𝑛4

𝑛2 𝑛3 𝑛4

𝑛3 𝑛4

𝑛4

… … …

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 24

Page 25: Asking the Right Questions: Active Action-Model Learning

Algorithm for Hierarchical Query Synthesis

𝑛2 𝑛3𝑛1 𝑛4

𝑛2 𝑛3 𝑛4

𝑛3 𝑛4

𝑛4

… … …

Whenever we prune an abstract model, we prune a large

number of concrete models.

Key feature of the algorithm

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 25

Page 26: Asking the Right Questions: Active Action-Model Learning

Related Approaches

Several approaches have been developed for inferring interpretable models:

β€’ Based on passively observed agent behavior.β€’ E.g., ARMS – Yang et al. (AIJ 2007), LOCM - Cresswell et al. (ICAPS 2009), LOUGA - Kučera and

BartΓ‘k (KMAIS 2018), FAMA - Aineto et al. (AIJ 2019)

β€’ These approaches are susceptible to unsafe model inference.

β€’ Based on explicit specification of the entire transition graph.β€’ E.g., Bonet and Geffner (ECAI 2020)

β€’ This work requires no symbolic information but is more suited for smaller problems.

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 26

Page 27: Asking the Right Questions: Active Action-Model Learning

Experimental Setup

β€’ 2 types of agents:

β€’ Symbolic sims: Agents that use symbolic, analytical models as simulators.

β€’ Black-box sims: Agents that use black-box models as simulators.

β€’ Used FAMA† as baseline.

†Aineto, D.; Celorrio, S. J.; and Onaindia, E. 2019. Learning Action Models With Minimal Observability. Artificial Intelligence 275: 104–137.

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 27

Page 28: Asking the Right Questions: Active Action-Model Learning

How we Evaluate Symbolic Sims?

β€’ Randomly generate an agent and environment from IPC benchmark suite.

β€’ Agent assessment module doesn’t get this information.

β€’ Agent reports results as logic-based states (lists of grounded predicates that are true).

β€’ Evaluate performance of agent assessment module and compare it with FAMA.

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 28

Page 29: Asking the Right Questions: Active Action-Model Learning

Results: Symbolic Sims

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 29

Our algorithm learnt the correct model with 48 queries

Our algorithm took very less time

Page 30: Asking the Right Questions: Active Action-Model Learning

Results: Symbolic Sims

Our algorithm learnt the correct model with 134 queries

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 30

Our algorithm took very less time

Page 31: Asking the Right Questions: Active Action-Model Learning

Results: Symbolic Sims

Domain |β„™| |𝔸| |𝑸| 𝒕𝝁 (ms) π’•πˆ (𝝁s)

Gripper 5 3 17 18.0 0.2

Blocksworld 9 4 48 8.4 36

Miconic 10 4 39 9.2 1.4

Parking 18 4 63 16.5 806

Logistics 18 6 68 24.4 1.73

Satellite 17 5 41 11.6 0.87

Termes 22 7 134 17.0 110.2

Rovers 82 9 370 5.1 60.3

Barman 83 17 357 18.5 1605

Freecell 100 10 535 2242 3340

Results with FD planner:β€’ |β„™|: Number of instantiated predicates in

the domainβ€’ |𝔸|: Number of actions in the domain

β€’ 𝑄 : Number of queries posed by the

assessment module

β€’ π‘‘πœ‡ : Average time per query

β€’ |π‘‘πœŽ|: Variance in average time per query

Average and variance are calculated for 10 runs of the algorithm, each on a separate problem.

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 31

Page 32: Asking the Right Questions: Active Action-Model Learning

How we Evaluate Black-Box Sims?

β€’ Agent uses PDDLGym† to simulate the query plan.

β€’ Reports results as images from the sim.

β€’ Uses image classifiers for each predicate.

β€’ Correctly inferred the model with:

β€’ 217 queries for Sokoban, and

β€’ 188 queries for Doors.

†Silver, T.; and Chitnis, R. 2020. PDDLGym: Gym Environments from PDDL Problems. In ICAPS 2020 PRL Workshop.

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 32

Sokoban

Doors

Page 33: Asking the Right Questions: Active Action-Model Learning

Conclusions

The proposed approach:

β€’ Efficiently learns internal model of an agent in a STRIPS-like form.

β€’ Needs no prior knowledge of the agent model.

β€’ Only requires an agent to have rudimentary query answering capabilities.

β€’ Learns the model accurately with a small number of queries.

β€’ Can be extended :

β€’ to handle noisy image classifiers; or

β€’ to replace communication interface with natural language.

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 33

Page 34: Asking the Right Questions: Active Action-Model Learning

Conclusions

The proposed approach:

β€’ Efficiently learns internal model of an agent in a STRIPS-like form.

β€’ Needs no prior knowledge of the agent model.

β€’ Only requires an agent to have rudimentary query answering capabilities.

β€’ Learns the model accurately with a small number of queries.

β€’ Can be extended :

β€’ to handle noisy image classifiers; or

β€’ to replace communication interface with natural language.

AAAI 2021 Workshop on Explainable Agency in AI | Asking the Right Questions: Active Action-Model Learning | Pulkit Verma, Shashank Rao Marpally, Siddharth Srivastava 34

[email protected]/3p4cVRu

AAAI Version†

bit.ly/3a0cmDI

Paper

†Verma, P.; Marpally S. R.; and Srivastava, S. Asking the Right Questions: Learning Interpretable Action Models through Query Answering. In AAAI 2021.

[email protected]