CosFace
CosFace, also known as Large Margin Cosine Loss, is a loss function used in deep face recognition to improve the discriminative power of learned features. It operates on the cosine similarity between normalized feature vectors and class weight vectors and introduces an additive margin to the logit of the ground-truth class. By normalizing both the input features and the final classifier weights to unit length, the logits reflect cos theta, where theta is the angle between the feature and the class center. The true class logit is modified by subtracting a margin, encouraging a larger angular separation between classes.
In training, a scale parameter is applied to the logits to control the softness of the probability
CosFace is part of a family of margin-based loss functions for face recognition aimed at increasing intra-class