{"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/unsupervised-hashing-with-contrastive","title":"Unsupervised Hashing with Contrastive Information Bottleneck","arxiv_id":"2105.06138","date":"2021-05-13","proceeding":null,"authors":["Zexuan Qiu","Qinliang Su","Zijing Ou","Jianxing Yu","Changyou Chen"],"abstract":"Many unsupervised hashing methods are implicitly established on the idea of reconstructing the input data, which basically encourages the hashing codes to retain as much information of original data as possible. However, this requirement may force the models spending lots of their effort on reconstructing the unuseful background information, while ignoring to preserve the discriminative semantic information that is more important for the hashing task. To tackle this problem, inspired by the recent success of contrastive learning in learning continuous representations, we propose to adapt this framework to learn binary hashing codes. Specifically, we first propose to modify the objective function to meet the specific requirement of hashing and then introduce a probabilistic binary representation layer into the model to facilitate end-to-end training of the entire model. We further prove the strong connection between the proposed contrastive-learning-based hashing method and the mutual information, and show that the proposed model can be considered under the broader framework of the information bottleneck (IB). Under this perspective, a more general hashing model is naturally obtained. Extensive experimental results on three benchmark image datasets demonstrate that the proposed hashing method significantly outperforms existing baselines.","url_abs":"https://arxiv.org/abs/2105.06138v2","url_pdf":"https://arxiv.org/pdf/2105.06138v2.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":"unsupervised-hashing-with-contrastive","repo_url":"https://github.com/qiuzx2/CIBHash","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"contrastive-learning","task_name":"Contrastive Learning"}],"methods":[{"method_slug":"contrastive-learning","method_name":"Contrastive Learning"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2105.06138","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2105.06138"}},"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":"deterministic:regex_extraction","url":"https://github.com/qiuzx2/CIBHash","reach":null}],"summary":{"ran":7,"ran_violates":1,"ran_draft_wrong":3,"unverified":4},"by_repo_kind":{"official":{"samples":15,"ran":11,"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":"545219e390d7b28b","entry":"GaussianBlur","repo":"qiuzx2/CIBHash","repo_kind":"official","path":"model/CIBHash.py","file_url":"https://github.com/qiuzx2/CIBHash/blob/HEAD/model/CIBHash.py","link_basis":"first_harvest_node","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":"545219e390d7b28b"}},{"code_sha256_prefix":"a5f55809f0ced9ca","entry":"Logger","repo":"qiuzx2/CIBHash","repo_kind":"official","path":"model/CIBHash.py","file_url":"https://github.com/qiuzx2/CIBHash/blob/HEAD/model/CIBHash.py","link_basis":"first_harvest_node","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":"a5f55809f0ced9ca"}},{"code_sha256_prefix":"a28c9c0199cb6d53","entry":"MyTestDataset","repo":"qiuzx2/CIBHash","repo_kind":"official","path":"model/CIBHash.py","file_url":"https://github.com/qiuzx2/CIBHash/blob/HEAD/model/CIBHash.py","link_basis":"first_harvest_node","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":"a28c9c0199cb6d53"}},{"code_sha256_prefix":"de641f731f9c0c61","entry":"MyTrainDataset","repo":"qiuzx2/CIBHash","repo_kind":"official","path":"model/CIBHash.py","file_url":"https://github.com/qiuzx2/CIBHash/blob/HEAD/model/CIBHash.py","link_basis":"first_harvest_node","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":"de641f731f9c0c61"}},{"code_sha256_prefix":"b2b75636ac168c2e","entry":"NtXentLoss","repo":"qiuzx2/CIBHash","repo_kind":"official","path":"model/CIBHash.py","file_url":"https://github.com/qiuzx2/CIBHash/blob/HEAD/model/CIBHash.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b2b75636ac168c2e"}},{"code_sha256_prefix":"60f0a788af0cca27","entry":"calculate_hamming","repo":"qiuzx2/CIBHash","repo_kind":"official","path":"model/CIBHash.py","file_url":"https://github.com/qiuzx2/CIBHash/blob/HEAD/model/CIBHash.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"60f0a788af0cca27"}},{"code_sha256_prefix":"2713054f03946cac","entry":"calculate_top_map","repo":"qiuzx2/CIBHash","repo_kind":"official","path":"model/CIBHash.py","file_url":"https://github.com/qiuzx2/CIBHash/blob/HEAD/model/CIBHash.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2713054f03946cac"}},{"code_sha256_prefix":"9d8f8e1077379f49","entry":"compress","repo":"qiuzx2/CIBHash","repo_kind":"official","path":"model/CIBHash.py","file_url":"https://github.com/qiuzx2/CIBHash/blob/HEAD/model/CIBHash.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9d8f8e1077379f49"}},{"code_sha256_prefix":"dd5e14fd69dff667","entry":"get_cifar","repo":"qiuzx2/CIBHash","repo_kind":"official","path":"model/CIBHash.py","file_url":"https://github.com/qiuzx2/CIBHash/blob/HEAD/model/CIBHash.py","link_basis":"first_harvest_node","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":"dd5e14fd69dff667"}},{"code_sha256_prefix":"446c9e1a244aca95","entry":"hash","repo":"qiuzx2/CIBHash","repo_kind":"official","path":"model/CIBHash.py","file_url":"https://github.com/qiuzx2/CIBHash/blob/HEAD/model/CIBHash.py","link_basis":"first_harvest_node","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":"446c9e1a244aca95"}},{"code_sha256_prefix":"6dfd48e834be71b6","entry":"hash_layer","repo":"qiuzx2/CIBHash","repo_kind":"official","path":"model/CIBHash.py","file_url":"https://github.com/qiuzx2/CIBHash/blob/HEAD/model/CIBHash.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6dfd48e834be71b6"}},{"code_sha256_prefix":"7eebc68d4cc2574e","entry":"Base_Model","repo":"qiuzx2/CIBHash","repo_kind":"official","path":"model/CIBHash.py","file_url":"https://github.com/qiuzx2/CIBHash/blob/HEAD/model/CIBHash.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":"7eebc68d4cc2574e"}},{"code_sha256_prefix":"b95d18b296ff8c21","entry":"CIBHash","repo":"qiuzx2/CIBHash","repo_kind":"official","path":"model/CIBHash.py","file_url":"https://github.com/qiuzx2/CIBHash/blob/HEAD/model/CIBHash.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":"b95d18b296ff8c21"}},{"code_sha256_prefix":"6ae75be554ee6746","entry":"Data","repo":"qiuzx2/CIBHash","repo_kind":"official","path":"model/CIBHash.py","file_url":"https://github.com/qiuzx2/CIBHash/blob/HEAD/model/CIBHash.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":"6ae75be554ee6746"}},{"code_sha256_prefix":"04adc0d5624cd788","entry":"LabeledData","repo":"qiuzx2/CIBHash","repo_kind":"official","path":"model/CIBHash.py","file_url":"https://github.com/qiuzx2/CIBHash/blob/HEAD/model/CIBHash.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":"04adc0d5624cd788"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}