Simple and Fast Group Robustness by Automatic Feature Reweighting

Shikai Qiu, Andres Potapczynski, Pavel Izmailov, Andrew Gordon Wilson
6/19/2023
cs.LGstat.ML

Official code: AndPotap/afr (8 stars, Apache-2.0, last commit 2023-07-06).

Abstract

A major challenge to out-of-distribution generalization is reliance on spurious features -- patterns that are predictive of the class label in the training data distribution, but not causally related to the target. Standard methods for reducing the reliance on spurious features typically assume that we know what the spurious feature is, which is rarely true in the real world. Methods that attempt to alleviate this limitation are complex, hard to tune, and lead to a significant computational overhead compared to standard training. In this paper, we propose Automatic Feature Reweighting (AFR), an extremely simple and fast method for updating the model to reduce the reliance on spurious features. AFR retrains the last layer of a standard ERM-trained base model with a weighted loss that emphasizes the examples where the ERM model predicts poorly, automatically upweighting the minority group without group labels. With this simple procedure, we improve upon the best reported results among competing methods trained without spurious attributes on several vision and natural language classification benchmarks, using only a fraction of their compute.

View on arXivView PDF

Code Implementations(1)

AndPotap/afrOfficial100%
Apache-2.0

AFR code

82Shell, PythonMay 30, 20233 years agoApache-2.0

Similar Papers

Cite this paper

@article{qiu2023simple,
  title  = {Simple and Fast Group Robustness by Automatic Feature Reweighting},
  author = {Shikai Qiu and Andres Potapczynski and Pavel Izmailov and Andrew Gordon Wilson},
  year   = {2023},
  eprint = {2306.11074},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2306.11074v1},
  journal = {ICML 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2306.11074.svg)](https://codeofpaper.com/paper/2306.11074)

Discussion