# Music Similarity Detection Through Comparative Imagery Data
## 2 Methods
### Method 2: Similarity Visualization  
Data visualization has been used in text similarity detection (e.g., [17]) as well as in developing ML models for music applications (e.g., [18]). Data visualization played three roles in this work. Firstly, visualization allowed us to observe how much a feature may be relevant to music similarity detection and prioritize computational resources for harvesting training and testing data for developing ML models. In Section 3, we present and analyze the results of our experimentation on features with the aid of such visualization. Secondly, the comparative imagery used to depict feature similarity was used for training and testing ML models. We will describe this in detail in the next subsection. Thirdly, whenever an ML model or an ensemble decision process produced a decision, we found it useful to use visualization to help interpret the decision. In some cases, visualization helped us to identify possible causes of erroneous decisions, and in many cases, visualization enabled us to explain why the decision was reached, gaining confidence about the validity of the workflow. Figure 2 shows three heatmap visualizations, where the \(x\) and \(y\) axes correspond to the temporal sequences of two songs, respectively. In this work, we compare two music pieces in the unit of a bar. The three songs have 116 (Under Pressure), 113 (Ice Ice Baby), and 91 (Bitter Sweet Symphony) bars, respectively. The color of each cell indicates the level of similarity between the \(x\)-th bar of one song and the \(y\)-th bar of the other. The computed similarity level is in the range of [0, 1], and it is encoded using a continuous colormap, with a bright yellow color (RGB: 253, 231, 37) for 1 and dark purple (RGB: 68, 1, 84) for 0. The in-between colors are linearly interpolated. As shown in the legend on the right, bright yellow or green colors indicate high similarity while dark purple or blue indicate dissimilarity. In Figure 2a, we can easily observe the strong self-similarity along the diagonal line when the song \"Under Pressure \(\blacktriangleright\)\" by Queen and [PERSON] ([[https://github.com/asaner7/imagery-music-similarity/blob/main/songs-in-paper/UnderPressure_mp3.mp3](https://github.com/asaner7/imagery-music-similarity/blob/main/songs-in-paper/UnderPressure_mp3.mp3)]([https://github.com/asaner7/imagery-music-similarity/blob/main/songs-in-paper/UnderPressure_mp3.mp3](https://github.com/asaner7/imagery-music-similarity/blob/main/songs-in-paper/UnderPressure_mp3.mp3)), accessed on 30 May 2025) is compared with itself. Meanwhile, we can also observe smaller similarity patterns in other temporal regions. In Figure 2b, \"Under Pressure\" is compared with \"Ice Ice Baby \(\blacktriangleright\)\" by Vanilla Ice ([[https://github.com/asaner7/imagery-music-similarity/blob/main/songs-in-paper/IceleBaby_mp3.mp3](https://github.com/asaner7/imagery-music-similarity/blob/main/songs-in-paper/IceleBaby_mp3.mp3)]([https://github.com/asaner7/imagery-music-similarity/blob/main/songs-in-paper/IceleBaby_mp3.mp3](https://github.com/asaner7/imagery-music-similarity/blob/main/songs-in-paper/IceleBaby_mp3.mp3)), accessed on 30 May 2025). \"Ice Ice Baby\" is part of a well-documented plagiarism lawsuit, the verdict of which confirmed that Vanilla Ice had copied the guitar riff of \"Under Pressure\" in his song. From the heatmap visualization, we can observe patterns of similarity in some temporal regions as well as dissimilarity in other regions. In Figure 2c, \"Under Pressure\" is compared with \"Bitter Sweet Symphony \(\blacktriangleright\)\" by the Verve ([[https://github.com/asaner7/imagery-music-similarity/blob/main/songs-in-paper/BitterSweet](https://github.com/asaner7/imagery-music-similarity/blob/main/songs-in-paper/BitterSweet)]([https://github.com/asaner7/imagery-music-similarity/blob/main/songs-in-paper/BitterSweet](https://github.com/asaner7/imagery-music-similarity/blob/main/songs-in-paper/BitterSweet)) Symphony.mp3, accessed on 30 May 2025). There is no documented similarity between the two songs.