Papers › The Missing Invariance Principle Found -- the Reciprocal Twin of Invariant Risk Minimization

The Missing Invariance Principle Found -- the Reciprocal Twin of Invariant Risk Minimization

29 May 2022arXiv:2205.14546archive 2025-07-28

Dongsung Huh, Avinash Baidya

Machine learning models often generalize poorly to out-of-distribution (OOD) data as a result of relying on features that are spuriously correlated with the label during training. Recently, the technique of Invariant Risk Minimization (IRM) was proposed to learn predictors that only use invariant features by conserving the feature-conditioned label expectation 𝔼ₑ[y|f(x)] across environments. However, more recent studies have demonstrated that IRM-v1, a practical version of IRM, can fail in various settings. Here, we identify a fundamental flaw of IRM formulation that causes the failure. We then introduce a complementary notion of invariance, MRI, based on conserving the label-conditioned feature expectation 𝔼ₑ[f(x)|y], which is free of this flaw. Further, we introduce a simplified, practical version of the MRI formulation called MRI-v1. We prove that for general linear problems, MRI-v1 guarantees invariant predictors given sufficient number of environments. We also empirically demonstrate that MRI-v1 strongly out-performs IRM-v1 and consistently achieves near-optimal OOD generalization in image-based nonlinear problems.

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

Code

Syntology Ran 13 of 21 code samples harvested from 1 repository linked to this paper; 8 have no recorded run. Of those that ran: 2 ran · honoured contract; 3 ran · our draft was wrong; 1 ran · fixture could not drive it; 7 ran with no contract checked.

By repository: official repository: 20 samples from 1 repository, 13 ran; 1 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

ibm/mri officialmentioned in papermentioned 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

21 samples harvested; 13 ran; 2 honoured the contract we drafted; 8 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.

2ran · honoured contract
3ran · our draft was wrong
1ran · fixture could not drive it
7ran
8unverified

Licence: 1 of the 21 samples is 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 ibm/mri. Some samples are identical code Syntology first harvested from another repository; for those, this paper's copy is not located and its licence is not recorded. “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.

Algorithm ibm/mri/custom_algorithms.py official repository ran MIT (permissive) · 60d5898728b2ef53 · report
Classifier ibm/mri/custom_algorithms.py official repository ran · our draft was wrong MIT (permissive) · 1389f95d1fb9f67e · report
Identity ibm/mri/custom_algorithms.py official repository ran fingerprinted MIT (permissive) · f0e9d2dc26748363 · report
LeNet5 ibm/mri/custom_algorithms.py official repository ran MIT (permissive) · 1a73afa879cb603b · report
ST_ConvNet ibm/mri/custom_algorithms.py official repository ran MIT (permissive) · ff54592da5080e3a · report
complex2real ibm/mri/custom_algorithms.py official repository ran MIT (permissive) · 79dcc6f470520bde · report
complexify ibm/mri/custom_algorithms.py official repository ran MIT (permissive) · 9821d3e2333fe81b · report
get_grad_norm ibm/mri/custom_algorithms.py official repository ran · honoured contract MIT (permissive) · 0c216d63456de1ec · report
get_loss_fn ibm/mri/domainbed/algorithms.py official repository ran · our draft was wrong MIT (permissive) · 79a63acaa13df2ea · report
get_optimizer ibm/mri/domainbed/algorithms.py official repository ran · our draft was wrong MIT (permissive) · f98e24eb0d2d32cf · report
get_weight_norm ibm/mri/custom_algorithms.py official repository ran · honoured contract MIT (permissive) · c6faf56a6ad7ccbc · report
output_modification ibm/mri/custom_algorithms.py official repository ran · fixture could not drive it fingerprinted MIT (permissive) · 23db9d78066152ca · report
real2complex ibm/mri/custom_algorithms.py official repository ran MIT (permissive) · 6a052df58baa9181 · report
ERM ibm/mri/custom_algorithms.py official repository unverified MIT (permissive) · 5aebea4d4ebff0d4 · report
Featurizer ibm/mri/custom_algorithms.py official repository unverified MIT (permissive) · 28f76c5b44ed54e5 · report
IRM ibm/mri/custom_algorithms.py official repository unverified MIT (permissive) · d374678281d0659c · report
MRI ibm/mri/custom_algorithms.py official repository unverified MIT (permissive) · 15b92d3235dcbfd7 · report
ResNet ibm/mri/custom_algorithms.py official repository unverified MIT (permissive) · f795ad5cd9b0e0fe · report
get_Featurizer_dict ibm/mri/custom_algorithms.py official repository unverified MIT (permissive) · dde6698ef323ba28 · report
get_network ibm/mri/custom_algorithms.py official repository unverified MIT (permissive) · 90ee0fb395848111 · report
get_algorithm_class identical code first harvested elsewhere unverified licence of this copy not recorded · b0bc80b1655a6802 · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

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