CPC G06F 40/44 (2020.01) [G06F 18/214 (2023.01); G06F 40/263 (2020.01); G06N 3/08 (2013.01)] | 15 Claims |
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 by the machine translation model and a reverse translation process of translating the pseudo target corpus into a pseudo source corpus by the machine translation model, 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, wherein the sum of the forward translation similarity and the reverse translation similarity converges indicates the sum of the forward translation similarity and the reverse translation similarity approaches a value,
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;
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.
|