TL;DR
Standard differentially private (DP) text generation methods sample sensitive data uniformly at random to create batches, which inadvertently erases semantic diversity when the underlying data is heterogeneous. This paper introduces a novel framework that pre-clusters data using public anchors and aggregates next-token logits using a private median instead of a mean. This approach drastically improves the representativeness and utility of synthetic text while providing data-dependent, ex-post privacy guarantees at a fraction of the privacy cost.
What Problem Does This Paper Address?
Differentially private (DP) inference allows organizations to generate high-quality synthetic text from sensitive datasets (like medical records or private user reviews) without leaking individual secrets. Typically, an off-the-shelf Large Language Model (LLM) is prompted with several sensitive "seed" examples to generate a rewrite, and the token probabilities across these parallel inferences are averaged to satisfy DP requirements.
However, existing state-of-the-art methods batch these sensitive seed examples uniformly at random. If the dataset contains heterogeneous topics, uniform batching forces the LLM to average out completely different concepts. As a result, the distinct semantic clusters found in the original data collapse into a generic, unrepresentative blend.
Methods
The authors introduce two major algorithmic improvements to remedy this collapse:
- Public Centers with Rebalancing (Clustering): To group similar seeds without violating privacy, the authors leverage a high-quality public dataset (e.g., Wikipedia) to generate cluster centers via standard $k$-means. Private seeds are then mapped to the closest public center. To fix the issue of highly imbalanced clusters, they compute a noisy, privacy-preserving count of seeds per cluster, keep only the top-$k'$ most populated clusters, and re-assign the seeds.
- Median Aggregation: Instead of averaging the clipped logit scores across a batch, the algorithm computes a component-wise median.
$$\text{aggregate}(Z) = \text{median}(\{\text{clip}_c(\mathbf{z}) : \mathbf{z} \in Z\})$$
Averaging relies on global sensitivity (worst-case bounds), which requires injecting significant noise. Conversely, a median operation benefits from local sensitivity—if the inputs are highly similar and well-concentrated (thanks to the pre-clustering step), adding or removing a single sequence barely shifts the median. This allows the authors to compute a tight, data-dependent, ex-post privacy guarantee.
Datasets
The framework was evaluated using the following datasets:
- DBPedia: A 14-category Wikipedia article topic dataset used exclusively as the public dataset to establish cluster centers.
- AGNews: A 4-way news topic classification dataset (used as a private target).
- Yelp / Yelp Polarity: A 2-way review sentiment classification dataset (used as a private target).
- NYT Topics: An 8-way news topic classification dataset (used as a private target).
Key Insights and Ideas
- Alignment Lowers Privacy Cost: When batches are semantically homogeneous, the LLM's next-token predictions naturally align. Because the local sensitivity of a median drops to zero when inputs are identical, consensus among inferences directly translates to a lower privacy spend ($\epsilon$).
- Clipping Forces Consensus: Logit scores can vary in scale even if they agree on the top token. The authors show that logit clipping (
clip_c) is vital because it standardizes the scale and forces alignment at the head of the distribution, driving local sensitivity down. - The Failure of Pure DP Clustering: Attempting to run standard DP clustering directly on private text embeddings fails in high dimensions, often collapsing hundreds of requested clusters into fewer than 10 highly imbalanced groups. Using public anchors bypasses this high-dimensional noise bottleneck.
Key Results
The authors evaluated text quality using MAUVE (a metric measuring distributional similarity to real data) and BERT Accuracy (training a BERT model on the synthetic data and testing it on real data).
- Massive Representativeness Gains: On AGNews ($\epsilon = 3$), switching from the standard Mean Baseline to Median Clustered improved the MAUVE score from .141 to .688.
- Downstream Utility Boost: On the same AGNews setup, downstream BERT classification accuracy rose from 70.1% to 86.0%.
- Lower Privacy Cost: The median mechanism achieved these quality improvements at a significantly lower empirical privacy cost ($\epsilon \approx 1.22$ to $2.40$) than the baseline's rigid budget ($\epsilon = 10$).
Limitations and Future Work
- Logit Access Required: The median aggregation technique requires direct, white-box access to the LLM's token logit scores. This makes it incompatible with closed, generation-only commercial APIs (e.g., standard OpenAI or Anthropic endpoints).
- Linear Computational Overhead: Running DP inference means the computational cost scales linearly with the batch size, making it significantly more expensive than standard non-private text generation (though it remains highly parallelizable).
- Accounting for the Tail: As seen in their NYT Topics experiments, the overall privacy guarantee is bottlenecked by the maximum privacy cost across all batches. If even a few batches have poor alignment (a long right tail), the reported ex-post $\epsilon$ increases. Developing accounting methods that handle this distribution better is an open area for future work.
Summary updated