Preprint
Machine Learning

Self Instruct

December 1, 2022

0

Citations

0

Influential Citations

Venue

2022

Year

Abstract

A framework for improving the instruction-following capabilities of pretrained language models by bootstrapping off their own generations.

Analysis

Why This Paper Matters

Large language models (LLMs) have shown remarkable capabilities, but aligning them to follow diverse and nuanced instructions typically requires vast amounts of human-annotated data. The Self-Instruct framework, introduced by Yizhong Wang et al., flips this paradigm by enabling models to bootstrap their own instruction-following abilities from a tiny seed set of human examples. This is a game-changer for practitioners who lack resources for large-scale annotation but still want to fine-tune models for specific tasks. The paper demonstrates that self-generated data can rival or even surpass the performance of models trained on curated datasets, making instruction tuning more democratic and scalable.

How It Works

Figure 1

The Self-Instruct pipeline is a multi-stage process that leverages the model's own generative power to create a diverse instruction dataset. It starts with a small pool of 175 human-written instruction-output pairs. From this seed, the model generates new instructions by prompting itself with 8 random examples from the pool, asking it to invent new tasks.

A high-level overview of Self-Instruct.

Once a new instruction is generated, the system classifies whether it is a classification task (e.g., sentiment analysis) or a non-classification task (e.g., summarization). This classification determines the instance generation strategy:

  • Input-first approach: For non-classification tasks, the model first generates an input that fits the instruction, then produces the corresponding output. This mimics how models typically receive input and respond.

Prompt used for the input-first approach of instance generation. The model is prompted to generate the instance first, and then generate the corresponding output. For instructions that don’t require additional input, the output is allowed to be generated directly

  • Output-first approach: For classification tasks, the model first enumerates possible class labels, then generates inputs conditioned on each label. This ensures balanced coverage across categories.

Prompt used for the output-first approach of instance generation. The model is prompted to generate the class label first, and then generate the corresponding input. This prompt is used for generating the instances for classification tasks.

After generating instances, the pipeline filters out low-quality or duplicate entries. New instructions are only added if they are sufficiently dissimilar (measured by ROUGE-L) from existing ones, promoting diversity. The final dataset—over 52,000 instructions and 82,000 instances—is used to fine-tune the original LM in a supervised manner, using multiple templates to encode different instruction formats.

Results

The paper's experiments on GPT-3 are striking. On the SUPERNI benchmark of unseen tasks, Self-Instruct fine-tuning boosted GPT-3's performance by 33.1%, nearly matching InstructGPT-001—a model fine-tuned with human feedback. On a custom set of 252 user-oriented instructions evaluated by human experts, the self-trained model (GPT3SELF-INST) outperformed models fine-tuned on public datasets like T0 and SuperNaturalInstructions, and closely approached the quality of InstructGPT-001.

Evaluation results on unseen tasks from SUPERNI.

Data size analysis showed consistent improvement up to about 16,000 instructions, after which gains plateaued. Importantly, refining the generated outputs using a stronger model (InstructGPT-003) yielded an additional 10% improvement, indicating that data quality is a key lever for further gains.

Significance

Self-Instruct is a practical, cost-effective method for aligning LLMs with instructions. It reduces reliance on human annotators and opens the door for smaller teams to create specialized instruction-tuned models. The framework's modularity—separating instruction generation, classification, instance creation, and filtering—makes it adaptable to different base models and domains. The paper also underscores the importance of data diversity and quality over sheer quantity, a lesson that resonates across many areas of machine learning. As LLMs continue to evolve, self-supervised alignment methods like Self-Instruct will likely become a standard tool in the practitioner's toolkit, enabling more responsive and controllable AI systems.