AMD-FV: Adaptive margin loss and dual path network+ for deep face verification

Zeeshan Ahmed Khan, Waqar Ahmed, Panos LiatsisPLoS 2025 · DOI

TL;DR

This paper introduces AMD-FV, a novel deep learning framework for face verification that automates hyperparameter tuning for margin-based loss functions and enhances network architecture for improved efficiency and feature extraction. By addressing the challenges of manual tuning and information loss in existing methods, AMD-FV achieves state-of-the-art performance across multiple challenging datasets.

What Problem Does This Paper Address?

Face verification, a critical technology for applications like access control and surveillance, faces significant challenges. Traditional methods often rely on manual tuning of hyperparameters in loss functions, a tedious and error-prone process that can lead to suboptimal performance. Furthermore, deep learning architectures, while powerful, can suffer from information loss during downsampling, hindering their ability to extract discriminative features. This paper tackles these issues by proposing an automated approach to hyperparameter selection and a modified network architecture designed to preserve crucial low-level features.

Methods

The AMD-FV framework comprises two key innovations:

  • Adaptive Margin Loss (AML): This novel loss function automates the selection of margin and scale hyperparameters, eliminating the need for manual tuning. AML leverages input dissimilarity information (derived from the cross-product of feature and weight vectors) to estimate the margin. The scale parameter is then computed based on the number of classes and the estimated margin's range. This approach aims to mimic human visual perception by focusing on differences rather than similarities.
  • Dual Path Network+ (DPN+): This enhanced network architecture builds upon the existing Dual Path Network. The primary modification is in the first block, which is redesigned with a series of 3x3 convolutions, batch normalization, and ReLU activations. Crucially, DPN+ avoids downsampling in this initial block, preserving low-level spatial features and reducing computational cost while maximizing the use of discriminative information through shared connections across layers.

Datasets

The proposed AMD-FV model was trained and evaluated on several widely-used face verification benchmarks:

  • Training: MS1Mv2
  • Testing:
    • Labeled Faces in the Wild (LFW)
    • Megaface
    • IARPA Janus Benchmark B (IJB-B)
    • Cross-Age LFW (CALFW)
    • Cross-Pose LFW (CPLFW)

These datasets represent diverse conditions, including variations in pose, age, gender, occlusion, and illumination.

Key Insights and Ideas

  • Automated Hyperparameter Tuning is Key: The paper strongly suggests that manual hyperparameter tuning in margin-based loss functions is a bottleneck. Automating this process with AML not only simplifies the workflow but also leads to competitive or superior performance, demonstrating that data-driven adaptation can be as effective, if not more so, than empirical optimization.
  • Preserving Low-Level Features Matters: The redesign of the first block in DPN+ to avoid downsampling highlights the importance of retaining fine-grained spatial information. This is particularly beneficial for datasets with significant pose and illumination variations, where subtle features can be critical for accurate verification.
  • Efficiency Through Architectural Design: DPN+ achieves a favorable balance between performance and computational efficiency by leveraging shared connections and a refined initial block, offering a compelling alternative to more complex architectures.

Key Results

The AMD-FV model demonstrated strong performance across various datasets:

  • LFW: Achieved a verification accuracy of 99.75%, outperforming AdaptiveFace (99.62%) and Adacos (99.71%).
  • IJB-B: Improved the True Acceptance Rate (TAR) by 6% at a False Acceptance Rate (FAR) of 0.001 compared to VGGFace2.
  • Megaface: Attained a Rank-1 identification score of 92.16%, surpassing the CosFace model by 9.44%.
  • Computational Efficiency: AMD-FV showed significant reductions in computational complexity compared to ArcFace, with 32% fewer layers, 26.92% fewer parameters, and 41.91% fewer FLOPs.

Limitations and Future Work

  • Age Variations: While DPN+ excels in pose and complex scenarios, its performance on age variations (e.g., wrinkles, facial shape shifts) showed a slight drop on the CALFW dataset. The authors suggest that augmenting training data with age-specific examples or fine-tuning could address this.
  • Trade-offs of Automation: The paper acknowledges that while AML eliminates laborious manual tuning, there might be a slight performance gap compared to meticulously optimized manual settings on specific benchmarks. However, this is presented as a worthwhile trade-off for generalizability and scalability.
  • Future Directions: The authors propose exploring cross-domain applications (e.g., person re-identification, iris recognition, fingerprint recognition), combining AMD-FV with other biometric modalities, and evaluating its resilience against adversarial attacks.

Summary updated

Abstract

Face verification is important in a variety of applications, for instance, access control, surveillance, and identification. Existing methods often struggle with the challenges of dataset imbalance and manual hyperparameter tuning. To address this, we propose the Adaptive Margin Loss and Dual Path Network+ (AMD-FV) for deep face verification. Two innovations are introduced, namely, Adaptive Margin Loss (AML) and Dual Path Network+ (DPN+). AML aims at automating the selection of margin and scale hyperparameters in large margin loss functions, thus, eliminating the need for manual tuning. Input dissimilarity information is used to estimate the margin, while the scale parameter is computed using the number of classes and AML's range. Next, DPN+ enhances the original Dual Path Network by redesigning the first block with a series of 3x3 convolutions, batch normalization, and ReLU activations, leveraging shared connections across layers, leading to increases in spatial resolution and computational cost efficiency, while maximizing the use of discriminative features. We present comprehensive experiments on five diverse face verification datasets (LFW, Megaface, IJB-B, CALFW, and CPLFW) to demonstrate the effectiveness of the proposed approach. The results show that AMD-FV outperforms state-of-the-art methods, achieving a verification accuracy of 99.75% on LFW, improving the True Acceptance Rate by 6% on IJB-B at a False Acceptance Rate of 0.001, compared to VGGFace2, and attaining a Rank-1 identification score of 92.16% on Megaface, surpassing the CosFace model by 9.44%.
BibTeX
@inproceedings{khan2025amd,
  author = {Zeeshan Ahmed Khan and Waqar Ahmed and Panos Liatsis},
  title = {{AMD-FV: Adaptive margin loss and dual path network+ for deep face verification}},
  booktitle = {PLoS},
  year = {2025},
  doi = {10.1371/journal.pone.0324485},
}
Figure