{"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/deep-anomaly-detection-with-outlier-exposure","title":"Deep Anomaly Detection with Outlier Exposure","arxiv_id":"1812.04606","date":"2018-12-11","proceeding":"ICLR 2019 5","authors":["Dan Hendrycks","Mantas Mazeika","Thomas Dietterich"],"abstract":"It is important to detect anomalous inputs when deploying machine learning\nsystems. The use of larger and more complex inputs in deep learning magnifies\nthe difficulty of distinguishing between anomalous and in-distribution\nexamples. At the same time, diverse image and text data are available in\nenormous quantities. We propose leveraging these data to improve deep anomaly\ndetection by training anomaly detectors against an auxiliary dataset of\noutliers, an approach we call Outlier Exposure (OE). This enables anomaly\ndetectors to generalize and detect unseen anomalies. In extensive experiments\non natural language processing and small- and large-scale vision tasks, we find\nthat Outlier Exposure significantly improves detection performance. We also\nobserve that cutting-edge generative models trained on CIFAR-10 may assign\nhigher likelihoods to SVHN images than to CIFAR-10 images; we use OE to\nmitigate this issue. We also analyze the flexibility and robustness of Outlier\nExposure, and identify characteristics of the auxiliary dataset that improve\nperformance.","url_abs":"http://arxiv.org/abs/1812.04606v3","url_pdf":"http://arxiv.org/pdf/1812.04606v3.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":"deep-anomaly-detection-with-outlier-exposure","repo_url":"https://github.com/hendrycks/outlier-exposure","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}},{"paper_slug":"deep-anomaly-detection-with-outlier-exposure","repo_url":"https://github.com/AlexMeinke/Provable-OOD-Detection","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"deep-anomaly-detection-with-outlier-exposure","repo_url":"https://github.com/JakobCode/UncertaintyInNeuralNetworks_Resources","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}},{"paper_slug":"deep-anomaly-detection-with-outlier-exposure","repo_url":"https://github.com/albertkx/conal","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"deep-anomaly-detection-with-outlier-exposure","repo_url":"https://github.com/guyAmit/GLOD","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"deep-anomaly-detection-with-outlier-exposure","repo_url":"https://github.com/jun-cen/unified_open_set_recognition","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"deep-anomaly-detection-with-outlier-exposure","repo_url":"https://github.com/oliverzhang42/ood_medical_images","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"deep-anomaly-detection-with-outlier-exposure","repo_url":"https://github.com/sayakpaul/Generalized-ODIN-TF","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"deep-anomaly-detection-with-outlier-exposure","repo_url":"https://github.com/zjysteven/mixoe","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"anomaly-detection","task_name":"Anomaly Detection"},{"task_slug":"ood-detection","task_name":"Out of Distribution (OOD) Detection"},{"task_slug":"out-of-distribution-detection","task_name":"Out-of-Distribution Detection"}],"methods":[{"method_slug":"1x1-convolution","method_name":"1x1 Convolution"},{"method_slug":"average-pooling","method_name":"Average Pooling"},{"method_slug":"batch-normalization","method_name":"Batch Normalization"},{"method_slug":"bottleneck-residual-block","method_name":"Bottleneck Residual Block"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"global-average-pooling","method_name":"Global Average Pooling"},{"method_slug":"kaiming-initialization","method_name":"Kaiming Initialization"},{"method_slug":"max-pooling","method_name":"Max Pooling"},{"method_slug":"relu","method_name":"ReLU"},{"method_slug":"residual-block","method_name":"Residual Block"},{"method_slug":"residual-connection","method_name":"Residual Connection"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/out-of-distribution-detection-on-cifar-10","task":"Out-of-Distribution Detection","dataset":"CIFAR-10","model":"WRN 40-2 + OE","rank_in_archive_order":8,"of":10,"metrics":{"AUROC":"97.8","FPR95":"9.50"},"uses_additional_data":true},{"leaderboard":"/sota/out-of-distribution-detection-on-cifar-10","task":"Out-of-Distribution Detection","dataset":"CIFAR-10","model":"WRN 40-2 (MSP Baseline)","rank_in_archive_order":9,"of":10,"metrics":{"AUROC":"97.8","FPR95":"34.94"},"uses_additional_data":false},{"leaderboard":"/sota/out-of-distribution-detection-on-cifar-10-vs","task":"Out-of-Distribution Detection","dataset":"CIFAR-10 vs CIFAR-100","model":"WRN 40-2 + OE","rank_in_archive_order":10,"of":14,"metrics":{"AUPR":"76.2","AUROC":"93.3"},"uses_additional_data":true},{"leaderboard":"/sota/out-of-distribution-detection-on-cifar-100","task":"Out-of-Distribution Detection","dataset":"CIFAR-100","model":"WRN 40-2 + OE","rank_in_archive_order":3,"of":4,"metrics":{"FPR95":"38.50"},"uses_additional_data":true},{"leaderboard":"/sota/out-of-distribution-detection-on-cifar-100","task":"Out-of-Distribution Detection","dataset":"CIFAR-100","model":"WRN 40-2 (MSP Baseline)","rank_in_archive_order":4,"of":4,"metrics":{"FPR95":"62.66"},"uses_additional_data":false},{"leaderboard":"/sota/out-of-distribution-detection-on-cifar-100-vs-8","task":"Out-of-Distribution Detection","dataset":"CIFAR-100 vs SVHN","model":"OE","rank_in_archive_order":5,"of":5,"metrics":{"AUROC":"86.9"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/1812.04606","atlas_url":"https://app.syntology.ai/?focus=1812.04606","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1812.04606"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/oliverzhang42/ood_medical_images","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/JakobCode/UncertaintyInNeuralNetworks_Resources","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/guyAmit/GLOD","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/albertkx/conal","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/jun-cen/unified_open_set_recognition","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/AlexMeinke/Provable-OOD-Detection","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/sayakpaul/Generalized-ODIN-TF","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zjysteven/mixoe","reach":{"status":"ok"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/hendrycks/outlier-exposure","reach":{"status":"unanswered"}}],"summary":{"ran":3,"ran_draft_wrong":2},"by_repo_kind":{"listed":{"samples":5,"ran":5,"repositories":4}},"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":4,"samples":[{"code_sha256_prefix":"04a6bca8fa7ea2c2","entry":"GaussianLayer","repo":"guyAmit/GLOD","repo_kind":"listed","path":"FOOD/Gaussain_layer.py","file_url":"https://github.com/guyAmit/GLOD/blob/HEAD/FOOD/Gaussain_layer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"04a6bca8fa7ea2c2"}},{"code_sha256_prefix":"7e2caa67572f6723","entry":"OELoss","repo":"AlexMeinke/Provable-OOD-Detection","repo_kind":"listed","path":"utils/traintest/losses.py","file_url":"https://github.com/AlexMeinke/Provable-OOD-Detection/blob/HEAD/utils/traintest/losses.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7e2caa67572f6723"}},{"code_sha256_prefix":"a720f50e53abe705","entry":"OE_300k_dataloader","repo":"jun-cen/unified_open_set_recognition","repo_kind":"listed","path":"UOSR_train/bit_pytorch/oe_bit.py","file_url":"https://github.com/jun-cen/unified_open_set_recognition/blob/HEAD/UOSR_train/bit_pytorch/oe_bit.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a720f50e53abe705"}},{"code_sha256_prefix":"40f6f2dd97282786","entry":"get_loss_baseline","repo":"oliverzhang42/ood_medical_images","repo_kind":"listed","path":"src/losses.py","file_url":"https://github.com/oliverzhang42/ood_medical_images/blob/HEAD/src/losses.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"40f6f2dd97282786"}},{"code_sha256_prefix":"9a2f19557ae1a813","entry":"get_loss_outlier_exposure","repo":"oliverzhang42/ood_medical_images","repo_kind":"listed","path":"src/losses.py","file_url":"https://github.com/oliverzhang42/ood_medical_images/blob/HEAD/src/losses.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9a2f19557ae1a813"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}