{"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/pace-marrying-generalization-in-parameter","title":"PACE: Marrying generalization in PArameter-efficient fine-tuning with Consistency rEgularization","arxiv_id":"2409.17137","date":"2024-09-25","proceeding":null,"authors":["Yao Ni","Shan Zhang","Piotr Koniusz"],"abstract":"Parameter-Efficient Fine-Tuning (PEFT) effectively adapts pre-trained transformers to downstream tasks. However, the optimization of tasks performance often comes at the cost of generalizability in fine-tuned models. To address this issue, we theoretically connect smaller weight gradient norms during training and larger datasets to the improvements in model generalization. Motivated by this connection, we propose reducing gradient norms for enhanced generalization and aligning fine-tuned model with the pre-trained counterpart to retain knowledge from large-scale pre-training data. Yet, naive alignment does not guarantee gradient reduction and can potentially cause gradient explosion, complicating efforts to manage gradients. To address such an issue, we propose PACE, marrying generalization of PArameter-efficient fine-tuning with Consistency rEgularization. We perturb features learned from the adapter with the multiplicative noise and ensure the fine-tuned model remains consistent for same sample under different perturbations. Theoretical analysis shows that PACE not only implicitly regularizes gradients for enhanced generalization, but also implicitly aligns the fine-tuned and pre-trained models to retain knowledge. Experimental evidence supports our theories. PACE surpasses existing PEFT methods in visual adaptation tasks (VTAB-1k, FGVC, few-shot learning, domain adaptation) showcasing its potential for resource-efficient fine-tuning. It also improves LoRA in text classification (GLUE) and mathematical reasoning (GSM-8K). The code is available at https://github.com/MaxwellYaoNi/PACE","url_abs":"https://arxiv.org/abs/2409.17137v4","url_pdf":"https://arxiv.org/pdf/2409.17137v4.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":"pace-marrying-generalization-in-parameter","repo_url":"https://github.com/maxwellyaoni/pace","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":null,"task_name":"8k"},{"task_slug":"domain-adaptation","task_name":"Domain Adaptation"},{"task_slug":"few-shot-learning","task_name":"Few-Shot Learning"},{"task_slug":"mathematical-reasoning","task_name":"Mathematical Reasoning"},{"task_slug":"text-classification","task_name":"Text Classification"},{"task_slug":"parameter-efficient-fine-tuning","task_name":"parameter-efficient fine-tuning"},{"task_slug":"text-classification-1","task_name":"text-classification"}],"methods":[{"method_slug":"adapter","method_name":"Adapter"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2409.17137","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2409.17137"}},"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/MaxwellYaoNi/PACE","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/maxwellyaoni/pace","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":7,"ran_draft_wrong":1,"unverified":10},"by_repo_kind":{"official":{"samples":18,"ran":8,"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":"48cd5985c19fb541","entry":"PACE_MSELoss","repo":"maxwellyaoni/pace","repo_kind":"official","path":"Vision/pace/pace_ops.py","file_url":"https://github.com/maxwellyaoni/pace/blob/HEAD/Vision/pace/pace_ops.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"48cd5985c19fb541"}},{"code_sha256_prefix":"fb1f1dbfe9b8cf1c","entry":"SharableDropPath","repo":"maxwellyaoni/pace","repo_kind":"official","path":"Vision/pace/pace_ops.py","file_url":"https://github.com/maxwellyaoni/pace/blob/HEAD/Vision/pace/pace_ops.py","link_basis":"first_harvest_node","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":"fb1f1dbfe9b8cf1c"}},{"code_sha256_prefix":"82cf5ebffd77609b","entry":"compute_loss_pace","repo":"maxwellyaoni/pace","repo_kind":"official","path":"Vision/pace/pace_ops.py","file_url":"https://github.com/maxwellyaoni/pace/blob/HEAD/Vision/pace/pace_ops.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"82cf5ebffd77609b"}},{"code_sha256_prefix":"56f674f6d6be2ea3","entry":"file_loader","repo":"MaxwellYaoNi/PACE","repo_kind":"official","path":"Vision/utils/h5dataset.py","file_url":"https://github.com/MaxwellYaoNi/PACE/blob/HEAD/Vision/utils/h5dataset.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":"56f674f6d6be2ea3"}},{"code_sha256_prefix":"97fed394e0216ad7","entry":"get_few_shot_classes_num","repo":"MaxwellYaoNi/PACE","repo_kind":"official","path":"Vision/utils/few_shot.py","file_url":"https://github.com/MaxwellYaoNi/PACE/blob/HEAD/Vision/utils/few_shot.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":"97fed394e0216ad7"}},{"code_sha256_prefix":"1c8363bbc179dca8","entry":"get_vtab_classes_num","repo":"MaxwellYaoNi/PACE","repo_kind":"official","path":"Vision/utils/vtab.py","file_url":"https://github.com/MaxwellYaoNi/PACE/blob/HEAD/Vision/utils/vtab.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":"1c8363bbc179dca8"}},{"code_sha256_prefix":"aad01b2cb2ffc65b","entry":"h5_loader","repo":"MaxwellYaoNi/PACE","repo_kind":"official","path":"Vision/utils/h5dataset.py","file_url":"https://github.com/MaxwellYaoNi/PACE/blob/HEAD/Vision/utils/h5dataset.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":"aad01b2cb2ffc65b"}},{"code_sha256_prefix":"78ec74c6116ef799","entry":"json_flist_reader","repo":"MaxwellYaoNi/PACE","repo_kind":"official","path":"Vision/utils/h5dataset.py","file_url":"https://github.com/MaxwellYaoNi/PACE/blob/HEAD/Vision/utils/h5dataset.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":"78ec74c6116ef799"}},{"code_sha256_prefix":"44fc0511d7e1a0dd","entry":"compute_loss_pace","repo":"maxwellyaoni/pace","repo_kind":"official","path":"Vision/pace/pace_ops.py","file_url":"https://github.com/maxwellyaoni/pace/blob/HEAD/Vision/pace/pace_ops.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":"44fc0511d7e1a0dd"}},{"code_sha256_prefix":"ba29b36136b86e32","entry":"compute_loss_pace","repo":"MaxwellYaoNi/PACE","repo_kind":"official","path":"Vision/pace/pace_ops.py","file_url":"https://github.com/MaxwellYaoNi/PACE/blob/HEAD/Vision/pace/pace_ops.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":"ba29b36136b86e32"}},{"code_sha256_prefix":"8a60a79c5b0af617","entry":"compute_loss_pace_fast","repo":"maxwellyaoni/pace","repo_kind":"official","path":"Vision/pace/pace_ops.py","file_url":"https://github.com/maxwellyaoni/pace/blob/HEAD/Vision/pace/pace_ops.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":"8a60a79c5b0af617"}},{"code_sha256_prefix":"070f23861c50b2fa","entry":"compute_loss_pace_fast","repo":"MaxwellYaoNi/PACE","repo_kind":"official","path":"Vision/pace/pace_ops.py","file_url":"https://github.com/MaxwellYaoNi/PACE/blob/HEAD/Vision/pace/pace_ops.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":"070f23861c50b2fa"}},{"code_sha256_prefix":"4af58ad2abc3b86c","entry":"compute_loss_pace_lazy_half","repo":"maxwellyaoni/pace","repo_kind":"official","path":"Vision/pace/pace_ops.py","file_url":"https://github.com/maxwellyaoni/pace/blob/HEAD/Vision/pace/pace_ops.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":"4af58ad2abc3b86c"}},{"code_sha256_prefix":"7b04172d2fc2b071","entry":"compute_loss_pace_lazy_half","repo":"MaxwellYaoNi/PACE","repo_kind":"official","path":"Vision/pace/pace_ops.py","file_url":"https://github.com/MaxwellYaoNi/PACE/blob/HEAD/Vision/pace/pace_ops.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":"7b04172d2fc2b071"}},{"code_sha256_prefix":"8158dccb9a5c0dce","entry":"get_adapters_and_block_ids","repo":"MaxwellYaoNi/PACE","repo_kind":"official","path":"Vision/pace/residual_adapters.py","file_url":"https://github.com/MaxwellYaoNi/PACE/blob/HEAD/Vision/pace/residual_adapters.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":"8158dccb9a5c0dce"}},{"code_sha256_prefix":"b206d92af9c75e6b","entry":"get_few_shot_data","repo":"MaxwellYaoNi/PACE","repo_kind":"official","path":"Vision/utils/few_shot.py","file_url":"https://github.com/MaxwellYaoNi/PACE/blob/HEAD/Vision/utils/few_shot.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":"b206d92af9c75e6b"}},{"code_sha256_prefix":"d5f280240b4e3f98","entry":"get_vtab_data","repo":"MaxwellYaoNi/PACE","repo_kind":"official","path":"Vision/utils/vtab.py","file_url":"https://github.com/MaxwellYaoNi/PACE/blob/HEAD/Vision/utils/vtab.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":"d5f280240b4e3f98"}},{"code_sha256_prefix":"b8549cf24c5edd2e","entry":"set_duplicate","repo":"maxwellyaoni/pace","repo_kind":"official","path":"Vision/pace/pace_ops.py","file_url":"https://github.com/maxwellyaoni/pace/blob/HEAD/Vision/pace/pace_ops.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":"b8549cf24c5edd2e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}