Research map / Large language models / Language, safety and interpretability
Instruction Embedding: Latent Representations of Instructions Towards Task Identification
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Introduces instruction embeddings that prioritize task identification over semantics, builds the IEB benchmark of 47k instructions labeled by task category, and proposes PIE, a prompt-based embedding method (optionally fine-tuned with contrastive learning and verb-noun hard negatives).
Problem
Standard text embeddings capture overall semantics of instructions, but instruction-related tasks (data selection, demonstration retrieval) need embeddings that identify the task category an instruction represents.
Approach
Treat instruction embedding as a task-focused subset of text embedding: label instructions by verb-noun task categories derived from parsing, and use a task-oriented prompt on the LLM's last-token hidden state (PIE), further refined by supervised contrastive fine-tuning with label-based positives and verb/noun-overlap hard negatives.
Key results
- Supervised fine-tuned PIE-Llama2 reaches ARI 0.9125 on instruction clustering versus 0.2474-0.4814 for non-fine-tuned PIE/semantic baselines and 0.4741 for unsupervised-tuned BERT.
- Fine-tuned PIE-BERT achieves ARI 0.8974, homogeneity 0.9721, and silhouette 0.5180, comparable to or better than fine-tuned Llama2 variants.
- In the tiny benchmark with 100 test samples, instruction embedding obtains lower estimation error for Llama2-chat (3.17) and Vicuna (3.43) than text embedding baselines in several settings.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Use the PIE prompt instead of no prompt | Llama2 without fine-tuning · IEB instruction clustering | ARI: 0.1813 -> 0.4814 | Helped |
| Use the PIE prompt instead of a semantic prompt | Llama2 without fine-tuning · IEB instruction clustering | ARI: 0.4238 -> 0.4814 | Helped |
| Use the PIE prompt instead of no prompt | Vicuna without fine-tuning · IEB instruction clustering | ARI: 0.1198 -> 0.5305 | Helped |
| Use the PIE prompt instead of a semantic prompt | Vicuna without fine-tuning · IEB IIS test | IIS-Spearman: 0.6934 -> 0.7534 | Helped |
| Use the PIE prompt instead of no prompt | BERT without fine-tuning · IEB instruction clustering | ARI: 0.3113 -> 0.2474 | Hurt |
| Add supervised fine-tuning on EFT-train | Llama2 with PIE prompt · IEB instruction clustering | ARI: 0.4814 -> 0.9125 | Helped |
| Add supervised fine-tuning on EFT-train | BERT with PIE prompt · IEB instruction clustering | ARI: 0.2474 -> 0.8974 | Helped |
| Add PIE prompt instead of no prompt | supervised fine-tuned Llama2 · IEB instruction clustering | ARI: 0.7541 -> 0.9125 | Helped |
| Add PIE prompt instead of no prompt | supervised fine-tuned BERT · IEB instruction clustering | ARI: 0.8837 -> 0.8974 | Helped |
| Remove hard negative sampling (ablation) | supervised fine-tuned models with different prompts · IEB instruction clustering and IIS test | performance | Hurt |
| Use the Last two hidden layers instead of the Last one (ablation) | Llama2 without fine-tuning · IEB instruction clustering | ARI: 0.3096 -> 0.3151 | Mixed |
| Use First-Last hidden layers instead of Last two (ablation) | Llama2 without fine-tuning · IEB instruction clustering | ARI: 0.3151 -> 0.3157 | Helped |
Surprising findings
- BERT does not benefit from the PIE prompt in the non-fine-tuned setting (ARI drops from 0.3113 to 0.2474), while Vicuna outperforms Llama2 with the PIE prompt despite being worse without a prompt.
Limitations
- Around 7% of samples and roughly 7% of categories may be noisy (93% category accuracy on human check); multi-step instructions are not covered.
- Only single-turn instruction datasets are included; no multi-turn samples.
- Instruction embeddings ignore semantic content, so they cannot be directly used for information retrieval tasks.
Experimental setup
Datasets: Databricks Dolly Alpaca (cleaned) Self-Instruct GSM8K MATH MBPP LIMA OpenAssistant (oasst1) WizardLM ShareGPT
Benchmarks: IEB AlpacaEval
Metrics: ARI clustering purity homogeneity silhouette score Spearman correlation (IIS) win rate
Baselines: BERT Llama2 (no prompt) Vicuna-7b-v1.5 unsupervised SimCSE unsupervised PromptBERT TART (tart-dual-contriever-msmarco) tart-full-flan-t5-xl
Builds on: SimCSE PromptBERT LoRA LIMA
Closest papers by meaning
- From Instance Training to Instruction Learning: Task Adapters Generation from Instructions (NeurIPS 2024 · similarity 0.88)
- MUFFIN: Curating Multi-Faceted Instructions for Improving Instruction Following (ICLR 2024 · similarity 0.87)
- Do different prompting methods yield a common task representation in language models? (NeurIPS 2025 · similarity 0.87)
- Instruct-SkillMix: A Powerful Pipeline for LLM Instruction Tuning (ICLR 2025 · similarity 0.87)
- #InsTag: Instruction Tagging for Analyzing Supervised Fine-tuning of Large Language Models (ICLR 2024 · similarity 0.86)
- DINGO: Towards Diverse and Fine-Grained Instruction-Following Evaluation (AAAI 2024 · similarity 0.86)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
