Source-linked AI summary

Making Large Language Models Better Data Creators

Dong-Ho Lee, Jay Pujara, Mohit Sewak, Ryen W. White, Sujay Kumar Jauhar

arXiv:2310.20111v1cs.CL

TL;DR

Using LLMs as labelers requires raw data. The pipeline conditions an instruction-following LLM on an instruction and a single formatting example, then reuses generated examples as seeds for later rounds. Generated-data models consistently outperform human-data models on out-of-distribution evaluations and are often comparable or sometimes better in-distribution when human-labeled data is limited.

  • Problem

    Using LLMs as labelers requires raw data.

    Source: §1 · p. 1
  • Method

    The pipeline conditions an instruction-following LLM on an instruction and a single formatting example, then reuses generated examples as seeds for later rounds.

    Source: §1 · p. 2
  • Results

    Generated-data models consistently outperform human-data models on out-of-distribution evaluations and are often comparable or sometimes better in-distribution when human-labeled data is limited.

    Source: §1 · p. 2
  • Takeaways & Limitations

    The pipeline is presented as a cost-effective way to create training data for downstream models, including specialized applications and settings with variable, messy inputs.

    Source: §1 · p. 2, §6 · p. 9

    Evaluation was restricted to ChatGPT (gpt-3.5-turbo), as tested open-source instruction-following models had limited JSON-generation and instruction-comprehension abilities.

    Source: §7 · p. 9

Abstract

from arXiv · show

Although large language models (LLMs) have advanced the state-of-the-art in NLP significantly, deploying them for downstream applications is still challenging due to cost, responsiveness, control, or concerns around privacy and security. As such, trainable models are still the preferred option in some cases. However, these models still require human-labeled data for optimal performance, which is expensive and time-consuming to obtain. In order to address this issue, several techniques to reduce human effort involve labeling or generating data using LLMs. Although these methods are effective for certain applications, in practice they encounter difficulties in real-world scenarios. Labeling data requires careful data selection, while generating data necessitates task-specific prompt engineering. In this paper, we propose a unified data creation pipeline that requires only a single formatting example, and which is applicable to a broad range of tasks, including traditionally problematic ones with semantically devoid label spaces. In our experiments we demonstrate that instruction-following LLMs are highly cost-effective data creators, and that models trained with these data exhibit performance better than those trained with human-labeled data (by up to 17.5%) on out-of-distribution evaluation, while maintaining comparable performance on in-distribution tasks. These results have important implications for the robustness of NLP systems deployed in the real-world.

1 Introduction

LLM-based data creation can reduce the need for costly human labels, but existing labeling and generation approaches face data-selection and prompt-engineering constraints. The paper proposes a single-formatting-example pipeline and reports strong out-of-distribution performance across varied tasks.

1 Introduction

  • LLM labeling depends on suitable raw data resembling the target distribution, which can be difficult to curate in cold-start or specialized domains and may yield imbalanced labels when sampled randomly.Rare events can contribute to imbalance.Source: §1 · pp. 1–2
  • LLM generation often requires carefully selected examples or label-descriptive prompts, limiting use for labels without standalone meaning or instance-varying answer options.Examples include yes/no labels and multiple-choice QA options.Source: §1 · p. 2
  • The pipeline uses one formatting example and an instruction to generate heterogeneous labeled data, including tasks with semantically meaningless or open-ended labels.It is presented as a unified alternative to methods requiring dataset-specific label descriptions or example selection.Source: §1 · p. 2
  • The instruction-following LLM generates uniformly formatted examples from a structured prompt, then reuses newly generated examples as seeds to diversify later rounds.The paper describes random, contrastive, similar, and tree sampling strategies for self-reference.Source: §1 · p. 2
  • Across varied tasks, generated-data models consistently outperform human-data models on out-of-distribution evaluation, while results are often comparable or sometimes better in-distribution when human labels are limited.The evaluation includes multiple-choice QA, open-book yes/no QA, and closed-book yes/no QA, including specialized domains.Source: §1 · p. 2

2 Formalization of LLM-based data creation

The section formalizes LLM data creation as generating labeled samples and uses graphical models to distinguish labeling from generation. It reviews how each strategy is conditioned and where those approaches encounter constraints.

2.1 LLM-based data creation

  • Data creation aims to induce samples (x, y), with y in label space Y; conditioning may additionally use label prompts, unlabeled in-domain examples, labeled pairs, or explanations.The model recursively samples text tokens conditioned on preceding tokens.Source: §2.1 · p. 3

