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

多层级注意力与对比学习增强的文本分类优化Transformer

Multi-Level Attention and Contrastive Learning for Enhanced Text Classification with an Optimized Transformer

Stevens Institute of Technology(史蒂文斯理工学院);San Francisco State University(旧金山州立大学);University of Minnesota(明尼苏达大学);The Chinese University of Hong Kong(香港中文大学);New York University(纽约大学)

Jia Gao, Guiran Liu, Binrong Zhu, Shicheng Zhou, Hongye Zheng, Xiaoxuan Liao

AI总结:

本文提出一种改进的Transformer文本分类模型,通过多层级注意力机制和对比学习增强语义建模,并设计轻量模块降低计算成本,在多个数据集上优于BiLSTM、CNN、标准Transformer和BERT,具有良好应用潜力。

摘要:

本文研究了一种基于改进Transformer的文本分类算法,以提高模型在文本分类任务中的性能和效率。针对传统Transformer模型在捕捉深层语义关系和优化计算复杂度方面的不足,本文引入了多层级注意力机制和对比学习策略。多层级注意力机制通过结合全局注意力和局部注意力,有效建模文本中的全局语义和局部特征;对比学习策略通过构造正负样本对,增强模型区分不同类别的能力,同时提升分类效果。此外,为了提高模型在大规模文本数据上的训练和推理效率,本文设计了一个轻量级模块,优化特征变换过程并降低计算成本。在数据集上的实验结果表明,改进的Transformer模型在分类准确率、F1分数和召回率方面优于BiLSTM、CNN、标准Transformer和BERT等对比模型,展现出更强的语义表示能力和泛化性能。本文提出的方法为文本分类领域的算法优化提供了新思路,具有良好的应用潜力和实用价值。未来工作将侧重于研究该模型在多类别不平衡数据集和跨领域任务上的表现,并探索与大型语言模型的集成。

英文摘要:

This paper studies a text classification algorithm based on an improved Transformer to improve the performance and efficiency of the model in text classification tasks. Aiming at the shortcomings of the traditional Transformer model in capturing deep semantic relationships and optimizing computational complexity, this paper introduces a multi-level attention mechanism and a contrastive learning strategy. The multi-level attention mechanism effectively models the global semantics and local features in the text by combining global attention with local attention; the contrastive learning strategy enhances the model's ability to distinguish between different categories by constructing positive and negative sample pairs while improving the classification effect. In addition, in order to improve the training and inference efficiency of the model on large-scale text data, this paper designs a lightweight module to optimize the feature transformation process and reduce the computational cost. Experimental results on the dataset show that the improved Transformer model outperforms the comparative models such as BiLSTM, CNN, standard Transformer, and BERT in terms of classification accuracy, F1 score, and recall rate, showing stronger semantic representation ability and generalization performance. The method proposed in this paper provides a new idea for algorithm optimization in the field of text classification and has good application potential and practical value. Future work will focus on studying the performance of this model in multi-category imbalanced datasets and cross-domain tasks and explore the integration wi

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

↑