Fine-tuning pre-trained neural network models has become a widely adopted approach across various domains. However, it can lead to the distortion of pre-trained feature extractors that already possess strong generalization capabilities. Mitigating feature distortion during adaptation to new target domains is crucial. Recent studies have shown promising results in handling feature distortion by aligning the head layer on in-distribution datasets before performing fine-tuning. Nonetheless, a significant limitation arises from the treatment of batch normalization layers during fine-tuning, leading to suboptimal performance. In this paper, we propose Domain-Aware Fine-Tuning (DAFT), a novel approach that incorporates batch normalization conversion and the integration of linear probing and fine-tuning. Our batch normalization conversion method effectively mitigates feature distortion by reducing modifications to the neural network during fine-tuning. Additionally, we introduce the integration of linear probing and fine-tuning to optimize the head layer with gradual adaptation of the feature extractor. By leveraging batch normalization layers and integrating linear probing and fine-tuning, our DAFT significantly mitigates feature distortion and achieves improved model performance on both in-distribution and out-of-distribution datasets. Extensive experiments demonstrate that our method outperforms other baseline methods, demonstrating its effectiveness in not only improving performance but also mitigating feature distortion.
翻译:对预训练神经网络模型进行微调已成为广泛应用于各个领域的方法。然而,这可能导致已经具备强大泛化能力的预训练特征提取器发生失真。在适应新目标域时缓解特征失真至关重要。近期研究表明,通过在微调前在分布内数据上对齐头部层,能够有效处理特征失真。然而,微调过程中批量归一化层的处理方式存在显著局限性,导致性能次优。本文提出领域感知微调(DAFT),这是一种新颖方法,融合了批量归一化转换以及线性探测与微调的集成。我们的批量归一化转换方法通过减少微调期间对神经网络的修改,有效缓解特征失真。此外,我们引入线性探测与微调的集成,以逐步适应特征提取器的方式优化头部层。通过利用批量归一化层并整合线性探测与微调,我们的DAFT方法显著缓解了特征失真,并在分布内和分布外数据集上均实现了更优模型性能。大量实验表明,我们的方法优于其他基线方法,证明了其在提升性能的同时缓解特征失真的有效性。