{"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/differentially-private-fine-tuning-of-1","title":"Differentially Private Fine-tuning of Language Models","arxiv_id":"2110.06500","date":"2021-10-13","proceeding":"ICLR 2022 4","authors":["Da Yu","Saurabh Naik","Arturs Backurs","Sivakanth Gopi","Huseyin A. Inan","Gautam Kamath","Janardhan Kulkarni","Yin Tat Lee","Andre Manoel","Lukas Wutschitz","Sergey Yekhanin","Huishuai Zhang"],"abstract":"We give simpler, sparser, and faster algorithms for differentially private fine-tuning of large-scale pre-trained language models, which achieve the state-of-the-art privacy versus utility tradeoffs on many standard NLP tasks. We propose a meta-framework for this problem, inspired by the recent success of highly parameter-efficient methods for fine-tuning. Our experiments show that differentially private adaptations of these approaches outperform previous private algorithms in three important dimensions: utility, privacy, and the computational and memory cost of private training. On many commonly studied datasets, the utility of private models approaches that of non-private models. For example, on the MNLI dataset we achieve an accuracy of $87.8\\%$ using RoBERTa-Large and $83.5\\%$ using RoBERTa-Base with a privacy budget of $\\epsilon = 6.7$. In comparison, absent privacy constraints, RoBERTa-Large achieves an accuracy of $90.2\\%$. Our findings are similar for natural language generation tasks. Privately fine-tuning with DART, GPT-2-Small, GPT-2-Medium, GPT-2-Large, and GPT-2-XL achieve BLEU scores of 38.5, 42.0, 43.1, and 43.8 respectively (privacy budget of $\\epsilon = 6.8,\\delta=$ 1e-5) whereas the non-private baseline is $48.1$. All our experiments suggest that larger models are better suited for private fine-tuning: while they are well known to achieve superior accuracy non-privately, we find that they also better maintain their accuracy when privacy is introduced.","url_abs":"https://arxiv.org/abs/2110.06500v2","url_pdf":"https://arxiv.org/pdf/2110.06500v2.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":"differentially-private-fine-tuning-of-1","repo_url":"https://github.com/anonymousakes/differentially-private-fine-tuning-of-language-models","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"differentially-private-fine-tuning-of-1","repo_url":"https://github.com/huseyinatahaninan/differentially-private-fine-tuning-of-language-models","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"text-generation","task_name":"Text Generation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2110.06500","atlas_url":"https://app.syntology.ai/?focus=2110.06500","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2110.06500"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/huseyinatahaninan/differentially-private-fine-tuning-of-language-models","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/anonymousakes/differentially-private-fine-tuning-of-language-models","reach":{"status":"ok"}}],"summary":{"ran_honours":1,"ran_draft_wrong":1},"by_repo_kind":{"official":{"samples":2,"ran":2,"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":"695cf8807f968acc","entry":"evaluate","repo":"huseyinatahaninan/differentially-private-fine-tuning-of-language-models","repo_kind":"official","path":"Language-Generation-GPT-2/src/gpt2_ft.py","file_url":"https://github.com/huseyinatahaninan/differentially-private-fine-tuning-of-language-models/blob/HEAD/Language-Generation-GPT-2/src/gpt2_ft.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"695cf8807f968acc"}},{"code_sha256_prefix":"0698e0145eac1643","entry":"reverse_zero_pad","repo":"huseyinatahaninan/differentially-private-fine-tuning-of-language-models","repo_kind":"official","path":"Language-Generation-GPT-2/src/gpt2_ft.py","file_url":"https://github.com/huseyinatahaninan/differentially-private-fine-tuning-of-language-models/blob/HEAD/Language-Generation-GPT-2/src/gpt2_ft.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0698e0145eac1643"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}