Papers › Predict then Interpolate: A Simple Algorithm to Learn Stable Classifiers

Predict then Interpolate: A Simple Algorithm to Learn Stable Classifiers

26 May 2021arXiv:2105.12628archive 2025-07-28

Yujia Bao, Shiyu Chang, Regina Barzilay

We propose Predict then Interpolate (PI), a simple algorithm for learning correlations that are stable across environments. The algorithm follows from the intuition that when using a classifier trained on one environment to make predictions on examples from another environment, its mistakes are informative as to which correlations are unstable. In this work, we prove that by interpolating the distributions of the correct predictions and the wrong predictions, we can uncover an oracle distribution where the unstable correlation vanishes. Since the oracle interpolation coefficients are not accessible, we use group distributionally robust optimization to minimize the worst-case risk across all such interpolations. We evaluate our method on both text classification and image classification. Empirical results demonstrate that our algorithm is able to learn robust classifiers (outperforms IRM by 23.85% on synthetic environments and 12.41% on natural environments). Our code and data are available at https://github.com/YujiaBao/Predict-then-Interpolate.

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

Code

Syntology Ran 7 of 14 code samples harvested from 1 repository linked to this paper; 7 have no recorded run. Of those that ran: 7 ran with no contract checked.

By repository: official repository: 14 samples from 1 repository, 7 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

YujiaBao/Predict-then-Interpolate 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

14 samples harvested; 7 ran; 0 honoured the contract we drafted; 7 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.

7ran
7unverified

Licence: 0 of the 14 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 YujiaBao/Predict-then-Interpolate. “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.

CNN YujiaBao/Predict-then-Interpolate/src/training/ours.py official repository ran · metamorphic tier: invariant MIT (permissive) · ca25c33b3ca5cfdf · report
EnvSampler YujiaBao/Predict-then-Interpolate/src/training/ours.py official repository ran MIT (permissive) · f7ae688015090bda · report
MLP YujiaBao/Predict-then-Interpolate/src/training/ours.py official repository ran · metamorphic tier: deterministic MIT (permissive) · 4abbc1fe2ff8fe59 · report
TextCNN YujiaBao/Predict-then-Interpolate/src/training/ours.py official repository ran MIT (permissive) · 6db576db849cbc06 · report
get_worst_acc YujiaBao/Predict-then-Interpolate/src/training/ours.py official repository ran MIT (permissive) · 293739fa3f3d2442 · report
train_dro_loop YujiaBao/Predict-then-Interpolate/src/training/ours.py official repository ran MIT (permissive) · 7a36ba56dd14524a · report
train_loop YujiaBao/Predict-then-Interpolate/src/training/ours.py official repository ran MIT (permissive) · d20003ab7073cb3f · report
Resnet50 YujiaBao/Predict-then-Interpolate/src/training/ours.py official repository unverified MIT (permissive) · ebd9154ebe926d64 · report
get_model YujiaBao/Predict-then-Interpolate/src/training/ours.py official repository unverified MIT (permissive) · b58c9caa079f744b · report
ours YujiaBao/Predict-then-Interpolate/src/training/ours.py official repository unverified MIT (permissive) · 07ef6f8504081267 · report
print_group_stats YujiaBao/Predict-then-Interpolate/src/training/ours.py official repository unverified MIT (permissive) · d6e4cdf35a01a72d · report
print_pretrain_res YujiaBao/Predict-then-Interpolate/src/training/ours.py official repository unverified MIT (permissive) · a0f178bab1948c23 · report
print_res YujiaBao/Predict-then-Interpolate/src/training/ours.py official repository unverified MIT (permissive) · a4a4e5dc0293f2f0 · report
test_loop YujiaBao/Predict-then-Interpolate/src/training/ours.py official repository unverified MIT (permissive) · 5f76e1e3b6bc10e1 · report

Tasks

Image ClassificationText Classificationimage-classificationtext-classification

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