Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add method: Uniform Risk Minimization (URM) #156

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kiranchari
Copy link

@kiranchari kiranchari commented Dec 5, 2024

I am first author of "Uniformly Distributed Feature Representations for Fair and Robust Learning" (TMLR 2024) paper. Link: https://openreview.net/forum?id=PgLbS5yp8n

In this pull request I am adding code for the proposed Uniform Risk Minimization (URM) method for domain generalization. The key idea is to encourage the distribution of feature representations learned by the encoder/featurizer to be uniformly distributed. The paper provides theoretical and empirical support for the proposed method for domain generalization and also robustness to sub-population shifts.

Changes include:

Thank you.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 5, 2024
@piotr-teterwak
Copy link
Collaborator

Hi! Thank you for the contribution. I will take a look early next week.

@piotr-teterwak
Copy link
Collaborator

Hi @kiranchari , could you run the unit tests, which are launched as described at the bottom of the README.md?

@kiranchari
Copy link
Author

Hi @piotr-teterwak, I ran the tests and they appear to pass (see attached screenshot). Thanks
unittest

@piotr-teterwak
Copy link
Collaborator

Could you also run the unit tests with DATA_DIR set? Thank you!

@kiranchari
Copy link
Author

Hi @piotr-teterwak, I tried running the tests with DATA_DIR set (/home/user/project/datasets)
and with all the datasets downloaded in that directory, but I am getting some runtime errors that are not related to my method. Please see attached error log here: unittest_error_log.txt

  1. There is an error in loading the FMOW dataset: ValueError: time data "2011-02-07T02:48:56.643Z" doesn't match format "%Y-%m-%dT%H:%M:%S%z", at position 92. I have the dataset in /home/user/project/datasets/fmow_v1.1
  2. There is an error loading Spawrious dataset as the code is looking for the images in the root of the DATA_DIR ( /home/user/project/datasets) rather than inside /home/user/project/datasets/spawrious224

@kiranchari
Copy link
Author

@piotr-teterwak Please let me know any tips to prevent these errors, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants