{"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/dp-bart-for-privatized-text-rewriting-under","title":"DP-BART for Privatized Text Rewriting under Local Differential Privacy","arxiv_id":"2302.07636","date":"2023-02-15","proceeding":null,"authors":["Timour Igamberdiev","Ivan Habernal"],"abstract":"Privatized text rewriting with local differential privacy (LDP) is a recent approach that enables sharing of sensitive textual documents while formally guaranteeing privacy protection to individuals. However, existing systems face several issues, such as formal mathematical flaws, unrealistic privacy guarantees, privatization of only individual words, as well as a lack of transparency and reproducibility. In this paper, we propose a new system 'DP-BART' that largely outperforms existing LDP systems. Our approach uses a novel clipping method, iterative pruning, and further training of internal representations which drastically reduces the amount of noise required for DP guarantees. We run experiments on five textual datasets of varying sizes, rewriting them at different privacy guarantees and evaluating the rewritten texts on downstream text classification tasks. Finally, we thoroughly discuss the privatized text rewriting approach and its limitations, including the problem of the strict text adjacency constraint in the LDP paradigm that leads to the high noise requirement.","url_abs":"https://arxiv.org/abs/2302.07636v2","url_pdf":"https://arxiv.org/pdf/2302.07636v2.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":"dp-bart-for-privatized-text-rewriting-under","repo_url":"https://github.com/trusthlt/dp-bart-private-rewriting","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"text-classification","task_name":"Text Classification"},{"task_slug":"text-classification-1","task_name":"text-classification"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2302.07636","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2302.07636"}},"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/trusthlt/dp-bart-private-rewriting","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_violates":1,"unverified":4},"by_repo_kind":{"official":{"samples":5,"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":0,"samples":[{"code_sha256_prefix":"387318c7a376d775","entry":"str2bool","repo":"trusthlt/dp-bart-private-rewriting","repo_kind":"official","path":"settings.py","file_url":"https://github.com/trusthlt/dp-bart-private-rewriting/blob/HEAD/settings.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"387318c7a376d775"}},{"code_sha256_prefix":"bb4df0b44b60a116","entry":"calibrateAnalyticGaussianMechanism","repo":"trusthlt/dp-bart-private-rewriting","repo_kind":"official","path":"utils.py","file_url":"https://github.com/trusthlt/dp-bart-private-rewriting/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"bb4df0b44b60a116"}},{"code_sha256_prefix":"c372df1eec72abef","entry":"calibrateAnalyticGaussianMechanism_precision","repo":"trusthlt/dp-bart-private-rewriting","repo_kind":"official","path":"utils.py","file_url":"https://github.com/trusthlt/dp-bart-private-rewriting/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c372df1eec72abef"}},{"code_sha256_prefix":"239fcf9b6b9751eb","entry":"get_model_type","repo":"trusthlt/dp-bart-private-rewriting","repo_kind":"official","path":"utils.py","file_url":"https://github.com/trusthlt/dp-bart-private-rewriting/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"239fcf9b6b9751eb"}},{"code_sha256_prefix":"4204c49ac3c9f24d","entry":"sorted_alphanumeric","repo":"trusthlt/dp-bart-private-rewriting","repo_kind":"official","path":"settings.py","file_url":"https://github.com/trusthlt/dp-bart-private-rewriting/blob/HEAD/settings.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4204c49ac3c9f24d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}