arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2209.06344cs.CL
收藏

CNN-Trans-Enc:一种基于静态BERT表示的CNN增强转换编码器

CNN-Trans-Enc: A CNN-Enhanced Transformer-Encoder On Top Of Static BERT representations for Document Classification

University of Electronics Science and Technology of China(电子科技大学)

Charaf Eddine Benarab, Shenglin Gui

摘要:

BERT在文本分类任务中取得了显着的效果,它还没有得到充分利用,因为只有最后一层被用作下游分类器的表示输出。最近关于BERT学习的语言特征的研究表明,不同的层次关注不同类型的语言特征。我们提出了一种CNN增强的变换器编码器模型,该模型在所有层的固定BERT $[CLS]$表示上进行训练,采用卷积神经网络在变换器编码器内部生成QKV特征图,而不是将输入线性投影到嵌入空间中。CNN-Trans-Enc作为下游分类器相对较小,并且不需要对BERT进行任何微调,因为它确保了对所有层的$[CLS]$表示的最佳使用,利用不同的语言特征以及输入的更有意义和可推广的QKV表示。将BERT与CNN-Trans-Enc配合使用,可分别在IMDB和SST-5数据集上保持$98.9\%$和$94.8\%$的当前最先进性能,同时在YELP-5上使用$82.23$($8.9\%$改进)以及在Amazon-Polarity上使用$0.98\%$($0.2\%$改进)(对来自两个数据集的1 M样本子集进行K折交叉验证)获得新的最先进性能。在AG新闻数据集上,CNN-Trans-Enc实现了当前最先进的$99.94\%$,并在DBPedia-14上实现了新的顶级性能,平均精度为$99.51\%$。索引术语:文本分类,自然语言处理,卷积神经网络,Transformers,BERT

英文摘要:

BERT achieves remarkable results in text classification tasks, it is yet not fully exploited, since only the last layer is used as a representation output for downstream classifiers. The most recent studies on the nature of linguistic features learned by BERT, suggest that different layers focus on different kinds of linguistic features. We propose a CNN-Enhanced Transformer-Encoder model which is trained on top of fixed BERT $[CLS]$ representations from all layers, employing Convolutional Neural Networks to generate QKV feature maps inside the Transformer-Encoder, instead of linear projections of the input into the embedding space. CNN-Trans-Enc is relatively small as a downstream classifier and doesn't require any fine-tuning of BERT, as it ensures an optimal use of the $[CLS]$ representations from all layers, leveraging different linguistic features with more meaningful, and generalizable QKV representations of the input. Using BERT with CNN-Trans-Enc keeps $98.9\%$ and $94.8\%$ of current state-of-the-art performance on the IMDB and SST-5 datasets respectably, while obtaining new state-of-the-art on YELP-5 with $82.23$ ($8.9\%$ improvement), and on Amazon-Polarity with $0.98\%$ ($0.2\%$ improvement) (K-fold Cross Validation on a 1M sample subset from both datasets). On the AG news dataset CNN-Trans-Enc achieves $99.94\%$ of the current state-of-the-art, and achieves a new top performance with an average accuracy of $99.51\%$ on DBPedia-14. Index terms: Text Classification, Natural Language Processing, Convolutional Neural Networks, Transformers, BERT

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