US 11,875,126 B2
Method, apparatus, device, and storage medium for training model and generating dialog
Min Yang, Shenzhen (CN); Wei Bi, Shenzhen (CN); Xiao Jiang Liu, Shenzhen (CN); Lei Chen, Shenzhen (CN); and Ting Ting Huang, Shenzhen (CN)
Assigned to SHENZHEN INSTITUTES OF ADVANCED TECHNOLOGY, CHINESE ACADEMY OF SCIENCES, Shenzhen (CN); and TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED, Shenzhen (CN)
Filed by SHENZHEN INSTITUTES OF ADVANCED TECHNOLOGY, CHINESE ACADEMY OF SCIENCES, Guangdong (CN); and TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED, Guangdong (CN)
Filed on Jul. 6, 2021, as Appl. No. 17/367,883.
Application 17/367,883 is a continuation of application No. PCT/CN2020/092701, filed on May 27, 2020.
Claims priority of application No. 201910470526.9 (CN), filed on May 31, 2019.
Prior Publication US 2021/0342551 A1, Nov. 4, 2021
Int. Cl. G06F 40/35 (2020.01); G06N 3/045 (2023.01); G06N 3/08 (2023.01); G06N 5/04 (2023.01)
CPC G06F 40/35 (2020.01) [G06N 3/045 (2023.01); G06N 3/08 (2013.01); G06N 5/04 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A method for training a dialog generation model, performed by a server, the method comprising:
acquiring a dialog data set, each piece of dialog data in the dialog data set that is used as a training sample comprising a post and an annotated response corresponding to the post;
encoding the post in the dialog data set by using an encoder in a dialog generation model to obtain a first encoded representation of the post;
fusing, by using a decoder in the dialog generation model, the first encoded representation of the post and knowledge information corresponding to the post, to obtain a predicted response corresponding to the post, the knowledge information being obtained from a knowledge base question answering model through transfer learning;
determining a value of a loss function of the dialog generation model based on the predicted response and the annotated response that corresponds to the post; and
updating a model parameter of the dialog generation model based on the value of the loss function.