A game-based Mongolian neural machine translation method

By constructing a game-type Mongolian neural machine translation model, using generative adversarial network and REINFORCE strategy to optimize noise decoding, the problems of insufficient training and insufficient generalization ability caused by sparse data in Mongolian translation are solved, and the translation accuracy and efficiency are improved.

CN114818742BActive Publication Date: 2025-08-12INNER MONGOLIA UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210276166.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-21
Publication Date
2025-08-12
Estimated Expiration
2042-03-21

AI Technical Summary

Technical Problem

There is a problem of sparse data in Mongolian neural machine translation, which leads to insufficient training of translation models and insufficient generalization capabilities, especially when decoding unlogged words, affix deformation, grid additional components and special characters, low accuracy.

Method used

A game model based on a generative adversarial network is constructed, and the problematic factor affecting translation decoding is transformed through pseudo-data form is interference noise. Generator G, anti-jammer AJ and discriminator D are used for game training, and the parameters of generator G are optimized to improve the decoding ability of noise. The REINFORCE strategy and convolutional value iterative network are used to enhance the generalization ability of the translation model.

Benefits of technology

It improves the accuracy and efficiency of Mongolian translation, improves the decoding ability of adhesive components and special characters, and alleviates the problems of insufficient training and insufficient generalization ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114818742B_ABST
    Figure CN114818742B_ABST
Patent Text Reader

Abstract

A game-based Mongolian neural machine translation method converts problematic factors that affect translation decoding in Mongolian neural machine translation into interference noise in the form of pseudo data. A game model based on a generative adversarial network is constructed based on a noise interference strategy. The model consists of a generator G, an anti-interference device AJ, and a discriminator D. The model generalizes to the interference noise in the three-module game, improving the translation performance of the game model against this noise. During game training, the REINFORCE strategy is used to optimize the parameters of G to obtain training rewards for original data and noise data. The original corpus and pseudo corpus containing interference noise are trained using an adversarial training mechanism. AJ is used to determine the training priority of the noise data based on the judgment of the training data, so that G and D have sufficient decoding capabilities for the added interference noise. Finally, the trained G is used as the translation model for Mongolian translation. This invention can improve the accuracy and efficiency of Mongolian translation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of machine translation, and in particular relates to a game-based Mongolian neural machine translation method. Background Art

[0002] Mongolian neural machine translation uses deep learning to iteratively map Mongolian or Cyrillic Mongolian to other languages. This process involves preprocessing Mongolian text data, such as denoising and segmentation, to better represent and extract features within the translation model. Guided by a selected machine learning algorithm, the translation model establishes a data mapping relationship (model parameters) between the two languages. This mapping is then refined through multiple iterations of training, ultimately achieving good generalization capabilities for unknown test data.

[0003] Adversarial training is a generative adversarial network that uses a generator and a discriminator to find the optimal parameter state of the game model in game training of generated samples and standard samples. The generator G is used to generate predicted samples that can confuse the discriminator, while the discriminator D aims to find the difference between the predicted samples and the real samples as much as possible. When the training process reaches a Nash equilibrium, the game model converges to an optimal state. In this state, it is difficult for D to distinguish between the predicted samples generated by G and the real samples. The Nash equilibrium state refers to the two entities or variables in the game training process. The training strategy selection or update of any role does not affect the role's impact on the overall training. In this game training, each role is committed to maximizing its own expected benefits. In machine translation applications, this balance means that the reward between G and D is maximized and the loss is minimized. When each satisfies this training balance, the translation model satisfies the Nash equilibrium state and the game model tends to be optimal.

[0004] Mongolian machine translation has long been hampered by a lack of parallel corpora and resource scarcity, resulting in severe data sparsity in the data used to train translation models. Conventional deep neural networks are unable to address the decoding accuracy and efficiency challenges inherent in sparse data. In the specific case of Mongolian translation, this issue primarily manifests itself in the translation model's inability to accurately decode within a limited number of iterations, resulting in insufficient generalization for typical problems. Summary of the Invention

[0005] In order to overcome the shortcomings of the above-mentioned prior art, the purpose of the present invention is to provide a game-based Mongolian neural machine translation method to solve the long-standing problems in Mongolian translation tasks, such as insufficient training of translation models and insufficient generalization ability, as well as poor ability to analyze sequence structures, caused by data sparsity. By adopting a noise interference strategy and constructing a generative adversarial network, the overall decoding ability of the translation model is improved. With the help of game training, the translation model can improve its decoding ability of some adhesive components in Mongolian and additional components such as case and special characters, thereby improving the accuracy and efficiency of Mongolian translation.

[0006] In order to achieve the above object, the technical solution adopted by the present invention is:

[0007] A game-based Mongolian neural machine translation method comprises the following steps:

[0008] Step 1: Convert the problematic factors that affect the decoding of the Mongolian neural machine translation into interference noise in the form of pseudo data;

