Compositional Semantics CMSC 723 / LING 723 / INST 725 M ARINE C - - PowerPoint PPT Presentation

compositional
SMART_READER_LITE
LIVE PREVIEW

Compositional Semantics CMSC 723 / LING 723 / INST 725 M ARINE C - - PowerPoint PPT Presentation

Compositional Semantics CMSC 723 / LING 723 / INST 725 M ARINE C ARPUAT marine@cs.umd.edu Words, bag of words Sequences Trees Meaning Representing Meaning An important goal of NLP/AI: convert natural language into a


slide-1
SLIDE 1

Compositional Semantics

CMSC 723 / LING 723 / INST 725 MARINE CARPUAT

marine@cs.umd.edu

slide-2
SLIDE 2
  • Words, bag of words
  • Sequences
  • Trees
  • Meaning
slide-3
SLIDE 3

Representing Meaning

  • An important goal of NLP/AI: convert natural

language into a representation that supports semantic inferences

  • Why? Many applications require semantic

understanding

  • Question answering, translation, fact-checking, giving

instructions to a robot,…

  • Challenge: how to bridge gap between linguistic

input to non-linguistic knowledge of the world

slide-4
SLIDE 4

Representing Meaning

Challenges for mapping linguistic input to meaning

  • different words/structure, same meaning

– She needed to make a quick decision in that situation. – The scenario required her to make a split-second judgment. – I saw the man. – The man was seen by me.

slide-5
SLIDE 5

Representing Meaning

Challenges for mapping linguistic input to meaning

  • same words, different meaning
  • I walked by the bank
  • … to deposit my check.
  • … to take a look at the river.

– Everyone on the island speaks two languages. – Two languages are spoken by everyone on the island.

slide-6
SLIDE 6

Representing Meaning

  • create representations of linguistic inputs that

capture the meanings of those inputs.

  • In most cases, they’re simultaneously descriptions

– of the meanings of utterances – and of some potential state of affairs in some world.

slide-7
SLIDE 7

Desired Properties of Meaning Representations

  • Goal: express propositions, while abstracting

away from ambiguity/vagueness of natural language

  • Desired Properties

– Verifiability – No ambiguity – Expressiveness – Inference

slide-8
SLIDE 8

Natural Language Inferences Examples

  • All blips are foos.
  • Blop is a blip.
  • Blop is a foo.
  • Mozart was born in

Salzburg.

  • Mozart was born in

Vienna.

  • No, that can’t be.

These are different cities.

slide-9
SLIDE 9

We’ll cover different families of approaches

  • Logical Semantics
  • Shallow Representations and Lexical

Semantics

  • Textual Inference
slide-10
SLIDE 10

Constrasting 2 Strategies to Semantic Analysis

  • Logical semantics

– Complete analysis – Create a First Order Logic representation that accounts for all the entities, roles and relations present in a sentence

  • Information Extraction

– Superficial analysis – Pulls out only the entities, relations and roles that are of interest to the consuming application.

slide-11
SLIDE 11

Information Extraction: Entity Recognition

PERSON ORGANIZATION

American Airlines, a unit of AMR, immediately matched the move, spokesman Tim Wagner said.

slide-12
SLIDE 12

Information Extraction: Predicting Relations

PERSON ORGANIZATION Founder? Investor? Member? Employee? President?

American Airlines, a unit of AMR, immediately matched the move, spokesman Tim Wagner said.

slide-13
SLIDE 13

Information Extraction Relations

ARTIFACT GENERAL AFFILIATION ORG AFFILIATION PART- WHOLE PERSON- SOCIAL PHYSICAL Located Near Business Family Lasting Personal Citizen- Resident- Ethnicity- Religion Org-Location- Origin Founder Employment Membership Ownership Student-Alum Investor User-Owner-Inventor- Manufacturer Geographical Subsidiary Sports-Affiliation

17 relations from 2008 “Relation Extraction Task” from Automated Content Extraction (ACE)

slide-14
SLIDE 14

Information Extraction Relations

  • UMLS: Unified Medical Language System

134 entity types, 54 relations

Injury disrupts Physiological Function Bodily Location location-of Biologic Function Anatomical Structure part-of Organism Pharmacologic Substance causes Pathological Function Pharmacologic Substance treats Pathologic Function

slide-15
SLIDE 15

Building Blocks of Logical Representations of Meaning

Propositional Semantics

  • Proposition symbols: P

, Q, …

  • Boolean operators

– negation, conjunction, disjunction – Implication, equivalence

  • Inference rules

