DPGA-TextSyn: Differentially Private Genetic Algorithm for Synthetic Text Generation

Zhonghao Sun, Zhiliang Tian, Yiping Song, Yuyi Si, Juhua Zhang, Minlie Huang, Kai Lu, Zeyu Xiong, Xinwang Liu, Dongsheng LiACL 2025

Abstract

This paper introduces DPGA-TextSyn, a framework that leverages Large Language Models (LLMs) and Genetic Algorithms (GA) to generate high-quality synthetic text under strict Differential Privacy (DP) guarantees. By treating privacy-preserving metadata as "genes" and employing GA strategies such as mutation and crossover via prompting, DPGA-TextSyn produces diverse and relevant data that significantly outperforms traditional DP fine-tuning methods in downstream task accuracy.

Introduction

Fine-tuning LLMs on sensitive datasets, such as medical records or private reviews, risks leaking individual data points. While Differential Privacy (DP) can mitigate this by adding mathematical noise, it often results in a "utility tax," where synthetic data becomes nonsensical. Existing methods struggle to balance diversity with relevance or require expensive fine-tuning of the LLM itself. DPGA-TextSyn addresses these challenges by treating synthetic text generation as an evolutionary process, using the LLM as a black-box generator guided by private metadata.

Methodology

The DPGA-TextSyn framework consists of three primary modules designed to evolve synthetic text toward the target distribution without violating privacy constraints:

  1. Initial Sample Synthesizing (The "Genes"): Statistical metadata—such as label distributions, text length, and descriptive keywords—are extracted using DP mechanisms like the Sparse Vector Technique and Laplace noise. These "privacy genes" guide the initial generation without exposing raw private records.
  2. Distinct Elite Sample Selection: To ensure the "survival of the fittest," initial samples undergo privacy nearest neighbor voting against a subsampled portion of the private data. Samples that are relevant but distinct (via similarity suppression) are selected for the "elite set."
  3. Elite Set Expansion (Evolution): The elite samples are evolved through LLM prompting using three strategies: Mutation (rewriting or filling blanks), Crossover (combining elements of two samples), and Generation (creating new samples guided by the original privacy genes).
Overview of the DPGA-TextSyn framework, illustrating the three-stage process: Initial Sample Synthesizing, Elite Sample Selection, and Elite Sample Expansion.

Experimental Setup

The framework was evaluated on two sensitive domains:

  • OpenReview: A dataset of ICLR 2023 paper reviews used for text classification tasks.
  • PubMed: A collection of medical paper abstracts used for language modeling tasks.

Results and Discussion

DPGA-TextSyn consistently outperformed state-of-the-art baselines like DPSGD+LoRA and AUG-PE. On OpenReview at $\epsilon = 1$, it achieved 44.53% accuracy, compared to just 6.3% for traditional DP fine-tuning. On PubMed, it reached 33.58% accuracy, nearly matching the non-private baseline of 33.95%.

Ablation studies highlighted the importance of metadata. For instance, incorporating private length distributions allows the synthetic data to closely mirror the original dataset's characteristics, which is crucial for maintaining utility and preventing the generator from producing overly homogeneous outputs.

Comparison of text length distributions between private data and synthetic data generated with and without private length distribution metadata.

Conclusion

DPGA-TextSyn demonstrates that treating metadata as "genetic material" allows LLMs to generate high-utility synthetic data without direct exposure to private records. While the method is currently dependent on high-end LLM APIs and prompt engineering, it offers a robust alternative to unstable DP fine-tuning. Future work will explore open-source model integration and more complex genetic representations of text.

Summary updated

BibTeX
@inproceedings{sun2025dpga,
  author = {Zhonghao Sun and Zhiliang Tian and Yiping Song and Yuyi Si and Juhua Zhang and Minlie Huang and Kai Lu and Zeyu Xiong and Xinwang Liu and Dongsheng Li},
  title = {{DPGA-TextSyn: Differentially Private Genetic Algorithm for Synthetic Text Generation}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure