Source-linked AI summary

Increasing Diversity While Maintaining Accuracy: Text Data Generation with Large Language Models and Human Interventions

John Joon Young Chung, Ece Kamar, Saleema Amershi

arXiv:2306.04140v1cs.CL

TL;DR

LLMs can generate training data, but high-quality datasets must balance diversity with accurate, in-scope text and labels. This paper evaluates logit suppression and temperature sampling alongside human label replacement and out-of-scope filtering. Label replacement improved accuracy by 14.4% in an oracle study and enabled some generated-data models to outperform few-shot classification, while out-of-scope filtering did not improve accuracy.

  • Problem

    Generating useful LLM-based classification datasets requires balancing diversity and coverage with accurate, task-relevant text and labels.

  • Method

    The paper evaluates logit suppression and temperature sampling for diversification, then studies label replacement and out-of-scope filtering as human interventions.

  • Results

    14.4%: replacing all incorrect labels increased model accuracy with logit suppression and high temperature; some models then outperformed GPT-3 few-shot classification, whereas out-of-scope filtering did not improve accuracy.

  • Takeaways & Limitations

    Human label replacement can make diversified LLM-generated datasets more beneficial for training accurate task-specific models.

  • Takeaways & Limitations

    The study’s out-of-scope filtering was incomplete, and its implementation may remove decision-boundary instances that negatively affect accuracy.

Abstract

from arXiv · show

Large language models (LLMs) can be used to generate text data for training and evaluating other models. However, creating high-quality datasets with LLMs can be challenging. In this work, we explore human-AI partnerships to facilitate high diversity and accuracy in LLM-based text data generation. We first examine two approaches to diversify text generation: 1) logit suppression, which minimizes the generation of languages that have already been frequently generated, and 2) temperature sampling, which flattens the token sampling probability. We found that diversification approaches can increase data diversity but often at the cost of data accuracy (i.e., text and labels being appropriate for the target domain). To address this issue, we examined two human interventions, 1) label replacement (LR), correcting misaligned labels, and 2) out-of-scope filtering (OOSF), removing instances that are out of the user's domain of interest or to which no considered label applies. With oracle studies, we found that LR increases the absolute accuracy of models trained with diversified datasets by 14.4%. Moreover, we found that some models trained with data generated with LR interventions outperformed LLM-based few-shot classification. In contrast, OOSF was not effective in increasing model accuracy, implying the need for future work in human-in-the-loop text data generation.

1 Introduction

The paper studies how human-AI partnerships can generate LLM-based classification datasets that balance diversity with accurate, task-relevant text and labels. Diversification increased diversity but could reduce accuracy, while label replacement substantially improved models trained on diversified data.

  • LLMs can quickly generate large amounts of task-specific text data, helping model builders who lack sufficient initial examples.Generated data can support training smaller custom models and evaluating other models.
  • High-quality generated datasets must balance diversity and coverage with accurate, task-relevant text and labels.
  • Logit suppression and temperature sampling increased data diversity but could hurt generation accuracy and similarity to original task datasets.
  • 14.4%: replacing all incorrect labels increased model accuracy when using logit suppression and high temperature.
  • Label replacement enabled some generated-data models to outperform GPT-3 few-shot classification, whereas out-of-scope filtering had limited utility.The comparison used oracle studies of human interventions.
  • The paper contributes a methodology combining LLM generation approaches with human supervision for diversified and accurate data generation.

2 Related Work

Prior work generated text for augmentation, task-specific datasets, and model evaluation, while this paper builds on LLM prompting and sampling control to pursue diverse, useful generated data with human intervention.

  • Text data augmentation has used synonym replacement, random edits, masked-word prediction, backtranslation, label flipping, and reinforcement learning.
  • LLMs have enabled dataset generation from zero or very few samples, with separate models trained for specific tasks.
  • LLM-generated datasets have also been used to test other trained models and relate to knowledge or dataset distillation.
  • Prompting with examples and controlling sampling temperature provide routes to generating diverse and broad-coverage text data.
  • Human-in-the-loop research has examined interactive interventions connecting model training, data curation, feature extraction, and model development.

3 Diversified Text Data Generation

The paper defines desired classification-dataset properties and presents prompting, logit suppression, and temperature sampling as ways to diversify LLM-generated data. These methods trade greater diversity against risks to scope and accuracy.

  • Ideal classification datasets are scoped, label accurate, and diverse, although these properties are difficult to achieve simultaneously.
  • Settings for Data Generation: The generation setting prompts an LLM with a text type and labels, then uses generated examples to fine-tune a separate smaller model.
  • Diversifying Approaches: Logit suppression decreases the probability of tokens that appeared frequently in the intermediate dataset to diversify later generations.
  • Diversifying Approaches: High temperature flattens token-sampling probabilities and increases the chance of selecting less likely texts.
  • Diversifying Approaches: Extremely high temperatures can produce tokens irrelevant to the prompt, hurting generation accuracy.

4 Experiment1: Diversified Text Data Generation

This experiment evaluates diversification methods for LLM-generated classification data across eight tasks. Logit suppression and high-temperature sampling generally increased diversity but introduced trade-offs in label accuracy, similarity, and model performance.

  • 4.1 Experiment Setup: The study evaluates diversification across eight classification tasks using GPT-3-generated data and BERT classifiers.The evaluation compares generated-data models with oracle-trained models and GPT-3 zero- and few-shot classification.
  • 4.3 Results: Label accuracy, diversity, and similarity were positively correlated with model accuracy: coefficients were .4797, .2260, and .1980, respectively.All reported correlations were statistically significant: p<0.001 for label accuracy and diversity, and p<0.005 for similarity.
  • 4.3 Results: Logit suppression increased diversity while reducing label accuracy and similarity to the oracle dataset.It decreased the probability of sampling tokens that had appeared frequently in previous generations.
  • 4.3 Results: High temperature increased diversity and reduced label accuracy, but its label-accuracy decline was smaller than that of logit suppression.Using both methods together did not produce an additive model-accuracy benefit; the effect of logit suppression diminished at high temperatures.
  • 4.3 Results: Example seeding increased label accuracy and model accuracy, and slightly increased diversity when used without logit suppression.The generation pipeline could combine seeding, logit suppression, and temperature sampling under multiple conditions.
  • 4.3 Results: Whether LLM-generated-data models outperformed GPT-3 zero- or few-shot classification depended on the task.Figure 2 reports model accuracy, label accuracy, diversity, and similarity averaged across tasks, with 95% confidence intervals.

5 Human Interventions to Fix Inaccurate Text Generation

The paper introduces human interventions to address inaccurate generation caused by diversification. It examines label replacement and out-of-scope data filtering, while proposing proxy models to reduce the effort of inspecting every instance.

  • 5 Human Interventions: Diversification can hurt generation accuracy, motivating human interventions to improve generated datasets.The interventions target issues identified through qualitative analysis of generated data.
  • 5 Human Interventions: Label replacement switches a misaligned label to the correct one.It directly addresses inaccuracies in the labels accompanying generated text.
  • 5 Human Interventions: Out-of-scope data filtering removes instances outside the domain of interest that match none of the considered labels.These instances are designated out-of-scope data.
  • 5 Human Interventions: Proxy models scale human review by learning each label class and the out-of-scope category from a small set of manually labeled examples.Binary classifiers infer labels for otherwise unlabeled data points on behalf of the model builder.

6 Experiment2: Human Interventions For Diversifed Text Generation

The experiment evaluates label replacement (LR) and out-of-scope filtering (OOSF) as human interventions for diversified LLM-generated text. LR improved label and model accuracy, whereas OOSF produced task-dependent model-accuracy changes.

  • Label Replacement: LR used oracle labelers to replace generated labels, either across all instances or through proxy models trained on inspected subsets.Proxy-model approaches inspected 90, 180, or 270 instances, while the all-instance approach inspected every generated text.
  • Label Replacement: The LR scoring rule combines proxy-model confidence with whether a class was specified during generation, using weighting constant w = 0.3.The replacement label is the class with the highest final score.
  • Out-of-Scope Filtering: OOSF removed instances outside the task domain or lacking an applicable label, using author annotations and proxy models to identify unseen cases.The authors sampled 360 instances per task to study OOS occurrence before applying proxy-based filtering.
  • Label Replacement: LR increased both label accuracy and model accuracy, with larger gains as more instances were inspected.Other metrics remained unchanged because LR modified labels without changing the generated texts.
  • Label Replacement: 14.4% absolute model-accuracy improvement resulted from applying LR to all instances with high temperature and logit suppression.With both diversification approaches, LR on 180 instances also outperformed GPT-3 few-shot classification.
  • Out-of-Scope Filtering: OOSF generally increased or maintained label accuracy and similarity while decreasing or maintaining diversity, but its model-accuracy effects varied by task and condition.Some changes were subtle or within the 95% confidence intervals.

7 Conclusion

