JUCS - Journal of Universal Computer Science 30(6): 779-790, doi: 10.3897/jucs.111217
A BERT-GRU Model for Measuring the Similarity of Arabic Text
expand article infoRakia Saidi, Fethi Jarray§, Didier Schwab|
‡ UTM University, Tunis, Tunisia§ Gabes University, Medenine, Tunisia| Univ. Grenoble Alpes, Grenoble, France
Open Access
Abstract
Semantic Textual Similarity (STS) aims to assess the semantic similarity between two pieces of text. As a challenging task in natural language processing, various approaches for STS in high-resource languages, such as English, have been proposed. In this paper, we are concerned with STS in low resource languages such as Arabic. A baseline approach for STS is based on vector embedding of the input text and application of similarity metric on the embedding space. In this contribution, we propose a cross-encoder neural network (Cross-BERT-GRU) to handle semantic similarity of Arabic sentences that benefits from both the strong contextual understanding of BERT and the sequential modeling capabilities of GRU. The architecture begins by inputting the BERT word embeddings for each word into a GRU cell to model long-term dependencies. Then, max pooling and average pooling are applied to the hidden outputs of the GRU cell, serving as the sentence -pair encoder. Finally, a softmax layer is utilized to predict the degree of similarity. The experiment results show a Spearman correlation coefficient of around 0.9 and that Cross-BERT-GRU outperforms the other BERT models in predicting the semantic textual similarity of Arabic sentences. The experimentation results also indicate that the performance improves by integrating data augmentation techniques.
Keywords
Semantic Similarity, Cross-Encoder, Data augmentation, Arabic text, GRU, BERT, Backtranslation