Skip to main content
QUICK REVIEW

[Paper Review] #InsTag: Instruction Tagging for Analyzing Supervised Fine-tuning of Large Language Models

Keming Lu, Hongyi Yuan|arXiv (Cornell University)|Aug 14, 2023
Natural Language Processing TechniquesComputer Science13 citations
TL;DR

InsTag automatically tags open-set SFT queries to quantify instruction diversity and complexity, and uses a complexity-focused data selector to train TagLM models that achieve strong MT-Bench performance with relatively small SFT data.

ABSTRACT

Foundation language models obtain the instruction-following ability through supervised fine-tuning (SFT). Diversity and complexity are considered critical factors of a successful SFT dataset, while their definitions remain obscure and lack quantitative analyses. In this work, we propose InsTag, an open-set fine-grained tagger, to tag samples within SFT datasets based on semantics and intentions and define instruction diversity and complexity regarding tags. We obtain 6.6K tags to describe comprehensive user queries. Then we analyze popular open-sourced SFT datasets and find that the model ability grows with more diverse and complex data. Based on this observation, we propose a data selector based on InsTag to select 6K diverse and complex samples from open-source datasets and fine-tune models on InsTag-selected data. The resulting models, TagLM, outperform open-source models based on considerably larger SFT data evaluated by MT-Bench, echoing the importance of query diversity and complexity. We open-source InsTag in https://github.com/OFA-Sys/InsTag.

Motivation & Objective

  • Define fine-grained, open-set instruction tags to quantify diversity and complexity in SFT data.
  • Develop an automatic tagging pipeline using ChatGPT and normalization to produce high-quality tags.
  • Analyze open-source SFT datasets to reveal how diversity and complexity correlate with alignment performance.
  • Propose a data selector based on InsTag to curate diverse and complex samples for SFT.
  • Demonstrate that models fine-tuned on InsTag-selected data (TagLM) outperform some baselines on MT-Bench.

Proposed method

  • Prompt ChatGPT to annotate queries with open-set fine-grained intention tags.
  • Normalize raw tags via frequency filtering, rule aggregation, semantic clustering (DBSCAN), and association aggregation (FP-Growth).
  • Evaluate tagging quality with GPT-4 and human annotators using precision and consistency metrics.
  • Analyze dataset diversity and complexity using tag-based metrics (unique tag coverage, average tags per query).
  • Sample 6K high-complexity/diversity queries with Algorithm 1 (complexity-first diverse sampling) for SFT.
  • Fine-tune 13B LLaMA/LLaMA-2 models on InsTag-selected data and evaluate with MT-Bench.
Figure 1: Overview of InsTag . We use ChatGPT to annotate fine-grained intention tags for a series of open-source datasets. We present two cases of open tagging annotations in this figure, selected from ShareGPT and UltraChat. A tag normalization, including multiple denoising and aggregation methods
Figure 1: Overview of InsTag . We use ChatGPT to annotate fine-grained intention tags for a series of open-source datasets. We present two cases of open tagging annotations in this figure, selected from ShareGPT and UltraChat. A tag normalization, including multiple denoising and aggregation methods

Experimental results

Research questions

  • RQ1Can open-set, fine-grained instruction tagging effectively quantify diversity and complexity in SFT datasets?
  • RQ2Does higher instruction diversity and complexity in SFT data correlate with improved LLM alignment performance?
  • RQ3Can InsTag-based data selection yield better-performing LLMs with less SFT data compared to baselines?
  • RQ4How do TagLM models trained on InsTag-selected data compare to proprietary and open-source baselines on MT-Bench?

Key findings

  • InsTag yields about 6,587 atomic tags after normalization, enabling analysis of diversity and complexity in SFT data.
  • Datasets with higher tag diversity and complexity correlate with higher MT-Bench alignment performance.
  • TagLM-13b-v1.0 (6K data) achieves MT-Bench 6.44±0.04, outperforming many open-source aligned LLMs with larger data sizes.
  • TagLM-13b-v2.0 (6K data) achieves MT-Bench 6.55±0.02, nearing LLaMA-2 chat performance and close to RLHF-tuned equivalents.
  • Models trained on InsTag-selected data can outperform open-resourced baselines that use substantially more SFT data.
  • InsTag’s tagging quality shows high precision and consistency (GPT-4: 96.1% precision, 86.6% consistency; human annotators agree in majority voting).
(a) Diversity and Complexity based on Tags
(a) Diversity and Complexity based on Tags

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.