Layer by Layer: Uncovering Where Multi-Task Learning Happens in Instruction-Tuned Large Language Models
Zheng Zhao, Yftah Ziser, Shay B. Cohen
Abstract
Fine-tuning pre-trained large language models (LLMs) on a diverse array of tasks has become a common approach for building models that can solve various natural language processing (NLP) tasks. However, where and to what extent these models retain task-specific knowledge remains largely unexplored. This study investigates the task-specific information encoded in pre-trained LLMs and the effects of instruction tuning on their representations across a diverse set of over 60 NLP tasks. We use a set of matrix analysis tools to examine the differences between the way pre-trained and instruction-tuned LLMs store task-specific information. Our findings reveal that while some tasks are already encoded within the pre-trained LLMs, others greatly benefit from instruction tuning. Additionally, we pinpointed the layers in which the model transitions from high-level general representations to more task-oriented representations. This finding extends our understanding of the governing mechanisms of LLMs and facilitates future research in the fields of parameter-efficient transfer learning and multi-task learning. Our code is available at: https://github.com/zsquaredz/layerbylayer/
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 92cecd99-c3cc-4ce2-b7d4-5c93c274593fCited by top-tier papers10
- Old Habits Die Hard: How Conversational History Geometrically Traps LLMsAdi Simhi, Fazl Barez, Martin Tutek, Yonatan Belinkov et al.ICML 2026 · 5 citations
- Investigating the Representation of Backchannels and Fillers in Fine-tuned Language ModelsYu Wang, Leyi Lao, Langchu Huang, Gabriel Skantze et al.ACL 2026 · 1 citation
- Alignment Quality Index (AQI) : Beyond Refusals: AQI as an Intrinsic Alignment Diagnostic via Latent Geometry, Cluster Divergence, and Layer wise Pooled RepresentationsAbhilekh Borah, Chhavi Sharma, Danush Khanna, Utkarsh Bhatt et al.EMNLP 2025
- Hybrid Routing for a Mixture of LoRA ExpertsYitong Huang, Ziqi Yang, Zihui Wang, Jianzhong Qi et al.AAAI 2026
- Training Prompt Matters: State-Adaptive Optimization for Robust Fine-TuningWenhang Shi, Yiren Chen, Shuqing Bian, Zhe Zhao et al.ICML 2026
Builds on9
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
- Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou et al.ICLR 2021 · 7,905 citations
- Multitask Prompted Training Enables Zero-Shot Task GeneralizationVictor Sanh, Albert Webson, Colin Raffel, Stephen H. Bach et al.ICLR 2022 · 1,976 citations
- The Flan Collection: Designing Data and Methods for Effective Instruction TuningShayne Longpre, Le Hou, Tu Vu, Albert Webson et al.ICML 2023 · 908 citations
Related papers
- Fine-tuning Happens in Tiny Subspaces: Exploring Intrinsic Task-specific Subspaces of Pre-trained Language ModelsZhong Zhang, Bang Liu, Junming ShaoACL 2023 · 8 citations
- Specialist or Generalist? Instruction Tuning for Specific NLP TasksChufan Shi, Yixuan Su, Cheng Yang, Yujiu Yang et al.EMNLP 2023 · 11 citations
- Massive Supervised Fine-tuning Experiments Reveal How Data, Layer, and Training Factors Shape LLM Alignment QualityYuto Harada, Yusuke Yamauchi, Yusuke Oda, Yohei Oseki et al.EMNLP 2025
- ATTEMPT: Parameter-Efficient Multi-task Tuning via Attentional Mixtures of Soft PromptsAkari Asai, Mohammadreza Salehi, Matthew E. Peters, Hannaneh HajishirziEMNLP 2022 · 55 citations
- Task Residual for Tuning Vision-Language ModelsTao Yu, Zhihe Lu, Xin Jin, Zhibo Chen et al.CVPR 2023
