TL;DR
The paper introduces RDDG (Relational Data generator with Dynamic Guidance), a novel framework that leverages Large Language Models (LLMs) to synthesize high-fidelity tabular data for addressing class imbalance. By introducing a progressive chain-of-thought prompting strategy combined with a self-reinforcing feedback loop grounded in Bayesian calibration, RDDG continuously optimizes the quality of generated data batch-by-batch. Experimental results show significant improvements in both statistical data fidelity and downstream classification tasks compared to existing state-of-the-art methods.
What Problem Does This Paper Address?
Class imbalance—where minority classes are heavily outnumbered by majority classes—is a pervasive challenge in machine learning applications like medical diagnosis and fraud detection. While data synthesis techniques (like SMOTE or GANs) are traditionally used to bolster rare classes, applying modern LLMs to structured, relational tabular data remains highly underexplored.
Existing LLM-based tabular data generators typically operate in an open-loop fashion: they receive a prompt with real data examples and generate synthetic data blindly. They lack an internal feedback mechanism to evaluate whether the generated data actually preserves the complex, multi-attribute correlations and statistical distributions of the real dataset. RDDG bridges this gap by introducing an automated, self-correcting feedback loop directly into the in-context learning process.
Methods
The RDDG framework consists of three main phases executed sequentially:
- Core Set Construction: LLMs have strict context-window limitations. To provide the most informative examples within these constraints, RDDG trains a simple Multi-Layer Perceptron (MLP) on the training data. It tracks the variance of prediction errors across early and late training stages, selecting the "Top-K" samples with the highest error variance for each class to form a highly representative "core set."
- Progressive Relation Mining: Using Chain-of-Thought (CoT) prompting, the LLM is first guided to analyze the functional relationships and attribute correlations within the core set (Prompt 1). It then translates these insights into explicit structural rules and constraints for data generation (Prompt 2).
- Batch-wise Generation with Dynamic Guidance: This is the core innovation. The real dataset is partitioned into batches. For each batch, the LLM generates a corresponding synthetic batch. RDDG immediately evaluates this synthetic batch across three dimensions: statistical consistency (means/standard deviations), correlation preservation (Pearson coefficients), and distribution consistency (Kolmogorov-Smirnov tests). Crucially, these evaluation metrics are converted into a "feedback prompt" (Prompt 3_2) that dynamically guides the LLM to correct its mistakes when generating the next batch.
The authors mathematically formalize this closed-loop feedback mechanism as a Bayesian calibration problem, proving its Bayes-optimality and showing that the stochastic updates nudge the LLM toward generating optimal, distribution-aligned samples.
Datasets
The authors evaluated RDDG across eight diverse datasets split into an 80/20 train/test ratio:
- Real-world Datasets: Travel (customer churn), Sick (thyroid disease detection), Heloc (credit risk), and Thyroid (cancer recurrence).
- Synthetic Datasets (with explicit pre-defined attribute correlations): Consumer Behavior, Health Metrics, Real Estate, and Social Network.
Key Insights and Ideas
- Prompting as Optimization: Instead of computationally expensive model fine-tuning, RDDG treats the prompt itself as a parameter optimized dynamically via statistical feedback.
- The Power of Posterior Predictive Checks: By treating the evaluation of batch $i$ as a posterior predictive check to guide batch $i+1$, the framework successfully forces the LLM to respect complex functional dependencies (e.g., calculating the price of an apartment based on area, location, and renovation level) without explicit hard-coding.
- Class-Balanced Variance Sampling: Selecting core set samples based on MLP prediction error variance ensures that the LLM learns from the most ambiguous and informative boundaries of the dataset, rather than redundant or noisy data points.
Key Results
The framework was tested using GPT-3.5 as the default LLM (alongside validation on Llama 3.0 and Mistral Max) and evaluated using downstream classifiers like XGBoost, CatBoost, and LightGBM.
- Downstream Classification: On real-world imbalanced datasets, RDDG achieved average performance gains over the previous state-of-the-art (EPIC) of 2.27% in weighted Macro-F1 and 1.09% in Balanced Accuracy. On synthetic datasets, it improved Balanced Accuracy by 4.23% and Sensitivity by 5.44%.
- Statistical Fidelity: RDDG demonstrated a 18.2% reduction in overall KL divergence compared to EPIC, showing a vastly superior ability to capture complex distributional shapes.
- Correlation Preservation: RDDG achieved a 65.6% improvement in the overall Frobenius norm for correlation matrices, indicating it preserves the intricate web of relationships between tabular features far better than competing open-loop methods.
Limitations and Future Work
Despite its strong performance, the authors note a few key limitations:
- Dependency on Foundation Models: The framework relies heavily on external API calls or substantial local compute to run large foundation models.
- LLM Capability Bounds: Because it is an in-context learning framework, its performance is fundamentally bounded by the baseline reasoning and instruction-following capabilities of the underlying LLM.
- Global Consistency Risks: Generating data batch-by-batch due to token limits means that while intra-batch consistency is highly optimized, global consistency across entirely different batches could occasionally drift. The authors suggest exploring methods to maintain long-range global consistency in future work.
Summary updated