Source-linked AI summary

ElasticFace: Elastic Margin Loss for Deep Face Recognition

Fadi Boutros, Naser Damer, Florian Kirchbuchner, Arjan Kuijper

arXiv:2109.09416v4cs.CV

TL;DR

Fixed-margin softmax losses assume uniform inter- and intra-class geometry, an assumption the paper considers unrealistic for inconsistent real face data. ElasticFace relaxes that constraint with normally distributed random margins during training, and its variants extend state-of-the-art performance on seven of nine benchmarks.

  • Problem

    Fixed-margin softmax losses assume inter- and intra-class geodesic distances can be learned equally, despite inconsistent variation in real face data.

  • Method

    ElasticFace draws a random margin from a normal distribution for each sample and training iteration, with an extension assigning margins according to proximity to class centers.

  • Results

    ElasticFace exceeded state-of-the-art performance on seven of nine benchmarks and ranked first on AgeDB-30, CPLFW, CFP-FP, IJB-B, IJB-C, and MegaFace variants.

  • Takeaways & Limitations

    ElasticFace provides a flexible margin-penalty strategy that consistently extends state-of-the-art face recognition performance across most evaluated benchmarks.

  • Takeaways & Limitations

    ElasticFace increases training time by about one minute, while ElasticFace+ increases it by about 11 hours relative to ArcFace or CosFace.

Abstract

from arXiv · show

Learning discriminative face features plays a major role in building high-performing face recognition models. The recent state-of-the-art face recognition solutions proposed to incorporate a fixed penalty margin on commonly used classification loss function, softmax loss, in the normalized hypersphere to increase the discriminative power of face recognition models, by minimizing the intra-class variation and maximizing the inter-class variation. Marginal penalty softmax losses, such as ArcFace and CosFace, assume that the geodesic distance between and within the different identities can be equally learned using a fixed penalty margin. However, such a learning objective is not realistic for real data with inconsistent inter-and intra-class variation, which might limit the discriminative and generalizability of the face recognition model. In this paper, we relax the fixed penalty margin constrain by proposing elastic penalty margin loss (ElasticFace) that allows flexibility in the push for class separability. The main idea is to utilize random margin values drawn from a normal distribution in each training iteration. This aims at giving the decision boundary chances to extract and retract to allow space for flexible class separability learning. We demonstrate the superiority of our ElasticFace loss over ArcFace and CosFace losses, using the same geometric transformation, on a large set of mainstream benchmarks. From a wider perspective, our ElasticFace has advanced the state-of-the-art face recognition performance on seven out of nine mainstream benchmarks.

I. INTRODUCTION

Face recognition systems map aligned face images into embeddings and compare them for identity similarity. The introduction motivates ElasticFace as a flexible alternative to fixed-margin objectives, with evaluation across nine benchmarks.

  • I. INTRODUCTION: Face recognition pipelines detect and align face images, map them into embeddings, and compare those embeddings for identity similarity.The introduction frames embedding quality as central to face verification.
  • I. INTRODUCTION: Metric-learning losses face scalability challenges because the number of possible triplets grows explosively with dataset size.Classification-based softmax losses avoid this specific training issue, although softmax does not directly optimize verification embeddings.
  • I. INTRODUCTION: Partial-FC enables training on massive identity sets by randomly sampling a small subset of classes for the softmax-based loss.Using 10% of training classes with CosFace or ArcFace achieved comparable mainstream-benchmark results to using all classes.
  • I. INTRODUCTION: ElasticFace replaces a fixed margin with normally distributed random margins and extends the idea by assigning margins according to sample difficulty.The paper evaluates the approach on nine benchmarks and reports state-of-the-art performance on seven.
  • I. INTRODUCTION: The paper proceeds from softmax and a toy experiment to implementation details, benchmark comparisons, and a concluding discussion.This sequence establishes the loss formulation before presenting empirical evaluation.

II. ELASTICFACE LOSS

ElasticFace replaces the single fixed margin used by angular-margin softmax losses with Gaussian-drawn margins, allowing sample- and iteration-dependent flexibility in class separability. It extends ArcFace and CosFace while targeting compact intra-class features and separated inter-class features.

  • Motivation: Softmax loss does not explicitly optimize face representations for verification because it imposes no minimum distance between class centers.Its decision boundary is determined by the final-layer logits, but the embedding geometry remains insufficiently constrained for maximizing inter-class distances.
  • Angular-margin losses: Angular-margin losses modify softmax by adding multiplicative or additive penalties to the target-class angle or cosine.SphereFace uses m1, CosFace uses m3, and ArcFace uses m2 in the general angular-margin formulation.
  • Motivation: A single optimal margin is difficult to select because excessive margins can prevent convergence and equal-geodesic-distribution assumptions may fail under varied intra-class and inter-class variation.ArcFace, CosFace, and SphereFace selected margins through trial and error, motivating a more flexible penalty strategy.
  • ElasticFace loss: ElasticFace draws random margin penalties from a Gaussian distribution for each sample during each training iteration.The randomized penalty can be integrated into angular-margin softmax losses; ElasticFace-Arc and ElasticFace-Cos apply it to ArcFace and CosFace, respectively.
  • Toy example: ElasticFace and ElasticFace+ achieved better intra-class compactness and inter-class discrepancy than ArcFace in the eight-identity toy example.The experiment evaluates angular separation between consecutive identities and mean within-class embedding standard deviation.

