# Melodic Similarity and Applications Using Biologically-Inspired Techniques
## 4 Multiple Sequence Alignment Quality for Melodic Sequences  
This paper's main approach on modelling melodic similarity relies on capturing the variation among two or more perceived-as-similar melodies. For that we need trustworthy, \"meaningful\" alignments of related music sequences, such that the statistical properties of the alignment can inform us about the note-to-note relationships. Since such data can be hard to find, we are required to align related sequences using alignment algorithms. Alignment, pairwise or otherwise, with notable exceptions [63; 64] has been typically used as an out-of-the-box tool to align instances of music sequences, with the sole purpose of using its score output further in a retrieval pipeline. The quality or musical appropriateness of the alignment of symbols themselves has always been evaluated via a proxy, i.e., some kind of music retrieval scenario. As long as the alignment-pipeline outperformed other approaches, its utility was considered significant. The major problem however, is that outside the proxy strategy, there are no studies or musical intuition to prefer one alignment over the other. Identifying the features that make a \"good\", meaningful alignment is an intricate task, not only for musical but biological sequences as well. Interestingly, proteins are folded into diverse and complex three-dimensional structures. Structure motifs (not to be confused with the homonym musical concept) \begin{table}
\begin{tabular}{c c c} \hline \hline
**Summary statistics** & TuneFam-26 & **Csv-60** \\ \hline Number of cliques & 26 & 60 \\ Clique Size median (var) & 13.0 (4.016) & 4.0 (1.146) \\ Sequence Length median (var) & 43.0 (15.003) & 26.0 (10.736) \\ AUC PID & 0.84 & 0.94 \\ Alphabet Size & 22 & 22 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Summary statistics for the datasets considered in our work. We also present the Area Under the Curve (AUC) value for the Receiver Operating Characteristic curve (ROC) on the Percentage Sequence Identity (PID). Given two aligned sequences, the PID score is simply the number of identical positions in the alignment divided by the number of aligned positions [62]. The higher the AUC PID the more similar the sequences are in a clique compared to the whole dataset. It should be noted that the alphabet size presented corresponds to the number of unique symbols appearing in the dataset. diverge slower in the evolutionary time scale than sequences, and consequently homology detection among highly divergent sequences is easier in the structural than the sequence domain, though the actual algorithms for three-dimensional shape alignment are complex. As such, structure motifs have been used to aid the alignment of highly-divergent sequences [65]. In addition, reference alignments produced from biological information, such as a conserved structure, have been frequently used to assess the quality of an MSA [66]. We argue that similar to biological sequences, a \"good\" meaningful alignment of musical significance, can be only evaluated via a trustworthy reference alignment. Previous related work [67] generated \"trustworthy\" alignments of the Csv-60 set by using a progressive alignment algorithm extended on three musical dimensions (pitch, onset, duration). [PERSON] and [PERSON]'s choice was based largely on intuition, since there is no literature supporting those three dimensions. [PERSON] and [PERSON] [64] investigated the evaluation of music alignment by using solely triplets of recordings of the same piece and made clear that there are theoretical considerations of alignment quality-assessment without a reference alignment. Therefore, the question becomes whether there exists a musical analogy to the protein structure motifs. In musicology shared, transformed but yet recognizable musical patterns are called \"variations\" and according to musicological and cognitive studies, variations are essential to the human perception of music similarity [2].