Training methods, devices, and click-through rate (CTR) prediction models
By improving knowledge distillation technology and combining the training of teacher and student models, the training process of the click-through rate prediction model is optimized, solving the problems of long training process and high resource consumption, and achieving efficient model training and accurate click-through rate prediction.
Patent Information
- Application Number
- CN202311443214.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-01
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2043-11-01
AI Technical Summary
The training process for existing click-through rate prediction models is lengthy, inefficient, and has limited room for improvement. This is especially true for deep learning models, which result in increased online service time and excessive server resource consumption.
An improved knowledge distillation technique is employed to train both teacher and student models simultaneously. The intermediate hidden layer vectors and click-through rate prediction scores of the teacher model are used to supervise the student model. The training loss of the student model is optimized by combining distillation coefficients and fusion weights, thereby shortening the training process and improving model performance.
The training process for click-through rate prediction models has been simplified, training efficiency has been improved, resource consumption for online services has been reduced, and the prediction accuracy and efficiency of the models have been enhanced.
Smart Images

Figure CN117763343B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of deep learning technology, and in particular to a training method, apparatus and method for a click-through rate (CTR) prediction model. Background Technology
[0002] In the digital age, users are both the end users and critics of products or services, and their individual needs and preferences vary. To meet these needs, intelligent digital operation systems tailored to each user have become an indispensable part of various mobile apps.
[0003] The core component of a digital operations system is the click-through rate (CTR) prediction model. Given candidate content, user information, and contextual information, the model predicts the probability of a user clicking on the candidate content. The system then ranks the probabilities and selects the candidate content with the highest probability to push to the user. CTR analysis is of great significance in areas such as wealth management products, bill products, and financing product recommendation sections on personal mobile banking, corporate mobile banking, and interbank partner platform apps.
[0004] With the development of artificial intelligence technology, click-through rate (CTR) prediction models have evolved from simple linear models to deep learning models. These models are more complex and offer increasingly higher prediction accuracy. However, this has also brought challenges to online services. More complex models significantly increase the time required for CTR prediction and necessitate more server resources for recommendation services. Therefore, it is necessary to research model simplification techniques to simplify the model while maintaining prediction accuracy, thereby reducing CTR prediction time and conserving online server resources.
[0005] The existing solution uses distillation to simplify the model. First, the teacher model (a more complex model) is trained, and then the output score of the teacher model is used to supervise the training of the student model (a simpler model). This process of knowledge distillation simplifies the model and improves its performance.
[0006] However, the above scheme has at least the following problems: 1) The teacher model needs to be trained first before the student model can be trained, which will result in a long training process and low training efficiency; 2) Only the model output score is used for distillation, and there is still a lot of room for improvement in the model performance. Summary of the Invention
[0007] This application provides a training method, apparatus, and method for a click-through rate (CTR) prediction model, which shortens the training process of the CTR prediction model and improves the training effect of the model.
[0008] The embodiments of this application adopt the following technical solutions:
[0009] In a first aspect, embodiments of this application provide a method for training a click-through rate (CTR) prediction model, the method comprising:
[0010] Obtain training sample data for the click-through rate prediction model;
[0011] The teacher model is trained using the training sample data to obtain the first intermediate hidden layer vector and the first click-through rate prediction score output by the teacher model.
[0012] The student model is trained using the training sample data to obtain the second intermediate hidden layer vector and the second click-through rate prediction score output by the student model, as well as the training loss of the student model.
[0013] The fusion loss of the student model is determined based on the first intermediate hidden layer vector, the first click-through rate prediction score, the second intermediate hidden layer vector, the second click-through rate prediction score, and the training loss of the student model.
[0014] The parameters of the student model are updated using the fusion loss of the student model, and the updated student model is used as the click-through rate prediction model after training.
[0015] Optionally, determining the fusion loss of the student model based on the first intermediate hidden layer vector, the first click-through rate prediction score, the second intermediate hidden layer vector, the second click-through rate prediction score, and the training loss of the student model includes:
[0016] The intermediate hidden layer loss of the student model is determined based on the first intermediate hidden layer vector and the second intermediate hidden layer vector;
[0017] The click-through rate (CTR) prediction loss of the student model is determined based on the first CTR prediction score and the second CTR prediction score.
[0018] The intermediate hidden layer loss, click-through rate prediction loss, and training loss of the student model are fused using a preset fusion strategy to obtain the fusion loss of the student model.
[0019] Optionally, the preset fusion strategy includes distillation coefficients, and the fusion of the intermediate hidden layer loss, click-through rate prediction loss, and training loss of the student model using the preset fusion strategy to obtain the fusion loss of the student model includes:
[0020] Based on the training sample data, the first click-through rate prediction score, and the second click-through rate prediction score, determine the distillation coefficient corresponding to the intermediate hidden layer loss and the distillation coefficient corresponding to the click-through rate prediction loss of the student model;
[0021] The fusion loss of the student model is obtained by fusing the intermediate hidden layer loss and its corresponding distillation coefficient, the click-through rate prediction loss and its corresponding distillation coefficient, and the training loss.
[0022] Optionally, the training sample data includes user click tags corresponding to the recommended content, and determining the distillation coefficients corresponding to the intermediate hidden layer loss and the click-through rate prediction loss of the student model based on the training sample data, the first click-through rate prediction score, and the second click-through rate prediction score includes:
[0023] If the user click tag is "click" and the second estimated click-through rate score is less than the first estimated click-through rate score, or if the user click tag is "not clicked" and the second estimated click-through rate score is greater than the first estimated click-through rate score, then the distillation coefficients corresponding to the intermediate hidden layer loss and the estimated click-through rate loss are both determined to be equal to 1.
[0024] Otherwise, the distillation coefficients corresponding to the intermediate hidden layer loss and the click-through rate prediction loss are both set to 0.
[0025] Optionally, the preset fusion strategy includes fusion weights. The fusion of the intermediate hidden layer loss, click-through rate prediction loss, and training loss of the student model using the preset fusion strategy to obtain the fusion loss of the student model includes:
[0026] The fusion weights corresponding to the intermediate hidden layer loss and the click-through rate prediction loss of the student model are determined based on the training sample data.
[0027] The fusion loss of the student model is obtained by fusing the intermediate hidden layer loss and corresponding fusion weights, the click-through rate prediction loss and corresponding fusion weights, and the training loss.
[0028] Optionally, the training sample data includes the number of training samples, and determining the fusion weights corresponding to the intermediate hidden layer loss and the click-through rate prediction loss of the student model based on the training sample data includes:
[0029] The total number of training batches is determined based on the number of training samples.
[0030] The fusion weights corresponding to the intermediate hidden layer loss and the click-through rate prediction loss are dynamically adjusted based on the range of fusion weight values, the total training batch, and the current training batch.
[0031] Optionally, the step of dynamically adjusting the fusion weights corresponding to the intermediate hidden layer loss and the click-through rate prediction loss based on the value range of the fusion weights, the total training batches, and the current training batch includes:
[0032] The current fusion weight corresponding to the intermediate hidden layer loss is determined based on the value range of the fusion weight corresponding to the intermediate hidden layer loss, the total training batch, and the current training batch, wherein the current fusion weight corresponding to the intermediate hidden layer loss decreases monotonically with the current training batch.
[0033] The current fusion weight corresponding to the click-through rate prediction loss is determined based on the value range of the fusion weight corresponding to the click-through rate prediction loss, the total training batch, and the current training batch, wherein the current fusion weight corresponding to the click-through rate prediction loss monotonically increases with the current training batch.
[0034] Secondly, embodiments of this application also provide a click-through rate (CTR) prediction method, the CTR prediction method comprising:
[0035] Obtain the content to be estimated;
[0036] Input the content to be estimated into the click-through rate prediction model to obtain the click-through rate prediction score of the content to be estimated.
[0037] The click-through rate prediction model is trained based on the training method of any of the aforementioned click-through rate prediction models.
[0038] Thirdly, embodiments of this application also provide a training apparatus for a click-through rate (CTR) prediction model, the training apparatus comprising:
[0039] The first acquisition unit is used to acquire training sample data for the click-through rate prediction model;
[0040] The first training unit is used to train the teacher model using the training sample data to obtain the first intermediate hidden layer vector and the first click-through rate prediction score output by the teacher model.
[0041] The second training unit is used to train the student model using the training sample data, and obtain the second intermediate hidden layer vector and the second click-through rate prediction score output by the student model, as well as the training loss of the student model.
[0042] The fusion unit is used to determine the fusion loss of the student model based on the first intermediate hidden layer vector, the first click-through rate prediction score, the second intermediate hidden layer vector, the second click-through rate prediction score, and the training loss of the student model.
[0043] The update unit is used to update the parameters of the student model using the fusion loss of the student model, and use the updated student model as the click-through rate prediction model after training.
[0044] Fourthly, embodiments of this application also provide a click-through rate (CTR) prediction device, the CTR prediction device comprising:
[0045] The second acquisition unit is used to acquire content to be recommended.
[0046] The prediction unit is used to input the content to be recommended into the click-through rate prediction model to obtain the click-through rate prediction score of the content to be recommended.
[0047] The click-through rate prediction model is trained based on the training method of any of the aforementioned click-through rate prediction models.
[0048] Fifthly, embodiments of this application also provide an electronic device, including:
[0049] Processor; and
[0050] A memory configured to store computer-executable instructions, which, when executed, cause the processor to perform either the training method for any of the aforementioned click-through rate prediction models or the aforementioned click-through rate prediction method.
[0051] Sixthly, embodiments of this application also provide a computer-readable storage medium storing one or more programs, which, when executed by an electronic device including multiple applications, cause the electronic device to perform either the training method of any of the aforementioned click-through rate prediction models or the aforementioned click-through rate prediction method.
[0052] The above-mentioned technical solutions adopted in the embodiments of this application can achieve the following beneficial effects: The training method of the click-through rate (CTR) prediction model in the embodiments of this application first obtains training sample data of the CTR prediction model; then, it uses the training sample data to train the teacher model, obtaining the first intermediate hidden layer vector and the first CTR prediction score output by the teacher model; then, it uses the training sample data to train the student model, obtaining the second intermediate hidden layer vector and the second CTR prediction score output by the student model, as well as the training loss of the student model; then, it determines the fusion loss of the student model based on the first intermediate hidden layer vector, the first CTR prediction score, the second intermediate hidden layer vector, the second CTR prediction score, and the training loss of the student model; finally, it uses the fusion loss of the student model to update the parameters of the student model, and uses the updated student model as the trained CTR prediction model. The training method of the CTR prediction model in the embodiments of this application improves the traditional knowledge distillation technique, trains both the teacher model and the student model simultaneously, simplifies the CTR prediction model, shortens the model training process, and considers the distillation of the intermediate hidden layer vector of the teacher model during the training process, thereby improving the model performance. Attached Figure Description
[0053] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0054] Figure 1 This is a flowchart illustrating a training method for a click-through rate prediction model in an embodiment of this application.
[0055] Figure 2 This is a logical diagram illustrating a distillation coefficient setting in an embodiment of this application;
[0056] Figure 3 This is a schematic diagram of the training process of a click-through rate prediction model in an embodiment of this application;
[0057] Figure 4 This is a flowchart illustrating a click-through rate prediction method in an embodiment of this application.
[0058] Figure 5 This is a schematic diagram of the structure of a training device for a click-through rate prediction model in an embodiment of this application;
[0059] Figure 6 This is a schematic diagram of the structure of a click-through rate prediction device according to an embodiment of this application;
[0060] Figure 7 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0061] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0062] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.
[0063] This application provides a method for training a click-through rate (CTR) prediction model, such as... Figure 1 The diagram illustrates a flowchart of a click-through rate (CTR) prediction model training method according to an embodiment of this application. The CTR prediction model training method includes at least the following steps S110 to S150:
[0064] Step S110: Obtain training sample data for the click-through rate prediction model.
[0065] In this embodiment of the application, when training the click-through rate (CTR) prediction model, it is necessary to first obtain training sample data for training the CTR prediction model. This training sample data can be extracted from the log information of the system in which the CTR prediction model is deployed.
[0066] For example, user information, recommended content, and recommendation context can be extracted from system log information to construct training sample data. Each training sample data can consist of four parts: user features (such as gender, age, and other attribute features), recommended content features (item), context features (context), and user click label (whether the user clicked the recommended content, for example, 1 indicates a click and 0 indicates no click), namely [Feature(user), Feature(item), Feature(context), Label].
[0067] Step S120: Train the teacher model using the training sample data to obtain the first intermediate hidden layer vector and the first click-through rate prediction score output by the teacher model.
[0068] The above training sample data is input into the teacher model with a predefined network structure to train the teacher model. The first intermediate hidden layer vector output by the intermediate layer of the teacher model and the first click-through rate prediction score output by the last layer are obtained. The first intermediate hidden layer vector represents the feature learning result of the intermediate layer of the teacher model, and the first click-through rate prediction score represents the click-through rate prediction result of the final output of the teacher model.
[0069] The network structure of the teacher model can be defined based on existing convolutional neural networks. For example, the teacher model can consist of N fully connected layers and an input layer. The number of fully connected layers can be 1 / 2 to 2 / 3 of the total number of layers in the teacher model. The number should not be too small or too large. If it is too small, the model will not perform well, and if it is too large, it will not play a compression role.
[0070] The intermediate hidden state output vector can be represented as Vector_t. The output dimension of the last fully connected layer is 1 (the output vector dimension of other fully connected layers is not 1). Finally, after transformation by the Sigmoid function, the final click-through rate prediction score output by the teacher model is obtained, which can be represented as score_t.
[0071] The intermediate hidden layer vector of the teacher model mentioned above can be, for example, the feature vector output by the fully connected layer of the N / 2th layer. Of course, those skilled in the art can flexibly adjust the selection according to actual needs, and no specific limitation is made here.
[0072] Step S130: Train the student model using the training sample data to obtain the second intermediate hidden layer vector and the second click-through rate prediction score output by the student model, as well as the training loss of the student model.
[0073] While training the teacher model, the aforementioned training sample data is input into the student model with a predefined network structure. This yields the second intermediate hidden layer vector output by the intermediate layer of the student model, the second click-through rate prediction score output by the last layer, and the student model's training loss (student loss). The second intermediate hidden layer vector represents the feature learning result of the intermediate layer of the student model, the second click-through rate prediction score represents the final click-through rate prediction result output by the student model, and the student model's training loss represents the loss incurred during model training using the training samples.
[0074] The network structure of the student model can also be defined based on existing convolutional neural networks. For example, the student model can consist of M fully connected layers and an input layer. The hidden vectors output by the intermediate hidden states can be represented as Vector_s, where Vector_s and Vector_t have the same dimension. The output dimension of the last fully connected layer is 1 (the output vectors of other fully connected layers do not have a dimension of 1). Finally, after transformation by the sigmoid function, the final click-through rate prediction score of the student model is obtained, which can be represented by score_s.
[0075] The intermediate hidden layer vectors of the above student model can be, for example, the feature vectors output by the fully connected layer of the M / 2th layer. Of course, those skilled in the art can flexibly adjust the selection according to actual needs, and no specific limitation is made here.
[0076] It should also be noted that those skilled in the art can flexibly adjust the number of network layers and structure of the teacher and student models defined above according to actual needs, and no specific limitations are made here.
[0077] Step S140: Determine the fusion loss of the student model based on the first intermediate hidden layer vector, the first click-through rate prediction score, the second intermediate hidden layer vector, the second click-through rate prediction score, and the training loss of the student model.
[0078] Based on the first intermediate hidden layer vector and the first click-through rate prediction score obtained from the aforementioned steps, the student model is supervised to learn, and combined with the training loss of the student model, the fusion loss of the student model is determined.
[0079] Step S150: Update the parameters of the student model using the fusion loss of the student model, and use the updated student model as the click-through rate prediction model after training.
[0080] The parameters of the student model are iteratively updated using the fusion loss of the student model mentioned above until the model converges. The trained student model is then deployed online as the final click-through rate prediction model for online click-through rate prediction.
[0081] The click-through rate prediction model training method of this application improves the traditional knowledge distillation technique by training both the teacher model and the student model simultaneously, which simplifies the click-through rate prediction model, shortens the model training process, and considers the intermediate hidden layer vectors of the teacher model for distillation during the training process, thereby improving the model performance.
[0082] In some embodiments of this application, determining the fusion loss of the student model based on the first intermediate hidden layer vector, the first predicted click-through rate (CTR) score, the second intermediate hidden layer vector, the second predicted CTR score, and the training loss of the student model includes: determining the intermediate hidden layer loss of the student model based on the first intermediate hidden layer vector and the second intermediate hidden layer vector; determining the predicted CTR loss of the student model based on the first predicted CTR score and the second predicted CTR score; and fusing the intermediate hidden layer loss, the predicted CTR loss, and the training loss of the student model using a preset fusion strategy to obtain the fusion loss of the student model.
[0083] When determining the fusion loss of the student model, the intermediate hidden loss (Hidden_loss) of the student model can be constructed based on the first intermediate hidden vector (Vector_t) output by the teacher model and the second intermediate hidden vector (Vector_s) output by the student model. Hidden_loss represents the use of the teacher model's intermediate hidden vectors to supervise the student model's learning (i.e., intermediate hidden vector distillation). Specifically, the loss function can be defined using cosine similarity, for example, as follows:
[0084]
[0085] The student model's click-through rate (CTR) prediction loss, Score_loss, is constructed based on the first CTR prediction score (score_t) output by the teacher model and the second CTR prediction score (score_s) output by the student model. Score_loss represents the student model's learning process supervised by the teacher model's CTR prediction score (i.e., CTR prediction score distillation). Specifically, the loss function can be defined using the squared error loss function, for example, as follows:
[0086] Score_loss=MSE_Loss(score_t,score_s)=(score_t-score_s) 2 (2)
[0087] Then, the intermediate hidden loss (Hidden_loss), click-through rate prediction loss (Score_loss), and training loss (student loss) of the above student model are fused using a preset fusion strategy to obtain the fusion loss (Total_loss) of the student model.
[0088] Of course, it should be noted that the above squared error loss function can also be replaced by other loss functions, such as Hinge Loss, which is a commonly used loss function for regression tasks. Those skilled in the art can flexibly choose the specific form of loss function according to actual needs, and no specific limitation is made here.
[0089] In some embodiments of this application, the preset fusion strategy includes distillation coefficients. The step of fusing the intermediate hidden layer loss, click-through rate (CTR) prediction loss, and training loss of the student model using the preset fusion strategy to obtain the fusion loss of the student model includes: determining the distillation coefficients corresponding to the intermediate hidden layer loss and the CTR prediction loss of the student model based on the training sample data, the first CTR prediction score, and the second CTR prediction score; and fusing the intermediate hidden layer loss and its corresponding distillation coefficients, the CTR prediction loss and its corresponding distillation coefficients, and the training loss of the student model to obtain the fusion loss of the student model.
[0090] Current distillation schemes typically involve first training a teacher model, and then using that teacher model to supervise the student model's distillation training. This is primarily because a teacher model can only produce good output information when it is sufficiently trained. However, this presents a problem: two-stage training leads to a lengthy training process and requires storing intermediate data, consuming significant resources.
[0091] Based on this, this application adopts a method of simultaneously training the teacher model and the student model, proposing the idea of advantage distillation, that is, distillation is only performed when the teacher model's prediction is more accurate, so as to ensure the model training effect. Therefore, in order to control the distillation process, the preset fusion strategy of this application embodiment may include a distillation coefficient 'a'. Specifically, a distillation coefficient 'a1' can be set for the intermediate hidden layer loss of the student model, and a distillation coefficient 'a2' can be set for the click-through rate prediction loss. By setting and adjusting the distillation coefficients, the teacher model and the student model can be trained simultaneously, while ensuring the training effect.
[0092] In some embodiments of this application, the training sample data includes user click tags corresponding to the recommended content. Determining the distillation coefficients corresponding to the intermediate hidden layer loss and the click-through rate prediction loss of the student model based on the training sample data, the first predicted click-through rate score, and the second predicted click-through rate score includes: if the user click tag is "click" and the second predicted click-through rate score is less than the first predicted click-through rate score, or if the user click tag is "not clicked" and the second predicted click-through rate score is greater than the first predicted click-through rate score, then the distillation coefficients corresponding to the intermediate hidden layer loss and the click-through rate prediction loss are both determined to be equal to 1; otherwise, the distillation coefficients corresponding to the intermediate hidden layer loss and the click-through rate prediction loss are both determined to be equal to 0.
[0093] like Figure 2 As shown, a logic diagram of a distillation coefficient setting in an embodiment of this application is provided. The core of this logic is to determine whether the relationship between the click-through rate prediction results output by the teacher model and the click-through rate prediction results output by the student model matches the corresponding user click tags.
[0094] Specifically, we first input the user's click label and determine whether the user's click label is 1 (representing "click"). On the one hand, if the user's click label is 1, then the higher the click-through rate (CTR) prediction score, the more accurate it is. Therefore, we can further determine whether the second CTR prediction score output by the student model, score_s, is less than the first CTR prediction score output by the teacher model, score_t. If it is less, it means that the CTR prediction result output by the teacher model is more accurate than the CTR prediction result output by the student model. Then, we can perform distillation based on the intermediate hidden layer vector and the CTR prediction score output by the teacher model. Therefore, the corresponding distillation coefficients a1 and a2 can both be set to 1, which is equivalent to retaining the intermediate hidden layer loss and the CTR prediction loss in the calculation of the total loss. Conversely, it means that the CTR prediction result output by the teacher model is not accurate enough, so it is not advisable to perform distillation. Then, the corresponding distillation coefficients a1 and a2 can both be set to 0, which is equivalent to the intermediate hidden layer loss and the CTR prediction loss obtained based on distillation not participating in the calculation of the total loss.
[0095] On the other hand, if the user clicks on a tag of 0, then the lower the predicted click-through rate (CTR) score, the more accurate it is. Therefore, we can further determine whether the second predicted CTR score, score_s, output by the student model is greater than the first predicted CTR score, score_t, output by the teacher model. If it is greater, it means that the predicted CTR output by the teacher model is more accurate than that output by the student model. In this case, we can perform distillation based on the intermediate hidden vector and the predicted CTR score output by the teacher model. Therefore, the corresponding distillation coefficients a1 and a2 can both be set to 1. Conversely, if the predicted CTR output by the teacher model is not accurate enough, then distillation is not advisable. In this case, the corresponding distillation coefficients a1 and a2 can both be set to 0.
[0096] Of course, it should be noted that the values of the distillation coefficients a1 and a2 mentioned above are merely illustrative descriptions. Those skilled in the art can flexibly adjust the values of the distillation coefficients according to actual needs, and no specific limitations are made here.
[0097] In some embodiments of this application, the preset fusion strategy includes fusion weights. The step of fusing the intermediate hidden layer loss, click-through rate prediction loss, and training loss of the student model using the preset fusion strategy to obtain the fusion loss of the student model includes: determining the fusion weights corresponding to the intermediate hidden layer loss and the click-through rate prediction loss of the student model based on the training sample data; and fusing the intermediate hidden layer loss and its corresponding fusion weights, the click-through rate prediction loss and its corresponding fusion weights, and the training loss of the student model to obtain the fusion loss of the student model.
[0098] Since the model training process is usually carried out in batches, the distillation of the intermediate hidden layer vectors and the distillation of the click-through rate prediction score output by the last layer play different roles in different stages of model training. Therefore, the preset fusion strategy adopted in this application embodiment may also include fusion weights w. Specifically, fusion weights w1 and w2 can be set for the intermediate hidden layer loss of the student model and for the click-through rate prediction loss, respectively. Fusion weights w1 and w2 are dynamic weights. By dynamically changing fusion weights w1 and w2, the roles of the intermediate hidden layer loss and the click-through rate prediction loss in different training stages can be adjusted to further improve the training effect of the model.
[0099] In some embodiments of this application, the training sample data includes the number of training samples, and determining the fusion weights corresponding to the intermediate hidden layer loss and the click-through rate prediction loss of the student model based on the training sample data includes: determining the total number of training batches based on the number of training samples; and dynamically adjusting the fusion weights corresponding to the intermediate hidden layer loss and the click-through rate prediction loss based on the value range of the fusion weights, the total number of training batches, and the current training batch.
[0100] The fusion weights w1 and w2 are weights related to the distillation object. Distillation of intermediate hidden layer vectors is closer to the bottom of the model, affecting the training of the lower network layers. In the early stages of model training, it promotes rapid convergence and quickly improves model performance. In the later stages, to ensure model stability, the update rate should be reduced. Click-through rate (CTR) prediction score distillation affects the model output, primarily influencing the training of the top network layers. In the early stages of model training, it mainly affects the convergence of the lower layers, while in the later stages, it mainly affects the convergence of the top layers. Based on this, the fusion weights w1 corresponding to the intermediate hidden layer loss and w2 corresponding to the CTR prediction loss can be dynamically adjusted according to different stages of model training.
[0101] Since the training time of a model depends on data transmission and communication time, memory, GPU, CPU configuration, etc., it is difficult to characterize the different stages of model training, such as the early and late stages, from the time dimension. Therefore, the embodiments of this application can use the number of training samples to characterize the training time. Generally, the model is trained in batches, and each batch has N samples (i.e., the batch size). The total number of samples in the entire training set can be counted. Therefore, the total number of training batches (batch_num_max) can be calculated as the total number of sample data / batch size. Batch_num represents the current training batch, that is, which batch has been trained to the current batch.
[0102] Based on batch_num_max and batch_num, the fusion weight w1 corresponding to the intermediate hidden layer loss and the fusion weight w2 corresponding to the click-through rate prediction loss can be dynamically adjusted.
[0103] In some embodiments of this application, the step of dynamically adjusting the fusion weights corresponding to the intermediate hidden layer loss and the click-through rate prediction loss based on the value range of the fusion weights, the total training batches, and the current training batch includes: determining the current fusion weight corresponding to the intermediate hidden layer loss based on the value range of the fusion weights corresponding to the intermediate hidden layer loss, the total training batches, and the current training batches, wherein the current fusion weight corresponding to the intermediate hidden layer loss monotonically decreases with the current training batch; and determining the current fusion weight corresponding to the click-through rate prediction loss based on the value range of the fusion weight corresponding to the click-through rate prediction loss, the total training batches, and the current training batches, wherein the current fusion weight corresponding to the click-through rate prediction loss monotonically increases with the current training batches.
[0104] As mentioned earlier, the intermediate hidden layer vector distillation mainly affects the training of the bottom network layers. In the early stage of model training, it can improve the model's performance by accelerating convergence. In the later stage of model training, the update amplitude should be appropriately reduced. Therefore, the fusion weight w1 can be set to a smaller parameter as the training time increases.
[0105] For simplicity, the fusion weight w1 can be set to decrease monotonically with batch_num, with a maximum value of m (usually 1), i.e., the initial value, and a minimum value of 0, i.e., the w1 value corresponding to the last training batch. Using a univariate linear function model, the function representing the change of w1 with batch_num can be obtained:
[0106] w1=m-(m / batch_num_max)*batch_num, (3)
[0107] As mentioned earlier, click-through rate prediction score distillation mainly affects the training of the top-level network layers. As the model trains, the update amplitude should be increased appropriately. Therefore, the fusion weight w2 can be set to increase as the training time increases.
[0108] Similarly, for simplicity, the fusion weight w2 can be set to monotonically increase with batch_num, with a minimum value of 0 (the initial value) and a maximum value of n (usually 1), which is the w2 value corresponding to the last training batch. Using a linear function model, we obtain the function of w2 changing with batch_num:
[0109] w2=(n / batch_num_max)*batch_num, (4)
[0110] Of course, the above modeling method is only an illustrative description. Those skilled in the art can flexibly set how to dynamically adjust the changes in fusion weights according to actual needs, and no specific limitations are made here.
[0111] For ease of understanding of the above embodiments of this application, as follows: Figure 3 The diagram illustrates the training process of a click-through rate (CTR) prediction model according to an embodiment of this application. The training process of this application improves upon traditional knowledge distillation techniques. First, training sample data is simultaneously input into both the teacher network and the student network for training. After processing by multiple fully connected layers and a sigmoid function defined in the teacher model, the input data yields the intermediate hidden layer vector Vector_t output by the hidden states of the teacher model, the final CTR prediction score score_t processed by the sigmoid function, and the teacher model's training loss (teacher loss).
[0112] Meanwhile, after the input data is processed by the multi-layer fully connected layers and the Sigmoid function defined in the student model, the intermediate hidden layer vector Vector_s output by the intermediate hidden states of the student model and the click-through rate prediction score score_s after the final Sigmoid function processing are obtained.
[0113] Then, based on the intermediate hidden layer vector Vector_t output by the teacher model and the intermediate hidden layer vector Vector_s output by the student model, the intermediate hidden layer loss Hidden_loss can be calculated. Based on the click-through rate prediction score_t output by the teacher model and the click-through rate prediction score_s output by the student model, the click-through rate prediction loss Score_loss and the student model training loss student loss can be calculated.
[0114] Finally, the hidden loss (Hidden_loss), the click-through rate prediction loss (Score_loss), and the student model's training loss (student loss) are merged into a total loss (Total_loss). The parameters of the student model are then updated using Total_loss until the model converges.
[0115] It should be noted that neither Score_loss nor Hidden_loss is applied to the teacher model, and the stopgradient method can be used to block gradient backpropagation.
[0116] This application's click-through rate prediction model training method uses a fully connected neural network as an example, illustrating the process of distilling the teacher model into a student model and training both simultaneously. This simplifies the large model into a small one, improving online prediction efficiency. Of course, this application is also applicable to various neural networks in the industry, including NLP, CV, and other artificial intelligence fields, and can also provide solutions for simplifying the large ChatGPT model.
[0117] This application also provides a click-through rate prediction method, such as... Figure 4 The diagram shows a flowchart of a click-through rate (CTR) prediction method according to an embodiment of this application. The CTR prediction method includes at least the following steps S410 to S420:
[0118] Step S410: Obtain the content to be estimated;
[0119] Step S420: Input the content to be estimated into the click-through rate prediction model to obtain the click-through rate prediction score of the content to be estimated;
[0120] The click-through rate prediction model is trained based on the training method of any of the aforementioned click-through rate prediction models.
[0121] By deploying the student model trained in the aforementioned embodiments as a click-through rate (CTR) prediction model online, CTR prediction can be performed on online content to be predicted, thereby improving the efficiency of CTR prediction.
[0122] This application embodiment also provides a training device 500 for a click-through rate prediction model, such as... Figure 5 The diagram shows a structural schematic of a training device for a click-through rate (CTR) prediction model according to an embodiment of this application. The training device 500 for the CTR prediction model includes:
[0123] The first acquisition unit 510 is used to acquire training sample data for the click-through rate prediction model;
[0124] The first training unit 520 is used to train the teacher model using the training sample data to obtain the first intermediate hidden layer vector and the first click-through rate prediction score output by the teacher model.
[0125] The second training unit 530 is used to train the student model using the training sample data to obtain the second intermediate hidden layer vector and the second click-through rate prediction score output by the student model, as well as the training loss of the student model.
[0126] The fusion unit 540 is used to determine the fusion loss of the student model based on the first intermediate hidden layer vector, the first click-through rate prediction score, the second intermediate hidden layer vector, the second click-through rate prediction score, and the training loss of the student model.
[0127] The update unit 550 is used to update the parameters of the student model using the fusion loss of the student model, and use the updated student model as the click-through rate prediction model after training.
[0128] In some embodiments of this application, the fusion unit 540 is specifically used to: determine the intermediate hidden layer loss of the student model based on the first intermediate hidden layer vector and the second intermediate hidden layer vector; determine the click-through rate prediction loss of the student model based on the first click-through rate prediction score and the second click-through rate prediction score; and fuse the intermediate hidden layer loss, click-through rate prediction loss, and training loss of the student model using a preset fusion strategy to obtain the fusion loss of the student model.
[0129] In some embodiments of this application, the preset fusion strategy includes distillation coefficients, and the fusion unit 540 is specifically used to: determine the distillation coefficients corresponding to the intermediate hidden layer loss and the distillation coefficients corresponding to the click-through rate prediction loss of the student model based on the training sample data, the first click-through rate prediction score and the second click-through rate prediction score; and fuse the intermediate hidden layer loss and the corresponding distillation coefficients, the click-through rate prediction loss and the corresponding distillation coefficients, and the training loss of the student model to obtain the fusion loss of the student model.
[0130] In some embodiments of this application, the training sample data includes user click tags corresponding to the recommended content. The fusion unit 540 is specifically used to: if the user click tag is "click" and the second click-through rate (CTR) prediction score is less than the first CTR prediction score, or if the user click tag is "not clicked" and the second CTR prediction score is greater than the first CTR prediction score, then determine that the distillation coefficients corresponding to the intermediate hidden layer loss and the CTR prediction loss are both equal to 1; otherwise, determine that the distillation coefficients corresponding to the intermediate hidden layer loss and the CTR prediction loss are both equal to 0.
[0131] In some embodiments of this application, the preset fusion strategy includes fusion weights, and the fusion unit 540 is specifically used to: determine the fusion weights corresponding to the intermediate hidden layer loss and the fusion weights corresponding to the click-through rate prediction loss of the student model based on the training sample data; and fuse the intermediate hidden layer loss and the corresponding fusion weights, the click-through rate prediction loss and the corresponding fusion weights, and the training loss of the student model to obtain the fusion loss of the student model.
[0132] In some embodiments of this application, the training sample data includes the number of training samples, and the fusion unit 540 is specifically used to: determine the total training batch based on the number of training samples; and dynamically adjust the fusion weights corresponding to the intermediate hidden layer loss and the click-through rate prediction loss based on the value range of the fusion weights, the total training batch, and the current training batch.
[0133] In some embodiments of this application, the fusion unit 540 is specifically used to: determine the current fusion weight corresponding to the intermediate hidden layer loss based on the value range of the fusion weight corresponding to the intermediate hidden layer loss, the total training batch, and the current training batch, wherein the current fusion weight corresponding to the intermediate hidden layer loss monotonically decreases with the current training batch; and determine the current fusion weight corresponding to the click-through rate (CTR) prediction loss based on the value range of the fusion weight corresponding to the click-through rate (CTR) prediction loss, the total training batch, and the current training batch, wherein the current fusion weight corresponding to the CTR prediction loss monotonically increases with the current training batch.
[0134] It is understood that the training device for the above-mentioned click-through rate (CTR) prediction model can implement each step of the training method for the CTR prediction model provided in the foregoing embodiments. The relevant explanations regarding the training method for the CTR prediction model are applicable to the training device for the CTR prediction model, and will not be repeated here.
[0135] This application also provides a click-through rate prediction device 600, such as... Figure 6 As shown, a schematic diagram of a click-through rate (CTR) prediction device according to an embodiment of this application is provided. The CTR prediction device 600 includes:
[0136] The second acquisition unit 610 is used to acquire content to be recommended;
[0137] The prediction unit 620 is used to input the content to be recommended into the click-through rate prediction model to obtain the click-through rate prediction score of the content to be recommended.
[0138] The click-through rate prediction model is trained based on the training method of any of the aforementioned click-through rate prediction models.
[0139] It is understood that the above-mentioned click-through rate (CTR) prediction device can implement all the steps of the CTR prediction method provided in the foregoing embodiments. The relevant explanations of the CTR prediction method are applicable to the CTR prediction device and will not be repeated here.
[0140] Figure 7 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Please refer to it. Figure 7 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and memory. The memory may include main memory, such as high-speed random-access memory (RAM), or non-volatile memory, such as at least one disk drive. Of course, the electronic device may also include other hardware required for other business operations.
[0141] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 7The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0142] Memory is used to store programs. Specifically, programs may include program code, which includes computer operation instructions. Memory may include main memory and non-volatile memory, and provides instructions and data to the processor.
[0143] The processor reads the corresponding computer program from non-volatile memory into main memory and runs it, forming a training device for the click-through rate prediction model at the logical level. The processor executes the program stored in memory and specifically performs the following operations:
[0144] Obtain training sample data for the click-through rate prediction model;
[0145] The teacher model is trained using the training sample data to obtain the first intermediate hidden layer vector and the first click-through rate prediction score output by the teacher model.
[0146] The student model is trained using the training sample data to obtain the second intermediate hidden layer vector and the second click-through rate prediction score output by the student model, as well as the training loss of the student model.
[0147] The fusion loss of the student model is determined based on the first intermediate hidden layer vector, the first click-through rate prediction score, the second intermediate hidden layer vector, the second click-through rate prediction score, and the training loss of the student model.
[0148] The parameters of the student model are updated using the fusion loss of the student model, and the updated student model is used as the click-through rate prediction model after training.
[0149] The above is as stated in this application. Figure 1The method executed by the training device for the click-through rate prediction model disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), 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. It 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 method disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.
[0150] The electronic device can also perform Figure 4 The method for executing a click-through rate (CTR) prediction device, and the implementation of the CTR prediction device in... Figure 4 The functions of the embodiments shown are not described again in this application.
[0151] This application also proposes a computer-readable storage medium that stores one or more programs, the programs including instructions that, when executed by an electronic device including multiple applications, enable the electronic device to perform... Figure 1 The method executed by the training device of the click-through rate prediction model in the illustrated embodiment is specifically used to perform:
[0152] Obtain training sample data for the click-through rate prediction model;
[0153] The teacher model is trained using the training sample data to obtain the first intermediate hidden layer vector and the first click-through rate prediction score output by the teacher model.
[0154] The student model is trained using the training sample data to obtain the second intermediate hidden layer vector and the second click-through rate prediction score output by the student model, as well as the training loss of the student model.
[0155] The fusion loss of the student model is determined based on the first intermediate hidden layer vector, the first click-through rate prediction score, the second intermediate hidden layer vector, the second click-through rate prediction score, and the training loss of the student model.
[0156] The parameters of the student model are updated using the fusion loss of the student model, and the updated student model is used as the click-through rate prediction model after training.
[0157] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0158] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0159] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0160] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0161] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0162] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0163] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0164] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0165] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0166] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for training a click rate prediction model, the method comprising: The training method for the click-through rate prediction model includes: Obtain training sample data for the click-through rate prediction model. The training sample data specifically includes user information, recommended content, and recommended context information cleaned from system log information. Each piece of training sample data includes user features containing gender and age attributes, item features containing recommended content attributes, context features containing context, and user click label. The teacher model is trained using the training sample data to obtain the first intermediate hidden layer vector and the first click-through rate prediction score output by the teacher model. The student model is trained using the training sample data to obtain the second intermediate hidden layer vector and the second click-through rate prediction score output by the student model, as well as the training loss of the student model. The fusion loss of the student model is determined based on the first intermediate hidden layer vector, the first click-through rate prediction score, the second intermediate hidden layer vector, the second click-through rate prediction score, and the training loss of the student model. The parameters of the student model are updated using the fusion loss of the student model, and the updated student model is used as the click-through rate prediction model after training. The step of determining the fusion loss of the student model based on the first intermediate hidden layer vector, the first click-through rate (CTR) prediction score, the second intermediate hidden layer vector, the second CTR prediction score, and the training loss of the student model includes: The intermediate hidden layer loss of the student model is determined based on the first intermediate hidden layer vector and the second intermediate hidden layer vector; The click-through rate (CTR) prediction loss of the student model is determined based on the first CTR prediction score and the second CTR prediction score. The intermediate hidden layer loss, click-through rate prediction loss, and training loss of the student model are fused using a preset fusion strategy to obtain the fusion loss of the student model. The preset fusion strategy includes fusion weights. The preset fusion strategy is used to fuse the intermediate hidden layer loss, click-through rate prediction loss, and training loss of the student model to obtain the fusion loss of the student model, which includes: The fusion weights corresponding to the intermediate hidden layer loss and the click-through rate prediction loss of the student model are determined based on the training sample data. The student model's fusion loss is obtained by fusing the intermediate hidden layer loss and corresponding fusion weights, the click-through rate prediction loss and corresponding fusion weights, and the training loss. The training sample data includes the number of training samples, and determining the fusion weights corresponding to the intermediate hidden layer loss and the click-through rate prediction loss of the student model based on the training sample data includes: The total number of training batches is determined based on the number of training samples. The fusion weights corresponding to the intermediate hidden layer loss and the click-through rate prediction loss are dynamically adjusted based on the range of fusion weight values, the total training batch, and the current training batch. The step of dynamically adjusting the fusion weights corresponding to the intermediate hidden layer loss and the click-through rate prediction loss based on the value range of the fusion weights, the total training batches, and the current training batch includes: The current fusion weight corresponding to the intermediate hidden layer loss is determined based on the value range of the fusion weight corresponding to the intermediate hidden layer loss, the total training batch, and the current training batch, wherein the current fusion weight corresponding to the intermediate hidden layer loss decreases monotonically with the current training batch. The current fusion weight corresponding to the click-through rate prediction loss is determined based on the value range of the fusion weight corresponding to the click-through rate prediction loss, the total training batches, and the current training batch, wherein the current fusion weight corresponding to the click-through rate prediction loss monotonically increases with the current training batch. 2.The method of claim 1, wherein, The preset fusion strategy includes a distillation coefficient, which is used to control the distillation process. The preset fusion strategy is used to fuse the intermediate hidden layer loss, click-through rate prediction loss, and training loss of the student model to obtain the fusion loss of the student model, which includes: Based on the training sample data, the first click-through rate prediction score, and the second click-through rate prediction score, determine the distillation coefficient corresponding to the intermediate hidden layer loss and the distillation coefficient corresponding to the click-through rate prediction loss of the student model; The fusion loss of the student model is obtained by fusing the intermediate hidden layer loss and its corresponding distillation coefficient, the click-through rate prediction loss and its corresponding distillation coefficient, and the training loss.
3. The training method for the click-through rate prediction model according to claim 2, characterized in that, The training sample data includes user click tags corresponding to the recommended content. Determining the distillation coefficients corresponding to the intermediate hidden layer loss and the click-through rate prediction loss of the student model based on the training sample data, the first click-through rate prediction score, and the second click-through rate prediction score includes: If the user click tag is "click" and the second estimated click-through rate score is less than the first estimated click-through rate score, or if the user click tag is "not clicked" and the second estimated click-through rate score is greater than the first estimated click-through rate score, then the distillation coefficients corresponding to the intermediate hidden layer loss and the estimated click-through rate loss are both determined to be equal to 1. Otherwise, the distillation coefficients corresponding to the intermediate hidden layer loss and the click-through rate prediction loss are both set to 0.
4. A click-through rate (CTR) prediction method, characterized in that, The click-through rate prediction method includes: Obtain the content to be estimated; Input the content to be estimated into the click-through rate prediction model to obtain the click-through rate prediction score of the content to be estimated. The click-through rate prediction model is trained based on the training method of any one of claims 1 to 3.
5. A training device for a click-through rate prediction model, characterized in that, The training device for the click-through rate prediction model includes: The first acquisition unit is used to acquire training sample data for the click-through rate prediction model. The training sample data specifically includes user information, recommended content, and recommended context information cleaned from system log information. Each piece of training sample data includes user features containing gender and age attributes, item features containing recommended content, context features, and user click label. The first training unit is used to train the teacher model using the training sample data to obtain the first intermediate hidden layer vector and the first click-through rate prediction score output by the teacher model. The second training unit is used to train the student model using the training sample data, and obtain the second intermediate hidden layer vector and the second click-through rate prediction score output by the student model, as well as the training loss of the student model. The fusion unit is used to determine the fusion loss of the student model based on the first intermediate hidden layer vector, the first click-through rate prediction score, the second intermediate hidden layer vector, the second click-through rate prediction score, and the training loss of the student model. The update unit is used to update the parameters of the student model using the fusion loss of the student model, and use the updated student model as the click-through rate prediction model after training. The fusion unit is specifically used for: The intermediate hidden layer loss of the student model is determined based on the first intermediate hidden layer vector and the second intermediate hidden layer vector; The click-through rate (CTR) prediction loss of the student model is determined based on the first CTR prediction score and the second CTR prediction score. The intermediate hidden layer loss, click-through rate prediction loss, and training loss of the student model are fused using a preset fusion strategy to obtain the fusion loss of the student model. The preset fusion strategy includes fusion weights, and the fusion unit is specifically used for: The fusion weights corresponding to the intermediate hidden layer loss and the click-through rate prediction loss of the student model are determined based on the training sample data. The student model's fusion loss is obtained by fusing the intermediate hidden layer loss and corresponding fusion weights, the click-through rate prediction loss and corresponding fusion weights, and the training loss. The training sample data includes the number of training samples, and the fusion unit is specifically used for: The total number of training batches is determined based on the number of training samples. The fusion weights corresponding to the intermediate hidden layer loss and the click-through rate prediction loss are dynamically adjusted based on the range of fusion weight values, the total training batch, and the current training batch. The fusion unit is specifically used for: The current fusion weight corresponding to the intermediate hidden layer loss is determined based on the value range of the fusion weight corresponding to the intermediate hidden layer loss, the total training batch, and the current training batch, wherein the current fusion weight corresponding to the intermediate hidden layer loss decreases monotonically with the current training batch. The current fusion weight corresponding to the click-through rate prediction loss is determined based on the value range of the fusion weight corresponding to the click-through rate prediction loss, the total training batches, and the current training batch, wherein the current fusion weight corresponding to the click-through rate prediction loss monotonically increases with the current training batch.
6. A click-through rate prediction device, characterized in that, The click-through rate prediction device includes: The second acquisition unit is used to acquire content to be recommended. The prediction unit is used to input the content to be recommended into the click-through rate prediction model to obtain the click-through rate prediction score of the content to be recommended. The click-through rate prediction model is trained based on the training method of any one of claims 1 to 3.
7. An electronic device, comprising: processor; as well as A memory configured to store computer-executable instructions, which, when executed, cause the processor to perform the training method of any one of claims 1 to 3, or the click-through rate prediction method of claim 4.
8. A computer-readable storage medium storing one or more programs, which, when executed by an electronic device including a plurality of applications, cause the electronic device to perform a training method for a click-through rate prediction model according to any one of claims 1 to 3, or to perform a click-through rate prediction method according to claim 4.
Citation Information
Patent Citations
Model compression method and device, electronic equipment and computer storage medium
CN109711544A
Click rate estimation method and device, equipment and storage medium
CN116308531A
