EdgeFace: Efficient Face Recognition Model for Edge Devices

Anjith George, Christophe Ecabert, Hatef Otroshi-Shahreza, Ketan Kotwal, Sébastien Marcel · DOI

TL;DR

EdgeFace is a new hybrid CNN-Transformer model designed to bring high-accuracy face recognition to resource-constrained edge devices. By combining the local feature extraction of CNNs with the global context of Transformers and introducing a novel Low Rank Linear (LoRaLin) module, it achieves state-of-the-art performance with fewer than 2 million parameters.

What Problem Does This Paper Address?

State-of-the-art face recognition (FR) models have become incredibly accurate, but they typically rely on deep neural networks with massive parameter counts and high computational complexity. This makes them difficult, if not impossible, to deploy on "edge" devices like smartphones, robots, and embedded systems that have limited memory and processing power.

While researchers have developed lightweight CNNs (like MobileNets or ShuffleNets), these models often struggle to capture the global context of a face due to their local receptive fields. Conversely, Vision Transformers (ViTs) excel at global modeling but are often too computationally expensive for edge deployment. EdgeFace aims to bridge this gap, providing a model that is both extremely efficient and highly accurate.

Methods

The authors introduce EdgeFace, which builds upon the hybrid architecture of EdgeNeXt. Its design philosophy centers on two main innovations:

  1. Hybrid CNN-Transformer Architecture: EdgeFace uses a multi-stage design that leverages both convolutional encoders (for local features) and Split Depth-wise Transpose Attention (STDA) encoders. The STDA encoder is particularly clever; it performs self-attention across channel dimensions rather than spatial ones, which significantly reduces computational complexity while still capturing global representations.
  2. Low Rank Linear (LoRaLin) Module: The authors observed that standard linear (fully connected) layers are a major source of parameter overhead. To fix this, they introduced LoRaLin, which factorizes a high-rank weight matrix into two lower-rank matrices. This reduces the number of parameters and multiply-add operations (MAdds) with minimal impact on accuracy.
A schematic diagram of the proposed EdgeFace model, showing the hybrid stages and the integration of LoRaLin layers.

The implementation of LoRaLin is straightforward, as shown in the provided PyTorch snippet:

PyTorch implementation of the LoRaLin module.

Datasets

The models were trained on selected subsets of the WebFace260M dataset (specifically the 4M and 12M identity subsets).

For evaluation, the authors tested EdgeFace against seven major benchmarks:

  • Labeled Faces in the Wild (LFW)
  • Cross-age LFW (CA-LFW)
  • Cross-Pose LFW (CP-LFW)
  • Celebrities in Frontal-Profile (CFP-FP)
  • AgeDB-30
  • IARPA Janus Benchmark-B (IJB-B)
  • IARPA Janus Benchmark-C (IJB-C)

Key Insights and Ideas

  • Linear Layers are Bottlenecks: In many "lightweight" architectures, the final fully connected layers actually consume a disproportionate amount of the parameter budget. LoRaLin provides a tunable way to prune this overhead.
  • Tunable Efficiency: By adjusting a "Rank-ratio" ($\gamma$), developers can precisely trade off a tiny bit of accuracy for significant savings in FLOPs and memory. The authors found that a ratio of $\gamma=0.6$ offers a "sweet spot," saving ~20% in parameters and FLOPs with less than a 0.5% drop in accuracy.
  • Hybrid is Better for Edge: The paper suggests that for face recognition, a mix of CNNs and Transformers is more efficient than either alone. The CNNs handle the fine details of facial features, while the Transformer components ensure the model understands the overall structure of the face.
The impact of the Rank-ratio on computational complexity (MFLOPS).

Key Results

EdgeFace demonstrated exceptional efficiency-to-performance ratios across all benchmarks:

  • Competition Success: Variants of EdgeFace secured the top ranking in the <2M parameter category at the IJCB 2023 Efficient Face Recognition Competition.
  • Benchmark Performance: The EdgeFace-XS model (1.77M parameters) achieved 99.73% on LFW, 92.67% on IJB-B, and 94.85% on IJB-C.
  • Efficiency: As shown in the performance plots below, EdgeFace models (red circles) consistently sit in the top-left corner, indicating higher accuracy at lower computational costs (MFLOPs) compared to competitors like MobileFaceNet and MixFaceNet.
Performance comparison showing EdgeFace outperforming other models across LFW, IJB-B, and IJB-C benchmarks.

Limitations and Future Work

While EdgeFace is highly optimized, the authors note a few areas for further improvement:

  • Knowledge Distillation: The current results were achieved without complex distillation setups; incorporating a larger "teacher" model during training could likely push accuracy even higher.
  • Quantization: The paper briefly mentions 8-bit quantization for competition entries, but more advanced low-bit quantization research could further reduce the storage footprint for extreme edge cases.
  • Synthetic Data: The authors suggest exploring training with synthetic face data to further enhance model robustness and privacy.

Summary updated

BibTeX
@article{george2024edgeface,
  author = {Anjith George and Christophe Ecabert and Hatef Otroshi-Shahreza and Ketan Kotwal and Sébastien Marcel},
  title = {{EdgeFace: Efficient Face Recognition Model for Edge Devices}},
  journal = {IEEE Trans. Biom. Behav. Identity Sci.},
  year = {2024},
  doi = {10.1109/tbiom.2024.3352164},
}
Figure