Struct-Bench: A Benchmark for Differentially Private Structured Text Generation

Shuaiqi Wang, Vikas Raunak, Arturs Backurs, Victor Reis, Pei Zhou, Sihao Chen, Longqi Yang, Zinan Lin, Sergey Yekhanin, Giulia Fanti

TL;DR

Generating synthetic data under Differential Privacy (DP) usually targets either purely unstructured text/images or purely numeric/categorical tables. Struct-Bench introduces the first comprehensive benchmark and evaluation suite designed specifically for structured datasets containing natural language fields (such as multi-turn conversations and paper reviews). By leveraging Context-Free Grammars (CFGs) to model structure, the benchmark reveals that current DP generation methods struggle to maintain structural validity without sacrificing semantic diversity.

What Problem Does This Paper Address?

In enterprise and clinical settings, sensitive data is rarely purely free-form text or purely numeric tables. Instead, it often pairs strict structural schemas with rich natural language—such as multi-round human–bot dialogues, medical records with clinical notes, or academic review threads.

Existing synthetic data metrics fail here:

  • Unstructured metrics (e.g., FID, precision/recall) completely overlook formatting and structural constraints. A synthetic dialogue missing speaker tags might score high on semantic precision while being completely unusable in a production pipeline.
  • Tabular metrics (such as $k$-way marginal distributions) are mathematically intractable for high-dimensional free-text fields.

Methods

Struct-Bench provides a standardized, grammar-guided evaluation framework:

  1. Context-Free Grammar (CFG) Representation: Users define the schema and structural constraints of a dataset as production rules in a CFG, which parses each sample into a parse tree of nodes (e.g., alternating HUMAN: and GPT: turns).
  2. Evaluation Metrics Across Three Dimensions:
  3. Structural Metrics:
    • CFG Pass Rate (CFG-PR): The fraction of generated samples that strictly parse under the grammar.
  4. Key Node Dependency (KND): Measures semantic relationships between linked nodes (e.g., query-response pairs) by comparing the Wasserstein-2 distance of their embedding cosine similarities between real and synthetic data.
  5. Attribute Match (AM): Measures distributional distances (Wasserstein-2 or Total Variation) across sample- or node-level properties (e.g., token length, topics, intent).
  6. Non-Structural Metrics: $k$-nearest-neighbor (KNN) Precision (assessing semantic fidelity) and KNN Recall (assessing semantic diversity).
  7. Downstream Evaluations (DE): Follows the Train-Synthetic-Test-Real (TSTR) protocol, fine-tuning language models (e.g., Longformer) on labeled synthetic data to evaluate classification accuracy on held-out real data.

Datasets

Struct-Bench evaluates across seven diverse datasets spanning various structural formats:

  • Graph-Structured Real Datasets:
  • ShareGPT: Linear multi-round conversation trees between humans and LLMs.
  • ICLR 2024: Complex tree-structured threads of reviews, author rebuttals, and decision meta-reviews.
  • Tabular Real Datasets:
  • Water & Arena: Tables containing mixed categorical metadata and open-ended text.
  • Adult: Standard census demographic data (numeric/categorical only, used to test generalizability).
  • Controllable Synthetic Datasets:
  • Synthetic Reviews: Reviews paired with sentiment/ratings with controlled extreme distributions.
  • Synthetic Grounding: Multi-source document question-answering pairs balanced along relevance and consistency axes.

Key Insights and Ideas

  • No Single Metric Suffices: High semantic quality does not imply valid formatting, and vice versa. Benchmarking requires simultaneous tracking of syntactic validity, inter-node dependency, and diversity.
  • DP Fine-Tuning Fails at Structure: Differentially private stochastic gradient descent (DP-SGD) fine-tuning alone yields a 0% CFG pass rate across all datasets, because noise injection destroys strict syntactic tokens. Adding instruction guidance during generation (Instruct DP-FT) is required to restore structure.
  • The Diversity–Structure Trade-off: API-based methods like Private Evolution (PE) capture syntax well using foundation models (e.g., GPT-4o), but their blank-filling variation steps suffer from mode collapse, resulting in very low semantic diversity (KNN-Recall).
  • Post-Processing Preserves Privacy for Free: Because differential privacy is immune to post-processing, syntactic validity and semantic diversity can be engineered after or alongside voting:
  • Reformatting after voting repairs broken grammar without corrupting selection.
  • Node extraction and auto-generation (e.g., mutating only the query and auto-generating the response) unlocks substantial semantic diversity without additional privacy budget.

Key Results

  • Vanilla Baselines on ShareGPT ($\epsilon = 4$): Standard DP-FT scored 0.00 on CFG-PR. Instruct DP-FT achieved a 0.55 CFG-PR, while vanilla PE reached 0.57 (with GPT-2) and 0.86 (with GPT-4o).
  • Complex Structures Remain Hard: On the intricate tree structure of ICLR 2024, all evaluated baselines achieved CFG pass rates below 0.20 (PE with GPT-4o only reached 0.19).
  • Improving Private Evolution (PE): In a case study on ShareGPT using Llama-3-8B:
  • Vanilla PE achieved under 60% CFG-PR and ~0.35 KNN-Recall.
  • Applying LLM-assisted reformatting increased CFG-PR by over 20%.
  • Combining Query Node Extraction, Format Token Fixing, and Reformatting raised the CFG pass rate up to 94%, while simultaneously improving vocabulary diversity (Type-to-Token Ratio) and downstream task accuracy.

Limitations and Future Work

  • Context-Sensitive Grammar (CSG) Constraints: While CSGs can represent richer cross-field dependencies than CFGs, they require substantial manual rule engineering. Struct-Bench approximates these dependencies statistically via KND rather than hard grammar constraints.
  • Focus on DP Synthesis: Although the authors acknowledge Struct-Bench could evaluate non-private structured generation, the study centers primarily on DP algorithms.
  • Unified Modeling: None of the tested off-the-shelf methods currently perform well across all metrics simultaneously, highlighting the need for new generative architectures tailored to structured text under privacy constraints.

Summary updated

BibTeX
@inproceedings{wang2025struct,
  author = {Shuaiqi Wang and Vikas Raunak and Arturs Backurs and Victor Reis and Pei Zhou and Sihao Chen and Longqi Yang and Zinan Lin and Sergey Yekhanin and Giulia Fanti},
  title = {{Struct-Bench: A Benchmark for Differentially Private Structured Text Generation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=59vXWteYuh},
}
Figure