Skip to content

Instantly share code, notes, and snippets.

@YugeTen
Last active July 13, 2021 09:38
Show Gist options
  • Save YugeTen/92f2f79bbf087ad573bef0da559dfb23 to your computer and use it in GitHub Desktop.
Save YugeTen/92f2f79bbf087ad573bef0da559dfb23 to your computer and use it in GitHub Desktop.
tweet
Paper + Code release! We propose Fish, an effective algorithm for domain generalisation. It learns invariant features by maximising gradient inner product across domains.
Paper: https://arxiv.org/abs/2104.09937
Code: https://github.com/YugeTen/fish
Work done during internship at FAIR with syhw. A thread [insert FIgure1]
======
Our main idea: if the gradients of different domains point in similar directions, taking either gradient step improves the model's performance on *both* domains, indicating that the features learned by either gradient step are invariant across them.
======
We therefore propose to maximise the inter-domain gradient inner product (IDGM) to align the gradient directions of different domains. To avoid the costly second-order derivative, we derive a first-order algorithm Fish that approximates IDGM. See below for a comparison:
[insert algorithm 1 and algorithm 2]
======
A simple example: we constructed a dataset such that shape perfectly correlates with color on train, but not on test. We show that while ERM relies on color to make predictions, Fish is able to focus on shape -- the invariant feature, yielding much better performance on test set
[insert cdsprites image]
=====
benchmarks such as DomainBed and WILDS. We have submitted our results to both, thanks to the generous help of @David and @Pang Wei.
[insert result tables]
======
Joint work with Jeffrey Seely (jseely), Philip Torr, N. Siddharth, Awni Hannun (awni), Nicolas Usunier, Gabriel Synnaeve (syhw).
@YugeTen
Copy link
Author

YugeTen commented Jul 13, 2021

image
image
image
image

@syhw
Copy link

syhw commented Jul 13, 2021

We propose an effective algorithm Fish for domain generalisation. -> We propose Fish, an effective algorithm for domain generalisation.

@syhw
Copy link

syhw commented Jul 13, 2021

New paper alert! -> Paper + code release !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment