Attention IoU: Examining Biases in CelebA using Attention Maps

Aaron Serianni, Tyler Zhu, Olga Russakovsky, Vikram V. Ramaswamy · DOI

Introduction

Computer vision models are notorious for picking up "spurious correlations"—statistical shortcuts that work on a specific dataset but fail in the real world. For example, a model might learn to identify a "waterbird" simply by looking for a blue water background rather than the bird itself. Traditionally, researchers measure this bias by looking at accuracy disparities: does the model perform worse on "landbirds on water" than "landbirds on land"? While useful, this "black box" approach tells us a model is biased, but not why or what specific image features are causing the trouble.

Visualizing different types of model bias (Background, Object, and Depiction) using attention maps on the Waterbirds dataset.

Researchers at Princeton have developed Attention-IoU (A-IoU), a new metric that quantifies model bias by analyzing "where" a model looks rather than just "what" it predicts. By comparing attention maps to ground-truth feature masks, they aim to open the box and see if models are latching onto the right features for the right reasons.

The Attention-IoU Framework

The A-IoU framework builds on the classic "Intersection over Union" metric used in object detection but generalizes it to work with weighted, continuous heatmaps, such as those generated by GradCAM. The framework provides two main scores:

  1. Mask Score: This compares the model's attention map to a ground-truth mask of a specific feature. For example, it can answer: "Does the 'Lipstick' model actually look at the mouth?"
  2. Heatmap Score: This compares the attention maps of two different attributes. For example: "How similar is the 'Blond Hair' heatmap to the 'Male' heatmap?"

Crucially, A-IoU is designed to be size-invariant. This ensures a model's score isn't unfairly penalized just because it is looking at a small feature (like an eye) versus a large one (like hair), allowing for fair comparisons across diverse facial attributes.

Uncovering Hidden Biases in CelebA

Applying A-IoU to the CelebA dataset—a collection of over 200,000 celebrity faces—revealed startling insights into representational bias. One might expect a "Wearing Lipstick" classifier to focus solely on the mouth. Instead, A-IoU revealed that the model attends to the eyes, eyebrows, and nose—a pattern almost identical to how it identifies the "Male" attribute. The model isn't just looking for red lips; it's looking for a "feminine" facial structure.

Attention maps and Mask Score breakdown for Male, Blond Hair, and Wavy Hair attributes in CelebA.

The researchers also identified a "hidden confounder" in the "Blond Hair" attribute. They found that "Blond Hair" models have a much higher correlation with the "Male" attribute than "Wavy Hair" models, even when label correlations are similar. By subsampling the data to break these correlations, they proved that the bias in Blond Hair is "innate" to the visual features themselves, suggesting a deep-seated bias that simple dataset rebalancing cannot fix.

Co-localization vs. Logical Bias

A-IoU also helps distinguish between physical co-localization and logical bias. For instance, "Eyeglasses" and "Mustache" classifiers often look at the same regions as the "Male" classifier. However, by training models on images without glasses, the authors demonstrated that this overlap was often due to features being in the same physical place (co-localization) rather than a deep-seated logical bias. This distinction is vital for developing effective debiasing strategies.

Validation and Results

The framework was validated using the Waterbirds dataset, where the A-IoU Mask Score almost perfectly mirrored the drop in "Worst Group Accuracy." As the dataset became more biased, the model's attention shifted visibly from the bird to the background. Furthermore, these findings were consistent across different model architectures, including ResNet-50 and EfficientNetV2, proving that these biases are a property of the data and the task, not just a specific model's quirk.

Conclusion

Attention-IoU provides a transparent diagnostic tool for identifying where models go wrong. While attention maps only show where a model looks and not necessarily what it sees, they provide a critical foundation for future work. The goal is to move beyond balancing labels and toward ensuring models actually "look" at the correct, causal features of an image to make their predictions.

Summary updated

BibTeX
@inproceedings{serianni2025attention,
  author = {Aaron Serianni and Tyler Zhu and Olga Russakovsky and Vikram V. Ramaswamy},
  title = {{Attention IoU: Examining Biases in CelebA using Attention Maps}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.00414},
}
Figure