[论文解读] Two-Stage Fine-Tuning: A Novel Strategy for Learning Class-Imbalanced Data
本文提出一种两阶段微调策略,以解决文本分类中的类别不平衡问题,其中在标准微调之前,先使用类别平衡重加权损失对最终层进行微调。该方法通过在初始表示学习阶段保护少数类,提升了尾部类别的性能,在合成数据集和真实世界ADME语义标注数据集上,优于标准微调和重加权微调方法。
Classification on long-tailed distributed data is a challenging problem, which suffers from serious class-imbalance and hence poor performance on tail classes with only a few samples. Owing to this paucity of samples, learning on the tail classes is especially challenging for the fine-tuning when transferring a pretrained model to a downstream task. In this work, we present a simple modification of standard fine-tuning to cope with these challenges. Specifically, we propose a two-stage fine-tuning: we first fine-tune the final layer of the pretrained model with class-balanced reweighting loss, and then we perform the standard fine-tuning. Our modification has several benefits: (1) it leverages pretrained representations by only fine-tuning a small portion of the model parameters while keeping the rest untouched; (2) it allows the model to learn an initial representation of the specific task; and importantly (3) it protects the learning of tail classes from being at a disadvantage during the model updating. We conduct extensive experiments on synthetic datasets of both two-class and multi-class tasks of text classification as well as a real-world application to ADME (i.e., absorption, distribution, metabolism, and excretion) semantic labeling. The experimental results show that the proposed two-stage fine-tuning outperforms both fine-tuning with conventional loss and fine-tuning with a reweighting loss on the above datasets.
研究动机与目标
- 解决长尾、类别不平衡文本分类数据集中尾部类别性能差的挑战。
- 缓解预训练模型标准微调过程中代表性不足类别所面临的劣势。
- 开发一种对标准微调的简单而有效的改进方法,提升少数类的学习效果,且无需重新训练整个模型。
- 在合成数据集和真实世界文本分类基准(包括ADME语义标注)上评估该方法。
- 证明在长尾数据分布上,使用类别平衡损失进行初始微调可提升下游性能。
提出的方法
- 首先,使用类别平衡重加权损失对预训练模型的最终分类层进行微调,以优先考虑代表性不足的类别。
- 重加权损失为少数类的损失贡献分配更高的权重,以抵消其样本稀缺性。
- 第一阶段完成后,使用标准交叉熵损失对整个模型进行第二阶段微调。
- 第一阶段期间,其余模型参数保持冻结,以保留预训练表示。
- 该方法在第二阶段充分利用模型容量,同时确保初始学习聚焦于类别不平衡问题。
- 该方法适用于多分类和二分类文本分类任务,且仅需极少的架构修改。
实验结果
研究问题
- RQ1两阶段微调策略能否提升长尾文本分类数据集中少数类的性能?
- RQ2与标准微调相比,使用类别平衡重加权损失进行初始微调是否能带来对代表性不足类别更优的表示学习?
- RQ3与标准微调和重加权损失微调相比,该方法在尾部类别性能方面表现如何?
- RQ4该两阶段策略在合成和真实世界类别不平衡文本分类任务中是否均有效?
- RQ5该方法是否能在第一阶段不微调整个模型的情况下实现更优性能?
主要发现
- 在合成的二分类和多分类文本分类数据集上,两阶段微调方法在尾部类别上的表现优于标准微调和重加权损失微调。
- 在ADME语义标注任务中,所提方法显著提升了少数类的F1分数,证明了其在真实世界应用中的有效性。
- 第一阶段的重加权损失有效保护了少数类,防止其在初始学习阶段被掩盖,从而实现更好的泛化能力。
- 该方法在保持头部类别高性能的同时,显著提升了尾部类别的性能,表明在类别分布上实现了平衡的改进。
- 消融实验确认两阶段过程至关重要,因为跳过第一阶段会导致少数类性能下降。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。