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.
Understanding Refusal in Language Models with Sparse Autoencoders
Nanyang Technological University(南洋理工大学);Singapore University of Technology and Design(新加坡科技设计大学);Digital Trust Centre(数字信任中心);Institute of High Performance Computing (IHPC)(高性能计算研究所)
Recurrence Boosts Diversity! Revisiting Recurrent Latent Variable in Transformer-Based Variational AutoEncoder for Diverse Text Generation
Tsinghua University(清华大学);Beijing National Research Center for Information Science and Technology(北京国家信息科学与技术研究中心);Institute for Artificial Intelligence, Tsinghua University(清华大学人工智能研究院);Microsoft Research Asia(微软亚洲研究院);Jiangsu Normal University(江苏师范大学);Jiangsu Collaborative Innovation Center for Language Ability(江苏省语言能力协同创新中心)
Adaptation of Autoencoder for Sparsity Reduction From Clinical Notes Representation Learning
École de Technologie Supérieure, University of Québec(魁北克大学高等技术学院);CHU Sainte-Justine Research Center(圣贾斯汀儿童医院研究中心);CHU Sainte-Justine Hospital(圣贾斯汀儿童医院);University of Montreal(蒙特利尔大学)