RL-Finetuned LLMs for Privacy-Preserving Synthetic Rewriting
Zhan Shi, Yefeng Yuan, Yuhong Liu, Liang Cheng, Yi Fang · 2025
Read RL-Finetuned LLMs for Privacy-Preserving Synthetic Rewriting by Zhan Shi, Yefeng Yuan, Yuhong Liu, Liang Cheng, Yi Fang (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2508-19286.txt.
Introduction
Rich text data often hides private details, and simply blanking names fails because writing style and topic can still betray the author. Zhan Shi and four co-authors propose a learning setup in a 2025 paper that teaches a large language model to rewrite text so it reads the same but reveals less. The model earns rewards for hiding both direct and indirect identity clues, keeping the meaning, and varying its output.
A privacy score built from patterns across many writers guides the training. In tests, the rewrites hid authorship far better while keeping the sense intact. The authors present the method as a scalable way to share text data safely.
Catalog record
| CREATOR | Zhan Shi, Yefeng Yuan, Yuhong Liu, Liang Cheng, Yi Fang |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 69 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2508-19286
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
RL-Finetuned LLMs for Privacy-Preserving Synthetic Rewriting Zhan Shi, Yefeng Yuan, Yuhong Liu, Liang Cheng, Yi Fang Abstract The performance of modern machine learning systems depends on access to large, high-quality datasets, often sourced from user-generated content or proprietary, domain-specific corpora. However, these rich datasets inherently contain sensitive personal information, raising significant concerns about privacy, data security, and compliance with regulatory frameworks. While conventional anonymization techniques can remove explicit identifiers, such removal may result in performance drop in downstream machine learning tasks. More importantly, simple anonymization may not be effective against inference attacks that exploit implicit signals such as writing style, topical focus, or demographic cues, highlighting the need for more robust privacy safeguards during model training. To address the challenging issue of balancing user privacy and data utility, we propose a reinforcement learning framework that fine-tunes a large language model (LLM) using a composite reward function that jointly optimizes for explicit and implicit privacy, semantic fidelity, and output diversity. To effectively capture population level regularities, the privacy reward combines semantic cues with structural patterns derived from a minimum spanning tree (MST) over latent representations. By modeling these privacy-sensitive signals in their distributional context, the proposed approach guides the model to generate synthetic rewrites that preserve utility while mitigating privacy risks. Empirical results show that the proposed method significantly enhances author obfuscation and privacy metrics without degrading semantic quality, providing a scalable and model-agnostic solution for privacy preserving data generation in the era of large language models. I Introduction The advent and rapid proliferation of Artificial Intelligence (AI) have underscored the critical role of data in training effective machine learning models. These sophisticated models, capable of human-like text generation and comprehension, are fueled by vast datasets, often encompassing personal or domain-specific information to meet the increasing requirements of downstream applications and specialized tasks. This insatiable demand for high-quality data, however, runs parallel to mounting concerns regarding user privacy, as recent research demonstrates that models can inadvertently leak sensitive information, even when direct identifiers are masked [ 1 ] . Particularly, there are two major challenges. First, implicit privacy [ 2 ] can be inferred from seemingly innocuous text by advanced attacks. Unlike explicit personally identifiable information (PII), such as names or addresses, implicit attributes (e.g. gender, age, religion, personal interests, etc.) may be deduced from linguistic nuance. For instance, the sentence “ Just grabbed a late-night bite at that new taco truck after coding all day ” contains no direct location marker, yet a motivated attacker could infer the author’s likely residence in a tech-centric city like San Jose based on cultural context and lifestyle cues. Second, stylometric leakage magnifies this risk. Even after explicit PII is scrubbed, an author’s writing fingerprint (i.e., features like function-word frequency, sentence-length distribution, punctuation preferences, and higher-order discourse patterns), remains remarkably stable [ 3 ] . Stylometry models routinely achieve >90\% accuracy in re-identifying authors given only a handful of paragraphs. Moreover, extreme stylistic or lexical anomalies (statistical outliers) attract adversarial attention: they sit far from population manifolds, making them high-value targets for attribute inference attacks. Existing industry-standard anonymization tools, which primarily focus on pattern-matching for structured PII, often fall short in addressing complex, context-dependent implicit and stylometric privacy leakages [ 4 ] . Furthermore, these anonymization tools often indiscriminately mask information, leading to a loss of data utility and readability. It is particularly problematic for the short, informal nature of much online text. On the other hand, Differential Privacy (DP) [ 5 ] offers formal guarantees, but lowering the privacy budget \epsilon often degrades semantic quality, forcing practitioners into a harsh privacy–utility trade-off. These challenges coupled with the increasing regulatory push for stronger privacy protections [ 6 ] (e.g., GDPR, CCPA), are driving demand for new robust user privacy protection strategies. Recent advancement in generative AI highlights a promising direction: protect user privacy by replacing the original sensitive contents with text-rewriting [ 7 ] . For example, some studies propose adversarial approaches, where one LLM attempts to anonymize text while another tries to infer attributes [ 8 ] , to enhance the robustness of synthetic text against privacy inference attacks. However, state-of-the-art privacy-preserving text generation methods typically rewrite a single input under a global semantic-consistency objective. Consequently, (1) global stylistic cues persist, (2) outliers remain unsmoothed, and (3) the lack of diverse candidates precludes selecting the least recognizable version. Threat Model In this work, we mainly focus on privacy attacks where malicious attackers aim to infer users’ sensitive information, including not only PII, but also other attributes, such as age, gender, location, personal interests, online writing style, etc. By collecting such information, malicious attackers may be able to perform direct attacks, such as identity theft, impersonation, and singling out attacks, or indirect misuse such as target marketing or sales of personal data. To address such privacy threats, we propose a STYLE-MST Rewriter , an LLM-based privacy-aware text-rewriting framework that integrates corpus-level graph regularization with preference-based reinforcement learning. The proposed framework maintains, in streaming fashion, a minimum–spanning tree (MST), whose edge weights depend jointly on TF–IDF n -gram vectors (capturing surface semantics) and learned style embeddings (capturing authorial voice). A candidate rewrite is rewarded when its average NovelSum [ 9 ] , a density-aware measure of local semantic novelty, is high and its contribution to the tree’s mean edge length is low, thereby discouraging both mode collapse and isolated stylistic outliers. A memory-aware instance of Group Relative Policy Optimization (GRPO) [ 10 ] trains a Low-Rank Adaptation (LoRA) [ 11 ] adapter attached to a frozen 3-B-parameter LLaMA [ 12 ] backbone. For every prompt the model emits four rewrites together with an explicit reasoning trace that lists detected PII and planned transformations; the highest-valued rewrite and a randomly selected lower-valued rewrite form a preference pair that drives the GRPO update. The composite reward combines BERT-based semantic similarity, explicit-entity overlap, style-entropy derived from a lightweight AuthorMix classifier, length and format regularisers, and the graph-based STYLE–MST term. The major contributions of this work are summarized below. • First, we craft a graph-regularized STYLE-MST reward that promotes semantic diversity while suppressing stylistic outliers through population-level regularization that explicitly incorporates contextual information. • Second, we inject chain-of-thought reasoning into a reinforcement-learning procedure that optimizes over multiple candidate rewrites, enabling amortized inference and superior generalization beyond greedy reward selection. • Third, we pair an off-the-shelf LLM with a multi-axis scoring module that jointly evaluates semantic fidelity, explicit PII exposure, implicit attribute leakage, stylometric similarity, and outlier risk, returning the safest yet most faithful paraphrase. This unified reward schema balances five privacy dimensions within a lightweight, high-throughput pipeline, achieving a significant reduction in author reidentification accuracy while preserving the original semantics compared with strong baselines. Together, these components deliver high-utility controllable rewriting that retains meaning and stylistic coherence across diverse tasks, closing the introduction to our study. The rest of the paper is organized as follows. Related work is discussed in Section II , followed by an overview of the proposed framework in Section III . Then the three major components of the proposed framework are discussed in Section IV - VI . The experiment setup and validation of the proposed scheme is discussed in detail in Section VII -