concurrent reasoning with inference graphs

37
Concurrent Reasoning with Inference Graphs Daniel R. Schlegel and Stuart C. Shapiro Department of Computer Science and Engineering University at Buffalo, The State University of New York Buffalo, New York, USA <drschleg,shapiro>@buffalo.edu D. R. Schlegel and S. C. Shapiro 1

Upload: triage

Post on 22-Feb-2016

67 views

Category:

Documents


0 download

DESCRIPTION

Concurrent Reasoning with Inference Graphs. Department of Computer Science and Engineering University at Buffalo, The State University of New York Buffalo, New York, USA < drschleg,shapiro >@buffalo.edu. Daniel R. Schlegel and Stuart C. Shapiro. Problem Statement. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 1

Concurrent Reasoning with Inference GraphsDaniel R. Schlegel and Stuart C. Shapiro

Department of Computer Science and EngineeringUniversity at Buffalo, The State University of New York

Buffalo, New York, USA<drschleg,shapiro>@buffalo.edu

Page 2: Concurrent Reasoning with Inference Graphs

D. R. Schlegel 2

Problem Statement

• Rise of multi-core computers• Lack of concurrent natural deduction systems

• Application to natural language understanding for terrorist plot detection.

A Motivation

Page 3: Concurrent Reasoning with Inference Graphs

D. R. Schlegel 3

What are Inference Graphs?• Graphs for natural deduction

– Four types of inference:• Forward• Backward• Bi-directional • Focused

– Retain derived formulas for later re-use.– Propagate disbelief.– Built upon Propositional Graphs.

• Take advantage of multi-core computers– Concurrency and scheduling– Near-linear speedup.

Page 4: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 4

Propositional Graphs• Directed acyclic graph• Every well-formed expression is a node– Individual constants– Functional terms– Atomic formulas– Non-atomic formulas (“rules”)

• Each node has an identifier, either– Symbol, or– wfti[!]

• No two nodes with same identifier.

Page 5: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 5

Propositional Graphs

If a, and b are true, then c is true.

a cand-ant cqwft1!

b and-ant

Page 6: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 6

Inference Graphs• Extend Propositional Graphs• Add channels for information flow (messages):

– i-channels report truth of an antecedent to a rule node.– u-channels report truth of a consequent from a rule node.

• Channels contain valves.– Hold messages back, or allow them through.

i-channel u-channel

a cand-ant cqwft1!

b and-ant

Page 7: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 7

Messages

• Five kinds– I-INFER – “I’ve been inferred”– U-INFER – “You’ve been inferred”– BACKWARD-INFER – “Open valves so I might be inferred”– CANCEL-INFER – “Stop trying to infer me (close valves)”– UNASSERT – “I’m no longer believed”

Page 8: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 8

Priorities

• Messages have priorities.– UNASSERT is top priority– CANCEL-INFER is next– I-INFER/U-INFER are higher priority closer to a result– BACKWARD-INFER is lowest

Page 9: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 9

Rule Node Inference

1. Message arrives at node.

a! c

Assume we have a KB with a ^ b -> c, and b. Then a is asserted with forward inference.

A message is sent from a to wft1

and-ant cq

a : truewft1!

i-infer

b! and-ant

Page 10: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 10

Rule Node Inference

2. Message is translated to Rule Use Information

1 Positive Antecedent, a0 Negative Antecedents2 Total Antecedents

a : true

Rule Use Information is stored in rule nodes to be combined later with others that arrive.

a! cand-ant cqwft1!

b! and-ant

Page 11: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 11

Rule Node Inference

3. Combine RUIs with any existing ones

1 Positive Antecedent, b0 Negative Antecedents2 Total Antecedents

Combine the RUI for a with the one which already exists in wft1 for b.

1 Positive Antecedent, a0 Negative Antecedents2 Total Antecedents

+2 Positive Antecedents, a,b0 Negative Antecedents2 Total Antecedents

=

a! cand-ant cqwft1!

b! and-ant

Page 12: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 12

Rule Node Inference

4. Determine if the rule can fire.

