DSCH-Loss: A Dynamic Semantic Channel Objective for Deep Semantic Hashing

2026-07-27Artificial Intelligence

Artificial IntelligenceComputer Vision and Pattern RecognitionInformation Retrieval
AI summary

The authors developed a new way to create short binary codes that help quickly find similar items in large, complex datasets by improving semantic hashing. They designed a new loss function called Dynamic Semantic Channel Hashing (DSCH) that avoids optimization problems seen in older methods by adjusting channel sizes dynamically. They also recommend a special evaluation metric, tie-aware Mean Average Precision, to fairly measure retrieval accuracy when multiple items have the same hash code distance. Testing on different datasets and models, their DSCH approach consistently outperformed previous methods in finding similar items across and within data types.

semantic hashingbinary hash codesapproximate nearest neighbordeep learningloss functionHamming spacecross-modal retrievalMean Average Precisionoptimizationdynamic semantic channels
Authors
Tobias J. Bauer, Christian Riess, Daniel Loebenberger, Christian Bergler
Abstract
Semantic hashing methods for generating short binary hash codes that allow efficient approximate nearest neighbor search in high-dimensional data spaces have gained extensive consideration in recent years. Deep learning-based methods offer better semantic capturing capabilities than traditional approaches relying on manual feature engineering. Moreover, they enable a data-driven approach to semantic hashing across diverse data modalities, yielding high-quality cross-modal hash codes within a shared Hamming space. Previous work investigated the properties of this Hamming space and introduced a loss function based on predefined so-called semantic channels with fixed width and Hamming distances derived from label similarities. However, this formulation also introduced discontinuities into the loss landscape, complicating optimization. Based on these observations, we propose a newly designed loss function, Dynamic Semantic Channel Hashing (DSCH), using dynamically sized and positioned semantic channels in order to avoid loss landscape discontinuities. Furthermore, we endorse the use of tie-aware Mean Average Precision (mAP) as evaluation metric as it addresses the ambiguity in sample retrieval ordering, which emerges from the discreteness of hash code distances. Finally, multiple experimental settings conducted on two popular datasets and incorporating two different model architectures provide strong evidence that training using the DSCH objective outperforms training using other state-of-the-art loss functions. In a total of 35 out of 40 cross-modal and intra-modal retrieval tasks, models trained with DSCH achieve significantly higher tie-aware mAP scores across all four tested hash code lengths, showing compelling results across model architecture and used dataset. The mAP score uplifts are consistent and amount up to 1.75 percentage points compared to the respective second best.