arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.03662cs.CLcs.LG
收藏

大型语言模型中少样本学习与微调的表征图景

The representation landscape of few-shot learning and fine-tuning in large language models

Area Science Park(区域科学园)

Diego Doimo, Alessandro Serra, Alessio Ansuini, Alberto Cazzaniga

AI总结:

本文通过比较 ICL 与 SFT 在同一问答任务中的隐藏表征概率图景,揭示二者在网络前后半段形成的不同语义结构与答案编码机制。

摘要:

上下文学习(ICL)与监督微调(SFT)是提升现代大型语言模型(LLM)在特定任务上性能的两种常用策略。尽管二者本质不同,却往往带来相近的性能提升。然而,关于它们是否会在 LLM 内部诱发相似的表征,目前仍知之甚少。我们通过分析两种情况下隐藏表征的概率图景来研究这一问题。具体而言,我们比较了 LLM 如何解决同一问答任务,发现 ICL 与 SFT 形成了截然不同的内部结构,并且二者都会在网络中部经历一次急剧转变。在网络前半部分,ICL 塑造出可解释、并按语义内容层级组织的表征;相比之下,SFT 得到的概率图景更加模糊且语义混杂。在模型后半部分,经过微调的表征发展出更能编码答案身份的概率模式,而 ICL 表征的图景则以不够明确的峰值为特征。我们的方法揭示了 LLM 在不同条件下为解决同一任务而在内部形成的多样化计算策略,使我们向设计从语言模型中提取信息的最优方法迈出一步。

英文摘要:

In-context learning (ICL) and supervised fine-tuning (SFT) are two common strategies for improving the performance of modern large language models (LLMs) on specific tasks. Despite their different natures, these strategies often lead to comparable performance gains. However, little is known about whether they induce similar representations inside LLMs. We approach this problem by analyzing the probability landscape of their hidden representations in the two cases. More specifically, we compare how LLMs solve the same question-answering task, finding that ICL and SFT create very different internal structures, in both cases undergoing a sharp transition in the middle of the network. In the first half of the network, ICL shapes interpretable representations hierarchically organized according to their semantic content. In contrast, the probability landscape obtained with SFT is fuzzier and semantically mixed. In the second half of the model, the fine-tuned representations develop probability modes that better encode the identity of answers, while the landscape of ICL representations is characterized by less defined peaks. Our approach reveals the diverse computational strategies developed inside LLMs to solve the same task across different conditions, allowing us to make a step towards designing optimal methods to extract information from language models.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