{"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/fine-tuning-can-distort-pretrained-features","title":"Fine-Tuning can Distort Pretrained Features and Underperform Out-of-Distribution","arxiv_id":"2202.10054","date":"2022-02-21","proceeding":null,"authors":["Ananya Kumar","aditi raghunathan","Robbie Jones","Tengyu Ma","Percy Liang"],"abstract":"When transferring a pretrained model to a downstream task, two popular methods are full fine-tuning (updating all the model parameters) and linear probing (updating only the last linear layer -- the \"head\"). It is well known that fine-tuning leads to better accuracy in-distribution (ID). However, in this paper, we find that fine-tuning can achieve worse accuracy than linear probing out-of-distribution (OOD) when the pretrained features are good and the distribution shift is large. On 10 distribution shift datasets (Breeds-Living17, Breeds-Entity30, DomainNet, CIFAR $\\to$ STL, CIFAR10.1, FMoW, ImageNetV2, ImageNet-R, ImageNet-A, ImageNet-Sketch), fine-tuning obtains on average 2% higher accuracy ID but 7% lower accuracy OOD than linear probing. We show theoretically that this tradeoff between ID and OOD accuracy arises even in a simple setting: fine-tuning overparameterized two-layer linear networks. We prove that the OOD error of fine-tuning is high when we initialize with a fixed or random head -- this is because while fine-tuning learns the head, the lower layers of the neural network change simultaneously and distort the pretrained features. Our analysis suggests that the easy two-step strategy of linear probing then full fine-tuning (LP-FT), sometimes used as a fine-tuning heuristic, combines the benefits of both fine-tuning and linear probing. Empirically, LP-FT outperforms both fine-tuning and linear probing on the above datasets (1% better ID, 10% better OOD than full fine-tuning).","url_abs":"https://arxiv.org/abs/2202.10054v1","url_pdf":"https://arxiv.org/pdf/2202.10054v1.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":"fine-tuning-can-distort-pretrained-features","repo_url":"https://github.com/Aaditya-Singh/Low-Shot-Robustness","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"fine-tuning-can-distort-pretrained-features","repo_url":"https://github.com/hsh1108/daft","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"fine-tuning-can-distort-pretrained-features","repo_url":"https://github.com/skhnha/daft","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[],"methods":[{"method_slug":"linear-layer","method_name":"Linear Layer"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2202.10054","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2202.10054"}},"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/Aaditya-Singh/Low-Shot-Robustness","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/hsh1108/daft","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/skhnha/daft","reach":null}],"summary":{"ran_fixture":1,"unverified":3},"by_repo_kind":{"listed":{"samples":4,"ran":1,"repositories":2}},"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":"5ceddfee16e557e7","entry":"train_epoch","repo":"hsh1108/daft","repo_kind":"listed","path":"lp_sgd.py","file_url":"https://github.com/hsh1108/daft/blob/HEAD/lp_sgd.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5ceddfee16e557e7"}},{"code_sha256_prefix":"0d3bf4b33434cf07","entry":"main","repo":"skhnha/daft","repo_kind":"listed","path":"ft_sgd.py","file_url":"https://github.com/skhnha/daft/blob/HEAD/ft_sgd.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":"0d3bf4b33434cf07"}},{"code_sha256_prefix":"78430fe0e766f96a","entry":"test_epoch","repo":"skhnha/daft","repo_kind":"listed","path":"ft_sgd.py","file_url":"https://github.com/skhnha/daft/blob/HEAD/ft_sgd.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":"78430fe0e766f96a"}},{"code_sha256_prefix":"df6396fcc8d20e79","entry":"train_epoch","repo":"skhnha/daft","repo_kind":"listed","path":"ft_sgd.py","file_url":"https://github.com/skhnha/daft/blob/HEAD/ft_sgd.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":"df6396fcc8d20e79"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}