2.2 Formal Framework and Related Work

  • Figure 2 summarizes two strategies and their conditional relationships: an LLM can label provided data or generate data conditioned on a label.The section uses graphical models to unify the approaches.Source: §2.2 · p. 3, Figure 2 · p. 3
  • As a labeler, an LLM predicts y from unlabeled input data, using few labeled examples or an instructive prompt; these methods assume the unlabeled data resembles the target-task distribution.Few-shot labeling uses example pairs, while instructive prompting can operate without labeled examples.Source: §2.2 · p. 3
  • Few-shot labelers depend on diverse, representative examples, which may be scarce in specialized domains; explanations can improve labeling in few-shot and zero-shot settings.The passage cites Liu et al. (2022), Rubin et al. (2022), Su et al. (2022), Wei et al. (2022), Zhou et al. (2022), Lampinen et al. (2022), and Kojima et al. (2022).Source: §2.2 · p. 3
  • As a generator, an LLM produces x given y, sometimes conditioned on curated examples or in-domain unlabeled examples as well as the target label.Hartvigsen et al. (2022) use curated examples; Wang et al. (2021b) use unlabeled examples with the target label.Source: §2.2 · p. 3
  • Prompt-based generators rely on label descriptions with meaningful semantics, making context-free indices or binary labels difficult to use as conditions.The paper presents its unified approach as addressing these cases.Source: §2.2 · p. 4
  • Instruction-following data generation creates responses for broad input coverage, whereas this paper focuses on data tailored to NLU tasks and accurate responses.The passage notes that prior instruction-trained models have shown sub-par NLU performance (Wang et al., 2023a).Source: §2.2 · p. 4

3 Example-based Data Creation

The pipeline conditions an instruction-following LLM on a structured formatting example, then iteratively generates and filters examples. Self-reference reuses generated data as formatting examples to broaden subsequent generations.

3 Example-based Data Creation

  • The pipeline begins with one formatting example and an instruction, converts the example into a structured prompt, and iterates until it has the requested data after removing duplicates and invalid JSON.It targets classification tasks, especially open-ended or semantically meaningless label spaces.Source: §3 · p. 4

3.1 Instruction

  • Batched generation supports LLM token limits and later self-reference, while the instruction encourages varied responses rather than repeated labels.The paper generates five examples per batch and does not vary that setting.Source: §3.1 · pp. 4–5

3.2 Formatting Example

  • The formatting example is a single (xf, yf) pair with label space Y, represented as a JSON prompt whose parseability helps validate generated outputs for downstream training.Figure 4 shows options containing Y, answer containing yf, question containing xf, and optional context.Source: §3.2 · p. 5, Figure 4 · p. 5

3.3 Structure of Formatting Example

  • For open-ended versus fixed answer options, prompt component order differs; placing fixed candidates before the question helps constrain generation to the predetermined answer set.The variable-option sequence is question, candidates, then correct answer; the fixed-option sequence places candidates and answer before the question.Source: §3.3 · p. 5

3.4 Self-Reference

  • Self-reference samples later formatting examples from generated outputs to address potential limits in coverage, diversity, and balance from relying on one seed.The four strategies are random, contrastive, similar, and tree selection.Source: §3.4 · p. 5
  • Contrastive and similar selection choose generated examples with the lowest or highest embedding cosine similarity to the preceding formatting example, respectively.Contrastive selection uses a pretrained bidirectional encoder (Reimers and Gurevych, 2019).Source: §3.4 · p. 5
  • Tree selection reuses all outputs from a step as examples in the next, using breadth-first exploration to limit domain drift; the authors hypothesize that shorter tree height yields greater topical coherence.The other three strategies use depth-first exploration.Source: §3.4 · pp. 5–6

4 Experimental Setup

The evaluation spans three QA task types and diverse domains, using multiple datasets per category to test domain generalization. It compares RoBERTa-large models trained on original data with models trained on LLM-created data, using a single randomly selected formatting example, and reports the fine-tuning setup.

4.1 Datasets

  • Three task types cover variable-label multiple-choice QA and fixed-label open-book and closed-book yes/no QA, with datasets spanning reasoning, passage comprehension, and inherent knowledge.At least two datasets are used per task category to assess domain generalization.Source: §4.1 · p. 6

4.2 Evaluation Details

  • The comparison trains RoBERTa-large on original training data or LLM-created data generated from one randomly selected formatting example.The authors report that other LLM-generation methods lacked solutions or engineered prompts for their listed tasks, preventing direct comparison.Source: §4.2 · p. 6

4.3 Implementation Details

  • Fine-tuning uses Adam, a maximum sequence length of 256, and grid searches development data over nine learning rates and three batch sizes.Experiments use gpt-3.5-turbo with temperature and top-p set to 1 for creation, and run on an RTX A5000 with FP32.Source: §4.3 · p. 6

5 Experimental Results

