Perface: Metric Learning in Perceptual Facial Similarity for Enhanced Face Anonymization

Haruka Kumagai, Leslie Wöhler, Satoshi Ikehata, Kiyoharu Aizawa

TL;DR

This paper introduces PerFace, a novel metric learning approach for accurately measuring perceptual facial similarity, crucial for effective face anonymization via face swapping. By training on a new human-annotated dataset of face-swapped images, PerFace significantly outperforms existing methods in predicting human-like similarity and improves attribute-based face classification for anonymization.

What Problem Does This Paper Address?

Face anonymization, particularly through face swapping, aims to protect privacy by replacing a target's face with another while preserving non-identity attributes like pose and expression. The challenge lies in finding a balance: faces that are too similar compromise anonymity, while faces that are too dissimilar reduce naturalness. Existing face recognition models, trained to distinguish any two different identities as "not the same," fail to capture the nuanced spectrum of perceptual similarity needed for face swapping. They can't effectively distinguish between "highly similar but different" and "completely different," leading to suboptimal anonymization where swapped faces might still be too recognizable or appear unnatural.

Methods

The core of this work is the development of PerFace, a feature extractor trained using metric learning. Instead of relying on traditional identity verification losses, PerFace is fine-tuned on a new dataset specifically designed to capture human perception of similarity in face-swapped images.

The key methodological contributions are:

  • Perceptual Similarity Metric: The paper proposes a new way to measure similarity not just between original faces, but between a target face and its face-swapped counterpart. This is crucial because face-swapped images can introduce artifacts and domain gaps that affect perceived similarity.
  • Triplet-based Annotation: To overcome the difficulty of absolute similarity judgments, a triplet-based approach was used. Participants were shown a reference face-swapped image and two comparison face-swapped images, then asked to identify which comparison was more similar to the reference.
  • Metric Learning with Triplet Loss: PerFace is trained using a triplet loss function that aims to minimize the distance between embeddings of perceptually similar faces and maximize the distance between embeddings of dissimilar faces, as judged by human annotators.
  • Attribute-based Group Selection: For face anonymization, the method first identifies a group of potential source faces that share key attributes (like age and gender) with the target. Then, within this group, it selects a source face that is perceptually dissimilar to the target, ensuring both naturalness and anonymity.

Datasets

  • SimCelebA Dataset: A newly created dataset of 6,400 face-swapped image triplets. This dataset was generated using the SimSwap method on images from the CelebAMask-HQ dataset. It features human annotations of perceptual similarity for face-swapped images, specifically designed to capture nuanced differences between identities.
  • CelebAMask-HQ: Used as the source for generating the SimCelebA dataset.
  • MS1MV3: Used for pre-training the ArcFace model before fine-tuning it for PerFace.

Key Insights and Ideas

  • Human Perception is Key: Traditional face recognition models are optimized for identity verification, not for the nuanced perceptual similarity required for face swapping. Capturing how humans perceive similarity in face-swapped images is critical.
  • Face-Swapped Data is Different: The domain gap and artifacts introduced by face swapping mean that similarity metrics trained on original faces may not generalize well. Training on face-swapped data is essential.
  • Quality Over Quantity (for Annotations): The study found that a smaller dataset with high-quality, consistent human annotations (D2) led to better performance than a larger dataset with more inconsistent annotations (D1).
  • Familiarity with Source Improves Performance: When the model has seen the source face during training (even if not the target), its performance on similarity judgment improves. This suggests pre-selecting candidates with known attributes is beneficial.
  • Gender is a Stronger Attribute Signal: The model showed a stronger ability to classify gender than age, suggesting annotators might have implicitly weighted gender more heavily in their similarity judgments.

Key Results

  • Superior Similarity Prediction: PerFace achieved an accuracy of 0.917 in similarity evaluation, significantly outperforming other state-of-the-art methods like ArcFace (0.701), VGG Face (0.750), and FaceNet (0.715) (Table 1).
  • Improved Attribute Classification: The PerFace model demonstrated improved accuracy in classifying attribute groups (e.g., "young male," "older female"), with AUC values increasing after fine-tuning, particularly for gender classification.
  • Effective Source Selection: The method successfully identifies attribute groups and then selects candidates with low perceptual similarity within those groups, leading to better anonymization outcomes.

Limitations and Future Work

  • Subjectivity of Similarity: The authors acknowledge that facial similarity is inherently subjective and influenced by personal perception. This limitation means that broader and more diverse perspectives are needed for even more robust models.
  • Dataset Curation: The importance of high-quality, carefully curated datasets for training perceptual similarity models is highlighted. Future work could focus on creating larger, more diverse datasets.
  • Broader Applications: While focused on face anonymization, the PerFace model's ability to capture nuanced perceptual similarity could be extended to other areas like facial attribute editing, image retrieval, and even understanding human perception itself.

Summary updated

BibTeX
@misc{kumagai2025perface,
  author = {Haruka Kumagai and Leslie Wöhler and Satoshi Ikehata and Kiyoharu Aizawa},
  title = {{Perface: Metric Learning in Perceptual Facial Similarity for Enhanced Face Anonymization}},
  year = {2025},
  eprint = {2509.20281},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.20281},
}
Figure