# Deep Learning-Based English-Chinese Translation Research

Authors: Yao Huang; Yi Xin
Journal: Advances in Meteorology
 (2022)

---

## Abstract

Neural machine translation (NMT) has been bringing exciting news in the field of machine translation since its emergence. However, because NMT only employs single neural networks to convert natural languages, it suffers from two drawbacks in terms of reducing translation time: NMT is more sensitive to sentence length than statistical machine translation and the end-to-end implementation process fails to make explicit use of linguistic knowledge to improve translation performance. The network model performance of various deep learning machine translation tasks was constructed and compared in English-Chinese bilingual direction, and the defects of each network were solved by using an attention mechanism. The problems of gradient disappearance and gradient explosion are easy to occur in the recurrent neural network in the long-distance sequence. The short and long-term memory networks cannot reflect the information weight problems in long-distance sequences. In this study, through the comparison of examples, it is concluded that the introduction of an attention mechanism can improve the attention of context information in the process of model generation of the target language sequence, thus translating restore degree and fluency higher. This study proposes a neural machine translation method based on the divide-and-conquer strategy. Based on the idea of divide-and-conquer, this method identifies and extracts the longest noun phrase in a sentence and retains special identifiers or core words to form a sentence frame with the rest of the sentence. This method of translating the longest noun phrase and sentence frame separately by the neural machine translation system, and then recombining the translation, alleviates the poor performance of neural machine translation in long sentences. Experimental results show that the BLEU score of translation obtained by the proposed method has improved by 0.89 compared with the baseline method.


---

## Body

## 1. Introduction

Machine translation has been touted as a way to break down language barriers since the beginning of computers. Its fundamental concept is to employ the computer’s processing power and storage capacity to assist or replace translators in accomplishing difficult translation jobs, resulting in automatic language conversion [1]. People are accustomed to calling the language before translating the source language, and the translated language is therefore the target language.Machine translation is one of the most beautiful ideas of scientists and even mankind since the birth of computers. Under the urgent needs of world such as economic development and cultural exchange, machine translation is becoming more and more vibrant. Machine translation has experienced a tortuous development path, and numerous philosophers have devoted their efforts to it and made great progress. However, because of the current situation, there are still many problems to be solved in machine translation. The research of neural machine translation represents the combination of cognitive science and artificial intelligence. It uses the sequential to sequence model to transform the complex translation process into end-to-end, and at the same time, it also drives the research progress of other sequential to sequence tasks.Machine translation has both theoretical and practical values and has experienced considerable development since its inception. At present, the application of deep learning methods makes neural machine translation mainstream. The neural machine translation provides the following advantages over statistical machine translation:(1)
End-to-end learning does not depend on too many prior assumptions. In the era of statistical machine translation, model design makes more or fewer assumptions about the process of translation. The phrase-based models, for example, assume that both the source and target languages are sliced into sequences of phrases, with some alignment between them. This hypothesis has both advantages and disadvantages. On the one hand, the hypothesis draws on the relevant concepts of linguistics and helps the model to integrate them into prior human knowledge. On the other hand, the more assumptions there are, the more constrained the model is. If the assumptions are correct, the model can describe the problem well. But if the assumptions are wrong, then the patterns can be biased. Deep learning does not rely on prior knowledge nor does it require the manual design of features. The model learns directly from the mapping of input and output (end-to-end learning), which also avoids possible deviations caused by assumptions to a certain extent.(2)
The continuous space model of neural networks has a stronger representation ability. A basic problem in machine translation is how to represent a sentence. The statistical machine translation regards the process of sentence generation as the derivation of phrases or rules, which is essentially a symbol system in discrete space. Deep learning transforms traditional discrete-based representations into representations of continuous space. For example, a distributed representation of the real number space replaces the discrete word representation, and the entire sentence can be described as a vector of real numbers. Therefore, the translation problem can be described in continuous space, which greatly alleviates the dimension disaster of the traditional discrete space model. More importantly, the continuous space model can be optimized by gradient descent and other methods, which have good mathematical properties, and is easy to implement.However, the effect of machine translation is far from reaching that of human translation, and neural machine translation still has a long way to go. At present, the research of neural machine translation still faces many challenges and needs to be improved. Therefore, the research on neural machine translation has a high academic significance.With the advent of personal computers and the shift of translation memory tools for translators, machine translation has been applied in practice. In recent years, the trend is to combine some of the traditional methods of statistical machine translation (SMT) with those of neural networks or purely based on neural networks. In particular, the neural network-based end-to-end machine translation, which abandons the complicated procedures of traditional statistical machine translation, directly uses parallel corpus as input and output for end-to-end training, can better deal with the problem of long-distance dependence, and has become the mainstream of major companies and institutions. It has become a major research direction for decades to come.Theoretically, machine translation involves many disciplines and is a typical interdisciplinary research topic. Research on machine translation is of great theoretical significance and can help promote the development of linguistics, computational linguistics, artificial intelligence, machine learning, and even cognitive linguistics. In addition, the research on machine translation can facilitate the development of other natural language processing tasks, such as named entity recognition, emotion analysis, automatic text generation, and so on. In terms of application, no matter the public, government enterprises, or national institutions, machine translation technology is urgently needed. Machine translation plays an important role in many fields.Looking back on the history of translation, manual translation has been the mainstream way of translation since ancient times. However, with the growing maturity of computer technology and the rapid development of the Internet, machine translation technology has gradually entered the stage of history. Machine translation (MT), as the name implies, is a technology that uses the efficient computing power of computers to convert and express information between two languages [2]. Up to now, the development of MT technology has stepped from the stage of academic research to the stage of practical application. Machine translation is also the main force to promote the vigorous development of translation in the world.However, since NMT only uses a single neural network to translate the natural language, it has two disadvantages in reducing translation time: NMT is more sensitive to sentence length than statistical machine translation and the end-to-end implementation process is not clear. Use language knowledge to improve translation performance. We constructed the network model performance of various deep learning machine translation tasks and compared them in English and Chinese bilingual directions. The attention mechanism was used to solve the problem of gradient disappearance and gradient explosion in the recurrent neural network of long-distance sequences, which alleviated the problem of neural machine with the problems of translations that do not perform well in long sentences.


