Supervised Fine-Tuning Achieve Rapid Task Adaption Via Alternating Attention Head Activation Patterns

Yang Zhao, Li Du, Xiao Ding, Kai Xiong, Ting Liu +1 more
9/24/2024
cs.LGcs.CL

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

LLMs' performance on complex tasks is still unsatisfactory. A key issue is that presently LLMs learn in a data-driven schema, while the instructions about these complex tasks are both scarce and hard to collect or construct. On the contrary, a prominent phenomenon is that LLMs can learn rather fast on simpler tasks with adequate prior knowledge captured during pretraining stage. Thus, if the prerequisite and mechanism of such rapid generalization could be elucidated, it could enhance the efficiency and effectiveness of the LLM's ability to learn complex tasks. Thus, in this paper, we employ a gradient-based method, to dissect the process that the SFT process adapts LLMs to downstream tasks via the perspective of attention patterns. We find that: (1) LLMs selectively activate task-specific attention heads during SFT; (2) activation patterns for complex tasks are combinations of basic task patterns; and (3) changes in a few parameters can significantly impact activation patterns after SFT on a small number of samples.Based on these insights, experiments are conducted to actually enhance the efficiency and effectiveness of SFT.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zhao2024supervised,
  title  = {Supervised Fine-Tuning Achieve Rapid Task Adaption Via Alternating Attention Head Activation Patterns},
  author = {Yang Zhao and Li Du and Xiao Ding and Kai Xiong and Ting Liu and Bing Qin},
  year   = {2024},
  eprint = {2409.15820},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.15820v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2409.15820.svg)](https://codeofpaper.com/paper/2409.15820)

Discussion