Git Product home page Git Product logo

pseudo-attributes's Introduction

Unsupervised Learning of Debiased Representations with Pseudo-Attributes

Pytorch implementation for BPA (CVPR 2022)

Seonguk Seo, Joon-Young Lee, Bohyung Han

Seoul National University, Adobe Research

Dataset bias is a critical challenge in machine learning since it often leads to a negative impact on a model due to the unintended decision rules captured by spurious correlations. Although existing works often handle this issue based on human supervision, the availability of the proper annotations is impractical and even unrealistic. To better tackle the limitation, we propose a simple but effective unsupervised debiasing technique. Specifically, we first identify pseudo-attributes based on the results from clustering performed in the feature embedding space even without an explicit bias attribute supervision. Then, we employ a novel cluster-wise reweighting scheme to learn debiased representation; the proposed method prevents minority groups from being discounted for minimizing the overall loss, which is desirable for worst-case generalization. The extensive experiments demonstrate the outstanding performance of our approach on multiple standard benchmarks, even achieving the competitive accuracy to the supervised counterpart.

Installation

git clone https://github.com/skynbe/pseudo-attributes.git
cd pseudo-attributes
pip install -r requirements.txt

Download CelebA dataset at $ROOT_PATH/data/celebA.

Quick Start

Train baseline model:

python main.py --arch ResNet18 --trainer classify --desc base --dataset celebA --test_epoch 1 --lr 1e-4 --target_attr Blond_Hair --bias_attrs Male --no_save

Train BPA model:

python main.py --arch ResNet18 --trainer bpa --desc bpa_k8 --dataset celebA --test_epoch 1 --lr 1e-4 --target_attr Blond_Hair --bias_attrs Male --k 8 --ks 8 --no_save --use_base {$BASE_PATH}

Citation

If you find our work useful in your research, please cite:

@inproceedings{seo2022unsupervised,
  title={Unsupervised Learning of Debiased Representations with Pseudo-Attributes},
  author={Seo, Seonguk and Lee, Joon-Young and Han, Bohyung},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  pages={16742--16751},
  year={2022}
}

pseudo-attributes's People

Contributors

skynbe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.