Click rate prediction negative sampling method based on large language model

By fine-tuning the large language model using a low-rank adaptation module to generate difficult negative samples, and combining this with traditional random negative samples, the high computational cost and difficulty in capturing semantic differences in traditional methods are solved, achieving efficient click-through rate prediction and improved recommendation accuracy.

CN121935599APending Publication Date: 2026-04-28BEIJING UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING UNIV OF TECH
Filing Date
2025-11-26
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Traditional negative sampling methods struggle to capture fine-grained semantic differences in user preferences, and directly applying large language models for negative sample generation faces significant computational costs and resource limitations.

Method used

A large language model based on low-rank adaptive module fine-tuning is adopted. By generating difficult negative samples and combining them with traditional random negative samples, the semantic distance between positive and negative samples is learned efficiently. The low-rank adaptive module is used to generate highly discriminative embedding vectors to build a click-through rate prediction model.

Benefits of technology

It improves the model's discrimination ability and recommendation accuracy, reduces computational costs and resource requirements, and achieves efficient click-through rate prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121935599A_ABST
    Figure CN121935599A_ABST
Patent Text Reader

Abstract

The invention discloses a click rate prediction negative sampling method based on a large language model. The method comprises the following steps: step 1, preparing a training data set; 2, user interest feature integration and embedding generation based on a pre-trained large language model; step 3, selecting a candidate negative sample set with the size of the candidate negative sample set in a random or recall mode from all unclicked item pools; step 4, performing positive and negative sample distance calculation fused with user interest embedding; 5, constructing and initializing a positive and negative sample classifier; step 6, aligning the embedded positive and negative samples fused with the user interest with the original sample; 7, selecting a difficult negative sample; 8, training a mixed loss function; by efficiently learning the semantic distance between the positive and negative samples, the difficult negative sample with higher discrimination is synthesized, and the discrimination ability and recommendation precision of the deep learning model are further enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to recommender systems, particularly click-through rate prediction tasks within recommender systems. Specifically, it describes a training strategy that combines difficult negative samples generated by a large language model with traditional random negative samples, aiming to achieve synergistic performance improvements and training stability. Background Technology

[0002] Click-through rate (CTR) prediction is a core task in recommender systems and online advertising, aiming to predict the likelihood of a user clicking on a specific item or ad. However, this task faces the inherent problem of data imbalance, where the number of positive interactions is far less than the number of negative interactions. Negative sampling is a key technique that effectively addresses this imbalance, significantly improving training efficiency and enhancing model performance. In recent years, large-scale models, exemplified by large language models, have had a transformative impact on recommender systems, demonstrating powerful capabilities in feature extraction, ranking, and content generation.

[0003] While these models offer superior performance, they also come with significant computational costs and resource requirements. Here, negative sampling transcends its role as merely a data preprocessing step; it has a profound symbiotic relationship with large models. Negative sampling can directly impact the practical feasibility and ultimate effectiveness of large models in click-through rate prediction by providing efficient and informative training signals. Optimizing negative sampling strategies can effectively reduce the computational burden on large models and optimize the overall system performance. This synergistic effect makes negative sampling a bridge between data efficiency and model complexity, enabling complex, high-capacity models to be effectively trained on large-scale, imbalanced datasets, thus bridging the gap between the theoretical potential of models and their practical deployment limitations. Summary of the Invention

[0004] The technical problem this invention aims to solve is that in click-through rate prediction tasks in recommendation systems, traditional negative sampling methods struggle to capture fine-grained semantic differences in user preferences and are difficult to flexibly adjust the difficulty of negative samples. Furthermore, directly applying large language models for negative sample generation faces significant computational costs and resource limitations. The purpose of this invention is to provide a negative sample selection and distance alignment learning method based on a large language model fine-tuned with embedded low-rank adaptive modules. By efficiently learning the semantic distance between positive and negative samples, it synthesizes more discriminative and difficult negative samples, thereby enhancing the discriminative ability and recommendation accuracy of deep learning models. According to some embodiments, the technical solution adopted in this invention is as follows:

[0005] Step 1: Data Integration and Preparation Prepare the training dataset, which includes user-positive sample pairs. And related multi-source information. The multi-source information includes at least: the user's entire historical clicked item sequence, the user's... For the project Evaluation information (such as comment text), user Personal information (such as user profiles), and projects Attribute information (such as description, tags).

[0006] Step 2: User Interest Feature Integration and Embedding Generation Based on Pre-trained Large Language Model. All the information integrated in Step 1 is structured into input prompts for the large language model, which are then input into a pre-trained large language model with a low-rank adaptation module injected into the key weight matrix. This module can be injected into the query matrix, key matrix, and value matrix of the large language model's self-attention mechanism. Through the semantic summarization function of the large language model, an embedding vector integrating user interests, historical preferences, and potential negative interests is generated. Throughout the training process, the original pre-trained weights of the large language model remain frozen; only the low-rank matrix parameters of the key weight matrix module are updated, achieving efficient fine-tuning.

