Title: Automated Reasoning
1Automated Reasoning
- Reasoning with Natural Language
- Lecture 4 25-04-05
- David Ahn
2Stepping backReasoning tasks for language
- Similarity-based reasoning about content
- Information Retrieval document-level
- Textual Entailment sentence-level
- Extracting pre-defined bits of content
- Information Extraction
- Now reasoning about time in language
- Next up logical reasoning with language
3Why time in natural language?
- Understanding temporal relations is a crucial
part of understanding language - Nothing is forever
- Properties, events, entities all have temporal
extent - Temporality is important for applications
- Consistent summarization
- Accurate question-answering
- Temporal reasoning is a well-studied domain
- Temporal logics and algebras in philosophy, AI,
CS - Logics of events and actions in AI, CS
4Examples fromquestion answering
- Temporal expressions must be resolved
- What can you tell me about the 1940s?
- Who was the president of the U.S. in 1958?
- Temporal relations must be identified
- How old was Jackie Robinson when he died?
- What did John Paul II do before he was pope?
- Implicit dependence on time must be understood
- What is the weather in Ellicotville, NY?
- Who won the first Super Bowl?
- And, of course, some questions ask explicitly for
times - When did the Challenger explosion happen?
- What date is the AFC Championship Game on?
5Outline
- Representation of time, temporal entities, and
temporal relations in natural language - Annotation and extraction of temporal information
in text - Reasoning with temporal information derived from
text
6Time in natural language
- Morphological and syntactic devices for referring
to time and temporal entities - Temporal expressions, tense, aspect
- Vary widely across languages
- Grammar underspecifies temporal relations
- Discourse structure and world knowledge needed to
fully reconstruct temporal information - Identifying all temporal relations in a discourse
is an AI-complete problem
7Temporal expressions (timexes)
- Phrases headed by temporal nominals or
adverbials - Proper names Monday, April, 2005
- Time units day, month, decade, season
- Adverbial now, today, yeseterday
- Reference to points atomic calendar entities
(for a given granularity) - Fully-specified
- June 11, 1989 day Summer, 2002 season 1980s
decade - Underspecified
- Monday day next month month two hours ago
hour - Reference to durations
- Three months two years
- Or, reference to sets of times or vague times
- every week nowadays
8Events (or eventualities)
- What is an event? A question of perspective
- An action or a process leading to a state change
- What counts as static (a state) or dynamic (the
change) depends on intentions and perception and
is reflected in language - c.f., John is sleeping vs. John is asleep
- NB event is used ambiguously eventuality is
a general term to cover proper events and states - Eventuality-referring expressions
- Verbs has left, was captured, will resign
- Adjectives sunken, stalled, on board
- Event nominals merger, military operation, Gulf
War
9Tense Locating events in time
- A grammatical device for placing events in time
- John went past John is going present John
will go future - Priorean tense logic
- Times are linearly ordered points
- Tenses are modal operators
- P and F ? (for past and future)
- H and G ? (always has been, always going to
be) - Quantificational view of tense misses crucial
anaphoricity in natural language - I forgot to turn off the stove does not mean
merely that there is some point in the past
10Tense as anaphora Reichenbach (1947)
- Tensed utterances introduce references to 3 time
points - Speech Time S
- Event Time E
- Reference Time R
- Different tenses indicate different orderings of
these points - SI had mailed the letterE when John came and
told me the newsR - Past perfect E lt R lt S
- The concept of time point is an abstraction -
it can map to an interval - Three temporal relations are defined on these
time points - at, before, after
- 13 different relations are possible
11Tense as anaphoraReichenbach (1947)
- Tense is determined by relation between R and S
- RS, RltS, RgtS
- Aspect is determined by relation between E and R
- ER, E lt R, Egt R
- Relation of E relative to S not crucial
- Represent RltSE as EgtRltS
- Only 7 out of 13 relations are realized in
English - 6 different forms, simple future being ambiguous
- Progressive no different from simple tenses
- But I was eating a peach ?gt I ate a peach
12Tense as operator Prior (1967)
- Free iteration captures many more tenses,
- I would have slept PFP?
- But also expresses many non-NL tenses
- PPPP? It was the case4 John had slept
13Aspect
- More complicated than relation b/t Reference time
and Event time - Provides information about
- Perspective on an event grammatical aspect
- Structure of event lexical aspect, or Aktionsart
14Grammatical aspect
- Perfective focus on situation as a whole
- John built a house
- Imperfective focus on internal phases of
situation - John was building a house
- English perfect focus on consequent state of
action - John has built a house
15Aktionsarten Verb classes(Vendler, 1967)
- Can be defined in terms of 3 primitive notions
- Telicity ends in a transition to a result
staterequires a goal - Dynamicity involves motion
- Durativity has temporal extent (or can be
decomposed)
16Characteristics of verb classes
- STATIVES know, sit, be clever, be happy,
killing, accident - progressive bad John is knowing Bill
- imperative bad Know the answer
- do-anaphora bad What John did was know the
answer - ACTIVITIES walk, talk, march, paint
- if it occurs in period t, a part of it must occur
in every/most sub-periods of t - x is Ving entails that x has Ved
- for-phrase mod. ok John ran for an hour
- in-phrase mod. bad John ran in an hour
- ACCOMPLISHMENTS build, cook, destroy
- x Vs for an hour does not entail x Vs for all
times in that hour - x is Ving does not entail x has Ved
- in-phrase mod. ok John booked a flight in an
hour - aspectual mod. ok John stopped building a house
- ACHIEVEMENTS notice, win, blink, find, reach
- instantaneous accomplishments
- for-phrase mod. bad John dies for an hour
- aspectual mod. bad John stopped reaching New
York
- Aktionsart depends on arguments, as well verb,
c.f. - John ate a cookie accomplishment vs.
- John ate cookies activity
17Event structureMoens and Steedman (1988)
- Events are associated with a basic structure
- Different aspectual classes highlight parts of
this structure - Activity highlights prepatory phase
- Achievement highlights point of change
- Accomplishment highlights entire structure
- Aspectual coercion possible
- By grammatical means progressive, perfect
- Aspectual verbs start, continue, stop, finish,
etc. - Adverbial modification
18Event structureMoens and Steedman (1988)
- Aspect can be easily coerced
- It took me two years to play the Minute Waltz
in less than sixty seconds for one hour without
stopping. - This chart represents coercions as transitions
b/t aspectual types.
19Event ordering
- Events arent always described in the order in
which they occur - In news, presentation dictated by perceived news
value - Latest news usually presented first
- News also expresses multiple viewpoints, with
commentaries, etc. - Temporal ordering involves a variety of knowledge
sources - Tense and aspect
- Max entered the room. Mary sat down/was seated at
the desk. - Temporal adverbials
- Simpson made the call at 3. Later/earlier, he was
spotted driving towards Westwood. - Rhetorical relations and World Knowledge
- Narration Max stood up. John greeted him.
- Cause/Explanation Max fell. John pushed him.
- Background Boutros-Ghali Sunday opened a meeting
in Nairobi He arrived in Nairobi from South
Africa.
20Ordering and reference time
- Reference time provides temporal anchoring for
events - SI hadR mailedE the letter (when John came and
told me the news). - Past Perfect E lt R lt S Past E R lt S
- Movement of reference time depends on tense,
aspect, rhetorical relations, world knowledge,
etc. - S1John pickedR1,E1 up the phone (at 3 pm)
- S2He hadR2 toldE2 Mary he would call her
- Assuming R2 E1 (stative), E2 lt E1
- (Hwang Schubert 92)
21Possibilities for two-clause interpretation
- Past2Past
- Max stood up. John greeted him AFTER relation
- Max fell. John pushed him BEFORE relation
- Max entered the room. Mary was seated behind the
desk SIMULTANEOUS or INCLUDE relation - Past2PastPerfect
- Max entered the room. He had drunk a lot of wine
BEFORE relation - PastPerfect2Past
- Max had been in Boston. He arrived late AFTER
relation
22The range of factors in determining temporal
ordering
- Tense
- Aspect
- Textual order
- Modification by timexes
- Discourse structure
- Meaning knowledge about the world
23Outline
- Representation of time, temporal entities, and
temporal relations in natural language - Annotation and extraction of temporal information
in text - Reasoning with temporal information derived from
text
24Extracting temporal information
- What resources do we need to extract temporal
information from text? - Specifications for the desired information
- Annotated corpora, for training and evaluation
- What resources are available?
- Specifications
- TIMEX2 defined by TIDES guidelines, part of ACE
- TimeML defined by TimeML specifications and
guidelines - Corpora TERN TIMEX2, TimeBank TimeML
25TIMEX2 annotation scheme
- Fully qualified time points
- ltTIMEX2 VAL"2005-04-27gt27 April, 2005lt/TIMEX2gt
- Underspecified time points
- ltTIMEX2 VAL2005-04-26gttomorrowlt/TIMEX2gt
- ltTIMEX2 VAL"2000-W42"gtthe third week of
Octoberlt/TIMEX2gt - Durations
- ltTIMEX2 VALPT30Mgthalf an hour longlt/TIMEX2gt
- Sets
- ltTIMEX2 VALXXXX-WXX-2" SET"YES
PERIODICITY"F1W GRANULARITYG1Dgtevery
Tuesdaylt/TIMEX2gt - Fuzziness
- ltTIMEX2 VAL1990-SUgtSummer of 1990 lt/TIMEX2gt
- Non-specificity
- ltTIMEX2 VAL"XXXX-04" NON_SPECIFICYESgtAprillt/T
IMEX2gt is usually wet.
26TIMEX2 attributes
27TERN training corpus
- 767 documents/265.809 words
- Broadcast news 454 documents/99.858 words
- Newswire 296 documents/151.269
- Newspaper 17 documents/14.682 words
Calendar Point Calendar-based point expressions,
no Xs or tokens Week Point Week-based point
expressions, no Xs or tokens Duration Duration
expressions, with no Xs or tokens Token
Token-only VALs Non-specific Any expression with
one or more Xs Prefixed Any expression with a
two-character prefix (FY, BC, etc.) No VAL Tags
with no VAL attribute Other None of the above
includes partial use of tokens, e.g.,
2000-10-20TNI, and time-only expressions
28TERN corpus annotation
- Training annotators (3 in total)
- Step 1 Review guidelines and 11 sample annotated
documents - Step 2 Practice annotation
- Two practice sets, 11 files each from ACE 2002
- Tag, compare, discuss, tag some more, until at
least 90 agreement on VAL and TIMEX2 - Annotation procedure
- Double annotation w/minimal contact
- No automatic pretagging
- Compare after tagging w/automatic tagger
- Annotate comparison report
- Reconcile after discussion
- Annotator F-measures wrt reconciled gold
standard - Tag gt 0.9 Extent gt 0.85 VAL gt 0.85
29Extraction of TIMEX2s
- Two basic sub-tasks
- Recognition identifying timexes and marking
correct textual extent - Normalization interpreting timexes and correctly
representing VAL (and other attributes) - Rule-based or machine-learned extraction
- Machine learning performs very well for
recognition - Unclear how to cast normalization as ML problem
- Our solution staged normalization architecture
30Temporal IE decomposed
- Six stages
- Recognition
- Token-level normalization
- Context-independent timex normalization
- Context-dependent classification
- Temporal focus tracking
- Final computation
- Suitable for a data-driven approach
- Recognition (1), classification (3) focus
tracking (5)?
31Classification sub-tasks
- Based on most common errors of our purely
rule-based normalizer - Distinguishing specific/generic today (see also
Mani and Wilson, 2000) - Classifying unit phrases as points or durations
(or sets or other) - Determining directionality for ambiguous
anaphoric timexes
32Temporal focus tracking
- Underspecified timexes can be
- Deictic always anchored to document creation
time - Anaphoric anchored to the temporal focus, a
salient temporal entity determined by discourse
factors - Tried two simple models to track temporal focus
- Time-stamp Always use document time-stamp
- Recency Always use most recent timex
- Same granularity or finer for unit phrases
- One level granularity up or finer for named
timexes - Focus tracking is like anaphora resolution
- Focus need not even be TIMEX2 VAL
- Note the TIMEX3 anchoring task of your
assignment is another way of tackling this
problem
33Fixed stages
- Recognition use CRF recognizer
- Token-level normalization
- Uses GATE (OSS NLP platform) for lookup
- Map month and day names to numbers, unit nouns to
units, etc. - Phrase-level normalization in GATE, w/regexps
- Compose what can be composed w/o context
- Generate instances for classification
- Final normalization in perl
- Combine meta-data for final VALs using
epoch-based temporal arithmetic
34Data flow
35Classifying unit phrases
- Unit phrases often ambiguous b/t point and
duration readings - Mr. Livingston joined the Navy, serving for two
years... - Ms. Alsogaray's proposal would require that
substantial progress on rules for the
operational mechanisms be demonstrated a year
from now, with a firm decision in two years. - Some clear indicators
- Post-modifiers ago, later, earlier ? point
- Hyphen between and unit ? duration
- Less clear indicators
- Object of for, definite description ? duration
- Object of in, before/after post-mod ? point
36Classifying unit phrases
- He had no public appearances scheduled for
ltTIMEX2 val"2000-12-11"gtthe daylt/TIMEX2gt... - ...when Reading High School lost the finals for
the first time in ltTIMEX2 val"P27Y"
anchor_dir"ENDING" anchor_val"1997"gt27
yearslt/TIMEX2gt to nearby Woburn. - Internal Affairs specialists have identified at
least 2,600 separate crime groups across the
country over ltTIMEX2 val"P1Y" anchor_dir"STARTIN
G" anchor_val"1992"gtthe past yearlt/TIMEX2gt. - According to a new UN study, in ltTIMEX2
val"2000"gtthe past yearlt/TIMEX2gt over five
million people have been infected with HIV... - The officials said the men were believed to have
entered YemenltTIMEX2 val"2000-10-08"gtfour days
before ltTIMEX2 val"2000-10-12"gtThursdaylt/TIMEX2gt
's bombinglt/TIMEX2gt. - With ltTIMEX2 val"P19D" anchor_dir"STARTING"
anchor_val"2000-10-19"gt19 days before the
electionlt/TIMEX2gt, ltTIMEX2gtthe time for making
newslt/TIMEX2gt is over.
37Classifying direction
- Value of anaphoric timexes computed wrt the
temporal focus - DCT 2000-10-25 just before the World Series
ltTIMEX2 val"1998"gttwo years agolt/TIMEX2gt. He
underwent surgery and chemotherapy, and rejoined
the team ltTIMEX2 val"1999-SP"gtthe following
springlt/TIMEX2gt. - Many anaphoric timexes specify only offset, not
direction, wrt temp. focus - DCT 1998-10-03, Saturday a group of players
might try to visit Strawberry at the hospital on
ltTIMEX2 val"1998-10-04"gtSundaylt/TIMEX2gt
38Classifying direction
- Standard approach use verb tense to decide
direction - Assumes that DCT is temporal focus
- Works in short news texts because DCT usually is
temporal focus - But, not always
- Milton Roy disclosed in ltTIMEX3 tidt101
value"1989-05" anchorTimeID"t85"gtMaylt/TIMEX3gt
that it was approached for a possible acquisition
by Thermo Electron, which agreed to purchase
Milton Roy's liquid-chromatography line for 22
million in ltTIMEX3 tid"t104" value"1990-02"
anchorTimeID"t101" gtFebruarylt/TIMEX3gt.
39Our classifiers
- Maximum Entropy classifiers (minorThird
implementation) - Lexical features w/3-word context window
- Also closest finite verb tense for direction
- Note same classifier implementation as for your
assignment more discussion in lab 2005-04-28 - Also, rule-based classifiers for comparison
- Context patterns for point-duration
- Tense of first verb group in sentence for dir
- Frequency baseline for specific-generic
40Generating training data
- For specific/generic and point/duration tasks
- Straightforward, based on indicated VAL
- For direction task
- Direction must be computed from instance VAL and
anchor (i.e., focus) VAL - Requires an implicit focus model (anchors not
tagged in TIMEX2) - Thus, created two training sets for direction
41Effect of focus model on generating direction data
- (Fake for illustrative purposes) DCT ltTIMEX3
tid"t85" value"1990-03-30"gt03/30/1990lt/TIMEX3gt - Milton Roy disclosed in ltTIMEX3 tidt101
value"1989-05" anchorTimeID"t85"gtMaylt/TIMEX3gt
that it was approached for a possible acquisition
by Thermo Electron, which agreed to purchase
Milton Roy's liquid-chromatography line for 22
million in ltTIMEX3 tid"t104" value"1990-02"
anchorTimeID"t101" gtFebruarylt/TIMEX3gt. - Time-stamp model t104 is backward-looking wrt
its (assumed but incorrect) anchor t85 - Recency model t104 is forward-looking wrt its
(assumed and correct) anchor t101
42Classification results
- Specific-generic task hard data heavily skewed
toward specific - Time-stamp-model-generated direction data easier
to learn from - Not surprising c.f., 660 of 701 anchored dates
in similar corpus TimeBank anchored to
time-stamp (incl. deictics)
43Normalization results
- 12 combinations of classifiers and focus models
- Including 2 runs w/perfect classification
- 6 reported here
44Discussion
- Fall-off in adding MaxEnt point-duration
classifier - Point- and set-referring unit phrases mishandled
by downstream parts of system - Time-stamps outperform recency
- Recency more sensitive to normalization errors
- Other errors (seen in perfect runs)
- Most stem from initial 3 stages
- 10 from focus model (in either case)
- Very few from epoch-based computation
45TimeML basics
- Three kinds of entity elements (each introduces
an ID) - TIMEX3 extension and simplification of TIMEX2
- EVENT mark head word of event-referring
expression ID refers to event type - MAKEINSTANCE creates ID for an instance of a
type - Three kinds of link elements
- TLINKs temporal relations b/t event instances
and TIMEX3s - SLINKs b/t two event instances, one of which
subordinates the other (modally, evidentially,
etc.) - ALINKs b/t two event instances, one of which
refers to an aspectual component of another - Auxiliary markup
- SIGNALs words that indicate temporal relations
(when, etc.)
46Differences b/tTIMEX2 and TIMEX3
- TIMEX3 marks up narrower extents
- For event-anchored durations, only duration part
is marked - ltTIMEX3gtthree years lt/TIMEX3gt vs. ltTIMEX2gtthree
years after the warlt/TIMEX2gt - Important TIMEX3 additional attributes
- type DATE, TIME, DURATION, SET
- begin/endPoint for durations
- functionInDocument indicates DCT, etc.
- temporalFunction whether an anchor is required
for normalization - anchorID for all temporal functions
47TimeML TLINKs
- Twelve temporal relations (plus identity)
48TLINK example
- Also today, King Hussein of Jordan arrived in
Washington. - Also,
- ltTIMEX3 tid"t1" typeDATE" value1990-08-15"gt
- today
- lt/TIMEX3gt
- King Hussein of Jordan
- ltEVENT eid"e1" class"OCCURRENCE"gtarrivedlt/EVENTgt
- in Washington.
- ltMAKEINSTANCE eiid"ei1" eventID"e1"
tensePAST aspectNONE negationfalse/gt - ltTLINK timeIDt1 relatedToEventei1
relTypeIS_INCLUDED/gt
49TimeBank Sources
- 300 texts in the TIMEBANK corpus chosen to cover
a variety of media sources from the news domain - DUC (TIPSTER) texts from the Document
Understanding Conference corpus cover areas like
biography, single and multiple events (for
example dealing with news about earthquakes and
Iraq). This covers 12 of the corpus - Texts from the Automatic Content Extraction (ACE)
program come from transcribed broadcast news
(ABC, CNN, PRI, VOA) and newswire (AP, NYT).
These comprise 17 and 16 of the corpus,
respectively. - Propbank (Treebank2) texts are Wall Street
Journal newswire texts, making up 55 of the
corpus. - Only 186 texts actually released
50TimeBank Annotation
- Annotation of each document involves
- Automatic pre-processing step in which some of
the events and temporal, modal and negative
signals are tagged - Human annotation step which
- checks the output of the pre-processing step
- introduces other signals and events, time
expressions, and the appropriate links among them - Average time to annotate a document of 500 words
by a trained annotator is 1 hour. - Annotators came from a variety of backgrounds.
- 70 of the corpus annotated by TimeML developers
- 30 annotated by students from Brandeis University
51TimeBank Some statistics
52Temporal relations in TimeBank
- Two sources of temporal relations
- anchorID for temporal functions and their anchors
- TLINKs for all pairs of temporal entities
- TimeML annotation guidelines
- Require anchorID for temporal functions
- Do not specify how much TLINK annotation to do
- In principle, every pair of entities may be
related for N entities in a document, N2 links
to consider - In practice, annotators annotate only some of the
possible relations, e.g. those explicitly
signalled or highly salient - Setzer (2001) reports 200 manually annotated
TLINKs in small pilot study (6 texts, 312
words/text, 31 TE/text)
53Temporal relations Machine-learning
opportunities?
- Machine-learning algorithms rely on extractable
features for learning - Features usually local, shallow, and linguistic
- Lexical items in context, maybe POS tags or
dependency relations - Not obvious how to add inferential components
- Intuition manually annotated TLINKs and anchors
depend on the kinds of features that can be
extracted for machine-learning - Automatically generated TLINKs less likely to
rely on such features
54Extraction of temporal relations(Mani and
Schiffman 2004)
- Preliminary experiments w/two tasks
- Relative temporal ordering of events expressed by
pairs of adjacent verb groups - Note very similar to task 2 in your assignment
- Determining temporal anchors for events
- Note indirect approach to task 3 in your
assignment
55Task 1 Clause ordering
- For pairs of adjacent tensed verb groups,
determine temporal relation b/t events described - Comparison restricted to clause sequences
- Past-Past prototypical case
- A Brooklyn woman who was watching her clothes
dry in a laundromat was killed Thursday evening
when two would-be robbers emptied their pistols
into the store - PastPerfect-Past thought likely to be hard
- Howes had been working for the Britain-based
Mines Advisory Group when he was abducted with
his Cambodian interpreter Houn Hourth in March
1996. - 6 relations
- Entirely before, Up to, Since, Simultaneous,
Entirely after, Unclear
56Task 1 Clause ordering,manual annotation
- 3 annotators, 40 verb group pairs
- Agreement 60 for all 3 annotators 72 w/o
UNCLEAR - Kappa 0.5 0.61 if Entirely before/Up to and
Entirely after/Since collapsed - Also, single annotations for 200 more pairs
57Task 1 Clause ordering, automatic annotation
- Training data manual annotations
- Features see following slide
- Machine learning tool Ripper (rule induction)
- Results
58Task 1Features for clause ordering
- Binary-valued
- COTAG1 (2) Clause 1 (2) is a complement clause
- QUOTE Presence of a quotation mark in either
clause - RCTAG1 (2) Clause 1 (2) is a relative clause
- STAG Presence of a sentence boundary between
clauses - STATIVE1 (2) Presence of a lexical stative verb
in clause 1 (2) - TIMEPREP (2) Presence of a temporal preposition
(like since, after, before, etc.) in clause 1 (2) - TIMECONJ Presence of a temporal conjunction
linking the two clauses - TIMEX1 (2) Presence of a time expression in
clause 1 (2) - String-valued
- VERB1 (2) verb in clause 1 (2)
59Task 2 Temporal anchoring of events
- Two sub-tasks
- tval moves for each clause, determine whether
the temporal anchor (or reference time) - is the same as for the previous clause KEEP
- reverts to a previous reference time REVERT
- shifts to a new time SHIFT
- anchors for each clause, determine the temporal
relation to its reference time - At, Before, After, Undefined
60Task 2 Temporal anchoring of events
- Training corpus 2069 clauses marked manually
with tvals and anchor relation - Features see following slide
- Machine learning tool C5.0 Rules
- Results
61Task 2 Features for temporal anchoring of events
- CTYPE regular clause, relative clause, or
complement clause - CINDEX clause relative index in main-clause
- PARA paragraph number
- SENT sentence number
- SCONJ subordinating conjunction (e.g., while,
since, before) - TPREP preposition in a TIMEX2
- TIMEX2 extent of TIMEX2 tag
- TMOD temporal modifier not attached to a
TIMEX2 - QUOTE number of words in quotes
- REPVERBC reporting verb
- STATIVEC stative verb
- ACCOMPC accomplishment verb
- ASPECTSHIFT shift in aspect from previous clause
- G-ASPECT grammatical aspect progessive,
perfect,nil - TENSE tense of clause past, present, future,
nil - TENSESHIFT shift in tense from previous clause
- ANCHOR_EXPLICIT lt, gt, , undefined
- TVAL reference time for clause