Page  00000001 Classification in Music: A Computational Model for Paradigmatic Analysis Christina Anagnostopoulou (1) Gert Westermann (2) (1) Faculty of Music and Dept of Artificial Intelligence, University of Edinburgh chrisae music.ed. (2) Centre for Cognitive Science, University of Edinburgh gertecogsci.ed. Abstract We present a computational model for the paradigmatic analysis of musical pieces, which is the classification of musical segments into similarity-based categories. The model requires the analyst to make explicit choices for the characteristics by which the musical segments are described. The classification of the segments into categories is determined by these characteristics and is performed by a self-organizing neural network algorithm. In this way, traditional problems associated with paradigmatic analysis, namely lack of consistency and objectivity, can be avoided. Moreover, the model extends the analytical technique by providing different levels of classification, prototypes for each class, and by showing relations between classes. 1 Introduction The paradigmatic analysis (henceforth PA) of musical pieces has long been criticized for its reliance on intuition and the resulting inconsistencies [1]. In this paper, we describe a formal model for this task as a way to address such criticisms. In the next section, traditional PA is described and its shortcomings are discussed. The formal model is then presented, and its functioning is demonstrated by analyzing Debussy's Syrinx and comparing the results with J.J. Nattiez' (the leading figure in PA) second analysis of this piece [41. We conclude with a discussion of the model and suggestions for further work. 2 Paradigmatic Analysis PA consists in the segmentation of a piece of music and the classification of these segments into categories according to their similarity. The first occurrence of a segment in each class is called the paradigm, and subsequent segments are compared to these paradigms to determine their class membership. The paradigms therefore play the role of class prototypes. The motivation for this kind of analysis is that repetition, variation, transformation, and contrast within a musical piece are made explicit. Further analysis is thus facilitated -this can be distributional, comparative or stylistic. The main original goal of PA was to give a formal, objective account of the material used in a piece, not taking into account the composer's intentions or the listener's perceptions. In practice, however, the assignment of the musical segments to different classes usually relies on intuition: According to Nattiez, "People decide to associate several units in a single paradigm because of semantic or psy~chological criteria that theyJ do not e~xpress consciously." (qruoted in [11, p. 180). This lack of explicit criteria underlying the classification will naturally lead to inconsistencies in the analysis, and this has in fact been the main criticism of PA. Further criticisms address its limited character: there is only one level of classification, when subcategories could easily be identified and could prove to be useful. Relationships between different classes are not considered, although some classes will be more similar than others. Moreover, as in most other analytical techniques, the segmentation of a piece has been criticized as being usually informal, which is a problem for the subsequent classification. Finally, the paradigms against which other segments in a category are compared are merely a first occurrence and not necessarily prototypical of

Page  00000002 Paradigmatic - OK Analysis Re-evaluate Figure 1: A formal model for Paradigmatic Analysis their category (see section 4 for an example from Nattiez' analysis), and potential inconsistencies may arise by comparing each segment to a paradigm which is not prototypical. 3 A Formal Model Classifying objects is a fundamental task which has been studied in depth in other disciplines, such as formal learning theory, computer science, and psychology. However, the existing classification theories and techniques from those disciplines have not generally influenced music analysis (but see [3]). In a formal model, the algorithm by which the segments of the piece are classified has to be explicitly defined. Also, the feature representations on which the classification is based have to be made explicit, so they can serve as input to the classification algorithm. A formal system further leads to the modularization of PA into different subtasks, each of which can be solved independently. Figure 1 shows such a formal model. In the first step, the musical piece is segmented, and the analyst has to decide on the way in which musical features are to be represented. In the second step, each segment is expressed as a list of features (a feature vector), which is then used as input to a classification algorithm. The output of this module constitutes a PA. If the analyst is not satisfied with the clustering obtained, he will re-evaluate the feature representations. For example, if two segments which the analyst considers to be different are grouped together by the model, he will introduce a feature that distinguishes these segments from one another. Based on the resulting new representation of the segments, a different classification will occur. This process is repeated until a satisfactory classification is obtained. This final classification will be based on explicit segments and features and will be free from inconsistencies. In summary, a formal model of paradigmatic analysis serves as a tool for the analyst, forcing her to make her choices of representation explicit and providing a well-defined algorithm for the clustering of segments, without restricting the freedom to choose the classification criteria. 3.1 Segmentation It is generally accepted that there is no single "correct" way of segmenting a piece of music. Segmentation is a problematic issue for any kind of musical analysis, and therefore ideally a system should accept any analyst's choice on segmentation. The modular character of the present system allows this approach. In that way, different segmentations can be comparedit is obvious that the most sensible ones will result in the most sensible classifications. In our example we used J.J. Nattiez' segmentation from his second PA of Debussy's Syrinx for solo flute [4]. 3.2 Representation of Musical Features Each segment is described in the formal model as a list of features. The term "feature" is used here not only in the traditional sense, that is with binary values (yes/no), but also more generally, to include multi-valued attributes, and in fact any hierarchic relation in a semantic network. An example of a feature with a binary value would be the existence of a grace-note in a segment. An example of a multi-valued feature would be instrument register: it could be the first octave of the flute, the second or the third, or any combination of these. Examples of hierarchic relations are shown below for melodic shape and rhythmic movement. It is obvious that the results of the PA will depend crucially on the feature selection. The analyst

Page  00000003 Segm. Music Notation Feat. vector Class 1,6 100000.. I 4 0 1 001000... I or II 2,7 100000.. I 24,28 01000... II 52 0 1 0 0 0... 11I Table 1: Classification examples for several segments from Syrinx. will choose the features according to the desired outcome: for example, he might choose to focus on a rhythmic analysis, or compare several pieces of music according to a set of common features. Since similarity in music could be argued to be context-dependent (context being the piece or pieces under analysis), features can be low-level, piece-specific (e.g., the use of a specific interval), as well as very general musical properties (like upward melodic motion). For our experiments we chose a combination of general and of piece-specific features, describing * melodic shape (moving-up, down, or different combinations- or stationary). * rhythmic movement (continuous-which can be quaver, semiquaver or demisemiquaver movement- or interrupted-by a dotted rhythm, syncopation, long note or a pause-). * interval patterns (with instances being low-level successions of intervals) and * instrument register (in order to describe transposition). These features proved to be sufficient for the final classification. The features describing a segment were concatenated to form a feature vector, in our case with 40 binary values, which was then used as input to the Figure 2: Construction of a GNG network. Small circles represent input data, and large circles connected with edges are the units of the network. classification algorithm. Table 1 shows several segments out of the 79 from Syrinx with part of their feature vector representations. 3.3 The Classification Algorithm The classification algorithm which we chose to employ for our experiments was Growing Neural Gas [2]. This is an unsupervised neural network algorithm that grows units while it learns. Each unit corresponds to the prototype of one cluster. An input signal, i.e., a feature vector representing a musical segment through 40 binary features, can be viewed as having a position in the 40-dimensional input space, and the units of the network are positioned in the same space. When an input signal is presented, the unit of the network which is closest to it (measured by Euclidean distance) is moved towards this signal by a fraction of the distance to this signal, together with its topological neighbours. The distance between the signal and the winning unit is added to a local error variable of this unit. The winning unit and the second closest unit are then connected by an edge, or the age of the edge is reset to zero, if it already exists. The edges reflect neighbourhood relations between the network units. At each step, all edges in the network are aged, and edges which have reached a pre-defined maximum age are deleted. This process ensures a continuous updating of the neighbourhood relations. A new unit is inserted into the network at regular intervals, between the unit with the highest accumulated error and its neighbour with the highest error. The built-up structure of the network reflects the distribution and density of the input signals: The units move towards the input signals, and a high density of inputs in an area will lead to more units being allocated in this area. Figure 2 shows the development of a network in a two-dimensional input space with four distinct clusters. The network starts with two units and can therefore distinguish only between the two main clusters. In effect, the network answers the question: If there were two clusters, what would their prototypes be? After a certain amount of epochs

Page  00000004 (presentation of the input signals), a new unit is inserted and the units move to the positions indicated in the second picture. When the fourth unit is inserted, the units distribute over the four clusters. In principal, insertion of units proceeds forever. The GNG algorithm thus lets the analyst define the level of grainedness of her analysis and does not impose a priori constraints on the number of clusters. Each unit forms a prototype of a cluster, expressed in the probability distribution of the feature values of their cluster members. These prototypes are freqyuency-dependent, since the position of each unit is updated with each presentation of an input signal. Neighbourhood relations between clusters are expressed in the connections between the network units. 4 Experimental Results The GNG algorithm was trained on the musical feature vectors for 2000 iterations, inserting a new unit every 100 iterations (2 minutes CPU time on a Sun Ultra workstation). Thus, the final classification consisted of 20 categories, and by comparing this to previous stages, the hierarchy of clusters could be observed. We ran various experiments with different input representations. With our final representation (which is mentioned above) we obtained an intuitively sensible analysis which was surprisingly close to Nattiez' second paradigmatic analysis. Due to the lack of space it is impossible to give the various results obtained in full length. In table 1, segments 1, 2, 6 and 7 belong to the same class; segments 24, 28 and 52 belong to another. Segment 4 is a problematic segment in that it can be classified to either of these two categories, according to different input representations. It would be classified with the first category when rhythmic features are taken into account, and with the second if melodic shape is emphasized. In our experiments, after 2000 iterations, this segment formed a class by itself, but was linked by edges to both class I and class II. Nattiez classified segment 4 according to melodic shape and not to rhythm. The problem with this is that since segment 4 is the first occurrence for such a melodic shape, it becomes a paradigm. However, further segments are more and more varied, and the result is that segment 4 is in no way prototypical of the whole category. In our analysis, this problem was avoided because prototypes represented the weighted average of all class members and not the first occurrence of a class member. 5 Conclusions We have demonstrated a formal model of paradigmatic analysis. The model requires the analyst to make the categorization criteria explicit without restricting his particular choices. The classification produced by the model is then entirely based on these choices and depending on the obtained results, they can be revised by the analyst. The model yields different levels of classification, prototypes for each class and relations of classes of the same level. The model can be extended in various ways. Firstly, it is possible that the analyst wishes to attribute different importance to different features. Such a weighting of features should be incorporated into an extended model. Secondly, while the present version relies on a given segmentation of a piece, in principle a revision of this initial segmentation could be incorporated into the classification process, combining the stages of PA in a single unified model. This will be our main direction of future research. 6 Acknowledgements We are grateful to Peter Nelson for comments on a draft of this paper. The second author was funded by the ESRC (award no. R00429624342) and by the Gottlieb Daimler-und K~arl Benz-Stiftung (grant no. 02.95.29). Rtefere nces [11 N. Cook. A Guide to M~usical Analysis. Oxford University Press, 1987. [21 Bernd Fritzke. A growing neural gas algorithm learns topologies. In G. Tesauro, D. S. Touretzky, and T. K(. Lean, editors, Advances in Neural In~formation Processing SyJstems 7, pages 625-632, Cambridge, MA, 1995. MIT-Press. [3] R.O. Gjerdingen. Using connectionist models to explore complex musical patterns. In M~usic and Connectionism, pages 138-149. MIT Press, 1991. [4] J.J. Nattiez. Fondements d'une Semiologie de la Mrusique. Union Generale d'Editions, 1975.