temporal logic issues in music knowledge representation

6
North-Holland Microprocessingand Microprogramming 27 (1989) 541-546 541 TEMPORAL LOGIC ISSUES IN MUSIC KNOWLEDGE REPRESENTATION AntoNio Camurri DIST - Department of Communication, Computer and System Sciences University of Genoa - Via Opera Pia, 11A - 16145 Genoa - Italy Tel. +39-10- 310223 - E-Mail: music@i2unix. UUCP and [email protected] ABSTRACT This paper shows possible applications to music of some results deriving from Temporal Reasoning (TR), a particular subfield of Artificial Intelligence (AI). In particular, TR can be usefully applied in music theory, musicology, composition, and in any activity involving reasoning on music knowledge. The basic assumption is that a general music theory has to cope deeply with formal theories of time. In the paper are briefly introduced and discussed the most relevant formalisms on TR, to investigate their possible implications in the music domain. Successively, the paper shows the formalism for TR embedded in an approach we have recently developed, consisting of a hybrid model for music knowledge representation based on SI-Nets (Semantic Inheritance Networks). 1. INTRODUCTION The state of the art of current Artificial Intelligence technologies allows the development of intelligent systems in different domains of human knowledge. Music belongs to a particular domain, with the property of having time playing a fundamental role in the knowledge representation problem. Music is based on the notion of "time": we think that a general music theory has to cope deeply with formal theories of time. Most of the works done in the area of AI and Music do not approach formally this problem. From an implementational point of view, several systems for music representation and composition have been recently developed, based on "traditional" expert system techniques (rule -based systems [Buchanan and Shortliffe 1984]), or on object oriented techniques, but none embeds an explicit formalism for time reasoning. For example, in rule- based systems time remains hidden behind the search process (forward, backward etc.) of the inferential machine; symbolic, logic aspects of music are mixed confusely with purely temporal aspects. This problem is This work has been partially supported by Italian Ministry a grant on Computer Music (MPI 40%). present not only in music, but in any other domain in which time has a predominant role, for example advanced robotics, planning, intelligent decision support systems, medical diagnosis. One particular subfield of AI, known as Temporal Reasoning (TR), has recently grown in order to acknowledge this central role of time. The goal of TR is to develop general theories of time. Interesting applications of TR can be found in musicology, composition, and in any possible application involving reasoning activities in music. In this paper we briefly introduce and discuss the most relevant temporal formalisms (Allen's interval calculus [Allen 1984], McDermott's temporal logic [McDermott 1982], Shoham's interval logic [Shoham 1987]), underlining the possibilities of application in music. Successively, the paper shows the explicit formalism for time reasoning embedded in an approach we have recently developed, consisting of a hybrid model for music knowlexlge representation based on SI-Nets. of Education with

Upload: antonio-camurri

Post on 21-Jun-2016

216 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Temporal logic issues in music knowledge representation

North-Holland Microprocessing and Microprogramming 27 (1989) 541-546 541

TEMPORAL LOGIC ISSUES IN MUSIC KNOWLEDGE REPRESENTATION

AntoNio Camurri

DIST - Department o f Communication, Computer and System Sciences University o f Genoa - Via Opera Pia, 11A - 16145 Genoa - Italy Tel. + 3 9 - 1 0 - 310223 - E - M a i l : music@i2unix. UUCP and [email protected]

ABSTRACT

This paper shows possible applications to music of some results deriving from Temporal Reasoning (TR), a particular subfield of Artificial Intelligence (AI). In particular, TR can be usefully applied in music theory, musicology, composition, and in any activity involving reasoning on music knowledge. The basic assumption is that a general music theory has to cope deeply with formal theories of time. In the paper are briefly introduced and discussed the most relevant formalisms on TR, to investigate their possible implications in the music domain. Successively, the paper shows the formalism for TR embedded in an approach we have recently developed, consisting of a hybrid model for music knowledge representation based on SI-Nets (Semantic Inheritance Networks).

1. INTRODUCTION

The state of the art of current Artificial Intelligence technologies allows the development of intelligent systems in different domains of human knowledge. Music belongs to a particular domain, with the property of having time playing a fundamental role in the knowledge representation problem. Music is based on the notion of "time": we think that a general music theory has to cope deeply with formal theories of time. Most of the works done in the area of AI and Music do not approach formally this problem. From an implementational point of view, several systems for music representation and composition have been recently developed, based on "traditional" expert system techniques (rule -based systems [Buchanan and Shortliffe 1984]), or on object oriented techniques, but none embeds an explicit formalism for time reasoning. For example, in rule- based systems time remains hidden behind the search process (forward, backward etc.) of the inferential machine; symbolic, logic aspects of music are mixed confusely with purely temporal aspects. This problem is

This work has been partially supported by Italian Ministry a grant on Computer Music (MPI 40%).

present not only in music, but in any other domain in which time has a predominant role, for example advanced robotics, planning, intelligent decision support systems, medical diagnosis.

One particular subfield of AI, known as Temporal Reasoning (TR), has recently grown in order to acknowledge this central role of time. The goal of TR is to develop general theories of time.

Interesting applications of TR can be found in musicology, composition, and in any possible application involving reasoning activities in music.

In this paper we briefly introduce and discuss the most relevant temporal formalisms (Allen's interval calculus [Allen 1984], McDermott's temporal logic [McDermott 1982], Shoham's interval logic [Shoham 1987]), underlining the possibilities of application in music. Successively, the paper shows the explicit formalism for time reasoning embedded in an approach we have recently developed, consisting of a hybrid model for music knowlexlge representation based on SI-Nets.

of Education with

Page 2: Temporal logic issues in music knowledge representation

542 A. Camurri / Temporal Logic Issues in Music Knowledge Representation

2. BASIC FORMALISMS AND MUSIC

Both Allen's and McDermott's formalisms for time reasoning are based on the concept of action, considered essentially for planning purposes. In the definition of their epistemiologies, both take advantages from significant works in the fields of linguistics and philosophy (see for example [Mourelatos 1978]). In particular, they borrow from Mourelatos' theory of events and processes the conceptualization of the world in term of static and dynamic entities. Such entities are associated with time intervals in Allen's theory, with time points or states in McDermott's. Static entities are called properties, which, in Allen's approach, HOLD over time intervals. The basic axiom of properties says that a property holds in an interval T i f f it holds in all subintervals of T. Dynamic entities are called occurrences, which can be classified in events and processes. Occurrences performed by agents are called actlons. An event OCCURS in the smallest time interval possible for it to occur: an event cannot occur in two intervals overlapped. A process takes place (OCCURR/NG is the corresponding predicate) in the interval T //7 it takes place in at least one subinterval of T.

Both Allen's and McDermott's logics are typed f irst-order predicate calculus. The main difference lies on the approach to time: Allen put as basis of his logic the concept of time interval, McDermott the time point or state. A set of 13 primitive relations among intervals are at the basis of Allen's theory. Any world entity is associated with time intervals.

Recently, Shoham proved the equivalence of the expressive power of the two formalisms, and introduced a new theory with a clearer and more powerful formal semantics.

A general music language can be defined basing on concepts taken from the formalisms described above: properties, events and processes seem to fit in a natural way in the musical domain, as intuitively shown in the following examples. The Tonality is C Major is a property which HOLDS over a particular time interval T, for a given musical piece P. We could express this fact with the assertion

TONALITY(P, C__Major, T) in which time is an argument added to the property. This assertion mixes temporal with atemporal (harmonic, in this case) descriptions: such approach does not allow to to derive general aspects of time. For example, it is not possible to derive the general relation of cause/effect (effects always follow their causes). Another way to express the same fact which solves this problem is the following:

HOLDS(TONALITY(P, C__Major), T)

in which the atemporal component (propositional) of the assertion is kept separated from the temporal component.

Particularly meaningful are the concepts of process and event in music: we could say, for example

OCCURRING(CRESCENDO(P, pp, t9, T) for describing a Crescendo, a typical example of process. A simple case of event is the following:

OCCUR(THEME, T) with T the smallest interval for THEME occurrence.

An open problem, which goes beyond the scope of this paper, regards the problem of defining an epistemiology of music concepts, basing on static and dynamic entities, with the aim of defining a general music language. We have defined an epistemiology in a more general environment (not related to a particular domain, such as music) in [Camurri Frixione et al. 1989]: an interesting application of this system to music is actually part of our research activities. The novelity of the approach lies in the use of a typed first-order logic with an explicit separation of temporal from atemporal/propositional aspects of musical knowledge.

Some problems could arise from this kind of representation, due to the limits of the formalism itself and to the objective difficulties of representing complex music situations or tasks basing on pure f irst-order logic.

Other approaches have been developed in the field of knowledge representation for overcoming the problems mentioned above. A meaningful formalism in this direction is represented by the SI -ne t s (Semantic Inheritance networks), as defined in K L - O N E and Krypton [Brachman Pigman-Gilbert and Levesque 1985]. SI -ne ts have the expressive power of a f irst-order predicate calculus with a considerable reduced complexity in the representation. One of the most important feature of this formalism regards the distinction between terminological and assettional aspects in the representation: for this reason SI -ne t s are a hybrid formalism.

3. TIME REPRESENTATION IN SYSTEMS BASED ON SI -NETS

We have developed a system based on SI-ne ts , with the aim of representing both "purely" logic (atemporal) and temporal aspects of music as in Allen and McDermott: it consists of a frame-based environment based on multiple-inheritance semantic networks, based on K L - O N E , in which an explicit formalism for time reasoning has been introduced.

Page 3: Temporal logic issues in music knowledge representation

A. Camurri / Temporal Logic Issues in Music Knowledge Representation 543

In the following I focus on the definition of the temporal aspects of the representation.

We use a formalism that allows distinguishing between definitional and assert/onal knowledge [Brachman Fikes and Levesque 1985]. Thus, the knowledge base (KB) consists of two parts, respectively: the T-Box (where "T" stands for "terminologic") and A - B o x (where "A" stands for "assertional"). The T - B o x uses a S I - N e t language similar to that used in K L - O N E for the definitional knowledge [Brachman and Schmolze 1985].

In our approach, each node in the S I - N e t representing a music action concept, or, more generally, a timed eat/ty, must have roles (tense roles) able to give it temporal characterizations, establishing relationships with concepts representing temporal entities (such as intervals or instants). The number and the structures of such roles depend on the kind of representation used for t/me. If we choose a representation based on instants, for every action concept (see the example of fig. 1, "a group ", according to the terminology defined in [Lerdahl and Jackendoff 1983]) two roles must be defined, that we call BEGIN and END, representing the beginning and the end of the music action (a group). The Value Restriction (V/R) of BEGIN and of END will be constituted by the concept INSTANT, and the Number Restriction (N/R) will be (1,1) for both roles (every action has exactly one initial and one final instant).

BEGIN

END

Figure 1

On the contrary, if we adopt a representation based on time intervals, as in Allen, only one role is sufficient, called DURATION, whose V/R is the INTERVAL concept. Such role is the period of time in which the action occurs (fig. 2). The N/R is (1,1) also for the duration role (every action occurs exactly in one time interval).

DURATION

Figure 2

Tense representations based on instants are equivalent to those based on intervals; choosing between the two has no consequences on the expressive power. In our case we adopt an instant-based representation, for reasons better explained later.

In any case, regardless to the kind of temporal representation, the key problem is how to represent temporal relations among the roles of action concepts. For example, if we consider the concept in fig. 1, it is at least necessary to express the fact that, for every specific instance of GROUP, the final instant (i.e. the filler of the END role) must follow the initial instant (the filler of the role BEGIN). This is a general problem in SI -Nets : if a concept table, for instance, is represented with roles board and support, we must also express the fact that the board filler is over the support filler. K L - O N E [Brachman and Schmolze 1985] has two types of construct at this purpose, Role Value Maps (RVM) and Structural Descriptions (SD). The former is the mean for imposing identity or inclusion relations between the sets of fillers for two roles of a concept. The SDs are more general, since they allow imposing arbitrary relations between the sets of the fillers of two or more roles (in the example above, it would be possible to impose the relation stay above between the role fillers board and support of the concept table).

In case of action representation, RVMs, although necessary, are not sufficient to represent all relevant time relations. On the other hand, SDs are very complex from a formal point of view, and too general at the same time, since our aim is not to represent any kind of ro le - - to - ro le relationship, but rather a limite~l set of temporal relations, determined a priori. We can thus define a proper set of relations, including them in the formalism of the semantic network, giving raise to a class of constructs that we call tense maps (TM), with a syntax similar to RVMs' . Choosing a representation instant-based, it is sufficient a partial ordering relation. Two TMs are thus defined, corresponding to the temporal relations "follows" and "follows or coincides with" (that we will indicate with symbols " > " and "_~").

Let us consider the example in fig. 3: it represents the pitch structure representing a group, characterized by a beginning defining a structural accent, followed by an evolution defining an arc of tonal motion and a cadence.

For every music action, the final instant must follow the

initial instant. The TMs indicate that, for every instance of GROUP, ]NIT, EVOLUTION and CADENCE, the role filler for END must strictly follow the role filler for BEGIN. We can represent graphically a TM by analogy with RVMs: each TM has its symbol inside a rhombus, connected through a link (continuous line) to the concept for which it is defined (GROUP in our case). Two pointers (dotted lines) connect the TM to the related

Page 4: Temporal logic issues in music knowledge representation

544 A. Camurri / Temporal Logic Issues in Music Knowledge Representation

BEGIN END

BEGIN END BEGIN END BEGIN END

Figure 3

roles. Since a TM represents a temporal relation defined on instants, it can only establish a relation among roles, simple or obtained by composition, whose V/R is the concept INSTANT (or a subconcept of it).

In fig. 3 the roles PART OF #1, PART._OF_//2, P A R T OF //3 are sub-act ions of the GROUP action. The role P A R T OF //1, which has / N / T as V/R, is the sub-act ion which expresses the concept of beginning the tonal motion of the group; in the same manner, the other roles express the tonal evolution in the central part of the group, and the cadence of the tonal motion. Also for these role fillers precise temporal relations must be specified. The initial instants for GROUP a n d / N / T must coincide. This is obtained by a RVM expressing that the role filler for BEGIN of GROUP coincides with the role filler obtained composing the PART OF //1 role of GROUP with the BEGIN role o f / N / T . In a similar way the final instant for the filler of PART OF //1 is forced to coincide with the initial instant for the filler of PART OF //'2. The third sub-act ion (CADENCE) needs a simpler relation, a TM of type " > ' , between the initial instant for the filler of PART OF //3 and the initial instant for the filler of PART OF #2. This means that, in our example, a cadence can overlap the ending part of the tonal evolution of the group.

The purpose of a TM is not to define a total ordering among an action's components. Since we represent only ter~nologic or dcfinitionM information, the only temporal relations represented are those which are necessary conditions (and those which are sufficient,

if they exist) for the concept to be applicable. For instance, a music action in which EVOLUTION starts before the structural beginning (/NIT) is not a GROUP.

However, in order to define GROUP, the fact whether the final instant of EVOLUTION follows or not the initial instant of CADENCE is completely indifferent; hence, the net leaves it undetermined.

From inheritance point of view, a TM has the same behavior as an RVM. For example, in a more complex net, the concepts of fig. 3 would be subsumed by a more general concept, for example ACTION, from which they would inherit th- roles BEGIN and END with the connecting TM. These ideas about inheritance and multiple levels of abstraction are discussed in [Camurri and Zaccaria 1988] and in [Camurri Frixione et al. 1989], together with a detailed description of a formal system for knowledge representation based on these concepts.

If a temporal representation interval-based had been chosen, the number of TMs would be greater. In case of of Alien's primitives [Allen 1984], for instance, each primitive (STARTS, OVERLAPS, BEFORE etc.) should correspond to a proper TM. The fig. 4 shows the example of fig. 3 redrawn for this choice.

For what concerns the assertional component, the system uses a subset of first order predicate calculus corresponding to the set of Horn Clauses. The A - B o x is therefore considerably richer than traditional K L - O N E ' s . In analogy to KRYPTON, for example, T - B o x gives the definitions for one-place and two-places predicates used

Page 5: Temporal logic issues in music knowledge representation

A. Camurri / Temporal Logic Issues in Music Knowledge Representation 545

PART . . . # 2

I u'~tt ) ',, [ EVOLUTION

DURATION

Figure 4

in the A - B o x . In particular, each concept in the net corresponds to a one-p lace predicate of the A - B o x , each role to a two-arguments relation. The two types of TMs (> and _~) correspond, at the assertional level, to

order relations among objects of type instant.

At the assertional level, a TM linking two roles in the net implies that the corresponding relations hold between the role fillers. For instance, the net in fig. 3 implies that, for each X, Y, Z in the A - B o x ,

GROUP(X) A BEGIN(X, Y) A END(X,Z) ~ Z> Y

where the relation > is a relation between constants of the assertional box, different from the TM > in the net, which represents a relation between roles. > and ~ of the A - B o x have the usual properties of an order relation (transitivity, etc.), so that, for instance, it holds that

Vx , Y,Z(X> Y A r > z -, x > z )

Vx , Y ,Z (X>y A Y~_Z ~ x~_z)

They represent Gr 1 as like

can be deduced. A query

("at what time gr I appropriate answer

As second example,

This query will answer

GROUP(Gr_.. I) BEGIN(Gr__. l ,t l ) PART__OF_//1(Gr__ 1,INIT I) END(INtT_ 1,t2)

an instance of GROUP. Facts

tl ( t2

BEGIN(gr__ ! ,X)

begins ?") will generate the

X = tl

let us consider the query PART__OF(Gr__ I ,X)

all sub-actions of Gr 1 (the part o f roles are differentiations of a general role at the highest level). In the same way, at the T - B o x level,

ROLE(PART__ OF, GROUP, X)

will answer all the value restrictions of the PART OF roles defined for the concept GROUP, as to say, all the components of an action of type GROUP.

Finally, the clause BEG1N(a,XI) A BEGIN(b, X2) A BEG1N(c,X2) A X I ( X 2

stands for "does action a precede the simultaneous start of actions b and c ?"

This is the most important level of query to the KB. This is the level of knowledge on which a strategic music reasoner (planner) might stand. This kind of inferences are carried out using the knowledge stored in the net. Other information (typically more detailed) can be derived by the simulative capabilities, using implicit knowledge about processes and events [Camurri Frixione et al. 1989].

An experimental implementation of the representation system so far described has been realized in PROLOG, adding tense primitives to the knowledge tool PROCNE, .described in [Costa et al. 1988].

4. EXAMPLES OF TEMPORAL REASONING ACWIVrrlF~

~ N ~

Allen J.F., "Towards a general theory of action and time", Artificial Intelligence, 23, pp.123-154, 1984.

Brachman R.J., Pigman-Gilber t V., Levesque H.J., "An essential hybrid reasoning system, knowledge and symbolic level of Krypton", Proc. 9th. UCAI, Los Angeles, CA, 1985.

We now introduce three simple examples of possible queries to the system, where we assume that the T--Box contains the net of fig. 3. As first example let us consider the clauses

Brachman R.J. Fikes R.E. and Levesque H.J., "Krypton: A Functional Approach to Knowledge Representation", in Brachman and Levesque eds., Readings in Knowledge Representation, Morgan & Kaufman Publishers, 1985.

Page 6: Temporal logic issues in music knowledge representation

546 A. Camurri / Temporal Logic Issues in Music Knowledge Representation

Brachman R.J. and Schmolze J.G., "An Overview of the KL-ONE Knowledge Representation System", Cognitive Science, 9, pp.171-216, 1985.

Buchanan B. and Shortliffe, "Rule-Based Expert Systems", Addison Wesley Publishing Co., Massaehussetts, 1984.

Camurri A., Zaccaria R., "An Experimental Approach m a Hybrid Representation of Musical Knowledge", Proc. First International Workshop on Artificial Intelligence and Music AIM-88, AAAI-88, USA, and GMD, St.Augnstin, West Germany, Sept.1988.

Lerdahl F., Jackendoff R., "A Generative Theory of Tonal Music", The MIT Press, 1983.

McDermott D., "A temporal logic for reasoning about processes and plans", Cognitive Science, 6, pp.101-155, 1982.

Mourelatos A.P.D., "Events, processes, and states", Linguistics and Philosophy, 2, pp.415-434, 1978.

Shoham Y., "Temporal Logics in AI: Semantical and Ontological Considerations", Artificial Intelligence, 33, pp.89-104, 1987.

Camurri A., Frixione M., Gaglio S., Zaccaria R., "A Structured Approach to Action Representation", submitted to the Int. Journal of Intelligent and Robotic Systems, 1989.

Costa M. Frixione M. Gaglio S. Palladino D. Spinelli G. Traversa M. and Zolezzi M., "PROCNE: a PROlog tool Combining logic and semantic NEts" DIST Technical Report #881, 1988.