A Text Matching Method Integrating Decoupled Attention and Metric Learning
-
Abstract
Aiming at the problems of semantic sparseness and significant length difference in text matching task, a framework based on SBERT model, DeRankBERT, is proposed, which improves the SBERT model through three technologies.Firstly, the decoupling attention mechanism based on three path coding is used to independently model the content content, content position and position content relationships of words, so as to enhance the understanding ability of key semantic information.Secondly, a ranking loss function based on Euclidean distance is designed to optimize the SBERT network by using the ranking similarity tags of sample pairs, which can improve the consistency of semantic space and alleviate semantic sparsity through metric learning.Finally, the average pooling mechanism is used to replace CLS pooling.By averaging the word vectors to generate the global representation of sentences, the noise is effectively smoothed and the influence of text length is normalized. Experiments on several public datasets show that DeRankBERT performs well in text matching tasks.The ranking order of the predicted values of the model is highly consistent with that of the real values.Especially when dealing with texts with sparse semantics and significant length differences, DeRankBERT is significantly superior to the current mainstream methods and has strong robustness.
-
-