[0009] Step 2: For the machine translation task, a game model based on a generative adversarial network is constructed according to the noise interference strategy. The game model consists of three parts: a generator G, an anti-interference device AJ, and a discriminator D. The anti-interference device AJ is placed between the generator G and the discriminator D. The generator G aims to deceive the discriminator D into thinking that the output is the standard translation. The discriminator D aims to improve its identification ability to distinguish between the output of the generator G and the standard translation. The anti-interference device AJ aims to enable the interference noise sequence to be identified by the discriminator D during training.

[0010] Step 3: In the game training (i.e., the training of the game model), the REINFORCE strategy is used to optimize the parameters of the generator G to obtain the training value of the original data and the noise data. Then, the adversarial training mechanism is used to train the original corpus and the pseudo corpus containing interference noise. The obtained training value is used to further decide the training priority of the noise data according to AJ, so that the generators G and D have sufficient decoding capabilities for the added interference noise. Finally, the trained generator G is used as the translation model for Mongolian translation.

[0011] In step 1, problematic factors affecting translation decoding include unregistered words, affix deformations, case additions, pronouns, and special characters in the Mongolian corpus. By masking and replacing these problematic factors, a pseudo-corpus containing interference noise is formed, which has the same sequence structure and similar semantics as the original corpus. The noise interference strategy is to use an adversarial training mechanism to train decoding of the original corpus and the pseudo-corpus, and enhance the generalization ability of the added noise during the training process.

[0012] In step 2, a multi-layer perceptron model is used as the generator G, and a CNN is used to design and construct the discriminator D. The goal of the discriminator D is to perform binary classification on the translation decoded according to the interference noise and the standard translation.

[0013] The REINFORCE strategy is based on the REINFORCE algorithm. During the decoding process, the REINFORCE strategy is compared and mapped with the GAN training process: (1) First, the agent in the REINFORCE strategy is mapped to the generator G, thereby completing the interaction between the generator G and the state space s∈S; (2) The parameter state of the generator G is mapped to the REINFORCE strategy, and the action a∈A at each time step is used to complete the word y′ at the next time step. t (3) Map the evaluation index to the incentive function R(s,a) and calculate the reward of the sequence.

[0014] In step 2, the anti-interference device AJ is iteratively constructed based on the convolution value, and the REINFORCE strategy uses the sequence-level BLEU value reward as the corresponding decoding value. According to a dynamic value decision method, the training value of noisy data and normal data is determined, so that the training priority of the sample is obtained according to the reward value, and the samples with more noisy data and lower value are trained first.

[0015] The convolution value iteration is performed by providing the decoding state s of the current time step t t and action a t To encode the probability of the next state, that is, the current value is from s t The expected value of the sum of rewards obtained when starting to execute the REINFORCE policy, and the state is updated with the transition probabilities.

[0016] For the overall training of the game model, error backpropagation is used as the feedback method of the discriminator D to the generator G, so that the value iteration adapts to the feedforward calculation and parameter update of the game model.

[0017] In step 3, the training process of the game model is as follows:

[0018] Step 31: Before the formal encoding phase of the machine translation task, the generator G is pre-trained for translation using bilingual parallel corpora, and the discriminator D is pre-trained for binary classification.

[0019] Step 32, performing interference training on the generator G, where the generator G generates a series of noise output samples based on the embedded coding of the interference noise to deceive the discriminator D;

[0020] Step 33: Generator G decodes the encoded noise sequence according to the REINFORCE algorithm in the column search state space set in the form of hyperparameters and generates a corresponding noise reward. The reward is calculated based on the BLEU value of the current sequence.

[0021] Step 34: Use the anti-interference device AJ to perform anti-interference processing on the generated noise reward, that is, perform a reward value screening operation, and determine whether the current batch training corpus containing the interference noise sequence, i.e., the noisy sample, is eligible for further training based on the generated sequence value and the optimal value;

[0022] Step 35: The discriminator D classifies and discriminates the noisy samples generated by the generator G and passed through the anti-interference device AJ to avoid treating them as standard translations;

[0023] Step 36: Anti-interference adversarial training

[0024] The training target T of step 31-step 35 ~θ Expressed as the expected loss E of the training corpus (x, y) and the noisy sample generation process (x,y) and the expected loss of the anti-interference process E (x,y′) :

[0025] T ~θ =E (x,y) [logp D (x,y)]+E (x,y′) [log(1-p D (x,y′))]

[0026] Where (x, y′) is the noisy sample translation result generated by the generator G, p D (x, y) represents the binary classification function of the discriminator D. The entire anti-interference adversarial training objective is regarded as the maximum and minimum expected Nash equilibrium state, that is, the game of maximizing the discriminator D and minimizing the generator G.

[0027] In step 32, the input of each time step during the training of the generator G is the output of the sample generated in the previous time step, including the target sequence involved in the loss calculation;

[0028] In step 33, the BLEU values of the multiple candidate sets are used as rewards for translation model training to update and guide the training strategy;

[0029] In step 34, during each iteration of sequence decoding, the predicted value V of the previous time step is converted into t-1 Convolution is performed with the reward R to obtain the long-term value.

[0030] In the parameter optimization, the Monte Carlo sampling method is used to sample the intermediate states of Mongolian sequence decoding to obtain rewards for the intermediate states, thereby obtaining accurate sequence-level rewards.

