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显著减轻特征扭曲,在分布内与分布外数据集上均实现更优模型性能。大量实验表明,我们的方法优于其他基线方法,验证了其在提升性能与减轻特征扭曲两方面的有效性。