Click rate estimation method and device, computing device, storage medium and program product
Patent Information
- Application Number
- CN202611181353.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-05
- Publication Date
- 2026-10-27
AI Technical Summary
[0003]虽然已经存在点击率预估方案,然而,现有方案在应用于点击率预估任务时仍存在以下缺陷:缺乏对用户行为序列的时序建模能力
上述说明仅是本申请实施例技术方案的概述,为了能够更清楚了解本申请实施例的技术手段,而可依照说明书的内容予以实施,并且为了让本申请实施例的上述和其它目的、特征和优点能够更明显易懂,以下特举本申请实施例的具体实施方式。
Smart Images

Figure CN122986178A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, specifically to a click-through rate prediction method, apparatus, computing device, storage medium, and program product. Background Technology
[0002] Click-through rate (CTR) prediction is a core ranking element in internet content distribution systems such as news feed recommendations, online advertising, and search engines. Its accuracy directly impacts user experience, content distribution efficiency, and platform revenue. In real-world business scenarios, CTR prediction faces an extremely complex data environment: on the one hand, data exhibits extreme sparsity and cold-start issues; on the other hand, user behavior displays significant sequential characteristics and dynamic evolution patterns. Furthermore, data distribution is highly heterogeneous, containing both frequently interacting top-performing users and long-tail cold-start users with limited activity; simultaneously, the feature space distributions of popular and unpopular data differ significantly. Achieving high-accuracy CTR prediction in such a complex data environment, characterized by sparsity, temporal sequence, and heterogeneity, remains a key technical challenge that continues to be a focus in this field.
[0003] While click-through rate (CTR) prediction solutions already exist, they still suffer from the following shortcomings when applied to CTR prediction tasks: a lack of temporal modeling capabilities for user behavior sequences. Existing generators typically treat the input as a static set of features, failing to leverage the implicit temporal dependencies and dynamic evolution of interests within users' historical behavior sequences. This results in predictions lacking temporal accuracy and failing to accurately reflect the user's current interest state. Summary of the Invention
[0004] In view of the above problems, this application is made in order to provide a click-through rate prediction method, apparatus, computing device, computer storage medium and computer program product that overcomes or at least partially solves the above problems.
[0005] According to one aspect of the embodiments of this application, a click-through rate (CTR) prediction method is provided, comprising: Obtain multi-source heterogeneous features of sample objects, user historical behavior sequence features, and the real click tags corresponding to sample objects; The generator is used to process the user's historical behavior sequence features in a time series to obtain the user's dynamic interest time series features. The user's dynamic interest time series features are then fused with multi-source heterogeneous features. Click-through rate is predicted based on the fused features to obtain the estimated click-through rate of the sample object. Generate sample pairs by combining fusion features with the predicted click-through rate of sample objects, and generate real sample pairs by combining fusion features with real click tags; The generated sample pairs and real sample pairs are respectively input into the discriminator to determine the authenticity of the samples and obtain the corresponding discrimination confidence scores. Alternately iterate through the parameter updates of the discriminator and the generator until the preset convergence condition is met, and output the trained click-through rate prediction model: calculate the discriminant loss function based on the difference between the discriminant confidence of generated sample pairs and the discriminant confidence of real sample pairs, and update the network parameters of the discriminator based on the discriminant loss function; calculate the generator loss function based on the difference between the predicted click-through rate and the real click tags and the discriminant confidence of generated sample pairs, and update the network parameters of the generator based on the generator loss function; Obtain the multi-source heterogeneous features of the object to be predicted and the corresponding user historical behavior sequence features; The multi-source heterogeneous features of the object to be predicted and the corresponding user historical behavior sequence features are input into the click-through rate prediction model to predict the click-through rate and obtain the predicted click-through rate of the object to be predicted.
[0006] Furthermore, the decision-maker includes: a gating network and multiple independent expert networks; The generated sample pairs and real sample pairs are respectively input into the discriminator to determine the authenticity of the samples, and the corresponding discrimination confidence scores are obtained. Further, this includes: For each sample pair in the generated sample pairs and the real sample pairs, the expert networks are used to judge the authenticity of the sample pairs and obtain the corresponding discrimination scores. The gating network is used to perform feature perception and routing calculation on the sample pairs and output the discrimination weights corresponding to each expert network. Based on the discrimination weights and the corresponding discrimination scores, the discrimination confidence of the sample pairs is calculated.
[0007] Furthermore, the generator loss function includes: content loss function and adversarial loss function; The generator loss function is calculated based on the difference between the estimated click-through rate and the actual clicked tags, as well as the discrimination confidence of the generated sample pairs. This further includes: Based on the difference between the estimated click-through rate and the actual clicked tags, the content loss function is calculated, and the adversarial loss function is generated based on the discrimination confidence of the generated sample pairs. The generator loss function is obtained by weighted summation of the content loss function and the adversarial loss function.
[0008] Furthermore, the adversarial loss function generated based on the discriminative confidence of the generated sample pairs further includes: The mean of the discrimination confidence scores for each generated sample pair is calculated to obtain the expected confidence score of the generated sample. The negative value of the expected confidence of the generated sample is used as the adversarial loss function, which is used to maximize the discrimination confidence of the generated sample pair in order to reduce the earthmoving distance between the data distribution of the generated sample pair and the data distribution of the real sample pair.
[0009] Furthermore, the calculation of the discriminant loss function based on the difference between the discriminant confidence scores of generated sample pairs and the discriminant confidence scores of real sample pairs further includes: The distance loss of the Earth transporter is calculated based on the discrimination confidence of the generated sample pairs and the discrimination confidence of the real sample pairs; Interpolation sampling is performed between the true click labels of real sample pairs and the estimated click rates of generated sample pairs to obtain interpolated click rates. Interpolated sample pairs are constructed based on fused features and interpolated click rates. The interpolated sample pairs are input into the discriminator to determine the authenticity of the samples and obtain the corresponding discrimination confidence. The discrimination gradient of the interpolated sample pairs is calculated based on the discrimination confidence and interpolated click rates. The gradient penalty term is calculated based on the difference between the L2 norm of the discrimination gradient and a preset constant. A discriminative loss function is generated based on the Earth transporter distance loss and gradient penalty term.
[0010] Furthermore, the method also includes: hashing the multi-source heterogeneous features of the sample object and the user historical behavior sequence features to obtain the multi-source heterogeneous feature vector and the user historical behavior sequence feature vector corresponding to the sample object; Hash the multi-source heterogeneous features of the object to be predicted and the corresponding user historical behavior sequence features to obtain the multi-source heterogeneous feature vector and the user historical behavior sequence feature vector corresponding to the object to be predicted. Among them, user historical behavior sequence features and features with the same identifier among multi-source heterogeneous features share the same feature sharing mapping relationship table.
[0011] According to another aspect of the embodiments of this application, a click-through rate prediction device is provided, comprising: The first acquisition module is suitable for acquiring the multi-source heterogeneous features of sample objects, the user's historical behavior sequence features, and the real click tags corresponding to the sample objects. The generator is suitable for using the generator to perform time-series processing on the user's historical behavior sequence features to obtain the user's dynamic interest time-series features. The user's dynamic interest time-series features are then fused with multi-source heterogeneous features. Click-through rate prediction is performed based on the fused features to obtain the estimated click-through rate of the sample object. The sample construction module is suitable for generating sample pairs based on the fusion features and the estimated click-through rate of the sample objects, and for generating real sample pairs based on the fusion features and the real click tags. The discriminator is suitable for inputting generated sample pairs and real sample pairs into the discriminator to distinguish the authenticity of the samples and obtain the corresponding discrimination confidence. The parameter update module is suitable for iteratively updating the parameters of the discriminator and the generator until a preset convergence condition is met, and outputs the trained click-through rate prediction model: It calculates the discriminant loss function based on the difference between the discriminant confidence of generated sample pairs and the discriminant confidence of real sample pairs, and updates the discriminator's network parameters based on the discriminant loss function; it calculates the generator loss function based on the difference between the predicted click-through rate and the real click tags and the discriminant confidence of generated sample pairs, and updates the generator's network parameters based on the generator loss function. The second acquisition module is suitable for acquiring the multi-source heterogeneous features of the object to be estimated and the corresponding user historical behavior sequence features; The click-through rate (CTR) prediction module is suitable for inputting the multi-source heterogeneous features of the object to be predicted and the corresponding user historical behavior sequence features into the CTR prediction model to predict the CTR and obtain the predicted CTR of the object to be predicted.
[0012] According to another aspect of the embodiments of this application, a computing device is provided, including: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus; The memory is used to store at least one executable instruction that causes the processor to perform the operation corresponding to the above-mentioned click rate prediction method.
[0013] According to another aspect of the embodiments of this application, a computer storage medium is provided, wherein at least one executable instruction is stored in the storage medium, the executable instruction causing a processor to perform an operation corresponding to the above-described click-through rate prediction method.
[0014] According to another aspect of the embodiments of this application, a computer program product is provided, including at least one executable instruction that causes a processor to perform operations corresponding to the click-through rate prediction method described above.
[0015] The click-through rate prediction method and apparatus provided in the embodiments of this application The above description is merely an overview of the technical solutions of the embodiments of this application. In order to better understand the technical means of the embodiments of this application and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of this application more obvious and understandable, specific implementation methods of the embodiments of this application are described below. Attached Figure Description
[0016] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the embodiments of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 A flowchart illustrating a click-through rate prediction method according to an embodiment of this application is shown; Figure 2 A structural block diagram of a click-through rate prediction device according to an embodiment of this application is shown; Figure 3 A schematic diagram of the structure of a computing device according to an embodiment of this application is shown. Detailed Implementation
[0017] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0018] Currently, mainstream click-through rate (CTR) prediction methods are primarily based on discriminative models, which predict CTR by fitting conditional probabilities P(y|x). From early logistic regression (LR) and factorization machines (FM), to deep learning models like DeepFM and Wide&Deep, and further to models incorporating sequence modeling such as DIN (Deep Interest Network) and DIEN (Deep Interest Evolution Network), discriminative models have made significant progress in CTR prediction. However, discriminative models rely entirely on supervised training using observed data, lacking the ability to model the joint distribution P(x,y) of the data and unable to proactively generate augmented samples or inject random noise to simulate uncertainties in real-world environments. Therefore, discriminative models exhibit significant limitations in generalization ability when facing extremely sparse data distributions or cold-start scenarios.
[0019] To alleviate the aforementioned problems, researchers have recently attempted to introduce Generative Adversarial Networks (GANs) into click-through rate (CTR) prediction tasks. By leveraging the generator's sample generation capabilities and the adversarial training mechanism of the discriminator, the model gains the ability to actively explore data distribution, thus overcoming the generalization bottleneck of discriminative models. However, directly applying GANs to industrial-grade CTR prediction tasks still faces the following three technical challenges: Challenge 1: It is difficult to capture the dynamic evolution of user interests over time.
[0020] Existing solutions applying generative adversarial networks (GANs) to recommendation or click-through rate prediction mostly employ simple multilayer perceptrons (MLPs) as generators, treating the input as a static set of features. This static structure fails to perceive the temporal context and interest shifts within users' historical behavior sequences, ignoring the temporal dependencies between user behaviors. This results in generated samples lacking a sense of realism in the temporal dimension, limiting the timeliness and accuracy of prediction results.
[0021] Challenge 2: Complex and heterogeneous data causes the discriminator to encounter performance bottlenecks.
[0022] In click-through rate (CTR) prediction tasks, the data distribution is highly heterogeneous, with frequent interaction from top-performing users and sparsely interacting, long-tailed, cold-start users coexisting, and the feature distributions of popular and long-tailed objects differ significantly. Existing generative adversarial network (GAN) solutions typically employ discriminators with a single-structure neural network. This single-structure discriminator struggles to adapt to different data distribution subspaces when faced with highly heterogeneous multimodal data distributions. To fit the complex decision boundaries of top-performing samples, the discriminator is prone to overfitting or gradient distortion on sparse long-tailed samples, resulting in a seesaw effect. This imbalance in the discrimination signal between easy and difficult samples fails to provide accurate gradient guidance for the generator.
[0023] Challenge 3: High-dimensional discrete features lead to extreme instability in adversarial training.
[0024] Click-through rate (CTR) prediction essentially deals with high-dimensional, sparse, discrete features (such as various ID features) and binary labels, resulting in a discontinuous data space. Traditional generative adversarial networks (GANs) use Jensen-Shannon divergence (JS divergence) as an optimization objective. When processing such discontinuous data, because the generated and true distributions often do not overlap in high-dimensional space, JS divergence easily degenerates to a constant, causing the discriminator to fail to provide effective gradients to the generator, resulting in the vanishing gradient problem. Furthermore, the model is highly susceptible to mode collapse, where the generator tends to output a single high-frequency sample while ignoring the diverse distribution of the data, severely impacting the model's training stability and prediction accuracy.
[0025] In summary, existing discriminative models suffer from insufficient generalization due to a lack of ability to model the joint distribution of data, while existing generative schemes exhibit significant deficiencies in temporal capture, adaptation to heterogeneous distributions, and stability during discrete feature training. Therefore, effectively integrating the temporal modeling capabilities of user behavior sequences into click-through rate prediction tasks, enabling the generator to possess dynamic interest-awareness capabilities, overcoming the stability issues of adversarial training under high-dimensional sparse discrete data, and achieving adaptive discriminator behavior to complex heterogeneous data distributions are pressing technical challenges that need to be addressed in this field.
[0026] To address the aforementioned problems, the inventors of this application propose a click-through rate prediction scheme, which is described below with reference to specific embodiments: Figure 1 A flowchart illustrating a click-through rate prediction method according to an embodiment of this application is shown, as follows: Figure 1 As shown, the method includes the following steps: Step S101: Obtain the multi-source heterogeneous features of the sample objects, the user's historical behavior sequence features, and the real click tags corresponding to the sample objects.
[0027] Sample objects refer to objects that have been displayed to users and whose click results have been recorded, such as recommended items, advertising creatives, and videos.
[0028] Multi-source heterogeneous features refer to static feature information of multiple types and sources related to sample objects. Among them, multi-source heterogeneous features include: user profile features, sample object attribute features, and context features. Sample object attribute features include, but are not limited to, one or more of the following features: object identifier (object ID), class identifier, brand identifier, price level, quality level, release time, and other attribute information.
[0029] Contextual features include, but are not limited to, one or more of the following features: context information of the current request, such as display location, page type, timestamp (e.g., hour, day of the week), device information (e.g., device model, operating system), network environment, etc.
[0030] User profile features include, but are not limited to, one or more of the following features: user age segmentation, gender, membership level, long-term interest tags, historical spending power, etc.
[0031] User historical behavior sequence features refer to the interaction records of the same user with various objects within a preset time window (such as the past 7 days or the past 50 interactions) before the sample objects are displayed, arranged in chronological order. Each interaction record in this sequence must contain at least the object identifier of the interacted object. Historical interactions can include user behaviors such as clicking, browsing, adding to cart, favorites, and sharing.
[0032] The actual click label is a binary annotation information used to represent whether the user clicked on the sample object: if the user clicked on the sample object, the label value is 1; if the user did not click, the label value is 0.
[0033] Specifically, this step is mainly based on historical business logs, which include: exposure logs, click logs, user profile database, and object attribute database. First, the exposure logs and click logs are associated and concatenated: for each exposure record, the click logs are matched based on the user ID and object ID. If a match is found, the real click tag is marked as 1; otherwise, it is marked as 0, thus obtaining the real click tag of the sample object. Then, based on the user ID in the exposure record, user profile features such as age and gender are extracted from the user profile database, and object attribute features such as ID, category, and brand of the exposed object are extracted from the object attribute database. Contextual features such as display location, timestamp, and device information are directly obtained from the exposure logs. These three types of features are used together as the multi-source heterogeneous features of the sample object. At the same time, using the user ID as the search condition, the historical interaction records between the user and various objects within a preset time window (such as the past 7 days) before this exposure occur are extracted from the historical interaction logs and arranged in chronological order of interaction time to form the user's historical behavior sequence features.
[0034] Step S102: Use the generator to perform time-series processing on the user's historical behavior sequence features to obtain the user's dynamic interest time-series features. Then, perform feature fusion processing on the user's dynamic interest time-series features and multi-source heterogeneous features. Based on the fused features, perform click-through rate prediction to obtain the estimated click-through rate of the sample object.
[0035] Specifically, the user's historical behavior sequence features obtained in step S101 are input into the generator. The generator, through its internal temporal processing function, processes each feature in the user's historical behavior sequence features sequentially along the time dimension. While learning the feature representation at each time step, it gradually updates its internal memory state, thereby gradually aggregating the information from each time step in the sequence. After processing all sequence time steps, the generator outputs a hidden state that aggregates the entire historical behavior sequence information, serving as the user's dynamic interest temporal feature. This feature encompasses both the user's long-term stable interest preferences and reflects the user's recent immediate interest changes, providing a comprehensive representation of the user's current interest state.
[0036] Furthermore, the generator performs feature fusion processing on the extracted user dynamic interest time-series features and the multi-source heterogeneous features of the sample objects obtained in step S101. For example, the user dynamic interest time-series features are concatenated with the aforementioned multi-source heterogeneous features to form a fused feature. This fused feature integrates user dynamic interest information, object attribute information, scene context information, and user profile information, achieving a comprehensive expression of multi-source information.
[0037] The generator also has a click-through rate prediction function, which can estimate the probability that a user may click on a sample object based on the fused features, and obtain the estimated click-through rate of the sample object. The estimated click-through rate is a probability value in the range of (0,1), which reflects the likelihood of the user clicking on the current sample object.
[0038] In one alternative implementation, the generator may include a sequence encoding module and a prediction network, wherein the sequence encoding module is used to perform temporal processing on the user's historical behavior sequence features, and the prediction network is used to predict the click-through rate.
[0039] The sequence encoding module can employ a Long Short-Term Memory (LSTM) network for temporal processing. Specifically, the user's historical behavior sequence features are sequentially input into the LSTM network step by step. The LSTM network updates its internal cell states through forget gates, input gates, and output gates, outputting the hidden state as the user's dynamic interest temporal features at the last time step. Optionally, the sequence encoding module can also employ a Gated Recurrent Unit (GRU), a Transformer encoder based on a self-attention mechanism, or a Neural Turing Machine (NTM) to achieve the purpose of extracting the user's dynamic interest temporal features. Those skilled in the art can choose according to the actual application scenario and computing resources.
[0040] The fused features are input into the prediction network, which can employ a multilayer perceptron (MLP). This network uses multiple fully connected layers to perform layer-by-layer nonlinear transformations and mappings on the fused features, progressively extracting high-level feature combinations and interaction information. After multiple nonlinear transformations, the fused features are mapped to a probability value within the (0,1) interval, serving as the estimated click-through rate of the sample object.
[0041] The specific structure of the prediction network in the embodiments of this application (such as the number of network layers, the number of neurons in each layer, and the type of activation function) can be adjusted according to the actual application scenario and model size, and this application does not limit it.
[0042] For example, MLP is a three-layer fully connected network with 128, 64 and 1 neurons in each layer, respectively. The first two layers use the ReLU activation function to introduce nonlinearity, and the output layer uses the Sigmoid activation function to compress the output value to the (0,1) interval.
[0043] Step S103: Generate sample pairs based on the fusion features and the estimated click-through rate of the sample objects, and generate real sample pairs based on the fusion features and the real click tags.
[0044] The fused features obtained in step S102 are combined with the estimated click-through rate output by the generator to construct a generated sample pair. Specifically, the fused features and the estimated click-through rate are concatenated to form a generated sample pair. For example, if the dimension of the fused features is M and the estimated click-through rate is a 1-dimensional scalar, then the dimension of the generated sample pair obtained after concatenation is M+1. The estimated click-through rate in this generated sample pair is a probability value predicted by the generator based on the current input features, representing the generator's guess about the user's click behavior; its essence is the generated sample output by the generator.
[0045] The same fusion feature obtained in step S102 is combined with the real click label corresponding to the sample object obtained in step S101 to construct a real sample pair. Specifically, the fusion feature and the real click label (a scalar with a value of 0 or 1) are concatenated to form a real sample pair. For example, if the dimension of the fusion feature is M and the real click label is a 1-dimensional scalar, then the dimension of the real sample pair obtained after concatenation is M+1. The real click label in this real sample pair comes from historical business logs and is a true record of whether the user clicked on the sample object, representing the real user click behavior. Through this step, multiple generated sample pairs and multiple real sample pairs can be constructed.
[0046] It should be noted that the generated sample pairs and the real sample pairs are constructed based on the same fusion features. The only difference between them is the scalar value combined with the fusion features. The generated sample pairs combine the generator's predicted click-through rate (a continuous value, between 0 and 1), while the real sample pairs combine the actual click tags (discrete values, 0 or 1) from historical logs. This method of constructing sample pairs based on the same features but different tags allows the discriminator to directly compare and distinguish the generator's guessed click-through rate with the actual click tags in the same feature space during subsequent adversarial training, thus providing the generator with a precise direction for optimization.
[0047] Step S104: Input the generated sample pairs and the real sample pairs into the discriminator to determine the authenticity of the samples and obtain the corresponding discrimination confidence.
[0048] The generated sample pairs and real sample pairs constructed in step S103 are input into the discriminator, which then judges the two types of sample pairs as true or false and outputs their respective discrimination confidence scores. The discrimination confidence score is a real value that characterizes how closely the discriminator considers the current input sample pair to be close to the real data distribution. The higher the value, the more likely the discriminator is to classify the sample pair as a real sample. This step generates a corresponding discrimination confidence score for each generated sample pair and each real sample pair.
[0049] In one optional embodiment of this application, the decision-maker includes: a gating network and multiple independent expert networks; The generated sample pairs and real sample pairs are respectively input into the discriminator to determine the authenticity of the samples, and the corresponding discrimination confidence scores are obtained. Further, this includes: For each sample pair in the generated sample pairs and the real sample pairs, the expert networks are used to judge the authenticity of the sample pairs and obtain the corresponding discrimination scores. The gating network is used to perform feature perception and routing calculation on the sample pairs and output the discrimination weights corresponding to each expert network. Based on the discrimination weights and the corresponding discrimination scores, the discrimination confidence of the sample pairs is calculated.
[0050] Specifically, the discriminator is responsible for distinguishing between real sample pairs and generated sample pairs. It adopts a hybrid expert (MoE) structure to adapt to heterogeneous data distributions. Internally, it includes an input layer, multiple independent expert networks, a gating network, and a hybrid output layer. Each of the multiple expert networks has independent network parameters, used to discriminate input samples from different perspectives or different data distribution subspaces. The gating network is used to dynamically calculate the discriminative weights of each expert network based on the feature distribution of the current input samples, realizing adaptive routing allocation of samples.
[0051] The discriminator comprises N parallel expert networks, each an independent feedforward neural network with its own parameter space. For example, each expert is an MLP with a structure of [64, 32, 1]. During training, each expert network independently updates its parameters through backpropagation, gradually differentiating itself to focus on processing specific types of data distribution subspaces. For instance, in an ad click-through rate prediction scenario, different expert networks can focus on the discrimination tasks of different data distribution subspaces, such as high-frequency active users, low-frequency cold-start users, popular items, and long-tail items, thus overcoming the limitation of a single-structure discriminator in handling heterogeneous data distributions. The input to each expert network is a complete sample pair of the current input, and the output is the discrimination score independently given by that expert network for the current input sample pair.
[0052] Gated networks are used to dynamically calculate the judgment weights of each expert network based on the feature distribution of the current input sample pair. For example, a gated network is a single-layer linear transformation network with Softmax activation. Specifically, the gated network receives the current input sample pair (i.e., the features obtained by concatenating the fused features with their corresponding scalar values), maps the input features to N-dimensional unnormalized routing scores (logits) through its internal linear transformation layer, and then normalizes the routing scores to the discrimination weights of each expert network through a flexible maximum transfer function (Softmax). The normalized discrimination weights are N probability values between 0 and 1, and their sum is 1. Each weight value represents the proportion of contribution of the corresponding expert network in the discrimination of the current input sample.
[0053] In one implementation, before Softmax normalization, the gated network adds a learnable random noise term to the routing score to increase the exploratory nature of the routing and prevent the gated network from converging to a deterministic choice too early, thereby ensuring that each expert network can obtain sufficient gradient update opportunities in the early stages of training.
[0054] For each sample pair, both generated and real, the sample pair is simultaneously input into each expert network and a gating network. Each expert network performs independent forward computation on the input sample pair and outputs its own discrimination score; the gating network outputs the discrimination weights corresponding to each expert network based on the feature distribution of the input sample pair. Then, the discrimination scores output by each expert network are weighted and summed according to the corresponding discrimination weights output by the gating network to obtain the discrimination confidence score corresponding to the current input upper-level sample pair.
[0055] For example, suppose the discriminator contains four expert networks. The four expert networks output discrimination scores of 0.8, 0.2, 0.6, and 0.1 for the current input generated sample pair, respectively. The gating network calculates the discrimination weights of the four expert networks as 0.1, 0.7, 0.15, and 0.05, indicating that the current sample is mainly processed by expert 2. The discrimination confidence of the current input generated sample pair is the weighted sum of these four scores, i.e., the discrimination confidence of the generated sample pair = 0.8 × 0.1 + 0.2 × 0.7 + 0.6 × 0.15 + 0.1 × 0.05 = 0.315. This is merely an example and has no limiting effect.
[0056] In one implementation, after calculating the discrimination weights of each expert network, the gating network sorts the expert networks in descending order of discrimination weights, retains only the top K expert networks with the highest weights, resets the discrimination weights of the remaining expert networks to zero, and then sums the discrimination scores output by each expert network according to the corresponding discrimination weights output by the gating network to obtain the discrimination confidence level corresponding to the current input upper-level sample pair.
[0057] In another implementation, the gated network can also employ a discrete routing strategy based on reinforcement learning. In this strategy, the gated network models routing decisions as a sequential decision problem: for the current input sample pair, the gated network outputs a discrete action that directly specifies which expert network(s) will process the current sample. This discrete decision-making process is trained using a reinforcement learning algorithm, with the discriminator's performance serving as the reward signal to guide the gated network in learning the optimal routing strategy. The expert selection results output by the gated network employing the discrete routing strategy exhibit stronger sparsity, meaning that only a very small number (or even a single) of expert networks are activated each time, thereby further reducing computational complexity.
[0058] Step S105: Alternately iterate through the parameter updates of the discriminator and the generator until the preset convergence condition is met, and output the trained click-through rate prediction model: Calculate the discriminant loss function based on the difference between the discriminant confidence of generated sample pairs and the discriminant confidence of real sample pairs, and update the network parameters of the discriminator based on the discriminant loss function; Calculate the generator loss function based on the difference between the predicted click-through rate and the real click labels and the discriminant confidence of generated sample pairs, and update the network parameters of the generator based on the generator loss function.
[0059] Specifically, the discriminant loss function is calculated based on the difference between the discriminant confidence scores of generated sample pairs and those of real sample pairs. The gradient of the discriminant loss function with respect to the parameters of each discriminator network (including the parameters of each expert network and the gating network) is then calculated using the backpropagation algorithm. Finally, an optimizer (such as the Adam optimizer) is used to update the discriminator's network parameters in one step based on the calculated gradients. During the discriminator update, the generator's network parameters remain fixed.
[0060] The generator loss function is calculated based on the difference between the estimated click-through rate and the actual clicked labels, as well as the discrimination confidence of the generated sample pairs. The gradient of the generator loss function with respect to the generator's network parameters (including the parameters of the sequence coding units and the prediction network) is then calculated using the backpropagation algorithm. Finally, an optimizer (such as the Adam optimizer) is used to update the generator's network parameters in one step based on the calculated gradients. During the generator update, the discriminator's network parameters remain fixed.
[0061] In each training iteration, an alternating update strategy is employed: the generator parameters are fixed while the discriminator's network parameters are updated, and the discriminator's network parameters are fixed while the generator's network parameters are updated. This process is repeated until a preset convergence condition is met, at which point the trained click-through rate (CTR) prediction model is output. This trained CTR prediction model is the trained generator. In subsequent practical applications for CTR prediction, the discriminator no longer participates in the prediction process. Through this adversarial game, the generator continuously learns how to extract more accurate temporal features to deceive the discriminator, while the discriminator continuously improves its ability to distinguish complex and heterogeneous data through the MoE structure.
[0062] In one implementation, the discriminator is updated multiple times (e.g., 5 times), while the generator is updated once, to maintain a balance between the discriminator and the generator and prevent one from becoming too strong, thus preventing the other from obtaining effective gradient signals. The goal of the alternating update strategy is to gradually bring the generator and discriminator to a Nash equilibrium in the adversarial game, that is, the distribution of samples generated by the generator tends to be consistent with the distribution of real data, and the discriminator cannot effectively distinguish between generated samples and real samples.
[0063] In one optional embodiment of this application, the generator loss function includes: a content loss function and an adversarial loss function; Therefore, the generator loss function can be calculated using the following method: calculate the content loss function based on the difference between the estimated click-through rate and the actual clicked tags, and generate an adversarial loss function based on the discriminative confidence of the generated sample pairs; then, the generator loss function is obtained by weighted summation of the content loss function and the adversarial loss function.
[0064] Specifically, based on the difference between the estimated click-through rate (CTR) and the actual click labels, a binary cross-entropy loss function is used as the content loss. The content loss measures the deviation between the generator's estimated CTR and the actual click labels at the individual level, forcing the generator to approximate the actual labels for each sample at the micro level, thereby ensuring that the generator has basic accuracy in CTR prediction.
[0065] The adversarial loss function is calculated based on the discrimination confidence scores of the generated sample pairs on the discriminator. This adversarial loss function constrains the generator at the macro-distribution level, forcing it to alter the overall distribution of its output so that the generated feature-click-rate joint distribution can deceive the discriminator to the point of indistinguishability from the real click distribution. The optimization objective of the adversarial loss function is to maximize the discrimination confidence score of the discriminator for the generator's predicted click-rate output, thus maximizing the discrimination confidence score of the generated sample pairs on the discriminator. Since the discriminator's network parameters remain fixed during the generator update phase, the generator improves the discrimination confidence score of the generated sample pairs by adjusting its own parameters, thereby gradually approximating the data distribution of the real sample pairs under the discriminator's evaluation criteria.
[0066] The total loss function of the generator is obtained by weighted summing of the above loss function and the adversarial loss function.
[0067] By employing the weighted summation method described above, the generator's total loss function simultaneously considers both the prediction accuracy at the individual level (constrained by the content loss term) and the distribution rationality at the macro level (constrained by the adversarial loss term). During training, the generator minimizes this total loss function, ensuring that the estimated click-through rate numerically approximates the actual click tags while also making the overall distribution of the estimated click-through rate approximate the actual data distribution. This optimizes the generator's performance in both dimensions: individual accuracy and distribution rationality.
[0068] It should be noted that during the generator parameter update phase, the discriminator's network parameters remain fixed. That is, only the gradient of the generator's total loss function with respect to each generator network parameter is calculated, and the generator's network parameters are updated using this gradient. The discriminator's network parameters are not updated.
[0069] It should also be understood that the binary cross-entropy loss function used in the above content loss function is only one optional implementation. In another embodiment, other forms of loss functions (such as mean squared error loss, Hinge loss, etc.) can also be used as content loss, as long as they can measure the difference between the estimated click-through rate and the actual clicked tags. This application does not limit this.
[0070] Alternatively, the adversarial loss function can be calculated by averaging the discrimination confidence scores of each generated sample pair to obtain the expected value of the generated sample confidence score. The negative value of the expected confidence of the generated sample is used as the adversarial loss function, which is used to maximize the discrimination confidence of the generated sample pair in order to reduce the earthmoving distance between the data distribution of the generated sample pair and the data distribution of the real sample pair.
[0071] Specifically, multiple generated sample pairs are constructed. Therefore, the average of the discrimination confidence scores of multiple generated sample pairs can be calculated to obtain the expected value of the generated sample confidence score. This expected value reflects the discriminator's overall acceptance of the generator's output under the current parameters. The higher the expected value, the more likely the discriminator is to classify the generated sample pair as a real sample, meaning the predicted click-through rate output by the generator is closer to the actual data distribution. Then, the negative value of the expected value of the generated sample confidence score is used as the adversarial loss function. The optimization objective of the adversarial loss function is to maximize the expected value of the generated sample confidence score, that is, to make the generator adjust its own parameters so that the discriminator gives the highest possible discrimination confidence score to the generated sample pair. During the generator parameter update phase, the discriminator's network parameters remain fixed. By reducing the aforementioned adversarial loss function (i.e., minimizing the expected value of the generated sample confidence score), the generator effectively maximizes the average value of the generated sample confidence score, thereby enabling the discriminator to give a higher score to the generated sample pair.
[0072] The adversarial loss function reduces the Wasserstein distance (i.e., the Earth-moving distance) between the data distributions of generated and real sample pairs by maximizing the discrimination confidence corresponding to each generated sample pair. The Wasserstein distance between real and generated sample pairs can be expressed as the difference between the expected value of the discrimination confidence of the real sample pair and the expected value of the discrimination confidence of the generated sample pair. During the generator update phase, the expected value of the discrimination confidence corresponding to each real sample pair is a constant for the generator (because the discriminator parameters are fixed and the real samples remain unchanged), and the generator cannot change its value. Therefore, the generator can reduce the Wasserstein distance by increasing the expected value of the discrimination confidence corresponding to each generated sample pair. The adversarial loss function transforms this maximization objective into a minimization form, making it operable using a standard gradient descent optimizer.
[0073] Through the aforementioned adversarial loss function, the generator no longer relies solely on the label fitting of individual samples, but is constrained at the macro-distribution level, forcing the overall distribution of the generator's output predicted click rate to approximate the distribution of the actual click labels. This alleviates the problem of distorted prediction distribution caused by negative samples in traditional supervised learning, especially in scenarios with extremely imbalanced samples (where negative samples far outnumber positive samples).
[0074] In one optional embodiment of this application, the discriminant loss function can be calculated using the following method: The distance loss of the Earth transporter is calculated based on the discrimination confidence of the generated sample pairs and the discrimination confidence of the real sample pairs; Interpolation sampling is performed between the true click labels of real sample pairs and the estimated click rates of generated sample pairs to obtain interpolated click rates. Interpolated sample pairs are constructed based on fused features and interpolated click rates. The interpolated sample pairs are input into the discriminator to determine the authenticity of the samples and obtain the corresponding discrimination confidence. The discrimination gradient of the interpolated sample pairs is calculated based on the discrimination confidence and interpolated click rates. The gradient penalty term is calculated based on the difference between the L2 norm of the discrimination gradient and a preset constant. A discriminative loss function is generated based on the Earth transporter distance loss and gradient penalty term.
[0075] Specifically, the average decision confidence scores for all real sample pairs and the average decision confidence scores for all generated sample pairs are calculated. The average decision confidence score for real sample pairs reflects the discriminator's overall rating of real click behavior, while the average decision confidence score for generated sample pairs reflects the discriminator's overall rating of the generator's prediction results. Then, the average decision confidence score for generated sample pairs is subtracted from the average decision confidence score for real sample pairs; the difference is taken as the Earth Transporter Distance loss. The Earth Transporter Distance measures the degree of difference between the real data distribution and the generated data distribution.
[0076] The discriminator's optimization objective is to maximize the Earth Transporter distance, thereby maximizing the discrimination confidence of real sample pairs (approaching a large positive value) while minimizing the discrimination confidence of generated sample pairs (approaching a small or negative value). By maximizing the difference in discrimination confidence between real and generated samples, the discriminator continuously improves its ability to distinguish between real and generated samples.
[0077] While keeping the fusion features unchanged, linear interpolation sampling is performed on the actual click labels and the estimated click rates along the click-through rate (CTR) dimension to obtain the interpolated CTR. The interpolated CTR lies within a continuous interval between the actual click labels and the estimated CTR, representing the transition state between the real and generated distributions. The fusion features and the interpolated CTR are combined into interpolated sample pairs, which are then input into a discriminator to determine the authenticity of the samples, yielding the discrimination confidence level for each interpolated sample pair.
[0078] Then, the partial derivative of the discrimination confidence score of the interpolated sample pair with respect to the interpolated click-through rate is calculated as the discrimination gradient of the interpolated sample pair. The discrimination gradient reflects the direction and magnitude of the discriminator's output score change with small changes in the click-through rate value; that is, the sensitivity of the discriminator to input changes in the transition region between the true and generated distributions. The L2 norm (i.e., the length or magnitude of the gradient) of this discrimination gradient is calculated, and a gradient penalty term is calculated based on the difference between this L2 norm and a preset constant (usually set to 1). Specifically, the gradient penalty term is the square of the difference between the L2 norm of the discrimination gradient and the preset constant.
[0079] The purpose of the gradient penalty term is to constrain the gradient norm of the discriminator in the interpolation region to approach a preset constant, thereby ensuring that the discriminator function satisfies the Lipschitz continuity condition throughout the entire sample space. That is, the output of the discriminator will not change too drastically, ensuring that the discriminator maintains a smooth response to changes in the input samples, avoiding gradient vanishing or gradient explosion problems caused by excessively large or small gradient values, thus providing a stable and effective gradient feedback signal for the generator.
[0080] The aforementioned Earth transporter distance loss and gradient penalty term are combined to generate a discriminative loss function. In one implementation, the discriminative loss function is a weighted sum of the Earth transporter distance loss and the gradient penalty term, wherein the gradient penalty term is multiplied by a preset weight coefficient to adjust the strength of the gradient constraint.
[0081] By minimizing the discriminant loss function, the discriminator achieves two objectives simultaneously during training: first, it widens the difference in discrimination confidence between real and generated samples, improving the discriminator's discrimination ability; second, it maintains a smooth gradient response in the transition region between the real and generated distributions, providing the generator with high-quality optimization signals. These two aspects together ensure the stability and effectiveness of adversarial training.
[0082] The specific calculation methods for the Earth transporter distance loss and gradient penalty term described above are merely illustrative examples and can be adjusted according to specific needs in practical applications. For example, the interpolation sampling method can be random sampling or deterministic sampling, the gradient norm can be calculated using the L2 norm or other norm forms, and the value of the preset constant can be adjusted according to the actual training situation; this application does not limit this.
[0083] In one implementation, the discriminator also incorporates a load balancing constraint during training to force the system to distribute traffic evenly among the experts, thus completely avoiding expert network collapse (winner-takes-all) phenomenon. This load balancing constraint is added as an auxiliary loss to the discriminator's total loss function, working together with the Earth Transporter distance loss and gradient penalty term to optimize the discriminator's network parameters.
[0084] Step S106: Obtain the multi-source heterogeneous features of the object to be predicted and the corresponding user historical behavior sequence features.
[0085] This step is similar to step S101, and will not be described again here.
[0086] Step S107: Input the multi-source heterogeneous features of the object to be predicted and the corresponding user historical behavior sequence features into the click-through rate prediction model to predict the click-through rate and obtain the predicted click-through rate of the object to be predicted.
[0087] The multi-source heterogeneous features of the object to be predicted and the corresponding user historical behavior sequence features are input into the trained click-through rate prediction model to predict the click-through rate. The click-through rate prediction model is a generator that has been trained and saved, and its network parameters have been optimized to a convergent state through adversarial training.
[0088] The process of a click-through rate (CTR) prediction model predicting the CTR of an object to be predicted is similar to the process of using a generator to predict the CTR of a sample object, and will not be elaborated here.
[0089] The click-through rate (CTR) prediction model described above can estimate the probability of a user clicking on an object. This estimated CTR represents the model's prediction of the likelihood that a user will click on the predicted object; a higher value indicates a greater probability of the user clicking on that content item. This estimated CTR can be directly used as a ranking criterion to determine the display order of the predicted object in the recommendation list or ad queue; it can also be combined with other business factors (such as bidding price and commercial value) for a comprehensive score, used in subsequent ranking and filtering decisions.
[0090] In the practical application of click-through rate (CTR) prediction, only the trained generator is retained for CTR prediction; the discriminator is no longer involved in the prediction process. Since the generator has learned the manifold structure of the real data distribution through feedback from the discriminator during adversarial training, its output CTR predictions are effectively improved in both individual accuracy and overall distribution rationality. Therefore, it still exhibits good generalization performance and prediction accuracy when facing sparse data or cold-start scenarios. Furthermore, the generator's parameters remain fixed, without any parameter updates, and only forward propagation calculations are performed. The prediction process can be applied to various internet content distribution scenarios requiring CTR prediction, such as recommendation systems, computational advertising systems, and information flow distribution systems.
[0091] In one optional embodiment of this application, in order to enable the corresponding features in the multi-source heterogeneous features of the sample object (e.g., the brand and category of the sample object) and the corresponding features in the user's historical behavior sequence features (e.g., historical click brand sequence and historical click category sequence) to be jointly represented in the same mathematical manifold space, physical sharing of parameters can be achieved through three progressive stages: relation establishment, entity uniqueness, and dynamic routing distribution. After obtaining the multi-source heterogeneous features of the sample object and the user historical behavior sequence features, the multi-source heterogeneous features of the sample object and the user historical behavior sequence features can be hashed to obtain the multi-source heterogeneous feature vector and the user historical behavior sequence feature vector corresponding to the sample object.
[0092] Specifically, this embodiment employs a parameter sharing mechanism to uniformly represent features with the same semantic origin. A feature sharing mapping table is pre-established in the system configuration. This table records the affiliation between different input feature names and shared feature groups. For example, the object identifier of a sample object is grouped with each historical object identifier in the user's historical behavior sequence into the same shared feature group (e.g., object identifier sharing group); the class identifier of a sample object is grouped with each historical class identifier in the user's historical behavior sequence into the same shared feature group (e.g., category sharing group); and the brand identifier of a sample object is grouped with each historical brand identifier in the user's historical behavior sequence into the same shared feature group (e.g., brand sharing group). Features with the same identifier among user historical behavior sequence features and multi-source heterogeneous features share the same feature sharing mapping table, forcing the model to learn the representation of items and behaviors within the same latent manifold.
[0093] Within each shared feature group, a base feature is designated as a size baseline template. This template defines the maximum capacity (i.e., the number of hash slots) of the hash buckets in that shared feature group and the dimension of the output dense feature vector. During system initialization, a single hash layer entity and a single embedding layer entity are instantiated and created for each shared feature group based on the size baseline template. This ensures that each shared feature group is allocated and maintains only a unique weight parameter matrix in the system's underlying physical memory. All features assigned to this feature group will share this set of parameters in subsequent calculations, thus eliminating redundant parameter copying at the physical level.
[0094] During hashing, the system first retrieves the feature sharing mapping table to determine whether the input feature to be processed belongs to a preset shared feature group. If the feature belongs to a shared feature group, the system extracts the name of the shared feature group to which it belongs and initiates route redirection, routing the feature's data tensor to the uniquely created hash layer entity and embedding layer entity corresponding to that shared feature group for table lookup calculation to obtain the corresponding feature vector. If the feature does not belong to a shared feature group, it is routed to its independently created dedicated non-shared hash layer and embedding layer for calculation to obtain the corresponding feature vector. In this way, multiple input features classified into the same shared feature group (such as the object identifier of a sample object and the identifiers of each historical object in the historical behavior sequence) share the same weight parameter matrix for hash mapping and embedding lookup, so that features with the same identifier correspond to the same feature vector in the embedding space, thus being constrained to the same latent feature manifold. Here, discrete features can be mapped to dense vectors, for example, initialized as feature vectors with a vector dimension of 64.
[0095] During the backpropagation phase, since multiple input features belonging to the same shared feature group share the same embedding layer entity during forward propagation, the gradients calculated by the system for each feature are accumulated and merged at the weight parameter matrix of the shared embedding layer. The system uses the accumulated total gradient to update the unique parameter matrix, thus mathematically ensuring that the homologous features always maintain alignment in the representation space during training.
[0096] Similarly, after obtaining the multi-source heterogeneous features of the object to be estimated and the corresponding user historical behavior sequence features, hash processing is performed on the multi-source heterogeneous features of the object to be estimated and the corresponding user historical behavior sequence features to obtain the multi-source heterogeneous feature vector and the user historical behavior sequence feature vector corresponding to the object to be estimated. In the inference phase, the system adopts the same shared mapping relationship table and routing mechanism as in the training phase: according to the feature shared mapping relationship table, input features belonging to the same shared feature group (for example, the object identifier of the object to be estimated and the historical object identifier in the user historical behavior sequence belong to the object identifier shared group; the class identifier of the object to be estimated and the historical class identifier in the user historical behavior sequence belong to the category shared group; the brand identifier of the object to be estimated and the historical brand identifier in the user historical behavior sequence belong to the brand shared group) are routed to the uniquely corresponding embedded layer entity of the shared feature group for table lookup calculation, so that the features of the object to be estimated with the same identifier and the historical sequence features are represented in the same latent feature manifold, thereby ensuring the consistency of feature mapping logic between the training phase and the inference phase.
[0097] Accordingly, subsequent processing is all based on the corresponding feature vectors. For example, the hashed user historical behavior sequence feature vector is input into a single-layer LSTM network with a hidden layer dimension of 64. The LSTM network processes the sequence step by step, extracting the hidden state of the last time step as the user dynamic interest temporal feature vector. Subsequently, the user dynamic interest temporal feature vector is concatenated with multi-source heterogeneous feature vectors, such as user profile feature vectors, sample object attribute feature vectors, and context feature vectors, into a dense vector with a dimension of 256, i.e., the fused feature vector. This fused feature vector is input into a three-layer MLP with a structure of [128, 64, 1]. The last layer uses the Sigmoid activation function and outputs a scalar between 0 and 1, i.e., the estimated click-through rate of the sample object. The feature vector processing procedures for other parts are not described here, but can be found in the feature processing procedures described above.
[0098] In summary, the click-through rate prediction method described above can achieve the following technical effects: (1) Improved robustness in sparse data and cold start scenarios: Unlike traditional discriminative models (such as DeepFM and DIN), which rely solely on observed data for supervised training and lack the ability to model the joint distribution of data, this application introduces a generative adversarial network (GAN) framework. Through adversarial training between the generator and the discriminator, the model actively explores the joint distribution of data while learning conditional probabilities. The generator naturally possesses the ability to generate noise and explore the data manifold during adversarial training, effectively acting as a manifold regularizer. This allows the model to maintain stable prediction performance even in extremely sparse environments with sparse training samples and limited feature representation. The technical solution presented in this application achieves significant performance improvements in both cold-start user and long-tail object prediction tasks, effectively addressing the problem of insufficient generalization performance caused by the over-reliance on observed data in traditional discriminative models.
[0099] (2) High-precision dynamic timing capture was achieved: Unlike traditional generative recommendation models (such as IRGAN), which use a static multilayer perceptron as the generator and treat user history behavior as an unordered set of features, this application's generator embeds a sequence encoding module, enabling temporal dependency modeling of user history behavior sequences and capturing the dynamic evolution of user interests over time. Simultaneously, by using a shared feature mechanism, the representations of objects in the historical sequence and the representations of sample objects are constrained to the same latent feature manifold. This allows the generator to directly measure the degree of matching between the user's historical interest trajectory and the sample objects within a unified mathematical space during feature fusion. These mechanisms make the generated predicted click-through rate distribution more consistent with the real physical laws of user interest evolution, significantly improving the timeliness and accuracy of the prediction results.
[0100] (3) It overcomes the performance bottleneck of discriminators under heterogeneous data distribution (seesaw effect): Unlike traditional generative adversarial networks (GANs) that rely on a single-structure discriminator, this application pioneers a discriminator based on a hybrid expert (MoE) architecture. The discriminator comprises multiple expert networks with independent parameters and a dynamically routed gating network. The gating network adaptively assigns activation weights to each expert network based on the feature distribution of the current input sample, achieving sample-specific computational resource allocation. During training, different expert networks focus on processing specific types of data distribution subspaces (e.g., high-frequency active users versus low-frequency cold-start users, popular objects versus long-tail objects), enabling simultaneous and accurate handling of both complex head samples and sparse long-tail samples. This avoids the overfitting or gradient distortion problems that occur with long-tail samples when fitting head samples, a problem inherent in single-structure discriminators. This mechanism provides the generator with fine-grained, decoupled gradient guidance, significantly improving the model's overall discriminative ability and prediction accuracy under heterogeneous data distributions.
[0101] (4) It completely solves the problem of collapse in discrete feature adversarial training: Unlike traditional generative adversarial networks (GANs) based on JS divergence, which are prone to gradient vanishing when the discriminator is too strong and mode collapse when the overlap between the generated and real distributions is too low in high-dimensional discrete feature spaces, this application adopts an optimization strategy based on Wasserstein distance and gradient penalty. Wasserstein distance provides a meaningful metric even when the real and generated distributions do not overlap at all, fundamentally solving the gradient vanishing problem caused by the degradation of JS divergence to a constant in traditional GANs. The gradient penalty term theoretically guarantees that the discriminator satisfies the Lipschitz continuity condition, ensuring that the discriminator outputs a smooth, non-zero gradient in the sample space, avoiding the risks of gradient explosion or gradient vanishing. Even in the high-dimensional sparse discrete feature space involved in click-through rate prediction tasks, the technical solution of this application can still provide stable and smooth gradient guidance for the generator, completely eliminating the hidden dangers of gradient vanishing and mode collapse, and ensuring the training stability and convergence efficiency of industrial-scale training.
[0102] In summary, this application achieves significant comprehensive technical results in the click-through rate (CTR) prediction task by organically combining a time-aware generator, a hybrid expert discriminator, and a WGAN-GP optimization strategy. This results in improved generalization ability under sparse data, accurate capture of user interest time-series dynamics, adaptive discrimination under heterogeneous distribution, and stable convergence of discrete feature adversarial training. It can be widely applied to various Internet content distribution scenarios that require high-precision CTR prediction, such as computational advertising, recommendation systems, and information flow distribution.
[0103] Figure 2A structural block diagram of a click-through rate prediction device according to an embodiment of this application is shown, as follows: Figure 2 As shown, the device includes: The first acquisition module 201 is adapted to acquire the multi-source heterogeneous features of the sample object, the user's historical behavior sequence features, and the real click tags corresponding to the sample object. Generator 202 is suitable for using the generator to perform time-series processing on the user's historical behavior sequence features to obtain the user's dynamic interest time-series features, performing feature fusion processing on the user's dynamic interest time-series features and multi-source heterogeneous features, and performing click-through rate prediction based on the fused features to obtain the estimated click-through rate of the sample object. The sample construction module 203 is suitable for constructing sample pairs based on the fusion features and the estimated click-through rate of the sample objects, and constructing real sample pairs based on the fusion features and the real click tags. Discriminator 204 is adapted to input generated sample pairs and real sample pairs into the discriminator to distinguish the authenticity of the samples and obtain the corresponding discrimination confidence. The parameter update module 205 is suitable for iteratively updating the parameters of the discriminator and the generator until a preset convergence condition is reached, and outputting the trained click-through rate prediction model: It calculates the discriminant loss function based on the difference between the discriminant confidence of generated sample pairs and the discriminant confidence of real sample pairs, and updates the network parameters of the discriminator based on the discriminant loss function; it calculates the generator loss function based on the difference between the predicted click-through rate and the real click tags and the discriminant confidence of generated sample pairs, and updates the network parameters of the generator based on the generator loss function. The second acquisition module 206 is adapted to acquire the multi-source heterogeneous features of the object to be estimated and the corresponding user historical behavior sequence features; Click-through rate prediction module 207 is suitable for inputting the multi-source heterogeneous features of the object to be predicted and the corresponding user historical behavior sequence features into the click-through rate prediction model to predict the click-through rate and obtain the predicted click-through rate of the object to be predicted.
[0104] Optionally, the decision-maker includes: a gating network and multiple independent expert networks; The discriminator is further adapted to: for each sample pair in the generated sample pair and the real sample pair, use each expert network to judge the authenticity of the sample pair, obtain the discrimination score corresponding to the sample pair, use a gating network to perform feature perception and routing calculation on the sample pair, output the discrimination weights corresponding to each expert network, and calculate the discrimination confidence of the sample pair based on the discrimination weights and the corresponding discrimination scores.
[0105] Optionally, the generator loss function includes: a content loss function and an adversarial loss function; The parameter update module is further adapted to: calculate the content loss function based on the difference between the estimated click-through rate and the actual clicked tags, and generate an adversarial loss function based on the discrimination confidence of the generated sample pairs; The generator loss function is obtained by weighted summation of the content loss function and the adversarial loss function.
[0106] Optionally, the parameter update module is further adapted to: calculate the mean of the discrimination confidence scores of each generated sample pair to obtain the expected value of the generated sample confidence score; The negative value of the expected confidence of the generated sample is used as the adversarial loss function, which is used to maximize the discrimination confidence of the generated sample pair in order to reduce the earthmoving distance between the data distribution of the generated sample pair and the data distribution of the real sample pair.
[0107] Optionally, the parameter update module is further adapted to: calculate the Earth Transporter Distance Loss based on the discrimination confidence of the generated sample pairs and the discrimination confidence of the real sample pairs; Interpolation sampling is performed between the true click labels of real sample pairs and the estimated click rates of generated sample pairs to obtain interpolated click rates. Interpolated sample pairs are constructed based on fused features and interpolated click rates. The interpolated sample pairs are input into the discriminator to determine the authenticity of the samples and obtain the corresponding discrimination confidence. The discrimination gradient of the interpolated sample pairs is calculated based on the discrimination confidence and interpolated click rates. The gradient penalty term is calculated based on the difference between the L2 norm of the discrimination gradient and a preset constant. A discriminative loss function is generated based on the Earth transporter distance loss and gradient penalty term.
[0108] Optionally, the device further includes: a feature processing module, adapted to perform hash processing on the multi-source heterogeneous features of the sample object and the user historical behavior sequence features to obtain the multi-source heterogeneous feature vector and the user historical behavior sequence feature vector corresponding to the sample object; Hash the multi-source heterogeneous features of the object to be predicted and the corresponding user historical behavior sequence features to obtain the multi-source heterogeneous feature vector and the user historical behavior sequence feature vector corresponding to the object to be predicted. Among them, user historical behavior sequence features and features with the same identifier among multi-source heterogeneous features share the same feature sharing mapping relationship table.
[0109] The descriptions of the above modules refer to the corresponding descriptions in the method embodiments, and will not be repeated here.
[0110] In summary, the click-through rate prediction device described above can achieve the following technical effects: (1) Improved robustness in sparse data and cold start scenarios: Unlike traditional discriminative models (such as DeepFM and DIN), which rely solely on observed data for supervised training and lack the ability to model the joint distribution of data, this application introduces a generative adversarial network (GAN) framework. Through adversarial training between the generator and the discriminator, the model actively explores the joint distribution of data while learning conditional probabilities. The generator naturally possesses the ability to generate noise and explore the data manifold during adversarial training, effectively acting as a manifold regularizer. This allows the model to maintain stable prediction performance even in extremely sparse environments with sparse training samples and limited feature representation. The technical solution presented in this application achieves significant performance improvements in both cold-start user and long-tail object prediction tasks, effectively addressing the problem of insufficient generalization performance caused by the over-reliance on observed data in traditional discriminative models.
[0111] (2) High-precision dynamic timing capture was achieved: Unlike traditional generative recommendation models (such as IRGAN), which use a static multilayer perceptron as the generator and treat user history behavior as an unordered set of features, this application's generator embeds a sequence encoding module, enabling temporal dependency modeling of user history behavior sequences and capturing the dynamic evolution of user interests over time. Simultaneously, by using a shared feature mechanism, the representations of objects in the historical sequence and the representations of sample objects are constrained to the same latent feature manifold. This allows the generator to directly measure the degree of matching between the user's historical interest trajectory and the sample objects within a unified mathematical space during feature fusion. These mechanisms make the generated predicted click-through rate distribution more consistent with the real physical laws of user interest evolution, significantly improving the timeliness and accuracy of the prediction results.
[0112] (3) It overcomes the performance bottleneck of discriminators under heterogeneous data distribution (seesaw effect): Unlike traditional generative adversarial networks (GANs) that rely on a single-structure discriminator, this application pioneers a discriminator based on a hybrid expert (MoE) architecture. The discriminator comprises multiple expert networks with independent parameters and a dynamically routed gating network. The gating network adaptively assigns activation weights to each expert network based on the feature distribution of the current input sample, achieving sample-specific computational resource allocation. During training, different expert networks focus on processing specific types of data distribution subspaces (e.g., high-frequency active users versus low-frequency cold-start users, popular objects versus long-tail objects), enabling simultaneous and accurate handling of both complex head samples and sparse long-tail samples. This avoids the overfitting or gradient distortion problems that occur with long-tail samples when fitting head samples, a problem inherent in single-structure discriminators. This mechanism provides the generator with fine-grained, decoupled gradient guidance, significantly improving the model's overall discriminative ability and prediction accuracy under heterogeneous data distributions.
[0113] (4) It completely solves the problem of collapse in discrete feature adversarial training: Unlike traditional generative adversarial networks (GANs) based on JS divergence, which are prone to gradient vanishing when the discriminator is too strong and mode collapse when the overlap between the generated and real distributions is too low in high-dimensional discrete feature spaces, this application adopts an optimization strategy based on Wasserstein distance and gradient penalty. Wasserstein distance provides a meaningful metric even when the real and generated distributions do not overlap at all, fundamentally solving the gradient vanishing problem caused by the degradation of JS divergence to a constant in traditional GANs. The gradient penalty term theoretically guarantees that the discriminator satisfies the Lipschitz continuity condition, ensuring that the discriminator outputs a smooth, non-zero gradient in the sample space, avoiding the risks of gradient explosion or gradient vanishing. Even in the high-dimensional sparse discrete feature space involved in click-through rate prediction tasks, the technical solution of this application can still provide stable and smooth gradient guidance for the generator, completely eliminating the hidden dangers of gradient vanishing and mode collapse, and ensuring the training stability and convergence efficiency of industrial-scale training.
[0114] In summary, this application achieves significant comprehensive technical results in the click-through rate (CTR) prediction task by organically combining a time-aware generator, a hybrid expert discriminator, and a WGAN-GP optimization strategy. This results in improved generalization ability under sparse data, accurate capture of user interest time-series dynamics, adaptive discrimination under heterogeneous distribution, and stable convergence of discrete feature adversarial training. It can be widely applied to various Internet content distribution scenarios that require high-precision CTR prediction, such as computational advertising, recommendation systems, and information flow distribution.
[0115] This application provides a non-volatile computer storage medium storing at least one executable instruction or computer program that enables a processor to perform the operation corresponding to the click-through rate prediction method in any of the above method embodiments.
[0116] This application provides a computer program product, which includes at least one executable instruction or computer program that enables a processor to perform the operation corresponding to the click-through rate prediction method in any of the above method embodiments.
[0117] Figure 3 The diagram shows a structural schematic of an embodiment of the computing device of this application. The specific embodiments of this application do not limit the specific implementation of the computing device.
[0118] like Figure 3 As shown, the computing device may include: a processor 302, a communications interface 304, a memory 306, and a communications bus 308.
[0119] The processor 302, communication interface 304, and memory 306 communicate with each other via communication bus 308. Communication interface 304 is used to communicate with other network elements such as clients or other servers. The processor 302 executes program 310, specifically performing the relevant steps in the above-described embodiment of the click-through rate prediction method for calculating devices.
[0120] Specifically, program 310 may include program code that includes computer operation instructions.
[0121] Processor 302 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application. The computing device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0122] Memory 306 is used to store program 310. Memory 306 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0123] Specifically, program 310 can be used to cause processor 302 to execute the click-through rate prediction method in any of the above method embodiments. The specific implementation of each step in program 310 can be found in the corresponding descriptions of the steps and units in the above click-through rate prediction embodiments, and will not be repeated here. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the devices and modules described above can be referred to the corresponding process descriptions in the foregoing method embodiments, and will not be repeated here.
[0124] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, the embodiments of this application are not directed to any particular programming language. It should be understood that the contents of the embodiments of this application described herein can be implemented using various programming languages, and the above description of specific languages is for the purpose of disclosing the best implementation of the embodiments of this application.
[0125] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of this application may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0126] Similarly, it should be understood that, in order to simplify this disclosure and aid in understanding one or more of the various inventive aspects, in the foregoing description of exemplary embodiments of the present application, various features of the present application embodiments are sometimes grouped together into a single embodiment, figure, or description thereof. However, this approach to disclosure should not be construed as reflecting an intention that the claimed embodiments of the present application require more features than expressly recited in each claim. Rather, as reflected in the following claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of the present application.
[0127] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0128] Furthermore, those skilled in the art will understand that although some embodiments described herein include certain features but not others included in other embodiments, combinations of features from different embodiments are meant to be within the scope of the embodiments of this application and form different embodiments. For example, in the following claims, any one of the claimed embodiments can be used in any combination.
[0129] The various component embodiments of this application can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components according to the embodiments of this application. The embodiments of this application can also be implemented as device or apparatus programs (e.g., computer programs and computer program products) for performing part or all of the methods described herein. Such programs implementing the embodiments of this application can be stored on a computer-readable medium, or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
[0130] It should be noted that the above embodiments are illustrative of the embodiments of this application and not limiting of the embodiments of this application, and those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. Embodiments of this application can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.
Claims
1. A click-through rate (CTR) prediction method, comprising: Obtain the multi-source heterogeneous features of the sample objects and the user's historical behavior sequence features, as well as the real click tags corresponding to the sample objects; The generator is used to perform time-series processing on the user's historical behavior sequence features to obtain the user's dynamic interest time-series features. The user's dynamic interest time-series features are then fused with the multi-source heterogeneous features. Click-through rate is predicted based on the fused features to obtain the estimated click-through rate of the sample object. Sample pairs are generated based on the fusion features and the estimated click-through rate of the sample objects, and real sample pairs are generated based on the fusion features and the real click tags. The generated sample pairs and the real sample pairs are respectively input into the discriminator to determine the authenticity of the samples and obtain the corresponding discrimination confidence scores. Alternately iterate through the parameter updates of the discriminator and the generator until a preset convergence condition is met, and output the trained click-through rate prediction model: Calculate the discriminant loss function based on the difference between the discriminant confidence scores of the generated sample pairs and the real sample pairs, and update the network parameters of the discriminator based on the discriminant loss function; calculate the generator loss function based on the difference between the predicted click-through rate and the real click tags and the discriminant confidence scores of the generated sample pairs, and update the network parameters of the generator based on the generator loss function. Obtain the multi-source heterogeneous features of the object to be predicted and the corresponding user historical behavior sequence features; The multi-source heterogeneous features of the object to be estimated and the corresponding user historical behavior sequence features are input into the click-through rate prediction model to predict the click-through rate and obtain the predicted click-through rate of the object to be estimated.
2. The method according to claim 1, wherein, The decision-maker includes: a gating network and multiple independent expert networks; The step of inputting the generated sample pair and the real sample pair into the discriminator to determine the authenticity of the samples and obtain the corresponding discrimination confidence scores further includes: For each sample pair among the generated sample pairs and the real sample pairs, the expert networks are used to determine the authenticity of the sample pairs and obtain the discrimination scores corresponding to the sample pairs. The gating network is used to perform feature perception and routing calculation on the sample pairs and output the discrimination weights corresponding to each expert network. Based on the discrimination weights and the corresponding discrimination scores, the discrimination confidence of the sample pairs is calculated.
3. The method according to claim 1, wherein, The generator loss function includes: a content loss function and an adversarial loss function; The step of calculating the generator loss function based on the difference between the estimated click-through rate and the actual click tags, and the discrimination confidence of the generated sample pairs, further includes: Based on the difference between the estimated click-through rate and the actual click tags, a content loss function is calculated, and an adversarial loss function is generated based on the discriminative confidence of the generated sample pairs. The generator loss function is obtained by weighted summation of the content loss function and the adversarial loss function.
4. The method according to claim 3, wherein, The step of generating an adversarial loss function based on the discriminative confidence of the generated sample pairs further includes: The mean of the discrimination confidence scores for each generated sample pair is calculated to obtain the expected confidence score of the generated sample. The negative value of the expected confidence value of the generated sample is used as the adversarial loss function, wherein the adversarial loss function is used to maximize the discrimination confidence corresponding to the generated sample pair, so as to reduce the earthmoving distance between the data distribution of the generated sample pair and the data distribution of the real sample pair.
5. The method according to any one of claims 1-4, wherein, The step of calculating the discriminant loss function based on the difference between the discriminant confidence scores of the generated sample pairs and the discriminant confidence scores of the real sample pairs further includes: The Earth Transporter Distance Loss is calculated based on the discrimination confidence of the generated sample pairs and the discrimination confidence of the real sample pairs. Interpolation sampling is performed between the true click labels of the real sample pairs and the estimated click-through rates of the generated sample pairs to obtain the interpolated click-through rates. Interpolated sample pairs are constructed based on the fusion features and the interpolated click-through rates. The interpolated sample pairs are input into a discriminator to determine the authenticity of the samples and obtain the corresponding discrimination confidence. The discrimination gradient of the interpolated sample pairs is calculated based on the discrimination confidence and the interpolated click-through rates. The gradient penalty term is calculated based on the difference between the L2 norm of the discrimination gradient and a preset constant. The discriminant loss function is generated based on the Earth transporter distance loss and the gradient penalty term.
6. The method according to any one of claims 1-4, wherein, The method further includes: performing hash processing on the multi-source heterogeneous features and user historical behavior sequence features of the sample object to obtain the multi-source heterogeneous feature vector and user historical behavior sequence feature vector corresponding to the sample object; The multi-source heterogeneous features of the object to be estimated and the corresponding user historical behavior sequence features are hashed to obtain the multi-source heterogeneous feature vector and the user historical behavior sequence feature vector corresponding to the object to be estimated. Among them, the user historical behavior sequence features and features with the same identifier among multi-source heterogeneous features share the same feature sharing mapping relationship table.
7. A click-through rate (CTR) prediction device, comprising: The first acquisition module is adapted to acquire the multi-source heterogeneous features of the sample object, the user's historical behavior sequence features, and the real click tags corresponding to the sample object. A generator is suitable for performing time-series processing on the user's historical behavior sequence features to obtain user dynamic interest time-series features, performing feature fusion processing on the user dynamic interest time-series features and the multi-source heterogeneous features, and performing click-through rate prediction based on the fused features to obtain the estimated click-through rate of the sample object. The sample construction module is adapted to generate sample pairs based on the fusion features and the estimated click-through rate of the sample objects, and to construct real sample pairs based on the fusion features and the real click tags. The discriminator is adapted to input the generated sample pairs and the real sample pairs into the discriminator respectively to judge the authenticity of the samples and obtain the corresponding discrimination confidence. The parameter update module is suitable for iteratively updating the parameters of the discriminator and the generator until a preset convergence condition is reached, and outputting the trained click-through rate prediction model: It calculates a discriminant loss function based on the difference between the discriminant confidence of the generated sample pairs and the discriminant confidence of the real sample pairs, and updates the network parameters of the discriminator based on the discriminant loss function; it calculates a generator loss function based on the difference between the predicted click-through rate and the real click tags and the discriminant confidence of the generated sample pairs, and updates the network parameters of the generator based on the generator loss function. The second acquisition module is suitable for acquiring the multi-source heterogeneous features of the object to be estimated and the corresponding user historical behavior sequence features; The click-through rate prediction module is adapted to input the multi-source heterogeneous features of the object to be predicted and the corresponding user historical behavior sequence features into the click-through rate prediction model to predict the click-through rate and obtain the predicted click-through rate of the object to be predicted.
8. A computing device, comprising: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction that causes the processor to perform the operation corresponding to the click-through rate prediction method as described in any one of claims 1-6.
9. A computer storage medium storing at least one executable instruction that causes a processor to perform an operation corresponding to the click-through rate prediction method as described in any one of claims 1-6.
10. A computer program product comprising at least one executable instruction that causes a processor to perform an operation corresponding to the click-through rate prediction method as described in any one of claims 1-6.