Papers › Enhance the Visual Representation via Discrete Adversarial Training

Enhance the Visual Representation via Discrete Adversarial Training

16 Sep 2022arXiv:2209.07735archive 2025-07-28

Xiaofeng Mao, Yuefeng Chen, Ranjie Duan, Yao Zhu, Gege Qi, Shaokai Ye, Xiaodan Li, Rong Zhang, Hui Xue

Adversarial Training (AT), which is commonly accepted as one of the most effective approaches defending against adversarial examples, can largely harm the standard performance, thus has limited usefulness on industrial-scale production and applications. Surprisingly, this phenomenon is totally opposite in Natural Language Processing (NLP) task, where AT can even benefit for generalization. We notice the merit of AT in NLP tasks could derive from the discrete and symbolic input space. For borrowing the advantage from NLP-style AT, we propose Discrete Adversarial Training (DAT). DAT leverages VQGAN to reform the image data to discrete text-like inputs, i.e. visual words. Then it minimizes the maximal risk on such discrete images with symbolic adversarial perturbations. We further give an explanation from the perspective of distribution to demonstrate the effectiveness of DAT. As a plug-and-play technique for enhancing the visual representation, DAT achieves significant improvement on multiple tasks including image classification, object detection and self-supervised learning. Especially, the model pre-trained with Masked Auto-Encoding (MAE) and fine-tuned by our DAT without extra data can get 31.40 mCE on ImageNet-C and 32.77% top-1 accuracy on Stylized-ImageNet, building the new state-of-the-art. The code will be available at https://github.com/alibaba/easyrobust.

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

Code

Syntology Ran 10 of 11 code samples harvested from 1 repository linked to this paper; 1 has no recorded run. Of those that ran: 2 ran · honoured contract; 3 ran · our draft was wrong; 5 ran with no contract checked.

By repository: official repository: 10 samples from 1 repository, 9 ran; 1 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

alibaba/easyrobust officialpytorch 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

11 samples harvested; 10 ran; 2 honoured the contract we drafted; 1 has 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 · honoured contract
3ran · our draft was wrong
5ran
1unverified

Licence: 1 of the 11 samples is 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 alibaba/easyrobust. Some samples are identical code Syntology first harvested from another repository; for those, this paper's copy is not located and its licence is not recorded. “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.

Diffeo alibaba/easyrobust/easyrobust/modules/prime.py official repository ran fingerprinted Apache-2.0 (permissive) · 5f368427f2d48e50 · report
PRIMEAugModule alibaba/easyrobust/easyrobust/modules/prime.py official repository ran Apache-2.0 (permissive) · 5b26e951879d385b · report
RandomFilter alibaba/easyrobust/easyrobust/modules/prime.py official repository ran fingerprinted Apache-2.0 (permissive) · 03f527454201d6e7 · report
RandomSmoothColor alibaba/easyrobust/easyrobust/modules/prime.py official repository ran fingerprinted Apache-2.0 (permissive) · b79407df1fc77419 · report
TransformLayer alibaba/easyrobust/easyrobust/modules/prime.py official repository ran Apache-2.0 (permissive) · 4e905fbdfa4e05cc · report
deform alibaba/easyrobust/easyrobust/modules/prime.py official repository ran · our draft was wrong Apache-2.0 (permissive) · 49c4bfde12e638af · report
remap alibaba/easyrobust/easyrobust/modules/prime.py official repository ran · our draft was wrong Apache-2.0 (permissive) · f9efe607667fba03 · report
scalar_field alibaba/easyrobust/easyrobust/modules/prime.py official repository ran · honoured contract Apache-2.0 (permissive) · 21e1843fa11d415e · report
temperature_range alibaba/easyrobust/easyrobust/modules/prime.py official repository ran · honoured contract Apache-2.0 (permissive) · f8159fb1492781a3 · report
PRIMEAugmentation32 alibaba/easyrobust/easyrobust/modules/prime.py official repository unverified Apache-2.0 (permissive) · 7796b07f8bd25227 · report
scalar_field_modes identical code first harvested elsewhere ran · our draft was wrong licence of this copy not recorded · e57e011fe9cb8615 · report

Tasks

Domain GeneralizationImage ClassificationObject DetectionSelf-Supervised Learningimage-classification

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Domain Generalization ImageNet-A MAE+DAT (ViT-H) Top-1 accuracy % 68.92 #11 of 39 Archive leaderboard report
Domain Generalization ImageNet-C MAE+DAT (ViT-H) Number of params 632M #3 of 47 Archive leaderboard report
Domain Generalization ImageNet-C MAE+DAT (ViT-H) mean Corruption Error (mCE) 31.4 #3 of 47 Archive leaderboard report
Domain Generalization ImageNet-R MAE+DAT (ViT-H) Top-1 Error Rate 34.39 #12 of 39 Archive leaderboard report
Domain Generalization ImageNet-Sketch MAE+DAT (ViT-H) Top-1 accuracy 50.03 #11 of 20 Archive leaderboard report
Domain Generalization Stylized-ImageNet MAE+DAT (ViT-H) Top 1 Accuracy 32.77 #1 of 3 Archive leaderboard report
Image Classification ImageNet MAE+DAT (ViT-H) Top 1 Accuracy 87.02% #110 of 1060 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

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