[0031] Compared with the prior art, the present invention has the following beneficial effects:

[0032] This paper constructs a game model for Mongolian neural machine translation, enabling the translation model to generalize a series of noises in Mongolian machine translation through a game training mechanism. This training mechanism enables the game model to optimize the noise sequence during continuous iterative training, alleviating the drawbacks of insufficient training and insufficient generalization in Mongolian machine translation. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 The overall architecture for building a game model is shown.

[0034] Figure 2 A Mongolian noise structure diagram is shown.

[0035] Figure 3 The noise segmentation algorithm for Uighur Mongolian is shown.

[0036] Figure 4 The Mongolian noise jamming strategy is shown.

[0037] Figure 5 The overall training process of the Mongolian neural machine translation anti-interference game model is shown. DETAILED DESCRIPTION

[0038] The embodiments of the present invention are described in detail below with reference to the accompanying drawings and examples.

[0039] This paper presents a game-based Mongolian neural machine translation method for Mongolian language translation, specifically Traditional Mongolian and Cyrillic Mongolian. The method's key concept is to first transform typical problematic factors in Mongolian neural machine translation into noise using pseudo-data. It then constructs a sequential text-based game model for the machine translation task and optimizes the model parameters using the REINFORCE algorithm to ensure sufficient decoding capability against the added noise.

[0040] It mainly includes the following steps:

[0041] Step 1: The problematic factors that affect the decoding of the Mongolian neural machine translation are converted into trainable interference noise in the form of pseudo data, so that it can be effectively decoded during the training process.

[0042] Problems that affect translation decoding have long existed in Mongolian neural machine translation and are typical manifestations of poor decoding capabilities of translation models. These issues primarily include unidentified words, affixes, case additions, pronouns, and special characters in the Mongolian corpus. Data augmentation methods mask and replace these problematic factors, creating a pseudo-corpus with the same structure and similar semantics as the original corpus sequence (i.e., training data) but containing noise.

[0043] Step 2: For machine translation tasks, a game model based on generative adversarial networks (GANs) is constructed based on a noise interference strategy. The game model's architecture focuses on the decoding efficiency of interference noise, such as unregistered words or other special characters generated by various morphological changes when decoding Mongolian words. The game model's construction focuses on improving the translation model's decoding ability for various types of noise, rather than mitigating its consequences. The game model consists of three components: a generator G, an anti-interference controller AJ, and a discriminator D. Through the game between these three modules, the model generalizes to interference noise, thereby improving the game model's translation performance against these noises. The anti-interference controller AJ is placed between the generator G and the discriminator D. The generator G aims to deceive the discriminator D into believing that its output is the standard translation. Specifically, it aims to trick the discriminator D into believing that its predictions, even when decoded with interference noise, are the standard translation. The discriminator D aims to improve its ability to distinguish between the output of the generator G and the standard translation. Specifically, it aims to distinguish between the translation decoded by the generator G and the standard translation. The anti-interference device AJ is designed to enable the interference noise sequence to be identified by the discriminator D during training. That is, it enables the discriminator D to determine the priority of Mongolian noise sampling through the value discrimination mechanism, making the game training more targeted to the added interference noise, while solving the problem of low efficiency in the overall training process.

[0044] Among them, the noise interference strategy refers to using the adversarial training mechanism to train decoding of original corpus and pseudo corpus, and enhance the generalization ability of added noise during the training process.

[0045] The present invention adopts a multi-layer perceptron model as the generator G and adopts CNN to design and construct the discriminator D. The goal of the discriminator D is to perform binary classification on the decoding result of the interference noise through the generator G and the standard translation.

[0046] The game model of the present invention is described in detail as follows.

[0047] (a) Generator G

[0048] Considering the integration performance of the generator G in the GAN, a multi-layer perceptron (MLP) model is used as the generator G, and the REINFORCE algorithm is used as the corresponding optimization training strategy to solve the problem of long-term reward calculation and propagation difficulties in the GAN. The Markov decision characteristics are used to make decisions and state planning during the sequence decoding process. The REINFORCE strategy is based on the REINFORCE algorithm. During the decoding process, the REINFORCE strategy is compared and mapped with the GAN training process:

[0049] (1) First, map the agent in the REINFORCE strategy to the generator G, thereby completing the interaction between the generator G and the state space s∈S, as shown in the following table:

[0050]

[0051] (2) Map the parameter state of the generator G to the REINFORCE strategy, and use the action a∈A at each time step to complete the word y′ at the next time step t predictions.

[0052] (3) Map the evaluation index to the incentive function R(s,a) and calculate the reward of the sequence.

[0053] Therefore, the sequence decoding state is expressed as:

[0054] p θ (s t |s t-1 ,a)~p θ (y′ t |y′ t-1 ,h t ) (1)

[0055] A single word y′ in the sequence t The prediction process is expressed as:

[0056] y′ t =argmaxp θ (y|y′ t-1 ,h t ) (2)

[0057] Where y represents the target translation, h t represents the hidden state output at time step t, p θ Represents the predicted probability function of state transition.

[0058] (b) Anti-interference device AJ