– Can be defined using Boolean connectives P => Q

slide-16
SLIDE 16

Building Blocks of Logical Representations of Meaning

Predicate Logic: extends our representation with

  • Constants = elements that name entities in the

model

  • Predicates = sets of objects or, equivalently,

functions from objects to truth values

  • Functions = sets of pairs of objects, or eq.

functions from one object to another

slide-17
SLIDE 17

Building Blocks of Logical Representations of Meaning

Predicate Logic: extends our representation further with

  • Variables = let us refer to objects which are not

locally specified

  • Quantifiers = used to bind variables

– Existential – Universal

slide-18
SLIDE 18

A CFG specification of the syntax of First Order Logic Representations

From SLP2 Section 17.3

slide-19
SLIDE 19

Representing a sentence in FOL

  • Franco likes Frasca.

How can we represent the “Liking” predicate- argument template?

slide-20
SLIDE 20

Predicate-Argument Structure in Natural Language

  • Events, actions and relationships can be captured

with representations that consist of predicates and arguments to those predicates.

  • Predicates

– Primarily Verbs, VPs, Sentences – Sometimes Nouns and NPs

  • Arguments

– Primarily Nouns, Nominals, NPs, PPs – But also everything else, depends on the context

slide-21
SLIDE 21

Example: representing predicate- argument structure…

  • Mary gave a list to John.
  • Giving(Mary, John, List)
  • More precisely

– Gave conveys a three-argument predicate – The first argument is the subject – The second is the recipient, which is conveyed by the NP inside the PP – The third argument is the thing given, conveyed by the direct object

slide-22
SLIDE 22

Example: representing predicate- argument structure

  • Predicate-argument structures as templates

– We can think of the verb/VP providing a template like the following – The semantics of the NPs and the PPs in the sentence plug into the slots provided in the template

) , ( )^ , ( )^ , ( )^ ( , , , z e Givee y e Given x e Giver e zGiving y x e 

slide-23
SLIDE 23

A CFG specification of the syntax of First Order Logic Representations

From SLP2 Section 17.3

slide-24
SLIDE 24

Representing a sentence in FOL

  • Franco likes Frasca.

“Liking” predicate-argument template

slide-25
SLIDE 25

One More Building Block of Logical Representations of Meaning

  • Lambda forms

– Take a FOL formula with variables in it that are to be bound. – Allow those variables to be bound by treating the lambda form as a function with formal arguments.

λx.P(x)

P(Franco) anco) λx.P(x)(Fr

slide-26
SLIDE 26

Lambda Reductions

slide-27
SLIDE 27

Logical Semantics Representations

  • f Natural Language
  • Building blocks

– Propositional Logic – Predicate Logic – Lambda Forms

  • Given a sentence, how can we construct its

logical representation?

– One approach: compositional semantics

slide-28
SLIDE 28

Compositional Analysis: use syntax to guide semantic analysis

slide-29
SLIDE 29

Principle of Compositionality

  • The meaning of a whole is derived from

the meanings of the parts

  • What parts?

– The constituents of the syntactic parse of the input

  • What could it mean for a part to have a

meaning?

slide-30
SLIDE 30

Compositional Analysis: use syntax to guide semantic analysis

slide-31
SLIDE 31

Augmented Rules

  • We’ll accomplish this by attaching semantic

formation rules to our syntactic CFG rules

  • Abstractly

– This should be read as: “the semantics we attach to A can be computed from some function applied to the semantics of A’s parts.”

)} .sem .sem,...α α ( { ...

n 1 1

f A

n

  

slide-32
SLIDE 32

Example

  • Easy parts…

– NP -> PropNoun – PropNoun -> Frasca – PropNoun -> Franco

  • Attachments

{PropNoun.sem} {Frasca} {Franco}

slide-33
SLIDE 33

Example

  • S -> NP VP
  • VP -> Verb NP
  • Verb -> likes
  • {VP

.sem(NP .sem)}

  • {Verb.sem(NP

.sem)

  • ???
slide-34
SLIDE 34

Which approach can we use to… discover information about specific entities?

slide-35
SLIDE 35

What approach can we use to… summarize text?

slide-36
SLIDE 36

Which approach can we use to… query databases?

slide-37
SLIDE 37

Which approach can we use to… instruct a robot?

slide-38
SLIDE 38

Recap… Intro to Semantics

–Meaning representations

  • motivated by semantic processing
  • for specific applications

–2 approaches to semantic processing

  • complete FOL representation
  • vs. shallow information extraction