## 2. Related Work

The history of machine translation dates all the way back to the late ninth century. Arabian cryptographers invented the systematic language translation techniques used in modern machine translation, such as frequency analysis, probability and statistical information, and cryptanalysis [3]. Rene Descartes proposed a universal language in the late 1620s, which gave rise to the concept of machine translation [4, 5]. In 1956, the first conference on machine translation was held, ushering in a new era of machine translation research. Since then, scientists from all over the world have begun to investigate the machine translation technique. Although the Association for Machine Translation and Computational Linguistics (AMTCL) and the Advisory Committee on Automatic Language Processing (ALPAC) were founded concurrently in the United States, machine translation technology has made few advances in the decade since.In 1972, the Defense Research and Engineering Agency announced the successful translation of an English military manual into Vietnamese using its Logos machine translation system, reestablishing the feasibility of machine translation. Following this, several researchers made significant advancements in machine translation technology. In the late 1980s, the advancement of computer hardware quality resulted in a decrease in computing costs, and the emergence of various machine translation methods signaled the rapid advancement of machine translation, as well as the beginning of various machine translation contests. Machine translation evolved gradually from academic research to practical applications. From its inception to its development, machine translation has grown in popularity due to its tremendous research potential and commercial value.Hinton et al. proposed deep learning in 2006 [6], and since then, it has been quickly growing in the fields of image processing [7] and speech recognition [8]. In recent years, researchers have discovered that deep learning can help with statistical machine translation problems such as linear inseparability, a lack of proper semantic representation, difficulty in designing characteristics, making full use of the local context, data sparsity, and error propagation [9].Thus, the machine translation research based on deep learning has become a hot topic of research.At the moment, the combination of deep learning and machine translation mainly exists in two forms: first, take the advantages of deep learning and makeup statistics on the shortcomings of machine translation methods in key modules such as the language model [10], translation model [11], reordering model [12], and word alignment [13]; second, take the advantages of deep learning and makeup statistics on the shortcomings of machine translation methods in key modules such as the language model, translation model, reordering model, and word alignment. For example, the deep learning pioneer and the professor of the University of Montreal, Yoshua Bengio created a neural network-based language model in 2003, which effectively solves the problem of data sparsity that plagues the traditional methods. The neural machine translation (NMT) is totally based on the deep learning from start to finish. Machine translation professionals and scholars have given close attention to it because of its simple approach and unique methods, as well as its capacity to produce translations that are comparable to or even better than traditional methods. The end-to-end neural machine translation has come a long way in just a few years because of the combined efforts of academics from all over the world. It not only pioneered theories and methodologies but also outperformed competitors in bilingual translation tasks like English-French, English-German, and Chinese-English [14].Baidu claimed to have released the world’s first neural network translation system as early as 2015, and with the real development of neural network machine translation taking only one or two years, neural network machine translation quickly swept academic and industrial circles. In 2017, Brown et al. [15], a Google brain team researcher, proposed the transformer model, an entirely attention-based model. This is a novel architecture that is entirely based on the attentional mechanism and does not make use of recurrent neural networks. This has the advantage of allowing for direct extraction of global connections, as the attentional mechanism assumes that the distance between each input and output word is equal to one, whereas the recurrent neural network requires gradual recursion [16]. The transformer not only outperformed other existing algorithms in machine translation tasks but also significantly outperformed them in other language comprehension tasks. This model, on the other hand, performs poorly on smaller, more structured language comprehension tasks or on simple algorithmic tasks. As a result, Brown et al., a Google researcher, focused on the shortcomings of the transformer and extended it into a general computing model with a new and efficient time-parallel loop that outperformed the standard transformer in a wide variety of algorithm tasks as well as in a large number of large-scale language understanding tasks [17, 18].


## 3. Basic Principles of Deep Learning Translation

The language model is the basis of natural language processing. Its function is to express natural language into a mathematical form that can be processed by the computer. In 2003, Koehn et al. [19] first used a neural network to build a language model, which became the beginning of the application of neural networks in the field of natural language processing. Let V be the thesaurus, and for sentence Y=y1,y2,…,yT, the language model is approximately equal to a series of parameters θ such that the following formula is satisfied.(1)PY;θ=Py1,y2,…,yT;θ.The autoregressive language model is the essence of neural machine translation (NMT). In regressive language generation, the output words are decoded one by one, and the previous decoding results are used as input for decoding the current words. The mathematical model thus constructed is(2)PY|X;θ=∏t=1T+1Pyt|y0∼t−1,X;θ.In general, the maximum likelihood estimation method is used to train the autoregressive machine translation model, with the cross-entropy loss as the loss function. The following maximizing formula is used in the neural machine translation training process, whereN is the number of parallel corpus pairs.(3)LMLθ=1N∑n=1N∑t=1T+1logpytn|y0∼t−1n;θ.Greedy search means that when the model is decoded word by word, each word is selected with the maximum probability. If the output sequence of the decoder isY^=y^1,y^2,…,y^T, the process of yt output by greedy search of the decoder at time T is shown in the following formula, where V represents the target language word list.(4)y^t=argmaxy∈Vlogpy|y^0∼t−1,x1−T;θ.The beam search can alleviate the above problems to a certain extent and make the translation results closer to the global optimal. Different from greedy search, which selects the word with the largest generation probability at every moment, cluster search first determines a beamwidth, saves the results of the number of cluster widths in each decoding process, and selects them in order of probability. In essence, cluster search may be similar to greedy search, but cluster search expands the search space by caching candidate sequences of cluster width and selecting the one with the highest comprehensive probability as the output, thereby making the translation results more diverse and approaching the global optimal. Combined with the following formulas, the process of cluster search decoding is briefly explained here:(5)Ct−1=y˜0∼t−11,y˜0∼t−12,…,y˜0∼t−1K,Ct−1=y˜0∼t−11,y˜0∼t−12,…,y˜0∼t−1K=argsorty∈V∑t=0tlogpyt|y0∼t−1,x1∼T;θ,Y^=argmaxY1,…,YK1YαlogpY|X;θ,where Ct−1 is the input sentence, and Y^ is the output sequence of the decoder.Figure1 shows the machine translation process of a sequential model consisting of a two-layer cyclic network. It can be seen that words or sentences are parsed into vectors in a continuous space in the whole process. In this way, semantic connections between the words can be grasped, reflecting the advantages of neural networks.Figure 1
Sequence model of the two-layer cyclic network.The group in embedding is to divide each word in a sentence into groups according to certain or multiple grouping methods, after which each word in the sentence has its corresponding one or more groups.Set definition language based on minimum unit WordUnit = {word|char|letter|subword}, in which the smallest unit of English can be a word, letter, or subword (subword part of words can have an independent meaning, such as reproducing the “re”). The smallest unit of Chinese is a word or character. The smallest units of processing covered in this article are words. If each word in a sentence is divided into groups in a certain way, then all possible corresponding groups form a set GroupUnit = {group}. If not limited to the classification principle of one group, all possible corresponding groups can form multiple group units, namely, GroupUnit1 and GroupUnit2.Suppose that the sentenceS after the participle can be expressed as an ordered set, namely:(6)S=w1,w2,…,wt.Thewi∈WordUnit, I=1,2,…,T, for each corresponding word in the sentence.If the division mode of pair group isf, then(7)fS=g1,g2,…,gt.Gi∈GroupUnit, I=1,2,…,T, for each word in the sentence. Its subscripts correspond to the words in the original sentence S.The so-called embedding is the distributed representation of one_hot into a multidimensional continuous vector. The set of embeddings corresponding to different words represented by one_hot in WordUnit is(8)E=e1,e2,…,et,where EI∈E is a vector with dimension m. Each word WI has a corresponding m-dimensional continuous vector representation EI, which is commonly known as word embedding.The only difference between the deep learning model using group embedding and the common deep learning model is that the group embedding information and the word embedding of the original corpus are used as the input of the model. The input of the ordinary model without group embeddingg is the word embedding of each word in the sentence, namely:(9)Input=e1,e2,…,et.The input of the model using group embedding is(10)G_input=Ce1,g_e1,Ce2,g_e2,…,Cet,g_et.Functions such as Sigmoid have many advantages and are very suitable to be used as activation functions. Therefore, under the condition of not changing the activation function, the mean square error function can be replaced and cross-entropy can be used as the loss function. If cross-entropy is used as the loss function, the loss function for a certain word translation can be(11)Ciθ=−∑xiyxilna+1−yxiln1−a.In comparison to the mean square error function, cross-entropy training has a number of advantageous properties and has been widely used to train a variety of models.After preprocessing, each sentence with translation will have an end-of-sentence character. The translation is complete when the end-of-sentence character is encountered. The true length of a sentence is the distance between the first and last characters. Then, the result of the position decoding unit will undergo masking, and its loss function value will be excluded from the final sentence’s loss function value. The loss function for the entire sentence that needs to be translated is as follows:(12)C=1t∑i=1tCiθ.In the process of neural network training, multiple sentences are translated at a time, that is, one batch of sentences. Then, the loss function of a translation process can be expressed as(13)Loss=1n∑nC.As we know from the previous introduction, the loss function of the sentence to be translated is(14)C=1t∑i=1twiCiθ.To set the different weight of loss functions for words at different positions during training, a constant greater than 1 is introduced as a weight attenuation factor. Assuming that the sentence target translation length isT, the loss weight of the ith word is(15)Weight=1factor+i−1.