[0059] To enhance the game model's sensitivity to interference noise, the training is based on the value iteration network in machine learning. Based on the characteristics of the generator G, the present invention constructs an anti-interference device AJ based on convolutional value iteration between the generator G and the discriminator D. The main differences from traditional value iteration are: ① The training reward mechanism is different. In the present invention, rewards are obtained by calculating sequence-level BLEU values. The anti-interference device AJ uses the sequence-level BLEU rewards generated by the generator G as input, that is, the corresponding decoding value, to generate a priority decision result for each sequence. ② Because the decoding results of noisy data correspond to lower BLEU values, the translations induced by noisy samples have lower rewards and corresponding values. This allows us to determine which noisy sequences can be decoded first within a limited training cycle and determine the training priority of the samples based on the reward value. The core function of the priority is to determine the priority of low-value noise samples for the discriminator D, so that noisy and low-value samples are trained first.

[0060] In the present invention, most interference noise sequences are mapped to lower sequence values due to their greater differences from the standard translation, so the noise sequences are also trained first.

[0061] The reward conversion mechanism of the anti-interference detector AJ of the present invention is different from the traditional value iteration network's processing of character-level rewards. It mainly converts the sequence-level BLEU rewards generated by reinforcement training, thereby generalizing sequence noise in adversarial training.

[0062] The convolution value iteration is achieved by providing the decoding state s at the current time step t t and action a t To encode the probability of the next state, that is, the current value is from s t The expected value of the sum of rewards obtained when starting to execute the REINFORCE policy, and the state is updated with the transition probabilities.

[0063] The present invention makes a strict mapping between the value iteration concept and the Markov decision process, so the specific implementation of its functions also involves the corresponding network architecture according to the corresponding modules in the value iteration.

[0064] For the overall training of the game model, the present invention adopts error back propagation as the feedback method of the discriminator D to the generator G, so that the value iteration adapts to the feedforward calculation and parameter update of the game training.

[0065] In order to obtain the above training structure, the present invention adopts a convolutional neural network structure (CNN) to simulate the value iteration module so that it can be trained in a traditional neural network manner in the overall training structure.

[0066] In the training iteration, the convolution operation is counted to calculate the value V produced by the sequence of the previous training time step (t-1) t-1 , then the operation corresponds to the S(s,a) function in the value iteration algorithm module, and the BLEU reward calculation after decoding the complete sequence corresponds to the activation function R(s,a), so the value iteration result corresponding to the convolution training is o t It can be expressed as:

[0067] o t =max a S(s,a) (3)

[0068]

[0069] The network structure constructed by the present invention has a certain temporal nature in the sequence decoding process, and the prediction probability P(s|s t-1 ,a) and the sequence reward R(s,a) are obtained through convolution and pooling to obtain the long-term output result of action a in state s.

[0070] Optionally, the pooling operation can be set to maximum pooling or mean pooling.

[0071] The value of a sequence of length N in training is obtained after N rounds of convolution and pooling operations (taking mean pooling as an example). The value of each batch size is calculated by the mean value of the sequence corresponding to the batch (V AJ =Average(V1,...,V batchsize )) is obtained, which represents the decoding cost of the current batch size.

[0072] Before conducting game training, in order to improve the efficiency of the overall training, a translation model (called a pre-training model) is pre-trained for the initial generator G in the game model.

[0073] For the generator G, the present invention iteratively trains the pre-trained model based on entropy loss. The decision value corresponding to the optimal state generated by pre-training is used as the initial threshold V * , the threshold is used to compare with the decision value generated in each round of training and generate the corresponding training decision. The specific decision logic is shown in formula (5). Optionally, for the generator G, V * The pre-trained model is derived from 100,000 training steps. Therefore, the anti-interference device AJ can make judgments based on the following conditions:

[0074]

[0075] This training decision is the main role of the anti-interference device AJ, that is, the interference noise enters the generator G, and then decodes and generates the corresponding value (V AJ ), then the anti-interference device AJ is based on V AJ Determine whether the current sample can enter the further training of the discriminator D, where V AJ Derived from REINFORCE strategy training.

[0076] Optionally, complete the corresponding training based on the anti-interference strategy designed above in the Tensorflow or Pytorch architecture.

[0077] (c) Discriminator D

[0078] In view of the high classification efficiency of CNN, the present invention adopts CNN to design and construct a discriminator D. The goal of the discriminator D is to perform binary classification on the translation decoded according to the interference noise and the standard translation.

[0079] Embed the Mongolian words into the matrix {s1,…,s N} and the target language word embedding matrix {t1,…,t N} is represented by S 1:N and T 1:N , and the embedding vector S of the decoded output 1:N and T 1:N Word concatenation is performed in units of k dimensions, and padding vectors are added to sequences that do not meet the length N. Feature k in the convolutional network * According to the convolution kernel w with width l j ∈R l×k Operation generation:

[0080] k j~max =max(k j1 ,…,k jN-l+1 ) (6)

[0081]

[0082] in represents a vector concatenation operation, and b is a deviation calculation quantity. Optionally, all nonlinear activation functions a′() in the present invention adopt ReLU.

