# Music Similarity Detection Through Comparative Imagery Data
## 2 Methods
### Information-Theoretical Reasoning  
In information theory, a function or a process is referred to as a transformation, which we denote as \(P\) here. The set of all possible data that \(P\) can receive is referred to as an input alphabet and the set of all possible data that \(P\) can produce is an output alphabet. As illustrated in Figure 1a, the two alphabets are denoted as \(\mathbb{Z}_{in}\) and \(\mathbb{Z}_{out}\), respectively. When a machine learning (ML) model is used to determine whether two pieces of music are similar, \(P\) is the model, \(\mathbb{Z}_{in}\) consists of all possible pairs of music to be compared, and \(\mathbb{Z}_{out}\) consists of all possible decisions that the model may produce. Typically, a model may return a similarity judgment in two or a few levels. Hence, the entropy of the output alphabet, \(\mathcal{H}(\mathbb{Z}_{out})\), is no more than 3 bits for eight or fewer levels. Meanwhile, the informative space for all possible pairs of music is huge, and the entropy of the input alphabet, \(\mathcal{H}(\mathbb{Z}_{in})\), is very high. Hence, \(\mathcal{H}(\mathbb{Z}_{in})\gg\mathcal{H}(\mathbb{Z}_{out})\) and the model incurs a huge entropy loss. As [PERSON] and [PERSON] observed, such entropy loss is ubiquitous in most (if not all) decision workflows [13]. If the entropy reduction (measured as alphabet compression) is too much and too fast by an unreliable transformation, decision errors are more likely (measured as potential distortion) [13]. In practice, a common approach to address the high level of decision errors is to decompose a complex transformation \(P\) into a series of less complex transformations, \(P_{1},P_{2},\ldots,P_{n}\), where entropy is reduced gradually as illustrated in Figure 1b. For some intermediate transformations, humans can inject more knowledge in developing better algorithms, models, software, etc. For some intermediate alphabets, humans can visualize and interpret intermediate data, gaining confidence about the workflow. In essence, explainable AI is facilitated by such workflow decomposition. Figure 1a can also represent an ML workflow, where \(\mathbb{Z}_{out}\) consists of all possible models that may be learned using the training and testing process \(P\). The initial search space for the optimal model in \(\mathbb{Z}_{out}\) is huge (i.e., it has very high initial entropy), but the process \(P\) uses the input data (or its statistics) as constraints to narrow down the search space iteratively, and in effect, change its probability of each model in the space so as to be found as the optimal model. The change in the probabilities in the search space reduces the entropy of \(\mathbb{Z}_{out}\). When the input data are scarce, \(P\) does not have reliable statistics or invoke a sufficient number of iterations to change the probability of each model in the space appropriately, resulting in an unreliable model being found at the end of the process. As discussed in Section 1, for music similarity detection, data scarcity is a major challenge. Therefore, instead of training a complex model that detects similarity directly from music signals, we adopted the common approach to reduce entropy gradually by decomposing both the model development and model deployment workflows as shown in  
Figure 1: From an information-theoretic perspective, decomposing a single complex process in (**a**) into a series of less complex processes in (**b**) facilitates gradual entropy reduction. This allows humans to inject more knowledge, which may not be in the data, into the development of each component processes, while enabling humans to visualize and interpret the intermediate data during the deployment. The decomposed workflow in (**c**) enables gradual entropy reduction in music similarity detection, addressing the challenge of data scarcity as well as facilitating explainable AI. The bottom part of (**c**) shows that other machine- or human-centric processes, including some future technology, can be integrated through the ensemble decision process. Figure 1c.