[Paper Review] Deep Metric Learning with Spherical Embedding
This paper proposes Spherical Embedding Constraint (SEC), a novel regularization method that adaptively reduces the variance of embedding norms in deep metric learning, ensuring embeddings lie on the same hypersphere. By stabilizing gradient updates during training, SEC improves direction-based optimization, leading to significant performance gains across face recognition, deep metric learning, and self-supervised learning benchmarks.
Deep metric learning has attracted much attention in recent years, due to seamlessly combining the distance metric learning and deep neural network. Many endeavors are devoted to design different pair-based angular loss functions, which decouple the magnitude and direction information for embedding vectors and ensure the training and testing measure consistency. However, these traditional angular losses cannot guarantee that all the sample embeddings are on the surface of the same hypersphere during the training stage, which would result in unstable gradient in batch optimization and may influence the quick convergence of the embedding learning. In this paper, we first investigate the effect of the embedding norm for deep metric learning with angular distance, and then propose a spherical embedding constraint (SEC) to regularize the distribution of the norms. SEC adaptively adjusts the embeddings to fall on the same hypersphere and performs more balanced direction update. Extensive experiments on deep metric learning, face recognition, and contrastive self-supervised learning show that the SEC-based angular space learning strategy significantly improves the performance of the state-of-the-art.
Motivation & Objective
- To investigate the impact of embedding norm distribution on angular distance optimization in deep metric learning.
- To address the instability in gradient updates caused by large variance in embedding norms during batch optimization.
- To improve the balance of direction updates in angular loss functions by constraining embeddings to lie on a common hypersphere.
- To enhance the generalization and convergence of state-of-the-art deep metric learning models without modifying the loss architecture.
Proposed method
- Proposes Spherical Embedding Constraint (SEC), which adaptively adjusts the L2 norms of embeddings in each mini-batch to reduce variance.
- SEC normalizes all embeddings in a mini-batch to have a common norm equal to the average of their L2 norms, promoting uniformity on a hypersphere.
- The method operates as a lightweight, differentiable regularization layer applied after the final embedding layer, without requiring architectural changes.
- SEC is integrated with existing pair-based angular loss functions (e.g., triplet, N-pair, multi-similarity) to improve training stability and performance.
- The constraint is applied during backpropagation, ensuring gradient updates are balanced across samples with varying initial norms.
- The approach avoids fixing the norm to a constant value, instead allowing adaptive normalization that preserves model flexibility.
Experimental results
Research questions
- RQ1How does the distribution of embedding norms affect gradient stability and optimization efficiency in angular metric learning?
- RQ2Can reducing the variance of embedding norms improve the performance of state-of-the-art angular loss functions in deep metric learning?
- RQ3Does enforcing embeddings to lie on a common hypersphere lead to more balanced direction updates and faster convergence?
- RQ4To what extent does SEC improve performance across diverse tasks such as face recognition and self-supervised learning?
- RQ5How does SEC compare to other regularization techniques like L2 normalization in terms of generalization and robustness?
Key findings
- SEC significantly reduces the variance of embedding norms during training, as shown in Figure 1, where norm distributions become much tighter compared to standard angular losses.
- On the CUB200-2011 and Cars196 datasets, SEC improves triplet loss performance by up to 1.5% in top-1 accuracy, with consistent gains across all evaluation metrics.
- In face recognition on LFW, MegaFace, and CFPFP, SEC boosts the best-performing Arcface model to 99.35% accuracy (vs. 99.32% without SEC), with further gains in larger distractor sets.
- On the CIFAR-10 and CIFAR-100 datasets under SimCLR self-supervised learning, SEC increases linear evaluation top-1 accuracy by 0.21–0.30 points compared to baseline NT-Xent.
- The combination of SEC with multi-similarity loss achieves 99.35% accuracy on MegaFace with 10^6 distractors, outperforming both the base model and L2-regularized variants.
- SEC consistently improves performance across all evaluated loss functions and datasets, demonstrating generalizability and robustness in diverse deep metric learning setups.
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.