[0083] In the actual Mongolian translation model training, the present invention optionally determines the final window size to use {"3×5"; "3×7"; "5×7"}, and sets the kernel matching the window size to extract local features. In addition, in the feedforward calculation of the vector, the Mongolian segment is embedded in c s and target side embedded c t Therefore, the output transition probability produced by G can be calculated by the conventional two-class task:

[0084] p D =sigmoid(T[c s ;c t ]), (8)

[0085] Where T represents c s and c t Flip the vectors and concatenate them into a two-dimensional embedding, which is used as the input to the sigmoid function.

[0086] Step 3, game training is to find the balance of game model training through game training of generator G and discriminator D. That is, generator G is used to generate prediction samples that can confuse discriminator D, and discriminator D, as the name suggests, tries to find the difference between the predicted samples and the real samples as much as possible. When the training process reaches a balance, the model converges to an optimal state. In this state, it is difficult for discriminator D to distinguish between the predicted samples and the real samples generated by generator G, thus achieving a game state between generator G and discriminator D.

[0087] In the training of the game model of the present invention, the REINFORCE strategy is used to optimize the parameters of the generator G to obtain the training values of the original data and the noise data. Then, the original corpus and the pseudo corpus containing interference noise are trained with the help of the adversarial training mechanism. The obtained training value is used to further determine the training priority of the noise data, so that the generator G can have sufficient decoding ability for the added interference noise. Finally, the trained generator G is used as the translation model for Mongolian translation.

[0088] Specifically, the training process is as follows:

[0089] Step 31, pre-training.

[0090] To ensure a well-trained parameter space and candidate search space, the generator G is pre-trained using bilingual parallel corpora before the formal encoding phase of the machine translation task. Unlike traditional GAN models, the discriminator D is also pre-trained for binary classification using a regression algorithm. For example, in this embodiment of the present invention, the generator G is pre-trained for 100,000 steps, and the discriminator D is pre-trained for 20,000 steps, and these are used as the initial parameter states of the encoder.

[0091] Step 32, interfere with the training generator G.

[0092] The generator G generates a series of noise output samples based on the embedded encoding of the interference noise to deceive the discriminator D. Unlike the conventional GAN model, during the training process of the generator G, the input of each time step is the output of the sample generated by the previous time step, including the target sequence involved in the loss calculation.

[0093] Step 33: noise reward calculation.

[0094] Generator G decodes the encoded noise sequence using the REINFORCE algorithm in a column search state space set as a hyperparameter and generates a corresponding noise reward. This reward is calculated based on the BLEU value of the current sequence. In a specific embodiment, to address the common gradient propagation difficulties of reinforcement training and GANs, the present invention uses the BLEU values of multiple candidate sets as rewards to update and guide translation model training.

[0095] Step 34, anti-interference.

[0096] The anti-interference device AJ is used to perform anti-interference processing on the generated noise reward, that is, to perform reward value screening operation, and to determine whether the current batch training corpus containing the interference noise sequence, i.e., the noisy sample, is qualified for further training based on the generated sequence value and the optimal value. During each iteration of sequence decoding, the predicted value V of the previous time step can be used to t-1 Convolution is performed with the reward R to obtain the long-term value.

[0097] When the value of the batch samples is calculated in the same way, the anti-interference device AJ can be filtered according to formula (5).

[0098] Step 35, identification.

[0099] The discriminator D classifies and discriminates the noisy samples generated by the generator G and passed through the anti-interference device AJ to avoid treating them as standard translations.

[0100] Step 36: Anti-interference adversarial training.

[0101] The training target T of step 31-step 35 ~θ Expressed as the expected loss E of the training corpus (x, y) and the noisy sample generation process (x,y) and the expected loss of the anti-interference process E (x,y′) :

[0102] T ~θ =E (x,y) [logp D (x,y)]+E (x,y′) [log(1-p D (x,y′))] (9)

[0103] Where (x, y′) is the noisy sample translation result generated by the generator G, p D(x, y) represents the binary classification function of the discriminator D. The entire anti-interference adversarial training objective is regarded as the maximum and minimum expected Nash equilibrium state, that is, the game of maximizing the discriminator D and minimizing the generator G. When the dominant strategies of the generator G and the discriminator D are satisfied at the same time, the overall anti-interference training reaches the Nash equilibrium state.

[0104] The noise sampling method of the present invention is to integrate the Monte Carlo sampling method into the constructed game model. The method is mainly based on a learning model and simulation strategy. In the current training state, multiple rounds of sampling are performed on each predicted action, so that each action will obtain a corresponding complete prediction sequence. In the game training constructed by the present invention, since Mongolian is an agglutinative language, there is a strong adhesion between the components of words, such as the connection between the stem and the affix or the changes in morphological structure such as the case during sequence decoding. Therefore, Monte Carlo is mainly used to sample the intermediate states of Mongolian sequence decoding to obtain rewards for the intermediate states, thereby obtaining accurate sequence-level rewards.