## 4. Experimental Results and Analysis

Based on the principle of comparative experiments on different network models, the software and hardware environment and other experimental parameters were set as invariable conditions in addition to the network model as the changing condition. This experiment uses Python3.7 in Ubuntu and is developed based on deep learning frameworks TensorFlow and Tensor2Tensor. The hardware is a single Nvidia TITAN GPU. Table1 provides some parameter settings.Table 1
Parameter settings.
The parameter typesParameterVocabulary size8000Word vector dimension512Batch size1024Network layer6Dropout0.2Vector0.1The optimizerAdamIt was decided to use the statistical machine translation model as the baseline system and compare it to the neural network model, both of which were developed in the same environment and with the same parameter settings as the baseline system. The attentional mechanism algorithm and the transformer model were added for comparison, and the recurrent neural network model (RNN), long and short-term memory network model (LSTM), and bidirectional recurrent neural network model (BiRNN) were built for training using the above parameters. The translation quality measuring index BLEU-4 was chosen as the basis for this study. This experiment yielded the results given in Table2.Table 2
BLEU-4 score table of the translation model.
ModelValTest 1Test 2The mavericks translation22.3422.0220.76RNN22.9422.2220.88LSTM23.5622.722.57BiRNN22.3722.2522.05RNN + attention25.4425.2424.56LSTM + attention26.3225.8425.69BiRNN + attention25.625.4325.52Transformer28.3827.9227.2The table provides the BLEU-4 score of this experiment. This experiment demonstrates the effectiveness of the machine translation model based on the deep learning neural network and obtains the performance of several networks in machine translation tasks according to the comparative experiment. The results obtained from the validation set and the two test sets show that the BLEU score of several neural network-based translation models exceeds the baseline system, and the transformer has the highest BLEU-4 score.The LTNN translation model outperformed all other models without an attention mechanism, followed by bidirectional and unidirectional recurrent neural network models. From the control group of the four networks incorporating an attention mechanism, each translation model’s performance improved significantly after incorporating an attention mechanism, and the addition of the attention mechanism significantly narrowed the gap with the baseline.From the aforementioned results, we can conclude that the transformer model is the best. To provide a reference for the following experimental parameters according to the data scale in this study, a parameter comparison experiment is designed based on the transformer model. This study mainly explores the influence of the thesaurus size setting on model performance. The experimental design is as follows: under the condition that other parameters remain unchanged, the thesaurus size is modified to 16000 and 32000, respectively, and two models are obtained based on transformer framework retraining and tested on two test sets, respectively, for comparison. The experimental results are given in Table3.Table 3
Word list size comparison experiment.
Vocabulary sizeValTest 1Test 2800028.3827.9227.21600020.4920.0529.273200026.5826.2225.56It can be seen from table that the model with a vocabulary size of 16000 has an average improvement of 2.3 points in BLEU-4 compared with the model with a vocabulary size of 8000, while the model with a vocabulary size of 32000 has a decrease of 1.67 points compared with the model with a vocabulary size of 8000. Figure2 shows a line chart, through which we can more intuitively see the influence of thesaurus size settings on model performance.Figure 2
BLEU-4 line chart.The following analysis can be obtained from the experimental results. The size of the word list has a certain effect on the performance of the neural machine translation model, but it does not increase linearly with the size of the word list. When the size of the word list exceeds a certain size, the model performance is reduced. The reason may be that the BPE algorithm for rare word processing has some limitations. For example, some illegal characters may be added to the word table when the set of the word table is too large, thus affecting the translation performance. Therefore, it can be concluded that adjusting the size of thesaurus appropriately in a certain range according to the size of the dataset is helpful to improve the performance of the model.As can be seen from Table4, after the loss weight of words at the beginning of a sequence is improved by using the loss function based on attenuation weight, the effect of translation can be improved to some extent by setting different attenuation factors’ values of weight. Compared with the traditional model using unweighted loss function, the BLEU score of the translation improved up to 1.63% (factor 2 or 3). The reason for the improvement is that the new loss function can make the model more inclined to translate the earlier words so that the information used in the later words is more accurate in the process of translation.Table 4
Experimental results of machine translation based on the attenuation weight loss function model.
BaselineFactor = 2Factor = 3Factor = 4BLEU score27.2427.4227.4227.33Improve the ratio—2.63%2.63%2.22%It can be seen from the results in Table5 that in the training set scale of 1000, 500, and 300 samples, the model using group embedding has a faster convergence speed. At the same time, in these three training sets, the fewer the training samples, the higher the accuracy of the model using group embedding compared with the ordinary model. The experimental results of English named entity recognition are represented by the radar diagram in Figure 3. Through the radar chart, we can more intuitively see the influence of thesaurus size settings on model performance.Table 5
Experimental results of Chinese sentiment analysis.
Training set size1000500300MethodsThe part of speech is embeddedBaselineThe part of speech is embeddedBaselineThe part of speech is embeddedBaselineTrain the number of iterations to the optimal5128111319The identification accuracy79.97%94.09%91.53%90.11%92.1%79.97%Figure 3
Experimental results of English NER.In addition, as given in Table6, the effect of named entity recognition is significantly enhanced when parts of speech information is embedded in the recognition process. Convenient improvement is most noticeable in the recall rate, which is particularly high. Because of the addition of group embedding information, the model is able to correctly identify a large number of previously unrecognized entities. Due to the overlap between the information required by a named entity recognition task and the results of parts of speech tagging, this is the case in the majority of cases. As a result, when used in conjunction with parts of speech information, group embedding can significantly improve the recognition effect in tasks such as named entity recognition.Table 6
Experimental results of English named entity recognition.
AccPreFlPOS (%)Baseline (%)POS (%)Baseline (%)POS (%)Baseline (%)PER84.3559.9582.4293.288.1859.85ORG95.4993.998.9290.1298.1991.95LoC89.5882.5882.9189.9289.4889.49MISC84.9899.4882.3598.8383.9498.95Overall83.1398.9888.8398.3885.498.53It is investigated in this study whether the multisequence coding approach and the traditional method are sensitive to sentence length. This is done by testing the source language sentences in the test dataset according to the distribution of sentence length and evaluating the translation separately. Figure4 shows the BLEU score of translation in the baseline and multisequence coding systems for different phrase length distributions of test data in the baseline and multisequence coding systems.Figure 4
Sentence length sensitivity of multisequence encoding and baseline method.In Figure4, it can be seen that when a sentence’s length exceeds 20, the translation quality of both the baseline and multisequence coding methods shows a significant decline in quality, as can be seen in the graph. The SEQ + POS method, SEQ + HEAD method, and SEQ + POS + HEAD method all resulted in a reduction of 16.07, 15.91, 16.07, and 18.30 points in the BLEU score of translation when compared to the baseline technique. In general, as the length of a phrase increases, the multisequence coding method outperforms the baseline method in terms of translation performance.This time, the quality evaluation efficiency of the three models was compared in order to better analyze their application value. The results of this comparison are shown in Figure5, which shows the results of the comparison.Figure 5
Quality evaluation efficiency of the three methods under different numbers of statements.In Figure5, it can be seen that no matter how many sentences are used, whether it is 1000 or 2000 or 3000 or 4000 or 6000, the quality assessment efficiency of the proposed model is significantly higher than that of the other two methods, while still maintaining the precision of the quality assessment. The highest efficiency in quality assessment is greater than 95% in some cases. It can, to a certain extent, demonstrate the viability of the model under consideration.


## 5. Conclusion

Artificial intelligence technology has exploded in popularity in recent years. It has made significant strides in the image, voice, and video fields. Although natural language processing is dubbed the crown jewel of artificial intelligence, it remains difficult to comprehend and process the natural language, and machine translation’s representative application is still far from ideal. The advent of deep learning is unquestionably a watershed moment for machine translation. While traditional neural machine translation models treat each word in the target language sentence equally, the current word’s decoding depends on the result of the previous word’s decoding. As a result, this study proposes an attenuating weight loss function, which assigns different weights to each word in the training set. The earlier a word is translated, the greater is its weight, and training tends to allow for accurate translation of the first word in order to ensure the accuracy of previous information when translating the subsequent word. While the coding model based on pos embedding improves the efficiency of translation model convergence, the translation effect is not significantly improved. However, the proposed coding model based on parts of speech embedding can significantly improve the performance of the two tasks of emotion analysis and named entity recognition. This result may be because translation requires a sizable corpus and linguistic knowledge of the parts of speech, so the information can be learned automatically during model training from a sizable corpus.



---

*Source: 3208167-2022-07-14.xml*