Abstract
Traditional fairness metrics often fail to explain why a model makes biased predictions, focusing instead on black-box outcomes like accuracy disparities. We introduce Attention-IoU, a novel interpretability-based metric that leverages model attention maps to quantify internal biases. By comparing model attention against ground-truth masks or other attribute heatmaps, Attention-IoU reveals when a model relies on spurious visual cues—such as identifying "blond hair" by looking at a person's nose. Our analysis on the CelebA dataset uncovers hidden representational biases that standard metrics overlook, providing a path toward more surgical debiasing techniques.
Introduction
Computer vision models are prone to learning spurious correlations. A classic example is a model trained on "waterbirds" that learns to identify the bird based on the presence of water in the background rather than the features of the bird itself. While existing fairness metrics can detect disparities in accuracy across subgroups, they do not explain the internal logic of the model's compromise.
To address this, we propose Attention-IoU, a metric designed to pinpoint exactly which image regions a model over-relies on. By "looking under the hood," we can determine if a model is making correct predictions for the wrong reasons.
Methodology
Attention-IoU is a generalized version of the Intersection-over-Union (IoU) metric, adapted for continuous, weighted maps rather than binary masks. The process involves three key steps:
- GradCAM Foundation: We utilize GradCAM to generate attention maps that highlight pixels influential to a classification. We modify standard GradCAM by taking the absolute value of the gradient to capture all contributing features.
- Normalization: The metric compares two $L_1$ normalized maps, ensuring it is size-invariant. This prevents the metric from penalizing attributes that naturally occupy smaller spatial areas, such as eyes compared to hair.
- Scoring Modes:
- Mask Score: Compares the model's attention map for an attribute against a ground-truth segmentation mask.
- Heatmap Score: Compares the attention maps of two different attributes to measure the overlap in their visual "reasoning."
Experiments and Datasets
We validated our approach using the Waterbirds synthetic dataset and the CelebA dataset, which contains over 200,000 celebrity faces. For ground-truth comparisons, we utilized CelebAMask-HQ, a subset providing high-quality manual segmentation masks for 19 facial components.
Results and Key Insights
Our results demonstrate that Attention-IoU accurately tracks model bias. On the Waterbirds dataset, as bias increases, the Mask Score for the bird decreases while the score for the background increases, mirroring drops in Worst Group Accuracy (WGA).
In the CelebA dataset, we found that label correlation does not always equal representational correlation. For example:
- The "Lipstick" Proxy: "Wearing Lipstick" showed a 0.94 heatmap correlation with the "Male" attribute, indicating the model treats lipstick as a primary proxy for gender.
- Attribute Outliers: "Mustache" and "Eyeglasses" exhibited much higher heatmap scores with gender than their label correlations suggested. For "Mustache," the model's attention shifts significantly depending on the presence of the attribute, showing asymmetric bias.
- Feature Misalignment: As shown in the figure above, the model's attention for "Blond Hair" overlaps significantly more with gendered facial features (eyes and nose) than "Wavy Hair" does, despite both being correlated with gender in the labels.
Conclusion and Future Work
Attention-IoU provides a spatial understanding of model bias, though it is currently limited to identifying where a model looks rather than what features (color, texture) it perceives. Future work will focus on using this metric to develop surgical debiasing methods that supervise model attention, forcing classifiers to focus on the correct semantic regions during training.
Summary updated