# US 2021/0174019 A1 · Method, device and storage medium for training machine translation model

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0174019 A1
- Document ID: US20210174019A1
- Status: Published application
- Kind: A1
- Application number: 16/870,632
- Filed: 2020-05-08
- Published: 2021-06-10
- Earliest claimed: 2019-12-10
- Assignees: Beijing Xiaomi Mobile Software Co., Ltd.
- Applicants: Beijing Xiaomi Mobile Software Co., Ltd.
- Inventors: Jialiang JIANG; Xiang LI; Jianwei CUI
- Web page: https://patentgrep.com/patent/US20210174019A1

## CPC

- G06F 40/44: Statistical methods, e.g. probability models
- G06F 18/214: Generating training patterns; Bootstrap methods, e.g. bagging or boosting
- G06F 40/263: Language identification
- G06N 3/0455: Auto-encoder networks; Encoder-decoder networks
- G06N 3/08: Learning methods
- G06N 3/0895: Weakly supervised learning, e.g. semi-supervised or self-supervised learning
- G06N 3/09: Supervised learning
- G06N 3/044: Recurrent networks, e.g. Hopfield networks
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A method includes: a bidirectional translation model to be trained and training data are acquired, the training data including a source corpus and a target corpus corresponding to the source corpus; the bidirectional translation model is trained for N cycles, each cycle of training including a forward translation process of translating the source corpus into a pseudo target corpus and a reverse translation process of translating the pseudo target corpus into a pseudo source corpus and N being a positive integer greater than 1; a forward translation similarity and a reverse translation similarity are acquired; and when a sum of the forward translation similarity and the reverse translation similarity converges, it is determined that training of the bidirectional translation model is completed, where the training completed bidirectional translation model is used to perform translating.

## Claims

### Claim 1

A method for training a machine translation model, comprising:
acquiring a bidirectional translation model to be trained and training data, the training data comprising a source corpus and a target corpus corresponding to the source corpus;
training the bidirectional translation model for N cycles, each cycle of training comprising a forward translation process of translating the source corpus into a pseudo target corpus and a reverse translation process of translating the pseudo target corpus into a pseudo source corpus, and N being a positive integer greater than 1;
acquiring a forward translation similarity and a reverse translation similarity, the forward translation similarity being a similarity between the target corpus and the pseudo target corpus, and the reverse translation similarity being a similarity between the source corpus and the pseudo source corpus; and
when a sum of the forward translation similarity and the reverse translation similarity converges, determining that training of the bidirectional translation model is completed.

### Claim 2 (depends on 1)

The method of claim 1, wherein training the bidirectional translation model for N cycles comprises:
setting a reconstructor in the bidirectional translation model; and
implementing the reverse translation process through the reconstructor.

### Claim 3 (depends on 2)

The method of claim 2, wherein the training the bidirectional translation model for N cycles comprises:
acquiring, in the forward translation process, the pseudo target corpus through a differentiable sampling function.

### Claim 4 (depends on 3)

The method of claim 3, wherein the training the bidirectional translation model for N cycles further comprises:
acquiring, in an ith cycle of training, an error between the target corpus and the pseudo target corpus through the differentiable sampling function, i being a positive integer greater than or equal to 1 and less than N; and
regulating, in the (i+1)th cycle of training, one or more training parameters of the bidirectional translation model based on the error acquired in the ith cycle of training.

### Claim 5 (depends on 3)

The method of claim 3, wherein the differentiable sampling function comprises a Gumbel-Softmax function.

### Claim 6 (depends on 1)

The method of claim 1, wherein the acquiring the forward translation similarity and the reverse translation similarity comprises:
acquiring a value of a log-likelihood function of the target corpus and the pseudo target corpus, and a value of a log-likelihood function of the source corpus and the pseudo source corpus.

### Claim 7 (depends on 1)

The method of claim 1, wherein the training data is set with a first language label or a second language label, the training data set with the first language label is the source corpus and the training data set with the second language label is the target corpus, or, the training data set with the second language label is the source corpus and the training data set with the first language label is the target corpus.

### Claim 8

