SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2512.12997 · ICML · 2025

Calibrating Uncertainty for Zero-Shot Adversarial CLIP

Yang Yang, Qibin Zhao, Zerui Tao, Wenjing Lu, Yuning Qiu, Dongping Zhang

arXiv · PDF · Open in the Atlas

Code that ran

18 of 22 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 18 failures of our instrument; 4 no recorded run), measured 2026-11-23; 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/2512.12997.json · badge: /api/ran/2512.12997.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
VivienLu/UCAT canonical (classifier label)
classifier basis: census
18 ran · 4 no recorded run
FunctionStatusWhere it lives
accuracy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
VivienLu/UCAT/utils.py
pointer only (licence: NONE) · get_code("b0f936d4d6ae3b8c")
How it ran

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

au_dirichlet Ran
ran; our contract draft was wrong, not the code
VivienLu/UCAT/slip-ucat.py
pointer only (licence: NONE) · get_code("2561f9e79b1a7b83")
How it ran

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

clip_img_preprocessing Ran
ran; our contract draft was wrong, not the code
VivienLu/UCAT/models/model.py
pointer only (licence: NONE) · get_code("405bd24ae83558d9")
How it ran

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

compute_multilabel_metrics Ran
ran; our contract draft was wrong, not the code
VivienLu/UCAT/main-multilabel.py
pointer only (licence: NONE) · get_code("725e3cb076f6048b")
How it ran

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

cosine_lr Ran
ran; our contract draft was wrong, not the code
VivienLu/UCAT/utils.py
pointer only (licence: NONE) · get_code("932d44bbf8bd0e3f")
How it ran

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

create_logits Ran
ran; our contract draft was wrong, not the code
VivienLu/UCAT/models/model.py
pointer only (licence: NONE) · get_code("cad29a7a417c68d3")
How it ran

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

entropy_from_logits Ran
ran; our contract draft was wrong, not the code
VivienLu/UCAT/slip-ucat.py
pointer only (licence: NONE) · get_code("d2d06e2a020d4fc5")
How it ran

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

eu_dirichlet Ran
ran; our contract draft was wrong, not the code
VivienLu/UCAT/slip-ucat.py
pointer only (licence: NONE) · get_code("846e76d01ed68531")
How it ran

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

fixed_patch Ran
ran; our contract draft was wrong, not the code
VivienLu/UCAT/models/prompters.py
pointer only (licence: NONE) · get_code("162f47c0241fc73c")
How it ran

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