[0105] Specifically, the Monte Carlo sampling method uses a Monte Carlo search strategy to solve the typical error loss problem in traditional GAN translation models. The error loss is when the intermediate state of the translation model decodes and generates discrete data. The error loss signal of its parameters will have a large loss in the back propagation, making the training target T θ The translation model parameters θ are not differentiable.

[0106] Different from conventional machine learning methods, since the translation method of the present invention adds noise samples, the sample reward in decoding sampling comes from the joint reward of character-level sequence reward and sentence-level sequence reward.

[0107] The error loss is to transform the maximum probability target of G into the target of minimizing the loss:

[0108] Loss=E(x,y′)[log(1-p D (x,y′))] (10) where log(1-p D The input reward of (x,y′) consists of two parts: sentence-level R seq and character-level R char . Therefore the goal of gradient propagation is:

[0109]

[0110] The back propagation process is expressed as:

[0111]

[0112] Parameter optimization is backpropagated from the negative direction of the gradient, and l is the learning rate.

[0113] In one embodiment of the present invention, reference Figure 1 , which shows the processing flow of the entire training process of the present invention.

[0114] (1) Data cleaning.

[0115] First, we perform rough data processing on the Mongolian and target language parallel corpora. This rough processing primarily focuses on encoding the case components of the Mongolian corpus and processing some special components in Mongolian. This processing step also provides a preprocessing step for the subsequent addition of noise. Figure 2 Shows the special segmentation processing structure of Uighur Mongolian and its processing algorithm Figure 3 shown.

[0116] Secondly, noise is added to the processed corpus. The noise comes from decoding errors, additions, diacritical mark decoding errors, Mongolian agglutinative component connection errors and reference noise caused by the most common morphological changes in Mongolian translation tasks.

[0117] The specific operations are segmentation of Mongolian word roots and affixes, encoding and recording of Mongolian word components, and vocabulary annotation of some additional components and special characters.

[0118] The noisy corpus is divided into the following parts: original data, original data + suffix interference, original data + additional component interference, original data + affix interference + additional component interference.

[0119] (2) Generate interference noise

[0120] In the present invention, noise is divided into reference noise and other noise. Both types of noise are acquired in the same way, but have some targeted differences in technical solutions, so they are explained separately.

[0121] 1) Refers to noise

[0122] The original intention of the method is to hope that the translation model can effectively decode the interference noise, so the constructed noise sequence also participates in the translation model learning in the form of training data.

[0123] In this paper, reference noise refers to several major reference problems that occur during the Mongolian neural machine translation training process, including: missing reference, pronoun overlap, and inherent bias in reference relations.

[0124] For the missing and overlapping of pronouns, the present invention alleviates the overfitting problem caused by sparse data by increasing the number of translation model iterations, thereby solving the basic missing and overlapping problems.

[0125] To solve the problem of incorrect reference, the present invention first performs a simple tagging process on the constructed interference noise sequence. The tagging process does not require training and distinguishing the parts of speech one by one, but only needs to tag the position information of the referential words in the sequence.

[0126] The pronouns in the noise sequence are then masked or randomly replaced. This processing method ensures that the pronouns can be fully learned by the translation model without distortion.

[0127] Pseudo-sequence - alternative:

[0128] The corresponding Chinese sentence is: @The professor is very happy, her (his) (its) boyfriend bought her (his) (it) a gift and he (she) (it) always carries it with him. @

[0129] Pseudo sequence - mask:

[0130] The corresponding Chinese sentence is: @Professor is very happy, her (@mask@) boyfriend bought her (@mask@) a gift and he (@mask@) always carries it with him. @

[0131] In both noise-interference sequences, all pronouns are replaced by either the pronoun at the current position or the masking symbol @mask@. This bias towards the word "he" during translation decoding not only affects the decoding accuracy of the current word but also significantly impacts the logical reasoning of the entire sequence.

[0132] 2) Other noise

[0133] In addition to referential noise, the most common problems in Mongolian translation tasks include decoding errors caused by morphological changes, decoding errors of additional components and diacritical marks, and errors in the connection of Mongolian agglutinative components.

[0134] To generate interference noise sequences for Mongolian language data, the present invention first identifies and segments the original Mongolian language data by stem, affix, and additional component (primarily case components). By adding corresponding interference noise, the training data is divided into the following three categories: original data, original data + suffix interference, original data + additional component interference, and original data + affix interference + additional component interference.

[0135] Optionally, after multiple experiments, the present invention determines the effective ratio of the two interference sequences and the original sequence in the training process: when the noise data participating in the game training meets {original ~ 60%, mask ~ 20%, replacement 20%}, and in the game training, the two interference sequences are increased by 1% according to the convergence time point of each round of verification set, and the original sequence amount is reduced by 2%. Figure 4 The process of the mask encoding method for various interference noises according to the present invention is shown.

[0136] (3) Embedded training

[0137] The parallel corpus after rough processing in step (1) is trained with embedded vector representation. The present invention mainly adopts subword granularity and stem affix granularity processing, which can effectively alleviate the data sparsity problem in Mongolian neural translation on the one hand, and facilitate the extraction of noise on the other hand.

