# Multilingual Machine Translation System Based on Decoder Recurrent Neural Network

Authors: Fei Deng
Journal: Wireless Communications and Mobile Computing
 (2022)

---

## Abstract

In order to solve the problem that traditional machine translation cannot meet users’ needs due to its slow translation speed, an in-depth study on English translation model based on neural network was proposed. Firstly, three methods of model frame design, translation system design, and training frame design are studied. In order to improve the effectiveness and stability of the English translation model of recursive neural network, a model of English-Chinese machine translation system is designed. The system uses a knowledge-based context vector to map English and Chinese words, and uses a codec recursive neural network to achieve the results. After experiments and researches, the neural network can also efficiently deal with the long-distance reordering problem of multilanguage machine translation, which is difficult for statistical machine translation to deal with effectively. The neural network has opened a broad field of vision for machine translation research.


---

## Body

## 1. Introduction

A recursive neural network (RNN) model for English machine translation is designed based on an end-to-end encoder-decoder architecture, which enables machines to autonomously learn features, transform corpus data distribution into word vectors, and map source language and target language directly through the recursive neural network. Choosing semantic errors to construct the objective function during the training can balance the influence of each part of the semantic well and give full consideration to the alignment information, which provides a strong guidance for the training of deep recursive neural network. The purpose of the problem is that traditional translators use online translators as a means of communication and plan to use deep neural networks. Firstly, the model and algorithm of machine translation are analyzed, and the structure of machine translation system is proposed. In addition, the neural network machine translation model was used to design the machine online translation system. Through the continuous in-depth research on statistical machine translation (SMT), remarkable achievements have been achieved. However, there are still many problems, and the application of deep learning theory is urgently needed to solve the bad situation of statistical machine translation. Current research generally focuses on two things. One is to refine and improve key concepts through in-depth research on the basis of machine translation analysis. Second, end-to-end translation models are aimed at conveying meaning and language using neural networks. In the field of natural language processing, recurrent neural networks are widely used in translation. Besides other languages, Chinese also has many words. Improving the quality of Chinese translations is an important part of working in China. An English-Chinese translation model is developed that uses knowledge-based vectors to convey English-Chinese information and uses an encoder-decoder recurrent neural network. Figure1 is the structure diagram of the neural network model. The performance of the model based on the activation function is tested. The results show that the linear activation function of encoder layer and the hyperbolic tangent activation function of decoder layer have the best performance.Figure 1
Structure diagram of neural network model.


## 2. Literature Review

Gin et al. believe that translation is the conversion from one language to another, either sentence-by-sentence or word-by-word [1]. More information is gained in a sentence-by-sentence translation than in a word-by-word translation. Wang et al. put forward that Chinese is the language with the largest number of speakers; there are about 1.4 billion people in the world. Translations are longer than text or speech. Therefore, translation technology plays an important role in rapid communication [2]. Meanwhile, Kasim et al.’s machine translator is an open source, extensively trained, self-tuning, and self-adjusting model as new information is added. Machines can process multidimensional data as well as various kinds of data. Machine translation helps to save time, so people do not have to spend time looking for a dictionary to translate a sentence, which improves productivity [3]. Xing et al. have been suggested that in deep learning, feedforward neural networks have unique advantages and play an important role in solving various functions such as distribution. However, the capacity of feedforward neural networks is limited. The human brain contains energy, including energy, and functions only a small part of it [4]. According to Guang et al., not only can people identify patients, but also the reasons for accessing data correlations, which are rich in content, but the physical relationship of the data is very difficult, and the lengths of the data vary [5]. Chen et al. proposed that machine translation refers to the main research direction combining artificial intelligence and natural language processing, which uses computer operations to transform natural language into another language on the basis of preserving the original meaning, so as to achieve mutual translation between the two languages [6]. Selva et al. said that in the context of economic globalization in the modern world, with the continuous development of Internet technology, there are more and more frequent international exchanges, people in different countries who use different languages are more and more closely connected, and the demand for bilingual interaction in social work and life is more and more obvious [7]. Translation is the main method of equivalent transmission of information in different languages, which is particularly important. According to Jiang et al., for another translation from English to Hindi, feedforward and backpropagation artificial neural network is used. In terms of implementation, Java is adopted as the main programming language to realize all rules and modules except the neural network model, and it is implemented in Matlab [8]. According to Luo et al., this document contains setup information to provide machine learning algorithms for training. The main material of this study is English and Chinese continuous sentences. For all English sentences, some Chinese proverbs need to be properly trained and tested [9]. In the study of Jc et al., it indicates that the data is written in English and Chinese, up to 7 sentences in English and Chinese [10]. The dataset consisted of 4000 parallel sentences in English and Chinese. The dataset was divided into 4 : 1 ratios for training and testing.


