Is API Access to LLMs Useful for Generating Private Synthetic Tabular Data?

Marika Swanberg, Ryan McKenna, Edo Roth, Albert Cheu, Peter Kairouz · DOI

Introduction

Sharing sensitive tabular data, such as medical records or financial transactions, presents significant privacy risks. Differential Privacy (DP) provides a mathematical framework to ensure individual records cannot be re-identified. However, creating synthetic datasets that are both private and analytically useful remains a major challenge. While recent breakthroughs have leveraged Large Language Models (LLMs) for this task, most successful methods require "white-box" access to model weights for fine-tuning. This paper investigates whether state-of-the-art LLMs can still be effective for private data generation when accessed solely through a proprietary API (e.g., Gemini or GPT-4).

Methods

The researchers explored two primary algorithmic strategies to bridge the gap between API-based LLMs and DP requirements:

  1. Adapted Private Evolution (PE): This iterative genetic algorithm maintains a set of candidate records. Private records "vote" for the best candidates via a DP histogram, and the LLM API is then prompted to generate variations of these winners. To optimize this for tables, the authors introduced a workload-aware distance function that measures how well candidates satisfy specific analytical queries (marginals) rather than using generic text embeddings.
  2. One-Shot "Gem_Synth": To avoid the high privacy cost of iterative queries, this approach prompts the LLM once (without seeing private data) to generate a large "public-ish" synthetic dataset based on schema information. This data is then used to "warm-start" established DP algorithms like PMWpub or JAM.

Key Insights

The Privacy-Iteration Tradeoff

In Private Evolution experiments, the authors observed that a single iteration was often optimal. While more iterations can improve data quality in a non-private setting, each query to the private data consumes a portion of the privacy budget ($\epsilon$). The marginal improvement from additional LLM-guided iterations is frequently outweighed by the increased noise required to protect privacy across multiple rounds.

Distributions of NYC Taxi features (top) and convergence of Private Evolution iterations (bottom) showing the model's ability to capture realistic data patterns.

The Power of the "Prior"

LLMs possess a strong inherent "prior" for realistic data. Even without exposure to private records, models like Gemini can generate synthetic rows that respect basic 1-way marginal distributions—for instance, correctly correlating "trip distance" and "fare amount" in taxi datasets.

Tabular Data: A High Bar

Unlike image or text generation, DP tabular data generation is a mature field with highly optimized specialized algorithms. Methods like MST (Maximum Spanning Tree) are specifically designed to capture complex correlations in tables and proved difficult for general-purpose LLM-based API methods to consistently outperform.

Key Results

Experimental evaluations on the NYC Taxi and UCI Adult datasets revealed several critical findings:

  • PE vs. Baselines: The adapted PE algorithm struggled to consistently beat simple baselines like "Independent" (1-way marginals) or direct "DP Workload" queries.
  • One-Shot Performance: The "one-shot" approach showed more promise. Specifically, combining Gemini-generated data with the JAM algorithm achieved the best overall performance on the UCI Adult benchmark.
  • The Uniformity Paradox: Notably, JAM performed nearly as well when initialized with uniform random data as it did with Gemini's "smart" data. This suggests that the current bottleneck lies in how DP algorithms utilize public priors rather than the quality of the priors themselves.
Workload error comparison across different privacy budgets (epsilon) for various synthetic data generation methods on the UCI Adult dataset.

Limitations and Future Work

Several hurdles remain for API-based LLM approaches in the tabular domain. Current models lack domain-specific embeddings that understand numerical scales and categorical constraints. Furthermore, while LLMs can follow structured output formats, they still struggle with complex $k$-way marginals. Future research may focus on fine-tuning LLMs on public tabular data before API deployment or developing hybrid algorithms that combine evolutionary logic with one-shot efficiency.

Summary updated

BibTeX
@misc{swanberg2025is,
  author = {Marika Swanberg and Ryan McKenna and Edo Roth and Albert Cheu and Peter Kairouz},
  title = {{Is API Access to LLMs Useful for Generating Private Synthetic Tabular Data?}},
  year = {2025},
  eprint = {2502.06555},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.06555},
}
Figure