Full text
Graph Convolutional Neural Networks Approaches for Melodic Pattern Analysis in Arab-Andalusian Music Alessandro Sellani1[0009000617105337], Niccolò Pretto1[0000000237427150], and Ivan Donadello1[0000000207015729] Free University of Bozen-Bolzano, Bozen 39100, Italy [email protected], [email protected], [email protected] Abstract The majority of Music Information Retrieval (MIR) research is Western-centric, and the limited availability of annotated resources poses a challenge for data-intensive approaches. In this work, we implement data-driven models and analyse their classification performance in two fundamental concepts in Arab-Andalusian music: nawba and ṭāb‘ using symbolic encoding. To address data scarcity, we employ two data augmentation strategies: sliding window segmentation and graph subsampling. We process a dataset of Arab-Andalusian digital scores to extract meaningful symbolic features and provide the resulting dataset for experiment reproduction and further research. Our results show that data-driven Machine Learning approaches provide a significant improvement for the aforementioned classification tasks compared to modelbased Artificial Intelligence. Moreover, we introduce a method based on a Graph Convolutional Neural Network (GNN) architecture that exploits the relationships between music components. To the best of our knowledge, this is the first application of a GNN to Non-Western MIR. This work has the potential to set a new baseline for state-of-the-art methods which identify nawba and ṭāb‘. Keywords: Graph Convolutional Neural Network · Mode detection · Music Information Retrieval · Non-Western Music · Digital Scores 1 Introduction Although Western music dominates computational music research, many regions posses extensively studied classical music traditions. However, these rich cultures are as of yet under-represented in music information models. This renders challenging research which employ data-driven models [16]. Recently, international projects have tackled these challenges, e.g., the CompMusic Project [17], which included a comprehensive list of data-driven approaches to culturally diverse repertoires and implemented several information modelling techniques within the scope of the following five music cultures: Hindustani and Carnatic [11], Turkish-makam [21], Arab-Andalusian (al-Āla)[15,9] and Beijing Opera [8]. Proc. of the 17th International Symposium on CMMR, London, UK, Nov. 3-7, 2025 197
2 A. Sellani et al. Building upon this effort, our work leverages the Arab-Andalusian corpus curated by the CompMusic Project to classify two fundamental concepts in the al-Āla music tradition: nawba and ṭāb‘.Nawabāt (plural of nawba) are suites of instrumental and vocal compositions, which describe a particular time of day along with the emotional state it is meant to invoke [9]. Instead, the ṭubū‘ (plural of ṭāb‘) refer to the melodic mode of the piece. Although Arab-Andalusian canon prescribes a fixed nawba and ṭāb‘ relation [1], due to the fragmentary nature of the tradition, corpus analysis shows this association to be in some occasions functionally fluid. Hence, we treat nawba and ṭāb‘ classification as independent tasks to avoid artificial constraints being placed on the models, and prevent presupposing dependencies. This work investigates whether Machine Learning (ML) data-driven models can effectively classify nawba and ṭāb‘ in Arab-Andalusian music within the symbolic domain, despite the limited availability of annotated symbolic data. To address this question, we build on prior work by [15] to include ṭāb‘ detection. Our evaluation compares the classification accuracy of traditional ML models with event-based Deep Learning (DL) architectures and introduces a novel classification methodology using Graph Convolutional Neural Networks (GNNs). However, DL models are particularly data-hungry and the Arab-Andalusian corpus is limited in number of samples. To address data scarcity, we implement two data augmentation methodologies: overlapping sequence segmentation, and graph sub-sampling. Our study is structured as follows: Section 2 introduces symbolic music classification approaches and current research for Non-Western Music Information Retrieval (MIR). Section 3 provides an overview of the dataset and outlines the pre-processing techniques. Section 4 presents the modelling approaches and their implementation details. The results are evaluated and discussed in Section 5. 2 Background Section 2.1 provides an overview of research in symbolic music, while Section 2.2 briefly states related works in the field of Non-Western MIR. 2.1 Symbolic Music Classification Symbolic descriptors consist of high-level musical elements that can be categorized into four main types: pitch, harmony, rhythm and timbre [6]. Although audio recordings are more prevalent than digital scores, a significant advantage of symbolic features lies in its higher level of abstraction, as they are able to express nuanced musical ideas shaped by cultural and societal contexts. Something difficult to capture from audio signals [17]. One of the simplest, although widely used symbolic feature representations are Pitch-Class Distributions (PCDs). They provide a compact histogram of pitch occurrences and are highly effective with various models. Several studies have explored this approach extensively [10,3]. Proc. of the 17th International Symposium on CMMR, London, UK, Nov. 3-7, 2025 198
GNN Approaches for Melodic Pattern Analysis in Arab-Andalusian Music 3 On the other hand, Neural Networks (NNs) possess the ability to reveal complex, hidden structures in data and as such sequence-based NNs. For instance, Recurrent Neural Networks (RNNs) [4] and Convolutional Neural Networks (CNNs) [12] have also been applied in the symbolic domain. Recently, graph-based representations have emerged as a powerful tool for a range of MIR tasks, from music generation [7] to cadence detection [14]. In this work we also test the hypothesis that graph-representations based on popularity measures and note relationships can express musical structures for the Arab-Andalusian music better than statistical aggregates and sequential DL models. 2.2 Non-Western MIR Most research is still conducted on commercial Western metadata. There is a compelling need to diversify datasets and re-orient MIR. Towards this goal, the CompMusic Project has generated a variety of diverse collections, reinforcing the consensus among ethnomusicologists that analytical approaches for Western music are not universally applicable [17]. In addition to providing the ArabAndalusian corpus, it also established baseline benchmarks for nawba classification which we expand upon in this work. Classical music traditions vary in their theoretical foundations. For instance, Turkish Makam music employs more elaborate systems, like the 53-Tone Equal Temperament (TET) derived via Ariel theory [10,19], which is distinct from the standard 12-TET Western framework. However, 12-TET, although not universal, finds use in some Non-Western music traditions [5,15]. Music is composed of repeated motifs, and pattern detection plays a crucial role in MIR. Automatic pattern retrieval for the al-Ála,Hindustani and Carnatic music traditions has been performed showing promising results [9,11]. For DL models, CNNs have been applied to detect string-playing techniques of Korean Guqin performances [13], and to classify tori by analysing pitch contour with CNNs [12]. Notably, the use of GNN in MIR is relatively new, and no graphbased approaches have been applied to Non-Western music in the literature. 3 Data Section 3.1 briefly describes the Arab-Andalusian dataset, while Section 3.2 goes over the construction of the data employed for training. Finally, Sections 3.3 and 3.4 explain the preparation and augmentation of the samples, respectively. 3.1 The Arab-Andalusian Dataset The Arab-Andalusian dataset is a collection of 164 long recordings (56 hours) belonging to the al-Āla music tradition, which have been manually annotated and selected by musicologist Amin Chachoo [2]. It was gathered as part of the CompMusic Project and is available on Zenodo (https://zenodo.org/records/1291776). Proc. of the 17th International Symposium on CMMR, London, UK, Nov. 3-7, 2025 199
4 A. Sellani et al. Figure 1: Class distribution of nawba and ṭāb‘ tracks against annotated sections. The dataset is divided into three collections: MusicXML scores, audio recordings and lyrics, along with metadata annotations and pitch distribution analysis. However, as this study focuses on symbolic features, only the digital scores are relevant for our task. Out of 164 tracks, 158 are available as MusicXML. Each piece is divided into temporal sections, each assigned with the following labels: nawba,ṭāb‘,mīzān and form. The mīzān refers to the rhythmic mode, which is structurally divided into forms (tempi). However, these are not taken into consideration in the analysis. The distribution of tracks and sections (847 in total) per nawabāt and ṭubū‘ are presented in Figure 1. For sake of clarity we maintained the IDs from [15]. For further details, see Appendix A, Tables 1-2. 3.2 Data Pre-processing The dataset described in the previous Section needs to be pre-processed to set up our experiment and train the models. Each track’s XML is parsed with the music21 library (https://www.music21.org). This parsing returns a stream of notes, among other measure features such as tempo, key or presence of chords. Every note is assigned the track and its corresponding section identifier along with their relative labels. Table 1 illustrates the dataset obtained after the extraction of symbolic values from the digital scores. The pre-processing revealed some discrepancies between the symbolic and audio representations. Each notes’ temporal timestamps in the scores was computed and an average mismatch of ±7.58 minutes between the digital scores and the audio recordings was found. This result leads to uncertainty when labelling portions of scores to a specific class. The notes which exceed the timestamps given in the annotated metadata have been discarded, removing around 5% of a score’s final section. Analysing the note distribution of the discarded slice against the whole dataset, we find that rests are approximately 3⇥longer and 44.8% more frequent. Long rests (>4 quarters) are disproportionately represented in the slice (12.7% vs. 2.1% in corpus). This decision could also boost the accuracy of the models, as trimming a track’s last section can aid in classification accuracy [19]. After this selection, we found that each section lasts 966 ± 748 seconds (around 16 ± 12 minutes). There are small sections ranging from 4 to 200 notes, and sections with more than 7000 notes (909 ± 1049 notes). Proc. of the 17th International Symposium on CMMR, London, UK, Nov. 3-7, 2025 200
GNN Approaches for Melodic Pattern Analysis in Arab-Andalusian Music 5 Table 1: Example of note-stream dataset. Nawba,ṭāb‘, are excluded for brevity. note time msr.N. dur. bpm bt.Strg. off. Tie chord Key length A4 0.00 1 2.0 85 1.0 0.0 False False d minor 95.06 Rest 1.41 1 1.0 85 0.5 2.0 False False d minor 95.06 G4 2.12 1 1.0 85 0.25 3.0 True False d minor 95.06 G4 2.82 1 1.0 85 1.0 0.0 True False d minor 95.06 Rest 3.53 1 1.0 85 0.25 1.0 False False d minor 95.06 ... ... ... ... ... ... ... ... ... C4 73 1098 1.0 60 0.125 10.0 True False C major 522.80 Another issue to be addressed regards the proper encoding for GNNs, as they need their input to be a graph data structure. Following on [20], a graph Gis defined for each single track as a triple (V,E,R), where Vis the set of nodes, Ris the set of edge labels, and E✓V⇥V⇥Ris the set of labelled edges. Nodes correspond to the single notes in a track and the edge labels correspond the following relations between pairs of notes/nodes: consecutive notes, parallel notes, temporal overlap between notes and rest-note transitions. For the creation of these graphs, we employ graphmuse (https: /github.com/manoskary/graphmuse), a Python library for Graph DL on Symbolic Music. Every node in the graph is composed of a feature vector with the following values: [onset beat,duration beat,onset quarter,duration quarter,onset div,duration div,pitch,voice,is downbeat]. These values are extracted through partitura (https://github.com/CPJKU/partitura). Each graph is assigned two graph-level features: key, and tempo. 3.3 Data Cleaning and Encoding In order to guarantee data consistency, the dataset is cleaned by substituting formatting artefacts. For instance, the Tie feature (Table 1) uses False to represent absent connection between notes. String duration values (‘8/3’, ‘1/3’) are translated to numerical representations. Pitches are folded onto octave 4, adhering to the Arab-Andalusian practice [15], and converted to MIDI pitchnumber. Finally, a merged track discovered in Section 3.1 is discarded. Due to class imbalance, we exclude very under-represented classes from classification. For nawba, we keep classes 1–7, 10–13; for ṭāb‘, classes 1, 2, 3, 5, 9, 10, 14, 16, and 18. This ID mapping is given in the metadata from the Zenodo dataset. After this selections, 127 and 136 pieces remain for ṭāb‘ and nawba, respectively. 3.4 Data Augmentation The digital scores in the Arab-Andalusian are relatively few, extremely long and varying in length. Therefore, we augment the data to mitigate class underrepresentation and avoid overfitting by splitting train and test sets piece-wise. We employ the Sliding Window (SW) methodology to segment stream of notes. Proc. of the 17th International Symposium on CMMR, London, UK, Nov. 3-7, 2025 201
6 A. Sellani et al. SW is a common algorithmic approach to process streams of data, for which a moving “window” slides upon the stream processing a subset of the data. SW has been found to yield significant improvements of performance, particularly when used in conjunction with CNNs [12] or Pitch Histograms [3]. We decided upon twelve different stream-segmentation combinations given by the Cartesian product of the overlap set O={0%,10%,30%,50%}and the sequence length set L={256,512,1024}obtaining 12 combinations total. Table 2 illustrates the results yielded by SW data augmentation for overlap 50%. Across all combinations, data augmentation reached a sample increase of around a maximum of 3067% and a minimum of 178%. Table 2: SW augmentation. Increase (%) for sequence lengths, w/ 50% overlap. Ovr. Len. nawba ṭāb‘ Samples Increase Samples Increase 50% 256 4307 3066.91% 3846 2928.35% 512 1792 1217.65% 1482 1038.07% 1024 663 387.50% 591 365.35% Graph wise, data augmentation utilizes graphmuse’s sampling process. Given graph G=(V,E,R), we extract sub-graph G0=(V0,E0,R 0)such that |V0|B, where Bis the sub-graph size parameter s. Thus, sub-graph extraction selects central nodes and samples 3-hop neighbourhoods of decreasing size {s⇥0.6,s⇥ 0.3,s⇥0.1}. The sample increase for sub-graphs is shown in Table 3. Table 3: Graph sub-sampling augmentation. Increase (%) for sub-graph sizes. Sub. Size ṭāb‘ nawba Samples Increase Samples Increase 128 9972 7748.03% 9972 7223.53% 256 6996 5494.49% 6996 5041.18% 3.5 Feature Engineering and Selection Machine Learning methods require features. The GNN-based method leverages the information in the graphs, whereas other learning methods require feature engineering. Following [6], we used features taken from these categories: pitch, rhythm, harmony and timbre. As the MusicXML files in the Arab-Andalusian dataset lack the instrument information, no timbre-related features were extracted. Nonetheless, we extract totally 64 engineered features, listed in the supplementary material, Appendix A, Table 4. Proc. of the 17th International Symposium on CMMR, London, UK, Nov. 3-7, 2025 202
GNN Approaches for Melodic Pattern Analysis in Arab-Andalusian Music 7 4 Methodology Section 4.1 explains the baseline experiment from [15]. Moreover, Section 4.2 presents the general architecture for DL models and the details for Long ShortTerm Memory (LSTM), 1DCNN and GNN. 4.1 Model-based AI This paper builds upon [15], for which a model matching approach was employed for nawba prediction. The baseline experiment was conducted with a total of 77 samples equally distributed across classes. The 12-TET PCD histograms are stretched into 1200 cents. One cent equals 1/100th of a semitone and is a common notation to accurately describe changes in pitch. For each class, a model is generated from the training set. In the original experiment, the Leave One Out (LOO) methodology is employed during cross validation. At every fold one sample per class is left for testing, while other samples are used for training. For each class a model is generated by computing a PCD and applying Gaussian Smoothening. Subsequently, each PCD model of the test set’s samples is classified by evaluating it against the class models generated by the training set using L2 distance [15]. However, in this work, we decide to replicate the experiment using the complete, although class-unbalanced, 136 samples for nawba and 127 samples for ṭāb‘. 4.2 Deep Learning models for Sequence Data We define an abstract DL architecture which takes as input a stream of notes designed according to the model. Otherwise, all DL models treat global features, key embedding and classification layers equally with some parameter changes. 1DCNN Classification layer is slightly different (see supplementary material, Appendix B, Table 6). This deliberate decision was made to fairly evaluate the model’s capabilities to abstract and characterize sections of tracks. Figure 2 illustrates the commonalities in architecture between the DL models: LSTM, 1DCNN and GNN. The upper branch labeled Neural Network for NoteLevel Embedding stands for the model-specific layers which process the temporal notes. That is, LSTM layers for the LSTM Network, 1D Convolutional Layers for the 1DCNN, and SAGEConv layers for the GNN. The Global Context Vector represents the engineered features which are then processed by a Shallow Multilayer Perceptron (MLP). Meanwhile, the key is fed to an Embedding, a dense vector which learns key relationships without assuming an inherent order. Finally, the vectors are concatenated into two Fully Connected Classification Layer which outputs classes’ probabilities. Note that batch normalization is applied only for the GNN and 1DCNN, as Layer Norm was employed for the LSTM model. We employ a Long Short-Term Memory (LSTM) model, an enhanced RNN which replaces the hidden state with a single memory cell composed of three functional gates. Proc. of the 17th International Symposium on CMMR, London, UK, Nov. 3-7, 2025 203
8 A. Sellani et al. Figure 2: General architecture employed for the three specific DL models. Furthermore, we design a 1DCNN inspired by [12]. Three stacked 1D Conv. layers of increasing size elaborate the sequences of notes involving: batch normalization, dropout, activation function (ReLU) and Max Pooling, which is used to reduce the dimensionality of the input by pooling the greatest element block-wise. Finally, we build upon a GNN class of graphmuse to implement a task-specific network. The architecture incorporates both node-level and engineered features which are pooled and concatenated with global features. The model is composed of multiple SAGEConv layers which operate on a shared set of edge type through Hetero Convolution. Each convolution is followed by batch normalization and dropout layers to stabilize training and prevent over fitting. Across all DL models, we use decreasing learning rate to prevent the model from getting stuck in local minima, with weight decay and dropout to prevent over fitting. Finally, we use class-balanced Cross Entropy. The details of the models’ architectures along with their training parameters are listed in the supplementary material, Appendix B, Tables 5 - 9. 5 Evaluation The experiments aim at showing the differences at nawba and ṭāb‘ classification between the baseline [15] (modified to classify also ṭubū‘), traditional Machine (Deep) Learning methods and GNNs. The Jupyter Notebooks to replicate the experiments are available on GitHub (https://github.com/aleski017/ tab-nawba-symbolic_recognition). 5.1 Experimental Setup and Baseline Results The data is split into training and test sets based on the track prefix ID to prevent data leakage. This ensures that no sections from the same track appear in both the training and test sets as tracks can have choruses, or repeated Proc. of the 17th International Symposium on CMMR, London, UK, Nov. 3-7, 2025 204
GNN Approaches for Melodic Pattern Analysis in Arab-Andalusian Music 9 Table 4: Baseline Classification Performance. Model Prec Rec F1 nawba (Original) 78.9 75.3 74.2 ṭāb‘ (Weighted) 71.3 71.6 71.3 nawba (Weighted) 72.8 72.1 71.6 motifs happening throughout. The experiments used Grid Search for parameter tuning and cross-validated to ensure robust results. We employ k-fold for KNearest Neighbors (KNN), Random Forest Classifier (RF) and Support Vector Machine (SVM), while Monte Carlo Cross Validation (MCCV) for Deep Learning (DL) models as trade-off between computational costs and efficiency [18]. High dropout and weight decay was employed to prevent overfitting. To set a baseline, we use the template matching strategy described in 4.1 to also perform ṭāb‘ detection. The metrics are computed based on weightedaveraging. Table 4 shows the performances achieved by [15] for the evenlydistributed training set (first row), and the results with class distribution stated in Section 3.3 (second and third row). 5.2 Results for Traditional ML models Firstly, KNN delivers surprisingly strong classification results, achieving the highest F1 score of 86.6 for ṭāb‘, while nawba classification is slightly less accurate at 85.8. Furthermore, the sequence length and overlap have minimal impact on performance. The accuracy slightly declines as kincreased. Instead, RF is sensitive to overlap, with shorter sequences leading to better performance. However, it performs noticeably worse than KNN for both ṭāb‘ and nawba classification tasks, with maximum F1 scores of 82.6 and 82.5 respectively. Finally, Support Vector Classifier (SVC) with a radial basis function kernel shows similar results to KNN, achieving maximum F1 scores of 85.6 for ṭāb‘ and is surprisingly better for nawba classification, reaching F1 at 86.9. Similar to KNN, higher overlap slightly improves accuracy, while sequence length has little to no effect. 5.3 Results for Deep Learning models For 1DCNN, the best F1 score for ṭāb‘ is 87.0%, whereas nawba caps at 83.3%. Sequence lengths of 256 and 512 yield superior performance, while 1024 tends to reduce model effectiveness. High overlap consistently improves results, as the best configuration for both classification tasks is achieved at 50% overlap. The LSTM model for both classification tasks demonstrates high sensitivity to longer sequences, benefiting from its ability to capture long-term dependencies. Overlap impact does not display any significant pattern. For ṭāb‘, the highest F1 score is observed at 10% overlap and 1024-length sequences, with an F1 of 85.8%. For nawba, the best result is obtained at 50% overlap and 1024length sequences, with an F1 of 85.4%. The GNN model surpasses both the Proc. of the 17th International Symposium on CMMR, London, UK, Nov. 3-7, 2025 205