SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2506.03355 · NeurIPS · 2025

Robustness in Both Domains: CLIP Needs a Robust Text Encoder

Matthias Hein, Volkan Cevher, Yongtao Wu, Elias Rocamora, Naman Singh, Christian Schlarmann

arXiv · PDF · Open in the Atlas

Code that ran

9 of 12 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; 8 failures of our instrument; 3 no recorded run), measured 2026-11-22; 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/2506.03355.json · badge: /api/ran/2506.03355.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
LIONS-EPFL/LEAF community
Papers with Code archive
8 ran · 3 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
ComputeLossWrapper Ran
ran on a synthesized input · constructed an object; no result was computed
LIONS-EPFL/LEAF/src/robust_vlm/train/adversarial_training_clip.py
pointer only (licence: NONE) · get_code("04f1b42c2632778c")
How it ran

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

ce Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
LIONS-EPFL/LEAF/src/robust_vlm/train/adversarial_training_clip.py
pointer only (licence: NONE) · get_code("f06d36585e5d6dec")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, LIONS-EPFL/LEAF 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_acc Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from chs20/robustvlm
pointer only · get_code("1f2be2216dc3f7cd")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
LIONS-EPFL/LEAF/src/robust_vlm/train/adversarial_training_clip.py
pointer only (licence: NONE) · get_code("3bdfc4201b35c55b")
How it ran

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

l1 Ran
ran; our contract draft was wrong, not the code
LIONS-EPFL/LEAF/src/robust_vlm/train/adversarial_training_clip.py
pointer only (licence: NONE) · get_code("2a8adc0b6b7fe4f7")
How it ran

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

l2 Ran
ran; our contract draft was wrong, not the code
LIONS-EPFL/LEAF/src/robust_vlm/train/adversarial_training_clip.py
pointer only (licence: NONE) · get_code("caea55e9eda399d6")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, LIONS-EPFL/LEAF 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_grad Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
LIONS-EPFL/LEAF/src/robust_vlm/train/adversarial_training_clip.py
pointer only (licence: NONE) · get_code("6fffb629c7f9b304")
How it ran

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

pgd Ran
ran; our contract draft was wrong, not the code
LIONS-EPFL/LEAF/src/robust_vlm/train/adversarial_training_clip.py
pointer only (licence: NONE) · get_code("f9a6cd97c45d4f91")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, LIONS-EPFL/LEAF 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_perturbation Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
LIONS-EPFL/LEAF/src/robust_vlm/train/adversarial_training_clip.py
pointer only (licence: NONE) · get_code("74d23c944bf73c1e")
How it ran

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

evaluate Not yet run
unverified (harvested, no recorded run)
LIONS-EPFL/LEAF/src/robust_vlm/train/adversarial_training_clip.py
pointer only (licence: NONE) · get_code("c5a17635441cc52d")
How it ran

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

train_one_epoch Not yet run
unverified (harvested, no recorded run)
LIONS-EPFL/LEAF/src/robust_vlm/train/adversarial_training_clip.py
pointer only (licence: NONE) · get_code("bca77f125ea3f056")
How it ran

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

unwrap_model Not yet run
unverified (harvested, no recorded run)
LIONS-EPFL/LEAF/src/robust_vlm/train/adversarial_training_clip.py
pointer only (licence: NONE) · get_code("a72cc58ae0995b23")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, LIONS-EPFL/LEAF 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 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 0 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
compute_acc
brick of this paper's assembly: helper
2 other papers
2 dated earlier
2308.10741 (2023-08)
On the Adversarial Robustness of Multi-Modal Foundation Models
2402.12336 (2024-02)
Robust CLIP: Unsupervised Adversarial Fine-Tuning of Vision Embeddings for Robust Large Vision-Language Models
normalize_grad
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2402.12336 (2024-02)
Robust CLIP: Unsupervised Adversarial Fine-Tuning of Vision Embeddings for Robust Large Vision-Language Models
project_perturbation
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2402.12336 (2024-02)
Robust CLIP: Unsupervised Adversarial Fine-Tuning of Vision Embeddings for Robust Large 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-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

Adversarial input attacks can cause a significant shift of CLIP embeddings. This can affect the downstream robustness of models incorporating CLIP in the pipeline, such as text-to-image generative models or large vision language models. While some efforts have been done towards making the CLIP image encoders robust, the robustness of text encoders remains unexplored. In this work, we cover this gap in the literature. We propose LEAF: an efficient adversarial finetuning method for the text domain, with the ability to scale to large CLIP models. Our models significantly improve the zero-shot adversarial accuracy in the text domain, while maintaining the vision performance provided by robust image encoders. When combined with text-to-image diffusion models, we can improve the generation quality under adversarial noise. In multimodal retrieval tasks, LEAF improves the recall under adversarial noise over standard CLIP models. Finally, we show that robust text encoders facilitate better reconstruction of input text from its embedding via direct optimization. We open-source our code and models.

For agents

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

get_harvested_code_for_paper("2506.03355")
get_code_for_paper("2506.03355")
have("2506.03355")

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

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

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

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

Connect an agent — have() is free.