Skip to content

Official Pytorch source code supporting the implementation of: "Looking at Model Debiasing through the Lens of Anomaly Detection", Vito Paolo Pastore, Massimiliano Ciranni, Davide Marinelli, Francesca Odone, Vittorio Murino, IEEE/CVF WACV, 2025

License

Notifications You must be signed in to change notification settings

Malga-Vision/MoDAD

Repository files navigation

Looking at Model Debiasing through the Lens of Anomaly Detection

Official Pytorch source code supporting the implementation of:
"Looking at Model Debiasing through the Lens of Anomaly Detection",
Vito Paolo Pastore, Massimiliano Ciranni, Davide Marinelli, Francesca Odone, Vittorio Murino, IEEE/CVF WACV, 2025

ArXiv Preprint


Abstract

Deep neural networks are likely to learn unintended spurious correlations between training data and labels when dealing with biased data, potentially limiting the generalization to unseen samples not presenting the same bias. In this context, model debiasing approaches can be devised aiming at reducing the model’s dependency on such unwanted correlations, either leveraging the knowledge of bias information or not. In this work, we focus on the latter and more realistic scenario, showing the importance of accurately predicting the bias-conflicting and bias-aligned samples to obtain compelling performance in bias mitigation. On this ground, we propose to conceive the problem of model bias from an out-of-distribution perspective, introducing a new bias identification method based on anomaly detection. We claim that when data is mostly biased, bias-conflicting samples can be regarded as outliers with respect to the bias-aligned distribution in the feature space of a biased model, thus allowing for precisely detecting them with an anomaly detection method. Coupling the proposed bias identification approach with bias-conflicting data upsampling and augmentation in a two-step strategy, we reach state-of-the-art performance on synthetic and real benchmark datasets. Ultimately, our proposed approach shows that the data bias issue does not necessarily require complex debiasing methods, given that an accurate bias identification procedure is defined.




Source Code

This source code contains all the datasets, model implementations, implemented methods, and experiment routines. All the available operations are exposed through the file experiment_utils.py.

Datasets are expected to be stored in the data folder.

Citing our work

If you happen to find our work useful for your research, please cite us as:

@misc{pastore2024lookingmodeldebiasinglens,
      title={Looking at Model Debiasing through the Lens of Anomaly Detection}, 
      author={Vito Paolo Pastore and Massimiliano Ciranni and Davide Marinelli and Francesca Odone and Vittorio Murino},
      year={2024},
      eprint={2407.17449},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2407.17449}, 
}

About

Official Pytorch source code supporting the implementation of: "Looking at Model Debiasing through the Lens of Anomaly Detection", Vito Paolo Pastore, Massimiliano Ciranni, Davide Marinelli, Francesca Odone, Vittorio Murino, IEEE/CVF WACV, 2025

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages