Why AI must lose a little to better recognize your face

Discover the latest advances in facial recognition, including key loss functions, models, and methods, with a focus on modern techniques such as ArcFace, AdaCos, and X2-Softmax.

viernes, 14 de marzo de 2025 • 3 min read • Q2BSTUDIO Team

Company-Software-Apps

In recent years, significant advances have been made in facial recognition. This review provides an overview of key tasks, models, and solution methods, with a special focus on the evolution of loss functions.

Facial recognition is a technique that allows identifying or verifying a person's identity using photos, videos, or real-time images. This review will explore identification based on a single digital image or a video frame.

Facial recognition has applications in various sectors, including finance, cybersecurity, video surveillance, smart home services, and multi-factor authentication. In addition to these practical uses, facial recognition models play a crucial role in modern generative models.

At Q2BSTUDIO, a technology development and services company, we work with advanced artificial intelligence and deep learning technologies to offer innovative facial recognition solutions. Our team of experts develops and implements custom models according to the specific needs of each industry, ensuring security, accuracy, and efficiency.

A key element in facial recognition is the loss function used during model training. ArcFace has been one of the most widely used functions in recent years, while CosFace and FaceNet have also been explored.

The facial recognition process follows a pipeline that includes several stages: face detection, cropping, and alignment. Generally, additional detectors are used to define facial contours and key facial points. Subsequently, the processed image is fed into the model.

Facial recognition models typically consist of two main components:

  • Backbone. This is the feature extractor, responsible for converting a face image into a feature vector. Convolutional neural networks such as ResNet, VGGNet, SE-ResNet, Vision Transformer, and other advanced models are used.

  • Loss function. Its goal is to guide model training so that it generates similar embeddings for photos of the same person and different ones for different people. To measure these differences, metrics such as cosine distance or L2 distance are used.

Loss functions can be classified into two broad categories: pair-based and classification-based.

Pair-based loss functions: These include Contrastive loss, Triplet loss, and N-pairs loss. They work by pairing positive and negative images to improve facial feature representation, although they can significantly increase data size.

Classification-based loss functions: These include Softmax loss, CosFace, and ArcFace. These techniques use prototypes or class centers that are updated during model training.

ArcFace, developed in 2018, marked an advancement by modifying the traditional Softmax function, providing better class separation by using angles instead of cosine similarity.

Other subsequent models have attempted to improve handling of data noise and margin optimization, such as Sub-center ArcFace (2020), AdaCos (2019), X2-Softmax (2023), and SFace (2022). These new functions seek to balance model convergence and class discrimination without amplifying noise.

A new trend in facial recognition is representing the prototype of an identity as a distribution rather than a single point in feature space. Models like VPL and EPL explore this approach to reduce the impact of outliers and improve recognition accuracy.

Likewise, the incorporation of transformer-based architectures has emerged as a solution to improve model discrimination, as in the case of Transformer-ArcFace, combining convolutional networks with attention networks to enhance model capacity.

At Q2BSTUDIO, we explore and develop technological solutions that integrate these advances in facial recognition, ensuring optimal and secure performance for our clients. Our approach is based on innovation and the application of cutting-edge algorithms that improve biometric identification across different sectors.

This review has covered some of the most relevant loss functions in facial recognition, but there are many other aspects to consider in future studies:

  • Facial recognition model architectures
  • Solutions for special cases such as identification with occlusion, aging, variable lighting, and different poses
  • 3D and dynamic recognition
  • Review of datasets used in training

At Q2BSTUDIO, we continue researching and applying these technological advances to offer cutting-edge facial recognition solutions, ensuring security, accuracy, and efficiency in every implementation.

A BREAK?

Play for a moment before you go

OUR SERVICES

How we can help you

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.