[0007] Step 3: Candidate Negative Sample Selection. From the pool of all unclicked items, a candidate negative sample set of size N is selected using a multi-way recall method. The multi-path recall methods may include popularity, randomness, matrix factorization, or collaborative filtering.

[0008] Step 4: Calculate the distance between positive and negative samples by incorporating user interest embeddings for each negative sample. Perform dual distance calculations: predict distance Calculate the embedding vector Embedding of negative samples The attention calculation result is then compared with the embedding of the positive sample. Perform the inner product operation to obtain the predicted distance based on the semantics of the large language model. This attention mechanism aims to highlight the parts of negative samples that are most relevant to the user's interest features. (True value distance) : Calculate the embedding of positive samples Embedding with negative samples Truth distance between Defined as .

[0009] Step 5: Positive and Negative Sample Classifier Construction and Initialization Construct and initialize a positive and negative sample classifier (e.g., a fully connected network or a simple perceptron). The input to the classifier includes the predicted distance calculated in Step 4. Distance from truth value And its related features. This classifier is used to assist in training the parameters in the low-rank adaptation module.

[0010] Step 6: Align the positive and negative samples that incorporate user interest embeddings with the original samples by calculating the predicted distance obtained in Step 4. Distance from truth value As an alignment supervision signal, the matrix parameters of the low-rank adaptation module injected into the large language model are updated using a distance alignment loss function (such as mean squared error or L1 loss), and the positive and negative sample classifier is trained. This step achieves the alignment of the embedding space learned by the large language model, which incorporates user interests, with the original item embedding space.

[0011] Step 7: Hard Negative Sample Selection. Using the positive / negative sample classifier trained in Step 6, candidate negative samples are scored, or scored directly based on predicted distance. The sample with the closest predicted distance to the ground truth distance is selected. The negative samples are used as the final hard negative sample set. .

[0012] Step 8: Training with the hybrid loss function using the difficult negative samples selected in Step 7. And traditional random negative samples This is combined to train the final click-through rate prediction model. The Bayesian Personalized Ranking (BPR) loss function is employed. The loss function is optimized by incorporating signals from both difficult and random negative samples, achieving a synergistic improvement in performance and generalization ability. Attached Figure Description

[0013] Figure 1 This is a schematic diagram of the method process of the present invention. Detailed Implementation

[0014] The technical solutions provided in this specification will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. It should be understood that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0015] The present invention will be further described in detail below with reference to embodiments. The core of this embodiment lies in constructing an efficient and low-cost large language model module (implemented through a low-rank adaptation module), which enables it to learn and align the distance metric between the user interest embedding and the item embedding space, and guides the large model to optimize through a positive and negative sample classifier, selecting appropriate hard samples, and finally using them for training the click-through rate prediction model.

[0016] The system in this embodiment mainly includes a data integration and preparation module, a low-rank adaptation module, a candidate negative sample selection module, a distance calculation module, a positive and negative sample classifier construction module, an alignment training module, and a hybrid loss function training module.

[0017] Integration and Preparation Module

[0018] Data Integration and Preparation: Prepare a training dataset containing user-positive sample pairs. It also collects multi-source information related to the interaction as the input context for the large language model.

[0019] Historical interaction information: collecting user data All clicked historical items sequence To control computational complexity, only the most recent or most relevant items are retained. Fine-grained semantic information: collecting user... Positive samples Evaluation information (such as review text, sentiment), and items Attribute information (such as detailed description, tags, categories).

[0020] User profile information: collecting user data Personal information (such as age, region, occupation, etc.). All the above unstructured and structured information is uniformly encoded to construct a structured prompt acceptable to the large language model as input for subsequent steps.

[0021] User interest embedding learning based on low-rank adaptive modules

[0022] The large language model is generated by integrating and embedding user interest features based on a pre-trained large language model, and a pre-trained Transformer architecture large language model is used as the basic semantic model.

[0023] Low-rank adaptation module injection: Low-rank adaptation modules are injected in parallel onto the key weight matrices of the large language model (e.g., the query matrix, key matrix, and value matrix in the self-attention mechanism). Each low-rank adaptation module consists of two low-rank matrices. and Composition, its weight update amount .

[0024] Parameter Freezing and Fine-Tuning: Throughout the training process, the original pre-trained weights of the large language model are kept frozen. Only the low-rank matrix parameters of the low-rank adaptation module are updated, thereby significantly reducing the number of trainable parameters and computational resource consumption.

