SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2204.04384 · CVPR · 2022

The Two Dimensions of Worst-case Training and Their Integrated Effect for Out-of-domain Generalization

Eric Xing, Zeyi Huang, Dong Huang, Haohan Wang, Yong Lee

arXiv · PDF · Open in the Atlas

Code that ran

2 of 4 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 1 failure of our instrument; 2 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/2204.04384.json · badge: /api/ran/2204.04384.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
oodbag/w2d marked official in Papers with Code
Papers with Code archive
2 ran · 2 no recorded run
FunctionStatusWhere it lives
Algorithm Ran
ran on a synthesized input · constructed an object; no result was computed
oodbag/w2d/DomainBed/domainbed/algorithms.py
pointer only (licence: NONE) · get_code("f4f62760b15a2f01")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, oodbag/w2d when it was checked. 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. A run is recorded.

_get_optimizer Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
oodbag/w2d/DomainBed/domainbed/algorithms.py
pointer only (licence: NONE) · get_code("89948fba894ae3df")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, oodbag/w2d when it was checked. 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. A run is recorded.

ERM Not yet run
unverified (harvested, no recorded run)
oodbag/w2d/DomainBed/domainbed/algorithms.py
pointer only (licence: NONE) · get_code("ef92685dbb4a6185")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, oodbag/w2d when it was checked. 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.

W2D Not yet run
unverified (harvested, no recorded run)
oodbag/w2d/DomainBed/domainbed/algorithms.py
pointer only (licence: NONE) · get_code("6570a11274fe2580")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, oodbag/w2d when it was checked. 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.

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 3 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
Algorithm
brick of this paper's assembly: helper
16 other papers
10 dated earlier, 6 later · 16 only as an assembly brick
1505.07818 (2015-05)
Domain-Adversarial Training of Neural Networks
1607.01719 (2016-07)
Deep CORAL: Correlation Alignment for Deep Domain Adaptation
1907.02893 (2019-07)
Invariant Risk Minimization
and 13 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

Training with an emphasis on "hard-to-learn" components of the data has been proven as an effective method to improve the generalization of machine learning models, especially in the settings where robustness (e.g., generalization across distributions) is valued. Existing literature discussing this "hard-to-learn" concept are mainly expanded either along the dimension of the samples or the dimension of the features. In this paper, we aim to introduce a simple view merging these two dimensions, leading to a new, simple yet effective, heuristic to train machine learning models by emphasizing the worst-cases on both the sample and the feature dimensions. We name our method W2D following the concept of "Worst-case along Two Dimensions". We validate the idea and demonstrate its empirical strength over standard benchmarks. Percentage Dataset Acc(Train-Val/Test-Val) 10 PACS 82.4 / 83.7 20 PACS 83.0 / 83.5 33 PACS 82.7 / 83.2 50 PACS 82.7 / 83.1 Table 3. Ablation study of Top Worst-case ρ%. We fix other hyperparamters here and only change ρ. Percentage Dataset Acc(Train-Val/Test-Val) 0 PACS 82.2 / 83.7 5 PACS 82.5 / 83.5 10 PACS 82.7 / 83.3 20 PACS 83.0 / 83.3 40 PACS 82.9 / 83.3 Table 4. Ablation study of Whole Batch Training During The Last κ% Epoch. We fix other hyperparameters here and only change κ. Methods Dataset Acc(Train-Val/Test-Val) ERM PACS 81.5 / 82.2 feature-dim. PACS 82.8 / 83.3 sample-dim. PACS 82.2 / 83.5 W2D PACS 7, we notice that SWA works especially well with worsecase-based methods. For example, in PACS, W2D obtains a 1.3% improvement from SWA while ERM and feature-dim. (RSC) obtains 0.9% and 0.7% improvement, respectively. Method Dataset Acc(Train-Val/Test-Val) ERM PACS 81.5 / 82.2 feature-dim. PACS 82.8 / 83.3 sample-dim. PACS 82.2 / 83.5 W2D PACS 83.4 / 84.0 ERM(w SWA) PACS 82.5 / 83.0 feat-dim.(w SWA) PACS 83.5 / 83.7 sam-dim.(w SWA) PACS 83.4 / 83.7 W2D(w SWA) PACS 84.7 / 84.8

For agents

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

get_harvested_code_for_paper("2204.04384")
get_code_for_paper("2204.04384")
have("2204.04384")

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

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

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

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

Connect an agent — have() is free.