EPIC: Effective Prompting for Imbalanced-Class Data Synthesis in Tabular Data Classification via Large Language Models

Large language models (LLMs) have demonstrated remarkable in-context learning capabilities across diverse applications. In this work, we explore the effectiveness of LLMs for generating realistic synthetic tabular data, identifying key prompt design elements to optimize performance. We introduce EPIC, a novel approach that leverages balanced, grouped data samples and consistent formatting with unique variable mapping to guide LLMs in generating accurate synthetic data across all classes, even for imbalanced datasets. Evaluations on real-world datasets show that EPIC achieves state-of-the-art machine learning classification performance, significantly improving generation efficiency. These findings highlight the effectiveness of EPIC for synthetic tabular data generation, particularly in addressing class imbalance. Our source code for our work is available at: https://seharanul17.github.io/project-synthetic-tabular-llm/

Paper

Similar papers

Peer review

Reviewer kZFF5/10 · confidence 3/52024-07-05

Summary

The paper proposes a method by which large language models are utilized to generate synthetic tabular data in order to mitigate class imbalances in existing datasets. The authors provide some tips which they discovered to result in more reliable data being generated, such as enforcing a CSV format. Their methods are validated on 6 real world datasets and one toy dataset.

Strengths

1. the justifications for CSV formatting, class presentation, variable mapping, and task specification are all clear and make sense 2. the choice of experimental results is motivated sufficiently well 3. the provided results are extensive, including the plethora of ablation studies in the appendix

Weaknesses

1. In Table 1, outside of the Travel dataset, the other 5 datasets do not show a significant increase in F1 score or balanced accuracy between the proposed method and the next closest baseline. Given this, it is not clear how to interpret the utility of the proposed method. 2. The motivation for why a large language model would be used to generate synthetic data for tabular settings, at scale, is a bit lacking. In particular, there needs to be discussion about the reasons for why the use of an LLM (with all of the computational and prompt-related overhead) would be preferable to existing data augmentation techniques for tabular data. In particular, it is not clear that the stated results provide enough evidence to persuasively demonstrate the utility of using LLMs for this purpose

Questions

1. In Table 1, for the row "Ours" --- which LLM was used to generate the synthetic data? If it one of the gpt-3.5 models, then that should be stated up front so as to not increase confusion.

Rating

5

Confidence

3

Soundness

2

Presentation

2

Contribution

2

Limitations

The limitations are addressed in Appendix G. However, they should be moved up to the main paper for full transparency. Additionally, the provided limitations are quite sparse. It would be helpful if the authors could think a bit more about the real-world usability of their method, as well as the drawbacks associated with using potentially closed-source large language models for their synthetic data generation purposes.

Reviewer 8bof5/10 · confidence 4/52024-07-10

Summary

This paper proposed an LLM-driven tabular data class balancing approach, adapting the in-context learning paradigm and trying various formats and templates to explore optimal prompts to mitigate imbalanced tabular data. Experimental results showed that the proposed method alleviated the CSV-format data imbalance.

Strengths

1. The authors probed CSV-format data generation from different perspectives, including data format, class presentation, variable mapping, and task specification. 2. Experiments and data analysis of this paper were adequate for understanding the proposed data balancing approach, and data performance has been improved to some degree.

Weaknesses

1. The research purpose of this paper covers merely the CSV-format data, limiting the further adaptivity and impact of the proposed method. 2. This paper merely tried to find plausible optimal prompts by handcraft, lacking theory analysis, making the prompting even a black box. 3. Empirical results are not consistent on all test data, especially in the specificity aspect, indicating the instability of the prompting approach. 4. According to the prompting design, it seems that the prompting process is a bit sophisticated, however, there are no computing cost comparison experiments.

Questions

1. This paper proposed to mitigate the label imbalance issue for tabular data by generating scarce label data, but how to guarantee the generated data and labels were matched? 2. The presented method is basically an instruction prompting approach, and why didn’t the authors analyze the LLM during the prompting process to make it more traceable? 3. How did the proposed method handle missing data or noisy features in the original dataset? 4. Empirical results on the Travel data outperform other data, does that mean that such a prompt is more suitable for it and there exists better prompts for other datasets? 5. The overall performance of the proposed method achieved limited improvement, and have the authors conducted the improvement-computing cost ratio to make the profit more intuitive?

Rating

5

Confidence

4

Soundness

3

Presentation

2

Contribution

2

Limitations

The authors have adequately discussed the limitations.

Reviewer 8bof2024-08-12

