SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2205.14546 · NeurIPS · 2022

The Missing Invariance Principle Foundthe Reciprocal Twin of Invariant Risk Minimization

Dongsung Huh, Avinash Baidya

arXiv · PDF · Open in the Atlas

Code that ran

13 of 21 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (4 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 0 violated it and 7 have no contract verdict; 4 failures of our instrument; 8 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2205.14546.json · badge: /api/ran/2205.14546.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
ibm/mri canonical (classifier label)
classifier basis: classifier_2025
13 ran · 7 no recorded run
copy not recorded community
not in the paper's declared repositories
0 ran · 1 no recorded run
FunctionStatusWhere it lives
Algorithm Ran
ran on a synthesized input · constructed an object; no result was computed
ibm/mri/custom_algorithms.py
code served (permissive licence) · get_code("60d5898728b2ef53")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, Algorithm: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Small model for input_shape -> num_classes
class SimpleModel(nn.Module):
    def __init__(self, input_shape, num_classes):
        super().__init__()
        # Flatten input and create a simple linear layer
        input_size = 1
        for dim in input_shape:
            input_size *= dim
        self.fc = nn.Linear(input_size, num_classes)
    
    def forward(self, x):
        x = x.view(x.size(0), -1)
        return self.fc(x)

# Create minimal hparams dict
hparams = {
    'loss_type': 'classification',
    'num_classes': 3,
    'num_domains': 2,
}

# Define arguments for Algorithm.__init__
input_shape = (4, 5)  # 2D input: batch will be added
num_classes = 3
num_domains = 2

# loss_fn can be None (will be created by get_loss_fn) or passed explicitly
loss_fn = None

ARGS = {
    'input_shape': input_shape,
    'num_classes': num_classes,
    'num_domains': num_domains,
    'hparams': hparams,
    'loss_fn': loss_fn,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Algorithm — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Algorithm output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
Classifier Ran
ran; our contract draft was wrong, not the code
ibm/mri/custom_algorithms.py
code served (permissive licence) · get_code("1389f95d1fb9f67e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Sequential. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'in_features': 4,
    'out_features': 3,
    'hparams': {
        'classifier_type': 'linear_2',
        'loss_type': 'regression'
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
Identity Ran
ran on a synthesized input · constructed an object; no result was computed
ibm/mri/custom_algorithms.py
code served (permissive licence) · get_code("f0e9d2dc26748363")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, Identity: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "n_outputs": 10
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Identity — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Identity output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
LeNet5 Ran
ran on a synthesized input · constructed an object; no result was computed
ibm/mri/custom_algorithms.py
code served (permissive licence) · get_code("1a73afa879cb603b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, LeNet5: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# LeNet5 takes input_shape as its only parameter
# input_shape is a tuple of (channels, height, width)
# Based on the __init__, it checks if input_shape[1] == 64
# Let's use input_shape = (1, 28) for the standard case (28x28 MNIST-like)
# and also prepare for the 64x64 case

# For this setup, let's use the standard 28x28 case
input_shape = (1, 28)

ARGS = {
    "input_shape": input_shape,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type LeNet5 — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a LeNet5 output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ST_ConvNet Ran
ran on a synthesized input · constructed an object; no result was computed
ibm/mri/custom_algorithms.py
code served (permissive licence) · get_code("ff54592da5080e3a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, ST_ConvNet: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "in_channels": 1,
    "n_channels": [12, 16],
    "kernel_size": [5, 3],
    "stride": [1, 1],
    "pool": 2,
    "adapt_pool_size": 1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ST_ConvNet — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ST_ConvNet output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
complex2real Ran
ran on a synthesized input
ibm/mri/custom_algorithms.py
code served (permissive licence) · get_code("79dcc6f470520bde")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

# complex2real has no __init__ parameters (inherits from nn.Module with no custom __init__)
INIT_ARGS = {}

# forward takes x, which should be a complex tensor
# Create a complex tensor with distinct dimensions: batch=2, features=3
x_real = torch.randn(2, 3)
x_imag = torch.randn(2, 3)
x_complex = torch.complex(x_real, x_imag)

ARGS = {'x': x_complex}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
complexify Ran
ran on a synthesized input
ibm/mri/custom_algorithms.py
code served (permissive licence) · get_code("9821d3e2333fe81b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

# The complexify class has no __init__ parameters (uses default nn.Module.__init__)
INIT_ARGS = {}

# The forward method takes a single tensor x
ARGS = {
    'x': torch.randn(2, 4)  # batch_size=2, feature_dim=4
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
get_grad_norm Ran
ran, honoured the contract we drafted
ibm/mri/custom_algorithms.py
code served (permissive licence) · get_code("0c216d63456de1ec")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a simple model with parameters that have gradients
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        return self.linear2(torch.relu(self.linear1(x)))

model = SimpleModel()

# Create some dummy data and compute gradients
x = torch.randn(2, 4)
y = torch.randn(2, 2)
criterion = nn.MSELoss()

# Forward pass
output = model(x)
loss = criterion(output, y)

# Backward pass to populate gradients
loss.backward()

# Get model parameters (these now have gradients)
params = list(model.parameters())

ARGS = {
    "params": params
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_loss_fn Ran
ran; our contract draft was wrong, not the code
ibm/mri/domainbed/algorithms.py
code served (permissive licence) · get_code("79a63acaa13df2ea")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned CrossEntropyLoss. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Test case 1: classification
hparams_classification = {
    'loss_type': 'classification'
}

# Test case 2: binary_classification
hparams_binary_classification = {
    'loss_type': 'binary_classification'
}

# Test case 3: regression
hparams_regression = {
    'loss_type': 'regression'
}

# Test case 4: regression_complex
hparams_regression_complex = {
    'loss_type': 'regression_complex'
}

# Use the first test case as the main argument
ARGS = {
    'hparams': hparams_classification
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type CrossEntropyLoss — a CrossEntropyLoss output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a CrossEntropyLoss output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_optimizer Ran
ran; our contract draft was wrong, not the code
ibm/mri/domainbed/algorithms.py
code served (permissive licence) · get_code("f98e24eb0d2d32cf")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned SGD. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a simple model with parameters
model = nn.Linear(4, 3)

# Define hparams dict with SGD configuration
hparams = {
    'optim': 'SGD',
    'lr': 0.01,
    'momentum': 0.9,
    'weight_decay': 1e-4
}

# Extract parameters from the model
parameters = model.parameters()

ARGS = {
    'hparams': hparams,
    'parameters': parameters
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SGD — a SGD output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SGD output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_weight_norm Ran
ran, honoured the contract we drafted
ibm/mri/custom_algorithms.py
code served (permissive licence) · get_code("c6faf56a6ad7ccbc")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a list of parameter tensors
# The function iterates over params and calls .norm() on each, then .sqrt() on the result
params = [
    torch.randn(4, 3),
    torch.randn(2, 5),
    torch.randn(3)
]

ARGS = {
    "params": params
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
output_modification Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ibm/mri/custom_algorithms.py
code served (permissive licence) · get_code("23db9d78066152ca")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 4, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Test case 1: binary_classification
logits_binary = torch.randn(2, 3, 1)  # shape: (n_env=2, batch=3, 1)
label_binary = torch.randint(0, 2, (2, 3, 1)).float()  # shape: (2, 3, 1)

# Test case 2: classification
logits_classification = torch.randn(2, 3, 2)  # shape: (n_env=2, batch=3, num_classes=2)
label_classification = torch.randint(0, 2, (2, 3)).float()  # shape: (2, 3)

# Test case 3: other loss type
logits_other = torch.randn(2, 3, 4)
label_other = torch.randn(2, 3, 4)

# Using binary_classification case
ARGS = {
    'logits': logits_binary,
    'label': label_binary,
    'loss_type': 'binary_classification',
    'num_classes': 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 4, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
real2complex Ran
ran on a synthesized input
ibm/mri/custom_algorithms.py
code served (permissive licence) · get_code("6a052df58baa9181")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

# real2complex has no __init__ parameters (inherits from nn.Module with no custom __init__)
INIT_ARGS = {}

# forward expects x with shape [..., even_number] where last dim will be chunked in half
# Let's use batch=2, features=6 (will be split into 3 real + 3 imag)
x = torch.randn(2, 6)

ARGS = {'x': x}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
ERM Not yet run
unverified (harvested, no recorded run)
ibm/mri/custom_algorithms.py
code served (permissive licence) · get_code("5aebea4d4ebff0d4")
How it ran

no invocation recorded.

Featurizer Not yet run
unverified (harvested, no recorded run)
ibm/mri/custom_algorithms.py
code served (permissive licence) · get_code("28f76c5b44ed54e5")
How it ran

no invocation recorded.

IRM Not yet run
unverified (harvested, no recorded run)
ibm/mri/custom_algorithms.py
code served (permissive licence) · get_code("d374678281d0659c")
How it ran

no invocation recorded.

MRI Not yet run
unverified (harvested, no recorded run)
ibm/mri/custom_algorithms.py
code served (permissive licence) · get_code("15b92d3235dcbfd7")
How it ran

no invocation recorded.

ResNet Not yet run
unverified (harvested, no recorded run)
ibm/mri/custom_algorithms.py
code served (permissive licence) · get_code("f795ad5cd9b0e0fe")
How it ran

no invocation recorded.

get_Featurizer_dict Not yet run
unverified (harvested, no recorded run)
ibm/mri/custom_algorithms.py
code served (permissive licence) · get_code("dde6698ef323ba28")
How it ran

no invocation recorded.

get_algorithm_class Not yet run
unverified (harvested, no recorded run)
this paper's copy was not recorded; identical code first harvested from facebookresearch/domainbed
pointer only · get_code("b0bc80b1655a6802")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_network Not yet run
unverified (harvested, no recorded run)
ibm/mri/custom_algorithms.py
code served (permissive licence) · get_code("90ee0fb395848111")
How it ran

no invocation recorded.

Also present in other papers' code

Of 21 samples lifted from this paper's linked repositories, 21 carry a function identity and 0 do not. Of the 21 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 1 the same month, 1 later) and 20 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
get_algorithm_class 39 other papers
9 dated earlier, 2 the same month, 28 later
1907.02893 (2019-07)
Invariant Risk Minimization
2007.01434 (2020-07)
In Search of Lost Domain Generalization
2007.02931 (2020-07)
Adaptive Risk Minimization: Learning to Adapt to Domain Shift
and 36 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

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 E e [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 design 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 E e [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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2205.14546")
get_code_for_paper("2205.14546")
have("2205.14546")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2205.14546.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2205.14546.svg)](https://syntology.ai/paper/2205.14546)

Connect an agent — have() is free.