Glue Semantics for Proof Theorists

23
Glue Semantics for Proof Theorists Valeria de Paiva Nuance Communications, CA, USA Abstract Proof Theory – April, 2013

description

Talk at the Abstract Proof Theory Workshop in Unilog 2013.

Transcript of Glue Semantics for Proof Theorists

Page 1: Glue Semantics for Proof Theorists

Glue Semantics for Proof Theorists

Valeria de Paiva

Nuance Communications, CA, USA

Abstract Proof Theory – April, 2013

Page 2: Glue Semantics for Proof Theorists

IntroductionGlue SemanticsGlue in Action

Introduction

I This talk is about the application of proof theoretic methodsto the semantics of natural languages like English.

I Proof Theory had its beginnings as the poor cousin of ModelTheory in Mathematical Logic.

I But it got a big boost from its use in Computer Science.I Proof theory has applications in the design and specification

of programming languages (type theories, compilers), in thefoundations of security and as well as being essential toArtificial Intelligence and Automated Deduction.

I Proof Theory also has extensive applications in ComputationalSemantics of natural language. Here we concentrate on oneapplication to the syntax-semantics interface: GlueSemantics

2 / 23

Page 3: Glue Semantics for Proof Theorists

IntroductionGlue SemanticsGlue in Action

Glue semantics?Glue semantics is a theory of the syntax-semantics interface ofnatural language that uses linear logic for meaning composition.Distinguish two separate logics in semantic interpretation

1. Meaning logic: target logical representation2. Glue logic: logical specification of how chunks of meaning are

assembled

In principle, Glue uses any of several alternative grammarformalisms and any of the mainstream semantics.In practice, Glue started for LFG, with a vanilla Montague-stylelogic for meanings.

Glue analyses have been proposed within HPSG, Context-freegrammar, Categorial grammar, and TAG.Meaning languages in glue analyses include DiscourseRepresentation Theory, First-order logic, and Natural SemanticMetalanguage(NSM). 3 / 23

Page 4: Glue Semantics for Proof Theorists

IntroductionGlue SemanticsGlue in Action

Linear Implication and (Multiplicative) Conjunction

To assemble meanings we use (intuitionistic) multiplicative LinearLogic.

Traditional implication: A,A→ B ` BA,A→ B ` A ∧ B Re-use A

Linear implication: A,A −◦ B ` BA,A −◦ B 6` A⊗ B Cannot re-use A

Traditional conjunction: A ∧ B ` A Discard B

Linear conjunction: A⊗ B 6` A Cannot discard B

4 / 23

Page 5: Glue Semantics for Proof Theorists

IntroductionGlue SemanticsGlue in Action

The Linguistic Appeals of Linear Logic

Resource usage: appealing idea for thinking about linguistic issues.

1. How a string of words provides a sequence of resources thatcan be consumed to construct a syntactic analysis of a sentence.Lambek Calculus++

2. How word meanings provide a collection of resources thatcan be used to construct the meaning of a sentence. (example)

3. How linguistic context can make certain resources available,such as possible pronoun antecedents, that can be used to fleshout the interpretations of he, she or it.Only dealing with 2 above.To begin with it looks like the proof semantics we’re used to.

5 / 23

Page 6: Glue Semantics for Proof Theorists

IntroductionGlue SemanticsGlue in Action

Example:

6 / 23

Page 7: Glue Semantics for Proof Theorists

IntroductionGlue SemanticsGlue in Action

Linguistic applications of linear logic

I Categorial and type-logical grammar (Moortgat,vanBenthem): including parsing categorial grammars (Morrill,Hepple) and compositional semantics of categorial grammars(Morrill, Carpenter)

I Resource-based reformulations of other grammatical theoriesMinimalism (Retore,Stabler)Lexical Functional Grammar (Saraswat,Muskens)Tree Adjoining Grammar (Abrusci)

I AI issues such as the frame problem (White) or planning(Dixon) with linguistic relevance

I ‘Glue semantics’ (a version of categorial semantics without anassociated categorial grammar?) (Dalrymple, Lamping &Gupta))

7 / 23

Page 8: Glue Semantics for Proof Theorists

IntroductionGlue SemanticsGlue in Action

Identity Criteria for Proofs

Two proofs of A,A→ B ` B:

A→ B A→ E

B

[A]1 A→ B→ E

B→, 1

A→ B A→ E

B

These are not really distinct proofs:

8 / 23

Page 9: Glue Semantics for Proof Theorists

IntroductionGlue SemanticsGlue in Action

Lambda-Equivalence of Proof Terms

Include proof terms in previous derivations:

f : A→ B a : A→ E

f (a) : B

[x : A]1 f : A→ B→ E

f (x) : B→ I, 1

λx .f (x) : A→ B a : A→ E

(λx .f (x))(a) : B

Note: f (a) = (λx .f (x))(a)λ-equivalence of proof terms: semantic identity of derivations.

9 / 23

Page 10: Glue Semantics for Proof Theorists

IntroductionGlue SemanticsGlue in Action

Curry-Howard Isomorphism (CHI)

CHI = Pairing of proof rules with operations on proof termsBut doesn’t work for all logics, or proof systems

Defines interesting identity criteria for proofsSyntactically distinct derivations corresponding to same proof

Intimate relation between logic and type-theory.Varied applications, e.g.

— Proofs as programs— Semantic construction for natural language

10 / 23

Page 11: Glue Semantics for Proof Theorists

IntroductionGlue SemanticsGlue in Action

Example: Using LFG Grammar

11 / 23

Page 12: Glue Semantics for Proof Theorists

IntroductionGlue SemanticsGlue in Action

Cutting and Pasting 1...

12 / 23

Page 13: Glue Semantics for Proof Theorists

IntroductionGlue SemanticsGlue in Action

Example: Input to Semantic Interpretation

LexiconWord Meaning GlueJohn john ↑ where ↑= g

Fred fred ↑ where ↑= h

saw λy .λx . see(x , y) ↑ .OBJ −◦ (↑ .SUBJ −◦ ↑)where ↑= f , f .OBJ = h, f .SUBJ = g

Constituents g , h, f : semantic resources, consuming & producingmeanings

13 / 23

Page 14: Glue Semantics for Proof Theorists

IntroductionGlue SemanticsGlue in Action

Lexical Premises: Their nature

saw

λy .λx . see(x , y) : h −◦ (g −◦ f )

Meaning Term Glue Formula(Propositional LL)

Atomic propositions (f , g , h):• Correspond to syntactic constituents found in parsing• Denote resources used in semantic interpretation(Match production & consumption of constituent meanings)

Meaning terms:• Expressions in some chosen meaning language• Language must support abstraction and application• . . . but otherwise relatively free choice

14 / 23

Page 15: Glue Semantics for Proof Theorists

IntroductionGlue SemanticsGlue in Action

The Form of Glue Derivations

Γ ` M : f

where• Γ is set of lexical premises (instantiated by parse)• f is (LL atom corresponding to) sentential constituent• M is meaning term produced by derivation(Semantic) Ambiguity

I Often (many) alternative derivations Γ ` Mi : feach producing a different meaning termMi for f

I Need to find all alternative derivations (efficiently!)

15 / 23

Page 16: Glue Semantics for Proof Theorists

IntroductionGlue SemanticsGlue in Action

Alternative Derivations: Modifier Scope

Consider phrase “alleged criminal from London”λx . criminal(x) : fλP. alleged(P) : f −◦ fλPλx . from(lon, x) ∧ P(x) : f −◦ f

There are two normal derivations, resulting in:1. λx . from(lon, x) ∧ alleged(criminal)(x) : f2. alleged(λx . from(lon, x) ∧ criminal(x)) : f

16 / 23

Page 17: Glue Semantics for Proof Theorists

IntroductionGlue SemanticsGlue in Action

Two normal derivations

17 / 23

Page 18: Glue Semantics for Proof Theorists

IntroductionGlue SemanticsGlue in Action

Skeleton-Modifier Derivations

I Modifier: any formula equivalent to φ −◦ φI Initial derivation separating modifiers from skeleton

g −◦ h −◦ fa −◦ (f −◦ f )b −◦ (h −◦ f ) −◦ (h −◦ f )g, h, a, b

h

g g −◦ h −◦ f

h −◦ f

f

skeleton

a a −◦ (f −◦ f )

f −◦ fmodifier

b b −◦ ((h −◦ f ) −◦ (h −◦ f ))

(h −◦ f ) −◦ (h −◦ f )modifier

I Final derivation inserts modifiers— All scope ambiguities due to modifier insertion

18 / 23

Page 19: Glue Semantics for Proof Theorists

IntroductionGlue SemanticsGlue in Action

Quantifier Scope: Everyone saw something

Premiseseveryone: (g −◦ f ) −◦ fsaw: h −◦ (g −◦ f )something: (h −◦ f ) −◦ f

Derivations:∃∀ ∀∃

h −◦ (g −◦ f ) [h]

g −◦ f (g −◦ f ) −◦ f

f

h −◦ f (h −◦ f ) −◦ f

f

h −◦ (g −◦ f ) [h]

g −◦ f [g ]

f

h −◦ f (h −◦ f ) −◦ f

f

g −◦ f (g −◦ f ) −◦ f

f

19 / 23

Page 20: Glue Semantics for Proof Theorists

IntroductionGlue SemanticsGlue in Action

With Meaning Terms

saw : h −◦ (g −◦ f ) [y : h]

saw(y) : g −◦ f [x : g ]

saw(y)(x) : f

λy .saw(y)(x) : h −◦ f everyone : (h −◦ f ) −◦ f

everyone(λy .saw(y)(x)) : f

λx .everyone(λy .saw(y)(x)) : g −◦ f something : (g −◦ f ) −◦ f

something(λx .everyone(λy .saw(y)(x))) : f

20 / 23

Page 21: Glue Semantics for Proof Theorists

IntroductionGlue SemanticsGlue in Action

Glue Sales Pitch

I Linguistically powerful & flexible approachInteresting analyses of scope, control (Asudeh), event-basedsemantics (Fry), intensional verbs (Dalrymple), contextdependence, coordination.But many other phenomena still to do

I Grammar & semantics engineeringApplicable to grammars besides LFG based onesSteep learning curve for writing lexical entriesBut turns out to allow plentiful re-use of “lingware”

I Can be implemented efficiently: Lev, also in NLTK opensource github

21 / 23

Page 22: Glue Semantics for Proof Theorists

IntroductionGlue SemanticsGlue in Action

Conclusions

I For linguists: lots of language engineering to do, on aprincipled basis.

I For proof theorists: for this application cuts-with-axioms arenot a negligible cut, they are the most important cuts ever.

I Counting how many there are and which derivations/proofsthey give rise to, is solving the ambiguity of language problem!but you need a good grammar module..

I also the application sits "in-between" the proof-search and theproof-normalization paradigms...

22 / 23

Page 23: Glue Semantics for Proof Theorists

IntroductionGlue SemanticsGlue in Action

References

I PhD thesis of Asudeh and Lev (Stanford) and Kokkonidis(Oxford)

I Crouch and van Genabith (Linear Logic for Linguists)I Online Bibliography

http://users.ox.ac.uk/ lina1301/GlueBibliography.htmI plus Google code

http://nltk.googlecode.com/svn/trunk/doc/contrib/sem/gluesem.pdfhttps://github.com/nltk/nltk/blob/master/examples/grammars/

23 / 23