CPC G06F 40/289 (2020.01) [G06N 20/00 (2019.01)] | 16 Claims |
1. A method for acquiring a pre-trained model, comprising:
adding, in a process of training a pre-trained model using training sentences, a learning objective corresponding to syntactic information for a self-attention module in the pre-trained model; and
training the pre-trained model according to the learning objective,
wherein the learning objective may comprise one or both of a first learning objective and a second learning objective,
wherein the first learning objective indicates that:
for any term x in the training sentence, a first weight corresponding to the term x is required to be greater than a second weight; the first weight is an attention weight between the term x and any term y which is associated with the term x through a direct path in a dependency tree corresponding to the training sentence, and the second weight is an attention weight between the term x and any term z which is associated with the term x through a weak path or is not associated therewith through a path in the dependency tree.
|