## 3. Method

### 3.1. Model Frame Design

The recursive neural network is prone to the phenomenon of gradient explosion or disappearance. In the training process, this will lead to the inability to continuously send sequences with very long gradients in the training process and eventually make it difficult for the model to be captured for a long time [11]. As for the phenomenon of gradient explosion, the gradient threshold can be set scientifically and reasonably based on model parameter training. When the gradient exceeds the specified threshold, it can be directly intercepted. For the result of vanishing gradients, you can handle it well in several ways, namely, start to study the weights, make sure that the weights of all neurons do not choose as much height as the largest or smallest as possible, and avoid a lot of gradient vanishing; Sigmoid and TANH can be replaced by relu function as activation function. It is constructed by LSTM or GRU structural network model [12]. This process combines Nginx and a web server to improve the performance and reliability of the model. When multiple users send requests, Nginx can not only send the generated requests to the server but also manage multiple request sharing as needed, increase the maximum number of accesses, and prevent failures. The intermediate process is between the scheduled time and the in-memory database module. Data sent by the user is processed as an average over a predetermined period of time, and additional data is efficient and sent as fast as the data in memory [13]. On the basis of improving the level of module time control, the stability and efficiency of data transmission are guaranteed rented. The decoding layer includes GPU and CPU decoding modules. According to the multiconcurrency and hybrid decoding model, the concurrent model achieves high performance, reduces the slow response speed, and ensures high concurrency and low latency of the entire model. Linear activation function and hyperbolic tangent activation function are used in encoder and decoder, respectively, and SIGN function is used in attention layer to obtain the best accuracy [14]. With these configurations, 100 epochs have been performed, and the average error is 0.107. The error of the proposed recursive neural network-based machine translation method is relatively low. Experimental results show that this algorithm has better performance than traditional translation algorithms. Furthermore, considering communicative translation, this kind of translation has the advantage of being able to correctly capture the content of the sentence [15]. Probabilistic formula (1) of modeling translation based on neural network is expressed as follows:
(1)pYX=PYt.GRU LSTM and other nonlinear elements are applied to the neural network machine translation model, and the hidden state formula (2) ht is calculated based on the current input xt and the previous hidden state ht−1.
(2)ht=RNNht−1.In order to make full use of the information content, two New Year’s greetings are made with the words in the text. Put together the coded effects of different instructions to make it the final hidden state. Formula (3) of this process is expressed as follows:
(3)ht=⟶ht.The generation formula (4) of the target language through the decoder is as follows:
(4)q=gyt−1,ct,st.In the formula,q refers to the target side word tensor to be predicted, g refers to the nonlinear unit, st refers to the decoder side hidden states, and ct refers to the weighted sum of all hidden states at the source side [16]. The calculation method of ct and at is shown in the following formulas.
(5)ct=attentionst−1,h,(6)at=softmaxVaT.Demonstration of English translation based on neural connections is shown in Figure2.Figure 2
Neural network model framework for English machine translation.


### 3.2. Translation System Design Method

