Synthetic Text Generation using Hypergraph Representations

Natraj Raman, Sameena ShaharXiv 2023

TL;DR

Researchers at JPMorgan AI Research have developed a "decompose and expand" framework that uses hypergraph representations to generate high-quality synthetic text. By breaking documents down into structured semantic frames and using hypergraph mining to recombine them, the system produces synthetic data that is more diverse, coherent, and controllable than standard text-to-text transformation methods.

What Problem Does This Paper Address?

Generating synthetic text is crucial for training robust models, preserving privacy, and performing scenario analysis. However, most current methods rely on "text-to-text" transformations—like paraphrasing or back-translation—which treat documents as monolithic blocks of unstructured data.

This approach has two major flaws:

  1. Coherence Issues: It is difficult to mix fragments from different sources coherently, especially in long-form text.
  2. The "Black Box" Problem: Explaining why a model generated a specific sentence is hard, making it nearly impossible to systematically detect or prevent hallucinations.

The authors argue that by moving away from unstructured text and toward an intermediate, semi-structured representation, we can gain much finer control over the generation process.

Methods

The authors propose a two-stage pipeline:

  1. Semantic Parsing: Using a Large Language Model (LLM) like GPT-4 with few-shot prompting, they decompose source documents into semantic frames. In the context of financial risk reports, a frame consists of four elements: risk category, event, driver, and impact.
  2. Hypergraph Modeling & Mining: This is the core innovation. They treat each frame element as a vertex and each full frame as a hyperedge (an edge that can connect more than two vertices).
  3. To introduce diversity, they mine new hyperedges by analyzing the "intimacy" between existing ones using a Gaussian Kernel and a PageRank-based link analysis.
  4. This allows them to "mix up" elements from different documents in a principled way, ensuring that the new combinations are plausible based on their topological similarity in the hypergraph.
  5. Controlled Generation: These new frames are fed back into an LLM along with specific control instructions (e.g., "make this optimistic," "format as an FAQ," or "create a counterfactual scenario") to generate the final synthetic document.
Figure 1: Documents are converted into semantic frames (each dot is a frame element). New frames are constructed with hypergraphs and synthetic text with required variations is generated. An LLM is used for all text processing.

Datasets

The study focuses on a financial reports dataset consisting of annual 10-K reports from over 640 publicly traded US companies. Specifically, they targeted the "Item 1A" (Risk Factors) section, which is known for its complexity and long-form nature. This domain provides a rigorous test for maintaining factual consistency while introducing stylistic variation.

Key Insights and Ideas

  • Hypergraphs > Graphs: Traditional graphs only model relationships between pairs of items (dyadic). Hypergraphs allow for "polyadic" relationships, capturing how multiple semantic elements (like a specific driver leading to a specific impact within a specific category) interact as a single unit.
  • Sparse is Better: By reducing a document to a sparse, interim format (the frames), the LLM isn't distracted by the original phrasing. This allows for much more significant transformations—like changing the sentiment or format—without losing the core factual "anchor."
  • Principled Diversity: Instead of randomly swapping words, the hypergraph mining identifies plausible new connections. This results in synthetic text that explores "what-if" scenarios that are statistically grounded in the source corpus.
  • Interpretability by Design: Because every generated sentence can be traced back to a specific semantic frame, it is much easier to verify the output. If a generated sentence contains a fact not present in the frames, it’s a clear hallucination.

Key Results

The researchers compared their "GPT4 + FrameMixups" approach against several baselines, including BERT substitution, BART paraphrasing, and standard GPT-4 summarization.

  • Diversity: The hypergraph method significantly outperformed all baselines in diversity metrics (Lexical, Semantic Word, and Semantic Sentence diversity).
  • Coherence: Despite the high diversity, the generated text remained highly coherent. In a comparative analysis, the proposed solution produced more coherent text than alternatives even when mixing in high ratios of new information from other documents.
  • Fluency: The method maintained a fluency score of 98.0, comparable to the highest-performing LLM-only baselines, proving that the structured intermediate step does not degrade the naturalness of the language.

Limitations and Future Work

While powerful, the authors note a few hurdles:

  • Domain Expertise: Defining the "ontology" of the semantic frames (deciding which elements like 'driver' or 'impact' to extract) currently requires domain knowledge.
  • Context Windows: The method assumes LLM parsing and generation are atomic. For extremely large documents that exceed an LLM's context window, more complex memory management would be required.
  • Bias: Like all LLM-based methods, there is a risk of amplifying biases present in the original training data or the source corpus.

Future research will look into applying this to conversational text and developing generative hypergraphs that can create entirely new structures from scratch.

Summary updated

Abstract

Generating synthetic variants of a document is often posed as text-to-text transformation. We propose an alternate LLM based method that first decomposes a document into semantic frames and then generates text using this interim sparse format. The frames are modeled using a hypergraph, which allows perturbing the frame contents in a principled manner. Specifically, new hyperedges are mined through topological analysis and complex polyadic relationships including hierarchy and temporal dynamics are accommodated. We show that our solution generates documents that are diverse, coherent and vary in style, sentiment, format, composition and facts.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
Comparative evaluation of topological methods for mining new semantic framesHypergraphDocument Diversity49.2+10.1 vs baselineText Generation
Source quote
L192: Hypergraph (Ours) │ 49.2 │ 39.3 │ 80.0
Comparative evaluation of topological methods for mining new semantic framesHypergraphTopic Diversity39.3+2.4 vs baselineText Generation
Source quote
L192: Hypergraph (Ours) │ 49.2 │ 39.3 │ 80.0
Comparative evaluation of topological methods for mining new semantic framesHypergraphContent Diversity80.0+14.3 vs baselineText Generation
Source quote
L192: Hypergraph (Ours) │ 49.2 │ 39.3 │ 80.0
Reported baseline / comparator measurements (3)
BenchmarkMethodMetricScoreProtocol / Evidence
Comparative evaluation of topological methods for mining new semantic framesResource Allocation Index baselineDocument Diversity39.1Text Generation
Source quote
L190: Resource Allocation Index │ 39.1 │ 36.9 │ 65.3
Comparative evaluation of topological methods for mining new semantic framesResource Allocation Index baselineTopic Diversity36.9Text Generation
Source quote
L190: Resource Allocation Index │ 39.1 │ 36.9 │ 65.3
Comparative evaluation of topological methods for mining new semantic framesAdamic Adar baselineContent Diversity65.7Text Generation
Source quote
L189: Adamic Adar │ 38.3 │ 36.7 │ 65.7
BibTeX
@misc{raman2023synthetic,
  author = {Natraj Raman and Sameena Shah},
  title = {{Synthetic Text Generation using Hypergraph Representations}},
  year = {2023},
  eprint = {2309.06550},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2309.06550},
}
Figure