[0025] Embedding Generation: All the structured information integrated in step 1 is input into the large language model. A unified, high-dimensional embedding vector is generated using the semantic summarization function of the large language model. This vector deeply integrates user... Current interests, historical preferences, and potential negative interest patterns.

[0026] Candidate Negative Sample Selection and Distance Calculation

[0027] Candidate negative samples are selected from the pool of all unclicked items using a multi-path recall approach, employing strategies such as popularity, randomization, matrix factorization, and collaborative filtering, to select samples of size [value missing]. candidate negative sample set This ensures the breadth and diversity of the candidate set.

[0028] The positive and negative sample distance calculation, which incorporates user interest embedding, is applied to each negative sample. Perform dual distance calculations.

[0029] Predicted distance (Semantic distance of large language models): Calculate the embedding vector Embedding of negative samples The attention calculation result is then compared with the embedding of the positive sample. Perform the inner product operation to obtain the predicted distance The specific implementation of this mechanism could be based on... and A lightweight network designed to highlight Zhongyu Mismatched features.

[0030] Truth Distance (Original embedding distance): Calculates the embedding of positive samples Embedding with negative sample $j$ The truth distance between them is defined as This distance represents the similarity between the click-through rate prediction models in the original embedding space.

[0031] Classifier construction and embedding alignment training

[0032] Positive and Negative Sample Classifier Construction and Initialization: Construct and initialize a positive and negative sample classifier. The classifier can be a multilayer perceptron or a logistic regression model. The input features of the classifier may include the predicted distance calculated in step 4. True distance User embedding and projects Features such as feature crosses, etc. This classifier is used to assist in training the parameters in the low-rank adaptation module.

[0033] The step of aligning positive and negative samples with the original samples, which incorporate user interest embeddings, performs joint optimization. This aims to align the semantic space of the large language model with the original item embedding space and train a classifier to identify difficult samples.

[0034] Alignment loss: This refers to the predicted distance. Distance from truth value As an alignment supervision signal, calculate the distance alignment loss function (e.g., mean squared error or L1 loss): .

[0035] Low-rank adaptation module update: Utilizing The low-rank matrix parameters of the low-rank adaptation module injected into the large language model are updated to achieve semantic embedding of the large language model. Alignment.

[0036] Classifier training: Simultaneously, the positive and negative sample classifiers are trained so that they can classify according to... and The difficulty of accurately identifying negative samples and their related characteristics.

[0037] Through this joint training step, the embedding space of the large language model, which incorporates user interests, is aligned with the item embedding space of the original click-through rate prediction model, enabling the large language model to accurately predict sample distances from the perspective of the click-through rate model.

[0038] Difficult negative sample selection and model training

[0039] Difficult negative samples are selected by using the positive and negative sample classifier or large language model module trained in step 6 to score the difficulty of all candidate negative samples.

[0040] Selection criteria: Select the values ​​whose predicted distance is closest to the true value. One negative sample, or select the sample most likely to be misclassified by the classifier. 10 negative samples are used as the final hard negative sample set. These samples are the ones that the model finds hardest to distinguish and provide the highest discrimination signal.

[0041] The hybrid loss function training uses the difficult negative samples selected in step 7. And traditional random negative samples (As a global generalization signal) is combined to train the final click-through rate prediction model. A Bayesian personalized ranking loss function is employed. To optimize, the loss function is:

[0042] in, , The model represents the user and projects The predicted score It is the Sigmoid function.

[0043] Through this hybrid training paradigm, the model utilizes both The provided valid discrimination signal also retains It provides a macro view of the entire project space, thereby achieving optimal performance and generalization capabilities.

