Papers › Feature Distillation: DNN-Oriented JPEG Compression Against Adversarial Examples

Feature Distillation: DNN-Oriented JPEG Compression Against Adversarial Examples

14 Mar 2018CVPR 2019 6arXiv:1803.05787archive 2025-07-28

Zihao Liu, Qi Liu, Tao Liu, Nuo Xu, Xue Lin, Yanzhi Wang, Wujie Wen

Image compression-based approaches for defending against the adversarial-example attacks, which threaten the safety use of deep neural networks (DNN), have been investigated recently. However, prior works mainly rely on directly tuning parameters like compression rate, to blindly reduce image features, thereby lacking guarantee on both defense efficiency (i.e. accuracy of polluted images) and classification accuracy of benign images, after applying defense methods. To overcome these limitations, we propose a JPEG-based defensive compression framework, namely "feature distillation", to effectively rectify adversarial examples without impacting classification accuracy on benign data. Our framework significantly escalates the defense efficiency with marginal accuracy reduction using a two-step method: First, we maximize malicious features filtering of adversarial input perturbations by developing defensive quantization in frequency domain of JPEG compression or decompression, guided by a semi-analytical method; Second, we suppress the distortions of benign features to restore classification accuracy through a DNN-oriented quantization refine process. Our experimental results show that proposed "feature distillation" can significantly surpass the latest input-transformation based mitigations such as Quilting and TV Minimization in three aspects, including defense efficiency (improve classification accuracy from ∼20% to ∼90% on adversarial examples), accuracy of benign images after defense (≤1% accuracy degradation), and processing time per image (∼259× Speedup). Moreover, our solution can also provide the best defense efficiency (∼60% accuracy) against the recent adaptive attack with least accuracy reduction (∼1%) on benign images when compared with other input-transformation based defense methods.

PaperPDFConference PDFCodeCode 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="1803.05787")

Code

Syntology Ran 3 of 17 code samples harvested from 2 repositories linked to this paper; 14 have no recorded run. Of those that ran: 3 ran · honoured contract.

By repository: community (archive-listed): 17 samples from 2 repositories, 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.

zihaoliu123/DeepN-Jpeg mentioned on GitHubtf 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

17 samples harvested; 3 ran; 3 honoured the contract we drafted; 14 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.

3ran · honoured contract
14unverified

Licence: 3 of the 17 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 2 repositories linked to this paper, official or community; each sample names its own and says which. “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.

dct2 zihaoliu123/DeepN-Jpeg/DeepN.py community (archive-listed) ran · honoured contract fingerprinted no licence file found · pointer only · f3d0ff33a5acd9db · report
idct2 zihaoliu123/DeepN-Jpeg/DeepN.py community (archive-listed) ran · honoured contract fingerprinted no licence file found · pointer only · 7d7d7dbde209f018 · report
rfft2 zihaoliu123/DeepN-Jpeg/DeepN.py community (archive-listed) ran · honoured contract fingerprinted no licence file found · pointer only · b7b553d7b6097fa1 · report
carlini_cifar10_model zihaoliu123/Feature-Distillation-DNN-Oriented-JPEG-Compression-Against-Adversarial-Examples/models/carlini_models.py community (archive-listed) unverified MIT (permissive) · ef12250921907cf2 · report
carlini_mnist_model zihaoliu123/Feature-Distillation-DNN-Oriented-JPEG-Compression-Against-Adversarial-Examples/models/carlini_models.py community (archive-listed) unverified MIT (permissive) · f789e91ec8254a1c · report
carlini_model zihaoliu123/Feature-Distillation-DNN-Oriented-JPEG-Compression-Against-Adversarial-Examples/models/carlini_models.py community (archive-listed) unverified MIT (permissive) · 79976c3eaf7aaa7c · report
convert_model zihaoliu123/Feature-Distillation-DNN-Oriented-JPEG-Compression-Against-Adversarial-Examples/attacks/carlini_wrapper.py community (archive-listed) unverified MIT (permissive) · dce02585e3349215 · report
data_imagenet zihaoliu123/Feature-Distillation-DNN-Oriented-JPEG-Compression-Against-Adversarial-Examples/datasets/imagenet.py community (archive-listed) unverified MIT (permissive) · 590145ff5c062ed7 · report
get_first_n_examples_id_each_class zihaoliu123/Feature-Distillation-DNN-Oriented-JPEG-Compression-Against-Adversarial-Examples/datasets/datasets_utils.py community (archive-listed) unverified MIT (permissive) · 4686f69d35b1edf8 · report
get_least_likely_class zihaoliu123/Feature-Distillation-DNN-Oriented-JPEG-Compression-Against-Adversarial-Examples/datasets/datasets_utils.py community (archive-listed) unverified MIT (permissive) · cd5e76389e4061b6 · report
get_next_class zihaoliu123/Feature-Distillation-DNN-Oriented-JPEG-Compression-Against-Adversarial-Examples/datasets/datasets_utils.py community (archive-listed) unverified MIT (permissive) · f32016fdaf8ee137 · report
load_single_image zihaoliu123/Feature-Distillation-DNN-Oriented-JPEG-Compression-Against-Adversarial-Examples/datasets/imagenet.py community (archive-listed) unverified MIT (permissive) · e5d6aed08c580cd2 · report
override_params zihaoliu123/Feature-Distillation-DNN-Oriented-JPEG-Compression-Against-Adversarial-Examples/attacks/cleverhans_wrapper.py community (archive-listed) unverified MIT (permissive) · 89dc5724554cf57b · report
override_params zihaoliu123/Feature-Distillation-DNN-Oriented-JPEG-Compression-Against-Adversarial-Examples/attacks/deepfool_wrapper.py community (archive-listed) unverified MIT (permissive) · 05c5269091bda68b · report
pgdtrained_mnist_model zihaoliu123/Feature-Distillation-DNN-Oriented-JPEG-Compression-Against-Adversarial-Examples/models/pgdtrained_models.py community (archive-listed) unverified MIT (permissive) · 9890ea8ff5e16c13 · report
prepare_attack zihaoliu123/Feature-Distillation-DNN-Oriented-JPEG-Compression-Against-Adversarial-Examples/attacks/deepfool_wrapper.py community (archive-listed) unverified MIT (permissive) · a88ae6b0472e0db9 · report
wrap_to_carlini_model zihaoliu123/Feature-Distillation-DNN-Oriented-JPEG-Compression-Against-Adversarial-Examples/attacks/carlini_wrapper.py community (archive-listed) unverified MIT (permissive) · a91f7c1babdfb8d5 · report

Tasks

ClassificationGeneral ClassificationImage CompressionQuantization

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

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