{"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/revealing-distributional-vulnerability-of","title":"Revealing the Distributional Vulnerability of Discriminators by Implicit Generators","arxiv_id":"2108.09976","date":"2021-08-23","proceeding":null,"authors":["Zhilin Zhao","Longbing Cao","Kun-Yu Lin"],"abstract":"In deep neural learning, a discriminator trained on in-distribution (ID) samples may make high-confidence predictions on out-of-distribution (OOD) samples. This triggers a significant matter for robust, trustworthy and safe deep learning. The issue is primarily caused by the limited ID samples observable in training the discriminator when OOD samples are unavailable. We propose a general approach for \\textit{fine-tuning discriminators by implicit generators} (FIG). FIG is grounded on information theory and applicable to standard discriminators without retraining. It improves the ability of a standard discriminator in distinguishing ID and OOD samples by generating and penalizing its specific OOD samples. According to the Shannon entropy, an energy-based implicit generator is inferred from a discriminator without extra training costs. Then, a Langevin dynamic sampler draws specific OOD samples for the implicit generator. Lastly, we design a regularizer fitting the design principle of the implicit generator to induce high entropy on those generated OOD samples. The experiments on different networks and datasets demonstrate that FIG achieves the state-of-the-art OOD detection performance.","url_abs":"https://arxiv.org/abs/2108.09976v4","url_pdf":"https://arxiv.org/pdf/2108.09976v4.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":"revealing-distributional-vulnerability-of","repo_url":"https://github.com/lawliet-zzl/fig","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"ood-detection","task_name":"Out of Distribution (OOD) Detection"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2108.09976","atlas_url":"https://app.syntology.ai/?focus=2108.09976","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2108.09976"}},"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/lawliet-zzl/fig","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":6,"unverified":13},"by_repo_kind":{"official":{"samples":19,"ran":6,"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":0,"samples":[{"code_sha256_prefix":"dfb395bae3d07d76","entry":"DenseNet121","repo":"lawliet-zzl/fig","repo_kind":"official","path":"code_FIG/models/densenet.py","file_url":"https://github.com/lawliet-zzl/fig/blob/HEAD/code_FIG/models/densenet.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"dfb395bae3d07d76"}},{"code_sha256_prefix":"f295fe3c209ecf78","entry":"DenseNet169","repo":"lawliet-zzl/fig","repo_kind":"official","path":"code_FIG/models/densenet.py","file_url":"https://github.com/lawliet-zzl/fig/blob/HEAD/code_FIG/models/densenet.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f295fe3c209ecf78"}},{"code_sha256_prefix":"6383aee1c940e7a5","entry":"DenseNet201","repo":"lawliet-zzl/fig","repo_kind":"official","path":"code_FIG/models/densenet.py","file_url":"https://github.com/lawliet-zzl/fig/blob/HEAD/code_FIG/models/densenet.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6383aee1c940e7a5"}},{"code_sha256_prefix":"f7b96dbdddb56a68","entry":"EfficientNetB0","repo":"lawliet-zzl/fig","repo_kind":"official","path":"code_FIG/models/efficientnet.py","file_url":"https://github.com/lawliet-zzl/fig/blob/HEAD/code_FIG/models/efficientnet.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":true,"mcp_get_code":{"code_sha256":"f7b96dbdddb56a68"}},{"code_sha256_prefix":"4304a326c593f8db","entry":"drop_connect","repo":"lawliet-zzl/fig","repo_kind":"official","path":"code_FIG/models/efficientnet.py","file_url":"https://github.com/lawliet-zzl/fig/blob/HEAD/code_FIG/models/efficientnet.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":true,"mcp_get_code":{"code_sha256":"4304a326c593f8db"}},{"code_sha256_prefix":"8737c82de631cffc","entry":"swish","repo":"lawliet-zzl/fig","repo_kind":"official","path":"code_FIG/models/efficientnet.py","file_url":"https://github.com/lawliet-zzl/fig/blob/HEAD/code_FIG/models/efficientnet.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":true,"mcp_get_code":{"code_sha256":"8737c82de631cffc"}},{"code_sha256_prefix":"e9f1f5ec51871efb","entry":"Baseline","repo":"lawliet-zzl/fig","repo_kind":"official","path":"code_FIG/main_FIG.py","file_url":"https://github.com/lawliet-zzl/fig/blob/HEAD/code_FIG/main_FIG.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":true,"mcp_get_code":{"code_sha256":"e9f1f5ec51871efb"}},{"code_sha256_prefix":"5f64843147a6f108","entry":"DPN26","repo":"lawliet-zzl/fig","repo_kind":"official","path":"code_FIG/models/dpn.py","file_url":"https://github.com/lawliet-zzl/fig/blob/HEAD/code_FIG/models/dpn.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":true,"mcp_get_code":{"code_sha256":"5f64843147a6f108"}},{"code_sha256_prefix":"7773feb89409b320","entry":"DPN92","repo":"lawliet-zzl/fig","repo_kind":"official","path":"code_FIG/models/dpn.py","file_url":"https://github.com/lawliet-zzl/fig/blob/HEAD/code_FIG/models/dpn.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":true,"mcp_get_code":{"code_sha256":"7773feb89409b320"}},{"code_sha256_prefix":"99f54c45731688f0","entry":"FIG","repo":"lawliet-zzl/fig","repo_kind":"official","path":"code_FIG/main_FIG.py","file_url":"https://github.com/lawliet-zzl/fig/blob/HEAD/code_FIG/main_FIG.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":true,"mcp_get_code":{"code_sha256":"99f54c45731688f0"}},{"code_sha256_prefix":"647ffb2c86d7808f","entry":"auroc","repo":"lawliet-zzl/fig","repo_kind":"official","path":"code_FIG/OODMeasures.py","file_url":"https://github.com/lawliet-zzl/fig/blob/HEAD/code_FIG/OODMeasures.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":true,"mcp_get_code":{"code_sha256":"647ffb2c86d7808f"}},{"code_sha256_prefix":"c048fb086170daf9","entry":"auroc_XY","repo":"lawliet-zzl/fig","repo_kind":"official","path":"code_FIG/OODMeasures.py","file_url":"https://github.com/lawliet-zzl/fig/blob/HEAD/code_FIG/OODMeasures.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":true,"mcp_get_code":{"code_sha256":"c048fb086170daf9"}},{"code_sha256_prefix":"573dcd0978af6c5a","entry":"build_model","repo":"lawliet-zzl/fig","repo_kind":"official","path":"code_FIG/model_func.py","file_url":"https://github.com/lawliet-zzl/fig/blob/HEAD/code_FIG/model_func.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":true,"mcp_get_code":{"code_sha256":"573dcd0978af6c5a"}},{"code_sha256_prefix":"e975ce03129b2cba","entry":"getCIFAR10","repo":"lawliet-zzl/fig","repo_kind":"official","path":"code_FIG/data_loader.py","file_url":"https://github.com/lawliet-zzl/fig/blob/HEAD/code_FIG/data_loader.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":true,"mcp_get_code":{"code_sha256":"e975ce03129b2cba"}},{"code_sha256_prefix":"8a7a6c7465a96e0a","entry":"getSVHN","repo":"lawliet-zzl/fig","repo_kind":"official","path":"code_FIG/data_loader.py","file_url":"https://github.com/lawliet-zzl/fig/blob/HEAD/code_FIG/data_loader.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":true,"mcp_get_code":{"code_sha256":"8a7a6c7465a96e0a"}},{"code_sha256_prefix":"7ebe22c394fe6a92","entry":"get_known_mean_std","repo":"lawliet-zzl/fig","repo_kind":"official","path":"code_FIG/data_loader.py","file_url":"https://github.com/lawliet-zzl/fig/blob/HEAD/code_FIG/data_loader.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":true,"mcp_get_code":{"code_sha256":"7ebe22c394fe6a92"}},{"code_sha256_prefix":"e1b02824bf28d418","entry":"test","repo":"lawliet-zzl/fig","repo_kind":"official","path":"code_FIG/model_func.py","file_url":"https://github.com/lawliet-zzl/fig/blob/HEAD/code_FIG/model_func.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":true,"mcp_get_code":{"code_sha256":"e1b02824bf28d418"}},{"code_sha256_prefix":"d9455f51710ae474","entry":"tpr95","repo":"lawliet-zzl/fig","repo_kind":"official","path":"code_FIG/OODMeasures.py","file_url":"https://github.com/lawliet-zzl/fig/blob/HEAD/code_FIG/OODMeasures.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":true,"mcp_get_code":{"code_sha256":"d9455f51710ae474"}},{"code_sha256_prefix":"4f97b300b8ea7ef8","entry":"train","repo":"lawliet-zzl/fig","repo_kind":"official","path":"code_FIG/main_FIG.py","file_url":"https://github.com/lawliet-zzl/fig/blob/HEAD/code_FIG/main_FIG.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":true,"mcp_get_code":{"code_sha256":"4f97b300b8ea7ef8"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}