arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2502.16722cs.CLcs.AI
收藏

微调Transformer中表征的逐层演化:来自稀疏自编码器的见解

Layer-Wise Evolution of Representations in Fine-Tuned Transformers: Insights from Sparse AutoEncoders

Suneel Nadipalli

AI总结:

本文通过激活相似性分析、稀疏自编码器训练和token级激活可视化,揭示了BERT微调中表征的逐层演化:早期层保留通用特征,中间层过渡,后期层专精于任务,为理解微调机制提供了关键见解。

摘要:

微调预训练Transformer是一种增强基础模型在特定任务上性能的强大技术。从早期在BERT等模型中的应用到微调大型语言模型(LLMs),这种方法在将通用架构适配到专门的下游任务中发挥了重要作用。理解微调过程对于揭示Transformer如何适应特定目标、保留通用表征以及获取任务特定特征至关重要。本文通过分析激活相似性、训练稀疏自编码器(SAEs)以及可视化不同层中的token级激活,探讨了微调的内在机制,特别是在BERT transformer中。基于在多个数据集和BERT层上进行的实验,我们观察到特征如何适应手头任务的稳定进展:早期层主要保留通用表征,中间层充当通用特征与任务特定特征之间的过渡,而后期层则完全专精于任务适应。这些发现为微调的内部运作及其对Transformer架构中表征学习的影响提供了关键见解。

英文摘要:

Fine-tuning pre-trained transformers is a powerful technique for enhancing the performance of base models on specific tasks. From early applications in models like BERT to fine-tuning Large Language Models (LLMs), this approach has been instrumental in adapting general-purpose architectures for specialized downstream tasks. Understanding the fine-tuning process is crucial for uncovering how transformers adapt to specific objectives, retain general representations, and acquire task-specific features. This paper explores the underlying mechanisms of fine-tuning, specifically in the BERT transformer, by analyzing activation similarity, training Sparse AutoEncoders (SAEs), and visualizing token-level activations across different layers. Based on experiments conducted across multiple datasets and BERT layers, we observe a steady progression in how features adapt to the task at hand: early layers primarily retain general representations, middle layers act as a transition between general and task-specific features, and later layers fully specialize in task adaptation. These findings provide key insights into the inner workings of fine-tuning and its impact on representation learning within transformer architectures.

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

↑