CounterFace: A Synthetic Face Dataset
for Fine-Grained Counterfactual Evaluation
of Face Recognition Systems
Guruprasad Viswanathan Ramesh, Ashish Hooda, Shimaa Ahmed,
Harrison J. Rosenberg, Ramya Korlakai Vinayak, Kassem Fawaz
WI-PI Lab, University of Wisconsin-Madison
Wi-Pi Lab
Face Recognition is everywhere
Increasingly used for identity decisions with real consequences.
Surveillance
Airports & Borders
Retail
Personal Devices
1
Face Recognition in Action
Face Image 1
Face Image 2
Face Recognition Model
Face Recognition Model
Embedding 2
Embedding 1
Similarity Metric
Same Identity
Different Identity
2
Face Recognition Failures
There is a need for fine-grained diagnostics.
CNN; March 29, 2026; North Dakota, USA
NYT; Aug 6, 2023; Michigan, USA
3
Counterfactual Evaluation
Addition of attribute “mustache”
gai
Source x
Edited gai(x)
4
Need for Synthetic Counterfactual Examples
5
While prompting different editing techniques to add the attribute “facemask”
Limitations of Prior Work
Human annotators
GAN Editor
Verifier checks
✓ “is attribute ai added or removed?”
Source face x
Edited face gai(x)
6
Prior Work: [1] Balakrishnan et al. (ECCV 2020) [2] Liang et al. (ICCV 2023)
Our work: Automated Verifier + Controlling Confounders
Automated verifier
Verifier checks three requirements:
✓ Validity
✓ Correctness
✓ Specificity
Source face x
Edited face gai(x)
GAN Editor
7
1. Generate “Source Faces” for all 8 demographics (150 identities per demographic, 6 seeds per identity)
East Asian Male
White Male
Indian Male
Black Male
East Asian Female
White Female
Indian Female
Black Female
Generating CounterFace: Generating Candidate Face Pairs
8
2. Modify source face by applying or removing the intended attribute
Generating CounterFace: Generating Candidate Face Pairs
Attributes
or
…
…
Source Face
Attribute Detector
Remove
Add
Add
Modified Faces
9
1. Check Counterfactual requirement: Validity
Generating CounterFace: Rejecting Non-Compliant Candidates
Modified Faces
Artifact
Detector
Artifact Not Detected
Passes
Validity
Fails
Validity
Artifact Detected
Reject Candidate
Artifact Not Detected
Passes Validity
10
2. Check Counterfactual requirements: Correctness and Specificity
Generating CounterFace: Rejecting Non-Compliant Candidates
Attribute Detector
Candidate Pair for
Candidate Pair for
…
…
,
,
,
Attributes
or
,
…
or
…
…
,
,
,
Attributes
…
Attribute Responses
Attribute
modified correctly
Other attributes change
Attribute
modified correctly
Other attributes do not change
Passes
Correctness
Fails
Specificity
Passes
Correctness
Passes
Specificity
Reject Candidate
Select Candidate
11
Dataset | # Attr | # Demo | Verification | Open-sourced |
Transect (Balakrishnan et al.) | 6 | 4 | Human | No |
CausalFaces (Liang et al.) | 4 | 6 | Human | Yes |
CounterFace (ours) | 20 | 8 | Automated | Yes (research) |
CounterFace: Dataset Details
12
Open-Source Models | Commercial Systems |
AdaFace (Resnet-100 on MS1MV2 dataset) | AWS Rekognition Faces API |
MagFace (Resnet-100 on MS1MV2 dataset) | Face++ Compare Faces API |
FaceNet (Inception trained on VGGFace dataset) | |
ArcFace (Resnet-34 trained on MS1MV2 dataset) | |
Evaluation: Models & Metrics
13
AWS & AdaFace are the most robust across all models
Results: General Performance Trends
14
Older open-source models, FaceNet and ArcFace show highest FNMR
Results: General Performance Trends
15
Results: Attribute-wise Performance
All models are less robust to rare attributes and attributes that occlude facial features
Models are fairly robust to non-occluding and peripheral attributes
16
Results: Attribute-wise Performance
Top2 models are also less robust to occluding attributes
17
Case Study: East Asian Male + Thick Beard
Even the top 2 models, AWS and AdaFace are less performant for East Asian demographic when thick beard is applied.
18
Ablation: Importance of Minimizing Confounders
All models lose performance with the relaxed dataset
Facial hair and occlusion attributes cause biggest FNMR delta on average
These results highlight the need for the Specificity Criterion that helps in minimizing impact of confounding factors in edits
19
Paper
Code
Dataset available upon request
Thank You, Any Questions??
20
Conclusion