We have two positive antecedents, and we need two. The rule can fire.

2 Positive Antecedents, a,b0 Negative Antecedents2 Total Antecedents

a! cand-ant cqwft1!

b! and-ant

Page 13: Concurrent Reasoning with Inference Graphs

D. R. Schlegel 13

Rule Node Inference

5. Send out new messages.

c will receive the message, and assert itself.

c : trueu-infer

a! cand-ant cqwft1!

b! and-ant

Page 14: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 14

Cycles• Graphs may contain cycles.• No rule node will infer on the same message more than once.

– RUIs with no new information are ignored.• Already open valves can’t be opened again.

a bant

cq

wft2!

wft1!ant

cq

Page 15: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 15

Concurrency and Scheduling

• Inference Segment: the area between two valves.

• When messages reach a valve:– A task is created with the same priority as the message.

• Task: application of the segment’s function to the message.– Task is added to a prioritized queue.

• Tasks have minimal shared state, easing concurrency.

Page 16: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 16

Concurrency and Scheduling

• A task only operates within a single segment.1. tasks for relaying newly derived

information using segments “later” in the derivation are executed before “earlier” ones, and

2. once a node is known to be true or false, all tasks attempting to derive it are canceled, as long as their results are not needed elsewhere.

Page 17: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 17

Example

cq

Backchain on cq. Assume every node requires a single one of its incoming nodes to be true for it to be true (simplified for easy viewing). Two processors will be used.

Page 18: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 18

Example

Backward Inference(Open valve) Inferring Inferred Cancelled

cq

Page 19: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 19

Example

Backward Inference(Open valve) Inferring Inferred Cancelled

cq

Page 20: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 20

Example

Backward Inference(Open valve) Inferring Inferred Cancelled

cq

Page 21: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 21

Example

Backward Inference(Open valve) Inferring Inferred Cancelled

cq

Page 22: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 22

Example

Backward Inference(Open valve) Inferring Inferred Cancelled

cq

Page 23: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 23

Example

Backward Inference(Open valve) Inferring Inferred Cancelled

cq

Page 24: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 24

Example

Backward Inference(Open valve) Inferring Inferred Cancelled

cq

Page 25: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 25

Example

Backward Inference(Open valve) Inferring Inferred Cancelled

cq

Page 26: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 26

Example

Backward Inference(Open valve) Inferring Inferred Cancelled

cq

Page 27: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 27

Example

Backward Inference(Open valve) Inferring Inferred Cancelled

cq

Page 28: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 28

Example

Backward Inference(Open valve) Inferring Inferred Cancelled

cq

Page 29: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 29

Example

Backward Inference(Open valve) Inferring Inferred Cancelled

cq

Page 30: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 30

Example

Backward Inference(Open valve) Inferring Inferred Cancelled

cq

Page 31: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 31

Example

Backward Inference(Open valve) Inferring Inferred Cancelled

cq

Page 32: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 32

Example

Backward Inference(Open valve) Inferring Inferred Cancelled

cq

Page 33: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 33

Example

Backward Inference(Open valve) Inferring Inferred Cancelled

cq

Page 34: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 34

Example

Backward Inference(Open valve) Inferring Inferred Cancelled

cq

Page 35: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 35

Example

Backward Inference(Open valve) Inferring Inferred Cancelled

cq

Page 36: Concurrent Reasoning with Inference Graphs

D. R. Schlegel and S. C. Shapiro 36

Evaluation

• Concurrency:– Near linear performance improvement with the

number of processors– Performance robust to graph depth and branching

factor changes.• Scheduling Heuristics:– Backward-inference with or-entailment shows 10x

improvement over LIFO queues, and 20-40x over FIFO queues.

Page 37: Concurrent Reasoning with Inference Graphs

D. R. Schlegel 37

Acknowledgements

This work has been supported by a Multidisciplinary University Research Initiative (MURI) grant (Number W911NF-09- 1-0392) for Unified Research on Network-based Hard/Soft Information Fusion, issued by the US Army Research Office (ARO) under the program management of Dr. John Lavery.