LLM-created training data often matches or exceeds human-curated data in cross-dataset evaluation, while in-distribution results vary by task and sampling strategy. The section also examines performance as generated data accumulates and reports low creation costs.

5.1 Performance Comparison

  • −40.55% was the largest drop with synthetic data, though generated-data models matched or beat human-data models on WinoGrande, PubMedQA, BioASQ, and StrategyQA.The comparison uses equal sample counts for each dataset and task.Source: §5.1 · p. 7, Table 3 · p. 7
  • LLM-generated training data consistently, sometimes significantly, outperformed human-curated training data on cross-dataset OOD evaluation.Each OOD evaluation trains on one dataset and tests on a different, manually curated dataset.Source: §5.1 · p. 7, Table 4 · p. 7

5.2 Distribution shift during creation.

  • On cumulative RiddleSense splits, Random and Contrastive sampling lose performance in later splits, while Similar and Tree improve steadily as data is added.Human-labeled data converges faster on this in-distribution test; all datasets trend upward in the final splits.Source: §5.2 · p. 8, Figure 5 · p. 8

5.3 Data creation cost

  • Data creation cost under $5 per dataset; Tree-based self-reference is among the more economical strategies and cheapest for half the datasets.Costs include data rejected as duplicated or ill-formed and use gpt-3.5-turbo pricing from June 2023.Source: §5.3 · p. 8, Table 5 · p. 8

6 Conclusion

The paper presents a single-formatting-example pipeline for generating varied labeled data, including tasks with open-ended or semantically devoid labels. Its evaluations support LLMs as low-cost data creators for small trainable models, with notable OOD generalization.

6 Conclusion

  • An instruction-following LLM generates varied examples from one JSON-formatted seed using structured instructions, with self-reference sampling to diversify later generations.The four sampling instantiations are random, contrastive, similar, and tree.Source: §6 · p. 8
  • The structured prompts address tasks with open-ended label spaces or labels lacking inherent semantic meaning.The paper presents these as settings prior data-generation efforts have avoided.Source: §6 · p. 8
  • A $5 budget can generate 2M tokens with gpt-3.5-turbo and, depending on the task, several thousand samples; trained models show notable OOD predictive abilities.The authors identify downstream applications with privacy, security, response-time, or annotation-cost constraints as relevant scenarios.Source: §6 · p. 9

7 Limitation

The pipeline’s evaluation is limited to ChatGPT (gpt-3.5-turbo), despite its compatibility with other instruction-following LLMs. The authors also did not exhaustively assess seed-formatting-example selection.

7 Limitation

  • Testing is restricted to ChatGPT (gpt-3.5-turbo) because of performance bottlenecks and time-out issues with LLM APIs.The authors note that the pipeline can integrate with other instruction-following LLMs.Source: §7 · p. 9
  • Open-source instruction-following models tested had limited JSON formatting and instruction comprehension; integration is expected when their performance approaches commercial products.The authors report that performance bottlenecks and API time-outs constrained testing.Source: §7 · p. 9
  • The initial seed formatting sample was selected at random, and its impact on data-creation quality was not exhaustively analyzed because of LLM API bottlenecks.The authors suggest that more careful crafting or selection of the example may yield better results.Source: §7 · p. 9

A.1 Details of Dataset

The datasets cover multiple-choice, binary-choice, and yes/no question answering, including commonsense reasoning, open-book comprehension, and biomedical questions.

A.1 Details of Dataset

  • PIQA tests physical commonsense through binary choices, WinoGrande uses sentence-completion choices requiring commonsense reasoning, and CREAK tests entity-knowledge assertions with true-or-false answers.PIQA asks for the most suitable solution; WinoGrande asks for the correct binary option.Source: §A.1 · p. 12
  • CommonsenseQA uses multiple-choice questions about general commonsense, while Riddlesense uses multiple-choice riddle-style questions requiring cognitive processes.Source: §A.1 · p. 12
  • BoolQ uses naturally occurring yes-or-no questions, with open-book answers based on supplied context and closed-book answers given without context.Source: §A.1 · p. 12
  • PubmedQA asks biomedical research questions using abstract content and treats “maybe” as “no,” while BioASQ is restricted to biomedical questions with binary answers.Source: §A.1 · p. 12
  • StrategyQA tests open-domain yes-or-no questions whose unstated reasoning paths must be inferred strategically.Source: §A.1 · p. 12

A.2 Data Statistics

The data-statistics table reports dataset statistics and notes how test sets were handled when datasets did not provide one.

A.2 Data Statistics

  • For datasets without a provided test set, the authors used an in-house test set randomly split from the training set.Source: Table 6 · p. 12
Loading 2310.20111v1…