File Information
File: 05-lr/acl_arc_1_sum/cleansed_text/xml_by_section/metho/85/p85-1001_metho.xml
Size: 16,947 bytes
Last Modified: 2025-10-06 14:11:42
<?xml version="1.0" standalone="yes"?> <Paper uid="P85-1001"> <Title>SEHANTICS OF TEHPORAL QUERIES AND TEHPORAL DATA</Title> <Section position="1" start_page="0" end_page="0" type="metho"> <SectionTitle> SEHANTICS OF TEHPORAL QUERIES AND TEHPORAL DATA </SectionTitle> <Paragraph position="0"/> </Section> <Section position="2" start_page="0" end_page="0" type="metho"> <SectionTitle> Abstract </SectionTitle> <Paragraph position="0"> This paper analyzes the requirements for adding a temporal reasoning component to a natural language database query system, and proposes a computational model that satisfies those requirements. A prelim-Inary implementation in Prolog is used to generate examples of the model's capabi Iltles.</Paragraph> <Paragraph position="1"> I. Introduction A major area of weakness in natural language (NL) interfaces is the lack of ability to understar~ and answer queries involving time. Although there is growing recognition of the importance of temporal semantics among database theoretlcians (see, for example, Codd \[6J, Anderson \[2L Clifford and Warren \[41, Snodgrass \[ i 5\]), existing database management systems offer little or no support for the manipulation of tlme data. Furthermore (as we will see In the next Section), there is no consensus among researchers about how such capabilities should work.</Paragraph> <Paragraph position="2"> Thus, the developer of a NL interface who wants to support time-related queries cannot look to an underlying ~ for he!p.</Paragraph> <Paragraph position="3"> Currently available NL systems such as Intellect (SJ have not attempted to sugoort temporal queries, except in a trivial sense. In Intellect, users can ask to retrieve date attributes (e.o~, &quot;When was Smith hired'?') or enter restrictions based on the value of a date attribute (e.g., &quot;List the employees hired after Jan I, 1984&quot;); but more complex questions, such as &quot;How long has it been since Smith received a raise~ or &quot;What projects did Jones work on last January?', are not 'Jnderstoo~ This Is a serious PraCtical limitation, since the intended users of NL systems are executives and other professionals who will require more sopffistlcated temporal capal)illtles.</Paragraph> <Paragraph position="4"> This report describes a model of temporal reasoning that is designed to be tncoroorated Into a NL query system. We assume that a syntactic component could be developed to translate explicit temporal references in English (e.g., &quot;two years ago') into logical representations, and restrict our attention to the conceptual framework (including both knowledge structures and rules of inference) underlying such representations. Section 2 analyzes the requirements that the temporal model must satisfy: first describing some of the issues that arise tn trying to model time in a computer, then defining four basic semantic relattonsl~ips that are expressed by time attributes in databases, and finally analyzing the capat)tlites required to Interpret a variety of temporal queries. Based on this analysis, a computational model is described that satisfies many of the requirements for understanding and answering time-related database queries, and examples are presented that t l lustrate the model's calDabiltties.</Paragraph> </Section> <Section position="3" start_page="0" end_page="4" type="metho"> <SectionTitle> 2. Hodellng Temporal Knowledge </SectionTitle> <Paragraph position="0"> Hodellng time, dasoite its olovlous importance, has proved an elusive goal for artificial Intelligence (AI).</Paragraph> <Paragraph position="1"> One of the first formal proposals for representing time-dependent knowledge in AI systems was the &quot;situation calculus&quot; described by I'lcCarthy a~l Hayes \[I I\]. That proposal created a paradigm for temporal reasoning based on the notion of an infinite collection of states, each reoresenting a single instant of time.</Paragraph> <Paragraph position="2"> Prepositions are defined as being either true or false in a particular state, and predicates such as &quot;before (sl, s2)&quot; can be defined to order the states temporally. This approach was used by Bruce \[3\] in modeling the meaning of tensed verb phrases In English, and It has been refined and extended by McDermott ( ! 3~ 5tare space models describe time as being similar to the real number line, with branches for alternative pasts and hypothetical futures. Although this approach is intuitively appealing, there are many unsolved problems from both the logical and the linguistic points of view. A few of the current problems in temporal semantics are very briefly described below: a. Non-monotonic reasontno~ In a system for automated reasoning, conclusions are drawn on the basis of current facts. When a fact that was true becomes false at a later time, conclusions that were based on that fact may (or may not) have to be revised. This problem, which is viewed by many as &quot;the&quot; current issue in common sense reasoning, has been studied extensively by Doyle \[7\], Moore \[I 4\], and McDermott \[I 3\], and continues to occupy the attention of John McCarthy \[ ! 2~ b. Representation of Intervals and processes.</Paragraph> <Paragraph position="3"> Another problem for temporal logic is the representation of events that occur over intervals of time. Allen \[I\] points out that even events which seem to be instantaneous, such as a light coming on, cause problems for the state space model, since at the instant that this event occurs it is impossible to say that either &quot;the light is on&quot; or &quot;the light is not on&quot; is true. As a result, Allen chooses a representation of time that uses intervals as the primitive objects instead of instantaneous states.</Paragraph> <Paragraph position="4"> c. Temporal distance. Neither the state space model nor the interval model offers a convincing notion of temporal distance. Yet, the ability of a system to understand how long an event took or how much time separated two events Is an Integral part of temporal reasonir~ d. Periodicity of time. There are many periodic events that affect the way we think and talk about time such as day and night, the days of the wee~, etc.</Paragraph> <Paragraph position="5"> McDermott \[13\] shows how his tempo~ al logic can describe periodic events, and Anderson \[2\] includes a representation of periodic data in her model of temporal database semantics. However, reasoning about periodic time structures is sttli z relatively unexplored issue.</Paragraph> <Paragraph position="6"> e. Vagueness ana uncertainty. People are able to reason about events whose temporal par-~neters are not known exactly - in fact, almost all temporal descriptions incorporate some vagueness. The most direct treatment of this phenomenon was a system by Kahn and Gorry \[9\], which attached a &quot;fuzz factor&quot; to temporal descriptions. However, Kahn and Gorry recognized that this approach was very crude and more sophisticated techniques were needed.</Paragraph> <Paragraph position="7"> f. Complex event structures. The situation calculus is not easily adapted to descriptions of complex acts such as running as race, simultaneous events such as hiding something from someone by standing in front of it while that person is in the room (an example dis- cussed by Allen \[I \]), or &quot;non-events&quot; such as waitin~ Metaphorical time descriptions. In naturally occuring NL dialogues, time descriptions are frequently metaphoric. Lakoff and Johnson \[I O\] have shown that at least three metaphors are used to describe time tn English: time as a path, time as a resource, and time as a moving object. AI models have yet to adequately deal with any of these metaphors.</Paragraph> <Paragraph position="8"> Considering all of these complex issues (and there are others not mentioned here), It is not surprising that general temporal capabilities are not found in applied AI systems. However, tn the domain of NL query systems, it may be possible to ignore many of these problems and still produce a useful system. The reason for this is, in the world models of computer dataOases, most of the complexity and ambiguity has already been &quot;modeled out'. Furthermore, current NL interfaces only work well on a supclass of databases: those that Conform to a simple entity-attribute-relationship model of reality.</Paragraph> <Paragraph position="9"> The research described in this paper has focused on the design of a temporal component for a NL database QueP), system This has led to a model of time that corresponds to the structure of time attributes in databases: i.e., a domain of discrete units representing intervals of equal length. (Whether these units are SOCOrK2S, minutes, days, or years may vary from one aatabase to another.) The description of the model presented In Section 3 assumes that the basic tempora! units are days, In order to make the model more intuitively meaningful; however, the model can be easily adaoted to time units of other sizes.</Paragraph> <Paragraph position="10"> * 2</Paragraph> <Section position="1" start_page="0" end_page="3" type="sub_section"> <SectionTitle> 2.1 Analysis of Time Attributes in Databases </SectionTitle> <Paragraph position="0"> The primary role of time Information In databases is to record the fact that a specific event occurred at a specific time. (It is also possible to represent times in the future, when an event is scheduled to occur, e.~, the date when a lease Is due to expire.) Having said this, there are still different ways in which time attributes may be semantically related to the entities in the database, and these require different Inferences to be made in translating NL queries into the framework of the data model. The following categories of time attributes are frequently observed in &quot;real world&quot; databases: I. Time attributes describing individuals 2. Time of a &quot;transaction&quot; 3. Time when an attribute or relationship changed 4. The time of transition from one stage of a process to the next.</Paragraph> <Paragraph position="1"> The first two categories are quite straightforward. Time attributes of individuals appear In &quot;entity&quot; relations, as shown In Figure la; they describe the occurrence of a significant, event for each Individual, such as an employee's date of birth or the date when the employee was hired. This type of temporal attribute has a unique (and usually unchanging) value for each Individual.</Paragraph> <Paragraph position="2"> The term &quot;transaction&quot; is used here to describe an event (usually involving several types of entities) that does not change the status of the participants, other than the fact that they participated In the event. For example, the date of each treatment (an X-ray, a therapy session, or a surgical procedure) given to a patient by a doctor would be recorded in a medical records database, as shown in Figure lb.</Paragraph> <Paragraph position="3"> Attributes In the third category record the time at which some other attribute or relationship changed. Databases containing this type of information are called &quot;historical databases', in contrast to the more traditional &quot;operational&quot; databases, which only record a &quot;snapshot&quot; of the current state of the world. The salary history and student records databases shown in l a. Time Attributes Decribmg Individuals I. Which doctors performed operations on June 15, 19837 2. How many people received PhD's in Math last month? 3. What percent of the employees got raises in the 4th quarter of 19847 4. Did any authors have more than one paper waiting for publication on Jan I? 5 How much was Jones making in September of 19847 6. How long has Green worked here? 7. What was the average review time for papers suDmitted in t go3? 8. Which patients received operations on each dog last week? 9. How many Ph. D's were granted to women during each of the pest 10 years? Within this category, we must recognize a further distinction between exclusive attributes such as salary and qon-exclustve attributes such as degree.</Paragraph> <Paragraph position="4"> When a new salary is entered for an employee, the previous salary is no longer valid; but when a new degree is entered, it Is added to the individual's previous degrees.</Paragraph> </Section> <Section position="2" start_page="3" end_page="3" type="sub_section"> <SectionTitle> Examples of Temporal Queries </SectionTitle> <Paragraph position="0"> The last category of temporal data is used to record fixed sequences of events that occur in various actiivies. For example, the publication database of Figure Id records the life-cycle stages of papers submitted to a scientific journal: the date the paper was received, the date it was accepted (or rejected), the date the revised version was received, and the date that is it scheduled to be published. We can view this sequence as a process with several stages ('under review', &quot;being revised', &quot;awaiting publication'), where each temporal attribute represents the time of transition from one stage to the next.</Paragraph> </Section> <Section position="3" start_page="3" end_page="3" type="sub_section"> <SectionTitle> 2.2. Analysts of Tempera! Queries </SectionTitle> <Paragraph position="0"> particular interval of time. Current database systems already support time restrictions, such as Query I, that use simple, absolute time references. Queries such as (2), which use relative time references, and (3) which refer to intervals not directly represented in the database, require a more elaCx~ate model of time structures than current systems provide. The time domain model described In Section 3. I can support queries of this type.</Paragraph> <Paragraph position="1"> The second type of query asks about the state-of-the-world on a given date (Query 4) or during an interval of time (Query 5). Understanding and answering these queries requires rules for deducing the situation at a given time, as a result of the occurrence (or non-occun'ence) of events before that time. For example, Query 5 asks about Jones' salary in September of Ig78; however, there may not be an entry for Jones in the salary history file during that period. The system must know that the correct salary can be retrieved from the most recent salary change entered for Jones before that date. 5action</Paragraph> </Section> <Section position="4" start_page="3" end_page="4" type="sub_section"> <SectionTitle> 3.2 describes an event model that can represent this </SectionTitle> <Paragraph position="0"> type of know ledge.</Paragraph> <Paragraph position="1"> This section considers four types of queries Involving temporal data, and briefly outlines the capaDilites that a temporal knowledge model must have in order to understand and answer queries of ead~ type.</Paragraph> <Paragraph position="2"> Oueries I-3 in Figure 2 are examples of time restriction aueries, which retrieve data about individuals or events whose dates fall into a Another type of query asks about the lenoth of time that a situation has existed (Query 6), or about the duration of one stage of a process (Ouer 7 7). These queries require functions to compute and compare lengths of time, and rules for deducing the starting and King times of states-of-the-world based on the events that trigger them. Section 3.3 shows how the proposed temporal model handles this type of query. The last type of query Is the oertodlc query, which asks for objects to be grouped according to one or more attributes. High-level data languages and current NL interfaces are generally able to handle this type of request when it refers directly to the value of an attribute (e.~, Query 8), but not when it requires information to be grouped by time period, as in Query 9. To anwer periodic queries requires a formal representation for descriptions such as &quot;each of the past 5 years'; the &quot;periodic descriptors&quot; defined in Section 3. I satisfy this requirement.</Paragraph> <Paragraph position="3"> 3. A Temporal Reasoning Model for Databases In this section, a temporal reasoning model is proposed that can interpret the types of queries described in Section 2.2. The model, which Is expressed as a collection of predicates and rules written in Prolng \[S\], consists of the following components: I. A time domain model for representing units (days), intervals, lengths of time, calendar structures, and a variety of relative time descriptions.</Paragraph> <Paragraph position="4"> . An event model for representing and reasoning about the temporal relationships among events, situations, and processes in the application domairL</Paragraph> </Section> </Section> class="xml-element"></Paper>