## 3. Shingle-Based Retrieval Scenario  
Closely following [PERSON] and [PERSON] [12], we now formalize the shingle-based retrieval strategy used in this paper. Given a short fragment of a music recording as a query, the goal is to retrieve all versions (documents) of the same piece of music underlying the query. To this end, we compare the database and query recordings based on a particular feature representation. The retrieval result for a query is given as a ranked list of documents. Figure 1 illustrates this general procedure. In the following, we explain the feature computation as well as the retrieval approach. Our approach is based on so-called \"shingles\" [9], which are short sequences of feature vectors. We denote such a shingle of feature dimension \(F\in\mathbb{N}\) and fixed length \(L\in\mathbb{N}\) by \(\mathcal{S}\in\mathbb{R}^{F\times L}\). In general, we generate such shingles from audio recordings, which are represented by longer feature sequences of variable length. The feature sequence of an audio recording is denoted by \(\mathbf{C}=(\mathbf{c}_{1},\dots,\mathbf{c}_{N})\) of length \(N\in\mathbb{N}\) and consists of feature vectors \(\mathbf{c}_{n}\in\mathbb{R}^{F}\) for \(n\in\{1,\dots,N\}\). We use chroma-based audio features, which measure local energy distributions of the audio recording in the \(F=12\) chromatic pitch class bands [7] (Chapter 3). More precisely, we use a variant called CENS (chroma energy distribution normalized statistics) [43], which are chroma features with post-processing that makes them more suited for retrieval: First, each chroma vector is \(\ell^{1}\)-normalized. Then, the resulting values of the chroma features are quantized in a logarithmic way (by mapping logarithmically spaced value ranges to integer values, e.g., values between 0.05 and 0.1 are mapped to to 1, values between 0.1 and 0.2 to 2, etc.). Next, the chroma feature sequence is temporally smoothed (using a smoothing length of 4 s) and downsampled (from 10 Hz to 1 Hz). Finally, each chroma vector is \(\ell^{2}\)-normalized. The most important aspect of this post-processing is the temporal smoothing, because it makes the features more robust against tempo differences. This chroma variant is state-of-the-art for the given task [12]. The upper part of Figure 2 shows a visualization of the feature type used in this paper. To generate shingles of length \(L<N\) from the feature sequence \(\mathbf{C}\), we use a hop size \(H\in\mathbb{N}\) to define the subsequences  
\[\mathbf{C}_{n}^{L,H}\coloneqq(\mathbf{c}_{(n-1)H+1},\dots,\mathbf{c}_{(n-1)H+L}) \tag{1}\]  
for \(n\in\{1,\dots,\lfloor\frac{N-L}{H}\rfloor+1\}\), where \(\lfloor\cdot\rfloor\) denotes the floor operation. The resulting subsequences can also be regarded as matrices or shingles \(\mathbf{C}_{n}^{L,H}\in\mathbb{R}^{F\times L}\). For brevity, we will omit the superscript \(H\) in the case of \(H=1\). See the lower part of Figure 2 for such a sequence of overlapping shingles. We now describe the retrieval approach for a fixed query (denoted as Q) and database document (denoted as D). For now, the query consists of a single shingle \(\mathcal{S}^{\mathcal{Q}}\in\mathbb{R}^{F\times L}\). Previous investigations of  
Figure 2. Schematic overview of the shingle generation process: A set of overlapping shingles \(\mathcal{S}^{\mathcal{D}}\) is generated from the feature sequence of document D.  
the query length found that a length of \(20\,\mathrm{s}\) is well suited for performing the retrieval with a single audio shingle [12]. In our study, we use such a shingle length, resulting in a shingle dimensionality of \(F\times L=12\times 20=240\). The document D is represented by a set of shingles  
\[\mathbb{S}^{\text{D}}=\big{\{}\mathbf{C}_{n}^{L}:n\in\{1,\dots,N-L+1\}\big{\}}. \tag{2}\]  
This set \(\mathbb{S}^{\text{D}}\) consists of all subsequences \(\mathbf{C}_{n}^{L}\) from the audio recording of document D (as defined in Equation (1)), generated with a hop size \(H=1\).