Self-Guide: Better Task-Specific Instruction Following via Self-Synthetic Finetuning

Chenyang Zhao, Xueying Jia, Vijay Viswanathan, Graham Neubig, Tongshuang Wu

TL;DR

This paper introduces SELF-GUIDE, a novel method that enables large language models (LLMs) to improve their task-specific instruction following by generating their own training data and finetuning on it. This approach significantly boosts performance on classification and generation tasks without relying on external, human-annotated datasets or more powerful "teacher" models, offering a scalable and cost-effective solution for adapting LLMs.

What Problem Does This Paper Address?

Large Language Models (LLMs) show immense promise in handling diverse tasks through natural language prompts. However, simply prompting an LLM often results in lower accuracy compared to finetuning it on extensive task-specific data. The challenge is that creating such large, high-quality, annotated datasets for every specific task is prohibitively expensive, time-consuming, and often infeasible due to data scarcity. While prior work has explored using powerful LLMs ("teachers") to generate synthetic data for finetuning smaller LLMs ("students"), this introduces dependencies on external models, leading to cost, scalability, and potential legal issues. This paper tackles the problem of improving LLM performance on specific tasks without external supervision or costly data annotation, by enabling the LLM to learn from its own generated data.

Methods

The core of SELF-GUIDE is a multi-stage mechanism for self-synthetic finetuning. The process begins with an LLM (the "student") receiving a task instruction and a few example demonstrations.

  1. Input Generation: The LLM generates new, diverse input examples that are relevant to the instruction. This stage uses a higher temperature to encourage variety.
  2. Output Generation: The LLM then generates corresponding output examples for the newly created inputs, effectively creating synthetic input-output pairs. This stage uses a lower temperature to promote quality.
  3. Quality Optimization: Crucially, the generated data undergoes rigorous filtering. This includes:
  4. Temperature Adjustment: Balancing diversity and quality across stages.
  5. Rule-based Filters: * Noise Filter: Removes examples containing common noise terms, greetings, or irrelevant characters.
  6. Length Filter: Ensures generated inputs and outputs fall within a statistically determined length range (approximating a normal distribution based on the initial examples) to maintain conciseness and relevance.
  7. Pseudo Label Sampling (for classification): A modified procedure where pseudo-labels are generated first, followed by diverse inputs, and then true labels.
  8. Self-Synthetic Finetuning: The filtered, self-generated dataset is then used to finetune the same student LLM. This finetuning process allows the LLM to internalize the task-specific patterns and improve its ability to follow instructions.

This contrasts with methods like Self-Instruct, which focus on improving general instruction-following capabilities, whereas SELF-GUIDE targets task-specific expertise.

Datasets

The experiments were conducted using tasks from the Super-NaturalInstructions V2 benchmark. This benchmark provides a diverse set of instruction-following tasks. For hyperparameter tuning, half of the tasks were used, and the other half served as held-out tasks for evaluation. The paper does not introduce a new benchmark but rather utilizes an existing one to demonstrate the effectiveness of their method.

Key Insights and Ideas

  • LLMs can effectively bootstrap their own learning: The most significant insight is that LLMs possess the capability to generate useful training data for themselves, significantly reducing the reliance on external, human-curated datasets.
  • Self-synthesized data is powerful, especially with finetuning: While in-context learning with self-synthesized data showed some benefits, finetuning on this data yielded substantially better results, highlighting the effectiveness of the learning algorithm.
  • Quality filtering is paramount: The effectiveness of SELF-GUIDE hinges on robust filtering mechanisms (noise and length filters) to ensure the synthetic data is clean, relevant, and of high quality, rather than just abundant.
  • Task-specific expertise is achievable without external supervision: The method demonstrates that LLMs can become "experts" in specific tasks by learning from their own generated data, without needing explicit labels or a more powerful teacher model.
  • Robustness to prompt variations: SELF-GUIDE models exhibit remarkable stability and performance even when faced with minor, seemingly trivial changes in prompt formatting, unlike base models which can be highly sensitive.

Key Results

  • Substantial performance improvements: SELF-GUIDE achieved an absolute improvement of approximately 15% for classification tasks and 18% for generation tasks on the Super-NaturalInstructions V2 benchmark, compared to the baseline prompting method.
  • Elimination of irrelevant content: The Irrelevant Ratio was reduced to 0% across all tasks after SELF-GUIDE finetuning, indicating cleaner and more focused outputs.
  • Finetuning outperforms in-context learning: Finetuning on self-synthesized data led to an average improvement of around 20 percentage points compared to using the same data for in-context learning.
  • Data efficiency: Even finetuning on a small number of self-synthesized examples (e.g., 7) yielded considerable performance gains.
  • Improved alignment with ground truth: The L1 distance from the ground truth distribution was significantly reduced, indicating better alignment of model outputs.

Limitations and Future Work

  • English-centric: The current experiments and models are limited to English NLP tasks. The authors acknowledge that this could exacerbate existing inequalities between languages and communities and suggest extending the approach to non-English languages as a future direction.
  • Model Scale: The study was conducted on a 7B parameter model (Vicuna-7b-1.5). While the authors believe the approach can scale to larger LLMs, they were unable to experiment with them due to budgetary constraints.
  • Ethical Considerations: The potential for SELF-GUIDE to be used for malicious purposes (e.g., specializing LLMs for harmful tasks) is acknowledged. While the open-sourcing of the code could amplify this risk, the authors believe the potential for positive use justifies its release.
  • Future Work: The authors suggest exploring larger models, non-English NLP tasks, and further investigating the autonomous self-alignment and improvement mechanisms in AI systems.

Summary updated

BibTeX
@inproceedings{zhao2024self,
  author = {Chenyang Zhao and Xueying Jia and Vijay Viswanathan and Graham Neubig and Tongshuang Wu},
  title = {{Self-Guide: Better Task-Specific Instruction Following via Self-Synthetic Finetuning}},
  booktitle = {COLM},
  year = {2024},
  url = {https://openreview.net/forum?id=Dt6qXZsgaU},
}
Figure