{"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/hardcore-nas-hard-constrained-differentiable","title":"HardCoRe-NAS: Hard Constrained diffeRentiable Neural Architecture Search","arxiv_id":"2102.11646","date":"2021-02-23","proceeding":null,"authors":["Niv Nayman","Yonathan Aflalo","Asaf Noy","Lihi Zelnik-Manor"],"abstract":"Realistic use of neural networks often requires adhering to multiple constraints on latency, energy and memory among others. A popular approach to find fitting networks is through constrained Neural Architecture Search (NAS), however, previous methods enforce the constraint only softly. Therefore, the resulting networks do not exactly adhere to the resource constraint and their accuracy is harmed. In this work we resolve this by introducing Hard Constrained diffeRentiable NAS (HardCoRe-NAS), that is based on an accurate formulation of the expected resource requirement and a scalable search method that satisfies the hard constraint throughout the search. Our experiments show that HardCoRe-NAS generates state-of-the-art architectures, surpassing other NAS methods, while strictly satisfying the hard resource constraints without any tuning required.","url_abs":"https://arxiv.org/abs/2102.11646v1","url_pdf":"https://arxiv.org/pdf/2102.11646v1.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":"hardcore-nas-hard-constrained-differentiable","repo_url":"https://github.com/Alibaba-MIIL/HardCoReNAS","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"hardcore-nas-hard-constrained-differentiable","repo_url":"https://github.com/alibaba-miil/binas","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"architecture-search","task_name":"Neural Architecture Search"}],"methods":[{"method_slug":"differentiable-nas","method_name":"Differentiable NAS"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/neural-architecture-search-on-imagenet","task":"Neural Architecture Search","dataset":"ImageNet","model":"HardcoreNAS_E_KD","rank_in_archive_order":21,"of":135,"metrics":{"Accuracy":"80.1","MACs":"330M","Top-1 Error Rate":"19.9"},"uses_additional_data":false},{"leaderboard":"/sota/neural-architecture-search-on-imagenet","task":"Neural Architecture Search","dataset":"ImageNet","model":"HardcoreNAS_D_KD","rank_in_archive_order":31,"of":135,"metrics":{"Accuracy":"79.5","MACs":"290M","Top-1 Error Rate":"20.5"},"uses_additional_data":false},{"leaderboard":"/sota/neural-architecture-search-on-imagenet","task":"Neural Architecture Search","dataset":"ImageNet","model":"HardcoreNAS_C_KD","rank_in_archive_order":40,"of":135,"metrics":{"Accuracy":"78.9","MACs":"270M","Top-1 Error Rate":"21.1"},"uses_additional_data":false},{"leaderboard":"/sota/neural-architecture-search-on-imagenet","task":"Neural Architecture Search","dataset":"ImageNet","model":"HardcoreNAS_B_KD","rank_in_archive_order":41,"of":135,"metrics":{"Accuracy":"78.8","MACs":"250M","Top-1 Error Rate":"21.2"},"uses_additional_data":false},{"leaderboard":"/sota/neural-architecture-search-on-imagenet","task":"Neural Architecture Search","dataset":"ImageNet","model":"HardcoreNAS_A_KD","rank_in_archive_order":50,"of":135,"metrics":{"Accuracy":"78.3","MACs":"220M","Top-1 Error Rate":"21.7"},"uses_additional_data":false},{"leaderboard":"/sota/neural-architecture-search-on-imagenet","task":"Neural Architecture Search","dataset":"ImageNet","model":"HardcoreNAS_F","rank_in_archive_order":52,"of":135,"metrics":{"Accuracy":"78.1","MACs":"340M","Top-1 Error Rate":"21.9"},"uses_additional_data":false},{"leaderboard":"/sota/neural-architecture-search-on-imagenet","task":"Neural Architecture Search","dataset":"ImageNet","model":"HardcoreNAS_E","rank_in_archive_order":56,"of":135,"metrics":{"Accuracy":"77.9","MACs":"330M","Top-1 Error Rate":"22.1"},"uses_additional_data":false},{"leaderboard":"/sota/neural-architecture-search-on-imagenet","task":"Neural Architecture Search","dataset":"ImageNet","model":"HardcoreNAS_D","rank_in_archive_order":65,"of":135,"metrics":{"Accuracy":"77.4","MACs":"290M","Top-1 Error Rate":"22.6"},"uses_additional_data":false},{"leaderboard":"/sota/neural-architecture-search-on-imagenet","task":"Neural Architecture Search","dataset":"ImageNet","model":"HardcoreNAS_C","rank_in_archive_order":74,"of":135,"metrics":{"Accuracy":"77.1","MACs":"270M","Top-1 Error Rate":"22.9"},"uses_additional_data":false},{"leaderboard":"/sota/neural-architecture-search-on-imagenet","task":"Neural Architecture Search","dataset":"ImageNet","model":"HardcoreNAS_B","rank_in_archive_order":85,"of":135,"metrics":{"Accuracy":"76.5","MACs":"250M","Top-1 Error Rate":"23.5"},"uses_additional_data":false},{"leaderboard":"/sota/neural-architecture-search-on-imagenet","task":"Neural Architecture Search","dataset":"ImageNet","model":"HardcoreNAS_A","rank_in_archive_order":101,"of":135,"metrics":{"Accuracy":"75.9","MACs":"220M","Top-1 Error Rate":"24.1"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2102.11646","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2102.11646"}},"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/alibaba-miil/binas","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Alibaba-MIIL/HardCoReNAS","reach":null}],"summary":{"ran_honours":2,"unverified":4},"by_repo_kind":{"official":{"samples":2,"ran":1,"repositories":1},"listed":{"samples":4,"ran":1,"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":"622a379ad7dd9222","entry":"calculate_temperature","repo":"Alibaba-MIIL/HardCoReNAS","repo_kind":"official","path":"search.py","file_url":"https://github.com/Alibaba-MIIL/HardCoReNAS/blob/HEAD/search.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"622a379ad7dd9222"}},{"code_sha256_prefix":"5992f0ad22591cd9","entry":"smallest_sol","repo":"alibaba-miil/binas","repo_kind":"listed","path":"search.py","file_url":"https://github.com/alibaba-miil/binas/blob/HEAD/search.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5992f0ad22591cd9"}},{"code_sha256_prefix":"4239d29f3166f205","entry":"argmax_attention","repo":"Alibaba-MIIL/HardCoReNAS","repo_kind":"official","path":"search.py","file_url":"https://github.com/Alibaba-MIIL/HardCoReNAS/blob/HEAD/search.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":"4239d29f3166f205"}},{"code_sha256_prefix":"957b3d09c343c5b3","entry":"get_train_val_dir","repo":"alibaba-miil/binas","repo_kind":"listed","path":"search.py","file_url":"https://github.com/alibaba-miil/binas/blob/HEAD/search.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":"957b3d09c343c5b3"}},{"code_sha256_prefix":"94d498c319661873","entry":"optimize_diff_predictor","repo":"alibaba-miil/binas","repo_kind":"listed","path":"search.py","file_url":"https://github.com/alibaba-miil/binas/blob/HEAD/search.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":"94d498c319661873"}},{"code_sha256_prefix":"398498f4381620e6","entry":"validate","repo":"alibaba-miil/binas","repo_kind":"listed","path":"accuracy_contribution.py","file_url":"https://github.com/alibaba-miil/binas/blob/HEAD/accuracy_contribution.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":"398498f4381620e6"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}