[Paper Review] Instance Cross Entropy for Deep Metric Learning
This paper proposes Instance Cross Entropy (ICE), a novel loss function for deep metric learning that models instance-level matching probabilities using a probabilistic interpretation, enabling scalability to infinite classes and improved generalization. ICE achieves state-of-the-art performance on three benchmarks, outperforming existing methods including complex mining-based approaches, by integrating seamless sample reweighting without explicit data truncation.
Loss functions play a crucial role in deep metric learning thus a variety of them have been proposed. Some supervise the learning process by pairwise or tripletwise similarity constraints while others take advantage of structured similarity information among multiple data points. In this work, we approach deep metric learning from a novel perspective. We propose instance cross entropy (ICE) which measures the difference between an estimated instance-level matching distribution and its ground-truth one. ICE has three main appealing properties. Firstly, similar to categorical cross entropy (CCE), ICE has clear probabilistic interpretation and exploits structured semantic similarity information for learning supervision. Secondly, ICE is scalable to infinite training data as it learns on mini-batches iteratively and is independent of the training set size. Thirdly, motivated by our relative weight analysis, seamless sample reweighting is incorporated. It rescales samples' gradients to control the differentiation degree over training examples instead of truncating them by sample mining. In addition to its simplicity and intuitiveness, extensive experiments on three real-world benchmarks demonstrate the superiority of ICE.
Motivation & Objective
- To address the limitations of existing deep metric learning loss functions, particularly their lack of scalability to infinite classes and reliance on heuristic sample mining.
- To develop a loss function that leverages structured similarity information among multiple instances in a mini-batch for improved supervision.
- To eliminate the need for distance margin constraints and explicit sample mining by introducing a differentiable, gradient-based reweighting mechanism.
- To achieve strong performance on real-world benchmarks without assuming fixed intraclass variance or interclass boundaries.
Proposed method
- ICE formulates deep metric learning as instance-level softmax regression, minimizing cross entropy between predicted and ground-truth instance-level matching distributions.
- The method projects features onto a unit hypersphere, enabling angular embedding space learning without explicit margin constraints.
- A single weight scaling hyper-parameter $ s $ controls the differentiation degree among samples by rescaling gradients, emulating sample mining without data truncation.
- The reweighting mechanism is derived from relative weight analysis between pairs of examples, dynamically emphasizing harder samples when $ s $ increases.
- ICE does not learn class-level proxies, making it inherently scalable to infinite training classes.
- The loss function is trained end-to-end using standard backpropagation with no additional components beyond the weight scaling parameter.
Experimental results
Research questions
- RQ1Can a probabilistic, instance-level matching formulation improve deep metric learning performance while remaining scalable to infinite classes?
- RQ2How can structured similarity information among multiple instances in a mini-batch be effectively leveraged for supervision without relying on pairwise or triplet constraints?
- RQ3Can gradient reweighting replace explicit sample mining in deep metric learning, and if so, how does it compare in performance and complexity?
- RQ4Does eliminating distance margin constraints lead to better generalization, especially in datasets with unknown or variable intraclass variance?
Key findings
- ICE achieves the best Recall@1 performance on all three real-world benchmarks: SOP, CUB-200-2011, and Cars-196, with 77.3% on SOP.
- The performance of ICE is comparable to the state-of-the-art RLL method (78.2% Recall@1 on SOP), but with significantly fewer hyperparameters and a simpler design.
- When $ s = 80 $, performance drops significantly, indicating that overemphasizing extremely hard samples (e.g., outliers) harms learning, highlighting the need for controlled reweighting.
- ICE outperforms standard CCE fine-tuned on ImageNet by a large margin, demonstrating that CCE is unsuitable for DML due to its class-level proxy learning and lack of scalability.
- The t-SNE visualization in the supplementary material confirms that ICE learns more compact and well-separated embeddings than baseline methods.
- ICE is the only method among those evaluated with a clear probabilistic interpretation that maximizes joint instance-level matching probability, unlike most SOTA methods.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.