CN-110796232-B - Attribute prediction model training method, attribute prediction method and electronic equipment
Abstract
The disclosure provides a training method of an attribute prediction model, an attribute prediction method, a model, a device, a medium and electronic equipment, and mainly relates to the technical field of transfer learning in artificial intelligence. The method comprises the steps of obtaining source domain data, training an initial neural network by utilizing the source domain data to obtain a source domain behavior representation model, freezing parameters of the source domain behavior representation model, inserting a fine tuning network layer into the source domain behavior representation model, obtaining target domain data, wherein the target domain data comprises a behavior sequence of a sample object in a source domain and an attribute tag in a target domain, and training the source domain behavior representation model with the fine tuning network layer by utilizing the target domain data to obtain an attribute prediction model aiming at the target domain. The method can effectively transfer the behavior characteristics in the source domain to the target domain, reduce the parameter adjustment quantity and improve the model training effect.
Inventors
- YUAN FAJIE
- HE XIANGNAN
- Xu Zhezhao
- XIONG JIAN
- KONG BEIBEI
- ZHANG LIGUANG
- XIONG YILIN
Assignees
- 腾讯科技(深圳)有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20191012
Claims (15)
- 1. A method for training an attribute prediction model, comprising: acquiring source domain data, wherein the source domain data comprises a behavior sequence of a sample object in a source domain, the source domain represents an application program, the behavior sequence is a click behavior sequence of the sample object on content in the application program, and the click behavior sequence comprises at least one behavior data of browsing records, scores, praise and forwarding; performing unsupervised learning training on the initial neural network by using the source domain data to obtain a source domain behavior characterization model, wherein the source domain behavior characterization model is used for characterizing behavior habits of the sample object in the application program; freezing all network parameters of the source domain behavior characterization model, and inserting a plurality of fine tuning network layers at equal intervals among a plurality of convolution layers in the source domain behavior characterization model; Acquiring target domain data, wherein the target domain data comprises the behavior sequence and an attribute label in a target domain, and the target domain is an advertisement recommendation field, a news recommendation field, a music recommendation field, a friend-making recommendation field, a video recommendation field or an attribute prediction field; Performing supervised learning training on a source domain behavior characterization model with a fine tuning network layer by utilizing the target domain data, and updating network parameters of the fine tuning network layer to obtain an attribute prediction model for the target domain, wherein the attribute prediction model is used for predicting object attributes in the target domain, and the obtained attribute prediction information is used for recommending advertisements, recommending news, recommending music, recommending friends, recommending videos or predicting attribute labels of the objects; The method comprises the steps of selecting a plurality of target behavior nodes in a behavior sequence, replacing the target behavior nodes with shielding behavior nodes, inputting the behavior sequence with the shielding behavior nodes into the initial neural network to obtain behavior prediction information, determining behavior prediction errors according to the behavior prediction information and the target behavior nodes, and updating network parameters of the initial neural network by using the behavior prediction errors to obtain a source domain behavior characterization model; the method comprises the steps of utilizing target domain data to conduct supervised learning training on a source domain behavior representation model with a fine tuning network layer, updating network parameters of the fine tuning network layer to obtain an attribute prediction model for the target domain, inputting a behavior sequence in the target domain data into the source domain behavior representation model with the fine tuning network layer to obtain attribute prediction information, determining an attribute tag associated with the behavior sequence, determining an attribute prediction error according to the attribute tag and the attribute prediction information, and utilizing the attribute prediction error to update the parameters of the fine tuning network layer to obtain the attribute prediction model for the target domain.
- 2. The method of claim 1, wherein the masking behavior nodes comprise designated behavior nodes and random behavior nodes, and wherein the replacing the target behavior node with the masking behavior node comprises: determining node classification proportion, and classifying the target behavior nodes into a designated node set, a random node set and an original node set according to the node classification proportion; Determining a designated behavior node, and replacing a target behavior node in the designated node set with the designated behavior node; And determining a random behavior node, and replacing a target behavior node in the random node set with the random behavior node.
- 3. The method of claim 1, wherein inputting the behavior sequence with the masked behavior nodes into the initial neural network to obtain behavior prediction information comprises: Inputting a behavior sequence with the masking behavior node into the initial neural network; Mapping the behavior sequence through an embedding layer in the initial neural network to obtain an embedding vector of each behavior node in the behavior sequence; and carrying out convolution processing on the embedded vector through a convolution layer in the initial neural network to obtain the behavior prediction information corresponding to the shielding behavior node.
- 4. A method of training a model for attribute prediction according to claim 3, wherein said convolving the embedded vector with a convolution layer in the initial neural network to obtain the behavior prediction information corresponding to the masked behavior node comprises: performing convolution processing on the embedded vector through a convolution layer in the initial neural network to obtain convolution processing information; Mapping the embedded vector and the convolution processing information through residual error connection branches in the initial neural network to obtain residual error mapping information; And obtaining the behavior prediction information corresponding to the masking behavior node based on the convolution processing information and the residual mapping information.
- 5. The method according to claim 4, wherein the convolving the embedded vector by a convolution layer in the initial neural network to obtain convolved information, comprises: And carrying out hole convolution processing on the embedded vector through a plurality of hole convolution layers with different hole rates in the initial neural network so as to obtain convolution processing information.
- 6. The method according to claim 1, wherein the step of inputting the behavior sequence in the target domain data into the source domain behavior characterization model with the fine tuning network layer to obtain the attribute prediction information includes: inputting the behavior sequence into the source domain behavior characterization model with the fine tuning network layer; carrying out convolution processing on the behavior sequence through a convolution layer in the source domain behavior characterization model to obtain behavior characterization information; and mapping the behavior characterization information through the fine tuning network layer to obtain the attribute prediction information corresponding to the behavior sequence.
- 7. The method according to claim 6, wherein the fine tuning network layer includes a convolution branch and a residual branch, wherein the mapping the behavior characterization information by the fine tuning network layer to obtain the attribute prediction information corresponding to the behavior sequence includes: Carrying out convolution processing on the behavior characterization information through the convolution branches to obtain convolution prediction information; mapping the behavior characterization information through the residual branches to obtain residual prediction information; The attribute prediction information corresponding to the behavior sequence is determined based on the convolution prediction information and the residual prediction information.
- 8. The method for training the attribute prediction model according to claim 7, wherein the convolution branch includes a dimension-reducing convolution layer, an activation layer, and a dimension-increasing convolution layer connected in sequence, and the performing convolution processing on the behavior characterization information by the convolution branch to obtain convolution prediction information includes: Carrying out convolution processing on the behavior characterization information through the dimension reduction convolution layer to obtain low-dimension prediction information with dimension lower than that of the behavior characterization information; mapping the low-dimensional prediction information through the activation layer to obtain activation prediction information with nonlinear characteristics; and carrying out convolution processing on the activation prediction information through the dimension-increasing convolution layer to obtain the convolution prediction information with the dimension equal to the behavior characterization information.
- 9. The method of claim 1, wherein determining an attribute prediction error from the attribute tag and the attribute prediction information comprises: mapping the attribute label according to the attribute information of the target domain to obtain label characterization information; and determining the similarity of the tag characterization information and the attribute prediction information, and determining the similarity as the attribute prediction error.
- 10. A method of attribute prediction comprising: the method comprises the steps of obtaining a behavior sequence of an object to be detected in a source domain, and determining a target domain corresponding to the source domain, wherein the source domain represents an application program, the behavior sequence is a click behavior sequence of the object to be detected on content in the application program, and the click behavior sequence comprises at least one behavior data of browsing records, scoring, praise and forwarding; inputting the behavior sequence into a pre-trained attribute prediction model aiming at the target domain to obtain attribute prediction information of the object to be detected, wherein the target domain is an advertisement recommendation field, a news recommendation field, a music recommendation field, a friend-making recommendation field, a video recommendation field or an attribute prediction field; the attribute prediction model is trained by the attribute prediction model training method according to any one of claims 1 to 9, wherein the attribute prediction model is used for predicting object attributes in the target domain, and the obtained attribute prediction information is used for recommending advertisements, recommending news, recommending music, recommending friends, recommending videos or predicting attribute labels of the objects.
- 11. An attribute prediction model training apparatus, the apparatus comprising: The system comprises a source domain data acquisition module, a source domain data processing module and a storage module, wherein the source domain data comprises a behavior sequence of a sample object in a source domain, the source domain represents an application program, the behavior sequence is a click behavior sequence of the sample object on content in the application program, and the click behavior sequence comprises at least one behavior data of browsing records, scoring, praise and forwarding; The model pre-training module is configured to perform unsupervised learning training on an initial neural network by using the source domain data to obtain a source domain behavior characterization model, wherein the source domain behavior characterization model is used for characterizing behavior habits of the sample object in the application program; A model adjustment module configured to freeze all network parameters of the source domain behavioral characterization model and insert a plurality of fine-tuning network layers equally spaced between a plurality of convolution layers in the source domain behavioral characterization model; The target domain data acquisition module is configured to acquire target domain data, wherein the target domain data comprises a behavior sequence of the sample object in the source domain and an attribute label in a target domain, and the target domain is an advertisement recommendation domain, a news recommendation domain, a music recommendation domain, a friend-making recommendation domain, a video recommendation domain or an attribute prediction domain; The model fine tuning module is configured to perform supervised learning training on a source domain behavior characterization model with a fine tuning network layer by utilizing the target domain data, and update network parameters of the fine tuning network layer to obtain an attribute prediction model for the target domain, wherein the attribute prediction model is used for predicting object attributes in the target domain, and the obtained attribute prediction information is used for recommending advertisements, recommending news, recommending music, recommending friends, recommending videos or predicting attribute labels of the objects; the model pre-training module comprises a node shading module, a behavior prediction module, a behavior error determination module, a pre-training parameter updating module, a source domain behavior characterization model, a model pre-training module and a model pre-training module, wherein the node shading module is configured to select a plurality of target behavior nodes in the behavior sequence and replace the target behavior nodes with shading behavior nodes; The model fine tuning module comprises an attribute prediction module, a determination module and a parameter updating module, wherein the attribute prediction module is configured to input a behavior sequence in the target domain data into the source domain behavior characterization model with a fine tuning network layer to obtain attribute prediction information, determine the attribute label associated with the behavior sequence, determine an attribute prediction error according to the attribute label and the attribute prediction information, and update parameters of the fine tuning network layer by utilizing the attribute prediction error to obtain an attribute prediction model aiming at the target domain.
- 12. A texture prediction apparatus, the apparatus comprising: The system comprises a data acquisition module, a source domain, a data processing module and a data processing module, wherein the data acquisition module is configured to acquire a behavior sequence of an object to be detected in a source domain and determine a target domain corresponding to the source domain, the source domain represents an application program, the behavior sequence is a click behavior sequence of the object to be detected on contents in the application program, and the click behavior sequence comprises at least one behavior data of browsing records, scoring, praise and forwarding; The model prediction module is configured to input the behavior sequence into a pre-trained attribute prediction model aiming at the target domain to obtain attribute prediction information of the object to be detected, wherein the target domain is an advertisement recommendation field, a news recommendation field, a music recommendation field, a friend-making recommendation field, a video recommendation field or an attribute prediction field; the attribute prediction model is trained by the attribute prediction model training method according to any one of claims 1 to 9, wherein the attribute prediction model is used for predicting object attributes in the target domain, and the obtained attribute prediction information is used for recommending advertisements, recommending news, recommending music, recommending friends, recommending videos or predicting attribute labels of the objects.
- 13. A computer readable medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the method according to any one of claims 1 to 9.
- 14. A computer program product comprising computer instructions which, when executed by a processor, implement the method of any one of claims 1 to 9.
- 15. An electronic device, comprising: processor, and A memory for storing executable instructions of the processor; Wherein the processor is configured to perform the method of any one of claims 1 to 9 via execution of the executable instructions.
Description
Attribute prediction model training method, attribute prediction method and electronic equipment Technical Field The present disclosure relates to the field of artificial intelligence technology, and in particular, to an attribute prediction model training method, an attribute prediction model training apparatus, an attribute prediction apparatus, a computer-readable medium, and an electronic device. Background With the development of computer and internet technologies, viewing content or browsing information through a network platform has become an extremely important part of people's daily lives. For example, in the field of short video, news or photo streams, a user may typically complete the reading or viewing of a piece of content in a few tens of seconds, and thus, billions of users may produce billions of levels of user click/view behavior record data in a short number of hours or days. Based on this data, the user's preferences can be inferred, thereby continuing to produce and push to the user short videos, news, pictures, etc. of possible interest. In areas such as ad streaming, however, most users have little or no click-through behavior, and such a scenario may be generally referred to as a cold start scenario, and the relevant users as cold users. Due to the lack of user data, it is difficult to accurately push content to users in a cold start scenario. Therefore, how to predict attribute information such as interests and hobbies of a cold user in a cold start scene is a problem to be solved urgently. Disclosure of Invention The present disclosure aims to provide an attribute prediction model training method, an attribute prediction model training device, an attribute prediction device, a computer readable medium, and an electronic device, so as to overcome at least to some extent the technical problems of difficulty in attribute data prediction and the like in the related art. Other features and advantages of the present disclosure will be apparent from the following detailed description, or may be learned in part by the practice of the disclosure. According to one aspect of the embodiment of the disclosure, a training method of an attribute prediction model is provided, and the method comprises the steps of obtaining source domain data, training an initial neural network by using the source domain data to obtain a source domain behavior characterization model, freezing parameters of the source domain behavior characterization model, inserting a fine tuning network layer into the source domain behavior characterization model, obtaining target domain data, wherein the target domain data comprises a behavior sequence of a sample object in a source domain and an attribute tag in a target domain, and training the source domain behavior characterization model with the fine tuning network layer by using the target domain data to obtain the attribute prediction model for the target domain. According to one aspect of the embodiment of the disclosure, an attribute prediction model training device is provided, which comprises a source domain data acquisition module configured to acquire source domain data, a model pre-training module configured to train an initial neural network by using the source domain data to obtain a source domain behavior characterization model, a model adjustment module configured to freeze parameters of the source domain behavior characterization model and insert a fine tuning network layer into the source domain behavior characterization model, a target domain data acquisition module configured to acquire target domain data, wherein the target domain data comprises a behavior sequence of a sample object in a source domain and an attribute tag in a target domain, and a model fine tuning module configured to train the source domain behavior characterization model with a fine tuning network layer by using the target domain data to obtain an attribute prediction model for the target domain. In some embodiments of the disclosure, based on the above technical solutions, the model pre-training module includes a node shading module configured to select a plurality of target behavior nodes in a behavior sequence of the source domain data and replace the target behavior nodes with shading behavior nodes, a behavior prediction module configured to input the behavior sequence with the shading behavior nodes into an initial neural network to obtain behavior prediction information corresponding to the shading behavior nodes, a behavior error determination module configured to determine a behavior prediction error according to the behavior prediction information and the target behavior nodes, and a pre-training parameter updating module configured to update network parameters of the initial neural network with the behavior prediction error to obtain a source domain behavior characterization model. In some embodiments of the disclosure, based on the above technical scheme, the node masking mod