[0138] Optionally, this method primarily uses Fastext as an embedding training tool to determine the semantic association between different embedding units, providing a candidate search space for translation model decoding. To accommodate Mongolian's low resource requirements and polymorphic nature, this method, unlike traditional Fastext tools, imposes further constraints on vector space similarity during embedding training.

[0139] Optionally, the distribution of word vectors is reduced to a semantic relevance of 3 (generally, there is no limit for algorithms). This improvement can better adapt to the sparse distribution of Mongolian vector space and reduce the probability of unknown and low-frequency words.

[0140] (4) Pre-training

[0141] In order to ensure that a better parameter state is directly involved in game training, the present invention pre-trains the generator before formal training.

[0142] Optionally, the multilayer perceptron model is pre-trained for 100,000 training steps and three candidate models are retained for screening a translation model that is adaptable to noise.

[0143] (5) Anti-interference training

[0144] Figure 5 The functions of each module in game training are shown to construct the overall training process in machine translation. The multilayer perceptron mainly perceives the parameter status and makes an accurate mapping relationship based on the action space A, and then uses the training REINFORCE strategy to update the translation parameters.

[0145] After recording the corresponding exploration state, the BLEU score reward based on the prediction sequence and the standard sequence is obtained. The entire training target T θ The expectation can be expressed in terms of the sum of probabilities, i.e. the derivative of the logarithm, and thus as two expectations about the maximum and minimum:

[0146]

[0147] Since the generator G is not differentiable with respect to θ (θ represents the parameter set or current parameter state of the translation model), the present invention adopts the Monte Carlo discrete sampling method to solve the problem of non-transferable gradients in game model training, thereby treating the reward as a discrete function.

[0148] In the specific parameter state update, the sample distribution is used to estimate the gradient of each input. Since the actions in the state space are discrete and the rewards are sparse, a lot of noise will be generated during the decoding process. Therefore, the present invention regards this anti-interference adversarial training as a Markov decision process in a single state, that is, the generator G uses the preprocessed corpus to update the random hidden layer state and reward, the anti-interference device is used to evaluate the output of the generator G according to the reward generated by REINFORCE, and the discriminator D prioritizes the training of the current training sequence according to the evaluation results of AJ.

[0149] In addition, in order to prevent the mixed rewards at the character granularity and sequence level from causing the discriminator D to continue to receive negative feedback, the present invention chooses to alternately train the generator G and the discriminator D, uses the direction search sampling method for gradient calculation, and appropriately limits the weight of the discriminator D.

[0150] The core idea behind the relationship between reward and BLEU calculation is that predicted sequences with correct decoding noise efficiency and higher BLEU scores will generate higher rewards.

[0151] The anti-interference device AJ is a network structure based on convolutional value iteration constructed between G and D. The core function of this module is to give priority to the discriminator D to identify sequences with fewer rewards based on the rewards generated by the generator G, where fewer rewards correspond to inaccurate or poor noisy sequences.

[0152] The present invention focuses on two aspects of value when applying the specific method: the BLEU value V of the entire sequence Seq And the BLEU value V of the noisy character Noise :

[0153]

[0154]

[0155] V total =(1-α)V Seq +αV Noise (16)

[0156] Where Q() represents the value of action a in state s at time step t, and the reward R is obtained from G Seq / Noise (s,a) and transition probability P(), R Noise represents the character-level noisy reward, RSeq Represents the sequence-level reward. N represents the sequence length. The value of the sequence is obtained by accumulating the two rewards within the state. The total value V total Dynamically adjust V according to α Seq and V Noise Combined into a representative value, where α is the prediction accuracy of the translation model in the current training cycle, which is used to represent the value of the pre-trained model V * Compare to determine the current batch training priority. The optimal value is still updated according to the current optimal value in each round of iteration. The entire network structure is as follows Figure 5 shown.

Claims

1. A game-based Mongolian neural machine translation method, characterized in that: The steps include: Step 1: Convert the problematic factors that affect the decoding of the Mongolian neural machine translation into interference noise in the form of pseudo data; Step 2: For the machine translation task, a game model based on a generative adversarial network is constructed according to the noise interference strategy. The game model consists of three parts: a generator G, an anti-interference detector AJ, and a discriminator D. The anti-interference detector AJ is placed between the generator G and the discriminator D. The generator G aims to deceive the discriminator D into thinking that the output is a standard translation. The discriminator D aims to improve its identification ability to distinguish between the output of the generator G and the standard translation. The anti-interference detector AJ aims to enable the interference noise sequence to be identified by the discriminator D during training. A multi-layer perceptron model is used as the generator G, and a CNN is used to design and construct the discriminator D. The discriminator D's goal is to perform a binary classification between the translation decoded based on the interference noise and the standard translation. Step 3: In game training, the REINFORCE strategy is used to optimize the parameters of the generator G to obtain the training values of the original data and the noise data. Then, the adversarial training mechanism is used to train the original corpus and the pseudo corpus containing interference noise. The obtained training values are used to further determine the training priority of the noise data, so that the generators G and D have sufficient decoding capabilities for the added interference noise. Finally, the trained generator G is used as the translation model for Mongolian translation. Among them, for the generator G, the pre-training model is iteratively trained based on entropy loss, and the decision value corresponding to the optimal state generated by pre-training is used as the initial threshold V * , this threshold is used to compare with the decision value generated by each round of training and generate corresponding training decisions. The specific decision logic is shown in the following formula: The anti-interference device AJ makes a judgment based on the above formula, that is, the interference noise enters the generator G, and then decodes it to generate the corresponding value V AJ , anti-interference device AJ according to V AJ Determine whether the current sample can enter the further training of the discriminator D, where V AJ Derived from REINFORCE strategy training.

