Neural Machine Translation with CARU-Embedding Layer and CARU-Gated Attention Layer

Sio-Kei Im,Ka-Hou Chan
DOI: https://doi.org/10.3390/math12070997
IF: 2.4
2024-03-28
Mathematics
Abstract:The attention mechanism performs well for the Neural Machine Translation (NMT) task, but heavily depends on the context vectors generated by the attention network to predict target words. This reliance raises the issue of long-term dependencies. Indeed, it is very common to combine predicates with postpositions in sentences, and the same predicate may have different meanings when combined with different postpositions. This usually poses an additional challenge to the NMT study. In this work, we observe that the embedding vectors of different target tokens can be classified by part-of-speech, thus we analyze the Natural Language Processing (NLP) related Content-Adaptive Recurrent Unit (CARU) unit and apply it to our attention model (CAAtt) and embedding layer (CAEmbed). By encoding the source sentence with the current decoded feature through the CARU, CAAtt is capable of achieving translation content-adaptive representations, which attention weights are contributed and enhanced by our proposed L1expNx normalization. Furthermore, CAEmbed aims to alleviate long-term dependencies in the target language through partial recurrent design, performing the feature extraction in a local perspective. Experiments on the WMT14, WMT17, and Multi30k translation tasks show that the proposed model achieves improvements in BLEU scores and enhancement of convergence over the attention-based plain NMT model. We also investigate the attention weights generated by the proposed approaches, which indicate that refinement over the different combinations of adposition can lead to different interpretations. Specifically, this work provides local attention to some specific phrases translated in our experiment. The results demonstrate that our approach is effective in improving performance and achieving a more reasonable attention distribution compared to the state-of-the-art models.
mathematics
What problem does this paper attempt to address?
This paper attempts to solve the long - term dependency problem in neural machine translation (NMT) and the problem of insufficient discrimination of context vectors. Specifically, the paper points out that when dealing with long sentences, the traditional attention mechanism leads to inaccurate translation predictions due to the high similarity of context vector generation. In addition, the paper also mentions that in natural language processing, different combinations of predicates and prepositions will lead to different semantic interpretations, which pose additional challenges to NMT research. To solve these problems, the author introduces a new content - adaptive recurrent unit (CARU) embedding layer (CAEmbed) and CARU - gated attention layer (CAAtt). The following are the main contributions of the paper: 1. **Dynamically adjust source representation**: The author proposes a CARU - gated attention layer (CAAtt), which dynamically adjusts and optimizes the source representation through partial translation. This helps to enhance the discrimination ability of context vectors, making them more effective in predicting the next target word. 2. **Improve the normalization method of attention weights**: To increase the convergence speed, the author introduces a new normalization method \( L_1(\exp(Nx)) \) and applies this method when calculating attention weights. Compared with the traditional Softmax function, this method provides a stronger gradient, especially when predicting multiple categories. 3. **Optimize word embedding**: To reduce the dependence on punctuation marks and increase the adaptability of relevant keywords, the author introduces an embedding layer (CAEmbed) combined with part of CARU. This method is especially suitable for non - English sentences, because the structure and grammar of these languages may be very different from English. It also helps to deal with languages that use prepositions extensively. 4. **Experimental verification**: The paper conducts experiments on the WMT14, WMT17 and Multi30k translation tasks. The results show that the proposed model is significantly superior to the traditional attention - based NMT model in terms of BLEU score and convergence speed. The generated attention weights and context vectors also indicate that this method can more accurately capture different interpretations brought by different preposition combinations and shows better performance when dealing with specific phrases. In summary, by introducing the CARU mechanism, this paper aims to improve the performance of NMT models in dealing with long sentences and complex semantic combinations, thereby improving translation quality and the robustness of the model.