SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2411.19757 · NeurIPS · 2024

Dual Risk Minimization: Towards Next-Level Robustness in Fine-tuning Zero-Shot Models

Zhenguo Li, Ricardo Silva, Lanqing Hong, Nevin Zhang, Kaican Li, Weiyan Xie, Yongxiang Huang, Didan Deng

arXiv · PDF · Open in the Atlas

Code that ran

6 of 11 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; 5 failures of our instrument; 5 no recorded run), measured 2026-11-23; 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/2411.19757.json · badge: /api/ran/2411.19757.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
vaynexie/DRM canonical (classifier label)
classifier basis: census
5 ran · 5 no recorded run
vaynexie/drm canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
ClipLoss_c Ran
ran on a synthesized input · constructed an object; no result was computed
vaynexie/drm/clip_m/loss.py
pointer only (licence: NONE) · get_code("f2d33de0c5046a5c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, vaynexie/drm 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.

basic_clean Ran
ran; our contract draft was wrong, not the code
vaynexie/DRM/clip_m/tokenizer.py
pointer only (licence: NONE); the stored copy get_code serves, from ltpwy/MSCI, is pointer only (licence: NONE) · get_code("98f385d847636a3e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, vaynexie/DRM 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_pairs Ran
ran; our contract draft was wrong, not the code
vaynexie/DRM/clip_m/tokenizer.py
pointer only (licence: NONE) · get_code("d919ae32e5e4e616")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, vaynexie/DRM 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.

maybe_dictionarize Ran
ran; our contract draft was wrong, not the code
vaynexie/DRM/src/datasets/common.py
pointer only (licence: NONE) · get_code("c8c8c70c648c5698")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, vaynexie/DRM 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.

project_logits Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
vaynexie/DRM/src/datasets/imagenet.py
pointer only (licence: NONE) · get_code("9fbea808db47dc66")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, vaynexie/DRM 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.

whitespace_clean Ran
ran; our contract draft was wrong, not the code
vaynexie/DRM/clip_m/tokenizer.py
pointer only (licence: NONE); the stored copy get_code serves, from ltpwy/MSCI, is pointer only (licence: NONE) · get_code("9542161e9640b858")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, vaynexie/DRM 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.

build_model Not yet run
unverified (harvested, no recorded run)
vaynexie/DRM/clip_m/model.py
pointer only (licence: NONE); the stored copy get_code serves, from HesamAsad/TRACER, is pointer only (licence: NONE) · get_code("b64f67bec6a093b9")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, vaynexie/DRM 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.

gather_features Not yet run
unverified (harvested, no recorded run)
vaynexie/DRM/clip_m/loss.py
pointer only (licence: NONE); the stored copy get_code serves, from lxa9867/imagefolder, is pointer only (licence: NOASSERTION) · get_code("ddcbd45e940484ee")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, vaynexie/DRM 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.

get_classnames Not yet run
unverified (harvested, no recorded run)
vaynexie/DRM/src/datasets/imagenet_classnames.py
pointer only (licence: NONE) · get_code("8d5ec0683c47758f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, vaynexie/DRM 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.

get_features Not yet run
unverified (harvested, no recorded run)
vaynexie/DRM/src/datasets/common.py
pointer only (licence: NONE) · get_code("4b5474dbf23edd87")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, vaynexie/DRM 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.

get_features_helper Not yet run
unverified (harvested, no recorded run)
vaynexie/DRM/src/datasets/common.py
pointer only (licence: NONE) · get_code("aeb196e862a2c0ca")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, vaynexie/DRM 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 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 8 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 6 the same month, 5 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
get_pairs 258 other papers
191 dated earlier, 5 the same month, 54 later, 7 same year, order not determinable, 1 undated · 4 only as an assembly brick
1802.06474 (2018-02)
A Closed-form Solution to Photorealistic Image Stylization
1803.01128 (2018-03)
Seq2Sick: Evaluating the Robustness of Sequence-to-Sequence Models with Adversarial Examples
1809.00125 (2018-09)
Simple Fusion: Return of the Language Model
and 255 more not named here
whitespace_clean 231 other papers
169 dated earlier, 5 the same month, 49 later, 7 same year, order not determinable, 1 undated · 4 only as an assembly brick
1901.07441 (2019-01)
PadChest: A large chest x-ray image dataset with multi-label annotated reports
2107.06383 (2021-07)
How Much Can CLIP Benefit Vision-and-Language Tasks?
2108.10904 (2021-08)
SimVLM: Simple Visual Language Model Pretraining with Weak Supervision
and 228 more not named here
basic_clean 218 other papers
169 dated earlier, 5 the same month, 36 later, 7 same year, order not determinable, 1 undated · 4 only as an assembly brick
1901.07441 (2019-01)
PadChest: A large chest x-ray image dataset with multi-label annotated reports
2107.06383 (2021-07)
How Much Can CLIP Benefit Vision-and-Language Tasks?
2108.10904 (2021-08)
SimVLM: Simple Visual Language Model Pretraining with Weak Supervision
and 215 more not named here
gather_features
brick of this paper's assembly: helper
57 other papers
46 dated earlier, 3 the same month, 7 later, 1 same year, order not determinable · 1 only as an assembly brick
2206.01670 (2022-06)
Egocentric Video-Language Pretraining
2212.00638 (2022-12)
Finetune like you pretrain: Improved finetuning of zero-shot vision models
2301.07094 (2023-01)
Learning Customized Visual Models with Retrieval-Augmented Knowledge
and 54 more not named here
build_model 8 other papers
6 dated earlier, 1 the same month, 1 later
2208.05592 (2022-08)
Patching open-vocabulary models by interpolating weights
2212.00638 (2022-12)
Finetune like you pretrain: Improved finetuning of zero-shot vision models
2302.13602 (2023-02)
The Role of Pre-training Data in Transfer Learning
and 5 more not named here
project_logits 7 other papers
6 dated earlier, 1 the same month
2303.16203 (2023-03)
Your Diffusion Model is Secretly a Zero-Shot Classifier
2311.01723 (2023-11)
Towards Calibrated Robust Fine-Tuning of Vision-Language Models
2312.02546 (2023-12)
Machine Vision Therapy: Multimodal Large Language Models Can Enhance Visual Robustness via Denoising In-Context Learning
and 4 more not named here
get_features_helper 4 other papers
4 dated earlier
2308.01313 (2023-08)
PerceptionCLIP: Visual Classification by Inferring and Conditioning on Contexts
2311.01723 (2023-11)
Towards Calibrated Robust Fine-Tuning of Vision-Language Models
2312.02546 (2023-12)
Machine Vision Therapy: Multimodal Large Language Models Can Enhance Visual Robustness via Denoising In-Context Learning
and 1 more not named here
get_features 3 other papers
3 dated earlier
2308.01313 (2023-08)
PerceptionCLIP: Visual Classification by Inferring and Conditioning on Contexts
2312.02546 (2023-12)
Machine Vision Therapy: Multimodal Large Language Models Can Enhance Visual Robustness via Denoising In-Context Learning
2410.03955 (2024-10)
A Retention-Centric Framework for Continual Learning with Guaranteed Model Developmental Safety

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-23.

Repositories linked to this paper

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

Abstract

Fine-tuning foundation models often compromises their robustness to distribution shifts. To remedy this, most robust fine-tuning methods aim to preserve the pretrained features. However, not all pre-trained features are robust and those methods are largely indifferent to which ones to preserve. We propose dual risk minimization (DRM), which combines empirical risk minimization with worst-case risk minimization, to better preserve the core features of downstream tasks. In particular, we utilize core-feature descriptions generated by LLMs to induce core-based zero-shot predictions which then serve as proxies to estimate the worst-case risk. DRM balances two crucial aspects of model robustness: expected performance and worst-case performance, establishing a new state of the art on various real-world benchmarks. DRM significantly improves the out-of-distribution performance of CLIP ViT-L/14@336 on ImageNet (75.9→77.1), WILDS-iWildCam (47.1→51.8), and WILDS-FMoW (50.7→53.1); opening up new avenues for robust fine-tuning. Our code is available at https://github.com/vaynexie/DRM.

For agents

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

get_harvested_code_for_paper("2411.19757")
get_code_for_paper("2411.19757")
have("2411.19757")

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

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

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

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

Connect an agent — have() is free.