Papers › Domain Generalization using Causal Matching

Domain Generalization using Causal Matching

12 Jun 2020arXiv 2020 6arXiv:2006.07500archive 2025-07-28

Divyat Mahajan, Shruti Tople, Amit Sharma

In the domain generalization literature, a common objective is to learn representations independent of the domain after conditioning on the class label. We show that this objective is not sufficient: there exist counter-examples where a model fails to generalize to unseen domains even after satisfying class-conditional domain invariance. We formalize this observation through a structural causal model and show the importance of modeling within-class variations for generalization. Specifically, classes contain objects that characterize specific causal features, and domains can be interpreted as interventions on these objects that change non-causal features. We highlight an alternative condition: inputs across domains should have the same representation if they are derived from the same object. Based on this objective, we propose matching-based algorithms when base objects are observed (e.g., through data augmentation) and approximate the objective when objects are not observed (MatchDG). Our simple matching-based algorithms are competitive to prior work on out-of-domain accuracy for rotated MNIST, Fashion-MNIST, PACS, and Chest-Xray datasets. Our method MatchDG also recovers ground-truth object matches: on MNIST and Fashion-MNIST, top-10 matches from MatchDG have over 50% overlap with ground-truth matches.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2006.07500")

Code

Syntology Ran 4 of 9 code samples harvested from 2 repositories linked to this paper; 5 have no recorded run. Of those that ran: 1 ran · our draft was wrong; 3 ran · fixture could not drive it.

By repository: found in paper text by Syntology: 9 samples from 2 repositories, 4 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

microsoft/robustdg officialmentioned in papermentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

9 samples harvested; 4 ran; 0 honoured the contract we drafted; 5 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · our draft was wrong
3ran · fixture could not drive it
5unverified

Licence: 0 of the 9 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

conv_block biomedia-mira/masf/masf_func.py found in paper text by Syntology ran · fixture could not drive it Apache-2.0 (permissive) · d7335824a1d78b44 · report
dropout biomedia-mira/masf/masf_func.py found in paper text by Syntology ran · fixture could not drive it fingerprinted Apache-2.0 (permissive) · 2ff962d151152c2e · report
lrn biomedia-mira/masf/masf_func.py found in paper text by Syntology ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 99c3561f7772f982 · report
max_pool biomedia-mira/masf/masf_func.py found in paper text by Syntology ran · fixture could not drive it Apache-2.0 (permissive) · 8621037738dc0c34 · report
MASF biomedia-mira/masf/masf_func.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 65a7aed081f03f65 · report
ResNetCSD vihari/CSD/pacs/models/resnet_csd.py found in paper text by Syntology unverified MIT (permissive) · 8ff91b49667f3978 · report
fc biomedia-mira/masf/masf_func.py found in paper text by Syntology unverified Apache-2.0 (permissive) · eac7e24272801635 · report
kd biomedia-mira/masf/masf_func.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 62dd1a96ab6840ef · report
xent biomedia-mira/masf/masf_func.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 0bf65cfc625e3b75 · report

Tasks

Data AugmentationDomain GeneralizationRotated MNIST

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Domain Generalization PACS MDG-Hybrid (ResNet-50) Average Accuracy 87.52 #37 of 133 Archive leaderboard report
Domain Generalization PACS MDG-Hybrid (Resnet-18) Average Accuracy 84.35 #62 of 133 Archive leaderboard report
Domain Generalization Rotated Fashion-MNIST MatchDG Accuracy 82.8 #1 of 2 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections