1. Glue Semantics for Proof Theorists
Valeria de Paiva
Nuance Communications, CA, USA
Abstract Proof Theory – April, 2013
2. Introduction
Glue Semantics
Glue in Action
Introduction
This talk is about the application of proof theoretic methods
to the semantics of natural languages like English.
Proof Theory had its beginnings as the poor cousin of Model
Theory in Mathematical Logic.
But it got a big boost from its use in Computer Science.
Proof theory has applications in the design and specification
of programming languages (type theories, compilers), in the
foundations of security and as well as being essential to
Artificial Intelligence and Automated Deduction.
Proof Theory also has extensive applications in Computational
Semantics of natural language. Here we concentrate on one
application to the syntax-semantics interface: Glue
Semantics
2 / 23
3. Introduction
Glue Semantics
Glue in Action
Glue semantics?
Glue semantics is a theory of the syntax-semantics interface of
natural language that uses linear logic for meaning composition.
Distinguish two separate logics in semantic interpretation
1. Meaning logic: target logical representation
2. Glue logic: logical specification of how chunks of meaning are
assembled
In principle, Glue uses any of several alternative grammar
formalisms and any of the mainstream semantics.
In practice, Glue started for LFG, with a vanilla Montague-style
logic for meanings.
Glue analyses have been proposed within HPSG, Context-free
grammar, Categorial grammar, and TAG.
Meaning languages in glue analyses include Discourse
Representation Theory, First-order logic, and Natural Semantic
Metalanguage(NSM). 3 / 23
4. Introduction
Glue Semantics
Glue in Action
Linear Implication and (Multiplicative) Conjunction
To assemble meanings we use (intuitionistic) multiplicative Linear
Logic.
Traditional implication: A, A → B B
A, A → B A∧B Re-use A
Linear implication: A, A −◦ B B
A, A −◦ B A⊗B Cannot re-use A
Traditional conjunction: A ∧ B A Discard B
Linear conjunction: A⊗B A Cannot discard B
4 / 23
5. Introduction
Glue Semantics
Glue 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 that
can be consumed to construct a syntactic analysis of a sentence.
Lambek Calculus++
2. How word meanings provide a collection of resources that
can 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 flesh
out 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
7. Introduction
Glue Semantics
Glue in Action
Linguistic applications of linear logic
Categorial and type-logical grammar (Moortgat,
vanBenthem): including parsing categorial grammars (Morrill,
Hepple) and compositional semantics of categorial grammars
(Morrill, Carpenter)
Resource-based reformulations of other grammatical theories
Minimalism (Retore,Stabler)
Lexical Functional Grammar (Saraswat,Muskens)
Tree Adjoining Grammar (Abrusci)
AI issues such as the frame problem (White) or planning
(Dixon) with linguistic relevance
‘Glue semantics’ (a version of categorial semantics without an
associated categorial grammar?) (Dalrymple, Lamping &
Gupta))
7 / 23
8. Introduction
Glue Semantics
Glue in Action
Identity Criteria for Proofs
Two proofs of A, A → B B:
[A]1 A→B
→E
A→B A B
→E →, 1
B A→B A
→E
B
These are not really distinct proofs:
8 / 23
9. Introduction
Glue Semantics
Glue in Action
Lambda-Equivalence of Proof Terms
Include proof terms in previous derivations:
[x : A]1 f :A→B
→E
f :A→B a:A f (x ) : B
→E → I, 1
f (a) : B λx .f (x ) : A → B a:A
(λx .f (x ))(a) : B
Note: f (a) = (λx .f (x ))(a)
λ-equivalence of proof terms: semantic identity of derivations.
9 / 23
10. Introduction
Glue Semantics
Glue in Action
Curry-Howard Isomorphism (CHI)
CHI = Pairing of proof rules with operations on proof terms
But doesn’t work for all logics, or proof systems
Defines interesting identity criteria for proofs
Syntactically 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
11. Introduction
Glue Semantics
Glue in Action
Example: Using LFG Grammar
11 / 23
12. Introduction
Glue Semantics
Glue in Action
Cutting and Pasting 1...
12 / 23
13. Introduction
Glue Semantics
Glue in Action
Example: Input to Semantic Interpretation
Lexicon
Word Meaning Glue
John 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 & producing
meanings
13 / 23
14. Introduction
Glue Semantics
Glue 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
15. Introduction
Glue Semantics
Glue 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
Often (many) alternative derivations Γ Mi : f
each producing a different meaning term Mi for f
Need to find all alternative derivations (efficiently!)
15 / 23
16. Introduction
Glue Semantics
Glue 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 ) : f
2. alleged(λx . from(lon, x ) ∧ criminal(x )) : f
16 / 23
17. Introduction
Glue Semantics
Glue in Action
Two normal derivations
17 / 23
18. Introduction
Glue Semantics
Glue in Action
Skeleton-Modifier Derivations
Modifier: any formula equivalent to φ −◦ φ
Initial derivation separating modifiers from skeleton
g g −◦ h −◦ f
h h −◦ f skeleton
f
g −◦ h −◦ f
a −◦ (f −◦ f )
⇒ a a −◦ (f −◦ f )
b −◦ (h −◦ f ) −◦ (h −◦ f ) modifier
g, h, a, b f −◦ f
b b −◦ ((h −◦ f ) −◦ (h −◦ f ))
modifier
(h −◦ f ) −◦ (h −◦ f )
Final derivation inserts modifiers
— All scope ambiguities due to modifier insertion
18 / 23
19. Introduction
Glue Semantics
Glue in Action
Quantifier Scope: Everyone saw something
everyone: (g −◦ f ) −◦ f
Premises saw: h −◦ (g −◦ f )
something: (h −◦ f ) −◦ f
Derivations:
∃∀ ∀∃
h −◦ (g −◦ f ) [h]
h −◦ (g −◦ f ) [h] g −◦ f [g]
g −◦ f (g −◦ f ) −◦ f f
f h −◦ f (h −◦ f ) −◦ f
h −◦ f (h −◦ f ) −◦ f f
f g −◦ f (g −◦ f ) −◦ f
f
19 / 23
20. Introduction
Glue Semantics
Glue 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 −◦
something(λx .everyone(λy .saw (y )(x ))) : f
20 / 23
21. Introduction
Glue Semantics
Glue in Action
Glue Sales Pitch
Linguistically powerful & flexible approach
Interesting analyses of scope, control (Asudeh), event-based
semantics (Fry), intensional verbs (Dalrymple), context
dependence, coordination.
But many other phenomena still to do
Grammar & semantics engineering
Applicable to grammars besides LFG based ones
Steep learning curve for writing lexical entries
But turns out to allow plentiful re-use of “lingware”
Can be implemented efficiently: Lev, also in NLTK open
source github
21 / 23
22. Introduction
Glue Semantics
Glue in Action
Conclusions
For linguists: lots of language engineering to do, on a
principled basis.
For proof theorists: for this application cuts-with-axioms are
not a negligible cut, they are the most important cuts ever.
Counting how many there are and which derivations/proofs
they give rise to, is solving the ambiguity of language problem!
but you need a good grammar module..
also the application sits "in-between" the proof-search and the
proof-normalization paradigms...
22 / 23
23. Introduction
Glue Semantics
Glue in Action
References
PhD thesis of Asudeh and Lev (Stanford) and Kokkonidis
(Oxford)
Crouch and van Genabith (Linear Logic for Linguists)
Online Bibliography
http://users.ox.ac.uk/ lina1301/GlueBibliography.htm
plus Google code
http://nltk.googlecode.com/svn/trunk/doc/contrib/sem/gluesem.pd
https://github.com/nltk/nltk/blob/master/examples/grammars/
23 / 23