Mitigating Bias: Enhancing Image Classification by Improving Model Explanations

Raha Ahmadi, Mohammad Javad Rajabi, Mohammad Khalooei, Mohammad Sabokrou

Introduction

Deep Neural Networks (DNNs) have achieved remarkable success in image classification, yet they often suffer from a phenomenon known as "background bias" or "spurious correlation." A model might correctly identify a boat, not because it recognizes the vessel's structure, but because it detects the presence of water. This "lazy" learning path leads to models that are "right for the right reasons," resulting in poor generalization to real-world scenarios where objects appear in novel contexts. To address this, researchers have developed a training approach called Region of Interest Activation (RIA) designed to align a model's internal attention with the actual object of interest.

The Challenge of Background Bias

Standard training protocols typically rely on Cross-Entropy loss, which encourages the model to minimize prediction error by any means necessary. If a dataset contains consistent background patterns—such as cows always appearing on green grass—the model may prioritize these features over the foreground object. This lack of "trustworthiness" is a significant hurdle for deploying AI in critical environments. The goal of the RIA framework is to ensure that classification decisions are grounded in the features of the object itself, rather than its surroundings.

Methodology: Region of Interest Activation (RIA)

The RIA framework introduces a guidance system that penalizes the model when its internal "attention" drifts away from the foreground object. The method consists of three primary components:

  1. Grad-CAM Heatmaps: During the training phase, the model generates Gradient-weighted Class Activation Mapping (Grad-CAM) heatmaps. These maps visualize the regions of the image that the model considers most important for its classification decision.
  2. Unsupervised Object Detection (LOST): To define where the object is without requiring manual bounding box annotations, the framework utilizes Localizing Objects with Self-Supervised Transformers (LOST). LOST provides a target bounding box for the foreground object in an unsupervised manner, removing the need for expensive human labeling.
  3. The RIA Loss Function: The core innovation is a specialized loss function that combines standard classification loss with a spatial constraint. This constraint uses a modified Intersection over Union (IoU) metric that encourages the Grad-CAM activation to stay within the LOST-detected bounding box. Additionally, a size penalty based on the diagonal distance of the attention box is applied to prevent the model from simply highlighting the entire image to "cheat" the IoU score.

Experimental Results

The researchers evaluated the RIA method using the RIVAL10 (RIch Visual Attributions with Localization) dataset, a subset of ImageNet-1k containing approximately 26,000 high-resolution images across 20 categories.

Performance Gains

The application of RIA led to significant improvements in classification accuracy across various architectures. For instance, a VGG16 model trained from scratch saw its accuracy increase from 86.6% to 91.7%. Similar consistent gains were observed in ResNet18 and ResNet50 architectures, even when starting with models already pre-trained on ImageNet.

Robustness and Interpretability

Beyond raw accuracy, the RIA method improved the model's resilience to noise. By measuring Relative Foreground Sensitivity (RFS), the study demonstrated that RIA-trained models are less susceptible to background distractions compared to baseline models. Qualitatively, the heatmaps produced by RIA-trained models are significantly cleaner and more focused on the primary object, whereas baseline models often highlight irrelevant environmental features like sky, grass, or water.

Discussion and Limitations

While RIA represents a significant step toward more interpretable AI, it is not without limitations. The method's effectiveness is inherently linked to the performance of the unsupervised object detector (LOST); if the detector fails to localize the object correctly, the guidance provided to the classifier will be flawed. Furthermore, generating Grad-CAM maps and running object detection during training increases computational overhead compared to standard training. Future research will need to address these costs and explore the application of RIA in complex scenes containing multiple objects.

Conclusion

By treating model explanation as a first-class citizen during the training loop, the RIA framework produces image classifiers that are both more accurate and more robust. This research highlights the importance of "right for the right reasons" learning, moving the field closer to AI systems that perceive the world in a manner consistent with human logic.

Summary updated

BibTeX
@inproceedings{ahmadi2023mitigating,
  author = {Raha Ahmadi and Mohammad Javad Rajabi and Mohammad Khalooei and Mohammad Sabokrou},
  title = {{Mitigating Bias: Enhancing Image Classification by Improving Model Explanations}},
  booktitle = {ACML},
  year = {2023},
}
Figure