Skip to main content
QUICK REVIEW

[论文解读] One Loss for All: Deep Hashing with a Single Cosine Similarity based Learning Objective

Jiun Tian Hoe, Kam Woh Ng|arXiv (Cornell University)|Sep 29, 2021
Advanced Image and Video Retrieval TechniquesComputer Science被引用 48
一句话总结

论文提出 OrthoHash,一种深度哈希模型,使用单一基于余弦相似度的目标函数来联合实现判别哈希码和最小化量化误差,具备用于码平衡的 BN 和用于多标签的标签平滑。

ABSTRACT

A deep hashing model typically has two main learning objectives: to make the learned binary hash codes discriminative and to minimize a quantization error. With further constraints such as bit balance and code orthogonality, it is not uncommon for existing models to employ a large number (>4) of losses. This leads to difficulties in model training and subsequently impedes their effectiveness. In this work, we propose a novel deep hashing model with only a single learning objective. Specifically, we show that maximizing the cosine similarity between the continuous codes and their corresponding binary orthogonal codes can ensure both hash code discriminativeness and quantization error minimization. Further, with this learning objective, code balancing can be achieved by simply using a Batch Normalization (BN) layer and multi-label classification is also straightforward with label smoothing. The result is an one-loss deep hashing model that removes all the hassles of tuning the weights of various losses. Importantly, extensive experiments show that our model is highly effective, outperforming the state-of-the-art multi-loss hashing models on three large-scale instance retrieval benchmarks, often by significant margins. Code is available at https://github.com/kamwoh/orthohash

研究动机与目标

  • 通过将目标统一为一个学习信号来简化深度哈希优化的动机。
  • 展示通过最大化连续码与二元正交目标之间的余弦相似性可以实现判别性和量化最小化。
  • 证明通过 Batch Normalization 可以实现码平衡,并且在单一损失中使用标签平滑来进行多标签学习。
  • 在大规模类别级和实例级检索基准上评估所提方法,以确立最先进的性能。

提出的方法

  • 将哈希重新表述为在交叉熵损失下,最大化连续码与二元正交目标之间的余弦相似性。
  • 对连续码进行 L2 归一化,使余弦相似性支配检索和量化行为。
  • 使用二元正交目标(Hadamard 风格)以最大化类间汉明距离。
  • 引入标签平滑以将交叉熵适应多标签设置。
  • 在连续码之后添加 Batch Normalization 层以在不增加额外损失项的情况下实现码平衡。
  • 可选地应用余弦或角度边距以收紧类内方差(受 CosFace/ArcFace 启发)。

实验结果

研究问题

  • RQ1单一基于余弦相似度的目标是否能够在不需要多损失项的情况下同时确保哈希码的判别性和较低的量化误差?
  • RQ2二元正交目标和 BN 如何影响码平衡及在类别级和实例级任务上的检索性能?
  • RQ3在多标签哈希中,余弦/角度边距和标签平滑的影响如何?
  • RQ4提出的 OrthoHash 变体是否在大规模基准测试上超越最先进的多损失哈希方法?

主要发现

  • OrthoCos+BN 与 OrthoArc+BN 在 ImageNet100、NUS-WIDE 和 MS-COCO 的类别级检索上达到与最先进结果相近的表现。
  • 在大规模实例级检索(GLDv2、R@Oxf Hard、R@Paris Hard)中,OrthoCos+BN 在三个数据集和测试的所有比特长度上均超过先前的深度哈希方法,且提升显著(例如对 128 位码,最高可提升 0.6%、9.1%、17.1%)。
  • 通过 Batch Normalization 实现码平衡在各数据集和比特长度上比基线 CE 基模型带来显著提升(5-20%)。
  • 在大多数设置中,余弦边距比角度边距提供略微的增益。
  • 在连续码之后使用 BN 使端到端训练成为可能,而不需要修改计算图,简化优化。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。