Home /permanent

Center Loss

Center Loss is a Loss Function for learning discriminative features, introduced in A Discriminative Feature Learning Approach for Deep Face Recognition.

It learns a center (a vector of the same dimension as the feature embedding) for each class, and penalises the distance between each feature and its class center:

LC=12∑i=1m∣∣xi−cyi∣∣22 L_{C} = \frac{1}{2} \sum\limits_{i=1}^{m} {||\mathbf{x}_i - \mathbf{c}_{y_i}||}^{2}_{2}

Where mm is the mini-batch size and cyi\mathbf{c}_{y_i} is the center of the class yiy_i. This pulls features of the same class close together. It's trained jointly with Softmax Loss, which keeps features of different classes apart, and a hyperparameter λ\lambda balances the two. On its own, the centers and features would collapse to zero, since that gives the lowest possible center loss.