From Hope to Safety: Unlearning Biases of Deep Models via Gradient Penalization in Latent Space


  • Maximilian Dreyer Fraunhofer Heinrich Hertz Institute
  • Frederik Pahde Fraunhofer Heinrich Hertz Institute
  • Christopher J. Anders Technical University of Berlin
  • Wojciech Samek Fraunhofer Heinrich Hertz Institute Technical University of Berlin BIFOLD – Berlin Institute for the Foundations of Learning and Data
  • Sebastian Lapuschkin Fraunhofer Heinrich Hertz Institute





Deep Neural Networks are prone to learning spurious correlations embedded in the training data, leading to potentially biased predictions. This poses risks when deploying these models for high-stake decision-making, such as in medical applications. Current methods for post-hoc model correction either require input-level annotations which are only possible for spatially localized biases, or augment the latent feature space, thereby hoping to enforce the right reasons. We present a novel method for model correction on the concept level that explicitly reduces model sensitivity towards biases via gradient penalization. When modeling biases via Concept Activation Vectors, we highlight the importance of choosing robust directions, as traditional regression-based approaches such as Support Vector Machines tend to result in diverging directions. We effectively mitigate biases in controlled and real-world settings on the ISIC, Bone Age, ImageNet and CelebA datasets using VGG, ResNet and EfficientNet architectures. Code and Appendix are available on



How to Cite

Dreyer, M., Pahde, F., Anders, C. J., Samek, W., & Lapuschkin, S. (2024). From Hope to Safety: Unlearning Biases of Deep Models via Gradient Penalization in Latent Space. Proceedings of the AAAI Conference on Artificial Intelligence, 38(19), 21046-21054.



AAAI Technical Track on Safe, Robust and Responsible AI Track