[0044] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A negative sampling method for click-through rate prediction based on a large language model, characterized in that, A pre-trained big oracle model incorporating user interests is learned by injecting a low-rank adaptation module into the key weight matrix. Based on this representation, hard negative samples are selected from the candidate set for training the click-through rate prediction model. The specific steps are as follows: Step 1: Prepare the training dataset, which contains user-positive sample pairs. And multi-source information associated with the user-positive sample pair, including the user's historical clicked item sequence, user... For the project User review information Personal information, and projects Attribute information; Step 2: Integration and Embedding of User Interest Features Based on Pre-trained Large Language Model. All information integrated in Step 1 is structured into input prompts for the large language model and input into a pre-trained large language model with a low-rank adaptation module injected into the key weight matrix. The low-rank adaptation module is injected into the query matrix, key matrix, and value matrix of the large language model's self-attention mechanism. Through the semantic summarization function of the large language model, an embedding vector integrating user interests, historical preferences, and potential negative interests is generated. Throughout the training process, the original pre-trained weights of the large language model remain frozen; only the low-rank matrix parameters of the key weight matrix module are updated, achieving efficient fine-tuning. Step 3: Candidate Negative Sample Selection. From the pool of all unclicked items, a candidate negative sample set of size N is selected using a multi-way recall method. The multi-path recall methods include popularity, randomness, matrix factorization, or collaborative filtering. Step 4: Calculate the distance between positive and negative samples by fusing user interest embeddings for each negative sample. Perform dual distance calculations: predict distance Calculate the embedding vector Embedding of negative samples The attention calculation result is then compared with the embedding of the positive sample. Perform the inner product operation to obtain the predicted distance based on the semantics of the large language model. This attention mechanism aims to highlight the parts of negative samples that are most relevant to the user's interest features; ground truth distance. : Calculate the embedding of positive samples Embedding with negative samples Truth distance between Defined as ; Step 5: Positive and Negative Sample Classifier Construction and Initialization Construct and initialize a positive and negative sample classifier. The input to the classifier includes the prediction distance calculated in Step 4. Distance from truth value and its related features; this classifier is used to assist in training the parameters in the low-rank adaptation module; Step 6: Align the positive and negative samples embedded with the original samples by fusing them together. Calculate the predicted distance obtained in Step 4. Distance from truth value As an alignment supervision signal, the matrix parameters of the low-rank adaptation module injected into the large language model are updated using the distance alignment loss function, and the positive and negative sample classifier is trained. Step 7: Selection of Difficult Negative Samples. Using the positive and negative sample classifier trained in Step 6, candidate negative samples are scored, or scored directly based on predicted distance; the sample with the closest predicted distance to the ground truth distance is selected. The negative samples are used as the final hard negative sample set. ; Step 8: Training with the hybrid loss function using the difficult negative samples selected in Step 7. And traditional random negative samples Combined, it is used to train the final click-through rate prediction model; the Bayesian personalized ranking BPR loss function is adopted. The loss function is optimized by fusing signals from difficult negative samples and random negative samples, achieving a synergistic improvement in performance and generalization ability.

2. The negative sampling method for click-through rate prediction based on a large language model according to claim 1, characterized in that, In step 2, all the information integrated in step 1 is structured into input prompts and input into a pre-trained large language model with low-rank adaptation modules injected into the key weight matrix to generate an embedding vector that integrates user interests, historical preferences and potential interests.

3. The negative sampling method for click-through rate prediction based on a large language model according to claim 1, characterized in that, In step 3, candidate negative samples are recalled using a multi-path recall method, and candidate negative samples are recalled from different channels according to popularity, randomness, matrix factorization, and collaborative filtering to form a candidate set of negative samples to be selected.

4. The negative sampling method for click-through rate prediction based on a large language model according to claim 1, characterized in that, Step 4 incorporates the calculation of positive and negative sample distances based on user interest embeddings, for each negative sample... Calculate the predicted distance The calculation is performed by using the embedding vector obtained in step 2. Embedding with negative samples Perform attention calculations, and then combine the results with the embeddings of positive samples. We obtain it by performing an inner product operation.

5. The negative sampling method for click-through rate prediction based on a large language model according to claim 1, characterized in that, In step 5, the positive and negative sample classifier uses a multilayer perceptron as its basic structure to classify items that the user has clicked and those that have not.

6. The negative sampling method for click-through rate prediction based on a large language model according to claim 1, characterized in that, In step 6, the positive and negative samples of the user interest embedding are aligned with the original samples to merge the original embedding vector. and inner product As a supervisory signal, the matrix parameters of the low-rank adaptation module injected into the large oracle model are updated using the distance alignment loss function, so that the classifier in step 5 can correctly distinguish between positive and negative samples while predicting distance. Distance to truth .

7. The negative sampling method for click-through rate prediction based on a large language model according to claim 1, characterized in that, The difficult negative sample selection in step 7 utilizes the large oracle model trained on distance alignment in step 6, based on the predicted distance. The candidate negative samples are scored, and the sample with the closest predicted distance to the true value is selected. The negative samples are used as the final hard negative sample set. .

8. The negative sampling method for click-through rate prediction based on a large language model according to claim 1, characterized in that, Step 8 involves training the mixed loss function using the difficult negative samples selected in step 7. And traditional random negative samples This is combined to train a click-through rate prediction model, and a Bayesian personalized ranking loss function is employed. Optimize.

9. The negative sampling method for click-through rate prediction based on a large language model according to claim 2, characterized in that, In step 2, the low-rank adaptation module is injected into the query matrix, key matrix, and value matrix of the self-attention mechanism of the big oracle model.

10. The negative sampling method for click-through rate prediction based on a large language model according to claim 6, characterized in that, In step 6, the distance alignment loss function is the mean squared error (MSE) loss or the L1 loss; the original pre-trained weights of the large oracle model are frozen during training; in step 8, the Bayesian personalized ranking (BPR) loss function... Defined as: ; in, , The model represents the user and projects The predicted score It is the Sigmoid function.