[Paper Review] xCos: An Explainable Cosine Metric for Face Verification Task
This paper proposes xCos, an explainable cosine similarity metric for face verification that decomposes overall similarity into local patch-wise cosines and an attention map, enabling visualization of which facial regions contribute most to the decision. The method maintains state-of-the-art accuracy while providing interpretable, spatially localized explanations of model predictions.
We study the XAI (explainable AI) on the face recognition task, particularly the face verification here. Face verification is a crucial task in recent days and it has been deployed to plenty of applications, such as access control, surveillance, and automatic personal log-on for mobile devices. With the increasing amount of data, deep convolutional neural networks can achieve very high accuracy for the face verification task. Beyond exceptional performances, deep face verification models need more interpretability so that we can trust the results they generate. In this paper, we propose a novel similarity metric, called explainable cosine ($xCos$), that comes with a learnable module that can be plugged into most of the verification models to provide meaningful explanations. With the help of $xCos$, we can see which parts of the two input faces are similar, where the model pays its attention to, and how the local similarities are weighted to form the output $xCos$ score. We demonstrate the effectiveness of our proposed method on LFW and various competitive benchmarks, resulting in not only providing novel and desiring model interpretability for face verification but also ensuring the accuracy as plugging into existing face recognition models.
Motivation & Objective
- To address the lack of interpretability in deep face verification models, which are often treated as black boxes.
- To develop a similarity metric that provides spatially localized explanations of why two faces are judged as matching or not.
- To maintain high verification accuracy while introducing explainability through a plug-in module.
- To enable users to visualize which facial regions the model focuses on and how local similarities contribute to the final score.
- To improve trust and transparency in security-critical applications like mobile device authentication and surveillance.
Proposed method
- xCos decomposes the input face images into spatial patches and computes cosine similarity for each corresponding patch pair.
- It introduces a learnable attention module that assigns weights to each patch pair based on their relevance to the final decision.
- The final xCos score is computed as a weighted sum of patch-wise cosines, where weights are determined by the attention map.
- The attention map is differentiable and jointly trained with the backbone face embedding network.
- The module is designed as a plug-in, allowing integration into existing face verification models with minimal modification.
- The method enables visualization of both the local similarity map and the attention map, offering insight into model reasoning.
Experimental results
Research questions
- RQ1How can we make deep face verification models more interpretable by providing spatial explanations of similarity decisions?
- RQ2Can we design a similarity metric that preserves state-of-the-art accuracy while offering visual interpretability?
- RQ3How do attention maps and local similarity maps contribute to the final verification score in a meaningful and human-interpretable way?
- RQ4Can the proposed method improve robustness to occlusions compared to standard face verification models?
- RQ5To what extent can xCos be generalized to non-frontal or challenging pose face images?
Key findings
- xCos maintains state-of-the-art verification accuracy on LFW and other benchmarks when plugged into existing models like ArcFace.
- The method achieves superior robustness to occlusion, with significantly less performance drop on AR and CASIA datasets under synthetic occlusion settings.
- Visualizations show that xCos focuses on key facial regions such as eyes and nose, aligning with human perception of identity.
- The attention map effectively suppresses irrelevant or occluded regions, such as the forehead or mouth, during decision-making.
- The model with xCos outperforms the original ArcFace model in terms of robustness even without the attention module, indicating inherent stability.
- The framework enables intuitive interpretation of model behavior through localized similarity and attention maps, enhancing trust in AI-driven face verification.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.