2. The game-based Mongolian neural machine translation method according to claim 1, characterized in that: In step 1, the problem factors that affect the decoding of the translation include unregistered words, affix deformations, case additions, pronouns, and special characters in the Mongolian corpus. By performing masking and replacement operations on the problem factors, a pseudo corpus containing interference noise with the same sequence structure and similar semantics as the original corpus is formed; The noise interference strategy refers to using an adversarial training mechanism to train decoding of the original corpus and pseudo corpus, and enhancing the generalization ability of added noise during the training process.

3. The game-based Mongolian neural machine translation method according to claim 1, characterized in that: The REINFORCE strategy is based on the REINFORCE algorithm. During the decoding process, the REINFORCE strategy is compared and mapped with the GAN training process: (1) First, the agent in the REINFORCE strategy is mapped to the generator G, thereby completing the interaction between the generator G and the state space s∈S; (2) The parameter state of the generator G is mapped to the REINFORCE strategy, and the action a∈A at each time step is used to complete the word y at the next time step. t ′ prediction; (3) Map the evaluation index to the incentive function R(s,a) and calculate the reward of the sequence.

4. The game-based Mongolian neural machine translation method according to claim 1, characterized in that: In step 2, the anti-interference device AJ is iteratively constructed based on the convolution value, and the REINFORCE strategy uses the sequence-level BLEU value reward as the corresponding decoding value. According to a dynamic value decision method, the training value of noisy data and normal data is determined, so that the training priority of the sample is obtained according to the reward value, and the samples with more noisy data and lower value are trained first.

5. The game-based Mongolian neural machine translation method according to claim 4, characterized in that: The convolution value iteration is performed by providing the decoding state s of the current time step t t and action a t To encode the probability of the next state, that is, the current value is from s t The expected value of the sum of rewards obtained when starting to execute the REINFORCE policy, and the state is updated with the transition probabilities.

6. The game-based Mongolian neural machine translation method according to claim 4, characterized in that: For the overall training of the game model, error backpropagation is used as the feedback method of the discriminator D to the generator G, so that the value iteration adapts to the feedforward calculation and parameter update of the game model.

7. The game-based Mongolian neural machine translation method according to claim 1, characterized in that: In step 3, the process of game training is as follows: Step 31: Before the formal encoding phase of the machine translation task, the generator G is pre-trained for translation using bilingual parallel corpora, and the discriminator D is pre-trained for binary classification. Step 32, performing interference training on the generator G, where the generator G generates a series of noise output samples based on the embedded coding of the interference noise to deceive the discriminator D; Step 33: Generator G decodes the encoded noise sequence according to the REINFORCE algorithm in the column search state space set in the form of hyperparameters and generates a corresponding noise reward. The reward is calculated based on the BLEU value of the current sequence. Step 34: Use the anti-interference device AJ to perform anti-interference processing on the generated noise reward, that is, perform a reward value screening operation, and determine whether the current batch training corpus containing the interference noise sequence, i.e., the noisy sample, is eligible for further training based on the generated sequence value and the optimal value; Step 35: The discriminator D classifies and discriminates the noisy samples generated by the generator G and passed through the anti-interference device AJ to avoid treating them as standard translations; Step 36: Anti-interference adversarial training The training target T of step 31-step 35 ~θ Expressed as the expected loss E of the training corpus (x, y) and the noisy sample generation process (x,y) and the expected loss of the anti-interference process E (x,y′) : T ~θ =E (x,y) [logp D (x,y)]+E (x,y′) [log(1-p D (x,y′))] Where (x, y′) is the noisy sample translation result generated by the generator G, p D (x, y) represents the binary classification function of the discriminator D. The entire anti-interference adversarial training objective is regarded as the maximum and minimum expected Nash equilibrium state, that is, the game of maximizing the discriminator D and minimizing the generator G.

8. The game-based Mongolian neural machine translation method according to claim 7, characterized in that: In step 32, the input of each time step during the training of the generator G is the output of the sample generated in the previous time step, including the target sequence involved in the loss calculation; In step 33, the BLEU values of the multiple candidate sets are used as rewards for translation model training to update and guide training; In step 34, during each iteration of sequence decoding, the predicted value V of the previous time step is converted into t-1 Convolution is performed with the reward R to obtain the long-term value.

9. The game-based Mongolian neural machine translation method according to claim 1, characterized in that: In the parameter optimization, the Monte Carlo sampling method is used to sample the intermediate states of Mongolian sequence decoding to obtain rewards for the intermediate states, thereby obtaining accurate sequence-level rewards.