A recommendation model training method and related apparatus
By generating identifier features and combining them with globally shared and scenario-specific networks for prediction, the problem of inaccurate prediction caused by the lack of advertising conversion samples is solved, cross-scenario knowledge transfer is achieved, and the accuracy and effectiveness of advertising recommendations are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2023-03-31
- Publication Date
- 2026-04-24
AI Technical Summary
In the absence of advertising conversion samples, the predictive accuracy of existing advertising conversion rate models is insufficient, resulting in poor advertising performance.
By generating identifying features to represent training samples, intra-sample knowledge transfer is achieved. These features are then input into a global shared network and a scene-specific network for result prediction, fully learning the shared and specific information between scenes to achieve cross-scene knowledge transfer.
It improves the model's prediction accuracy in the absence of data, reduces the dependence on training data, and enhances the effectiveness of advertising recommendations.
Smart Images

Figure CN116467594B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a method for training a recommendation model and related apparatus. Background Technology
[0002] With the rapid development of the internet, online advertising has become a major advertising method besides television and newspapers. Currently, recommendation systems are used online to recommend personalized advertisements to users. These systems can infer users' interests and usage behaviors based on information such as the websites they visit or the applications they use, and then recommend advertisements based on these interests and behaviors. This improves the relevance of the advertisements to the user, thereby increasing the return on investment for advertisers.
[0003] Specifically, the revenue of online advertising is closely related to ad conversion rates. Ad conversion rates reflect the probability that a user will perform a specific conversion after clicking on an ad, and accurate conversion rate prediction is crucial for personalized ad recommendations. For most ad conversion rate prediction methods, the core issue is constructing accurate ad representations and modeling the personalized relationship between ads and user interests. The accuracy of this step is highly correlated with the amount of training data.
[0004] However, due to the rapid evolution of user preferences and market demands, advertisers typically need to frequently release new ad content. New ads often lack conversion samples (i.e., the corresponding conversion behaviors) in the initial stages of deployment, resulting in fewer training samples for ad conversion rate models and consequently, less accurate predictions.
[0005] In view of this, there is an urgent need for a solution that can improve the prediction of advertising conversion rates in the absence of advertising conversion samples. Summary of the Invention
[0006] This application provides a training method for a recommendation model that can improve the prediction accuracy of the model in the absence of data samples.
[0007] The first aspect of this application provides a method for training a recommendation model, applied in the field of artificial intelligence technology. The method includes: firstly, acquiring training samples, which are samples from a content recommendation scenario. The content recommendation scenario can refer to a recommendation scenario for various content objects, such as recommendations for any object like goods, tourist attractions, applications, or songs.
[0008] Then, the training samples are input into the first network to obtain the sample features and the first identifier features output by the first network. The sample features are obtained by performing feature extraction on the training samples, and the first identifier features are obtained by processing the sample features. The first identifier features are used to represent the recommended object corresponding to the training sample. That is, the first network can first perform feature extraction processing on the training samples to obtain the sample features; then the first network continues to process the sample features to obtain the first identifier features.
[0009] Secondly, the sample features and the first identifier features are fused to obtain the first fused feature. This first fused feature is then input into a second network to obtain the prediction result output by the second network. The second network includes a globally shared subnetwork and multiple specialized subnetworks. The prediction result is obtained by processing the first fused feature using the globally shared subnetwork and the target subnetwork. The target subnetwork is determined among the multiple specialized subnetworks based on the recommendation scenario corresponding to the training samples. Specifically, the second network includes one globally shared subnetwork and multiple specialized subnetworks. Each specialized subnetwork corresponds to a unique recommendation scenario. During the processing of the first fused feature, one specialized subnetwork (i.e., the target subnetwork) is determined from among the multiple specialized subnetworks based on the recommendation scenario of the training samples corresponding to the first fused feature to perform the processing of the first fused feature. The globally shared subnetwork is used to process the features corresponding to all scenarios.
[0010] Finally, the first model, which includes a first network and a second network, is updated based on the loss function. The loss function is obtained based on the difference between the prediction results and the true labels corresponding to the training samples.
[0011] In this scheme, firstly, identifying features representing the recommended objects corresponding to the training samples are generated based on the features of the training samples, enabling intra-sample knowledge transfer. Then, the features of the training samples and the identifying features are fused and input into a global shared network and a scene-specific network for result prediction, fully learning common and specific information across scenes to achieve cross-scene knowledge transfer. By simultaneously performing intra-sample and cross-scene knowledge transfer, this scheme reduces the model's dependence on training data, significantly improves knowledge transfer efficiency, effectively supports sparse data samples, and enhances the model's prediction accuracy.
[0012] In one possible implementation, the loss function includes a first sub-loss function and a second sub-loss function. The first sub-loss function is obtained based on the difference between the prediction result and the real label corresponding to the training sample, and the second sub-loss function is obtained based on the similarity between different scenes. The similarity between different scenes is obtained based on the prediction results output by the second network corresponding to different scenes.
[0013] In this approach, the correlation between scenarios is automatically assessed based on the model's prediction results in different scenarios, and a loss function is constructed based on this correlation. This adaptively controls the intensity of knowledge distillation between scenarios, helps establish more effective knowledge transfer pathways between related scenarios, avoids interference from irrelevant knowledge, and improves the model's prediction accuracy.
[0014] In one possible implementation, the similarity between different scenarios is obtained based on multiple prediction results output by the second network. These multiple prediction results are obtained by fusing the global shared sub-network and different proprietary sub-networks to process the first fused feature.
[0015] In other words, when calculating the first sub-loss function, a specific sub-network is selected in the second network to process the first fusion feature based on the recommendation scenario corresponding to the training sample, thus obtaining a unique prediction result. When calculating the second sub-loss function, the globally shared sub-network and each specific sub-network in the second network are combined to process the first fusion feature, thereby obtaining the prediction result corresponding to each scenario. In this way, by outputting the corresponding prediction results for each scenario, the similarity between different scenarios can be determined based on the multiple output prediction results, achieving the measurement of the correlation between scenarios.
[0016] In one possible implementation, the loss function includes a first sub-loss function and a third sub-loss function. The first sub-loss function is obtained based on the difference between the prediction result and the true label corresponding to the training sample. The third sub-loss function is obtained based on the difference between the first label feature and the second label feature. The second label feature is obtained by feature extraction of the label of the recommended object corresponding to the training sample.
[0017] Specifically, different training samples can correspond to the same recommended object, and the identifier of the same recommended object is unique. Therefore, different training samples can correspond to the same second identifier feature. After extracting the second identifier feature from the identifier of the recommended object, a third sub-loss function can be constructed based on the difference between the second identifier feature and the first identifier feature. This allows the first network to be guided by the second identifier feature to generate the first identifier feature. In this way, when the first network processes different training samples corresponding to the same recommended object, it can learn to generate the same identifier feature based on the sample features of different training samples, guided by the third sub-loss function, effectively achieving intra-sample knowledge transfer.
[0018] In one possible implementation, the sample features and the first identifier features are fused to obtain the first fused feature, which includes: fusing the sample features, the first identifier features, and the second identifier features to obtain the first fused feature.
[0019] In one possible implementation, the second network further includes multiple partially shared subnetworks. The prediction result is obtained by fusing the first result, the second result, and the third result. The first result is the result of the global shared subnetwork processing the first fused feature, the second result is the result of the target subnetwork processing the first fused feature, and the third result is obtained by fusing the results of multiple partially shared subnetworks processing the first fused feature based on the recommendation scenario corresponding to the training samples.
[0020] In one possible implementation, the method of fusing sample features and the first identifier feature is related to the recommendation scenario corresponding to the training sample and / or the running state corresponding to the training sample, where the running state is used to indicate the relationship between the number of recommended objects corresponding to the training sample and a preset number. For example, when the number of recommended objects corresponding to the training sample is less than the preset number, the running state of the training sample is a cold start state; when the number of recommended objects corresponding to the training sample is greater than or equal to the preset number, the running state of the training sample is a warm start state.
[0021] In one possible implementation, fusing sample features and a first identifier feature to obtain a first fused feature includes: based on the running state corresponding to the training samples, fusing the results of multiple feature generation networks processing the concatenated features to obtain a second fused feature, which is obtained by concatenating sample features and the first identifier feature; based on the recommendation scenario corresponding to the training samples, fusing the results of multiple shared feature networks and a target feature network processing the second fused feature to obtain the first fused feature, wherein the target feature network is determined from multiple proprietary feature networks according to the recommendation scenario; wherein the first model further includes multiple feature generation networks, multiple shared feature networks, and multiple proprietary feature networks.
[0022] In this scheme, the results of the second fusion feature processing are fused based on the recommendation scenario corresponding to the training sample. This enables the use of different feature aggregation methods for different scenarios, thereby obtaining scenario-customized feature representations and effectively improving the prediction accuracy of the model when facing training samples in different scenarios.
[0023] In one possible implementation, based on the operating state corresponding to the training samples, the results of processing the concatenated features by multiple feature generation networks are fused to obtain a second fused feature. This includes: weighted summing of the results of processing the concatenated features by multiple feature generation networks to obtain the second fused feature; wherein the weights corresponding to the results of processing the concatenated features by multiple feature generation networks are determined according to the operating state corresponding to the training samples. For example, the operating state corresponding to the training samples is converted into a feature vector, and each element in this feature vector is used as a weight corresponding to the results of processing the concatenated features by multiple feature generation networks in the weighted summation process.
[0024] A second aspect of this application provides a training apparatus for a recommendation model, comprising:
[0025] The acquisition module is used to acquire training samples, which are samples used in content recommendation scenarios.
[0026] The processing module is used to input training samples into the first network and obtain sample features and first identifier features output by the first network. The sample features are obtained by performing feature extraction on the training samples, and the first identifier features are obtained by performing processing on the sample features. The first identifier features are used to characterize the recommended object corresponding to the training sample.
[0027] The processing module is also used to fuse sample features and first identifier features to obtain first fused features;
[0028] The processing module is also used to input the first fusion feature into the second network and obtain the prediction result output by the second network. The second network includes a globally shared sub-network and multiple proprietary sub-networks. The prediction result is obtained by processing the first fusion feature by fusing the globally shared sub-network and the target sub-network. The target sub-network is determined among multiple proprietary sub-networks based on the recommendation scenario corresponding to the training samples.
[0029] The processing module is also used to update the first model based on the loss function. The first model includes a first network and a second network. The loss function is obtained based on the difference between the prediction result and the true label corresponding to the training sample.
[0030] In one possible implementation, the loss function includes a first sub-loss function and a second sub-loss function. The first sub-loss function is obtained based on the difference between the prediction result and the real label corresponding to the training sample, and the second sub-loss function is obtained based on the similarity between different scenes. The similarity between different scenes is obtained based on the prediction results output by the second network corresponding to different scenes.
[0031] In one possible implementation, the similarity between different scenarios is obtained based on multiple prediction results output by the second network. These multiple prediction results are obtained by fusing the global shared sub-network and different proprietary sub-networks to process the first fused feature.
[0032] In one possible implementation, the loss function includes a first sub-loss function and a third sub-loss function. The first sub-loss function is obtained based on the difference between the prediction result and the true label corresponding to the training sample. The third sub-loss function is obtained based on the difference between the first label feature and the second label feature. The second label feature is obtained by feature extraction of the label of the recommended object corresponding to the training sample.
[0033] In one possible implementation, the processing module is further configured to fuse sample features, first identifier features, and second identifier features to obtain a first fused feature.
[0034] In one possible implementation, the second network further includes multiple partially shared subnetworks. The prediction result is obtained by fusing the first result, the second result, and the third result. The first result is the result of the global shared subnetwork processing the first fused feature, the second result is the result of the target subnetwork processing the first fused feature, and the third result is obtained by fusing the results of multiple partially shared subnetworks processing the first fused feature based on the recommendation scenario corresponding to the training samples.
[0035] In one possible implementation, the method of fusing sample features and first identifier features is related to the recommendation scenario corresponding to the training sample and / or the running state corresponding to the training sample, wherein the running state is used to indicate the size relationship between the number of samples of the recommendation object corresponding to the training sample and a preset number.
[0036] In one possible implementation, the processing module is also used for:
[0037] Based on the running state corresponding to the training samples, the results of multiple feature generation networks processing the spliced features are combined to obtain the second fused feature. The spliced feature is obtained by splicing the sample features and the first identifier feature.
[0038] Based on the recommendation scenario corresponding to the training samples, the result of processing the second fused feature by fusing multiple shared feature networks and target feature networks is used to obtain the first fused feature, wherein the target feature network is determined from multiple proprietary feature networks according to the recommendation scenario;
[0039] The first model also includes multiple feature generation networks, multiple shared feature networks, and multiple proprietary feature networks.
[0040] In one possible implementation, the processing module is also used for:
[0041] The results of processing the spliced features by multiple feature generation networks are weighted and summed to obtain the second fused feature;
[0042] The weights corresponding to the results of multiple feature generation networks processing the spliced features are determined based on the running state of the training samples.
[0043] A third aspect of this application provides a point cloud data processing apparatus, which may include a processor and a memory coupled together. The memory stores program instructions, and when the program instructions stored in the memory are executed by the processor, the method described in the first aspect or any implementation thereof is implemented. For details regarding the steps in the various possible implementations of the first aspect executed by the processor, please refer to the first aspect; further details will not be repeated here.
[0044] The fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to perform the method of any implementation of the first aspect described above.
[0045] The fifth aspect of this application provides a circuit system including a processing circuit configured to perform the method of any implementation of the first aspect described above.
[0046] The sixth aspect of this application provides a computer program product that, when run on a computer, causes the computer to perform any implementation of the first aspect described above.
[0047] A seventh aspect of this application provides a chip system including a processor for supporting a server or threshold value acquisition device in implementing the functions involved in any implementation of the first aspect described above, such as transmitting or processing data and / or information involved in the methods described above. In one possible design, the chip system further includes a memory for storing program instructions and data necessary for the server or communication device. This chip system may be composed of chips or may include chips and other discrete devices.
[0048] The beneficial effects of the second to seventh aspects mentioned above can be referred to the introduction of the first aspect above, and will not be repeated here. Attached Figure Description
[0049] Figure 1 This is a schematic diagram of an application store advertisement recommendation provided in an embodiment of this application.
[0050] Figure 2 This is a schematic diagram of an advertising recommendation system provided in an embodiment of this application.
[0051] Figure 3 This is a schematic diagram of a system architecture 300 provided in an embodiment of this application.
[0052] Figure 4 This is a flowchart illustrating a training method for a recommendation model provided in an embodiment of this application.
[0053] Figure 5 This is a schematic diagram illustrating the process of a first model for processing training samples, provided in an embodiment of this application.
[0054] Figure 6 This is a schematic flowchart illustrating a second network processing of a first fusion feature, provided as an embodiment of this application.
[0055] Figure 7 This is a flowchart illustrating the fusion of sample features and a first identifier feature, as provided in an embodiment of this application.
[0056] Figure 8 This is a flowchart illustrating the processing features of multiple modules in a conversion rate model provided in an embodiment of this application.
[0057] Figure 9 This is a schematic diagram of the structure of a training device for a recommendation model provided in an embodiment of this application.
[0058] Figure 10 A schematic diagram of the structure of the execution device provided in the embodiments of this application;
[0059] Figure 11 A schematic diagram of the structure of a chip provided in an embodiment of this application;
[0060] Figure 12 This is a schematic diagram of the structure of a computer-readable storage medium provided in an embodiment of this application. Detailed Implementation
[0061] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application are described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some, and not all, of the embodiments of this application. Those skilled in the art will understand that, with the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0062] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such descriptions can be used interchangeably where appropriate to allow embodiments to be implemented in a sequence other than that illustrated or described in this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules is not necessarily limited to those explicitly listed, but may include other steps or modules not explicitly listed or inherent to such processes, methods, products, or devices. The naming or numbering of steps appearing in this application does not imply that the steps in the method flow must be performed in the chronological / logical order indicated by the naming or numbering. The execution order of named or numbered process steps can be changed according to the desired technical purpose, as long as the same or similar technical effect is achieved. The division of units in this application is a logical division. In practical applications, there may be other division methods. For example, multiple units may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the shown or discussed mutual coupling, direct coupling, or communication connection may be through some interface, and the indirect coupling or communication connection between units may be electrical or other similar forms, none of which are limited in this application. Furthermore, the units or sub-units described as separate components may or may not be physically separated, may or may not be physical units, or may be distributed among multiple circuit units. Some or all of the units can be selected to achieve the purpose of the solution in this application according to actual needs.
[0063] For ease of understanding, some technical terms involved in the embodiments of this application will be introduced below.
[0064] (1) Recommendation System
[0065] The recommendation system uses machine learning algorithms to analyze and learn from users' historical click behavior data, then predicts new user requests and returns a personalized list of recommended items.
[0066] (2) Conversion rate
[0067] Conversion rate refers to the probability that a user will convert a clicked item into a completed action in a specific environment. Conversion generally refers to actions such as downloading, installing, and registering.
[0068] Ad conversion rate refers to the probability that a user will convert an ad into a transaction, such as the probability of clicking to watch, commenting, downloading, installing, or registering.
[0069] (3) Knowledge transfer
[0070] Knowledge transfer refers to the transfer of an existing knowledge set to another target domain to enhance the modeling ability of the target domain. Knowledge transfer based on a model can be simply understood as transfer learning based on model parameters, and how to enable the constructed model to learn the general knowledge between domains.
[0071] (4) Multi-task learning
[0072] Multi-task learning means learning multiple related tasks together and simultaneously learning multiple tasks.
[0073] (5) Cold start advertising
[0074] Cold start advertising generally refers to newly launched advertisements with a small number of samples. For example, for a certain advertisement, if the number of samples of this advertisement in each placement scenario is less than a certain number, then this advertisement can be called a cold start advertisement.
[0075] (6) Neural network
[0076] A neural network can be composed of neural units. A neural unit can refer to an operation unit that takes xs (i.e., input data) and an intercept 1 as inputs. The output of this operation unit can be:
[0077]
[0078] where s = 1, 2, …… n, n is a natural number greater than 1, Ws is the weight of xs, and b is the bias of the neural unit. f is the activation function of the neural unit (activation functions), which is used to introduce non-linear characteristics into the neural network to convert the input signal in the neural unit into an output signal. The output signal of this activation function can be used as the input of the next convolutional layer, and the activation function can be the sigmoid function. A neural network is a network formed by connecting multiple such single neural units together, that is, the output of one neural unit can be the input of another neural unit. The input of each neural unit can be connected to the local receptive field of the previous layer to extract the features of the local receptive field, and the local receptive field can be an area composed of several neural units.
[0079] (7) Deep Neural Network (DNN)
[0080] Deep neural networks, also known as multilayer neural networks, can be understood as neural networks with many hidden layers, though there's no specific metric for "many." DNNs can be categorized into three types based on their layer positions: input layers, hidden layers, and output layers. Generally, the first layer is the input layer, the last layer is the output layer, and the layers in between are hidden layers. All layers are fully connected, meaning that any neuron in the i-th layer is connected to any neuron in the (i+1)-th layer. Although DNNs appear complex, the operation of each layer is actually quite simple, resembling a linear relationship as follows: in, It is the input vector. It is the output vector. α is the offset vector, W is the weight matrix (also called coefficients), and α() is the activation function. Each layer is simply an adjustment of the input vector. The output vector is obtained through such a simple operation. Because DNNs have many layers, the coefficients W and the offset vector... The number of these parameters is therefore quite large. The definitions of these parameters in a DNN are as follows: Taking the coefficient W as an example: Assuming a three-layer DNN, the linear coefficient from the 4th neuron in the second layer to the 2nd neuron in the third layer is defined as... The superscript 3 represents the layer number where coefficient W resides, while the subscript corresponds to the output third layer index 2 and the input second layer index 4. In summary, the coefficients from the k-th neuron in layer L-1 to the j-th neuron in layer L are defined as follows: It's important to note that the input layer does not have a W parameter. In deep neural networks, more hidden layers allow the network to better represent complex real-world situations. Theoretically, the more parameters a model has, the higher its complexity and "capacity," meaning it can perform more complex learning tasks. Training a deep neural network is essentially the process of learning the weight matrix, with the ultimate goal of obtaining the weight matrix of all layers in the trained deep neural network (a weight matrix formed by the vectors W from many layers).
[0081] (8) Multilayer Perceptron (MLP)
[0082] A multilayer perceptron is a feedforward artificial neural network model that maps multiple input datasets to a single output dataset. A typical multilayer perceptron consists of three network layers: an input layer, hidden layers, and an output layer. Furthermore, in a multilayer perceptron, the different network layers are fully connected (i.e., any neuron in one layer is connected to all neurons in the next layer).
[0083] (9) Loss Function
[0084] During neural network training, to ensure the output closely approximates the desired predicted value, we compare the network's prediction with the target value. Based on the difference, we update the weight vector of each layer (usually pre-configuring parameters before the initial update). For example, if the prediction is too high, the weight vector is adjusted to predict a lower value. This adjustment continues until the neural network predicts the target value or a value very close to it. Therefore, we need to predefine "how to compare the difference between the predicted and target values," which is the loss function or objective function. These are important equations used to measure the difference between the predicted and target values. Taking the loss function as an example, a higher output value (loss) indicates a greater difference, and training the neural network becomes a process of minimizing this loss.
[0085] (10) Backpropagation algorithm
[0086] Neural networks can employ backpropagation (BP) to correct the parameters of the initial prediction model during training, thereby reducing the error loss. Specifically, forward propagation of the input signal to the output generates error loss; this error loss information is then propagated back to update the parameters of the initial prediction model, leading to convergence of the error loss. The backpropagation algorithm is an error-loss-driven backpropagation process aimed at obtaining the optimal parameters of the prediction model, such as the weight matrix.
[0087] (11) Gradient descent method
[0088] Gradient descent is a first-order optimization algorithm commonly used in machine learning to recursively approximate a minimum-bias prediction model. To find a local minimum of a function using gradient descent, iterative searches must be performed at points a predetermined step distance away in the opposite direction of the gradient (or approximate gradient) at the current point on the function. Gradient descent is one of the most frequently used methods for solving the prediction model parameters of machine learning algorithms, i.e., unconstrained optimization problems.
[0089] Specifically, when finding the minimum value of the loss function, gradient descent can be used to iteratively solve the problem step by step, obtaining the minimized loss function and the predicted model parameter values. Conversely, if we need to find the maximum value of the loss function, we need to use gradient ascent iteratively.
[0090] (12) Softmax function
[0091] The Softmax function, also known as the normalized exponential function, is a generalization of the logistic function. The Softmax function transforms a K-dimensional vector Z containing arbitrary real numbers into another K-dimensional vector σ(Z), such that every element in the transformed vector σ(Z) is within the range (0, 1), and the sum of all elements is 1. The Softmax function can be calculated as shown in Equation 1.
[0092]
[0093] Where, σ(z) j Zj represents the value of the j-th element in the vector after the Softmax function transformation; Zk represents the value of the j-th element in vector Z; ∑ represents the summation.
[0094] Currently, online advertising revenue is closely related to ad conversion rates. Ad conversion rates reflect the probability of a user performing a specific conversion after clicking on an ad, and accurate conversion rate prediction is crucial for personalized ad recommendations. For most ad conversion rate prediction methods, the core issue is constructing accurate ad representations and modeling the personalized relationship between ads and user interests. Currently, constructing accurate ad representations and modeling the personalized relationship between ads and user interests is typically achieved through neural network models, and the accuracy of neural network models is highly correlated with the amount of training data.
[0095] However, due to the rapid evolution of user preferences and market demands, advertisers typically need to frequently release new ad content. New ads often lack conversion samples (i.e., the corresponding conversion behaviors) in the initial stages of deployment, resulting in fewer training samples for the ad conversion rate model (i.e., the neural network model mentioned above), leading to inaccurate predictions from the ad conversion rate model.
[0096] Specifically, user interactions exhibit a cascading characteristic, with deeper levels of interaction becoming sparser. For example, a user's interactions with a particular ad app might include clicking, browsing its description or leaving a review, downloading, and registering. These interactions are often cascading, meaning that a user typically performs a higher-level action before proceeding to a lower-level one. For instance, a user often needs to click on a recommended ad app on the recommendation page before browsing its description or leaving a review, downloading, or registering; similarly, a user often needs to download the ad app before registering within the downloaded app.
[0097] On the other hand, advertisers with the same budget often run the same ads across multiple advertising channels, resulting in even sparser sample data in a single scenario. In other words, for an ad with identical content, the sample data for that ad will be sparser across different scenarios (i.e., multiple sample data points for the same ad are distributed across different scenarios). For highly sparse ad samples, models often struggle to provide accurate recommendation results.
[0098] In summary, there is an urgent need for a solution that can improve advertising conversion rate prediction in the absence of advertising conversion samples, so as to improve the return on advertising.
[0099] In view of this, this application provides a training method for a recommendation model. First, based on the features of the training samples, identifier features are generated to represent the recommendation objects corresponding to the training samples, enabling intra-sample knowledge transfer. Then, the features and identifier features of the training samples are fused and input into a global shared network and a scene-specific network for result prediction, so as to fully learn the common and specific information between scenes and achieve cross-scene knowledge transfer. This solution, by simultaneously carrying out intra-sample knowledge transfer and cross-scene knowledge transfer, can reduce the model's dependence on training data, significantly improve knowledge transfer efficiency, effectively support sparse data samples, and improve the model's prediction accuracy.
[0100] The method provided in this application can be applied to recommendation scenarios for various objects, such as products, applications, or songs. Therefore, in this application, advertisements can be the carriers of these recommended objects, and the information of the recommended objects can be displayed through an advertisement page.
[0101] In one possible scenario, the method provided in this application embodiment can be applied to a scenario where application software or game software is recommended as an advertising target on the interface of an app store. For example, please refer to... Figure 1 , Figure 1 This is a schematic diagram illustrating an app store's advertising recommendations, provided as an embodiment of this application. Figure 1 As shown, this refers to an app store on a user's mobile phone, where the user downloads various applications or games. The app store interface displays various recommended applications, specifically those listed under "Featured Apps."
[0102] In another possible scenario, the method provided in this application embodiment can also be applied to scenarios where products or applications are recommended as advertising targets on applications such as social software and video software. For example, when a user is watching a video through video software, during the period when the user pauses watching the video, the video software can play corresponding advertisements to recommend a certain product or application.
[0103] In another possible scenario, the method provided in this application embodiment can also be used to recommend products as advertisements on online shopping software or web pages. For example, when a user searches for or browses various products on an online shopping software, the software can prioritize recommending some of the products that are advertised to the user.
[0104] In general, the embodiments of this application do not limit the recommended objects corresponding to the advertisements.
[0105] The system scenario applied in this application is a machine learning-based application scenario. The following will use click-through rate (CTR) prediction in a recommendation system as an example, where CTR is a type of ad conversion rate. CTR prediction is a typical scenario in machine learning applications, and its main structure is as follows: Figure 2 As shown. Among them, Figure 2 This is a schematic diagram of an advertising recommendation system provided in an embodiment of this application. Figure 2 As shown, the advertising recommendation system includes logs, an offline training module, a prediction model, an online prediction module, and a display list.
[0106] The basic operating logic of an advertising recommendation system is as follows: Users perform a series of actions on the front-end display list, such as browsing, clicking, commenting, and downloading, generating behavioral data which is stored in logs. The offline training module in the recommendation system uses data, including user behavior logs, to train an offline model, thereby obtaining a prediction model. Then, the prediction model is deployed in the online service environment and provides recommendation results based on user requests, item features, and contextual information, displaying these results in the display list. Finally, users provide feedback on the recommendations in the display list, generating user behavioral data, which is also stored in the logs.
[0107] Please see Figure 3 , Figure 3 This is a schematic diagram of a system architecture 300 provided in an embodiment of this application. Figure 3As shown, in this system architecture 300, the execution device 310 can be implemented by one or more servers. Optionally, the execution device 310 can cooperate with other computing devices, such as data storage, routers, load balancers, etc.; the execution device 310 can be deployed on a single physical site or distributed across multiple physical sites. The execution device 310 can use data from the data storage system 320 or call the program code in the data storage system 320 to implement the training method of the recommendation model provided in this application embodiment, thereby obtaining the model.
[0108] Users can interact with execution device 310 by operating their respective user devices (e.g., local device 301 and local device 302). Each local device can represent any computing device, such as a personal computer, computer workstation, smartphone, tablet, laptop, and smart car.
[0109] Each user's local device can interact with the execution device 310 through a communication network of any communication mechanism / standard. The communication network can be a wide area network, a local area network, a point-to-point connection, or any combination thereof.
[0110] In one implementation, the execution device 310 is used to implement the training method of the recommended model provided in the embodiments of this application, and sends the obtained model to the local device 301 and the local device 302 through a communication network, so that the local device 301 and the local device 302 can deploy and run the model.
[0111] In another implementation, one or more aspects of the execution device 310 may be implemented by each local device. For example, the local device 301 may provide local data or feedback calculation results to the execution device 310, or execute the training method of the recommended model provided in the embodiments of this application.
[0112] It should be noted that all the functions of the execution device 310 can also be implemented by a local device. For example, local device 301 implements the functions of the execution device 310 and provides services to its own users, or provides services to the users of local device 302.
[0113] In summary, the training method for the recommendation model provided in this application embodiment can be applied to electronic devices, such as the execution device 310, local device 301 or local device 302 described above.
[0114] Please see Figure 4 , Figure 4 This is a flowchart illustrating a training method for a recommendation model provided in an embodiment of this application. Figure 4 As shown, the training method for this recommendation model includes the following steps 401-405.
[0115] Step 401: Obtain training samples. The training samples are samples from the content recommendation scenario.
[0116] In this context, the content recommendation scenario can refer to a recommendation scenario for various content objects, such as recommendations for any object like products, tourist attractions, applications, or songs. This embodiment does not limit the type of object recommended in the content recommendation scenario. Furthermore, in this embodiment, an advertisement can be the carrier of the recommended object; that is, the information of the recommended object can be displayed through an advertisement page. Therefore, a content recommendation scenario can be understood as a scenario that can recommend various objects through advertising. For example, a specific content recommendation scenario can be a scenario that recommends products, tourist attractions, applications, or songs on social media, video platforms, or websites.
[0117] In content recommendation scenarios, when recommending a specific object to a user, various behavioral data about that user regarding the recommended object can be obtained. Therefore, training samples can be obtained based on the user's behavioral data about the recommended object, the state information that generated the behavioral data, and the information about the recommended object itself.
[0118] In other words, a training sample may include, for example, information about the recommended object, user behavior data related to the recommended object, and the state at which the behavior data was generated. Specifically, the information about the recommended object may include, but is not limited to, the type of the recommended object (e.g., cars, digital products, food, social media, games, etc.), the content characteristics of the recommended object (e.g., car brand, price, model, and color), and the association characteristics between the recommended object and the user (e.g., the number of times the recommended object was liked, viewed, or downloaded by the user's social friends). The user behavior data related to the recommended object may include user clicks, browsing, commenting, downloading, or registering. The state at which the behavior data was generated may include date, time, and location information that may influence user behavior, such as the time the user generated the behavior data.
[0119] Step 402: Input the training samples into the first network to obtain the sample features and the first identifier features output by the first network. The sample features are obtained by performing feature extraction on the training samples, and the first identifier features are obtained by performing processing on the sample features. The first identifier features are used to characterize the recommended object corresponding to the training sample.
[0120] Specifically, the first network may first perform feature extraction processing on the training samples to obtain sample features. Then, the first network continues to process the sample features to obtain a first identifier feature, which is used to represent the recommendation object corresponding to the training sample. Since the same recommendation object may correspond to multiple training samples (for example, an advertisement recommending the same car may be shown to multiple users, thus obtaining multiple training samples), the process of processing the sample features to obtain the first identifier feature actually learns the common features among the training samples corresponding to the same recommendation object, realizing intra-sample knowledge transfer.
[0121] For example, please refer to Figure 5 , Figure 5 This is a schematic diagram illustrating the process of processing training samples using a first model, as provided in an embodiment of this application. Figure 5 As shown, the first network may include a feature extraction subnetwork 1 and a feature extraction subnetwork 2. The input to feature extraction subnetwork 1 is the training samples, which are used to perform feature extraction on the training samples to obtain sample features. The input to the feature extraction subnetwork is the sample features, which are used to further perform feature extraction on the sample features to obtain the first identifier feature.
[0122] Optionally, to guide the first network to accurately generate the first identifier feature based on the sample features, this embodiment may perform feature extraction on the identifiers of the recommended objects corresponding to the training samples to obtain the second identifier feature. Then, based on the guidance of the second identifier feature, the first network is guided to generate the first identifier feature.
[0123] The identifier of a recommendation object is used to uniquely identify it. For example, if the recommendation object is a car, the identifier could be 000001; if it's a food item, the identifier could be 000121; and if it's a game, the identifier could be 002001. Furthermore, since the same recommendation object may be recommended in different scenarios and to different users, one recommendation object can correspond to multiple different training samples. Thus, different training samples may correspond to the same recommendation object identifier; that is, different training samples may correspond to the same second identifier feature.
[0124] In this embodiment, the network structure of the first network can be, for example, an MLP, but this embodiment does not specifically limit it.
[0125] Step 403: Fuse the sample features and the first identifier features to obtain the first fused feature.
[0126] In this embodiment, there can be multiple ways to fuse sample features and first identifier features, and this embodiment is not limited to the way of fusing sample features and first identifier features.
[0127] In one possible implementation, the first fused feature can be obtained by concatenating the sample features and the first identifier features.
[0128] In another possible approach, the sample features and the first identifier features can be concatenated first, and then the concatenated features can be processed through a sub-network to obtain the first fused features.
[0129] In another possible approach, the sample features and the first identifier features can be concatenated first, and then the concatenated features can be input into multiple sub-networks respectively. The features output by the multiple sub-networks can then be weighted and summed to obtain the first fused feature.
[0130] Optionally, in this embodiment, if the second identifier feature corresponding to the training sample is pre-extracted, the sample feature, the first identifier feature, and the second identifier feature can be fused to obtain the first fused feature. Similarly, the method of fusing the sample feature, the first identifier feature, and the second identifier feature can also refer to the various implementation methods described above.
[0131] Step 404: Input the first fusion feature into the second network to obtain the prediction result output by the second network. The second network includes a global shared sub-network and multiple proprietary sub-networks. The prediction result is obtained by processing the first fusion feature by fusing the global shared sub-network and the target sub-network. The target sub-network is determined among multiple proprietary sub-networks based on the recommendation scenario corresponding to the training samples.
[0132] Specifically, the second network includes a globally shared subnetwork and multiple dedicated subnetworks. Each dedicated subnetwork corresponds to a unique recommendation scenario. During the processing of the first fusion feature, one dedicated subnetwork (the target subnetwork) is selected from the multiple dedicated subnetworks based on the recommendation scenario of the training samples corresponding to the first fusion feature to perform the processing of the first fusion feature. The globally shared subnetwork, on the other hand, is used to process features corresponding to all scenarios.
[0133] It is understandable that, since recommended objects can be recommended in different scenarios, different training samples may correspond to different recommendation scenarios. For example, an advertisement for the same car may be placed on different platforms such as social media, video apps, or a single website (i.e., the same recommended object appears in different recommendation scenarios), resulting in various samples under different recommendation scenarios. Furthermore, for the same recommended object, different recommendation scenarios may often affect the conversion behavior corresponding to that recommended object. Therefore, in this embodiment, a dedicated sub-network is customized for each recommendation scenario so that the second network can learn the unique knowledge of each recommendation scenario.
[0134] In addition, in this embodiment, a globally shared sub-network is deployed in the second network. This globally shared sub-network can process the corresponding features in all scenarios, thereby learning the common knowledge between the various scenarios.
[0135] For example, such as Figure 5 As shown, the second network includes a globally shared subnetwork and M dedicated subnetworks (i.e., dedicated subnetwork 1 to dedicated subnetwork M). Since the recommendation scenario of the training samples corresponding to the first fusion feature is recommendation scenario 1, the first fusion feature is input into both the dedicated subnetwork and the globally shared subnetwork. Furthermore, the output of the globally shared subnetwork after processing the first fusion feature is fused with the output of dedicated subnetwork 1 after processing the first fusion feature to obtain the prediction result output by the second network.
[0136] Optionally, in some embodiments, the second network further includes multiple partially shared subnetworks, and the prediction result output by the second network can be obtained by fusing a first result, a second result, and a third result. The first result is the result of the global shared subnetwork processing the first fused feature, the second result is the result of the target subnetwork processing the first fused feature, and the third result is obtained by fusing the results of multiple partially shared subnetworks processing the first fused feature based on the recommendation scenario corresponding to the training samples. For example, the third result can be obtained by weighted summation of the results of multiple partially shared subnetworks processing the first fused feature, and the weight corresponding to the result output by each partially shared subnetwork is determined based on the recommendation scenario corresponding to the training samples.
[0137] For example, please refer to Figure 6 , Figure 6 This is a schematic flowchart illustrating a second network processing of a first fusion feature, provided as an embodiment of this application. Figure 6As shown, the second network includes a globally shared subnetwork, partially shared subnetworks 1-N, and dedicated subnetworks 1-M. The first fusion feature is input into the globally shared subnetwork and partially shared subnetworks 1-N. Furthermore, since the recommended scenario corresponding to the first fusion feature is scenario 1, the first fusion feature is input into the corresponding dedicated subnetwork 1.
[0138] In this process, the globally shared sub-network processes the first fusion feature to obtain the first result. The dedicated sub-network 1 processes the first fusion feature to obtain the second result. The results obtained from processing the first fusion feature by partially shared sub-networks 1 to partially shared sub-networks N are then fused to obtain the third result. By further fusing the first, second, and third results, the final prediction result output by the second network is obtained.
[0139] Because the globally shared sub-network learns common knowledge across recommendation scenarios but fails to consider the unique characteristics of each scenario, while the specialized sub-network learns knowledge specific to each scenario, the content learned by both the globally shared and specialized sub-networks is insufficient. Therefore, this solution introduces multiple partially shared sub-networks on top of the globally shared and specialized sub-networks. These partially shared sub-networks process features, and the fusion method of their outputs is determined based on the recommendation scenario corresponding to each feature. This allows for the simultaneous learning of common knowledge across recommendation scenarios as well as the unique knowledge of each scenario, improving the prediction accuracy of the second network.
[0140] In this embodiment, the structure of the sub-network in the second network can be, for example, an MLP, and this embodiment does not specifically limit it.
[0141] Step 405: Update the first model based on the loss function. The first model includes a first network and a second network. The loss function is obtained based on the difference between the prediction result and the true label corresponding to the training sample.
[0142] Specifically, the greater the difference between the prediction output by the second network and the true label corresponding to the training sample, the larger the loss function; the smaller the difference between the prediction output by the second network and the true label corresponding to the training sample, the smaller the loss function.
[0143] The goal of updating the first model based on the loss function is to minimize the loss function as much as possible, so that the prediction output of the first model is as close as possible to the true value. Furthermore, updating the first model based on the loss function can be achieved, for example, by using gradient descent to update the weight parameters of the first model. During the update process, the weight parameters of all networks in the first model (i.e., the first network and the second network) are updated.
[0144] The ground truth labels for training samples can be represented by 0 or 1, indicating whether the training sample exhibits a corresponding conversion behavior. A ground truth label of 0 indicates that the training sample does not exhibit a corresponding conversion behavior (e.g., the user did not click, download, or register on the training sample), while a ground truth label of 1 indicates that the training sample exhibits a corresponding conversion behavior (e.g., the user clicked, downloaded, or registered on the training sample). The prediction result output by the second network can be any value within the range (0, 1).
[0145] In this embodiment, firstly, identifier features representing the recommended objects corresponding to the training samples are generated based on the features of the training samples, enabling intra-sample knowledge transfer. Then, the features of the training samples and the identifier features are fused and input into a global shared network and a scene-specific network for result prediction, fully learning common and specific information across scenes to achieve cross-scene knowledge transfer. This scheme, by simultaneously performing intra-sample and cross-scene knowledge transfer, reduces the model's dependence on training data, significantly improves knowledge transfer efficiency, effectively supports sparse data samples, and enhances the model's prediction accuracy.
[0146] Understandably, after training the first model and obtaining the second model, it can be deployed to real-world application scenarios. The second model is used to predict the conversion rate of each recommended object based on a sample of input objects. In this way, in real-world application scenarios, the conversion rate of each recommended object can be predicted, enabling the recommendation system to select objects with higher conversion rates based on these rates.
[0147] Optionally, in some embodiments, the loss function described above includes a first sub-loss function and a second sub-loss function, wherein the first sub-loss function is obtained based on the difference between the prediction result and the true label corresponding to the training sample. The second sub-loss function is obtained based on the similarity between different scenes, and the similarity between different scenes is obtained based on the prediction results output by the second network corresponding to different scenes.
[0148] In this approach, the correlation between scenarios is automatically assessed based on the model's prediction results in different scenarios, and a loss function is constructed based on this correlation. This adaptively controls the intensity of knowledge distillation between scenarios, helps establish more effective knowledge transfer pathways between related scenarios, avoids interference from irrelevant knowledge, and improves the model's prediction accuracy.
[0149] Specifically, the similarity between different scenarios can be obtained based on multiple prediction results output by the second network. These multiple prediction results are obtained by fusing the global shared sub-network and different specialized sub-networks to process the first fusion feature. For example, assuming the second network includes N specialized sub-networks, namely specialized sub-network 1 to specialized sub-network N, then the multiple prediction results output by the second network can also be N prediction results, namely prediction result 1 to prediction result N. Among them, prediction result 1 is obtained by fusing the global shared sub-network and specialized sub-network 1 to process the first fusion feature; prediction result 2 is obtained by fusing the global shared sub-network and specialized sub-network 2 to process the first fusion feature; ... prediction result N is obtained by fusing the global shared sub-network and specialized sub-network N to process the first fusion feature.
[0150] In other words, when calculating the first sub-loss function, a specific sub-network is selected in the second network to process the first fusion feature based on the recommendation scenario corresponding to the training sample, thus obtaining a unique prediction result. When calculating the second sub-loss function, the globally shared sub-network and each specific sub-network in the second network are combined to process the first fusion feature, thereby obtaining the prediction result corresponding to each scenario. In this way, by outputting the corresponding prediction results for each scenario, the similarity between different scenarios can be determined based on the multiple output prediction results, achieving the measurement of the correlation between scenarios.
[0151] Optionally, in some embodiments, the loss function described above may include a first sub-loss function and a third sub-loss function. The first sub-loss function is obtained based on the difference between the prediction result and the true label corresponding to the training sample, and the third sub-loss function is obtained based on the difference between a first identifier feature and a second identifier feature. The second identifier feature is obtained by extracting features from the identifier of the recommended object corresponding to the training sample.
[0152] Specifically, different training samples can correspond to the same recommended object, and the identifier of the same recommended object is unique. Therefore, different training samples can correspond to the same second identifier feature. After extracting the second identifier feature from the identifier of the recommended object, a third sub-loss function can be constructed based on the difference between the second identifier feature and the first identifier feature. This allows the first network to be guided by the second identifier feature to generate the first identifier feature. In this way, when the first network processes different training samples corresponding to the same recommended object, it can learn to generate the same identifier feature based on the sample features of different training samples, guided by the third sub-loss function, effectively achieving intra-sample knowledge transfer.
[0153] Optionally, in some embodiments, the loss function used to update the first model may include the first sub-loss function, the second sub-loss function, and the third sub-loss function described above. The first sub-loss function is obtained based on the difference between the prediction result and the true label corresponding to the training sample; the second sub-loss function is obtained based on the similarity between different scenes; and the third sub-loss function is obtained based on the difference between the first and second identifier features.
[0154] Specifically, the first sub-loss function can be understood as the label feature generation loss function, which guides the first network to accurately generate the label features of the recommended objects corresponding to the training samples based on the sample features of the training samples, thereby achieving intra-sample knowledge transfer. The second sub-loss function can be understood as the recommendation prediction loss function, which guides the second network to accurately predict the recommendation results corresponding to the input data. The third sub-loss function can be understood as the knowledge distillation loss function, which guides the second network to learn the correlation between different scenarios, adaptively control the intensity of knowledge distillation between scenarios, help establish more effective knowledge transfer paths between related scenarios, and avoid interference from irrelevant knowledge.
[0155] The above details the process of training samples and constructing corresponding loss functions based on the first and second networks in the first model to achieve the training of the first model.
[0156] Furthermore, the process of fusing sample features and first identifier features in step 403 above will be described in detail below.
[0157] For example, the method of fusing sample features and the first identifier feature is related to the recommendation scenario corresponding to the training sample and / or the running state corresponding to the training sample, wherein the running state of the training sample is used to indicate the relationship between the number of samples of the recommended objects corresponding to the training sample and a preset number. For example, when the number of samples of the recommended objects corresponding to the training sample is less than the preset number, the running state of the training sample is a cold start state; when the number of samples of the recommended objects corresponding to the training sample is greater than or equal to the preset number, the running state of the training sample is a warm start state. When the running state of the training sample is a cold start state, it means that the number of samples of the recommended objects corresponding to the training sample is small, and the recommended objects may be carried by newly placed advertisements, for example; when the running state of the training sample is a warm start state, it means that the number of samples of the recommended objects corresponding to the training sample is large, and the recommended objects may be carried by advertisements that have been placed for a period of time.
[0158] The specific value of the preset quantity can be determined or adjusted according to the actual application scenario. For example, the preset quantity can be 7 or 10, etc., and no specific limit is made here.
[0159] In one possible embodiment, the process of fusing sample features and the first identifier feature may specifically include: based on the running state corresponding to the training samples, fusing the results of multiple feature generation networks processing the concatenated features to obtain a second fused feature. The concatenated feature is obtained by concatenating sample features and the first identifier feature. Optionally, the concatenated feature may also be obtained by concatenating sample features, the first identifier feature, and the second identifier feature.
[0160] For details, please refer to Figure 7 , Figure 7 This is a flowchart illustrating the fusion of sample features and a first identifier feature, provided as an embodiment of this application. Figure 7 As shown, after obtaining the concatenated features by splicing sample features and the first identifier features, the concatenated features are first input into multiple feature generation networks (i.e., feature generation network 1 to feature generation network K) to obtain the result of each feature generation network processing the concatenated features. Then, based on the running state of the training samples, the results of the multiple feature generation networks processing the concatenated features are fused to obtain the second fused feature. That is, the running state of the training samples is used to guide the fusion of the results of the multiple feature generation networks processing the concatenated features.
[0161] Then, based on the recommendation scenario corresponding to the training samples, the results of processing the second fused feature using multiple shared feature networks and a target feature network are combined to obtain the first fused feature. The target feature network is determined from multiple proprietary feature networks based on the recommendation scenario of the training samples. That is, multiple proprietary feature networks correspond one-to-one with multiple recommendation scenarios. When processing the second fused feature, a target feature network needs to be selected from multiple proprietary feature networks to process the second fused feature based on the recommendation scenario to which the training sample corresponding to the second fused feature belongs. For example, the multiple shared feature networks are... Figure 7 The shared feature network shown is 1, and the shared feature network is N; multiple proprietary feature networks can be, for example, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ... Figure 7 The proprietary feature network shown is 1-M; the target feature network can be, for example, proprietary feature network 1.
[0162] In this scheme, the results of the second fusion feature processing are fused based on the recommendation scenario corresponding to the training sample. This enables different feature aggregation methods to be used for different scenarios, thereby obtaining scenario-customized feature representations and effectively improving the prediction accuracy of the model when facing training samples in different scenarios.
[0163] The first model also includes multiple feature generation networks, multiple shared feature networks, and multiple proprietary feature networks. During the training of the first model, the weight parameters of the aforementioned multiple feature generation networks, multiple shared feature networks, and multiple proprietary feature networks also need to be updated synchronously.
[0164] Optionally, based on the operating state corresponding to the training samples, fusing the results of multiple feature generation networks processing the concatenated features may specifically include: weighted summing of the results of multiple feature generation networks processing the concatenated features to obtain a second fused feature; wherein the weights corresponding to the results of multiple feature generation networks processing the concatenated features are determined according to the operating state corresponding to the training samples. For example, the operating state corresponding to the training samples is converted into a feature vector, and each element in this feature vector is used as a weight corresponding to the results of multiple feature generation networks processing the concatenated features in the weighted summing process.
[0165] Similarly, based on the recommendation scenario corresponding to the training samples, the result of processing the second fused feature using multiple shared feature networks and a target feature network can specifically include: weighted summation of the results of processing the second fused feature using multiple shared feature networks and a target feature network to obtain the second fused feature; wherein the weights corresponding to the results of processing the second fused feature using multiple shared feature networks and a target feature network are determined according to the recommendation scenario corresponding to the training samples. For example, the recommendation scenario corresponding to the training samples can be converted into a feature vector, and each element in this feature vector can be used as a weight in the weighted summation process of processing the second fused feature using multiple shared feature networks and a target feature network.
[0166] The training method of the recommendation model provided in the embodiments of this application has been introduced above. The following will describe in detail the specific process of executing the training method of the recommendation model in a practical application scenario with specific examples.
[0167] by Figure 1 Taking the app store display ad scenario shown as an example, the recommendation system often relies on the predicted conversion rate of each ad to display ads to users in the app store, and thus prioritizes showing users ads with higher predicted conversion rates. To predict the conversion rate of each ad, a conversion rate prediction model can be built and trained first. Specifically, the training process of the conversion rate prediction model is as described in steps S1-S4 below.
[0168] Step S1 involves collecting user conversion behaviors for various ads on an advertising recommendation platform (e.g., an app store) to obtain multiple training samples. Since the values in the training samples are discrete, one-hot encoding can be performed to facilitate the conversion of the training samples into features, resulting in encoded values for each training sample. Then, based on the mapping relationship (embedding table) between the encoded values and vectors, the feature vector corresponding to the encoded values of each training sample is determined, thus obtaining the feature representation of the training samples. The mapping relationship between encoded values and vectors can be part of the conversion rate prediction model and updated during the model's training process.
[0169] Furthermore, since each training sample has a corresponding recommendation scenario, and each recommendation scenario has a unique identifier, the original identifier features corresponding to the training sample can also be generated based on the identifier of the recommendation scenario corresponding to the training sample.
[0170] Furthermore, based on the number of recommended objects corresponding to the training sample, each training sample can be defined as a cold start ad or a non-cold start ad. A cold start ad refers to a training sample whose corresponding recommended object has fewer than a preset number of samples; a non-cold start ad refers to a training sample whose corresponding recommended object has more than or equal to a preset number of samples. Therefore, the running state features corresponding to the training sample can also be generated based on its running state (i.e., whether it is a cold start ad or a non-cold start ad).
[0171] Step S2: Input the sample features, original label features, and running status features corresponding to the training samples. Figure 8 In the end-to-end advertising representation generation module shown, the implicit representation of features is obtained, and the identifier feature generation loss function (i.e., the third sub-loss function mentioned above) is calculated. Among these, Figure 8 This is a flowchart illustrating the processing features of multiple modules in a conversion rate model provided in an embodiment of this application.
[0172] Step S3: Input the implicit representation output by the end-to-end advertising representation generation module into the multi-level parameter sharing module. The multi-level parameter sharing module outputs the conversion rate prediction value of each training sample in multiple scenarios, and calculates the recommendation prediction loss function using the conversion rate prediction value of the real scenario to which the training sample belongs and the real label.
[0173] Step S4 involves inputting the multiple conversion rate prediction values output by the multi-level parameter sharing module into the scene-adaptive knowledge distillation module to calculate the knowledge distillation loss function. In this way, the final loss function can be constructed based on the identification feature generation loss function, the prediction loss function, and the knowledge distillation loss function. The model's parameters are then updated based on this loss function, thus achieving model training.
[0174] Specifically, the following will combine Figure 8 The processing flow of each module in steps S2-S3 is described in detail.
[0175] Specifically, step S2 includes the following steps S21-S23. In steps S21-S23, the input to the end-to-end advertising representation generation module includes sample features e. f Original Identifier Features e r and operating status characteristics e c .
[0176] Step S21, use MLP to process sample features e f The process is performed to obtain the generated identifier feature e. g Furthermore, based on the original label features e corresponding to the training samples belonging to non-cold start ads. r and generate identifier feature e g Construct a loss function for generating identifier features. That is, in the non-cold start advertising sample set The MLP used to generate identifier features is trained. Specifically, the identifier feature generation loss function is... The construction process is shown in the following formula.
[0177]
[0178] Step S22, for any training sample, for the original label feature e r and generate identifier features e g Random mixing is performed to obtain the final generated identifier feature e′. g .
[0179] Specifically, for training samples belonging to cold start ads, the generated identifier feature e is uniformly adopted. g As the final generated identifier feature e′ g For training samples that are not cold start ads, the original label features e are randomly selected. r Or generate identifier feature e g As the final generated identifier feature e′ g Specifically, the final generated identifier feature e′ is obtained. g The process is shown in the following formula.
[0180]
[0181] Here, M takes the value 0 or 1, and the probability that M is 0 is p, that is, p is the original identifier feature e. r Select e′ as the final generated identifier feature. gThe probability that M is 1 is 1-p, where 1-p is the probability of selecting and generating the identifier feature e. g As the final generated identifier feature e′ g The probability of.
[0182] Step S23, the original identifier feature e r And the final generated identifier feature e′ g and sample features e f After concatenation, the data is input into T MLPs to obtain the features E output by the T MLPs. Then, the features output by each of the T MLPs are weighted and summed to obtain the advertising representation e. The weights corresponding to the features output by each MLP are based on the running state feature e. c It is determined by [the specific process]. Specifically, the process of obtaining the advertising representation e through multiple MLP processes is shown in the following formula.
[0183] E = {MLP1([e r ;e′ g ;e f ]),…,MLP T ([e r ;e′ g ;e f ])}
[0184] a e =Softmax(W e e c )
[0185] e = E·a e
[0186] Among them, MLP1([e r ;e′ g ;e f ]) indicates that the first MLP processes the original identifier feature e r And the final generated identifier feature e′ g and sample features e f The obtained features, MLP T ([e r ;e′ g ;e f ]) represents the original identifier feature e processed by the Tth MLP. r And the final generated identifier feature e′ g and sample features e f The obtained features, a e Let W be a T-dimensional vector. e These are the weight parameters.
[0187] The above step S3 specifically includes the following steps S31-S33.
[0188] Step S31, the advertising representation e is passed through multiple shared feature networks (i.e. Figure 8 The hidden representation sequence is output after processing the shared feature network 1 (shown as shared feature network M) and a dedicated feature network specific to each scene. in, This represents the feature obtained by the first shared feature network after processing advertisement e. This represents the feature obtained by the Mth shared feature network after processing advertisement e. This represents the features obtained by the proprietary feature network i (i.e., the proprietary feature network exclusive to the recommendation scenario corresponding to the training samples) after processing advertisement e.
[0189] Furthermore, different fusion methods are used to fuse the latent representation sequences (i.e., weighted summation) for different scenarios, thereby obtaining customized features for each scenario. The specific process of step S31 can be shown in the following formula.
[0190] a c =Softmax(W ci e),
[0191]
[0192] Among them, a c W is a vector of 1+M dimensions. ci The weights are the training samples for different recommendation scenarios, and each W represents a different weight. ci h i For customized features, This is a hidden representation sequence.
[0193] Based on the above formula, for the same training sample, we can obtain different customized features corresponding to that training sample in different recommendation scenarios, that is... Figure 8 The h1…h shown M .
[0194] Step S32: For each recommendation scenario, the customized features can be input into a globally shared sub-network, multiple partially shared sub-networks, and a specific sub-network corresponding to the recommendation scenario for prediction. The globally shared sub-network and the specific sub-network output the prediction results respectively. and For multiple partially shared subnetworks, the prediction results output by these subnetworks are weighted and summed, with the weight of each subnetwork determined based on the recommendation scenario. Specifically, the process of fusing the prediction results output by multiple partially shared subnetworks is shown in the following formula.
[0195]
[0196] a t =Softmax(W t e s ),
[0197]
[0198] in, W represents the prediction results output by multiple partially shared subnetworks. t e is the weight parameter s For scene identification features, a t Let K be a vector. The result is obtained by fusing the prediction results of multiple shared subnetworks.
[0199] Step S33: Aggregate the prediction results obtained from different networks to obtain the final prediction result output by the model, and calculate the recommendation prediction loss function based on this prediction result and the true labels. The calculation method of the recommendation prediction loss function is shown in the following formula.
[0200]
[0201]
[0202] in, The final prediction result output by the model. The prediction results are output by the globally shared subnetwork. The result is obtained by fusing the prediction results of multiple shared subnetworks. The prediction result is output by the proprietary subnetwork, where σ is a hyperparameter. To recommend the prediction loss function, s i The scene identifier representing sample i, y i For real labels, This refers to the final prediction result output by the model in the real-world scenario of the training samples.
[0203] The above step S4 specifically includes the following steps S41-S43.
[0204] Step S41: Measure the absolute distance d between scenarios i and j based on the distance between the prediction results in different scenarios. i,j :
[0205]
[0206] in, The prediction result for the k-th training sample in the i-th scene. This represents the prediction result of the k-th training sample in the j-th scenario.
[0207] Step S42: Normalize the distance based on the average distance of the scenes to obtain the relative distance between scenes.
[0208]
[0209] Where N is the number of scenes.
[0210] Step S43: Calculate scene similarity w based on the relative distance between scenes. i,j And calculate the adaptive weighted knowledge distillation loss function:
[0211]
[0212]
[0213] in, Let i be the similarity between the i-th scene and the j-th scene. For the knowledge distillation loss function, The prediction results for the real-world scenarios corresponding to the training samples. This represents the prediction result for the j-th scene corresponding to the training sample.
[0214] The methods provided in the embodiments of this application have been described in detail above. Next, the device for performing the above methods provided in the embodiments of this application will be described.
[0215] Please see Figure 9 , Figure 9 This is a schematic diagram of the structure of a training device for a recommendation model provided in an embodiment of this application. Figure 9 As shown, the training device for the recommendation model includes: an acquisition module 901, used to acquire training samples, wherein the training samples are samples in the content recommendation scenario;
[0216] The processing module 902 is used to input training samples into the first network to obtain sample features and first identifier features output by the first network. The sample features are obtained by performing feature extraction on the training samples, and the first identifier features are obtained by performing processing on the sample features. The first identifier features are used to characterize the recommended object corresponding to the training sample.
[0217] Processing module 902 is also used to fuse sample features and first identifier features to obtain first fused features;
[0218] The processing module 902 is also used to input the first fusion feature into the second network to obtain the prediction result output by the second network. The second network includes a globally shared sub-network and multiple proprietary sub-networks. The prediction result is obtained by processing the first fusion feature by fusing the globally shared sub-network and the target sub-network. The target sub-network is determined among multiple proprietary sub-networks based on the recommendation scenario corresponding to the training samples.
[0219] The processing module 902 is also used to update the first model based on the loss function. The first model includes a first network and a second network. The loss function is obtained based on the difference between the prediction result and the real label corresponding to the training sample.
[0220] In one possible implementation, the loss function includes a first sub-loss function and a second sub-loss function. The first sub-loss function is obtained based on the difference between the prediction result and the real label corresponding to the training sample, and the second sub-loss function is obtained based on the similarity between different scenes. The similarity between different scenes is obtained based on the prediction results output by the second network corresponding to different scenes.
[0221] In one possible implementation, the similarity between different scenarios is obtained based on multiple prediction results output by the second network. These multiple prediction results are obtained by fusing the global shared sub-network and different proprietary sub-networks to process the first fused feature.
[0222] In one possible implementation, the loss function includes a first sub-loss function and a third sub-loss function. The first sub-loss function is obtained based on the difference between the prediction result and the true label corresponding to the training sample. The third sub-loss function is obtained based on the difference between the first label feature and the second label feature. The second label feature is obtained by feature extraction of the label of the recommended object corresponding to the training sample.
[0223] In one possible implementation, the processing module 902 is further configured to fuse sample features, first identifier features, and second identifier features to obtain a first fused feature.
[0224] In one possible implementation, the second network further includes multiple partially shared subnetworks. The prediction result is obtained by fusing the first result, the second result, and the third result. The first result is the result of the global shared subnetwork processing the first fused feature, the second result is the result of the target subnetwork processing the first fused feature, and the third result is obtained by fusing the results of multiple partially shared subnetworks processing the first fused feature based on the recommendation scenario corresponding to the training samples.
[0225] In one possible implementation, the method of fusing sample features and first identifier features is related to the recommendation scenario corresponding to the training sample and / or the running state corresponding to the training sample, wherein the running state is used to indicate the size relationship between the number of samples of the recommendation object corresponding to the training sample and a preset number.
[0226] In one possible implementation, the processing module 902 is further configured to:
[0227] Based on the running state corresponding to the training samples, the results of multiple feature generation networks processing the spliced features are combined to obtain the second fused feature. The spliced feature is obtained by splicing the sample features and the first identifier feature.
[0228] Based on the recommendation scenario corresponding to the training samples, the result of processing the second fused feature by fusing multiple shared feature networks and target feature networks is used to obtain the first fused feature, wherein the target feature network is determined from multiple proprietary feature networks according to the recommendation scenario;
[0229] The first model also includes multiple feature generation networks, multiple shared feature networks, and multiple proprietary feature networks.
[0230] In one possible implementation, the processing module 902 is further configured to:
[0231] The results of processing the spliced features by multiple feature generation networks are weighted and summed to obtain the second fused feature;
[0232] The weights corresponding to the results of multiple feature generation networks processing the spliced features are determined based on the running state of the training samples.
[0233] Please see Figure 10 , Figure 10 This is a schematic diagram of an execution device provided in an embodiment of this application. The execution device 1000 can specifically be a mobile phone, tablet, laptop, smart wearable device, server, etc., and is not limited thereto. Specifically, the execution device 1000 includes: a receiver 1001, a transmitter 1002, a processor 1003, and a memory 1004 (wherein the execution device 1000 may have one or more processors 1003). Figure 10 (Taking a processor as an example), processor 1003 may include application processor 10031 and communication processor 10032. In some embodiments of this application, receiver 1001, transmitter 1002, processor 1003 and memory 1004 may be connected via bus or other means.
[0234] Memory 1004 may include read-only memory and random access memory, and provides instructions and data to processor 1003. A portion of memory 1004 may also include non-volatile random access memory (NVRAM). Memory 1004 stores processor and operation instructions, executable modules, or data structures, or subsets thereof, or extended sets thereof, wherein the operation instructions may include various operation instructions for implementing various operations.
[0235] Processor 1003 controls the operation of the execution device. In specific applications, the various components of the execution device are coupled together through a bus system, which may include not only the data bus, but also power buses, control buses, and status signal buses. However, for clarity, all buses are referred to as the bus system in the diagram.
[0236] The methods disclosed in the embodiments of this application described above can be applied to processor 1003, or implemented by processor 1003. Processor 1003 can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit in the hardware of processor 1003 or by instructions in the form of software. The processor 1003 described above can be a general-purpose processor, a digital signal processor (DSP), a microprocessor or a microcontroller, and may further include an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0237] The processor 1003 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory 1004. The processor 1003 reads information from memory 1004 and, in conjunction with its hardware, completes the steps of the above methods.
[0238] Receiver 1001 can be used to receive input digital or character information, and to generate signal inputs related to the settings and function control of the execution device. Transmitter 1002 can be used to output digital or character information through the first interface; transmitter 1002 can also be used to send instructions to the disk group through the first interface to modify the data in the disk group; transmitter 1002 may also include a display device such as a display screen.
[0239] The electronic device provided in this application embodiment can specifically be a chip, which includes a processing unit and a communication unit. The processing unit can be, for example, a processor, and the communication unit can be, for example, an input / output interface, pins, or circuits. The processing unit can execute computer execution instructions stored in the storage unit to cause the chip in the execution device to execute the model structure determination method described in the above embodiments, or to cause the chip in the training device to execute the model structure determination method described in the above embodiments. Optionally, the storage unit can be an internal storage unit within the chip, such as a register or cache. Alternatively, the storage unit can be an external storage unit located within the wireless access device, such as a read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions, such as random access memory (RAM).
[0240] For details, please refer to Figure 11 , Figure 11 This is a schematic diagram of a chip provided in an embodiment of this application. The chip can be represented as a neural network processor (NPU) 1100. The NPU 1100 is mounted as a coprocessor on the host CPU, and tasks are assigned by the host CPU. The core part of the NPU is the arithmetic circuit 1103, which is controlled by the controller 1104 to extract matrix data from the memory and perform multiplication operations.
[0241] In some implementations, the arithmetic circuit 1103 internally includes multiple processing engines (PEs). In some implementations, the arithmetic circuit 1103 is a two-dimensional pulsating array. The arithmetic circuit 1103 can also be a one-dimensional pulsating array or other electronic circuits capable of performing mathematical operations such as multiplication and addition. In some implementations, the arithmetic circuit 1103 is a general-purpose matrix processor.
[0242] For example, suppose we have an input matrix A, a weight matrix B, and an output matrix C. The arithmetic circuit retrieves the corresponding data of matrix B from the weight memory 1102 and caches it in each PE of the arithmetic circuit. The arithmetic circuit retrieves the data of matrix A from the input memory 1101 and performs matrix operations with matrix B. The partial result or the final result of the obtained matrix is stored in the accumulator 1108.
[0243] Unified memory 1106 is used to store input and output data. Weight data is directly transferred to weight memory 1102 via Direct Memory Access Controller (DMAC) 1105. Input data is also transferred to unified memory 1106 via DMAC.
[0244] BIU stands for Bus Interface Unit, which is used for interaction between the AXI bus and the DMAC and the Instruction Fetch Buffer (IFB) 1109.
[0245] The Bus Interface Unit (BIU) 1110 is used by the instruction fetch memory 1109 to fetch instructions from external memory, and also by the memory access controller 1105 to fetch the original data of the input matrix A or the weight matrix B from external memory.
[0246] The DMAC is mainly used to move input data from external memory DDR to unified memory 1106, or to weight data to weight memory 1102, or to input data to input memory 1101.
[0247] The vector computation unit 1107 includes multiple processing units that, when needed, further process the output of the computation circuit 1103, such as vector multiplication, vector addition, exponential operations, logarithmic operations, size comparisons, etc. It is mainly used for computation in non-convolutional / fully connected layers of neural networks, such as batch normalization, pixel-level summation, and upsampling of feature planes.
[0248] In some implementations, vector computation unit 1107 can store the processed output vector in unified memory 1106. For example, vector computation unit 1107 can apply a linear function, or a nonlinear function, to the output of computation circuit 1103, such as linear interpolation of feature planes extracted by convolutional layers, or, for example, a vector of accumulated values, to generate activation values. In some implementations, vector computation unit 1107 generates normalized values, pixel-level summed values, or both. In some implementations, the processed output vector can be used as activation input to computation circuit 1103, for example, for use in subsequent layers of the neural network.
[0249] The instruction fetch buffer 1109 connected to the controller 1104 is used to store the instructions used by the controller 1104;
[0250] Unified memory 1106, input memory 1101, weight memory 1102, and instruction fetch memory 1109 are all on-chip memories. External memory is proprietary to this NPU hardware architecture.
[0251] The processor mentioned above can be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits used to control the execution of the above program.
[0252] Please refer to Figure 12 , Figure 12 This is a schematic diagram of a computer-readable storage medium provided in an embodiment of this application. This application also provides a computer-readable storage medium in some embodiments, wherein the above-described... Figure 6 The disclosed method can be implemented as computer program instructions encoded in a machine-readable format on a computer-readable storage medium or on other non-transitory media or articles of art.
[0253] Figure 12 A conceptual partial view of an example computer-readable storage medium arranged according to at least some of the embodiments shown herein is illustrated schematically. The example computer-readable storage medium includes a computer program for executing computer processes on a computing device.
[0254] In one embodiment, the computer-readable storage medium 1200 is provided using a signal bearer medium 1201. The signal bearer medium 1201 may include one or more program instructions 1202, which, when executed by one or more processors, can provide the above-mentioned... Figure 6 The described function or part of the function.
[0255] In some examples, signal carrying medium 1201 may include computer-readable medium 1203, such as, but not limited to, hard disk drive, compact disc (CD), digital video disc (DVD), digital magnetic tape, memory, ROM or RAM, etc.
[0256] In some embodiments, the signal-bearing medium 1201 may comprise a computer-recordable medium 1204, such as, but not limited to, a memory, a read / write (R / W) CD, a R / W DVD, etc. In some embodiments, the signal-bearing medium 1201 may comprise a communication medium 1205, such as, but not limited to, digital and / or analog communication media (e.g., fiber optic cables, waveguides, wired communication links, wireless communication links, etc.). Therefore, for example, the signal-bearing medium 1201 may be transmitted by a wireless communication medium 1205 (e.g., a wireless communication medium conforming to the IEEE 802.X standard or other transmission protocols).
[0257] One or more program instructions 1202 may be, for example, computer-executable instructions or logical implementation instructions. In some examples, the computing device may be configured to provide various operations, functions, or actions in response to one or more program instructions 1202 conveyed to the computing device via a computer-readable medium 1203, a computer-recordable medium 1204, and / or a communication medium 1205.
[0258] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the accompanying drawings of the device embodiments provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.
[0259] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods of the various embodiments of this application.
[0260] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.
[0261] A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, computer instructions may be transferred from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
Claims
1. A method for training a recommendation model, characterized in that, include: Obtain training samples, which are samples in the content recommendation scenario. The training samples include information about the recommended object, user behavior data generated for the recommended object, and the state when the behavior data is generated. The training samples are input into a first network to obtain sample features and a first identifier feature output by the first network. The sample features are obtained by performing feature extraction on the training samples, and the first identifier feature is obtained by processing the sample features. The first identifier feature is used to characterize the recommended object corresponding to the training sample. The sample features and the first identifier features are fused to obtain the first fused feature; The first fused feature is input into the second network to obtain the prediction result output by the second network. The second network includes a global shared sub-network and multiple proprietary sub-networks. The prediction result is obtained by processing the first fused feature by fusing the global shared sub-network and the target sub-network. The target sub-network is determined among the multiple proprietary sub-networks based on the recommendation scenario corresponding to the training sample. Based on the loss function, the first model is updated. The first model includes the first network and the second network. The loss function is obtained based on the difference between the prediction result and the real label corresponding to the training sample. The real label is used to indicate whether the training sample has the corresponding conversion behavior.
2. The method according to claim 1, characterized in that, The loss function includes a first sub-loss function and a second sub-loss function. The first sub-loss function is obtained based on the difference between the prediction result and the real label corresponding to the training sample. The second sub-loss function is obtained based on the similarity between different scenes. The similarity between different scenes is obtained based on the prediction results output by the second network corresponding to different scenes.
3. The method according to claim 2, characterized in that, The similarity between different scenarios is obtained based on multiple prediction results output by the second network. These multiple prediction results are obtained by fusing the global shared sub-network and different proprietary sub-networks to process the first fused feature.
4. The method according to any one of claims 1-3, characterized in that, The loss function includes a first sub-loss function and a third sub-loss function. The first sub-loss function is obtained based on the difference between the prediction result and the real label corresponding to the training sample. The third sub-loss function is obtained based on the difference between the first identifier feature and the second identifier feature. The second identifier feature is obtained by feature extraction of the identifier of the recommended object corresponding to the training sample.
5. The method according to claim 4, characterized in that, The process of fusing the sample features and the first identifier features to obtain the first fused feature includes: The first fused feature is obtained by fusing the sample features, the first identifier feature, and the second identifier feature.
6. The method according to any one of claims 1-5, characterized in that, The second network further includes multiple partially shared subnetworks. The prediction result is obtained by fusing the first result, the second result, and the third result. The first result is the result of the global shared subnetwork processing the first fused feature. The second result is the result of the target subnetwork processing the first fused feature. The third result is obtained by fusing the results of the multiple partially shared subnetworks processing the first fused feature based on the recommendation scenario corresponding to the training sample.
7. The method according to any one of claims 1-6, characterized in that, The method of fusing the sample features and the first identifier features is related to the recommendation scenario corresponding to the training sample and / or the running state corresponding to the training sample, wherein the running state is used to indicate the size relationship between the number of samples of the recommendation object corresponding to the training sample and a preset number.
8. The method according to claim 7, characterized in that, The process of fusing the sample features and the first identifier features to obtain the first fused feature includes: Based on the running state corresponding to the training samples, the results of processing the spliced features by multiple feature generation networks are fused to obtain a second fused feature, which is obtained by splicing the sample features and the first identifier feature; Based on the recommendation scenario corresponding to the training samples, the first fusion feature is obtained by processing the second fusion feature with the result of fusing multiple shared feature networks and a target feature network, wherein the target feature network is determined from multiple proprietary feature networks according to the recommendation scenario. The first model further includes the plurality of feature generation networks, the plurality of shared feature networks, and the plurality of proprietary feature networks.
9. The method according to claim 8, characterized in that, The second fused feature is obtained by fusing the results of multiple feature generation networks processing the concatenated features based on the running state corresponding to the training samples, including: The results of the processing of the spliced features by the multiple feature generation networks are weighted and summed to obtain the second fused feature; The weights corresponding to the results of the processing of the spliced features by the multiple feature generation networks are determined based on the running state of the training samples.
10. A training device for a recommendation model, characterized in that, include: The acquisition module is used to acquire training samples, which are samples in the content recommendation scenario. The training samples include information about the recommendation object, user behavior data generated for the recommendation object, and the state when the behavior data is generated. The processing module is used to input the training samples into a first network to obtain sample features and a first identifier feature output by the first network, wherein the sample features are obtained by performing feature extraction on the training samples, the first identifier feature is obtained by processing the sample features, and the first identifier feature is used to characterize the recommendation object corresponding to the training sample. The processing module is further configured to fuse the sample features and the first identifier features to obtain a first fused feature; The processing module is further configured to input the first fused feature into the second network to obtain the prediction result output by the second network. The second network includes a globally shared sub-network and multiple proprietary sub-networks. The prediction result is obtained by processing the first fused feature by fusing the globally shared sub-network and the target sub-network. The target sub-network is determined among the multiple proprietary sub-networks based on the recommendation scenario corresponding to the training sample. The processing module is further configured to update a first model based on a loss function. The first model includes a first network and a second network. The loss function is obtained based on the difference between the prediction result and the real label corresponding to the training sample. The real label is used to indicate whether the training sample has a corresponding conversion behavior.
11. The apparatus according to claim 10, characterized in that, The loss function includes a first sub-loss function and a second sub-loss function. The first sub-loss function is obtained based on the difference between the prediction result and the real label corresponding to the training sample. The second sub-loss function is obtained based on the similarity between different scenes. The similarity between different scenes is obtained based on the prediction results output by the second network corresponding to different scenes.
12. The apparatus according to claim 11, characterized in that, The similarity between different scenarios is obtained based on multiple prediction results output by the second network. These multiple prediction results are obtained by fusing the global shared sub-network and different proprietary sub-networks to process the first fused feature.
13. The apparatus according to any one of claims 10-12, characterized in that, The loss function includes a first sub-loss function and a third sub-loss function. The first sub-loss function is obtained based on the difference between the prediction result and the real label corresponding to the training sample. The third sub-loss function is obtained based on the difference between the first identifier feature and the second identifier feature. The second identifier feature is obtained by feature extraction of the identifier of the recommended object corresponding to the training sample.
14. The apparatus according to claim 13, characterized in that, The processing module is further configured to fuse the sample features, the first identifier feature, and the second identifier feature to obtain the first fused feature.
15. The apparatus according to any one of claims 10-14, characterized in that, The second network further includes multiple partially shared subnetworks. The prediction result is obtained by fusing the first result, the second result, and the third result. The first result is the result of the global shared subnetwork processing the first fused feature. The second result is the result of the target subnetwork processing the first fused feature. The third result is obtained by fusing the results of the multiple partially shared subnetworks processing the first fused feature based on the recommendation scenario corresponding to the training sample.
16. The apparatus according to any one of claims 10-15, characterized in that, The method of fusing the sample features and the first identifier features is related to the recommendation scenario corresponding to the training sample and / or the running state corresponding to the training sample, wherein the running state is used to indicate the size relationship between the number of samples of the recommendation object corresponding to the training sample and a preset number.
17. The apparatus according to claim 16, characterized in that, The processing module is further configured to: Based on the running state corresponding to the training samples, the results of processing the spliced features by multiple feature generation networks are fused to obtain a second fused feature, which is obtained by splicing the sample features and the first identifier feature; Based on the recommendation scenario corresponding to the training samples, the first fusion feature is obtained by processing the second fusion feature with the result of fusing multiple shared feature networks and a target feature network, wherein the target feature network is determined from multiple proprietary feature networks according to the recommendation scenario. The first model further includes the plurality of feature generation networks, the plurality of shared feature networks, and the plurality of proprietary feature networks.
18. The apparatus according to claim 17, characterized in that, The processing module is further configured to: The results of the processing of the spliced features by the multiple feature generation networks are weighted and summed to obtain the second fused feature; The weights corresponding to the results of the processing of the spliced features by the multiple feature generation networks are determined based on the running state of the training samples.
19. A training device for a recommendation model, characterized in that, The device includes a memory and a processor; the memory stores code, and the processor is configured to execute the code, wherein when the code is executed, the device performs the method as described in any one of claims 1 to 9.
20. A computer storage medium, characterized in that, The computer storage medium stores instructions that, when executed by the computer, cause the computer to perform the method according to any one of claims 1 to 9.
21. A computer program product, characterized in that, The computer program product stores instructions that, when executed by a computer, cause the computer to perform the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Information recommendation model determination method and information recommendation method and device
CN113127727A
Recommendation probability prediction method and device, computer storage medium and electronic equipment
CN114117216A