clovaai / rebias

Official Pytorch implementation of ReBias (Learning De-biased Representations with Biased Representations), ICML 2020
MIT License
171 stars 30 forks source link

Discrepancies in reproducing results #12

Closed ADevillers closed 1 year ago

ADevillers commented 1 year ago

Description: I encountered discrepancies while attempting to reproduce the results presented in your paper titled "Learning De-biased Representations with Biased Representations." Despite following the provided methodology and using the suggested code and parameters on GitHub, the obtained results differ from what was reported in the paper.

Expected Results:

Actual Results:

Steps to Reproduce:

  1. Clone the repository and install requirements:

    git clone https://github.com/clovaai/rebias.git
    cd rebias
    pip install -r requirements.txt
  2. For Rubi 0.99:

    python main_biased_mnist.py --root data/ --train_correlation 0.99 --outer_criterion RUBi --g_lambda_inner 0
  3. For ReBias 0.999:

    python main_biased_mnist.py --root data/ --train_correlation 0.999

I would greatly appreciate your assistance in understanding the reasons behind these inconsistencies.

Thank you for your time, and I look forward to your response.

Sincerely, Alexandre DEVILLERS

SanghyukChun commented 1 year ago

Hi, did you check the PyTorch version as well? What is the output of this command? pip freeze | grep torch

SanghyukChun commented 1 year ago

Okay, I just found that torch==1.1.0 is no longer available at pip. Check this document for installing v1.1.0 https://pytorch.org/get-started/previous-versions/#v110

I am now checking whether the performances are reproduced under torch 1.4.0 and torchvision 0.5.0

SanghyukChun commented 1 year ago

Using torch==1.4.0, I got the following results, where (number) denotes the reported numbers in the paper. (not repeated 3 times, but only measured once)

rho RUBi ReBias
0.999 10.0 (13.7) 24.4 (22.7)
0.997 15.0 (43.0) 64.2 (64.2)
0.995 61.2 (90.4) 76.6 (76.0)
0.990 84.9 (93.6) 87.1 (88.1)

It seems that the RUBi implementation is not compatible with recent torch packages. The ReBias result looks less critical, and just an okay result to me.

I am not willing to update the RUBi implementation due to the following reasons: