Natural Language Access to Data via Deduction

22
Natural Language Access to Data via Deduction Richard Waldinger Artificial Intelligence Center SRI International Cognitive Science Institute Speaker Series 18 February 2016 1

Transcript of Natural Language Access to Data via Deduction

Page 1: Natural Language Access to Data via Deduction

Natural Language Access to Datavia

Deduction

Richard Waldinger

Artificial Intelligence Center

SRI International

Cognitive Science Institute

Speaker Series

18 February 2016

1

Page 2: Natural Language Access to Data via Deduction

natural language access to data

joint work

Cleo Condoravdi, Stanford University

Kyle Richardson, Stuttgart University

Asuman Suenbuel, SAP

Vishal Sikka, SAP (now Infosys)

2

Page 3: Natural Language Access to Data via Deduction

natural language access to data

the problem

accessing knowledge

from structured data sources.

via questions in natural language.

3

Page 4: Natural Language Access to Data via Deduction

natural language access to data

why is this hard?

natural language uncontrolled.

we want answers, not websites.

answers deduced or computed.

multiple databases.

sequence of ongoing queries.

4

Page 5: Natural Language Access to Data via Deduction

natural language access to data

what makes it easier?

we restrict ourselves to a well-understood subject domain.

business enterprise

we use already known databases.

access to SAP’s HANA database.

“Quest”

5

Page 6: Natural Language Access to Data via Deduction

waldinger natural language access to datawaldinger natural language access to data

sample query sequence

Show a company with a long-term debt within the last two years.

The debt is more than 5 million Euros.

It must be Swiss.

6

Page 7: Natural Language Access to Data via Deduction

waldinger natural language access to datawaldinger natural language access to data

why does this require reasoning?

query may be logically complex.

to resolve ambiguities in the query.

differences in vocabularies.

bridge the inferential leap.

compose the answer.

7

Page 8: Natural Language Access to Data via Deduction

waldinger natural language access to datawaldinger natural language access to data

approach (nl+deduction)

semantic parsing ⇒ semantic representation

transform ⇒ logical form

proof ⇒ answers

proof conducted in an axiomatic theory

theory contains links to databases.

8

Page 9: Natural Language Access to Data via Deduction

waldinger natural language access to datawaldinger natural language access to data

implementation of Quest

natural language processing by SAPL (Cascade Parser)

reasoning by SRI’s SNARK.

data from SAP’s HANA, Currency Conversion, Nationality Tables, etc.

9

Page 10: Natural Language Access to Data via Deduction

waldinger question answering/ deductionwaldinger question answering/ deduction

theorem prover (SNARK)

resolution (general reasoning).

paramodulation, rewriting (equality).

sorted unification.

answer extraction.

procedural attachment.

spatial and temporal reasoning.

10

Page 11: Natural Language Access to Data via Deduction

waldinger natural language access to datawaldinger natural language access to data

axiomatic subject domain theory

defines concepts in queries.

expresses capabilities of the databases.

provides background knowledge to relate them.

sort (type) structure

axioms

11

Page 12: Natural Language Access to Data via Deduction

waldinger question answering/ deductionwaldinger question answering/ deduction

sort structure

entity agent

company

time interval debt

numbermoney

size

12

Page 13: Natural Language Access to Data via Deduction

waldinger question answering/ deductionwaldinger question answering/ deduction

sorts of relations

company-has-debt(<company>, <debt>)

company-has-size(<company>, <size>)

within(<time interval>, <time interval>)

swiss(<agent>)

13

Page 14: Natural Language Access to Data via Deduction

waldinger natural language access to datawaldinger natural language access to data

parsing

based on PARC natural language technology (XLE + Bridge)

new parser (SAPL) written for Quest.

parser knows sort structure and sorts of relations.

14

Page 15: Natural Language Access to Data via Deduction

waldinger question answering/ deductionwaldinger question answering/ deduction

semantic parsing

query: Show a company with a high debt within the last two years.

semantic representation (partial):

(quant exists company7 sort company)

(quant exists debt3 sort debt)

(scopes-over company7 debt3)

(in nscope debt3

(company-has-debt company7 debt3))

15

Page 16: Natural Language Access to Data via Deduction

waldinger question answering/ deductionwaldinger question answering/ deduction

logical form

(exists ((company7 sort company)

(debt3 sort debt)

(time-interval5 sort time-interval))

(and (company-has-debt company7 debt3)

(within debt3 time-interval5)

(time-measure time-interval5 2 year)

(last time-interval5))

16

Page 17: Natural Language Access to Data via Deduction

waldinger question answering/ deductionwaldinger question answering/ deduction

procedural attachment

company-has-debt(?company, ?debt) ⇔

(exists (?location, ?size, ?dso, ….)

company-record(?company,

?debt,

?location,

?size,

?dso, ….) &

positive(?debt)

17

Page 18: Natural Language Access to Data via Deduction

waldinger nl access to datawaldinger nl access to data

sample data

name money location date

SL Foods Inc. $105263551.70 CH 2007 Sept. 1

18

name: SL Foods Inc.

amount of debt: $105,263,551.70.

date debt incurred: Sept 1, 2007.

nationality: CH (Switzerland)

...

Page 19: Natural Language Access to Data via Deduction

waldinger question answering/ deductionwaldinger question answering/ deduction

the answer(s)

the debt of sl food inc. is high,

the debt of sl food inc. is within the interval from 9/1/2006 to 9/1/2008,

the duration of the interval from 9/1/2006 to 9/1/2008 is 2 years,

the interval from 9/1/2006 to 9/1/2008 is last.

19

Page 20: Natural Language Access to Data via Deduction

waldinger question answering/ deductionwaldinger question answering/ deduction

reasoning resolves ambiguity.

Show me a client with a high debt.It was within the last 2 years.

(“It” must be the debt).

It should be Swiss.(“It” must be the client)

20

Page 21: Natural Language Access to Data via Deduction

waldinger question answering/ deductionwaldinger question answering/ deduction

future work

we currently translate english questions into logical form.

we could also translate declarative sentences into logical form.

develop axiomatic theory from text.

domain experts need not know logic.

21

Page 22: Natural Language Access to Data via Deduction

waldinger question answering/ deductionwaldinger question answering/ deduction

reference

Natural Language Access to Data:

It Takes Common Sense

AAAI Symposium

Logical Formalizations of Common Sense Reasoning

22