Thank you for the responses, some concerns were addressed, however, there are still some questions. 1. Since the proposed approach is a prompt-based generation, have the authors tried to optimize the fixed prompt with some prompt optimizing methods, such as the Self-discover [1] and OPRO [2]? 2. There was no detailed introduction for various tabular datasets and no case study, which made me confused about the generalizability of the proposed method. 3. For the label matching of generated data, the authors need to employ advanced tabular data classification algorithms to evaluate the quality. [1]. Self-Discover: Large Language Models Self-Compose Reasoning Structures. [2]. Large Language Models as Optimizers.

Authorsrebuttal2024-08-13

Thank you for your valuable comments and for taking the time to review our paper. We are glad that some of your concerns have been addressed, and we appreciate the opportunity to clarify and expand on the additional points. *** > Q1. Prompt optimization A1. We appreciate the suggestion, but there are significant differences between the typical applications of these methods and the challenges of synthetic tabular data generation. Self-discover and OPRO are designed to enhance LLM accuracy in structured tasks like multiple-choice questions or math problems, where correctness is relatively explicit. However, synthetic tabular data cannot be directly evaluated for correctness, making these methods less applicable to our domain. Recognizing the potential, we adapted OPRO, which provides official code, to our task by optimizing prompts based on the classification accuracy of a robust classifier, CatBoost. Using the Thyroid dataset with GPT-3.5-turbo, we applied OPRO to optimize our prompt. Unfortunately, **the optimized prompts failed to produce valid synthetic tabular data**. For instance, one generated prompt was: `No,45,F,No,No,No,Euthyroid,Single nodular goiter-right,No,Papillary,Multi-Focal,Intermediate,T3a,N1b,M0,II,Excellent` This is because OPRO is designed to optimize simple instructions, e.g., `Take a deep breath and work on this problem step-by-step` or `Break this down`, as shown in Table 1 of the OPRO paper. **While effective for question-answering and reasoning tasks, these types of prompts are unsuitable for constructing the complex structures required in synthetic tabular data generation.** Our experiments indicate that our proposed approach remains the most effective method for generating high-quality synthetic tabular data. Future research could explore prompt optimization methods specifically designed for tabular data generation to further enhance performance. *** > Q2. Dataset details & Generalizability A2. As noted in Section 3, we provided dataset details in Appendix I.2. However, **we acknowledge that this information may not be sufficiently highlighted in the main text**. To address this, **we will revise the manuscript to include a comprehensive introduction to these datasets within the main text, clearly demonstrating the broad applicability and generalizability of our method.** We will also emphasize the importance of tabular data research in enhancing decision-making and efficiency in various real-world applications, better communicating the impact and significance of our work in multiple fields. *** > Q3. Advanced classifier for label matching A3. We employed top-performing tabular classifiers, XGBoost, CatBoost, LightGBM, and Gradient boosting classifier, known for their strong performance, often surpassing recent deep learning models. These models have served as robust baselines in tabular classification (TabR, ICLR’24 [1]) and have been used to assess generated data quality in tabular generation studies (the benchmark paper, NeurIPS’23 [2] and TabDDPM, ICML’23). In our work, we evaluated label matching quality by averaging results across 20 runs with these models, five runs each, demonstrating the superiority of our method. We conducted preliminary experiments using recent in-context learning-based tabular classification methods, TabPFN (ICLR’23) [3] and T-Table (KDD’24) [4], on Travel, as detailed in **Table B of the attached PDF**. We also tested TabR (ICLR’24) [1], an advanced deep-learning tabular classification model, using its official code. |Model|Original|+Ours|+TabDDPM|+GReaT| |-|-|-|-|-| |TabR|46.41|**60.78**|44.88|32.41| The F1 score results indicate that **while the advanced models like TabPFN, T-Table, and TabR did not outperform traditional classifiers, adding synthetic data generated by our method consistently led to significant performance improvements, even with advanced tabular classification models.** In contrast, baselines resulted in performance decreases. Our method uniquely and consistently enhanced the performance of different classifiers, demonstrating superior label matching quality. Furthermore, as discussed earlier, our label matching quality is validated, regardless of the classifier, by: * Distinct class distribution in the generated data (Fig. 1, Toy set) * Feature correlation similarity with the original data across classes (Fig. 4, Travel & Fig. 5, Sick) These findings affirm that our model produces data with the best label matching compared to other baselines. *** [1] TabR: Tabular Deep Learning Meets Nearest Neighbors, ICLR’24 [2] Reimagining Synthetic Tabular Data Generation through Data-Centric AI: A Comprehensive Benchmark, NeurIPS’23 [3] TabPFN: A Transformer That Solves Small Tabular Classification Problems in a Second, ICLR’23 [4] From Supervised to Generative: A Novel Paradigm for Tabular Deep Learning with Large Language Models, KDD’24 [5] Self-consistency improves chain of thought reasoning in language models, ICLR’23