When explaining the subsystems of the design process, there are eight functional combinations. Modules such as Thorn Lexical Analysis and Shallow Syntax can identify words. The use of the match module example is based on the example. The sentence target generation module is the key point, that is, the output of target translation. The knowledge of translation is the knowledge of language rules, and it is also the process of converting real text words into a series of process words [17]. The parser system includes word processing not preincluded and identifies individual learning outcomes. Based on pos rules and statistics, pos rules are used to input pos array, and invalid pos information and morphology are removed from the whole sentence to create pos sequence. The part-of-speech tagging was counted, and the model parameters were extracted from the corpus to eliminate the part-of-speech and class ambiguity. The instance pattern matching machine translation method refers to the translation of English sentences by combining examples with patterns. If there are instance pairs in the library and the similarity between the input sentence and the source language is higher than the set threshold, the translation input sentence should be corrected and the sentence translated should be output, or the English sentence should be input using the pattern-based method [18]. If the matching is successful, the syntax generation is realized with the target pattern and phrase level goal, so as to realize the creation of sentence translation output. As shown in Figure 3, instance pattern matching of the coding state of the translation system can be promoted through the search tree. If the matching is not successful in the instance pattern, sentence pattern transformation can be realized by transformation, and in-depth analysis is conducted; finally, translation transformation and sentence generation can be realized.Figure 3
Translate system coding state.


### 3.3. Training Frame Design

The English translation model is constructed by the concept of componentization, so that the role of components in translation work can be measured quickly and effectively, and the joint training mode can be adopted in training to reflect the critical components.O,Q is used to represent corpus sentences; o,q stands for phrases or rules chosen based on corpus. To clarify sentences and phrases in general, sentences are represented by Ox and words are represented by Ox. Preliminary data usually includes monolingual sentences and bilingual prepositions and selection rules, and word vectors created by retraining the neural network are called neural recurrent networks for training. The number of local layers learned by a neural network is similar to a tree derivation for sentence generation. Training includes phrase encoder and encoding code [19]. The standard training framework selects a sentence or a rule for each sentence, first obtains the first word vector represented as a recurrent neural network, then represents the word vector as a recurrent neural network to obtain a representation vector Zf,Zt, and passes the sentence and the rule’s internal product similarity. The English translation model is generally divided into two parts: one is to obtain vector words through repeated neural networks and switch to standard translation neural network recursion; the other is divided into sentence encoders and variables according to translation model. Linguistic encoders and bilingual encoders: during the training, the monolingual encoders were pretrained step by step, then the bilingual encoders were trained, and finally, the key of each link was balanced through joint training. The standard model can measure Chinese sentences equivalent to English input. The model is designed from data-driven deep training. It learns and predicts the translated word of each given word through a multilayer neural network, transforming the word into a vector representation [20]. After tokenization, the RNN model has an embedding layer, which is the first layer of the encoder and decoder. To measure the automatic speech ability, the performance of GRU and LSTM layers is compared. The results show that GRU is better than LSTM, so the next layer is GRU layer. Hyperbolic tangent activation function is used to evaluate the attention mechanism, and Sigmoid function is used for attention layer activation function to achieve the best Chinese translation effect. Both the encoder and decoder GRU layers use linear and hyperbolic tangent activation functions because they have the lowest loss. Use English and Chinese sentences as input, and the mapping of English and Chinese is marked as attention weight, which represents the attention of Chinese tokenized sequence to English tokenized sequence, as shown in the following formula:
(7)Score=Sigmoid.Both encoder and decoder GRU layers use linear and hyperbolic tangent activation functions because they have the shortest downtime. Use English and Chinese sentences as input formula as follows:(8)Fx=exp2x−1exp2x+1.x is the linear activation formula (9) of the value of the sequence.
(9)Fxi=ωxi+b.The activation function Sigmoid is shown in the following formula:(10)Fx=11+exp−x.The activation function of Softmax and Sigmoid is shown in Figure4.Figure 4
The activation function of Softmax and Sigmoid.Machine translation has many advantages; it saves time, can translate many languages, and so on. In this paper, a design scheme of machine translation is proposed and implemented. Compared with other implementation methods in various studies, the proposed recursive neural network method provides better results. It will make contribution to the disposal of natural language of machine learning. When dealing with a large number of vocabularies, performance can be improved. And increasing the number of epochs can improve the accuracy. However, solving these problems requires a lot of energy and memory, which will be mentioned in future work. By making machine self-learning and communicating directly with natural language through intermediate connections, the translation problem has been transformed into a constructive problem of how to describe a particular generated language. On the basis of the encoder, the source sequence with initial and final identifiers is input into a vector file, which is then transmitted to the neural network together with the instruction background vector. In order to compare the influence of semantic feature vectors on the performance of the translation model and the effectiveness of the neural network, the baseline system was selected, that is, no semantic feature baseline was added and no recursive modeling baseline was selected. Figure5 shows the neural network test system. The latter implementation is the same as the recursive neural network English translation model, but the training does not need to consider the recursion of phrases or rules aligned to the target language side of the instruction source language. The semantic vector is constructed from left to right by source language and target language, and the baseline system of the latter also has bilingual semantic similarity. Experiments show that the machine online translation system based on deep neural network method can improve the translation quality and efficiency and meet the demand of large volume of translation.Figure 5
Neural network test system.


## 3.1. Model Frame Design

The recursive neural network is prone to the phenomenon of gradient explosion or disappearance. In the training process, this will lead to the inability to continuously send sequences with very long gradients in the training process and eventually make it difficult for the model to be captured for a long time [11]. As for the phenomenon of gradient explosion, the gradient threshold can be set scientifically and reasonably based on model parameter training. When the gradient exceeds the specified threshold, it can be directly intercepted. For the result of vanishing gradients, you can handle it well in several ways, namely, start to study the weights, make sure that the weights of all neurons do not choose as much height as the largest or smallest as possible, and avoid a lot of gradient vanishing; Sigmoid and TANH can be replaced by relu function as activation function. It is constructed by LSTM or GRU structural network model [12]. This process combines Nginx and a web server to improve the performance and reliability of the model. When multiple users send requests, Nginx can not only send the generated requests to the server but also manage multiple request sharing as needed, increase the maximum number of accesses, and prevent failures. The intermediate process is between the scheduled time and the in-memory database module. Data sent by the user is processed as an average over a predetermined period of time, and additional data is efficient and sent as fast as the data in memory [13]. On the basis of improving the level of module time control, the stability and efficiency of data transmission are guaranteed rented. The decoding layer includes GPU and CPU decoding modules. According to the multiconcurrency and hybrid decoding model, the concurrent model achieves high performance, reduces the slow response speed, and ensures high concurrency and low latency of the entire model. Linear activation function and hyperbolic tangent activation function are used in encoder and decoder, respectively, and SIGN function is used in attention layer to obtain the best accuracy [14]. With these configurations, 100 epochs have been performed, and the average error is 0.107. The error of the proposed recursive neural network-based machine translation method is relatively low. Experimental results show that this algorithm has better performance than traditional translation algorithms. Furthermore, considering communicative translation, this kind of translation has the advantage of being able to correctly capture the content of the sentence [15]. Probabilistic formula (1) of modeling translation based on neural network is expressed as follows:
(1)pYX=PYt.GRU LSTM and other nonlinear elements are applied to the neural network machine translation model, and the hidden state formula (2) ht is calculated based on the current input xt and the previous hidden state ht−1.
(2)ht=RNNht−1.In order to make full use of the information content, two New Year’s greetings are made with the words in the text. Put together the coded effects of different instructions to make it the final hidden state. Formula (3) of this process is expressed as follows:
(3)ht=⟶ht.The generation formula (4) of the target language through the decoder is as follows:
(4)q=gyt−1,ct,st.In the formula,q refers to the target side word tensor to be predicted, g refers to the nonlinear unit, st refers to the decoder side hidden states, and ct refers to the weighted sum of all hidden states at the source side [16]. The calculation method of ct and at is shown in the following formulas.
(5)ct=attentionst−1,h,(6)at=softmaxVaT.Demonstration of English translation based on neural connections is shown in Figure2.Figure 2
Neural network model framework for English machine translation.


## 3.2. Translation System Design Method

