Papers › Invariant Risk Minimization

Invariant Risk Minimization

5 Jul 2019arXiv:1907.02893archive 2025-07-28

Martin Arjovsky, Léon Bottou, Ishaan Gulrajani, David Lopez-Paz

We introduce Invariant Risk Minimization (IRM), a learning paradigm to estimate invariant correlations across multiple training distributions. To achieve this goal, IRM learns a data representation such that the optimal classifier, on top of that data representation, matches for all training distributions. Through theory and experiments, we show how the invariances learned by IRM relate to the causal structures governing the data and enable out-of-distribution generalization.

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="1907.02893")

Code

Syntology Ran 18 of 30 code samples harvested from 9 repositories linked to this paper; 12 have no recorded run. Of those that ran: 1 ran · honoured contract; 2 ran · violated contract; 5 ran · our draft was wrong; 10 ran with no contract checked.

By repository: community (archive-listed): 30 samples from 9 repositories, 18 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

18 repositories listed; official and paper-mentioned ones first.

facebookresearch/InvariantRiskMinimization officialmentioned in papermentioned on GitHubpytorchNOASSERTION report
aniquetahir/jax_ood mentioned on GitHubjax report
chunyangx/IRM_research mentioned on GitHubpytorch report
claudiashi57/nice mentioned on GitHubpytorch report
facebookresearch/DomainBed mentioned on GitHubpytorch report
fastforwardlabs/causality-for-ml mentioned on GitHubpytorch report
hasanjawad001/cglearn mentioned on GitHubpytorch report
kakaobrain/irm-empirical-study mentioned on GitHubpytorchNOASSERTION report
katoro8989/irm_variants_calibration mentioned on GitHubpytorchApache-2.0 report
lingxiaoyuan/ood_mechanics mentioned on GitHubpytorch report
parshakova/IRM_ICP-IC_ERM mentioned on GitHubpytorch report
reiinakano/invariant-risk-minimization mentioned on GitHubpytorch report
rwchakra/exmap mentioned on GitHubpytorch report
siddarth-c/FedGMA mentioned on GitHubpytorch report
thuml/Transfer-Learning-Library mentioned on GitHubpytorch report
ycq091044/manydg mentioned on GitHubpytorch 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

30 samples harvested; 18 ran; 1 honoured the contract we drafted; 12 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 · honoured contract
2ran · violated contract
5ran · our draft was wrong
10ran
12unverified

Licence: 10 of the 30 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 9 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.

