{"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/label-and-distribution-discriminative-dual","title":"Dual Representation Learning for Out-of-Distribution Detection","arxiv_id":"2206.09387","date":"2022-06-19","proceeding":null,"authors":["Zhilin Zhao","Longbing Cao"],"abstract":"To classify in-distribution samples, deep neural networks explore strongly label-related information and discard weakly label-related information according to the information bottleneck. Out-of-distribution samples drawn from distributions differing from that of in-distribution samples could be assigned with unexpected high-confidence predictions because they could obtain minimum strongly label-related information. To distinguish in- and out-of-distribution samples, Dual Representation Learning (DRL) makes out-of-distribution samples harder to have high-confidence predictions by exploring both strongly and weakly label-related information from in-distribution samples. For a pretrained network exploring strongly label-related information to learn label-discriminative representations, DRL trains its auxiliary network exploring the remaining weakly label-related information to learn distribution-discriminative representations. Specifically, for a label-discriminative representation, DRL constructs its complementary distribution-discriminative representation by integrating diverse representations less similar to the label-discriminative representation. Accordingly, DRL combines label- and distribution-discriminative representations to detect out-of-distribution samples. Experiments show that DRL outperforms the state-of-the-art methods for out-of-distribution detection.","url_abs":"https://arxiv.org/abs/2206.09387v2","url_pdf":"https://arxiv.org/pdf/2206.09387v2.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":"label-and-distribution-discriminative-dual","repo_url":"https://github.com/lawliet-zzl/drl","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"informativeness","task_name":"Informativeness"},{"task_slug":"out-of-distribution-detection","task_name":"Out-of-Distribution Detection"},{"task_slug":"representation-learning","task_name":"Representation Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2206.09387","atlas_url":"https://app.syntology.ai/?focus=2206.09387","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2206.09387"}},"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/drl","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":10,"unverified":10},"by_repo_kind":{"official":{"samples":20,"ran":10,"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/drl","repo_kind":"official","path":"code/models/densenet.py","file_url":"https://github.com/lawliet-zzl/drl/blob/HEAD/code/models/densenet.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":"dfb395bae3d07d76"}},{"code_sha256_prefix":"f295fe3c209ecf78","entry":"DenseNet169","repo":"lawliet-zzl/drl","repo_kind":"official","path":"code/models/densenet.py","file_url":"https://github.com/lawliet-zzl/drl/blob/HEAD/code/models/densenet.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":"f295fe3c209ecf78"}},{"code_sha256_prefix":"6383aee1c940e7a5","entry":"DenseNet201","repo":"lawliet-zzl/drl","repo_kind":"official","path":"code/models/densenet.py","file_url":"https://github.com/lawliet-zzl/drl/blob/HEAD/code/models/densenet.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":"6383aee1c940e7a5"}},{"code_sha256_prefix":"f7b96dbdddb56a68","entry":"EfficientNetB0","repo":"lawliet-zzl/drl","repo_kind":"official","path":"code/models/efficientnet.py","file_url":"https://github.com/lawliet-zzl/drl/blob/HEAD/code/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/drl","repo_kind":"official","path":"code/models/efficientnet.py","file_url":"https://github.com/lawliet-zzl/drl/blob/HEAD/code/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":"6cfe4ba82c28e7c0","entry":"getAllOOD","repo":"lawliet-zzl/drl","repo_kind":"official","path":"code/data_loader.py","file_url":"https://github.com/lawliet-zzl/drl/blob/HEAD/code/data_loader.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":"6cfe4ba82c28e7c0"}},{"code_sha256_prefix":"444f352f6a4b332b","entry":"get_mu","repo":"lawliet-zzl/drl","repo_kind":"official","path":"code/model_func.py","file_url":"https://github.com/lawliet-zzl/drl/blob/HEAD/code/model_func.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":"444f352f6a4b332b"}},{"code_sha256_prefix":"8737c82de631cffc","entry":"swish","repo":"lawliet-zzl/drl","repo_kind":"official","path":"code/models/efficientnet.py","file_url":"https://github.com/lawliet-zzl/drl/blob/HEAD/code/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":"87718beb1d43a53b","entry":"train_DRL","repo":"lawliet-zzl/drl","repo_kind":"official","path":"code/main_DRL.py","file_url":"https://github.com/lawliet-zzl/drl/blob/HEAD/code/main_DRL.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":"87718beb1d43a53b"}},{"code_sha256_prefix":"bf5929484b8bce78","entry":"train_pretrained","repo":"lawliet-zzl/drl","repo_kind":"official","path":"code/main_DRL.py","file_url":"https://github.com/lawliet-zzl/drl/blob/HEAD/code/main_DRL.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":"bf5929484b8bce78"}},{"code_sha256_prefix":"5f64843147a6f108","entry":"DPN26","repo":"lawliet-zzl/drl","repo_kind":"official","path":"code/models/dpn.py","file_url":"https://github.com/lawliet-zzl/drl/blob/HEAD/code/models/dpn.py","link_basis":"harvester_set","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/drl","repo_kind":"official","path":"code/models/dpn.py","file_url":"https://github.com/lawliet-zzl/drl/blob/HEAD/code/models/dpn.py","link_basis":"harvester_set","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":"647ffb2c86d7808f","entry":"auroc","repo":"lawliet-zzl/drl","repo_kind":"official","path":"code/OOD_Metric.py","file_url":"https://github.com/lawliet-zzl/drl/blob/HEAD/code/OOD_Metric.py","link_basis":"harvester_set","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/drl","repo_kind":"official","path":"code/OOD_Metric.py","file_url":"https://github.com/lawliet-zzl/drl/blob/HEAD/code/OOD_Metric.py","link_basis":"harvester_set","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":"95c820c65911f5ea","entry":"build_model","repo":"lawliet-zzl/drl","repo_kind":"official","path":"code/model_func.py","file_url":"https://github.com/lawliet-zzl/drl/blob/HEAD/code/model_func.py","link_basis":"harvester_set","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":"95c820c65911f5ea"}},{"code_sha256_prefix":"75c46c0650d96502","entry":"getCIFAR10","repo":"lawliet-zzl/drl","repo_kind":"official","path":"code/data_loader.py","file_url":"https://github.com/lawliet-zzl/drl/blob/HEAD/code/data_loader.py","link_basis":"harvester_set","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":"75c46c0650d96502"}},{"code_sha256_prefix":"c3c76761ed08bd70","entry":"getCIFAR100","repo":"lawliet-zzl/drl","repo_kind":"official","path":"code/data_loader.py","file_url":"https://github.com/lawliet-zzl/drl/blob/HEAD/code/data_loader.py","link_basis":"harvester_set","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":"c3c76761ed08bd70"}},{"code_sha256_prefix":"852857c5a8b391fd","entry":"getCoupled","repo":"lawliet-zzl/drl","repo_kind":"official","path":"code/main_DRL.py","file_url":"https://github.com/lawliet-zzl/drl/blob/HEAD/code/main_DRL.py","link_basis":"harvester_set","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":"852857c5a8b391fd"}},{"code_sha256_prefix":"40cc6d19b3002c5c","entry":"init_setting","repo":"lawliet-zzl/drl","repo_kind":"official","path":"code/model_func.py","file_url":"https://github.com/lawliet-zzl/drl/blob/HEAD/code/model_func.py","link_basis":"harvester_set","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":"40cc6d19b3002c5c"}},{"code_sha256_prefix":"d9455f51710ae474","entry":"tpr95","repo":"lawliet-zzl/drl","repo_kind":"official","path":"code/OOD_Metric.py","file_url":"https://github.com/lawliet-zzl/drl/blob/HEAD/code/OOD_Metric.py","link_basis":"harvester_set","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"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}