SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1802.06816 · 2018

Shield: Fast, Practical Defense and Vaccination for Deep Learning using JPEG Compression

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 8 functions out of this paper's own repositories and ran 3 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
poloclub/jpeg-defense canonical 3 of 8
FunctionStatusWhere it lives
denoise_tv_bregman Ran poloclub/jpeg-defense/shield/utils/defenses.py
code served (permissive licence) · get_code("25314c2b6b249806")
jpeg_compress Ran poloclub/jpeg-defense/shield/utils/defenses.py
code served (permissive licence) · get_code("461c651a7c596197")
median_filter Ran poloclub/jpeg-defense/shield/utils/defenses.py
code served (permissive licence) · get_code("4f75328fa7d45fe6")
convert_to_tf_records Not yet run poloclub/jpeg-defense/setup/get_imagenet.py
code served (permissive licence) · get_code("6ef0c2eb320c0a86")
decode_tf_example Not yet run poloclub/jpeg-defense/shield/utils/io.py
code served (permissive licence) · get_code("d00593d15ba54117")
download_dataset Not yet run poloclub/jpeg-defense/setup/get_imagenet.py
code served (permissive licence) · get_code("ced1769c54400840")
encode_tf_example Not yet run poloclub/jpeg-defense/shield/utils/io.py
code served (permissive licence) · get_code("84c15e8da6684464")
load_image_data_from_tfrecords Not yet run poloclub/jpeg-defense/shield/utils/io.py
code served (permissive licence) · get_code("2151d7e8bc19e996")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

The rapidly growing body of research in adversarial machine learning has demonstrated that deep neural networks (DNNs) are highly vulnerable to adversarially generated images. This underscores the urgent need for practical defense that can be readily deployed to combat attacks in real-time. Observing that many attack strategies aim to perturb image pixels in ways that are visually imperceptible, we place JPEG compression at the core of our proposed Shield defense framework, utilizing its capability to effectively "compress away" such pixel manipulation. To immunize a DNN model from artifacts introduced by compression, Shield "vaccinates" a model by re-training it with compressed images, where different compression levels are applied to generate multiple vaccinated models that are ultimately used together in an ensemble defense. On top of that, Shield adds an additional layer of protection by employing randomization at test time that compresses different regions of an image using random compression levels, making it harder for an adversary to estimate the transformation performed. This novel combination of vaccination, ensembling, and randomization makes Shield a fortified multi-pronged protection. We conducted extensive, large-scale experiments using the ImageNet dataset, and show that our approaches eliminate up to 94% of black-box attacks and 98% of gray-box attacks delivered by the recent, strongest attacks, such as Carlini-Wagner's L2 and DeepFool. Our approaches are fast and work without requiring knowledge about the model.

For agents

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

get_harvested_code_for_paper("1802.06816")
get_code_for_paper("1802.06816")
have("1802.06816")

Connect an agent — have() is free.