III. EXPERIMENTAL SETUP

The experiments train ElasticFace models on MS1MV2 and evaluate them across nine diverse face-recognition benchmarks using established benchmark protocols. Results reported for five benchmarks show particularly strong performance on age and pose variations, while remaining close to state of the art on LFW and CALFW.

  • Training settings: ResNet-100 models are trained with SGD for 295K iterations, using 112 × 112 × 3 images to produce 512-d feature embeddings.Training uses a batch size of 512, scale parameter s = 64, and random horizontal flipping with probability 0.5.
  • Results: ElasticFace consistently extends state-of-the-art performance on AgeDB-30 and CFP-FP, while scoring very close to state of the art on LFW and CALFW.The comparison table reports results for LFW, AgeDB-30, CALFW, CPLFW, and CFP-FP; bold values mark the top performance in each benchmark.
  • Training dataset: MS1MV2 provides 5.8M images from 85K identities for training the investigated models.The dataset is a refined version of MS-Celeb-1M and supports direct comparison with recent state-of-the-art methods.
  • Evaluation benchmarks and metrics: The evaluation covers nine diverse benchmarks, including LFW, AgeDB-30, CALFW, and CPLFW, with protocols and metrics defined by each benchmark.The benchmarks include settings that represent specific face-recognition vulnerabilities.

IV. RESULTS

ElasticFace achieved leading or near-leading performance across nine benchmarks, particularly on large intra-class variation, while introducing modest additional training cost.

  • Overall benchmark results: ElasticFace exceeded state-of-the-art performance on seven of nine benchmarks and ranked second, third, or fourth on the remaining benchmarks.It ranked first on AgeDB-30, CPLFW, CFP-FP, IJB-B, IJB-C, MegaFace (R), and MegaFace verification.
  • Large intra-class variation: 98.35% accuracy on AgeDB-30 exceeded the 98.32% state-of-the-art result from CurricularFace.On CFP-FP, ElasticFace-Arc+ reached 98.73% and ElasticFace-Arc reached 98.67%, above reported state-of-the-art results of 98.51% and 98.46%.
  • Verification benchmarks: 93.28% accuracy on CPLFW ranked ElasticFace-Arc+ first, while ElasticFace-Cos+ ranked second on CALFW with 96.18%.On LFW, ElasticFace-Cos and ElasticFace-Arc+ each scored 98.82%, close behind GroupFace at 99.85%.
  • Large-scale benchmarks: 95.43% TAR at FAR1e–4 on IJB-B and 96.65% on IJB-C placed ElasticFace-Cos+ ahead of the cited competing methods.ElasticFace-Arc led MegaFace (R) with 98.81% Rank-1 identification and 98.92% TAR at FAR1e–6; ElasticFace-Arc+ led MegaFace verification with 97.44%.
  • Comparative results: ElasticFace models generally outperformed ArcFace, CosFace, and Partial-FC, while ElasticFace-Arc variants performed similarly with and without the extended assignment strategy.ElasticFace-Cos+ outperformed ElasticFace-Cos on most benchmarks.
  • Computational cost: 11 hours of additional training time for ElasticFace+ was reported, compared with about one minute for ElasticFace over the roughly 57-hour baseline.ElasticFace adds sampling overhead, while ElasticFace+ additionally incurs sorting overhead.

V. CONCLUSION

ElasticFace addresses inconsistent inter- and intra-class variation by replacing a fixed margin with randomized margins. Across nine benchmarks, it extended state-of-the-art performance on seven, especially under large intra-class variation.

  • Contribution: ElasticFace replaces the single constant penalty margin used by many margin-softmax losses with a random margin drawn from a normal distribution each training iteration.The extended formulation assigns margins according to samples’ proximity to their class centers.
  • Conclusion: Seven out of nine benchmark evaluations showed extended state-of-the-art face-recognition performance for ElasticFace.The strongest gains appeared on benchmarks involving large age gaps and frontal-to-profile comparisons.
Loading 2109.09416v4…