CPC G06F 40/58 (2020.01) [G06F 40/284 (2020.01); G06N 3/045 (2023.01)] | 20 Claims |
1. A computer-implemented method, comprising:
storing, in computer main memory, an encoding comprising a tokenized vocabulary of a source language and a target language;
training, using the encoding, a forward neural model programmed for translating from the source language to the target language, a forward alignment layer that is programmatically coupled to the forward neural model, a backward neural model for translating from the target language to the source language, and a backward alignment layer that is programmatically coupled to the backward neural model,
storing, in computer main memory, a pairing comprising a source representation of a source sentence associated with the source language and a corresponding target representation of a target sentence associated with the target language;
extracting, based on the source representation and the target representation, forward attention logits from the forward alignment layer and backward attention logits from the backward alignment layer;
programmatically inferring a symmetrized attention matrix that jointly optimizes the likelihood of the pairing under the forward neural model and the backward neural model; and
generating and digitally storing, based on the symmetrized attention matrix, a plurality of first hard alignments between source words comprising source tokens in the source sentence and target words comprising target tokens in the target sentence.
|