Papers › Calibrating Uncertainty for Zero-Shot Adversarial CLIP

Calibrating Uncertainty for Zero-Shot Adversarial CLIP

15 Dec 2025ICMLarXiv:2512.12997added by Syntology

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

Title, abstract, authors and date from arXiv's metadata (CC0); this paper is not in the Papers with Code archive (frozen 2025-07-28).

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.

PaperPDFCode 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="2512.12997")

Code

Syntology Ran 3 of 22 code samples harvested from 1 repository linked to this paper; 19 have no recorded run. Of those that ran: 2 ran · our draft was wrong; 1 ran · fixture could not drive it.

By repository: found in paper text by Syntology: 22 samples from 1 repository, 3 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

VivienLu/UCAT found in paper text by Syntology report

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

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

2ran · our draft was wrong
1ran · fixture could not drive it
19unverified

Licence: 22 of the 22 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 VivienLu/UCAT. “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.

accuracy VivienLu/UCAT/utils.py found in paper text by Syntology ran · fixture could not drive it no licence file found · pointer only · b0f936d4d6ae3b8c · report
get_loss VivienLu/UCAT/slip/slip_models.py found in paper text by Syntology ran · our draft was wrong no licence file found · pointer only · 4c34821ae12949e9 · report
get_metric_names VivienLu/UCAT/slip/slip_models.py found in paper text by Syntology ran · our draft was wrong fingerprinted no licence file found · pointer only · 345ec4da9f331b85 · report
attack_pgd VivienLu/UCAT/attacks.py found in paper text by Syntology unverified no licence file found · pointer only · 6a6111640475b80b · report
attack_pgd VivienLu/UCAT/attacks_multilabel.py found in paper text by Syntology unverified no licence file found · pointer only · 3a8a760ecfb5b55a · report
au_dirichlet VivienLu/UCAT/slip-ucat.py found in paper text by Syntology unverified no licence file found · pointer only · 2561f9e79b1a7b83 · report
build_model VivienLu/UCAT/replace/model.py found in paper text by Syntology unverified no licence file found · pointer only · a25e1e252d00d120 · report
clamp VivienLu/UCAT/attacks.py found in paper text by Syntology unverified no licence file found · pointer only · 8a93e041134b597a · report
clip_img_preprocessing VivienLu/UCAT/models/model.py found in paper text by Syntology unverified no licence file found · pointer only · 405bd24ae83558d9 · report
compute_multilabel_metrics VivienLu/UCAT/main-multilabel.py found in paper text by Syntology unverified no licence file found · pointer only · 725e3cb076f6048b · report
cosine_lr VivienLu/UCAT/utils.py found in paper text by Syntology unverified no licence file found · pointer only · 932d44bbf8bd0e3f · report
create_logits VivienLu/UCAT/models/model.py found in paper text by Syntology unverified no licence file found · pointer only · cad29a7a417c68d3 · report
entropy_from_logits VivienLu/UCAT/slip-ucat.py found in paper text by Syntology unverified no licence file found · pointer only · d2d06e2a020d4fc5 · report
eu_dirichlet VivienLu/UCAT/slip-ucat.py found in paper text by Syntology unverified no licence file found · pointer only · 846e76d01ed68531 · report
fixed_patch VivienLu/UCAT/models/prompters.py found in paper text by Syntology unverified no licence file found · pointer only · 162f47c0241fc73c · report
getCLIP VivienLu/UCAT/util/model.py found in paper text by Syntology unverified no licence file found · pointer only · 81450906b6e6919b · report
normalize VivienLu/UCAT/models/model.py found in paper text by Syntology unverified no licence file found · pointer only · 638942a0de2d2288 · report
padding VivienLu/UCAT/models/prompters.py found in paper text by Syntology unverified no licence file found · pointer only · f5a7aedde2544358 · report
random_patch VivienLu/UCAT/models/prompters.py found in paper text by Syntology unverified no licence file found · pointer only · cd3ffbc5192b9ccf · report
refine_classname VivienLu/UCAT/utils.py found in paper text by Syntology unverified no licence file found · pointer only · 60ab7dcbb5498f88 · report
reshapeTransform14 VivienLu/UCAT/util/model.py found in paper text by Syntology unverified no licence file found · pointer only · 8126da3092bcfb30 · report
reshapeTransform7 VivienLu/UCAT/util/model.py found in paper text by Syntology unverified no licence file found · pointer only · 2acf843d6df1edf4 · report

Results from the paper

The Papers with Code archive ends with its 2025-07-28 snapshot. This paper's arXiv identifier, 2512.12997, was issued in December 2025, after that date, so the archive has no leaderboard rows for it.

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