[论文解读] RoBERTa-wwm-ext Fine-Tuning for Chinese Text Classification
本文提出使用四种不同的神经网络头(CNN、RNN、RCNN 和 DPCNN)对 RoBERTa-wwm-ext 进行微调,以实现对中文法律文本中合法与非法行为的分类。尽管模型架构复杂度有所提升,但在 6,755 个样本的法院记录数据集上,所有提出的模型在准确率和训练效率方面均未超过基线模型 RoBERTa-wwm-ext。
Bidirectional Encoder Representations from Transformers (BERT) have shown to be a promising way to dramatically improve the performance across various Natural Language Processing tasks [Devlin et al., 2019]. Meanwhile, progress made over the past few years by various Neural Net-work has also proved the effectiveness of Neural Network in the field of Natural Language Processing. In this project, RoBERTa-wwm-ext [Cui et al., 2019] pre-train language model was adopted and fine-tuned for Chinese text classification. The models were able to classify Chinese texts into two categories, containing descriptions of legal behavior and descriptions of illegal behavior. Four different models are also proposed in the paper. Those models will use RoBERTa-wwm-extas their embedding layer and feed the embedding into different neural networks. The motivation be-hind proposing these models is straightforward. By introducing complex output layer architecture, the overall performance of the models could be improved. All the models were trained on a data set derived from Chinese public court records, and the performance of different models were compared.The experiment shows that the performance of pro-posed models failed to beat the original RoBERTa-wwm-ext model in terms of accuracy and training efficiency.
研究动机与目标
- 通过以 RoBERTa-wwm-ext 作为基础编码器,提升中文文本分类性能,以检测网络中的非法行为。
- 探究在 RoBERTa-wwm-ext 上添加复杂神经网络头(CNN、RNN、RCNN、DPCNN)是否能提升分类准确率和训练效率。
- 优化超参数和文本预处理方法(如序列填充),以提升基于法院记录的中文文本分类模型性能。
- 从验证准确率和训练时间两个方面,将所提出的模型与 RoBERTa-wwm-ext 基线模型进行比较。
提出的方法
- 使用 6,755 个手动标注的中文法院记录数据集对 RoBERTa-wwm-ext 进行微调,数据集按 64% 训练集、16% 验证集和 20% 测试集划分。
- 在微调过程中未冻结任何层,将 RoBERTa-wwm-ext 作为嵌入层使用,充分利用其全词遮蔽机制和 RoBERTa 优化的训练策略。
- 将上下文嵌入输入到四种不同的分类头中:卷积核大小为 2、3、4 的 1D-CNN(每种大小各 100 个滤波器),具有 768 个隐藏单元的 BiLSTM,带有残差连接的 RCNN,以及带有堆叠卷积块的 DPCNN。
- 所有分类头均应用了 dropout(丢弃率 0.1),在 Tesla P100 GPU 上使用 CUDA 10.2 进行训练,批量大小为 64,共训练 10 个周期。
- 对超参数进行了优化,并应用了序列填充以处理可变长度输入。
- 通过验证准确率和不同批量大小(64 和 16)下的训练时间对模型进行评估。
实验结果
研究问题
- RQ1在 RoBERTa-wwm-ext 上添加复杂神经网络头(CNN、RNN、RCNN、DPCNN)是否能提升中文法律文本的分类准确率?
- RQ2所提出的模型是否能实现比 RoBERTa-wwm-ext 基线模型更快的训练时间?
- RQ3批量大小如何影响所提出模型的准确率和训练时间?
- RQ4RoBERTa-wwm-ext 作为基础编码器的性能是否足以优于更复杂的头架构?
- RQ5文本预处理(如序列填充)是否显著影响模型性能?
主要发现
- 基线模型 RoBERTa-wwm-ext 在批量大小为 64 时达到了最高的验证准确率 95.31%。
- 基于 RNN 的模型达到了 95.03% 的验证准确率,最接近基线模型,但仍表现较差。
- 基于 DPCNN 的模型验证准确率为 92.38%,为所有模型中最低,表明该架构性能较差。
- 各模型之间的训练时间差异极小,其中 RNN 模型耗时最长(10 个周期共 5 分 42 秒),DPCNN 最快(3 分 46 秒),但差异不显著。
- 将批量大小从 64 降低到 16 仅略微提升了准确率(如基线模型从 95.31% 提升至 96.58%),但导致训练时间显著延长(从约 4 分钟增至约 13 分钟)。
- 所有提出的模型在准确率或训练效率方面均未超过 RoBERTa-wwm-ext 基线模型,表明该预训练模型在本任务中的表征学习能力已达到最优。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。