{"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/improved-regularization-and-robustness-for","title":"Improved Regularization and Robustness for Fine-tuning in Neural Networks","arxiv_id":"2111.04578","date":"2021-11-08","proceeding":"NeurIPS 2021 12","authors":["Dongyue Li","Hongyang R. Zhang"],"abstract":"A widely used algorithm for transfer learning is fine-tuning, where a pre-trained model is fine-tuned on a target task with a small amount of labeled data. When the capacity of the pre-trained model is much larger than the size of the target data set, fine-tuning is prone to overfitting and \"memorizing\" the training labels. Hence, an important question is to regularize fine-tuning and ensure its robustness to noise. To address this question, we begin by analyzing the generalization properties of fine-tuning. We present a PAC-Bayes generalization bound that depends on the distance traveled in each layer during fine-tuning and the noise stability of the fine-tuned model. We empirically measure these quantities. Based on the analysis, we propose regularized self-labeling -- the interpolation between regularization and self-labeling methods, including (i) layer-wise regularization to constrain the distance traveled in each layer; (ii) self label-correction and label-reweighting to correct mislabeled data points (that the model is confident) and reweight less confident data points. We validate our approach on an extensive collection of image and text data sets using multiple pre-trained model architectures. Our approach improves baseline methods by 1.76% (on average) for seven image classification tasks and 0.75% for a few-shot classification task. When the target data set includes noisy labels, our approach outperforms baseline methods by 3.56% on average in two noisy settings.","url_abs":"https://arxiv.org/abs/2111.04578v1","url_pdf":"https://arxiv.org/pdf/2111.04578v1.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":"improved-regularization-and-robustness-for","repo_url":"https://github.com/neu-statsml-research/regularized-self-labeling","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"transfer-learning","task_name":"Transfer Learning"},{"task_slug":"image-classification","task_name":"image-classification"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2111.04578","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2111.04578"}},"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/VirtuosoResearch/Regularized-Self-Labeling","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/neu-statsml-research/regularized-self-labeling","reach":null}],"summary":{"ran_fixture":1,"ran_draft_wrong":3,"ran":3,"unverified":4},"by_repo_kind":{"official":{"samples":1,"ran":1,"repositories":1},"found_in_text":{"samples":10,"ran":6,"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":"7d8eaf5537f699e4","entry":"np2th","repo":"VirtuosoResearch/Regularized-Self-Labeling","repo_kind":"found_in_text","path":"model/modeling_resnet.py","file_url":"https://github.com/VirtuosoResearch/Regularized-Self-Labeling/blob/HEAD/model/modeling_resnet.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":2,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7d8eaf5537f699e4"}},{"code_sha256_prefix":"0f786c407fb1ee4c","entry":"swish","repo":"VirtuosoResearch/Regularized-Self-Labeling","repo_kind":"found_in_text","path":"model/modeling_vit.py","file_url":"https://github.com/VirtuosoResearch/Regularized-Self-Labeling/blob/HEAD/model/modeling_vit.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":2,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0f786c407fb1ee4c"}},{"code_sha256_prefix":"60bf9605f43a64d3","entry":"LInfLipschitzConstraint","repo":"neu-statsml-research/regularized-self-labeling","repo_kind":"official","path":"utils/constraint.py","file_url":"https://github.com/neu-statsml-research/regularized-self-labeling/blob/HEAD/utils/constraint.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":"60bf9605f43a64d3"}},{"code_sha256_prefix":"5dcb4148be3fcbaf","entry":"accuracy","repo":"VirtuosoResearch/Regularized-Self-Labeling","repo_kind":"found_in_text","path":"model/metric.py","file_url":"https://github.com/VirtuosoResearch/Regularized-Self-Labeling/blob/HEAD/model/metric.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":"5dcb4148be3fcbaf"}},{"code_sha256_prefix":"b0f916df39e78ae5","entry":"conv1x1","repo":"VirtuosoResearch/Regularized-Self-Labeling","repo_kind":"found_in_text","path":"model/modeling_resnet.py","file_url":"https://github.com/VirtuosoResearch/Regularized-Self-Labeling/blob/HEAD/model/modeling_resnet.py","link_basis":"harvester_set","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":"b0f916df39e78ae5"}},{"code_sha256_prefix":"4e5bf13dbdc4f008","entry":"conv3x3","repo":"VirtuosoResearch/Regularized-Self-Labeling","repo_kind":"found_in_text","path":"model/modeling_resnet.py","file_url":"https://github.com/VirtuosoResearch/Regularized-Self-Labeling/blob/HEAD/model/modeling_resnet.py","link_basis":"harvester_set","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":"4e5bf13dbdc4f008"}},{"code_sha256_prefix":"61cc9667c37ecd27","entry":"top_k_acc","repo":"VirtuosoResearch/Regularized-Self-Labeling","repo_kind":"found_in_text","path":"model/metric.py","file_url":"https://github.com/VirtuosoResearch/Regularized-Self-Labeling/blob/HEAD/model/metric.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":"61cc9667c37ecd27"}},{"code_sha256_prefix":"310332a4414b2ad1","entry":"add_penalties","repo":"VirtuosoResearch/Regularized-Self-Labeling","repo_kind":"found_in_text","path":"reproduce-chexnet/model.py","file_url":"https://github.com/VirtuosoResearch/Regularized-Self-Labeling/blob/HEAD/reproduce-chexnet/model.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":"310332a4414b2ad1"}},{"code_sha256_prefix":"f97515ae0c7bb673","entry":"add_penalty","repo":"VirtuosoResearch/Regularized-Self-Labeling","repo_kind":"found_in_text","path":"reproduce-chexnet/constraint.py","file_url":"https://github.com/VirtuosoResearch/Regularized-Self-Labeling/blob/HEAD/reproduce-chexnet/constraint.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":"f97515ae0c7bb673"}},{"code_sha256_prefix":"d2ee7320cf52c3fc","entry":"deep_copy","repo":"VirtuosoResearch/Regularized-Self-Labeling","repo_kind":"found_in_text","path":"reproduce-chexnet/model.py","file_url":"https://github.com/VirtuosoResearch/Regularized-Self-Labeling/blob/HEAD/reproduce-chexnet/model.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":"d2ee7320cf52c3fc"}},{"code_sha256_prefix":"4f41333015d53dc7","entry":"train_model","repo":"VirtuosoResearch/Regularized-Self-Labeling","repo_kind":"found_in_text","path":"reproduce-chexnet/model.py","file_url":"https://github.com/VirtuosoResearch/Regularized-Self-Labeling/blob/HEAD/reproduce-chexnet/model.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":"4f41333015d53dc7"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}