[论文解读] The representation landscape of few-shot learning and fine-tuning in large language models
本文通过隐藏表示的基于密度的几何分析,研究了少样本学习(ICL)与监督微调(SFT)如何塑造大语言模型(LLMs)的内部表征。研究发现,ICL在早期层中生成语义组织良好、分层的表征,而SFT在后期层中则增强了与答案身份相关的聚类——表明尽管性能表现相似,二者却采用了根本不同的计算策略。
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.
研究动机与目标
- 理解少样本学习(ICL)与监督微调(SFT)如何塑造大语言模型(LLMs)的内部表征空间。
- 比较相同问答任务下,ICL与SFT的隐藏表征的几何结构。
- 探究尽管性能表现相近,ICL与SFT是否诱导出相似或不同的内部计算策略。
- 分析表征几何结构在各层中的演化过程,特别是网络中部附近的临界转变点。
- 探究内在维度与概率模态结构如何与语义内容及答案身份相关联。
提出的方法
- 采用基于密度的方法,直接在隐藏层表征的数据流形上识别概率模态,避免显式降维。
- 计算各层隐藏表征的内在维度(ID),以检测表征景观中的结构转变。
- 该方法追踪表征中多模态结构的出现,重点关注按主题的语义聚类与按字母标识的答案身份聚类。
- 使用非参数方法识别密度峰值,不假设聚类形状为凸形,亦无需预先设定聚类数量。
- 分析应用于基于MMLU基准的多选问答任务,比较零样本、少样本(ICL)与微调设置。
- 在第二个具有相似主题划分的数据集混合上验证该方法,表明其对数据分布具有鲁棒性。

实验结果
研究问题
- RQ1少样本学习与监督微调是否在大语言模型中产生相似的内部表征?
- RQ2在ICL与SFT下,隐藏表征的几何结构如何在各层中演化?
- RQ3内在维度在识别网络内部功能转变中的作用是什么?
- RQ4ICL下的早期层是否表现出按主题分层的、语义上有意义的表征聚类?
- RQ5SFT下的后期层是否在表征景观中展现出更清晰、与答案身份相关的聚类?
主要发现
- 在ICL与SFT中,网络中部附近均出现表征几何的显著转变,表现为内在维度的峰值。
- 在早期层中,ICL生成语义组织良好、分层的表征,按主题聚类,密度峰值反映了MMLU的底层主题。
- 相比之下,SFT在早期层中产生更模糊、语义混杂的表征景观,缺乏清晰的主题聚类。
- 在后期层中,SFT发展出明确的概率模态,与答案身份(A、B、C、D)强烈相关,表明答案特异性编码得到增强。
- ICL在后期层的表征中峰值不那么明显,表明其对答案身份的编码弱于SFT。
- 分析表明,SFT对后期层的修改显著多于早期层,支持优先调整后期层的自适应低秩微调策略。

更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。