CGLBase hasanjawad001/cglearn/cglearn_linear.py community (archive-listed) ran MIT (permissive) · 7901fe5f746966d4 · report
CGLearn hasanjawad001/cglearn/cglearn_linear.py community (archive-listed) ran MIT (permissive) · 2f5e75c75135e52a · report
EarlyStopping parshakova/IRM_ICP-IC_ERM/code/models.py community (archive-listed) ran licence not identified · pointer only · abbd8616af693ed0 · report
IRM ycq091044/manydg/model.py community (archive-listed) ran no licence file found · pointer only · d67283e16e562ca6 · report
InvariantRiskMinimization chunyangx/IRM_research/code/experiment_synthetic/models.py community (archive-listed) ran licence not identified · pointer only · 7f8756cacd48bc13 · report
InvariantRiskMinimization aniquetahir/jax_ood/code/experiment_synthetic/models.py community (archive-listed) ran licence not identified · pointer only · 2017c3948be2287e · report
check_for_nans parshakova/IRM_ICP-IC_ERM/code/models.py community (archive-listed) ran · violated contract fingerprinted licence not identified · pointer only · 083ced6d4ac945b7 · report
conv3x3 katoro8989/irm_variants_calibration/domainbed/networks.py community (archive-listed) ran · our draft was wrong Apache-2.0 (permissive) · fac5364e2f53c6db · report
getNumParams katoro8989/irm_variants_calibration/domainbed/lib/pair_opt.py community (archive-listed) ran · honoured contract Apache-2.0 (permissive) · 28077f9c052f7aed · report
get_kl_div katoro8989/irm_variants_calibration/domainbed/lib/pair_opt.py community (archive-listed) ran · violated contract fingerprinted Apache-2.0 (permissive) · cb517763d1083872 · report
get_test_records katoro8989/irm_variants_calibration/domainbed/model_selection.py community (archive-listed) ran · our draft was wrong Apache-2.0 (permissive) · 53fac8d8d949e72b · report
l2_between_dicts katoro8989/irm_variants_calibration/domainbed/lib/misc.py community (archive-listed) ran Apache-2.0 (permissive) · 1fdaff04251a0d51 · report
make_weights_for_balanced_classes katoro8989/irm_variants_calibration/domainbed/lib/misc.py community (archive-listed) ran Apache-2.0 (permissive) · 5f576ed342c48a0a · report
pair_selection katoro8989/irm_variants_calibration/domainbed/lib/pair_opt.py community (archive-listed) ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 32a5b544ec6bebb1 · report
popul_erm_solution parshakova/IRM_ICP-IC_ERM/code/models.py community (archive-listed) ran · our draft was wrong licence not identified · pointer only · 33b9f5baa6bc40fe · report
pretty parshakova/IRM_ICP-IC_ERM/code/models.py community (archive-listed) ran · our draft was wrong licence not identified · pointer only · db4d05619d1e83d4 · report
remove_batch_norm_from_resnet katoro8989/irm_variants_calibration/domainbed/networks.py community (archive-listed) ran Apache-2.0 (permissive) · 196cab71d7129d62 · report
resnet18 katoro8989/irm_variants_calibration/domainbed/networks.py community (archive-listed) ran Apache-2.0 (permissive) · 6784a79e7943e224 · report
BestParameters parshakova/IRM_ICP-IC_ERM/code/models.py community (archive-listed) unverified licence not identified · pointer only · ac3dc229465a5881 · report
IRM facebookresearch/DomainBed/domainbed/algorithms.py community (archive-listed) unverified MIT (permissive) · f2e2ffafbf837990 · report
IRM claudiashi57/nice/src/experiment_synthetic/models.py community (archive-listed) unverified no licence file found · pointer only · ccfb22f0237dbf06 · report
InvariantRiskMinimization parshakova/IRM_ICP-IC_ERM/code/models.py community (archive-listed) unverified licence not identified · pointer only · 30536df61163084f · report
build_calibration_metric katoro8989/irm_variants_calibration/domainbed/calibration/ece.py community (archive-listed) unverified Apache-2.0 (permissive) · 9e81bbf308f5fd2b · report
calc_ece katoro8989/irm_variants_calibration/domainbed/calibration/ece.py community (archive-listed) unverified Apache-2.0 (permissive) · 4cc1b13edccacd97 · report
calibrate katoro8989/irm_variants_calibration/domainbed/calibration/ece.py community (archive-listed) unverified Apache-2.0 (permissive) · 07696a6fad15378d · report
compute_penalty reiinakano/invariant-risk-minimization/minimum_irm.py community (archive-listed) unverified MIT (permissive) · fe230835517bd55d · report
get_algorithm_class katoro8989/irm_variants_calibration/domainbed/algorithms.py community (archive-listed) unverified Apache-2.0 (permissive) · b0bc80b1655a6802 · report
get_dataset_class katoro8989/irm_variants_calibration/domainbed/datasets.py community (archive-listed) unverified Apache-2.0 (permissive) · d0ea85d74c20dea9 · report
num_environments katoro8989/irm_variants_calibration/domainbed/datasets.py community (archive-listed) unverified Apache-2.0 (permissive) · 73f32252eedba6a4 · report
print_row katoro8989/irm_variants_calibration/domainbed/lib/misc.py community (archive-listed) unverified Apache-2.0 (permissive) · af3c9a80c8fd1f7a · report

Tasks

Domain GeneralizationImage ClassificationOut-of-Distribution Generalization

Datasets

Introduced by this paper, per the archive.

Colored MNISTColored-MNIST(with spurious correlation)

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Image Classification Colored-MNIST(with spurious correlation) MLP-IRM Accuracy 66.9 #3 of 6 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