[Paper Review] Contrastive-center loss for deep neural networks
This paper proposes contrastive-center loss, a novel auxiliary loss for deep neural networks that enhances feature discriminability by jointly optimizing intra-class compactness and inter-class separability. By penalizing distances to class centers and non-corresponding class centers, it improves performance on image classification and face recognition without requiring pre-selected triplets or pairs, achieving state-of-the-art results on CIFAR-10 and LFW.
The deep convolutional neural network(CNN) has significantly raised the performance of image classification and face recognition. Softmax is usually used as supervision, but it only penalizes the classification loss. In this paper, we propose a novel auxiliary supervision signal called contrastivecenter loss, which can further enhance the discriminative power of the features, for it learns a class center for each class. The proposed contrastive-center loss simultaneously considers intra-class compactness and inter-class separability, by penalizing the contrastive values between: (1)the distances of training samples to their corresponding class centers, and (2)the sum of the distances of training samples to their non-corresponding class centers. Experiments on different datasets demonstrate the effectiveness of contrastive-center loss.
Motivation & Objective
- To address the limitation of standard softmax loss, which only optimizes classification accuracy without explicitly enforcing feature compactness or separability.
- To overcome the shortcomings of center loss, which improves intra-class compactness but ignores inter-class separability.
- To develop a training signal that simultaneously enhances both intra-class compactness and inter-class separability in deep features.
- To design a loss function that is simple to implement and does not require pre-selection of training triplets or pairs, unlike contrastive or triplet loss.
- To empirically validate the effectiveness of the proposed loss on benchmark datasets for image classification and face recognition.
Proposed method
- The contrastive-center loss is defined as the sum of two components: (1) the average distance from each sample to its corresponding class center, and (2) the sum of distances from each sample to all non-corresponding class centers.
- The loss function is formulated as $ L_{ct-c} = rac{1}{2} rac{1}{m} ig( ext{sum of } ||x_i - c_{y_i}||_2^2 ig) + rac{1}{2} rac{1}{m} ig( ext{sum of } ext{sum}_{j eq y_i} ||x_i - c_j||_2^2 ig) $, where $ x_i $ is a feature vector, $ c_{y_i} $ is the true class center, and $ c_j $ are other class centers.
- The total training loss combines the standard softmax loss $ L_s $ and the contrastive-center loss $ L_{ct-c} $, with a balancing hyperparameter $ ho $: $ L = L_s + ho L_{ct-c} $.
- Class centers are updated during training using stochastic gradient descent, with gradients backpropagated through the feature map and the center computation.
- The method is applied end-to-end in a deep CNN, with no need for pre-processing or sampling of hard triplets or pairs.
- The approach is evaluated on MNIST, CIFAR-10, and LFW using ResNet architectures, with standard data augmentation and evaluation protocols.
Experimental results
Research questions
- RQ1Can a unified loss function improve both intra-class compactness and inter-class separability in deep features without requiring complex sampling strategies?
- RQ2How does contrastive-center loss compare to center loss in terms of feature discriminability and classification accuracy?
- RQ3Does the proposed loss improve performance on standard image classification and face recognition benchmarks compared to standard softmax training?
- RQ4Can the contrastive-center loss achieve state-of-the-art performance with minimal architectural changes and without requiring hard sample mining?
- RQ5What is the impact of the contrastive-center loss on feature visualization and class center distribution?
Key findings
- On CIFAR-10, the contrastive-center loss improved classification accuracy by 1.2% over standard softmax training, outperforming center loss by 0.35%.
- With a 20-layer ResNet, the contrastive-center loss achieved 92.45% accuracy on CIFAR-10, compared to 91.25% with standard softmax and 92.1% with center loss.
- On the LFW dataset, the contrastive-center loss improved verification accuracy to 98.68%, surpassing the baseline softmax-only model (97.47%) by 1.21 percentage points.
- The contrastive-center loss outperformed the model released by center loss [13] by 0.25 percentage points and the authors' re-implementation of center loss by 0.13 percentage points on LFW.
- The method achieved state-of-the-art performance on LFW using only 455,594 images from CASIA-WebFace, demonstrating effectiveness with limited data.
- Visualizations showed that features learned with contrastive-center loss exhibited tighter intra-class clustering and greater inter-class margin compared to baseline and center loss.
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.