The paper studies diversification methods and human interventions for generating classification datasets with both accuracy and diversity. Diversification increased diversity but harmed label alignment, while label replacement improved model accuracy and OOSF did not produce a positive model-accuracy impact.

  • Diversification: Logit suppression and high temperature diversify generated text but reduce the accuracy of aligning specified labels with generated data.Logit suppression restrains frequently generated tokens, while high temperature flattens token-sampling probabilities.
  • Human Interventions: Replacing misaligned labels makes diversification approaches more beneficial by increasing the accuracy of models trained on generated datasets.The intervention changes labels while preserving the generated texts.
  • Human Interventions: Efficient filtering of out-of-scope instances did not have a positive impact on model accuracy.The conclusion contrasts OOSF with label replacement.

8 Limitations

The paper identifies limitations in proxy-model timing, OOSF effectiveness, and evaluation scope. These limitations motivate alternative pipeline designs, more complete OOSF studies, and evaluation across models and prompts.

  • Proxy Models: Applying proxy models only after generation can leave the resulting dataset unbalanced across labels.The authors suggest training proxy models on intermediate datasets and using them during subsequent generation, but report pilot concerns.
  • Proxy Models: Intermediate proxy models may perform worse because their training data have lower diversity, and label misalignment can skew linguistic patterns within classes.If many texts prompted with label a belong to label b, class b may be dominated by texts generated from the wrong prompt label.
  • Out-of-Scope Filtering: Efficient OOSF was not effective in increasing model accuracy, possibly because filtering can remove instances near the decision boundary.The authors describe the OOSF study as incomplete and call for applying filtering to the entire generated dataset.
  • Evaluation Scope: The evaluation used only GPT-3 text-davinci-002 and one prompt, so other models and prompting options require further examination.Partial results with another prompt suggested generalizability, but the authors still identify broader evaluation as future work.

9 Ethics Statement

The paper acknowledges that LLM-generated data can replicate biases in the underlying LLM. Diversification and additional human interventions may help, but their effects on bias and model performance require further research.

  • LLM-generated text data could replicate biases within the used LLM.
  • Diversification might alleviate replicated biases by steering generation toward texts the LLM considers less probable, but bias can remain.
  • The effects of additional interventions on data bias and resulting model performance require further research.

B Experiment 1 Details

Experiment 1 used task-specific prompts containing text types and labels, with example demonstrations for generation. Oracle datasets were size-matched to the generated data, with task-specific sampling rules.

  • Task-specific prompts included text types and labels, with example demonstrations used to guide generation.
  • The prompt examples illustrated valid news and clickbait headline generation before an additional clickbait request.
  • Oracle datasets were matched to generated-data sizes by subsampling up to 5,600 training instances for most tasks.SST2 used all 6,922 instances, while FO used its original 3,622-instance training set.

C Results of the Experiment 1 on Individual Dataset

Across individual tasks, logit suppression and temperature sampling generally increased diversity while harming label accuracy, but their effects varied by task. Performance depended on the interaction among label accuracy, diversity, similarity, and prompting choices.

  • Logit suppression benefited tasks with high base label accuracy, including CB and SST-2, but produced almost no model-accuracy gain for COLA.COLA’s label accuracy was about 50% in binary classification, although logit suppression still increased generated-text diversity.
  • Temperature effects differed by task: PubMed’s label accuracy increased at higher temperatures in one setting, while CARER’s diversity fell at temperature 1.3 because many outputs began “I’m so,”.CARER averaged 3,012 such occurrences at temperature 1.3 versus 841.5 at temperatures 0.7 and 0.9.
  • Diversification approaches increased diversity while hurting label accuracy, with task-specific patterns across logit suppression and temperature sampling.
  • Example seeding affected label accuracy, model accuracy, and similarity differently across tasks, with no benefit for COLA’s label or model accuracy.
  • Some generated-data models exceeded GPT-3 few-shot accuracy on CARER, HWU64, and PubMed, while few-shot classification was better for other tasks.

E Results of the Experiment 2 on Varying Tasks

Experiment 2 evaluated label replacement and out-of-scope filtering across tasks and temperatures. Label replacement could make diversification more useful, whereas out-of-scope filtering consistently improved label accuracy or similarity but lacked a unified effect on model accuracy.

  • Label replacement sometimes made logit suppression beneficial alongside high temperature, particularly for CARER, HWU64, and PubMed.
  • For many-class tasks, proxy-model performance increased only modestly as more instances received label replacement, with larger gains when all instances were inspected.This pattern suggests difficulty training accurate proxy models for many classes.
  • Out-of-scope filtering generally increased or maintained label accuracy and similarity while decreasing or maintaining diversity.
  • Out-of-scope filtering had no general model-accuracy pattern across tasks, and few instances were filtered without diversification approaches.
  • An alternative instructional prompt on FO and HWU64 produced trends similar to prompt A for model accuracy, label accuracy, diversity, similarity, and label replacement.
Loading 2306.04140v1…