Reviewer 8bof2024-08-14

Thank you for the reply, my concerns were addressed, and I will update the rating score correspondingly.

Authorsrebuttal2024-08-14

We are pleased that our clarifications addressed your concerns, and we appreciate your decision to raise the score. Thank you for your insightful feedback and for taking the time to review our work. We remain committed to addressing any further suggestions or clarifications that could strengthen our work.

Reviewer p2sf8/10 · confidence 4/52024-07-11

Summary

The paper explores the domain of tabular data generation using in-context learning with LLM, in order to improve performance of an ML classifier, especially in imbalanced classes scenarios. The paper explores different prompting techniques, with detailed results on 6 datasets as well as a visualized study on a toy dataset. The paper also compares the result performance boost on several ML classifiers, which is indeed significant. There's a further discussion of efficiency and stability of the generation itself, and how it is affected given the different prompting methods proposed. Results using three different LLMs are presented.

Strengths

The paper is very clear and discusses almost all important points soundly. It can be used as a guide both for researches facing the problem of generating data for imbalanced class learning, and for researches who are planning to study on LLM prompting techniques in a methodical way. It also presents clear benefits to using the proposed method. I enjoyed reading this paper very much.

Weaknesses

The main discussion that I missed in the paper was regarding - how much extra data ends up being generated, and does generating more and more data using this method make any sense? I understand that the method uses actual data points, and samples from the original dataset without replacement. This probably creates a limitation to data creation - a point which is not discussed in the main paper body, and should be added. Furthermore, it might make sense to scramble and re-sample the dataset to create even more samples. I would have liked to see a discussion of this point, both to how much the datasets are actually enlarged using the no-replacement sampling, and also if it makes sense to generate more data with replacement, with the limits of this method discussed - when do we reach repetition and duplication, without any further improvement to the classifiers. I'm also missing the original dataset sizes and minority vs majority class distributions - to show more strongly the class imbalance. In fact, no dataset descriptions are given at all, which in my opinion takes away from the paper.

Questions

I'd add which model was used in table 1 (I'm assuming it's ChatGPT). I would stress better the counts of additional synthetic data and why do you sometimes use 1K and sometimes 10K.

Rating

8

Confidence

4

Soundness

4

Presentation

4

Contribution

3

Limitations

Limitations are discussed in the appendix, which is okay. I would perhaps add further discussion on social implications, clarifying the meaning of fig 10 - this method might create more bias in already biased data.

Reviewer zoZq6/10 · confidence 3/52024-07-14

Summary

The paper investigates how to use LLMs to generate synthetic tabular data for mitigating class imbalance in machine learning tasks. By exploring various prompting methods, the authors aim to identify key design elements that optimize the generation performance. The paper shows that using GPT3.5/Mistral/LLaMA to balancing classes, and employing unique variable mapping produces realistic and reliable data, enhancing classification performance (XGBoost etc) for minor classes in imbalanced datasets.

Strengths

1. The paper provides a detailed exploration of various prompt design elements, such as data format, class presentation, and variable mapping, offering valuable insights for future research in this direction. 2. The proposed methods are easy to implement and require minimal preprocessing, making them accessible for a wide range of applications in tabular data classification tasks. 3. The experimental results show that the proposed approach consistently improves machine learning classification performance, particularly for minor classes.

Weaknesses

1. Why not use the LLM itself to perform classification: The designed method uses LLMs to generate data examples for imbalanced classes, which means the LLMs must already have a good ability in modeling the data distribution even for the imbalanced classes. If that's the case, why not use the LLM itself to perform classification directly with the help of in-context learning? I expect that it will be a strong baseline compared to the XGBoost classifiers. The only downside of LLM-based classifiers may be the inference cost, but we should include this baseline.

Questions

1. Could you provide the experiment results of in-context learning LLM-based classifiers on these tasks?

Rating

6

Confidence

3

Soundness

3

Presentation

3

Contribution

2

Limitations

Yes in Appendix G

Reviewer kZFF2024-08-12

Thank you to the authors for their detailed feedback and responses. I have updated my review accordingly.

Authorsrebuttal2024-08-13

Thank you for taking the time to review our work and for your valuable feedback. We appreciate your consideration and are pleased that our responses have been helpful in updating your review. We are committed to making further improvements and are prepared to address any additional suggestions or clarifications that could strengthen our work.

Reviewer zoZq2024-08-13

Thanks for the reply! The response resolved my concerns. I will raise my score.

Authorsrebuttal2024-08-13

Thank you for your valuable feedback and for taking the time to review our work. We are glad our clarifications addressed your concerns, and we appreciate your consideration in raising the score. We remain committed to addressing any further suggestions or clarifications that could enhance the quality of our work.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC