{"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/camero-consistency-regularized-ensemble-of","title":"CAMERO: Consistency Regularized Ensemble of Perturbed Language Models with Weight Sharing","arxiv_id":"2204.06625","date":"2022-04-13","proceeding":"ACL 2022 5","authors":["Chen Liang","Pengcheng He","Yelong Shen","Weizhu Chen","Tuo Zhao"],"abstract":"Model ensemble is a popular approach to produce a low-variance and well-generalized model. However, it induces large memory and inference costs, which are often not affordable for real-world deployment. Existing work has resorted to sharing weights among models. However, when increasing the proportion of the shared weights, the resulting models tend to be similar, and the benefits of using model ensemble diminish. To retain ensemble benefits while maintaining a low memory cost, we propose a consistency-regularized ensemble learning approach based on perturbed models, named CAMERO. Specifically, we share the weights of bottom layers across all models and apply different perturbations to the hidden representations for different models, which can effectively promote the model diversity. Meanwhile, we apply a prediction consistency regularizer across the perturbed models to control the variance due to the model diversity. Our experiments using large language models demonstrate that CAMERO significantly improves the generalization performance of the ensemble model. Specifically, CAMERO outperforms the standard ensemble of 8 BERT-base models on the GLUE benchmark by 0.7 with a significantly smaller model size (114.2M vs. 880.6M).","url_abs":"https://arxiv.org/abs/2204.06625v2","url_pdf":"https://arxiv.org/pdf/2204.06625v2.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":"camero-consistency-regularized-ensemble-of","repo_url":"https://github.com/cliang1453/camero","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"diversity","task_name":"Diversity"},{"task_slug":"ensemble-learning","task_name":"Ensemble Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2204.06625","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2204.06625"}},"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/namisan/mt-dnn","reach":null},{"provenance":"deterministic:regex_extraction","url":"https://github.com/cliang1453/CAMERO","reach":{"status":"ok"}}],"summary":{"ran":1,"ran_honours":1,"unverified":3},"by_repo_kind":{"official":{"samples":2,"ran":1,"repositories":1},"found_in_text":{"samples":3,"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":2,"samples":[{"code_sha256_prefix":"128920146ceb43ee","entry":"SmartPerturbation","repo":"namisan/mt-dnn","repo_kind":"found_in_text","path":"mt_dnn/perturbation.py","file_url":"https://github.com/namisan/mt-dnn/blob/HEAD/mt_dnn/perturbation.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":"128920146ceb43ee"}},{"code_sha256_prefix":"124f2519ccc332da","entry":"generate_noise","repo":"cliang1453/CAMERO","repo_kind":"official","path":"mt_dnn/perturbation.py","file_url":"https://github.com/cliang1453/CAMERO/blob/HEAD/mt_dnn/perturbation.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"124f2519ccc332da"}},{"code_sha256_prefix":"3c06edd23ab4b8e8","entry":"EncoderModelType","repo":"namisan/mt-dnn","repo_kind":"found_in_text","path":"mt_dnn/perturbation.py","file_url":"https://github.com/namisan/mt-dnn/blob/HEAD/mt_dnn/perturbation.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":"3c06edd23ab4b8e8"}},{"code_sha256_prefix":"83cf3667569dc577","entry":"SmartPerturbation","repo":"cliang1453/CAMERO","repo_kind":"official","path":"mt_dnn/perturbation.py","file_url":"https://github.com/cliang1453/CAMERO/blob/HEAD/mt_dnn/perturbation.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"83cf3667569dc577"}},{"code_sha256_prefix":"9263bed09ae16202","entry":"TaskType","repo":"namisan/mt-dnn","repo_kind":"found_in_text","path":"mt_dnn/perturbation.py","file_url":"https://github.com/namisan/mt-dnn/blob/HEAD/mt_dnn/perturbation.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":"9263bed09ae16202"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}