You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, a great thanks for your work, this is of high value for people working in fair classification. Kudos !
Second, I have some issue reproducing the results for the Bios dataset.
I used your code to download and preprocess the data : datasets.prepare_dataset("bios", "data/bios")
After that, in src/dataloaders/loaders/Bios.py, I had to comment:
if self.args.protected_task in ["economy", "both"] and self.args.full_label:
#if self.args.protected_task in ["gender", "economy", "both", "intersection"] and self.args.full_label:
Otherwise it couldn't build the datalaoder (because the data built with prepare_dataset does not contain economy_label).
Regarding the Bios dataset, the augmented Bios dataset with economy labels is recently released, and I will revise the preprocessing script to add it soon.
For Bios experiments, I noticed that the batch size is set to 16 ("batch_size":16), which might be too small given the default learning rate ("lr":0.003). Could you please test with larger batch sizes or smaller learning rates? Hopefully this would help. Otherwise, feel free to share your codes, I am more than happy to help!
Thanks again for your kind and prompt answer :-) . We still do not manage to reach the results you demonstrate in your articles (getting close but not exactly).
For example for the CE baseline, we reach 79.05 as max accuracy on the BiasInBios dataset.
Could you possibly share the parameters you used for BiasInBios and Moji (the optimal ones leading to the results in your papers). Similarly for the other methods ?
Please be aware that we used fixed encoder models (e.g. BERT) in our previous experiments, and only trained MLP to make predictions. In our recent experiments, we tried to fine-tuned the whole model and further improve the results. To fine-tune the whole BERT model, could you please:
In terms of the hyperparameters of each debiasing methods, we used the same batch size and learning rate as the vanilla method, and only search for the best trade-off hyperparameters for each debiasing method. The corresponding results are can downloaded. I have attached a jupyter notebook to demonstrate the process, which can be run in Google Colab. Please have a look and fell free to message me for any further information.
Activity
HanXudong commentedon Mar 16, 2023
Hi Antoine,
Thanks for reaching out!
Regarding the Bios dataset, the augmented Bios dataset with economy labels is recently released, and I will revise the preprocessing script to add it soon.
For Bios experiments, I noticed that the batch size is set to 16 ("batch_size":16), which might be too small given the default learning rate ("lr":0.003). Could you please test with larger batch sizes or smaller learning rates? Hopefully this would help. Otherwise, feel free to share your codes, I am more than happy to help!
Best,
Xudong
AntoineGourru commentedon Mar 16, 2023
II reduced the lr and increased the batch size, it seems to work much better, thank you very much.
Many thanks for this work and for your kind answer,
Antoine
AntoineGourru commentedon May 30, 2023
Dear Xudong,
Thanks again for your kind and prompt answer :-) . We still do not manage to reach the results you demonstrate in your articles (getting close but not exactly).
For example for the CE baseline, we reach 79.05 as max accuracy on the BiasInBios dataset.
Could you possibly share the parameters you used for BiasInBios and Moji (the optimal ones leading to the results in your papers). Similarly for the other methods ?
Best regards,
Antoine and Thibaud (@LetenoThibaud)
HanXudong commentedon May 30, 2023
Hi Antoine and Thibaud,
Once again, thanks for reaching out!
Please be aware that we used fixed encoder models (e.g. BERT) in our previous experiments, and only trained MLP to make predictions. In our recent experiments, we tried to fine-tuned the whole model and further improve the results. To fine-tune the whole BERT model, could you please:
n_freezed_layers = 0in you BERT model class (or in https://github.com/HanXudong/fairlib/blob/909f95237e26ed41d15f5777ba54ce4863e1f0c8/fairlib/src/networks/classifier.py#L147)batch_size = 32lr = 5e-6In terms of the hyperparameters of each debiasing methods, we used the same batch size and learning rate as the vanilla method, and only search for the best trade-off hyperparameters for each debiasing method. The corresponding results are can downloaded. I have attached a jupyter notebook to demonstrate the process, which can be run in Google Colab. Please have a look and fell free to message me for any further information.
Reproduce_Results.zip
Best,
Xudong
LetenoThibaud commentedon May 31, 2023
Hi Xudong,
Thank you for your quick answer,
Based on your code and by using the data downloaded from the notebook you sent, we managed reproducing your vanilla results.
This will be very helpful for our works, thanks again.
Best regards,
Thibaud