getCLIP Ran
ran; our contract draft was wrong, not the code
VivienLu/UCAT/util/model.py
pointer only (licence: NONE) · get_code("81450906b6e6919b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, VivienLu/UCAT 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_loss Ran
ran; our contract draft was wrong, not the code
VivienLu/UCAT/slip/slip_models.py
pointer only (licence: NONE); the stored copy get_code serves, from anonymousmlsubmission/datadistributiontransfer, is pointer only (licence: NOASSERTION) · get_code("4c34821ae12949e9")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, VivienLu/UCAT 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_metric_names Ran
ran; our contract draft was wrong, not the code
VivienLu/UCAT/slip/slip_models.py
pointer only (licence: NONE); the stored copy get_code serves, from anonymousmlsubmission/datadistributiontransfer, is pointer only (licence: NOASSERTION) · get_code("345ec4da9f331b85")
How it ran

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

normalize Ran
ran; our contract draft was wrong, not the code
VivienLu/UCAT/models/model.py
pointer only (licence: NONE) · get_code("638942a0de2d2288")
How it ran

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

padding Ran
ran; our contract draft was wrong, not the code
VivienLu/UCAT/models/prompters.py
pointer only (licence: NONE) · get_code("f5a7aedde2544358")
How it ran

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

random_patch Ran
ran; our contract draft was wrong, not the code
VivienLu/UCAT/models/prompters.py
pointer only (licence: NONE) · get_code("cd3ffbc5192b9ccf")
How it ran

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

refine_classname Ran
ran; our contract draft was wrong, not the code
VivienLu/UCAT/utils.py
pointer only (licence: NONE) · get_code("60ab7dcbb5498f88")
How it ran

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

reshapeTransform14 Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
VivienLu/UCAT/util/model.py
pointer only (licence: NONE) · get_code("8126da3092bcfb30")
How it ran

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

reshapeTransform7 Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
VivienLu/UCAT/util/model.py
pointer only (licence: NONE) · get_code("2acf843d6df1edf4")
How it ran

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

attack_pgd Not yet run
unverified (harvested, no recorded run)
VivienLu/UCAT/attacks.py
pointer only (licence: NONE) · get_code("6a6111640475b80b")
How it ran

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

attack_pgd Not yet run
unverified (harvested, no recorded run)
VivienLu/UCAT/attacks_multilabel.py
pointer only (licence: NONE) · get_code("3a8a760ecfb5b55a")
How it ran

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

build_model Not yet run
unverified (harvested, no recorded run)
VivienLu/UCAT/replace/model.py
pointer only (licence: NONE) · get_code("a25e1e252d00d120")
How it ran

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

clamp Not yet run
unverified (harvested, no recorded run)
VivienLu/UCAT/attacks.py
pointer only (licence: NONE) · get_code("8a93e041134b597a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, VivienLu/UCAT 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 22 samples lifted from this paper's linked repositories, 22 carry a function identity and 0 do not. Of the 22 distinct functions with an identity, 13 are also present in other papers whose code we hold (13 with at least one paper dated earlier, 0 the same month, 3 later) and 9 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
accuracy 116 other papers
109 dated earlier, 6 later, 1 same year, order not determinable · 8 only as an assembly brick
1502.03044 (2015-02)
Show, Attend and Tell: Neural Image Caption Generation with Visual Attention
1610.05820 (2016-10)
Membership Inference Attacks Against Machine Learning Models
1905.03696 (2019-05)
HAWQ: Hessian AWare Quantization of Neural Networks with Mixed-Precision
and 113 more not named here
clamp 33 other papers
33 dated earlier · 1 only as an assembly brick
1706.06083 (2017-06)
Towards Deep Learning Models Resistant to Adversarial Attacks
2001.03994 (2020-01)
Fast is better than free: Revisiting adversarial training
2002.11569 (2020-02)
Overfitting in adversarially robust deep learning
and 30 more not named here
cosine_lr 12 other papers
12 dated earlier
2203.17274 (2022-03)
Exploring Visual Prompts for Adapting Large-Scale Models
2209.00179 (2022-09)
Universal Vision-Language Dense Retrieval: Learning A Unified Representation Space for Multi-Modal Retrieval
2302.14042 (2023-02)
Knowledge-enhanced Visual-Language Pre-training on Chest Radiology Images
and 9 more not named here
fixed_patch 7 other papers
6 dated earlier, 1 later
2203.17274 (2022-03)
Exploring Visual Prompts for Adapting Large-Scale Models
2303.08138 (2023-03)
Diversity-Aware Meta Visual Prompting
2312.08010 (2023-12)
EZ-CLIP: Efficient Zeroshot Video Action Recognition
and 4 more not named here
padding 7 other papers
6 dated earlier, 1 later
2203.17274 (2022-03)
Exploring Visual Prompts for Adapting Large-Scale Models
2303.08138 (2023-03)
Diversity-Aware Meta Visual Prompting
2312.08010 (2023-12)
EZ-CLIP: Efficient Zeroshot Video Action Recognition
and 4 more not named here
create_logits 6 other papers
6 dated earlier
2208.05318 (2022-08)
Generative Action Description Prompts for Skeleton-based Action Recognition
2312.03288 (2023-12)
STEP CATFormer: Spatial-Temporal Effective Body-Part Cross Attention Transformer for Skeleton-based Action Recognition
2401.04350 (2024-01)
Pre-trained Model Guided Fine-Tuning for Zero-Shot Adversarial Robustness
and 3 more not named here
random_patch 6 other papers
6 dated earlier
2203.17274 (2022-03)
Exploring Visual Prompts for Adapting Large-Scale Models
2303.08138 (2023-03)
Diversity-Aware Meta Visual Prompting
2312.08010 (2023-12)
EZ-CLIP: Efficient Zeroshot Video Action Recognition
and 3 more not named here
get_metric_names 3 other papers
3 dated earlier
136860514 (2022 (year only))
SLIP: Self-supervision meets Language-Image Pre-training
2302.13602 (2023-02)
The Role of Pre-training Data in Transfer Learning
2304.09172 (2023-04)
Hyperbolic Image-Text Representations
build_model 2 other papers
2 dated earlier
2401.04350 (2024-01)
Pre-trained Model Guided Fine-Tuning for Zero-Shot Adversarial Robustness
2410.21802 (2024-10)
Text-Guided Attention is All You Need for Zero-Shot Robustness in Vision-Language Models
refine_classname 2 other papers
2 dated earlier
2401.04350 (2024-01)
Pre-trained Model Guided Fine-Tuning for Zero-Shot Adversarial Robustness
2404.19287 (2024-04)
Revisiting the Adversarial Robustness of Vision Language Models: a Multimodal Perspective
clip_img_preprocessing 1 other paper
1 dated earlier
2410.21802 (2024-10)
Text-Guided Attention is All You Need for Zero-Shot Robustness in Vision-Language Models
get_loss 1 other paper
1 dated earlier
2302.13602 (2023-02)
The Role of Pre-training Data in Transfer Learning
normalize 1 other paper
1 dated earlier
2410.21802 (2024-10)
Text-Guided Attention is All You Need for Zero-Shot Robustness in Vision-Language Models

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

CLIP delivers strong zero-shot classification but remains highly vulnerable to adversarial attacks. Prior adversarial fine-tuning work primarily matches predicted logits between clean and adversarial examples, which overlooks uncertainty calibration and may degrade the zero-shot generalization. A common expectation in reliable uncertainty estimation is that predictive uncertainty should increase as inputs become more difficult or shift away from the training distribution. However, we frequently observe the opposite in the adversarial setting: perturbations not only degrade accuracy but also suppress uncertainty, leading to severe miscalibration and over-confidence. This reveals a critical reliability gap beyond robustness. To bridge this gap, we propose an adversarial fine-tuning objective for CLIP considering both accuracy and uncertainty. By reparameterizing CLIP outputs as the concentration parameters of a Dirichlet distribution, we propose a unified representation that captures relative semantic structure and confidence magnitude. This enables holistic distribution alignment under perturbations, moving beyond single-logit anchoring and restoring calibrated uncertainty. Experiments across multiple zero-shot benchmarks demonstrate that our method significantly improves uncertainty calibration and achieves competitive adversarial robustness while preserving clean accuracy.

For agents

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

get_harvested_code_for_paper("2512.12997")
get_code_for_paper("2512.12997")
have("2512.12997")

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

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

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

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

Connect an agent — have() is free.