SlowGuess/NeurIPS_2023_OCR huggingface dataset:
We pick the "location" attribute of the NYT data and visualize the distributions of the predicted "location" of Gold and SimPrompt in pie charts (Figure 3). One can see that both the Gold and SimPrompt dataset are largely biased towards "North America" in terms of the whole dataset (subfigures (a)&(e) in Figure 3). As to the "location" distribution for specific classes, we can see that Gold and SimPrompt are biased towards continents other than "North America". In contrast, with attributed prompts, the generated dataset of AttrPrompt comes with relatively balanced attribute distributions (Appendix F.2). While existing works using LLMs as data generators usually overlook the bias embedded in the generated data, we hope that this preliminary analysis could raise the attention of the community to the attribute bias behind the generated data of LLMs such as ChatGPT.
4.3 How important the attribute diversity is?
We investigate the impact of attribute diversity within AttrPrompt on model performance. Specifically, we conduct experiments by fixing one attribute dimension to a candidate value while keeping other
Figure 3: Pie charts of the distributions of "location" predicted by an attribute classifier for the NYT SimPrompt and Gold dataset. (a) and (e) are "location" distribution over the whole dataset, while others are for specific classes. Illustration on types of biases on other datasets can be found in Appendix F.1.
(a) Amazon
(b) NYT
Figure 4: Bar charts of model performance with different attribute configurations of AttrPrompt.
attribute values random. Then, we generate 50 data per class using such a one-fixed-others-random configuration to compose a dataset and evaluate the performance of the trained model. Note that for class-dependent attributes, we sample one value for each class and repeat it 5 times, since it is computationally prohibitive to enumerate all combinations of class-dependent attribute values. In Figure 4, each bar stands for a specific one-fixed-others-random configuration; compared to random configurations, most of one-fixed-others-random configurations result in a performance drop.
To further reduce the attribute diversity, we pick the attribute value with the best performance for each attribute dimension (the highest bar within each attribute dimension) and compose them to a single configuration (the dashed blue line). We can see that the dashed blue line is significantly worse than the random configuration, even though it is composed of individually best attribute values. This illustrates the importance and necessity of designing prompts with diverse attributes.
5 Experiments on the Trained Models
5.1 Training with generated data
We quantitatively evaluate the quality of generated datasets via the test performance of models trained with them. Apart from the AttrPrompt and the direct baseline SimPrompt, we include an additional baseline MetaPrompt [45] which leverage LLM to generate additional guidance information for improving upon SimPrompt. The details for MetaPrompt are shown in Appendix K. We also directly use ChatGPT as a zero-shot predictor for comparison. The results are in Table 7. Besides the test
performance, we include the cost of querying the ChatGPT per 1000 data in the table. From the results, we can draw the following conclusions. First, the AttrPrompt consistently renders better performance compared to the SimPrompt with a margin of 6–10 points<sup>3</sup>. Second, the class-dependent attribute value filter (CAF) is beneficial since the AttrPrompt outperforms its variant without CAF<sup>4</sup>. Third, although MetaPrompt [45] attempts to optimize the class-dependent prompt, they are less effective than AttrPrompt as they do not resolve the unique bottleneck (i.e. limited diversity) of the current prompting strategies for the training data generation task. Fourth, out of the four datasets, the AttrPrompt outperforms the LLM zero-shot method on three datasets in terms of accuracy, while for the F1 score, the AttrPrompt surpasses the LLM zero-shot on all the datasets; combined with the observation that the LLM zero-shot inference incurs much higher costs compared to data generation and the fact that the generated data is re-usable for training any model, we argue that for topic text classification generating training data could be a better practice of leveraging LLM than direct zero-shot inference. Lastly, in most cases, the generated data underperform the original training set, indicating that there is still room for future improvement. We conduct further studies in Appendix D.5 to illustrate the performance over different classes.
Table 7: Performance of the models trained with created datasets and the cost of constructing the datasets. The results are averaged over five runs. The gain of AttrPrompt has passed the statistical test with  $p < 0.05$ . We also include the performance and cost of using LLM as a zero-shot predictor.
Method	NYT	Amazon	Reddit	StackExchange
Acc.	F1	Price/1k	Acc.	F1	Price/1k	Acc.	F1	Price/1k	Acc	F1	Price/1k
LLM Zero-Shot	74.16	69.84	5.44	59.55	54.56	2.11	67.00	56.66	2.89	44.70	43.80	3.12
Gold	83.80	81.02	—	82.23	81.12	—	84.22	83.38	—	67.56	63.28	—
SimPrompt	75.47	76.22	0.76	57.34	56.96	0.77	53.48	53.81	0.65	42.88	41.30	0.69
MetaPrompt	79.58	79.83	0.87	56.35	55.98	0.84	54.61	54.30	0.74	44.81	44.02	0.83
AttrPrompt w/o CAF	80.40	80.92	0.91	61.67	61.57	0.82	61.22	60.18	0.72	45.90	44.84	0.81
AttrPrompt	81.30	82.26	1.05	66.08	65.65	0.87	63.33	63.10	0.84	48.99	47.42	0.90
5.2 Augmenting existing dataset with generated data
Here, we merge the generated dataset and the original training set into a single training set, and then test the model performance when it is trained with the merged dataset to see whether the generated dataset can further improve model performance with the original training set available. We present the results in Table 8. From the table, we can see that the generated dataset is an effective complement to the original training set, since most of the generated datasets introduce performance gain when combined with the original training set, especially our AttrPrompt which leads to improvement for all the cases. This notable improvement with simple dataset merge may motivate future studies of more advanced ways of using the generated data as augmentations to boost existing dataset.
Table 8: Performance of the model trained with the original training set/augmented with the generated dataset. We present the performance gain/drop compared to using the original training set in green/red.
Method	NYT	Amazon	Reddit	StackExchange
Acc.	F1	Acc.	F1	Acc.	F1	Acc	F1
SimPrompt	85.56 +1.76	86.34 +5.32	81.85 -0.38	80.23 -0.89	85.11 +0.89	84.88 +1.50	74.53 +6.97	74.23 +10.95
Metaprompt	87.14 +3.34	87.33 +6.31	82.12 -0.11	80.14 -0.98	84.71 +0.49	84.62 +1.24	76.02 +8.46	75.70 +12.42
AttrPrompt w/o CAF	85.71 +1.91	87.18 +6.16	82.24 +0.01	80.76 -0.36	85.86 +1.64	85.65 +2.27	75.16 +7.60	74.64 +11.36
AttrPrompt	87.47 +3.67	88.06 +7.04	83.95 +1.72	83.93 +2.81	86.08 +1.86	85.98 +2.60	76.86 +9.30	76.53 +13.25
5.3 The budget and sample efficiency of the generated data
Here, we aim to study two types of efficiency of the generated dataset, i.e., budget efficiency and sample efficiency, on the model performance. We use Amazon and NYT as examples, and the results for other datasets are deferred to Appendix D.3. First, in Figure 5(a) and 5(b), we compare the budget efficiency of AttrPrompt against that of SimPrompt. Surprisingly, AttrPrompt only requires  $5\%$  of budget to be on par with or outperform SimPrompt with  $100\%$  of budget across all the datasets. This observation highlights the significance of diverse prompts in the training data generation process.
<sup>3</sup>In Appendix D.4 we show that simply increasing the temperature  $t$  for SimPrompt does not significantly improve its performance.
<sup>4</sup>Some of the filtered attributes are exhibited in Appendix I.
(a) Amazon Budget
(b) NYT Budget
(c) Amazon Data
(d) NYT Data
Figure 5: The comparisons on budget efficiency and data efficiency on Amazon and NYT datasets.
(a) Amazon
Figure 6: The barplot of performance with models of different parameter sizes. Note that due to budget limit, for GPT-4 model, the size of the generated dataset is only  $10\%$  of the full set thus the result is not directly comparable with other models.
(b) NYT
(c) Reddit
Secondly, we examine the sample efficiency of Gold, SimPrompt, and AttrPrompt in Figure 5(c) and 5(d). While both SimPrompt and AttrPrompt exhibit better sample efficiency than Gold in the low-data regime, with superior performance when the dataset size is relatively small, Gold data shows better sample efficiency in the high-data regime. Overall, AttrPrompt renders better sample efficiency than SimPrompt, which suggests that increasing the diversity of the prompts could be an effective way to improve the unsatisfactory data scaling trend of using LLM as data generator [55].
5.4 The performance with respect to model parameter size
Effect of the model size for LLM Generators. To study the effect of different LLMs on AttrPrompt, we use other instruction-finetuned GPT models as the generator, namely text-ada-001 [39], text-babbage-001 [39], text-curie-001 [39], and GPT-4 [37] (due to budget constraints, we only generate a subset with  $10\%$  size of the original dataset). Under all settings, our model outperforms the direct baseline SimPrompt by a great margin. Besides, the performance is generally better with larger models, as they often have better instruction-following capabilities. In addition, an interesting finding is that for SimPrompt (but not for AttrPrompt), the average performance of using ChatGPT is worse than text-curie-001. This suggests that straightforward class-dependent prompts might not exploit the capabilities of LLMs as effectively as our proposed approaches.
Effect of the model size for classifiers. We experiment with other model choices in addition to the BERT-base-uncased [12] used throughout the paper. They are TinyBERT [23], DistillBERT [46], DeBERTa-V3-base, and DeBERTa-V3-Large [21] with parameter size from 14M to  $435\mathrm{M}^5$ . We visualize the results in Figure 7. Overall, AttrPrompt outperforms SimPrompt by a large margin yet underperforms the Gold across different model choices. With a light-weighted backbone of 66M parameters, AttrPrompt can often outperform the SimPrompt trained with the model containing 435M parameters. This indicates that diversely attributed prompts could help close the performance gap between the Gold and simple class-conditional prompts, and such an improvement is robust to model parameter size.
5.5 Plugging AttrPrompt in existing approaches
In this section, we demonstrate that AttrPrompt can be painlessly integrated with prior zero-shot training data generation techniques. Table 9 shows the results for several recently proposed methods, which design additional techniques based on the noisy-robust loss to further reduce the effect of noisy
5Additionally, we also evaluate under the setting of linear probing [25] which trains a linear classifier over the frozen pretrained features. The results are deferred to Appendix D.1.
(a) Amazon
(c) Reddit
Figure 7: The performance curves with models of different parameter sizes.
labeled data [15, 31, 55], and leverage in-context examples for data generation [55]. Despite these approaches achieving notable performance gains on simple binary classification tasks, their gains become more marginal for fine-grained classification: the performance gain is less than  $2\%$  for all methods on two datasets. Instead, using AttrPrompt lead to consistent performance boosts (more than  $5\%$  in all cases) for those approaches, indicating that compared with label noise, data diversity is a more crucial bottleneck for existing dataset generation methods.
More interestingly, AttrPrompt even benefits dataset generation approaches that do not use LLMs. To demonstrate this, we use the LLM-generated contents (subtopics for NYT and product name for Amazon) to enrich the label names used in ReGen [57], a retrieval-based approach for training data generation. With the expanded label names, AttrPrompt largely improves  $(14\% -26\%$  absolute gain) the performance of ReGen on fine-grained classification tasks. These results justify the advantage of AttrPrompt for serving as a generic plug-in module for existing training data generation approaches.
Table 9: Performance comparison when AttrPrompt serves as a plug-in for existing approaches.
SuperGen	SuperGen w/ AttrPrompt	SunGen	SunGen w/ AttrPrompt	ProGen	ProGen w/ AttrPrompt	ReGen	ReGen w/ AttrPrompt
NYT	Acc.	76.11	82.05	75.82	81.65	77.05	80.93	70.01	82.18
F1	76.80	82.62	76.52	82.70	76.70	81.32	68.14	82.50
Amazon	Acc.	58.17	66.76	54.30	63.89	58.40	66.43	34.70	58.40
F1	56.06	66.33	53.50	63.76	56.95	66.02	30.93	56.00
Table 10: Multi-label classification performance on the arXiv dataset.
Method	Macro F1	Micro F1	Precision@1	Precision@5	NDCG@5	MRR	Price/lk
Gold	27.34	58.22	73.71	27.00	79.70	82.16	—
SimPrompt	21.03	26.75	37.00	15.08	42.49	49.60	1.41
AttrPrompt	27.10	37.88	49.27	18.79	54.74	61.23	1.53
5.6 Extension to multi-label classification
In this section, we take the first attempt to extend the paradigm of using the LLM as a training data generator to the more challenging multi-label classification setting. In particular, we adopt the arXiv dataset [8] consisting of 98 fine-grained classes, on which we apply both SimPrompt and AttrPrompt. Following [18, 49], we consider different evaluation metrics including Micro/Macro-F1, Precision@k, nDCG@k, and MRR. The experimental details are in Appendix B. We present the results in Table 10. Similar to our findings for single-label classification, AttrPrompt largely outperforms SimPrompt across all the metrics, which not only strengthens the superiority of AttrPrompt but also opens the door to using LLM as a training data generator for multi-label classification for future work.
We delve into the realm of training data generation using complex, attributed prompts, which possess the potential to produce a wide range of diverse and attributed generated data. Specifically, we focus on datasets characterized by diverse domains and high cardinality and class-imbalance, and our results demonstrate the superior performance of attributed prompts compared to simple class-conditional prompts. Furthermore, we present a comprehensive empirical study on training data generation that covers essential aspects such as bias, diversity, and efficiency.
[50] Zhiqing Sun, Yikang Shen, Qinhong Zhou, Hongxin Zhang, Zhenfang Chen, David Cox, Yiming Yang, and Chuang Gan. Principle-driven self-alignment of language models from scratch with minimal human supervision. arXiv preprint arXiv:2305.03047, 2023.
[51] Guy Tevet and Jonathan Berant. Evaluating the evaluation of diversity in natural language generation. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 326-346, 2021.
[52] Yisen Wang, Xingjun Ma, Zaiyi Chen, Yuan Luo, Jinfeng Yi, and James Bailey. Symmetric cross entropy for robust learning with noisy labels. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 322-330, 2019.
[53] Yizhong Wang, Yeganeh Kordi, Swaroop Mishra, Alisa Liu, Noah A Smith, Daniel Khashabi, and Hannaneh Hajishirzi. Self-instruct: Aligning language model with self generated instructions. arXiv preprint arXiv:2212.10560, 2022.
[54] Jiacheng Ye, Jiahui Gao, Qintong Li, Hang Xu, Jiangtao Feng, Zhiyong Wu, Tao Yu, and Lingpeng Kong. ZeroGen: Efficient zero-shot learning via dataset generation. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 11653-11669, 2022.
[55] Jiacheng Ye, Jiahui Gao, Zhiyong Wu, Jiangtao Feng, Tao Yu, and Lingpeng Kong. ProGen: Progressive zero-shot dataset generation via in-context feedback. In Findings of the Association for Computational Linguistics: EMNLP 2022, pages 3671-3683, 2022.
[56] Yue Yu, Chenyan Xiong, Si Sun, Chao Zhang, and Arnold Overwijk. COCO-DR: Combating distribution shifts in zero-shot dense retrieval with contrastive and distributionally robust learning. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 1462–1479, 2022.
[57] Yue Yu, Yuchen Zhuang, Rongzhi Zhang, Yu Meng, Jiaming Shen, and Chao Zhang. ReGen: Zero-shot text classification via training data generation with progressive dense retrieval. In Findings of the Association for Computational Linguistics: ACL 2023, pages 11782-11805, 2023.
[58] Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen, Christopher Dewan, Mona Diab, Xian Li, Xi Victoria Lin, et al. Opt: Open pre-trained transformer language models. arXiv preprint arXiv:2205.01068, 2022.
[59] Yongchao Zhou, Andrei Ioan Muresanu, Ziwen Han, Keiran Paster, Silviu Pitis, Harris Chan, and Jimmy Ba. Large language models are human-level prompt engineers. In The Eleventh International Conference on Learning Representations, 2023.
[60] Terry Yue Zhuo, Yujin Huang, Chunyang Chen, and Zhenchang Xing. Exploring ai ethics of chatgpt: A diagnostic analysis. ArXiv, abs/2301.12867, 2023.
A Limitation, Social Impact, and Future Work
We acknowledge that AttrPrompt, while being effective on several tasks we studied, is still far from being perfect. Here we give a honest discussion on the limitation, societal impacts, as well as potential avenues for future works.
A.1 Limitation
One limitation of this research is that the investigation focuses primarily on text classification. While this provides valuable insights into the performance of attributed prompts compared to simple class-conditional prompts in these specific contexts, the generalizability of the findings to other data types and tasks remains to be explored.
Besides, the proposed approach assumes the label name of the target task following prior works [31, 54] and requires some extent of human efforts in creating the data attributes, as it is still challenging to automatically determine the optimal number/property of attributes without any labeled data and task-specific information. Human-AI collaboration, while beneficial, may inevitably introduce certain human biases into the model [43, 5]. We would like to clarify that in this work, the human raters are blinded to the information for task-specific data during attribute selection. To further mitigate the bias, it is crucial to involve multiple team raters, cross-validation, and additional review to achieve a balanced and unbiased selection of attribute dimensions that contribute positively to the dataset's quality and diversity.
In addition, one issue with LLM-based training data generation is the phenomenon of hallucination, wherein the model generates information that may sound plausible but is, in fact, not accurate or grounded in reality. This can lead to the propagation of misinformation, particularly in sensitive areas such as news generation where accuracy is of utmost importance. To alleviate this issue, it is possible to leverage additional fact-checking mechanisms to cross-verify the generated text with a reliable knowledge base or dataset. Furthermore, incorporating an additional layer of human review can also help in mitigating hallucinations and ensuring the faithfulness of generated outputs.
A.2 Societal impact
The findings of this research have significant implications for the development of trustworthy machine learning models. By addressing the limitations of simple class-conditional prompts and exploring the potential of attributed prompts, the research aims to mitigate biases and enhance the diversity of generated training data. This has a positive social impact as it contributes to the development of more robust and fair machine learning models, reducing the potential for biased decision-making systems and promoting inclusivity in various domains.
During the attribute selection process, we did not use any task-specific data to avoid data feature leakage and minimize human bias. Other than this, we do not involve human subjects research and do not contain any personally identifiable information. Possible misuse may lead to negative outcomes, such as intentionally introducing biases to the generated dataset via attributes.
Broader Coverage of Task and Modalities. In future work, it would be valuable to extend the investigation to other types of classification tasks beyond text classification. Exploring the effectiveness of attributed prompts in image classification, audio classification, or other modalities could provide insights into the broader applicability and effectiveness of AttrPrompt.
Automatic Prompt Optimization. In this work, we aim to demonstrate the usefulness of attributes and why they are useful through the lens of diversity and bias, and we believe this opens the door for future work to further explore the methodology for automatic attribute discovery and selection for optimal performance, such as exploring automated or semi-automated methods for identifying high-quality attribute dimensions and values. One promising direction is to incorporate a few labeled examples as demonstrations for generating better training data. Under this scenario, leveraging Language Models can aid in automatically detecting diverse attributes, modeling the high-order interactions among attributes as well as estimating attribute value distributions for each class, which further reduce the human efforts for selecting key attributes.
B Dataset Preprocessing
B.1 Multi-class Classification
For Reddit and StackOverflow, we select the classes with more than 65 examples from the original corpus as the target set of topics. For each dataset, we use 50 examples per class for the test set and no more than 10 examples for the validation set (10 for NYT/Amazon and 5 for Reddit/StackOverflow). The remaining data is used to compose the gold training set. It is worth noting that, some of the class names on Reddit may contain toxic information. To eliminate their effects, we filter our label names with Detoxify [19], a tool that leverages the multilingual XLM-RoBERTa [9] for toxic comment identification. We follow [14] to use a threshold of 0.1 to filter out potentially toxic topic classes.
B.2 Multi-label Classification
For the arXiv multi-label classification, we use the arXiv labels from the website as the label names. We select topics under the category of Physics, Mathematics, Computer Science, Quantitative Biology, and Quantitative Finance. Besides, we remove the topic of General Physics, General Mathematics, General Literature, Other Computer Science, Other Quantitative Biology as they only contain generic topics without concrete semantics. In total, there are 98 classes in general.
To generate examples using the SimPrompt approach, we follow a specific procedure. For each document, we begin by sampling from the distribution of label numbers, utilizing prior knowledge obtained from the original training set. This enables us to determine the precise number of labels, denoted as  $n$ , that should be associated with the document. Once we have determined  $n$ , we proceed to randomly select  $n$  classes from the original set of 98 labels. These chosen classes are then utilized as the input for prompting the LLM, forming a foundation for generating the examples.
To generate examples using the AttrPrompt approach, we employ a distinct methodology. For each document, we consider a set of attributes, namely subtopics, technique, writing style, and length. It is important to note that, unlike multi-class classification, where an additional step is typically taken to filter out irrelevant subtopics, our multi-label classification process follows a different approach. In our method, we introduce an additional step called merging to handle the different subtopics.