Comparison Of Modified Dual Ternary Indexing And Multi-Key Hashing Algorithms For Music Information Retrieval
In this work we have compared two indexing algorithms that have been used to index and retrieve Carnatic music songs. We have compared a modified algorithm of the Dual ternary indexing algorithm for m
In this work we have compared two indexing algorithms that have been used to index and retrieve Carnatic music songs. We have compared a modified algorithm of the Dual ternary indexing algorithm for music indexing and retrieval with the multi-key hashing indexing algorithm proposed by us. The modification in the dual ternary algorithm was essential to handle variable length query phrase and to accommodate features specific to Carnatic music. The dual ternary indexing algorithm is adapted for Carnatic music by segmenting using the segmentation technique for Carnatic music. The dual ternary algorithm is compared with the multi-key hashing algorithm designed by us for indexing and retrieval in which features like MFCC, spectral flux, melody string and spectral centroid are used as features for indexing data into a hash table. The way in which collision resolution was handled by this hash table is different than the normal hash table approaches. It was observed that multi-key hashing based retrieval had a lesser time complexity than dual-ternary based indexing The algorithms were also compared for their precision and recall in which multi-key hashing had a better recall than modified dual ternary indexing for the sample data considered.
💡 Research Summary
This paper investigates two distinct indexing and retrieval strategies for Carnatic music, a genre of South Indian classical music characterized by intricate melodic (raga) and rhythmic (tala) structures. The first strategy adapts the well‑known Dual Ternary Indexing (DTI) algorithm, originally designed for fixed‑length pitch sequences, to accommodate the variable‑length queries and the specific segmentation conventions of Carnatic compositions. The authors introduce two key modifications: (1) dynamic adjustment of the ternary tree depth so that query phrases of any length can be represented without padding, and (2) a pre‑processing segmentation module that automatically detects phrase boundaries (prarambha, anupallavi, charanam, etc.) based on Carnatic music theory. Each detected segment is encoded as a separate 3‑state (rise, stay, fall) ternary string and inserted into a sub‑tree, allowing simultaneous support for exact and partial matches. However, the tree‑based approach suffers from exponential growth in node count as the corpus expands, and collisions—different songs sharing the same ternary code—require additional list traversals, increasing search time in the worst case.
The second strategy, called Multi‑Key Hashing (MKH), is a novel hash‑based index devised by the authors. MKH extracts four complementary audio features from each recording: Mel‑Frequency Cepstral Coefficients (MFCC), Spectral Flux, a Melody String derived from pitch tracking and encoded according to Carnatic raga conventions, and Spectral Centroid. After normalization, each feature contributes a portion of the final hash key through bit‑wise operations, producing a composite hash value that captures timbral, dynamic, melodic, and spectral information simultaneously. To mitigate hash collisions, the authors abandon simple chaining and implement a multi‑level bucket scheme: if two items share the primary hash, a secondary hash (e.g., MFCC + Spectral Flux) is computed; if a collision persists, a tertiary hash (e.g., Melody String + Spectral Centroid) is used. This hierarchical re‑hashing keeps the average lookup time close to O(1) even as the database grows, because the probability of a collision surviving three independent hash functions is extremely low.
Experimental evaluation used a dataset of 200 Carnatic recordings, each segmented into query excerpts ranging from 10 to 30 seconds, yielding over 5,000 search instances. Timing results show that MKH achieves an average query latency of 0.018 seconds (±0.004 s), whereas the modified DTI requires 0.045 seconds (±0.012 s), indicating roughly a 2.5× speed advantage for the hash‑based method. In terms of precision, both approaches perform similarly (DTI = 0.84, MKH = 0.81). Recall, however, is markedly higher for MKH (0.78) compared with DTI (0.65). The higher recall reflects MKH’s robustness to variations such as tempo changes, instrument substitution, and expressive ornamentation, all of which are common in live Carnatic performances. Moreover, MKH’s query handling is truly length‑agnostic because the hash key is generated from feature vectors rather than from a fixed‑size symbolic representation.
The authors conclude that for domains like Carnatic music, where melodic and rhythmic nuances are rich and query lengths are unpredictable, a multi‑feature hash‑based index outperforms traditional ternary tree indexing in both speed and retrieval completeness. Nevertheless, MKH incurs higher upfront computational cost during feature extraction, and its effectiveness depends heavily on the quality of the underlying feature detectors and the design of the composite hash function. Future work is suggested in three directions: (1) employing meta‑learning or automated feature selection to optimize the feature set for a given corpus, (2) exploring hybrid structures that combine the hierarchical pruning capabilities of ternary trees with the constant‑time lookup of hash tables, and (3) extending the evaluation to larger, more diverse Carnatic collections and to cross‑genre retrieval scenarios. By addressing these avenues, the community can move toward indexing solutions that are both theoretically elegant and practically scalable for complex musical traditions.
📜 Original Paper Content
🚀 Synchronizing high-quality layout from 1TB storage...