When explaining the subsystems of the design process, there are eight functional combinations. Modules such as Thorn Lexical Analysis and Shallow Syntax can identify words. The use of the match module example is based on the example. The sentence target generation module is the key point, that is, the output of target translation. The knowledge of translation is the knowledge of language rules, and it is also the process of converting real text words into a series of process words [17]. The parser system includes word processing not preincluded and identifies individual learning outcomes. Based on pos rules and statistics, pos rules are used to input pos array, and invalid pos information and morphology are removed from the whole sentence to create pos sequence. The part-of-speech tagging was counted, and the model parameters were extracted from the corpus to eliminate the part-of-speech and class ambiguity. The instance pattern matching machine translation method refers to the translation of English sentences by combining examples with patterns. If there are instance pairs in the library and the similarity between the input sentence and the source language is higher than the set threshold, the translation input sentence should be corrected and the sentence translated should be output, or the English sentence should be input using the pattern-based method [18]. If the matching is successful, the syntax generation is realized with the target pattern and phrase level goal, so as to realize the creation of sentence translation output. As shown in Figure 3, instance pattern matching of the coding state of the translation system can be promoted through the search tree. If the matching is not successful in the instance pattern, sentence pattern transformation can be realized by transformation, and in-depth analysis is conducted; finally, translation transformation and sentence generation can be realized.Figure 3
Translate system coding state.


## 3.3. Training Frame Design

The English translation model is constructed by the concept of componentization, so that the role of components in translation work can be measured quickly and effectively, and the joint training mode can be adopted in training to reflect the critical components.O,Q is used to represent corpus sentences; o,q stands for phrases or rules chosen based on corpus. To clarify sentences and phrases in general, sentences are represented by Ox and words are represented by Ox. Preliminary data usually includes monolingual sentences and bilingual prepositions and selection rules, and word vectors created by retraining the neural network are called neural recurrent networks for training. The number of local layers learned by a neural network is similar to a tree derivation for sentence generation. Training includes phrase encoder and encoding code [19]. The standard training framework selects a sentence or a rule for each sentence, first obtains the first word vector represented as a recurrent neural network, then represents the word vector as a recurrent neural network to obtain a representation vector Zf,Zt, and passes the sentence and the rule’s internal product similarity. The English translation model is generally divided into two parts: one is to obtain vector words through repeated neural networks and switch to standard translation neural network recursion; the other is divided into sentence encoders and variables according to translation model. Linguistic encoders and bilingual encoders: during the training, the monolingual encoders were pretrained step by step, then the bilingual encoders were trained, and finally, the key of each link was balanced through joint training. The standard model can measure Chinese sentences equivalent to English input. The model is designed from data-driven deep training. It learns and predicts the translated word of each given word through a multilayer neural network, transforming the word into a vector representation [20]. After tokenization, the RNN model has an embedding layer, which is the first layer of the encoder and decoder. To measure the automatic speech ability, the performance of GRU and LSTM layers is compared. The results show that GRU is better than LSTM, so the next layer is GRU layer. Hyperbolic tangent activation function is used to evaluate the attention mechanism, and Sigmoid function is used for attention layer activation function to achieve the best Chinese translation effect. Both the encoder and decoder GRU layers use linear and hyperbolic tangent activation functions because they have the lowest loss. Use English and Chinese sentences as input, and the mapping of English and Chinese is marked as attention weight, which represents the attention of Chinese tokenized sequence to English tokenized sequence, as shown in the following formula:
(7)Score=Sigmoid.Both encoder and decoder GRU layers use linear and hyperbolic tangent activation functions because they have the shortest downtime. Use English and Chinese sentences as input formula as follows:(8)Fx=exp2x−1exp2x+1.x is the linear activation formula (9) of the value of the sequence.
(9)Fxi=ωxi+b.The activation function Sigmoid is shown in the following formula:(10)Fx=11+exp−x.The activation function of Softmax and Sigmoid is shown in Figure4.Figure 4
The activation function of Softmax and Sigmoid.Machine translation has many advantages; it saves time, can translate many languages, and so on. In this paper, a design scheme of machine translation is proposed and implemented. Compared with other implementation methods in various studies, the proposed recursive neural network method provides better results. It will make contribution to the disposal of natural language of machine learning. When dealing with a large number of vocabularies, performance can be improved. And increasing the number of epochs can improve the accuracy. However, solving these problems requires a lot of energy and memory, which will be mentioned in future work. By making machine self-learning and communicating directly with natural language through intermediate connections, the translation problem has been transformed into a constructive problem of how to describe a particular generated language. On the basis of the encoder, the source sequence with initial and final identifiers is input into a vector file, which is then transmitted to the neural network together with the instruction background vector. In order to compare the influence of semantic feature vectors on the performance of the translation model and the effectiveness of the neural network, the baseline system was selected, that is, no semantic feature baseline was added and no recursive modeling baseline was selected. Figure5 shows the neural network test system. The latter implementation is the same as the recursive neural network English translation model, but the training does not need to consider the recursion of phrases or rules aligned to the target language side of the instruction source language. The semantic vector is constructed from left to right by source language and target language, and the baseline system of the latter also has bilingual semantic similarity. Experiments show that the machine online translation system based on deep neural network method can improve the translation quality and efficiency and meet the demand of large volume of translation.Figure 5
Neural network test system.