A device for training a machine translation model, comprising:
a processor; and
memory storing instructions executable by the processor,
wherein when the instructions are executed by the processor, the processor is configured to:
acquire a bidirectional translation model to be trained and training data, the training data comprising a source corpus and a target corpus corresponding to the source corpus;
train the bidirectional translation model for N cycles, each cycle of training comprising a forward translation process of translating the source corpus into a pseudo target corpus and a reverse translation process of translating the pseudo target corpus into a pseudo source corpus and N being a positive integer greater than 1;
acquire a forward translation similarity and a reverse translation similarity, the forward translation similarity being a similarity between the target corpus and the phony target corpus and the reverse translation similarity being a similarity between the source corpus and the phony source corpus; and
when a sum of the forward translation similarity and the reverse translation similarity converges, determine that training of the bidirectional translation model is completed.

### Claim 9 (depends on 8)

The device of claim 8, wherein the processor is further configured to set a reconstructor in the bidirectional translation model, and the reverse translation process is implemented through the reconstructor.

### Claim 10 (depends on 9)

The device of claim 9, wherein the processor is further configured to:
acquire, in the forward translation process, the pseudo target corpus through a differentiable sampling function.

### Claim 11 (depends on 10)

The device of claim 10, wherein the processor is further configured to:
acquire, in an ith cycle of training, an error between the target corpus and the pseudo target corpus through the differentiable sampling function, i being a positive integer greater than or equal to 1 and less than N; and
regulate, in the (i+1)th cycle of training, one or more training parameters of the bidirectional translation model based on the error acquired in the ith cycle of training.

### Claim 12 (depends on 10)

The device of claim 10, wherein the differentiable sampling function comprises a Gumbel-Softmax function.

### Claim 13 (depends on 8)

The device of claim 8, wherein the processor is further configured to:
acquire a value of a log-likelihood function of the target corpus and the pseudo target corpus and a value of a log-likelihood function of the source corpus and the pseudo source corpus.

### Claim 14 (depends on 8)

The device of claim 8, wherein the processor is further configured to:
set a first language label or a second language label for the training data, the training data set with the first language label is the source corpus and the training data set with the second language label is the target corpus, or, the training data set with the second language label is the source corpus and the training data set with the first language label is the target corpus.

### Claim 15

A non-transitory computer-readable storage medium having instructions stored therein for execution by one or more processors of a terminal to enable the terminal to execute a method for training machine translation model, the method comprising:
acquiring a bidirectional translation model to be trained and training data, the training data comprising a source corpus and a target corpus corresponding to the source corpus;
training the bidirectional translation model for N cycles, each cycle of training comprising a forward translation process of translating the source corpus into a pseudo target corpus and a reverse translation process of translating the pseudo target corpus into a pseudo source corpus and N being a positive integer greater than 1;
acquiring a forward translation similarity and a reverse translation similarity, the forward translation similarity being a similarity between the target corpus and the pseudo target corpus and the reverse translation similarity being a similarity between the source corpus and the pseudo source corpus; and
when a sum of the forward translation similarity and the reverse translation similarity converges, determining that training of the bidirectional translation model is completed.

### Claim 16 (depends on 15)

The non-transitory computer-readable storage medium of claim 15, wherein the training the bidirectional translation model for N cycles comprises:
setting a reconstructor in the bidirectional translation model;
implementing the reverse translation process through the reconstructor; and
acquiring, in the forward translation process, the pseudo target corpus through a differentiable sampling function.

### Claim 17 (depends on 16)

The non-transitory computer-readable storage medium of claim 16, wherein the training the bidirectional translation model for N cycles further comprises:
acquiring, in an ith cycle of training, an error between the target corpus and the pseudo target corpus through the differentiable sampling function, i being a positive integer greater than or equal to 1 and less than N; and
regulating, in the (i+1)th cycle of training, one or more training parameters of the bidirectional translation model based on the error acquired in the ith cycle of training.

### Claim 18 (depends on 16)

The non-transitory computer-readable storage medium of claim 16, wherein the differentiable sampling function comprises a Gumbel-Softmax function.

### Claim 19 (depends on 15)

The non-transitory computer-readable storage medium of claim 15, wherein the acquiring the forward translation similarity and the reverse translation similarity comprises:
acquiring a value of a log-likelihood function of the target corpus and the pseudo target corpus and a value of a log-likelihood function of the source corpus and the pseudo source corpus.

### Claim 20 (depends on 1)

A machine translation system implementing the method of claim 1, comprising one or more processing circuits configured to implement operations of the method, and at least one of a display screen and an audio component configured to output a translation result; wherein:
the reverse translation corpus is introduced into training to enrich corpuses, such that a model training efficiency is improved under condition of few resources for a minority language; and
with introduction of the bidirectional translation method, the reverse translation model is trained at the same time, to thereby improve quality of the reverse translation model.
