Research map / Large language models / Instruction and fine-tuning
The Missing Alignment Link of In-context Learning on Sequences
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.
Shows LLMs fail to in-context learn input-output alignments in synthetic Seq2Seq tasks and proposes ICA-Tune, LoRA fine-tuning of attention parameters using in-context example sequences, which yields alignment emergence in middle layers and better sample efficiency and OOD generalization.
Problem
In-context learning of unseen sequence-to-sequence tasks fails for longer inputs because LLMs cannot infer input-output alignments in context, leading to incomplete induction heads.
Approach
Builds a synthetic PCFG+PFA Seq2Seq generator with a latent alignment function, shows interleaving gold alignments restores ICL, and proposes ICA-Tune: fine-tuning only attention parameters (via LoRA) with next-token loss on in-context example sequences so alignment emerges in middle layers and feeds induction heads.
Key results
- Frontier LLMs with standard prompts reach only 20.00-51.25% accuracy on m=8 tasks versus 82.5-100% with pre-aligned prompts.
- ICA-Tune reaches almost 100% accuracy with 50 labeled instances, whereas standard fine-tuning does not reach that even with 800 examples.
- Alignment accuracy in ICA-Tune rises abruptly around step 85, before IC-lookup accuracy rises around step 110 in Llama-3-8B.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Interleave each output token with its gold-aligned input token in the prompt | LLMs performing ICL on synthetic Seq2Seq tasks · Synthetic Seq2Seq, m=8, c=1 | accuracy (%): 20.00 -> 91.25; 31.25 -> 98.75; 36.25 -> 100.0; 51.25 -> 82.50 | Helped |
| Interleave aligned x and y tokens in the prompt | Llama-3.2-1B · Synthetic Seq2Seq | accuracy (%): 27.50 -> 100.00 | Helped |
| Interleave aligned x and y tokens in the prompt | Llama-3.2-3B · Synthetic Seq2Seq | accuracy (%): 30.63 -> 95.94 | Helped |
| Interleave aligned x and y tokens in the prompt | Llama-3.2-8B · Synthetic Seq2Seq | accuracy (%): 36.25 -> 98.44 | Helped |
| Reduce pre-aligned prompt examples from 16 to 14 while retaining alignment (ablation) | Llama-3.2 models · Synthetic Seq2Seq | accuracy (%): 27.50 -> 99.38; 30.63 -> 95.00; 36.25 -> 99.38 | Helped |
| Fine-tune attention parameters using in-context examples (ICA-Tune) rather than standard per-example fine-tuning | LLaMA 3 8B · Synthetic Seq2Seq, in-distribution validation | accuracy: ICA-Tune achieves almost 100% accuracy with just 50 labeled instances; standard fine-tuning does not reach that accuracy | Helped |
| Fine-tune using in-context examples instead of independently sampled examples | LLaMA 3 8B · Synthetic Seq2Seq, OOD validation | accuracy | Helped |
| Use a smaller alignment parameter λ (less monotonic alignments) (ablation) | ICA-Tune · Synthetic Seq2Seq, m=8, c=1 | convergence speed: 200 steps were required as against just 25 for the monotonic case | Hurt |
| Fine-tune only middle attention layer 13 instead of all layers (ablation) | ICA-Tune on LLaMA 3 8B · Synthetic Seq2Seq, monotonic alignment | accuracy | Helped |
| Use standard per-example fine-tuning instead of ICA-Tune (ablation) | LLaMA 3 8B · Synthetic Seq2Seq | alignment accuracy | Hurt |
Surprising findings
- Standard fine-tuning does not learn alignments even though it fits the training data, while ICA-Tune does without any alignment supervision.
- Fine-tuning a single middle attention layer (layer 13) is sufficient to cause alignment emergence on monotonic tasks.
Limitations
- Experiments use synthetic PCFG/PFA tasks rather than real Seq2Seq datasets.
- Conjecture that ICL of general non-monotonic alignments is not expressible in causal transformers is informal and unproven.
- Non-monotonic alignments (small lambda) need substantially more fine-tuning steps.
Experimental setup
Datasets: synthetic Seq2Seq tasks generated from PCFG and PFA with alignment function
Benchmarks: synthetic Seq2Seq tasks (in-distribution and permuted-vocabulary OOD validation)
Metrics: prediction accuracy alignment accuracy IC-lookup accuracy
Baselines: standard prompting ICL standard fine-tuning pre-aligned prompting oracle
Builds on: induction heads LoRA IBM alignment models (lexical translation)
Closest papers by meaning
- In-Context Language Learning: Architectures and Algorithms (ICML 2024 · similarity 0.90)
- Supervised Knowledge Makes Large Language Models Better In-context Learners (ICLR 2024 · similarity 0.89)
- InfLLM: Training-Free Long-Context Extrapolation for LLMs with an Efficient Context Memory (NeurIPS 2024 · similarity 0.89)
- The Unlocking Spell on Base LLMs: Rethinking Alignment via In-Context Learning (ICLR 2024 · similarity 0.89)
- From Unstructured Data to In-Context Learning: Exploring What Tasks Can Be Learned and When (NeurIPS 2024 · similarity 0.88)
- Revisiting In-context Learning Inference Circuit in Large Language Models (ICLR 2025 · similarity 0.88)
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.
