Click rate prediction model training method and device, equipment and medium
By obtaining and utilizing historical and future information in user sample behavior sequences, the click-through rate prediction model is trained, which solves the problems of data sparsity and behavioral irregularity in the existing technology, and improves the accuracy and stability of click-through rate prediction.
Patent Information
- Application Number
- CN202310350678.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-29
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2043-03-29
AI Technical Summary
Existing click-through rate prediction models fail to effectively utilize the information in user sample behavior sequences during the training process, resulting in data sparseness and variability and irregularity issues in user click behavior that are not fully resolved.
By obtaining the historical sample behavior sequence, current sample click items and future sample click items in the user sample behavior sequence, use this information to train the click rate prediction model, consider the correlation between user preference characteristics and current and future sample click items, and use data enhancement and knowledge distillation techniques to alleviate data sparsity and behavioral variability issues.
It improves the utilization of user sample behavior sequence information, alleviates the problems of data sparseness and behavioral irregularity, and improves the accuracy and stability of click-through rate prediction.
Smart Images

Figure CN118734059A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence, and in particular to a training method, device, equipment and medium for a click-through rate prediction model. Background Art
[0002] The click-through rate prediction model aims to predict the user's click rate on an item at the next moment based on the user's historical behavior sequence.
[0003] In the related art, when training a click-through rate prediction model, a complete sample behavior sequence is used to supervise the click-through rate prediction model on the click rate of the next click item. The complete sample behavior sequence includes sample click items at multiple moments arranged in chronological order.
[0004] Training the click-through rate prediction model through related technologies wastes other information contained in the complete sample behavior sequence. Summary of the invention
[0005] The present application provides a training method, device, equipment and medium for a click rate prediction model, which improves the utilization rate of information in a user sample behavior sequence. The technical solution is as follows:
[0006] According to one aspect of the present application, a method for training a click rate prediction model is provided, the method comprising:
[0007] Obtaining a historical sample behavior sequence, a current sample click item, and a future sample click item from a user sample behavior sequence; the user sample behavior sequence includes a plurality of sample click items arranged in chronological order, the historical sample behavior sequence includes a plurality of sample click items located before a reference time, the current sample click item is a sample click item corresponding to the reference time, and the future sample click item is a sample click item located after the reference time;
[0008] Input the historical sample behavior sequence and the current sample click item into the click rate prediction model to predict the first probability of the current sample click item being clicked at the reference time;
[0009] Input the historical sample behavior sequence and the future sample click items into the click rate prediction model to predict the second probability of the future sample click items being clicked after the reference time;
[0010] The click rate prediction model is trained based on the error between the probability label of the current sample click item and the first probability; and the click rate prediction model is trained based on the error between the probability label of the future sample click item and the second probability.
[0011] According to another aspect of the present application, a training device for a click rate prediction model is provided, the device comprising:
[0012] An acquisition module is used to acquire a historical sample behavior sequence, a current sample click item, and a future sample click item from a user sample behavior sequence; the user sample behavior sequence includes a plurality of sample click items arranged in chronological order, the historical sample behavior sequence includes a plurality of sample click items located before a reference time, the current sample click item is a sample click item corresponding to the reference time, and the future sample click item is a sample click item located after the reference time;
[0013] A prediction module, used to input the historical sample behavior sequence and the current sample click item into the click rate prediction model, and predict the first probability of the current sample click item being clicked at the reference time;
[0014] The prediction module is further used to input the historical sample behavior sequence and the future sample click item into the click rate prediction model to predict the second probability of the future sample click item being clicked after the reference time;
[0015] The training module is used to train the click rate prediction model according to the error between the probability label of the current sample click item and the first probability; and to train the click rate prediction model according to the error between the probability label of the future sample click item and the second probability.
[0016] According to one aspect of the present application, a computer device is provided, comprising: a processor and a memory, the memory storing a computer program, and the computer program is loaded and executed by the processor to implement the above-mentioned training method of the click-through rate prediction model.
[0017] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and the computer program is loaded and executed by a processor to implement the above-mentioned training method of the click-through rate prediction model.
[0018] According to another aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above method.
[0019] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:
[0020] By obtaining the historical sample behavior sequence, the current sample click item and the future sample click item in the user sample behavior sequence, the click rate prediction model is trained according to the historical sample behavior sequence and the current sample click item; the click rate prediction model is trained according to the historical sample behavior sequence and the future sample click item. The above method improves the utilization rate of the information in the user sample behavior sequence.
[0021] Compared with the related art, this application not only performs the task of predicting the current sample click items, but also performs the task of predicting the future sample click items. The historical sample behavior sequence implies user preference characteristics. This application takes into account that the user preference characteristics are not only related to the current sample click items, but also related to the future sample click items.
[0022] In this application, future sample click items will participate in training as enhanced positive samples of current sample click items. By enhancing the data of training samples, the data sparsity problem of user click items in real use, as well as the variability and irregularity of user click behavior can be alleviated. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0024] Figure 1 It is a schematic diagram of a principle provided by an exemplary embodiment of the present application;
[0025] Figure 2 is a flow chart of a method for training a click rate prediction model provided by an embodiment of the present application;
[0026] Figure 3 It is a schematic diagram of another exemplary embodiment of the present application;
[0027] Figure 4 is a flowchart of a method for training a click rate prediction model provided by another embodiment of the present application;
[0028] Figure 5 It is a schematic diagram of another exemplary embodiment of the present application;
[0029] Figure 6 is a flowchart of a method for training a click rate prediction model provided by another embodiment of the present application;
[0030] Figure 7 It is a schematic diagram of another exemplary embodiment of the present application;
[0031] Figure 8 It is a structural block diagram of a training device for a click rate prediction model provided by an embodiment of the present application;
[0032] Fig. 9 It is a structural block diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0034] First, the nouns involved in the embodiments of the present application are briefly introduced:
[0035] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.
[0036] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0037] Machine Learning (ML) is a multi-disciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and teaching learning.
[0038] With the research and advancement of artificial intelligence technology, artificial intelligence technology has been studied and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, automatic driving, drones, robots, smart medical care, smart customer service, etc. I believe that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.
[0039] Knowledge Distillation (KD), generally speaking, large models are often a single complex network or a collection of several networks, with good performance and generalization ability, while small models have limited expression ability due to their small network size. Therefore, the knowledge learned by the large model can be used to guide the training of the small model, so that the small model has the same performance as the large model, but the number of parameters is greatly reduced, thereby achieving model compression and acceleration. This is the application of knowledge distillation and transfer learning in model optimization. In related technologies, knowledge distillation adopts the teacher-student model. In knowledge distillation, the complex and large model is used as the teacher model (Teacher), and the student model (Student) has a relatively simple structure. The teacher model is used to assist the training of the student model. The teacher model has strong learning ability and can transfer the knowledge it has learned to the student model with relatively weak learning ability, thereby enhancing the generalization ability of the student model. In real application scenarios, the complex and bulky but effective teacher model is not online, and it is simply a mentor role. The flexible and lightweight student model is actually deployed online for prediction tasks. Knowledge distillation is the transfer of model capabilities. According to different transfer methods, it can be simply divided into two major directions: target distillation (also called soft-target distillation or logits method distillation) and feature distillation-based algorithms.
[0040] Self-distillation (SD) uses supervised learning to distill knowledge. The method used by self-distillation is that the teacher model and the student model are one model, that is, one model guides itself to learn and complete knowledge distillation.
[0041] Sequential Recommendation (SR) aims to provide suitable items that users will click on according to the order of their historical behaviors. The sequence recommendation model of the related art is trained under the next click item prediction task, so there are two challenges in the related art, including the data sparsity of user feedback and the variability and irregularity of user click behavior. Unlike natural language in natural language processing (NLP), the behavior sequence in sequential recommendation is more personalized, irregular and disordered. Therefore, the current user preference extracted from the user's historical behavior may be related to the next-k (i.e. future click) item in addition to the next-1 (i.e. current click) item to be predicted. Inspired by this phenomenon, this application proposes a new future information gain model (FASRec) using self-distillation in recommendation. In the following, the future information gain model is also often referred to as a sequential recommendation model and a click-through rate prediction model.
[0042] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions. For example, the user sample behavior sequences and sample click items involved in this application are all obtained with full authorization.
[0043] Moreover, when it comes to relevant information, the relevant information processors will follow the principles of legality, legitimacy and necessity, clarify the purpose, method and scope of relevant information processing, obtain the consent of the relevant information subjects, and take necessary technical and organizational measures to ensure the security of relevant information.
[0044] Figure 1 A schematic diagram of a principle provided by an exemplary embodiment of the present application is shown. Figure 1 Training of a click rate prediction model by a computer device is shown. Figure 1 A training framework 100 for a click rate prediction model is provided. The training framework 100 is used to train a click rate prediction model 101 .
[0045] Obtain a user sample behavior sequence, which includes multiple sample click items arranged in chronological order. Figure 1 The user sample behavior sequence shown in FIG. 1 includes sample click items (V1, V2, ... V t+m ,…,V t+n ).
[0046] The historical sample behavior sequence 102, the current sample click item 103 and the future sample click item 106 in the user sample behavior sequence are obtained. Figure 1 The historical sample behavior sequence 102 shown in FIG. 1 includes sample click items (V1, V2, ... V t ). The current sample click item 103 is the sample click item at the t+1th moment (V t+1 ). The future sample click item 106 is the sample click item after the t+1th moment in the user sample behavior sequence (i.e., V t+2 To V t+n A sample click item in Figure 1 V t+m ).
[0047] Figure 1 Also shown is a click rate prediction model 101 to be trained. Figure 1 In the training architecture shown, the historical sample behavior sequence 102 and the current sample click item 103 are input into the click rate prediction model 101, and the first probability 104 of the current sample click item 103 being clicked at the t+1 time is predicted. The click rate prediction model 101 is trained based on the first probability 104 and the probability label 105 of the current sample click item 103.
[0048] Figure 1 The training architecture also shows that the historical sample behavior sequence 102 and the future sample click item 106 are input into the click rate prediction model 101, and the second probability 107 of the future sample click item 106 being clicked after the t+1th time is predicted. The click rate prediction model 101 is trained according to the second probability 107 and the probability label 108 of the future sample click item.
[0049] Combined with reference Figure 1 The training method of the click rate prediction model provided by the related art only performs the task of predicting the current sample click item 103. Figure 1 The training architecture shown in the figure not only performs the task of predicting the current sample click item 103, but also performs the task of predicting the future sample click item 106. The historical sample behavior sequence 102 implies the user preference characteristics. Figure 1 The training architecture not only considers that the user preference features are related to the current sample click item 103 to be predicted, but also to the future sample click item 106.
[0050] It is understandable that the future sample click item 106 will participate in the training as an enhanced positive sample of the current sample click item 103. By enhancing the data of the training samples, the data sparsity problem of the user's click items during actual use, as well as the variability and irregularity of the user's click behavior during actual use can be alleviated.
[0051] In some embodiments, the click-through rate prediction model is trained by a server and / or a terminal. The click-through rate prediction model can be trained only by one or more servers, or only by one or more terminals, or jointly trained by at least one server and at least one terminal. The above-mentioned server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The above-mentioned terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application is not limited here.
[0052] Figure 2 A flowchart of a method for training a click rate prediction model provided by an exemplary embodiment of the present application is shown. Figure 1 The computer device shown is executed for example. The method includes:
[0053] Step 210, obtaining a historical sample behavior sequence, a current sample click item, and a future sample click item from the user sample behavior sequence;
[0054] User sample behavior sequence: refers to the click behavior sequence for a user in the training data set. The user sample behavior sequence includes multiple sample click items arranged in chronological order. For example, the user sample behavior sequence includes the sample click item V1 at the first moment, the sample click item V2 at the second moment, ..., the sample click item V at the t+nth moment, arranged in sequence. t+n Clickable items refer to items on the terminal interface that users can click on, such as advertisements, news, titles, events, entity words, etc.
[0055] Historical sample behavior sequence: includes multiple sample click items in the user sample behavior sequence that are located before the reference time. Optionally, the reference time is the t+1th time. The historical sample behavior sequence includes the t sample click items in the user sample behavior sequence that are located before the t+1th time (i.e., the t sample click items corresponding to the previous t time). For example, the historical sample behavior sequence includes the sample click item V1 at the first time, the sample click item V2 at the second time, ..., the sample click item V at the tth time, arranged in order. t . t is a positive integer greater than or equal to 1.
[0056] Current sample click item: refers to the sample click item corresponding to the reference time in the user sample behavior sequence. Optionally, the reference time is the t+1th time, which can also be called the current time. The current sample click item can also be expressed as V t+1 .
[0057] Future sample click items: refers to the sample click items in the user sample behavior sequence that are located after the reference time. Optionally, the reference time is the t+1th time. That is, the future sample click items are the sample click items after the current sample click items. For example, the future sample click items are represented as the user sample behavior sequence (V1, V2, ... V t+1 、V t+m 、V t+n ) t+m . Wherein, m is greater than 1 and m is less than n.
[0058] In one embodiment, from the user sample behavior sequence (V1, V2, ... V t+1 、V t+m 、V t+n ) is located in the current sample click item V t+1 In the subsequent sample click items, randomly select the future sample click item V t+m . Optional, from V t+1 The future sample click items V are randomly sampled with equal probability 1 / (nt) from the sample click items. t+m .
[0059] Step 220, inputting the historical sample behavior sequence and the current sample click item into the click rate prediction model, and predicting the first probability of the current sample click item being clicked at the reference time;
[0060] In one embodiment, the historical sample behavior sequence (V1, V2...V t ) and the current sample click item (V t+1 ) is input into the click rate prediction model, and the click rate prediction model will output the number of clicks on the current sample item (V t+1 )’s first probability.
[0061] In one embodiment, the click rate prediction model is any one of GRU4Rec, BERT4Rec, SASRec and CL4Srec. GRU4Rec, BERT4Rec, SASRec and CL4Srec are click rate prediction models provided by related technologies. Therefore, it can be understood that the present application provides a general training architecture, and any click rate prediction model of related technologies can be trained using the method of the present application.
[0062] Step 230, inputting the historical sample behavior sequence and the future sample click item into the click rate prediction model, and predicting the second probability of the future sample click item being clicked after the reference time;
[0063] In one embodiment, the historical sample behavior sequence (V1, V2...V t ) and future sample click items (V t+m ) Input the click rate prediction model, the click rate prediction model will output the future sample click items (V t+m )’s second probability.
[0064] Step 240, training a click rate prediction model according to the error between the probability label of the current sample click item and the first probability;
[0065] The probability label of the current sample click item indicates the probability of the current sample click item being clicked at the reference time. Optionally, the reference time is the t+1th time. Optionally, the probability label includes a hard label and / or a soft label. A hard label is a one-hot label, and the hard label indicates that the proportion of the positive sample category of the current sample click item is 1. For example, the current sample click item is product A, and the hard label of product A includes 100% of the ballpoint pen category (positive sample category) and 0% of the non-ballpoint pen category (negative sample category), that is, the hard label is a binary classification label.
[0066] The soft label indicates that the proportion of the positive sample category of the current sample click item is p. For example, the current sample click item is product A, and the soft label of product A includes 70% ballpoint pen category (positive sample category), 20% pencil category (negative sample category) and 10% fountain pen category (negative sample category). That is, the soft label is not a binary classification label.
[0067] In one embodiment, the hard label of the current sample click item is used as the probability label of the current sample click item. Since the current sample click item is the sample click item corresponding to the t+1th moment in the user sample behavior sequence, the probability label of the current sample click item is 1.
[0068] In one embodiment, the click rate prediction model is trained according to the error between the first probability predicted by the click rate prediction model and the probability label (hard label: 1) of the current sample click item.
[0069] Step 250 , training a click rate prediction model based on the error between the probability label of the future sample click item and the second probability.
[0070] The probability label of the future sample click item indicates the probability of the future sample click item being clicked after the reference time. Optionally, the reference time is the t+1th time. Optionally, the probability label includes a hard label and / or a soft label. The hard label is a one-hot label, and the hard label indicates that the proportion of the positive sample category of the future sample click item is 1. For example, the future sample click item is animal A, and the hard label of animal A includes 100% dog category (positive sample category) and 0% non-dog category (negative sample category), that is, the hard label is a binary classification label.
[0071] The soft label indicates that the percentage of positive sample categories of the future sample click items is p. For example, if the future sample click item is animal A, the soft label of animal A includes 80% dog category (positive sample category), 10% wolf category (negative sample category) and 10% cat category (negative sample category). That is, the soft label is not a binary classification label.
[0072] In one embodiment, the hard label of the future sample click item is used as the probability label of the future sample click item. Since the future sample click item is the sample click item located after the t+1th moment in the user sample behavior sequence, the probability label of the future sample click item is 1.
[0073] In one embodiment, the soft label of the future sample click item is used as the probability label of the future sample click item. Therefore, the probability label of the future sample click item is p.
[0074] In one embodiment, new labels are generated based on hard labels and soft labels, and the new labels are used as probability labels for future sample click items.
[0075] In one embodiment, the click rate prediction model is trained based on the error between the second probability predicted by the click rate prediction model and the probability label of the future sample click item.
[0076] To summarize, by obtaining the historical sample behavior sequence, the current sample click items and the future sample click items in the user sample behavior sequence, the click rate prediction model is trained according to the historical sample behavior sequence and the current sample click items; the click rate prediction model is trained according to the historical sample behavior sequence and the future sample click items.
[0077] Compared with the related art, this application not only performs the task of predicting the current sample click items, but also performs the task of predicting the future sample click items. The historical sample behavior sequence implies user preference characteristics. This application takes into account that the user preference characteristics are not only related to the current sample click items, but also related to the future sample click items.
[0078] In this application, future sample click items will participate in training as enhanced positive samples of current sample click items. By enhancing the data of training samples, the data sparsity problem of user click items in real use, as well as the variability and irregularity of user click behavior can be alleviated.
[0079] Figure 3 A schematic diagram of a principle provided by an exemplary embodiment of the present application is shown. Figure 3 Shown is the training architecture for the click-through rate prediction model. Figure 3 The knowledge distillation method is used to train the click-through rate prediction model. Figure 3 A student click rate prediction model 301 (ie, student model) and a teacher click rate prediction model 302 (ie, teacher model) in the knowledge distillation architecture are shown. Figure 3 The training framework 300 aims to train the student click rate prediction model 301.
[0080] Figure 3 It shows the sequence of user sample behavior (V1, V2, ..., V t ,…V t+1 、V t+m 、V t+n ). Obtain the historical sample behavior sequence (V1, V2, ..., V t )303, current sample click item 304 (V t+1 ) and future sample click item 305 (V t+m ). The historical sample behavior sequence 303 and the current sample click item 304 are input into the student click rate prediction model 301. The student click rate prediction model 301 outputs the predicted first probability 306. The loss training student click rate prediction model 301 is constructed according to the first probability 306 and the hard label 307 of the current sample click item.
[0081] The future sample click item 305 and the historical sample behavior sequence 303 are input into the student click rate prediction model 301. The student click rate prediction model 301 outputs the predicted second probability 308. According to the second probability 308, the soft label 309 of the future sample click item and the hard label 310 of the future sample click item, the loss training student click rate prediction model 301 is constructed.
[0082] Figure 3 Also shown is a manner of obtaining soft labels 309 for future sample click items. Figure 3 It shows that the future sample click item 305 and the historical sample behavior sequence 303 are input into the teacher click rate prediction model 302, and the soft label 309 of the future sample click item is output.
[0083] Figure 4A flowchart of a method for training a click rate prediction model provided by an exemplary embodiment of the present application is shown. Figure 1 The computer device shown is executed for example, the method includes:
[0084] Step 410, obtaining a historical sample behavior sequence, a current sample click item, and a future sample click item from the user sample behavior sequence;
[0085] User sample behavior sequence: refers to the click behavior sequence for a user in the training data set. The user sample behavior sequence includes multiple sample click items arranged in chronological order. For example, the user sample behavior sequence includes the sample click item V1 at the first moment, the sample click item V2 at the second moment, ..., the sample click item V at the t+nth moment, arranged in sequence. t+n Clickable items refer to items on the terminal interface that users can click on, such as advertisements, news, titles, events, entity words, etc.
[0086] Historical sample behavior sequence: includes multiple sample click items in the user sample behavior sequence that are located before the reference time. Optionally, the reference time is the t+1th time. Optionally, the historical sample behavior sequence includes t sample click items in the user sample behavior sequence that are located before the t+1th time (i.e., t sample click items corresponding to the previous t time). For example, the historical sample behavior sequence includes the sample click item V1 at the first time, the sample click item V2 at the second time, ..., the sample click item V at the tth time, arranged in order. t . t is a positive integer greater than or equal to 1.
[0087] Current sample click item: refers to the sample click item corresponding to the reference time in the user sample behavior sequence. Optionally, the reference time is the t+1th time, which can also be called the current time. The current sample click item can also be expressed as V t+1 .
[0088] Future sample click items: refers to the sample click items in the user sample behavior sequence that are located after the reference time. Optionally, the reference time is the t+1th time. That is, the future sample click items are the sample click items after the current sample click items. For example, the future sample click items are represented as the user sample behavior sequence (V1, V2, ... V t+1 、V t+m 、V t+n ) t+m . Wherein, m is greater than 1 and m is less than n.
[0089] In one embodiment, from the user sample behavior sequence (V1, V2, ... V t+1 、V t+m 、Vt+n ) is located in the current sample click item V t+1 In the subsequent sample click items, randomly select the future sample click item V t+m . Optional, from V t+1 The future sample click items V are randomly sampled with equal probability 1 / (nt) from the sample click items. t+m .
[0090] Step 420, inputting the historical sample behavior sequence and the current sample click item into the student click rate prediction model, and predicting the first probability of the current sample click item being clicked at the reference time;
[0091] In one embodiment, the historical sample behavior sequence (V1, V2...V t ) and the current sample click item (V t+1 ) Input the student click rate prediction model, the student click rate prediction model will output the number of clicks on the current sample click item (V t+1 )’s first probability.
[0092] In one embodiment, the click rate prediction model is any one of GRU4Rec, BERT4Rec, SASRec and CL4Srec. GRU4Rec, BERT4Rec, SASRec and CL4Srec are click rate prediction models provided by related technologies. Therefore, it can be understood that the present application provides a general training architecture, and any click rate prediction model of related technologies can be trained using the method of the present application.
[0093] Step 430, inputting the historical sample behavior sequence and the future sample click item into the student click rate prediction model, and predicting the second probability of the future sample click item being clicked after the reference time;
[0094] In one embodiment, the historical sample behavior sequence (V1, V2...V t ) and future sample click items (V t+m ) Input the student click rate prediction model, the student click rate prediction model will output the future sample click items (V t+m )’s second probability.
[0095] Step 440, training a student click rate prediction model according to the error between the probability label of the current sample click item and the first probability;
[0096] Optionally, the probability label of the current sample clicking the item is a hard label. A hard label is a one-hot label, which indicates that the proportion of the positive sample category of the current sample clicking the item is 1, and the proportion of the negative sample category is 0. A hard label is a binary classification label.
[0097] In one embodiment, the click rate prediction model is trained based on the error between the first probability predicted by the student click rate prediction model and the hard label of the current sample click item. Schematically, the loss L is constructed based on the hard label of the current sample click item and the first probability. ori , according to the loss L ori Train a student click-through rate prediction model.
[0098] Step 450, obtaining hard labels of future sample click items;
[0099] The hard label of the future sample click item indicates that the proportion of the positive sample category of the future sample click item is 1, and the proportion of the negative sample category is 0. The hard label is a binary classification label.
[0100] Step 460, inputting the historical sample behavior sequence and the future sample click item into the teacher click rate prediction model, predicting the third probability of the future sample click item being clicked after the reference time; and using the third probability as a soft label for the future sample click item;
[0101] The soft label indicates that the proportion of positive sample categories in the future sample click items is p. p is a decimal between 0 and 1. That is, the soft label is not a binary classification label. Soft labels are conducive to learning the deep knowledge implied in the probability label. Soft labels realize the denoising and purification of the information of future sample click items. Soft labels will imply the distribution of positive sample categories and negative sample categories. Through the gap between the confidence of the positive sample category and the confidence of the negative sample category, it is conducive to the student click rate prediction model to better learn and utilize future information.
[0102] The teacher click rate prediction model is used to guide the student click rate prediction model to train. The teacher click rate prediction model is used to guide the student click rate prediction model to learn the knowledge of future sample click items. The parameter scale of the teacher click rate prediction model is not less than the parameter scale of the student click rate prediction model.
[0103] In one embodiment, the historical sample behavior sequence and the future sample click items are input into the teacher click rate prediction model to predict the third probability of the future sample click item being clicked after the t+1th time; the third probability is used as a soft label for the future sample click item. The value of the third probability is a decimal between 0 and 1.
[0104] Step 470, generating a probability label of a future sample click item based on the hard label and the soft label;
[0105] In one embodiment, the soft label is multiplied by the softening weight to obtain a third value. The hard label is multiplied by the hardening weight to obtain a fourth value; the sum of the softening weight and the hardening weight is one. The third value and the fourth value are summed to obtain a probability label of the future sample clicking the item.
[0106] Indicatively, the following formula is used to express it:
[0107]
[0108] in, represents the probability label of the future sample clicking item, v t+m represents the future sample click item, s t represents the historical sample click behavior sequence, P T (v t+m |s t ) represents the soft label (i.e., the third probability) output by the teacher’s click rate prediction model, y represents the hard label of the future sample click item, α represents the softening weight, and (1-α) represents the hardening weight.
[0109] In one embodiment, the softening weight of the future sample click item is determined from a plurality of candidate softening weights. Schematically, a first softening weight matching the soft label is selected from a plurality of candidate softening weights; the first softening weight is used as the softening weight of the soft label. Schematically, a plurality of candidate softening weights are pre-set, such as 0.2, 0.5, 0.7, 0.9, etc. According to the calculated soft label value, a softening weight for performing the softening operation of the soft label is selected from 0.2, 0.5, 0.7, and 0.9. Schematically, the soft label value is 0.9, indicating that the future sample click item is relatively clean, and a larger softening weight of 0.9 is selected, and the corresponding hardening weight is 0.1. Schematically, the soft label value is 0.6, indicating that the future sample click item has more noise, and a smaller softening weight of 0.2 is selected, and the corresponding hardening weight is 0.8.
[0110] Step 480, training the student click rate prediction model based on the error between the probability label of the future sample click item and the second probability.
[0111] In one embodiment, a cross entropy loss function value is calculated based on the probability label and the second probability of future sample click items; and a click rate prediction model is trained based on the cross entropy loss function value.
[0112] Schematically, the augmented loss is constructed based on the probability label of the future sample clicking the item and the second probability. In one embodiment, the augmented loss is represented by cross entropy. Schematically, the formula of the augmented loss is as follows:
[0113]
[0114] Where u represents the user, n is the n in the total length (t+n) of the user sample behavior sequence, t is the tth moment, and v t+m Click on the project for future samples, represents the probability label of the future sample click item, s t represents the historical sample click behavior sequence, P(v t+m |s t ) represents the second probability output by the student click rate prediction model, represents (1-P(v t+m |s t ))’s value.
[0115] It can be understood that the augmented loss is a loss constructed under three dimensions: multiple users, multiple current sample click items, and multiple future sample click items. In this embodiment, a detailed analysis has been carried out specifically for a current sample click item and a future sample click item of a user sample behavior sequence.
[0116] In summary, the above embodiment trains the click rate prediction model through the knowledge distillation architecture, and the knowledge distillation architecture includes a student model (student click rate prediction model) and a teacher model (teacher click rate prediction model). The soft labels of future sample click items are generated by the teacher model, and the student model is trained according to the soft labels and hard labels of future sample click items. The knowledge distillation architecture is conducive to training the student model on the basis of the teacher model, which can improve the training efficiency of the student model.
[0117] In addition, soft labels realize the denoising and purification of label information of future sample click items. Soft labels will imply the distribution of positive sample categories and negative sample categories. The gap between the confidence of positive sample categories and the confidence of negative sample categories is helpful for the teacher model to guide the student model for training. The knowledge guided by the teacher model is more confident, which can improve the prediction accuracy of the trained student model.
[0118] Figure 5 A schematic diagram of a principle provided by an exemplary embodiment of the present application is shown. Figure 5 A training architecture 500 for a click-through rate prediction model is shown. Figure 5 The knowledge distillation method is used to train the click-through rate prediction model. Figure 5 The student click rate prediction model 501 (ie, the student model) of the current training round in knowledge distillation and the teacher click rate prediction model 502 (ie, the teacher model) of the current training round are shown. Figure 5 The training architecture aims to train the student click rate prediction model 501 for the current training round.
[0119] Figure 5 It shows the sequence of user sample behavior (V1, V2, ..., V t ,…V t+1 、V t+m 、V t+n ). Obtain the historical sample behavior sequence (V1, V2, ..., V t )503, current sample click item 504 (V t+1 ) and future sample click item 505 (V t+m ). The historical sample behavior sequence 503 and the current sample click item 504 are input into the student click rate prediction model 501 of the current training round. The student click rate prediction model 501 of the current training round will output the predicted first probability 506. According to the first probability 506 and the hard label 507 of the current sample click item, the loss training student click rate prediction model 501 of the current training round is constructed.
[0120] The future sample click item 505 and the historical sample behavior sequence 503 are input into the student click rate prediction model 501 of the current training round. The student click rate prediction model 501 of the current training round will output the predicted second probability 508. According to the second probability 508, the soft label 509 of the future sample click item and the hard label 510 of the future sample click item, the student click rate prediction model 501 of the current training round is constructed by loss training.
[0121] Figure 5 Also shown is a manner of obtaining soft labels 509 for future sample click items. Figure 5 It shows that the future sample click items 505 and the historical sample behavior sequence 503 are input into the teacher click rate prediction model 502 of the current training round, and the soft label 509 of the future sample click items is output.
[0122] Figure 5 It also shows that the teacher click rate prediction model 502 of the current training round is obtained based on the teacher click rate prediction model 511 of the previous training round and the student click rate prediction model 501 of the current training round.
[0123] Figure 6 A flowchart of a method for training a click rate prediction model provided by an exemplary embodiment of the present application is shown. Figure 1 The computer device shown is executed for example, the method includes:
[0124] Step 610, obtaining a historical sample behavior sequence, a current sample click item, and a future sample click item from the user sample behavior sequence;
[0125] User sample behavior sequence: refers to the click behavior sequence for a user in the training data set. The user sample behavior sequence includes multiple sample click items arranged in chronological order. For example, the user sample behavior sequence includes the sample click item V1 at the first moment, the sample click item V2 at the second moment, ..., the sample click item V at the t+nth moment, arranged in sequence. t+n Clickable items refer to items on the terminal interface that users can click on, such as advertisements, news, titles, events, entity words, etc.
[0126] Historical sample behavior sequence: includes multiple sample click items in the user sample behavior sequence that are located before the reference time. Optionally, the reference time is the t+1th time. Optionally, the historical sample behavior sequence includes t sample click items in the user sample behavior sequence that are located before the t+1th time (i.e., t sample click items corresponding to the previous t time). For example, the historical sample behavior sequence includes the sample click item V1 at the first time, the sample click item V2 at the second time, ..., the sample click item V at the tth time, arranged in order. t . t is a positive integer greater than 1.
[0127] Current sample click item: refers to the sample click item corresponding to the reference time in the user sample behavior sequence. Optionally, the reference time is the t+1th time, which can also be called the current time. The current sample click item can also be expressed as V t+1 .
[0128] Future sample click items: refers to the sample click items in the user sample behavior sequence that are located after the reference time. Optionally, the reference time is the t+1th time. That is, the future sample click items are the sample click items after the current sample click items. For example, the future sample click items are represented as the user sample behavior sequence (V1, V2, ... V t+1 、V t+m 、V t+n ) t+m . Wherein, m is greater than 1 and m is less than n. In one embodiment, from the user sample behavior sequence (V1, V2, ... V t+1 、V t+m 、V t+n ) is located in the current sample click item V t+1 In the subsequent sample click items, randomly select the future sample click item V t+m .
[0129] Step 620, inputting the historical sample behavior sequence and the current sample click item into the student click rate prediction model of the current training round, and predicting the first probability of the current sample click item being clicked at the reference time;
[0130] In one embodiment, the historical sample behavior sequence (V1, V2...V t ) and the current sample click item (V t+1 ) is input into the click rate prediction model, and the click rate prediction model will output the number of clicks on the current sample item (V t+1 )’s first probability.
[0131] In one embodiment, the click rate prediction model is any one of GRU4Rec, BERT4Rec, SASRec and CL4Srec. GRU4Rec, BERT4Rec, SASRec and CL4Srec are click rate prediction models provided by related technologies. Therefore, it can be understood that the present application provides a general training architecture, and any click rate prediction model of related technologies can be trained using the method of the present application.
[0132] Step 630, inputting the historical sample behavior sequence and the future sample click items into the student click rate prediction model of the current training round, and predicting the second probability of the future sample click items being clicked after the reference time;
[0133] In one embodiment, the historical sample behavior sequence (V1, V2...V t ) and future sample click items (V t+m ) Input the click rate prediction model of the current training round, and the click rate prediction model will output the future sample click item (V t+m )’s second probability.
[0134] Step 640, training the student click rate prediction model of the current training round according to the error between the probability label of the current sample click item and the first probability;
[0135] Optionally, the probability label of the current sample click item is a hard label. The hard label indicates that the proportion of the positive sample category of the current sample click item is 1, and the proportion of the negative sample category is 0. The hard label is a binary classification label. Schematically, the loss L is constructed based on the hard label of the current sample click item and the first probability ori , according to the loss L ori Train the student click rate prediction model for the current training round.
[0136] Step 650, obtaining hard labels of future sample click items;
[0137] The hard label of the future sample click item indicates that the proportion of the positive sample category of the future sample click item is 1, and the proportion of the negative sample category is 0. The hard label is a binary classification label.
[0138] Step 660, generating a teacher click rate prediction model for the current training round based on the teacher click rate prediction model for the previous training round and the student click rate prediction model for the current training round;
[0139] In one embodiment, the model parameters of the teacher click rate prediction model of the previous training round are multiplied by the first decay weight to obtain a first value. The model parameters of the student click rate prediction model of the current training round are multiplied by the second decay weight to obtain a second value; the sum of the first decay weight and the second decay weight is one. The first value and the second value are summed to obtain the model parameters of the teacher click rate prediction model of the current training round.
[0140] Indicatively, the formula is as follows:
[0141] θ T (t) = dθ T (t-1)+(1-d)θ(t);
[0142] Among them, θ T (t-1) is the model parameter of the teacher click rate prediction model in the previous training round, θ(t) is the model parameter of the student click rate prediction model in the current training round, and θ T (t) is the model parameter of the teacher click rate prediction model of the current training round, d represents the first decay weight, and (1-d) represents the second decay weight. The decay weight represents the parameter decay of the teacher prediction model of the current training round compared with the teacher prediction model of the previous training round.
[0143] It can be understood that the above formula indicates that the teacher click rate prediction model is generated using the EMA (Exponential Moving Average) method.
[0144] It can be understood that the generation method of the above teacher click rate prediction model indicates that the knowledge distillation will be performed on the future sample click items by self-distillation. The self-distillation method is a knowledge distillation method in which the student model and the teacher model are the same model.
[0145] Step 670, input the historical sample behavior sequence and the future sample click item into the teacher click rate prediction model of the current training round, predict the third probability of the future sample click item being clicked at the reference time; use the third probability as the soft label of the future sample click item;
[0146] The soft label indicates that the proportion of positive sample categories in the future sample click items is p. p is a decimal between 0 and 1. That is, the soft label is not a binary classification label. Soft labels are conducive to learning the deep knowledge implied in the probability label. Soft labels realize the denoising and purification of the information of future sample click items. Soft labels will imply the distribution of positive sample categories and negative sample categories. Through the gap between the confidence of the positive sample category and the confidence of the negative sample category, it is conducive to the student click rate prediction model to better learn and utilize future information.
[0147] In one embodiment, in the current training round, the historical sample behavior sequence and the future sample click items are input into the teacher click rate prediction model of the current training round, and the third probability of the future sample click item being clicked is predicted; the third probability is used as a soft label for the future sample click item. The value of the third probability is a decimal between 0 and 1.
[0148] Step 680, generating a probability label of a future sample click item based on the hard label and the soft label;
[0149] In one embodiment, in the current training round, the soft label is multiplied by the softening weight to obtain a third value. The hard label is multiplied by the hardening weight to obtain a fourth value; the sum of the softening weight and the hardening weight is one. The third value and the fourth value are summed to obtain a probability label of a future sample clicking on the item.
[0150] Indicatively, the following formula is used to express it:
[0151]
[0152] in, represents the probability label of the future sample clicking item, v t+m represents the future sample click item, s t represents the historical sample click behavior sequence, P T (v t+m |s t ) represents the soft label (i.e., the third probability) output by the teacher’s click rate prediction model, y represents the hard label of the future sample click item, α represents the softening weight, and (1-α) represents the hardening weight.
[0153] Step 690 , training the student click rate prediction model of the current training round according to the error between the probability label of the future sample click item and the second probability.
[0154] In one embodiment, in the current training round, a cross entropy loss function value is calculated based on the probability label and the second probability of future sample click items; and a click rate prediction model is trained based on the cross entropy loss function value.
[0155] Schematically, the augmented loss is constructed based on the probability label of the future sample clicking the item and the second probability. In one embodiment, the augmented loss is represented by cross entropy. Schematically, the formula of the augmented loss is as follows:
[0156]
[0157] Where u represents the user, n is the n in the total length (t+n) of the user sample behavior sequence, t is the tth moment, and v t+m Click on the project for future samples, represents the probability label of the future sample click item, s t represents the historical sample click behavior sequence, P(v t+m |s t ) represents the second probability output by the student prediction model, represents (1-P(v t+m |s t ))’s value.
[0158] It can be understood that the augmented loss is a loss constructed under three dimensions: multiple users, multiple current sample click items, and multiple future sample click items. In this embodiment, a detailed analysis has been carried out specifically for a current sample click item and a future sample click item of a user sample behavior sequence.
[0159] In summary, the above embodiment provides a method for generating a teacher model (teacher click rate prediction model). The teacher model is essentially obtained by the student model of the previous training round and the student model of the current training round. Therefore, the knowledge distillation method of the above embodiment is self-distillation. The above embodiment uses the self-distillation method to generate soft labels, which can improve the label quality of future sample click items.
[0160] Figure 7 A schematic diagram showing a principle provided by an exemplary embodiment of the present application is shown. Figure 7 A training architecture 700 for a click-through rate prediction model is shown. Figure 7 The knowledge distillation method is used to train the student click rate prediction model. Figure 7 A student click rate prediction model 701 (ie, student model) and a teacher click rate prediction model 702 (ie, teacher model) in knowledge distillation are shown. Figure 7 The training architecture aims to train the student click rate prediction model 701 for the current training round.
[0161] Figure 7 It shows the sequence of user sample behavior (V1, V2, ..., V t ,…V t+1 、V t+m 、V t+n). Obtain the historical sample behavior sequence (V1, V2, ..., V t )703, current sample click item 704 (V t+1 ) and future sample click item 705 (V t+m ). The historical sample behavior sequence 703 and the current sample click item 704 are input into the student click rate prediction model 701. The student click rate prediction model 701 will output the predicted first probability ( Figure 7 (not shown). The loss L is constructed based on the first probability and the hard label of the current sample click item. ori Train the student click rate prediction model 701.
[0162] The future sample click item 705 and the historical sample behavior sequence 703 are input into the student click rate prediction model 701. The student click rate prediction model 701 will output the predicted second probability ( Figure 7 According to the second probability, the soft label of the future sample click item and the hard label of the future sample click item, the loss L is constructed. aug The student click rate prediction model 701 of the current training round is trained.
[0163] Figure 7 Also shown is a way to obtain soft labels for future sample click items. Figure 7 It shows that the future sample click items 705 and the historical sample behavior sequence 703 are input into the teacher click rate prediction model 702, and the soft labels of the future sample click items are output. Figure 7 The method of obtaining the soft tag shown is a self-distillation method.
[0164] Figure 7 The method for generating the teacher click rate prediction model 702 is also shown. The parameters (θ1, θ2, ..., θk) of the student click rate prediction model of the historical training round and the parameters of the student click rate prediction model of the current training round are used to obtain the parameters of the teacher click rate prediction model of the current training round using an exponential moving average strategy. The parameters of the student click rate prediction model 701 will be continuously stored and updated to facilitate the generation of the teacher click rate prediction model 702 of the current training round.
[0165] Understandably, Figure 7 The training architecture 700 shown in the figure is based on the user's behavior sequence s at t+1. t = {v1, ..., v t} as input, output a user's expression vector, which is then used to predict the currently clicked sample item V t+1 The student click rate prediction model expands the original positive term V from multiple click items of future clicks t+1, thus achieving future information gain. To mitigate the additional noise, Figure 7 The training architecture uses self-distillation with EMA to generate soft labels for these enhanced positive terms, and combines these soft labels with their hard labels for training.
[0166] Figure 7 The items shown for future clicks are natural high-quality augmented samples of the current clicked items. Optionally, an equal probability method is used to select items for data augmentation. Optionally, items for future clicks are randomly sampled with equal probability 1 / (nt) (1≤m≤nt).
[0167] To avoid additional noise from future enhancements, Figure 7 Use self-distillation to reweight the newly enhanced positive samples V t+m Specifically, self-distillation is relied upon to provide more reliable and stable soft labels for these samples. Optionally, the teacher click rate prediction model is obtained by two methods. First, the student click rate prediction model that performs best on the validation set of the past training round (epoch) is directly used as the teacher click rate prediction model of the current training round. Second, the teacher click rate prediction model of the current training round is obtained by performing EMA on the student click rate prediction model of the past training round (epoch). Formally, the parameter θ of the teacher click rate prediction model at time t T (t) The parameter θ of the model predicted by the previous teacher’s click rate T (t-1) and the parameter θ(t) of the current student click rate prediction model are generated, with a decay rate of d. The specific formula is:
[0168] θ T (t) = dθ T (t-1)+(1-d)θ(t);
[0169] Next, the predicted probability P of the teacher (i.e., soft label) is T (v t+m |s t ) is combined with the hard label y with weight α to obtain the final label of the enhanced sample for: y=1 indicates positive sample V t+m , y = 0 represents a random negative sample. α is the softening weight. Finally, the augmented loss L aug Formally:
[0170]
[0171] In this way, employing an ensemble of historical models to guide the learning of enhanced positive samples can reduce the risk of involving additional noise and improve label quality.
[0172] Table 1 below shows that with GRU4Rec, BERT4Rec, SASRec, and CL4SRec as the basic model structure, plus the FASRec algorithm (i.e., the algorithm provided in this application), through rigorous experiments, significant improvements can be obtained on three public data sets (Yelp, Beauty, and Sports). And the effect is also improved in the online ABTest (a significance test scheme). In Table 1 below, HR@1, HR@5, HR@10, HR@20, NDCG@5, NDCG@10, and NDCG@20 are evaluation indicators. HR (HitRatio, hit rate) @K is an evaluation indicator. NDCG (Normalized Discounted Cumulative Gain, normalized discounted cumulative gain) @K is another evaluation indicator.
[0173] Table 1
[0174]
[0175]
[0176] In experiments, FASRec (the algorithm provided in this application) achieved significant and consistent improvements in offline and online evaluations using different base sequence recommendation models, confirming the effectiveness and universality of FASRec.
[0177] Figure 8 A training device for a click rate prediction model provided by an exemplary embodiment of the present application is shown, and the device includes:
[0178] The acquisition module 801 is used to acquire a historical sample behavior sequence, a current sample click item, and a future sample click item from the user sample behavior sequence; the user sample behavior sequence includes a plurality of sample click items arranged in chronological order, the historical sample behavior sequence includes a plurality of sample click items located before a reference time, the current sample click item is a sample click item corresponding to the reference time, and the future sample click item is a sample click item located after the reference time; t is a positive integer greater than or equal to 1;
[0179] Prediction module 802, used to input the historical sample behavior sequence and the current sample click item into the click rate prediction model, and predict the first probability of the current sample click item being clicked at the reference time;
[0180] The prediction module 802 is further used to input the historical sample behavior sequence and the future sample click item into the click rate prediction model to predict the second probability of the future sample click item being clicked after the reference time;
[0181] The training module 803 is used to train the click rate prediction model according to the error between the probability label of the current sample click item and the first probability; and to train the click rate prediction model according to the error between the probability label of the future sample click item and the second probability.
[0182] In an optional embodiment, the training module 803 is also used to obtain hard labels and soft labels for future sample click items, where the hard label indicates that the proportion of positive sample categories of future sample click items is 1, and the soft label indicates that the proportion of positive sample categories of future sample click items is p, where p is greater than or equal to 0 and p is less than or equal to 1; based on the hard label and the soft label, a probability label for future sample click items is generated; and based on the error between the probability label for future sample click items and the second probability, a click rate prediction model is trained.
[0183] In an optional embodiment, the click rate prediction model is a student click rate prediction model. The training module 803 is also used to input the historical sample behavior sequence and the future sample click items into the teacher click rate prediction model, predict the third probability of the future sample click item being clicked after the reference time; the parameter scale of the teacher click rate prediction model is not less than the parameter scale of the student click rate prediction model; and use the third probability as a soft label for the future sample click item.
[0184] In an optional embodiment, the student click rate prediction model is the student click rate prediction model of the current training round, and the teacher click rate prediction model is the teacher click rate prediction model of the current training round. The device also includes a generation module 804. The generation module 804 is used to generate a teacher click rate prediction model of the current training round based on the teacher click rate prediction model of the previous training round and the student click rate prediction model of the current training round.
[0185] In an optional embodiment, the generation module 804 is also used to multiply the model parameters of the teacher click-through rate prediction model of the previous training round by the first attenuation weight to obtain a first value; multiply the model parameters of the student click-through rate prediction model of the current training round by the second attenuation weight to obtain a second value; the sum of the first attenuation weight and the second attenuation weight is one; and the first value and the second value are summed to obtain the model parameters of the teacher click-through rate prediction model of the current training round.
[0186] In an optional embodiment, the training module 803 is also used to multiply the soft label by the softening weight to obtain a third value; multiply the hard label by the hardening weight to obtain a fourth value; the sum of the softening weight and the hardening weight is one; and the third value and the fourth value are summed to obtain a probability label for future sample click items.
[0187] In an optional embodiment, the training module 803 is further configured to select a first softened weight matching the soft label from a plurality of candidate softened weights; and use the first softened weight as the softened weight of the soft label.
[0188] In an optional embodiment, the acquisition module 801 is further used to randomly extract future sample click items from the sample click items that follow the current sample click item in the user sample behavior sequence.
[0189] In an optional embodiment, the training module 803 is further used to calculate the cross entropy loss function value based on the probability label and the second probability of future sample click items; and train the click rate prediction model based on the cross entropy loss function value.
[0190] To summarize, by obtaining the historical sample behavior sequence, the current sample click items and the future sample click items in the user sample behavior sequence, the click rate prediction model is trained according to the historical sample behavior sequence and the current sample click items; the click rate prediction model is trained according to the historical sample behavior sequence and the future sample click items.
[0191] Compared with the related art, this application not only performs the task of predicting the current sample click items, but also performs the task of predicting the future sample click items. The historical sample behavior sequence implies user preference characteristics. This application takes into account that the user preference characteristics are not only related to the current sample click items, but also related to the future sample click items.
[0192] In this application, future sample click items will participate in training as enhanced positive samples of current sample click items. By enhancing the data of training samples, the data sparsity problem of user click items in real use, as well as the variability and irregularity of user click behavior can be alleviated.
[0193] Fig. 9 1 is a schematic diagram of a computer device according to an exemplary embodiment. The computer device 900 includes a central processing unit (CPU) 901, a system memory 904 including a random access memory (RAM) 902 and a read-only memory (ROM) 903, and a system bus 905 connecting the system memory 904 and the central processing unit 901. The computer device 900 also includes a basic input / output system (I / O system) 906 for helping to transmit information between various devices in the computer device, and a large-capacity storage device 907 for storing an operating system 913, an application program 914 and other program modules 915.
[0194] The basic input / output system 906 includes a display 908 for displaying information and an input device 909 such as a mouse and a keyboard for user inputting information. The display 908 and the input device 909 are connected to the central processing unit 901 through an input / output controller 910 connected to the system bus 905. The basic input / output system 906 may also include an input / output controller 910 for receiving and processing inputs from a plurality of other devices such as a keyboard, a mouse, or an electronic stylus. Similarly, the input / output controller 910 also provides output to a display screen, a printer, or other types of output devices.
[0195] The mass storage device 907 is connected to the central processing unit 901 via a mass storage controller (not shown) connected to the system bus 905. The mass storage device 907 and its associated computer device readable medium provide non-volatile storage for the computer device 900. That is, the mass storage device 907 may include a computer device readable medium (not shown) such as a hard disk or a Compact Disc Read-Only Memory (CD-ROM) drive.
[0196] Without loss of generality, the computer device readable medium may include computer device storage media and communication media. Computer device storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer device readable instructions, data structures, program modules or other data. Computer device storage media include RAM, ROM, Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), CD-ROM, Digital Video Disc (DVD) or other optical storage, cassette, tape, disk storage or other magnetic storage devices. Of course, those skilled in the art will know that the computer device storage medium is not limited to the above. The above-mentioned system memory 904 and mass storage device 907 can be collectively referred to as memory.
[0197] According to various embodiments of the present disclosure, the computer device 900 can also be connected to a remote computer device on a network through a network such as the Internet. That is, the computer device 900 can be connected to the network 911 through the network interface unit 912 connected to the system bus 905, or the network interface unit 912 can be used to connect to other types of networks or remote computer device systems (not shown).
[0198] The memory also includes one or more programs, which are stored in the memory. The central processing unit 901 implements all or part of the steps of the training method of the above-mentioned click-through rate prediction model by executing the one or more programs.
[0199] The present application also provides a computer-readable storage medium, in which at least one instruction, at least one program, a code set or an instruction set is stored. The at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the training method of the click-through rate prediction model provided in the above method embodiment.
[0200] The present application provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the training method of the click-through rate prediction model provided by the above method embodiment.
[0201] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0202] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0203] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A training method for a click rate prediction model, characterized in that: The method comprises: Acquire a historical sample behavior sequence, a current sample click item, and a future sample click item from a user sample behavior sequence; the user sample behavior sequence includes a plurality of sample click items arranged in chronological order, the historical sample behavior sequence includes a plurality of sample click items located before a reference time, the current sample click item is a sample click item corresponding to the reference time, and the future sample click item is a sample click item located after the reference time; Inputting the historical sample behavior sequence and the current sample click item into the click rate prediction model to predict a first probability of the current sample click item being clicked at the reference time; Inputting the historical sample behavior sequence and the future sample click item into the click rate prediction model to predict a second probability that the future sample click item will be clicked after the reference time; The click rate prediction model is trained based on the error between the probability label of the current sample click item and the first probability; and the click rate prediction model is trained based on the error between the probability label of the future sample click item and the second probability.
2. The method according to claim 1, characterized in that The step of training the click rate prediction model according to the error between the probability label of the future sample click item and the second probability comprises: Obtain a hard label and a soft label of the future sample click item, wherein the hard label indicates that the proportion of the positive sample category of the future sample click item is 1, and the soft label indicates that the proportion of the positive sample category of the future sample click item is p, where p is greater than or equal to 0 and p is less than or equal to 1; Generate a probability label of the future sample click item according to the hard label and the soft label; The click rate prediction model is trained according to the error between the probability label of the future sample click item and the second probability.
3. The method according to claim 2, characterized in that The click rate prediction model is a student click rate prediction model; the step of obtaining the soft label of the future sample click item includes: Input the historical sample behavior sequence and the future sample click item into the teacher click rate prediction model to predict the third probability of the future sample click item being clicked after the reference time; the parameter scale of the teacher click rate prediction model is not less than the parameter scale of the student click rate prediction model; The third probability is used as a soft label of the future sample click item.
4. The method according to claim 3, characterized in that The student click rate prediction model is a student click rate prediction model of the current training round, and the teacher click rate prediction model is a teacher click rate prediction model of the current training round; the method further includes: The teacher click rate prediction model for the current training round is generated based on the teacher click rate prediction model for the previous training round and the student click rate prediction model for the current training round.
5. The method according to claim 4, characterized in that The method of generating a teacher click rate prediction model for the current training round based on the teacher click rate prediction model for the previous training round and the student click rate prediction model for the current training round includes: Multiplying the model parameter of the teacher click rate prediction model of the previous training round by the first decay weight to obtain a first value; Multiplying the model parameter of the student click rate prediction model of the current training round by a second decay weight to obtain a second value; the sum of the first decay weight and the second decay weight is one; The first value and the second value are summed to obtain the model parameters of the teacher click rate prediction model of the current training round.
6. The method according to claim 2, characterized in that The step of generating a probability label of the future sample click item according to the hard label and the soft label includes: Multiplying the soft label by a softening weight to obtain a third value; The hard tag is multiplied by a hardening weight to obtain a fourth value; the sum of the softening weight and the hardening weight is one; The third value and the fourth value are summed to obtain a probability label of the future sample clicking the item.
7. The method according to claim 6, characterized in that The method further comprises: A first softened weight matching the soft label is selected from a plurality of candidate softened weights; and the first softened weight is used as the softened weight of the soft label.
8. The method according to any one of claims 1 to 7, characterized in that: The obtaining of the future sample click item includes: The future sample click item is randomly extracted from the sample click items that follow the current sample click item in the user sample behavior sequence.
9. The method according to any one of claims 1 to 7, characterized in that: The step of training the click rate prediction model according to the error between the probability label of the future sample click item and the second probability comprises: A cross entropy loss function value is calculated based on the probability label of the future sample click item and the second probability; and the click rate prediction model is trained based on the cross entropy loss function value.
10. A training device for a click rate prediction model, characterized in that: The device comprises: An acquisition module, used to acquire a historical sample behavior sequence, a current sample click item, and a future sample click item from a user sample behavior sequence; the user sample behavior sequence includes a plurality of sample click items arranged in chronological order, the historical sample behavior sequence includes a plurality of sample click items located before a reference time, the current sample click item is a sample click item corresponding to the reference time, and the future sample click item is a sample click item located after the reference time; A prediction module, used for inputting the historical sample behavior sequence and the current sample click item into the click rate prediction model, and predicting a first probability of the current sample click item being clicked at the reference time; The prediction module is further used to input the historical sample behavior sequence and the future sample click item into the click rate prediction model to predict a second probability that the future sample click item will be clicked after the reference time; A training module is used to train the click rate prediction model according to the error between the probability label of the current sample click item and the first probability; and to train the click rate prediction model according to the error between the probability label of the future sample click item and the second probability.
11. The device according to claim 10, characterized in that The training module is further used to obtain a hard label and a soft label of the future sample click item, wherein the hard label indicates that the proportion of the positive sample category of the future sample click item is 1, and the soft label indicates that the proportion of the positive sample category of the future sample click item is p, where p is greater than or equal to 0 and p is less than or equal to 1; The training module is further used to generate a probability label of the future sample click item based on the hard label and the soft label; The training module is further used to train the click rate prediction model according to the error between the probability label of the future sample click item and the second probability.
12. The device according to claim 11, characterized in that The click rate prediction model is a student click rate prediction model; The training module is further used to input the historical sample behavior sequence and the future sample click item into the teacher click rate prediction model to predict the third probability of the future sample click item being clicked after the t+1th time; the parameter scale of the teacher click rate prediction model is not less than the parameter scale of the student click rate prediction model; The training module is further configured to use the third probability as a soft label for the future sample click item.
13. A computer device, characterized in that: The computer device comprises: a processor and a memory, wherein the memory stores a computer program, and the computer program is loaded and executed by the processor to implement the training method of the click rate prediction model as described in any one of claims 1 to 9.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is loaded and executed by a processor to implement the training method of the click-through rate prediction model as described in any one of claims 1 to 9.
15. A computer program product, characterized in that The computer program product stores a computer program, and the computer program is loaded and executed by a processor to implement the training method of the click rate prediction model as described in any one of claims 1 to 9.
Citation Information
Patent Citations
A method and apparatus for generating a click-through rate prediction model
CN109460513A
Information processing method, recommendation method and related equipment
CN110851713A
Neural network black box aggressive defense method based on knowledge distillation
CN111027060A
Method and device for training click rate prediction model
CN111488517A
Behavior prediction method and device, electronic equipment and readable storage medium
CN111539512A
