Adaptive Text Anonymization: Learning Privacy-Utility Trade-offs via Prompt Optimization
Paper · 2026 · Gabriel Loiseau, Damien Sileo, Damien Riquet et al.
Summary
Text anonymization depends heavily on context. The right level of privacy protection, and the kind of utility that must survive, change with the domain, the threat model and the downstream use. Current LLM-based anonymizers have three weaknesses: they use one hand-written prompt per scenario, they need laborious manual prompt engineering, and they often rely on proprietary APIs, which is awkward when the data is sensitive. The authors define a new task, adaptive text anonymization, in which the anonymization strategy is learned automatically for stated privacy and utility goals. Their framework optimizes the anonymizer's instructions with the reflective, evolutionary optimizer GEPA. It starts from a minimal seed prompt and first warms up using only privacy and utility scores. It then refines candidate prompts using richer feedback, such as reasoning traces and task details, and keeps several trade-off points. The authors also build a benchmark of five datasets with varied domains, privacy targets and utility measures. Across all settings, the method beats existing baselines on the privacy–utility trade-off. It runs efficiently on open-source models and matches larger closed models, which makes locally controlled anonymization practical.
Key points
- The optimization builds on GEPA (Agrawal et al., 2026) and uses staged feedback: score-only warm-start, then rich-feedback refinement with small validation samples. It can yield multiple Pareto-optimal prompts in a single run.
- The evaluation suite covers five anonymization tasks with distinct privacy and utility objectives, including SynthPAI.
- In a SynthPAI case study, the optimized Qwen3 anonymizer replaced only the one cue revealing education ("weekdays"). This kept the text nearly intact (ROUGE-1 = 0.87).
- Gemma and Mistral-Small kept education-related wording and therefore leaked the attribute.
- Mistral also paraphrased heavily, which lowered ROUGE-1 to 0.52 with no privacy gain.
- The data, code and optimized prompts are released at github.com/gabrielloiseau/adaptive-text-anonymization.
- Stated limitations:
- Privacy and utility are combined by unweighted aggregation.
- Each task needs a small annotated training and validation set.
- Some evaluation metrics still rely on closed-source LLMs.
- Reasoning-oriented models are excluded.
- Optimization can be unstable because LLM outputs are non-deterministic.
Institutions
Fields, topics and concepts
📚 Shelves 6The field of science this work belongs to (OpenAlex fields).Computer Science · 16,667 worksArtificial Intelligence · 16,194 worksArts and Humanities · 16,039 worksLanguage and Linguistics · 15,891 worksSocial Sciences · 1,772 worksSociology and Political Science · 577 works
Cite
Cite as Gabriel Loiseau, Damien Sileo, Damien Riquet, Maxime Meyer and Marc Tommasi. 2026. Adaptive Text Anonymization: Learning Privacy-Utility Trade-offs via Prompt Optimization. Findings of the Association for Computational Linguistics: ACL 2026.
@inproceedings{loiseau2026adaptive,
title = {{Adaptive Text Anonymization: Learning Privacy-Utility Trade-offs via Prompt Optimization}},
author = {Gabriel Loiseau, Damien Sileo, Damien Riquet, Maxime Meyer and Marc Tommasi},
booktitle = {Findings of the Association for Computational Linguistics: ACL 2026},
year = {2026},
doi = {10.18653/v1/2026.findings-acl.401},
url = {https://doi.org/10.18653/v1/2026.findings-acl.401}
}References
- Lakshya A Agrawal, Shangyin Tan, Dilara Soylu, Noah Ziems, Rishi Khare, Krista Opsahl-Ong, Arnav Singhvi, Herumb Shandilya, Michael J Ryan, Meng Jiang, Christopher Potts, Koushik Sen, Alex Dimakis, Ion Stoica, Dan Klein, Matei Zaharia, and Omar Khattab. 2026. GEPA: Reflective prompt evolution can ou… find
- Mariem Brahem, Jasmine Watissee, Cédric Eichler, Adrien Boiret, Nicolas Anciaux, and Jose Maria de Fuentes. 2024. retellme: Design rules for using large language models to protect the privacy of individuals in their textual contributions. In DPM 2024 - International Workshop on Data Privacy Manageme… find
- Lichang Chen, Jiuhai Chen, Tom Goldstein, Heng Huang, and Tianyi Zhou. 2024. Instructzero: Efficient instruction optimization for black-box large language models. In Forty-first International Conference on Machine Learning. find
- Gheorghe Comanici, Eric Bieber, Mike Schaekermann, Ice Pasupat, Noveen Sachdeva, Inderjit Dhillon, Marcel Blistein, Ori Ram, Dan Zhang, Evan Rosen, Luke Marris, Sam Petulla, Colin Gaffney, Asaf Aharoni, Nathan Lintz, Tiago Cardal Pais, Henrik Jacobsson, Idan Szpektor, Nan-Jiang Jiang, and 201 others… — Gemini 2.5: Pushing the Frontier with Advanced Reasoning, Multimodality, Long Context, and Next Generation Agentic Capabilities
- Tobias Deußer, Lorenz Sparrenberg, Armin Berger, Max Hahnbück, Christian Bauckhage, and Rafet Sifa. 2025. A survey on current trends and recent advances in text anonymization. In 2025 IEEE 12th International Conference on Data Science and Advanced Analytics (DSAA), pages 1–9. find
- Yao Dou, Isadora Krsek, Tarek Naous, Anubha Kabra, Sauvik Das, Alan Ritter, and Wei Xu. 2024. Reducing privacy risks in online self-disclosures with language models. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 13732–13754,… find
- Cynthia Dwork. 2006. Differential privacy. In Automata, Languages and Programming, pages 1– 12, Berlin, Heidelberg. Springer Berlin Heidelberg. find
- Gil Francopoulo and Léon-Paul Schaub. 2020. Anonymization for the GDPR in the Context of Citizen and Customer Relationship Management and NLP. In workshop on Legal and Ethical Issues (Legal2020), pages 9–14, Marseille, France. LREC2020, ELRA. find
- Ahmed Frikha, Nassim Walha, Krishna Kanth Nakka, Ricardo Mendes, Xue Jiang, and Xuebing Zhou. 2024. Incognitext: Privacy-enhancing conditional text anonymization via LLM-based private attribute randomization. In Neurips Safe Generative AI Workshop 2024.
- GDPR. 2016. Article 5 — principles relating to processing of personal data. Accessed: 2025-12-16. find
- Rajitha Hathurusinghe, Isar Nejadgholi, and Miodrag Bolic. 2021. A privacy-preserving approach to extraction of personal information through automatic annotation and federated learning. In Proceedings of the Third Workshop on Privacy in Natural Language Processing, pages 36–45, Online. Association f… find
- Di Jin, Eileen Pan, Nassim Oufattole, Wei-Hung Weng, Hanyi Fang, and Peter Szolovits. 2021. What disease does this patient have? a large-scale open domain question answering dataset from medical exams. Applied Sciences, 11(14):6421.
- Technologies (Volume 1: Long Papers), pages 3371– 3390, Albuquerque, New Mexico. Association for Computational Linguistics. find
- Pierre Lison, Ildikó Pilán, David Sanchez, Montserrat Batet, and Lilja Øvrelid. 2021. Anonymisation models for text data: State of the art, challenges and future directions. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Co… find
- Gabriel Loiseau, Damien Sileo, Damien Riquet, Maxime Meyer, and Marc Tommasi. 2025. Tau-eval: A unified evaluation framework for useful and private text anonymization. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 216–227, Suz… find
- Justus Mattern, Benjamin Weggenmann, and Florian Kerschbaum. 2022. The limits of word level differential privacy. In Findings of the Association for Computational Linguistics: NAACL 2022, pages 867–881, Seattle, United States. Association for Computational Linguistics. find
- Stephen Meisenbacher, Maulik Chevli, and Florian Matthes. 2025. On the impact of noise in differentially private text rewriting. In Findings of the Association for Computational Linguistics: NAACL 2025, pages 514–532, Albuquerque, New Mexico. Association for Computational Linguistics. find
- Stephen Meisenbacher, Maulik Chevli, Juraj Vladika, and Florian Matthes. 2024. DP-MLM: Differentially private text rewriting using masked language models. In Findings of the Association for Computational Linguistics: ACL 2024, pages 9314–9328, Bangkok, Thailand. Association for Computational Linguis… find
- OpenAI. 2025. Gpt-5 system card. Technical report, OpenAI. Accessed: 2025-12-18. find
- Omar Khattab, Arnav Singhvi, Paridhi Maheshwari, Zhiyuan Zhang, Keshav Santhanam, Sri Vardhamanan A, Saiful Haq, Ashutosh Sharma, Thomas T. Joshi, Hanna Moazam, Heather Miller, Matei Zaharia, and Christopher Potts. 2024. DSPy: Compiling declarative language model calls into state-of-the-art pipeline… find
- Krista Opsahl-Ong, Michael J Ryan, Josh Purtell, David Broman, Christopher Potts, Matei Zaharia, and Omar Khattab. 2024. Optimizing instructions and demonstrations for multi-stage language model programs. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, page…
- Siyan Li, Vethavikashini Chithrra Raghuram, Omar Khattab, Julia Hirschberg, and Zhou Yu. 2025. PAPILLON: Privacy preservation from Internet-based and local language model ensembles. In Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Ling… find
- Constantinos Patsakis and Nikolaos Lykousas. 2023. Man vs the machine in the struggle for effective text anonymisation in the age of large language models. In Scientific Reports, volume 13, page 16026. find
- Nature Publishing Group UK London. and Denny Zhou. 2022. Chain-of-thought prompting elicits reasoning in large language models. In Proceedings of the 36th International Conference on Neural Information Processing Systems, NIPS ’22, Red Hook, NY, USA. Curran Associates Inc.
- Ildikó Pilán, Pierre Lison, Lilja Øvrelid, Anthi Papadopoulou, David Sánchez, and Montserrat Batet. 2022. The text anonymization benchmark (TAB): A dedicated corpus and evaluation framework for text anonymization. Computational Linguistics, 48(4):1053–1101.
- Rui Xin, Niloofar Mireshghallah, Shuyue Stella Li, Michael Duan, Hyunwoo Kim, Yejin Choi, Yulia Tsvetkov, Sewoong Oh, and Pang Wei Koh. 2025. A false sense of privacy: Evaluating textual data sanitization beyond surface-level privacy leakage. In ICLR 2025 Workshop on Building Trust in Language Model… find
- Rafael A. Rivera-Soto, Olivia Elizabeth Miano, Juanita Ordonez, Barry Y. Chen, Aleem Khan, Marcus Bishop, and Nicholas Andrews. 2021. Learning universal authorship representations. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 913–919, Online and Pu… find
- Robin Staab, Mark Vero, Mislav Balunovic, and Martin Vechev. 2024. Beyond memorization: Violating privacy via inference with large language models. In The Twelfth International Conference on Learning Representations. find
- Robin Staab, Mark Vero, Mislav Balunovic, and Martin Vechev. 2025. Language models are advanced anonymizers. In The Thirteenth International Conference on Learning Representations. find
- Gemma Team, Aishwarya Kamath, Johan Ferret, Shreya Pathak, Nino Vieillard, Ramona Merhej, Sarah Perrin, Tatiana Matejovicova, Alexandre Ramé, Morgane Rivière, Louis Rouillard, Thomas Mesnard, Geoffrey Cideron, Jean bastien Grill, Sabela Ramos, Edouard Yvinec, Michelle Casbon, Etienne Pot, Ivo Penche… find
- Qwen Team. 2025. Qwen3 technical report. Preprint, arXiv:2505.09388.
- Saiteja Utpala, Sara Hooker, and Pin-Yu Chen. 2023. Locally differentially private document generation using zero shot prompting. In Findings of the Association for Computational Linguistics: EMNLP 2023, pages 8442–8457, Singapore. Association for Computational Linguistics. find
- Benjamin Warner, Antoine Chaffin, Benjamin Clavié, Orion Weller, Oskar Hallström, Said Taghadouini, Alexis Gallagher, Raja Biswas, Faisal Ladhak, Tom Aarsen, Griffin Thomas Adams, Jeremy Howard, and Iacopo Poli. 2025. Smarter, better, faster, longer: A modern bidirectional encoder for fast, memory e…
- Chengrun Yang, Xuezhi Wang, Yifeng Lu, Hanxiao Liu, Quoc V Le, Denny Zhou, and Xinyun Chen. 2024. Large language models as optimizers. In The Twelfth International Conference on Learning Representations.
- Tianyu Yang, Xiaodan Zhu, and Iryna Gurevych. 2025. Robust utility-preserving text anonymization based on large language models. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 28922–28941, Vienna, Austria. Association for Com… find
- Oleksandr Yermilov, Vipul Raheja, and Artem Chernodub. 2023. Privacy- and utility-preserving NLP with anonymized data: A case study of pseudonymization. In Proceedings of the 3rd Workshop on Trustworthy Natural Language Processing (TrustNLP 2023), pages 232–241, Toronto, Canada. Association for Comp… find
- Hanna Yukhymenko, Robin Staab, Mark Vero, and Martin Vechev. 2024. A synthetic dataset for personal attribute inference. In Thirty-eighth Conference on Neural Information Processing Systems Datasets and Benchmarks Track. find
- Wenting Zhao, Xiang Ren, Jack Hessel, Claire Cardie, Yejin Choi, and Yuntian Deng. 2024. Wildchat: 1m chatGPT interaction logs in the wild. In The Twelfth International Conference on Learning Representations.
- Yongchao Zhou, Andrei Ioan Muresanu, Ziwen Han, Keiran Paster, Silviu Pitis, Harris Chan, and Jimmy Ba. 2023. Large language models are human-level prompt engineers. In The Eleventh International Conference on Learning Representations.
- Erion Çano and Ivan Habernal. 2025. Differentially-private text generation degrades output language quality. Preprint, arXiv:2509.11176. — [arXiv:2509.11176](https://arxiv.org/abs/2509.11176) find
- Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed H. Chi, Quoc V. Le, *Figure 4: A comparison of learning behavior of our modified GEPA implementation against each separated component and a state-of-the-art prompt optimizer reference (MIPROv2). Results are measures wi… find
Updated
This page in Markdown → https://md.research.elamur.ai/free/en/papers/loiseau-2026-adaptive-text-anonymization-learning-privacy/