## 4. Result and Analysis

Machine translation is not only the conversion of one language string to another language string. It is also the semantically equivalent representation of the semantics spoken in one language and the semantics spoken in another language. Routine testing usually depends on the complexity of the translation. Other evaluation methods integrate language knowledge base to improve the evaluation quality of translation. In essence, these comprehensive methods of integrating language knowledge increase the evaluation proportion of semantic knowledge and are more in line with the essence of translation evaluation. Word vector can express rich semantic and linguistic structure information, which is a relatively ideal semantic representation method. Abstract effective features with neural network or use neural network model for translation evaluation has become a hot research topic. The main feature of character-level neural machine translation is to take character subwords as the basic unit of translation, which can avoid the problem of unknown words to a certain extent. Therefore, there is no limit on the size of translation dictionary. The main feature of multilanguage neural machine translation is to expand the one-to-one translation model into one-to-many, many-to-one, or many-to-many translation model. At present, it is mainly aimed at the translation between western pinyin characters. The basic unit of translation can be the word subword, etc. When the subword is adopted, the open dictionary translation can be realized. A total of 100 epochs were used to evaluate the minimum error of each epoch, which was divided into two parts, as shown in Figure6. Most neural machine translation models were realized by cyclic neural networks.Figure 6
Performance improvement.Designing effective features plays an important role in machine translation evaluation. The adopted features range from simple language-independent basic features to higher-level features based on language structures. Such artificial features are domain-dependent, vary in application across different data sets and languages, and largely ignore contextual information. Features obtained by neural network training include continuous spatial language model features, word vector features obtained by large-scale monolingual corpus training, similarity between target language words and source language words calculated by word alignment and word representation, etc. These characteristics are obtained through unsupervised training; simple, effective, and adaptable translation evaluation plays a guiding role in the research of machine translation and is an important research direction of machine translation. How to combine the advantages of neural network to construct a new evaluation method and make the automatic evaluation results more consistent with the evaluation of translation quality by human experts is the important goal for machine translation evaluation.


## 5. Conclusion

To sum up, this paper constructs an English translation model based on recursive neural network, which conforms to translation requirements and processes. The neural network is guided by alignment to generate structural information attached to source language and target language, in which word vector with global information and bilingual alignment information is fully considered during training. The most representative bilingual corpus was selected for training, and the effectiveness of the model was proved by multiple test data. Based on the experimental results, it is concluded that the English translation model based on recursive neural network is highly effective and stable and improves the BLEU score by about 1.51-1.86 compared with the baseline system. It also makes a preliminary analysis of machine translation technology based on deep neural network learning and realizes the creation of prototype system through research ideas. Based on the case and experiment to verify the feasibility of the technical ideas, the use of this technology in translation can innovate the retrieval technology of cross-language information in China and has a wide range of industrial application value and social value to achieve barrier-free communication between different languages is the dream of the early invention of computer. After more than 60 years of development, from rule-based machine translation to statistically based machine translation, to the current neuromachine translation, on the whole, people’s intervention in the translation process has been constantly reduced. In terms of translation effect, the translation quality of neural machine translation is better under the same conditions, and there is still a lot of room for improvement. Neural network can also efficiently deal with the long-distance reordering problem of multilanguage machine translation, which is difficult for statistical machine translation to deal with effectively. Neural network has opened a broad field of vision for machine translation research. Neural machine translation (NMT) represents a brand new machine translation model, which gradually shows a trend to surpass statistical machine translation in some languages. Although this method has some shortcomings in model architecture training algorithm interpretation and other aspects, it will definitely become the development direction of machine translation in the future.



---

*Source: 9714800-2022-08-26.xml*