{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/empir-ensembles-of-mixed-precision-deep-1","title":"EMPIR: Ensembles of Mixed Precision Deep Networks for Increased Robustness against Adversarial Attacks","arxiv_id":"2004.10162","date":"2020-04-21","proceeding":"ICLR 2020 1","authors":["Sanchari Sen","Balaraman Ravindran","Anand Raghunathan"],"abstract":"Ensuring robustness of Deep Neural Networks (DNNs) is crucial to their adoption in safety-critical applications such as self-driving cars, drones, and healthcare. Notably, DNNs are vulnerable to adversarial attacks in which small input perturbations can produce catastrophic misclassifications. In this work, we propose EMPIR, ensembles of quantized DNN models with different numerical precisions, as a new approach to increase robustness against adversarial attacks. EMPIR is based on the observation that quantized neural networks often demonstrate much higher robustness to adversarial attacks than full precision networks, but at the cost of a substantial loss in accuracy on the original (unperturbed) inputs. EMPIR overcomes this limitation to achieve the 'best of both worlds', i.e., the higher unperturbed accuracies of the full precision models combined with the higher robustness of the low precision models, by composing them in an ensemble. Further, as low precision DNN models have significantly lower computational and storage requirements than full precision models, EMPIR models only incur modest compute and memory overheads compared to a single full-precision model (<25% in our evaluations). We evaluate EMPIR across a suite of DNNs for 3 different image recognition tasks (MNIST, CIFAR-10 and ImageNet) and under 4 different adversarial attacks. Our results indicate that EMPIR boosts the average adversarial accuracies by 42.6%, 15.2% and 10.5% for the DNN models trained on the MNIST, CIFAR-10 and ImageNet datasets respectively, when compared to single full-precision models, without sacrificing accuracy on the unperturbed inputs.","url_abs":"https://arxiv.org/abs/2004.10162v1","url_pdf":"https://arxiv.org/pdf/2004.10162v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"empir-ensembles-of-mixed-precision-deep-1","repo_url":"https://github.com/sancharisen/EMPIR","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"self-driving-cars","task_name":"Self-Driving Cars"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2004.10162","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2004.10162"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/sancharisen/EMPIR","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":2,"unverified":15},"by_repo_kind":{"official":{"samples":17,"ran":2,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":17,"samples":[{"code_sha256_prefix":"96b581b6ac010981","entry":"batch_indices","repo":"sancharisen/EMPIR","repo_kind":"official","path":"cleverhans/utils.py","file_url":"https://github.com/sancharisen/EMPIR/blob/HEAD/cleverhans/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"96b581b6ac010981"}},{"code_sha256_prefix":"563a92a1c7232061","entry":"other_classes","repo":"sancharisen/EMPIR","repo_kind":"official","path":"cleverhans/utils.py","file_url":"https://github.com/sancharisen/EMPIR/blob/HEAD/cleverhans/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"563a92a1c7232061"}},{"code_sha256_prefix":"69dbec087f603dc2","entry":"cnn_model","repo":"sancharisen/EMPIR","repo_kind":"official","path":"cleverhans/utils_keras.py","file_url":"https://github.com/sancharisen/EMPIR/blob/HEAD/cleverhans/utils_keras.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"69dbec087f603dc2"}},{"code_sha256_prefix":"4e8d1df070cb5f83","entry":"conv_2d","repo":"sancharisen/EMPIR","repo_kind":"official","path":"cleverhans/utils_keras.py","file_url":"https://github.com/sancharisen/EMPIR/blob/HEAD/cleverhans/utils_keras.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"4e8d1df070cb5f83"}},{"code_sha256_prefix":"5f6a796fa47c9ff8","entry":"data_mnist","repo":"sancharisen/EMPIR","repo_kind":"official","path":"cleverhans/utils_mnist.py","file_url":"https://github.com/sancharisen/EMPIR/blob/HEAD/cleverhans/utils_mnist.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"5f6a796fa47c9ff8"}},{"code_sha256_prefix":"46c4fbb3b28111b4","entry":"fgm","repo":"sancharisen/EMPIR","repo_kind":"official","path":"cleverhans/attacks_tf.py","file_url":"https://github.com/sancharisen/EMPIR/blob/HEAD/cleverhans/attacks_tf.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"46c4fbb3b28111b4"}},{"code_sha256_prefix":"669a4a70d107c4a4","entry":"fgsm","repo":"sancharisen/EMPIR","repo_kind":"official","path":"cleverhans/attacks.py","file_url":"https://github.com/sancharisen/EMPIR/blob/HEAD/cleverhans/attacks.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"669a4a70d107c4a4"}},{"code_sha256_prefix":"ab300465511282c2","entry":"fgsm","repo":"sancharisen/EMPIR","repo_kind":"official","path":"cleverhans/attacks_tf.py","file_url":"https://github.com/sancharisen/EMPIR/blob/HEAD/cleverhans/attacks_tf.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"ab300465511282c2"}},{"code_sha256_prefix":"33ce7291d7174c33","entry":"hard_sigmoid","repo":"sancharisen/EMPIR","repo_kind":"official","path":"cleverhans_tutorials/tutorial_models.py","file_url":"https://github.com/sancharisen/EMPIR/blob/HEAD/cleverhans_tutorials/tutorial_models.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"33ce7291d7174c33"}},{"code_sha256_prefix":"48e3be63336a0ac5","entry":"jsma","repo":"sancharisen/EMPIR","repo_kind":"official","path":"cleverhans/attacks.py","file_url":"https://github.com/sancharisen/EMPIR/blob/HEAD/cleverhans/attacks.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"48e3be63336a0ac5"}},{"code_sha256_prefix":"24e8cacf2e978687","entry":"model_loss","repo":"sancharisen/EMPIR","repo_kind":"official","path":"cleverhans/utils_tf.py","file_url":"https://github.com/sancharisen/EMPIR/blob/HEAD/cleverhans/utils_tf.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"24e8cacf2e978687"}},{"code_sha256_prefix":"457d5efa3991f205","entry":"normalized_sign_changes_op","repo":"sancharisen/EMPIR","repo_kind":"official","path":"cleverhans/utils_tf.py","file_url":"https://github.com/sancharisen/EMPIR/blob/HEAD/cleverhans/utils_tf.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"457d5efa3991f205"}},{"code_sha256_prefix":"88e4e6b729fd7669","entry":"quantize_grad","repo":"sancharisen/EMPIR","repo_kind":"official","path":"cleverhans_tutorials/tutorial_models.py","file_url":"https://github.com/sancharisen/EMPIR/blob/HEAD/cleverhans_tutorials/tutorial_models.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"88e4e6b729fd7669"}},{"code_sha256_prefix":"45a3aac96deaa69d","entry":"sign_changes_count_op","repo":"sancharisen/EMPIR","repo_kind":"official","path":"cleverhans/utils_tf.py","file_url":"https://github.com/sancharisen/EMPIR/blob/HEAD/cleverhans/utils_tf.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"45a3aac96deaa69d"}},{"code_sha256_prefix":"436b1ff1875d0cc7","entry":"to_categorical","repo":"sancharisen/EMPIR","repo_kind":"official","path":"cleverhans/utils.py","file_url":"https://github.com/sancharisen/EMPIR/blob/HEAD/cleverhans/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"436b1ff1875d0cc7"}},{"code_sha256_prefix":"265a717d9cb4752d","entry":"vatm","repo":"sancharisen/EMPIR","repo_kind":"official","path":"cleverhans/attacks.py","file_url":"https://github.com/sancharisen/EMPIR/blob/HEAD/cleverhans/attacks.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"265a717d9cb4752d"}},{"code_sha256_prefix":"1d76eb5891f63a2f","entry":"vatm","repo":"sancharisen/EMPIR","repo_kind":"official","path":"cleverhans/attacks_tf.py","file_url":"https://github.com/sancharisen/EMPIR/blob/HEAD/cleverhans/attacks_tf.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"1d76eb5891f63a2f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}