Generative large language model recommendation method based on data cutting

By employing data pruning and large-scale model fine-tuning, core datasets are selected and vector quantization is performed. A multi-level Prompt strategy is constructed, which solves the problems of high computational overhead and redundant interference in large-scale model training, improving the recommendation accuracy and robustness of the model, especially demonstrating excellent performance in cold start scenarios.

CN120952918APending Publication Date: 2025-11-14UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511231483.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-31
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

Existing large-scale model training suffers from high computational and storage overhead, severe redundancy and noise interference, and difficulty in model convergence when data quality varies, resulting in low resource utilization efficiency and insufficient generalization ability.

Method used

We adopt a generative large language model recommendation method based on data pruning. We select core datasets and generalization datasets through gradient pruning, combine large model fine-tuning, use RQ-VAE for vector quantization, construct a multi-level Prompt strategy to improve the model's understanding of index IDs, and use the LoRA fine-tuning method to optimize model parameters.

Benefits of technology

It significantly improves the training efficiency and recommendation accuracy of the model, solves the cold start problem, enhances the robustness and generalization ability of the model, and optimizes the performance of the recommendation system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120952918A_ABST
    Figure CN120952918A_ABST
Patent Text Reader

Abstract

The invention discloses a generative large language model recommendation method based on data cutting, and belongs to a recommendation system technology in the field of machine learning. According to the method, by introducing a large model technology, the advantages of a large model in the aspect of generation are facilitated, and the cold start problem of an article is solved to a certain extent. A vector quantization technology is introduced, so that the model can fully understand semantics of articles of a recommendation system, and the gap between a natural language and recommendation semantics is made up; through a data cutting strategy, an original data set is divided into a core data set and a generalization data set, so that differential modeling of different types of samples is realized while the training efficiency is ensured, and structural information and potential values of the data sets are fully mined and utilized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention pertains to recommender system technology within the field of machine learning, specifically designing a recommendation method for fine-tuning a large model and pruning and partitioning data. Background Technology

[0002] In traditional large-scale model training, mainstream methods typically rely on the direct use of the complete training dataset. However, with the rapid increase in the number of model parameters and data size, this approach faces significant computational and storage overhead. Furthermore, in real-world scenarios, training data often contains a large number of redundant and noisy samples. While training directly on the full dataset can improve the model's generalization ability, it leads to inefficient resource utilization. Moreover, when data quality varies, the model may be affected by suboptimal samples, making it difficult to converge to a better solution.

[0003] Coreset selection provides an effective approach to this problem. The basic idea is to select a representative small subset from the original dataset, such that a model trained on this subset can approximate or even be equivalent to the effect of training on the full dataset. Coreset selection can significantly reduce training costs, accelerate iteration efficiency, and alleviate redundancy and noise interference problems during the training of large models, while ensuring model performance.

[0004] In recent years, with the widespread application of Large Language Models (LLMs), core set techniques have demonstrated new value in large model training. On the one hand, LLMs are more sensitive to data distribution, and selecting high-quality data subsets with information gain can effectively improve the model's generalization performance and robustness. On the other hand, core sets can help models better focus on representative or more challenging samples, thereby improving the long-tail problem and data imbalance. Especially in resource-constrained scenarios, core set selection can not only accelerate pre-training and fine-tuning but also improve the model's transferability in downstream tasks.

[0005] However, most current core set methods are still limited to heuristic sample selection or shallow feature similarity metrics, failing to fully integrate model training dynamics with deep representation learning. Therefore, there is an urgent need to develop a new generation of core set selection methods for large models that can integrate data diversity, task relevance, and model training signals to better support the efficient training and generalization of large language models. Summary of the Invention

[0006] This invention addresses the shortcomings of existing technologies by providing a generative large language model recommendation method based on data pruning. This method achieves data trimming by introducing a gradient pruning technique on the dataset, and combined with large model fine-tuning, solves the cold start problem and training time cost issues of large models, significantly improving the robustness and accuracy of the recommendation system. Experimental results show that this invention outperforms existing methods in key metrics such as Recall and NDCG on public datasets.

[0007] This invention discloses a generative large language model recommendation method based on data pruning, which includes the following steps:

[0008] Step 1: Data preprocessing. Clean the acquired user-item interaction data, delete useless and redundant data, delete unreasonable data, and delete data whose user-item interaction length is shorter than the set threshold.

[0009] Step 2: Introduce the second-order Hessian matrix of the model on the entire dataset and the overall empirical risk of the sample to express the average loss of removing each sample on the entire dataset, so as to perform data pruning and selection; divide the dataset into the core dataset S1 and the generalization dataset S2.

[0010] Step 3: Use the RQ-VAE vector quantization mechanism to obtain the index ID corresponding to each item;

[0011] The core features of an item in the semantic space are captured by encoding the text description or multimodal content of the item to obtain the index ID, and then generating a discrete token sequence through multi-level residual quantization.

[0012] Step 4: The pre-trained large model is first fine-tuned on the generalization dataset S2 to obtain a model M1 that can perform preliminary recommendations;

[0013] Step 5: In the process of constructing Prompt2 using the core dataset S1, the initial input is constructed based on the item index ID; two Prompt construction strategies are adopted to enhance the model's understanding of the correspondence between the item index ID and its semantic ID.

[0014] Step 6: Model training and recommendation generation;

[0015] Based on the large model fine-tuning method, the model parameters are merged by linear weighting, and a prompt is constructed to enable the model to output a recommendation list.

[0016] Furthermore, the specific method for step 3 is as follows:

[0017] Step 3.1: A series of features of a user's items, including item number, title, item description, category, and brand, are represented as embedding vectors I using embedding techniques. e Then, through an encoding layer, the embedding vector I is processed. e Perform a linear transformation to obtain H e =Encoder(I e Encoder represents the encoding layer;

[0018] Step 3.2: Let That is, in the first step, the search vector is initialized as H. e Then, look up the corresponding code in the first-level encoding index. The closest embedding vector, denoted as e c0 Then let Next, continue searching for vectors in the second-level encoding index. Find the closest embedding vector, and then repeat this process m times;

[0019] Step 3.3: After m iterations, obtain the item's index ID: (c0, c1, c2, ..., c m Meanwhile, in order to train the encoding index, as well as the encoder and decoder, we record... in Let i = 0, 1, ..., m be the search vector for each level, and finally let... Let the loss function be L = L Recon +L Rqvae ; where L Recon =||I e -I e ′|| 2 , sg[] is the gradient stopping operator, D represents the decoder, I e The embedding vector I of the item before it enters the encoder. e ,e cd This represents the embedding vector that is retrieved and extracted from the encoding table based on the index in each layer of the model.

[0020] Furthermore, the specific method for step 4 is as follows:

[0021] The selected pre-trained large model is Qwen-7B;

[0022] Fine-tuning Qwen-7B on the S2 dataset was performed using the Prompt1 instruction with the prompt: "Given the User's historical interactions."<a_125> ,<b_136> ,…,<c_128> ,Try to predict nextitem to user.Note that the historical interactions are arranged inchronological order.Answer:<a_49> ,<b_62> ,<c_119> ,<d_2> During training, the error is calculated every 100 training epochs, and the best-performing model M1 is saved.

[0023] Furthermore, the specific method for step 5 is as follows:

[0024] Further fine-tuning is performed on the S1 dataset. The fine-tuning instructions are as follows:

[0025] Tip word: Anitemis called:DevaCurlNo-Poo Zero Lather ConditioningCleanser 12.0oz. The description of thisitemis:DevaCurlNo-Poo Zero Lather ConditioningCleanser(12.0oz) is a gentle, non-lathering cleanser designed forcurly hair. It cleanses the scalp without stripping natural oils, leaving curls hydrated, soft, and frizz-free.

[0026] Answer:

[0027] <a_25> ,<b_31> ,<c_121> ,<d_29> .

[0028] Similarly, the error is calculated every 100 training rounds, and the model that performs best at that stage is retained.

[0029] Furthermore, a portion of the weight matrix of the large language model is selected, and this portion of the weight matrix W_0 is not updated. A low-rank adapter is added in the bypass, with weight matrices A and B in the low-rank adapter, resulting in the LoRA weight update term ΔW for each task. (k) :

[0030] ΔW (k) =A (k) B (k) k = 1, 2, ..., K

[0031] Where k represents the k-th model, and K is the total number of models; the final model weights are:

[0032]

[0033] Where, α k This represents the correction factor.

[0034] Compared with existing technologies, the beneficial effects of this invention are as follows: By introducing large model technology, the advantages of large models in generative processing are utilized, which solves the cold start problem of items to a certain extent. By introducing vector quantization technology, the model can more fully understand the semantics of items in the recommendation system, bridging the gap between natural language and recommendation semantics. Through data pruning strategies, the original dataset is divided into a core dataset and a generalization dataset, thereby ensuring training efficiency while achieving differentiated modeling of different types of samples, fully mining and utilizing the structural information and potential value of the dataset. Attached Figure Description

[0035] Figure 1 This is a flowchart of the method of the present invention.

[0036] Figure 2 This is a schematic diagram of the Prompt1 instruction constructed according to the present invention.

[0037] Figure 3 This is a schematic diagram of the Prompt2 instruction constructed according to the present invention.

[0038] Figure 4 This is a schematic diagram of the Prompt3 instruction constructed according to the present invention.

[0039] Figure 5 This is a schematic diagram illustrating how RQ-VAE obtains the index ID of an item in this invention. Detailed Implementation Plan

[0040] To make the objectives and innovations of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings.

[0041] The specific implementation of the present invention is as follows:

[0042] 1. User behavior data cleaning and filtering

[0043] To improve the efficiency of model training and the quality of samples, we first cleaned and preprocessed the raw user behavior data. Specifically, for each user, we only retained their 30 most recent interacting items to ensure that the recommendation model focuses on the user's latest interest trends. For users with fewer than 30 interactions, we considered their behavioral information insufficient to support effective modeling and therefore discarded them to avoid introducing noise and instability.

[0044] 2. Core sample mining based on sample gradient (S1 / S2 pruning)

[0045] After initial data cleaning, we employed a gradient-based sample loss minimization method to prioritize the training data, pruning it into a core sample set (S1) and a generalization sample set (S2). This strategy aims to improve training efficiency and generalization ability by focusing on the key samples that contribute most to model parameter updates. To reduce the computational overhead of the large model, we used SASRec, a structurally similar recommendation model with a Transformer architecture, to approximate gradient estimation instead of the large language model. SASRec's efficiency and good representational capabilities make it an ideal surrogate model for the gradient selection stage.

[0046] 3. We apply RQ-VAE (Residual Quantization VAE) to the semantic embedding of items to perform vector quantization, thereby generating a discrete index representation for each item, which is used for subsequent efficient modeling and recommendation tasks. The specific process of the algorithm is as follows: (1) First, a series of features of the user's items, including the item number, title, and related information such as item description, category, and brand, are represented as embedding vectors I through embedding technology. e Then, through an Encoder layer, the embedded vector I is processed. e Perform a linear transformation to obtain H e =Encoder(I e )

[0047] (2) Let That is, in the first step, the search vector is initialized as H. e Then, look up the corresponding code in the first-level encoding index. The closest embedding vector is denoted as e. c0 Then let Next, continue searching for vectors in the second-level encoding index. Find the closest embedding vector, and then repeat this process m times.

[0048] (3) After m iterations, we obtain the item's index ID, (c0, c1, c2, ..., c m Meanwhile, in order to train the encoding index and the Encoder, Decoder, and Decoder, we denote... in (i = 0, 1, ..., m) is the search vector for each level. Finally, let... Let the loss function be L = L Recon +L Rqvae .in sg[] is the gradient stopping operator.

[0049] 4. Prompt Construction and Data Instruction Pruning

[0050] To better align the linguistic and co-semantic meanings of items and gain a deeper understanding of the meaning of index IDs, this paper proposes three Prompt design strategies, aiming to improve cold start performance, enhance the understanding of index IDs by large models, and improve the overall performance of recommendation tasks. For example... Figure 2 , Figure 3 , Figure 4 As shown:

[0051] • Prompt 1 is designed primarily to improve the model's generalization ability and cold-start performance. In this strategy, all items in the Prompt are represented by their index IDs, enabling the model to learn the semantic features behind the index IDs.

[0052] • Prompt 2 focuses on building an explicit alignment between semantic IDs and index IDs. By introducing linguistic index information, large models can better understand the mapping between the two, thereby improving the accuracy of item representation. • Prompt 3 focuses on the final performance optimization of the recommendation task. It is similar in form to the first approach, also using index IDs to represent items, but its goal is to improve the model's performance in terms of recommendation accuracy and robustness.

[0053] By combining and comparing these three Prompt strategies, this paper effectively promotes the understanding and generalization ability of large models of index information, and provides a more robust solution for recommendation tasks in diverse scenarios.

[0054] 5. Fine-tuning and staged training strategies for large language models

[0055] We fine-tuned the large language model using open-source tools such as LLaMA-Factory, selecting the Qwen-7B model. Compared to other models of similar size, Qwen-7B possesses stronger contextual understanding capabilities, stable long text processing capabilities, and good compatibility, making it particularly suitable for handling prompt-based instruction input. To equip the model with the ability to handle cold start scenarios and improve generalization, we first fine-tuned it on the S2 dataset. During training, we calculated the loss every 100 epochs and saved the best-performing model. Subsequently, we further fine-tuned it on the S1 dataset, again employing the strategy of calculating the loss every 100 epochs, and finally retaining the weights of the model that performed best at that stage.

[0056] For fine-tuning the large model, a LoRA-based model for efficient parameter fine-tuning was chosen. This efficient fine-tuning method involves keeping the original parameters W0 of the large language model unchanged, and adjusting the parameters next to the linear layers in each Transformer block. The large language model consists of multiple Transformer decoders, and the Transformer is an end-to-end encoder-decoder model based on an attention mechanism. In this study, we applied the LoRA fine-tuning method to the Qwen7B model. Within the attention module of each Transformer decoder, the Query projection matrix W is adjusted. q and Value projection matrix W v Apply a low-rank adapter. Specifically, if W0∈R d×k Representing the original linear layer weights, we keep them frozen and introduce two low-rank matrices A∈R in their bypass. r*k ,B∈R d*r This can be expressed as a formula:

[0057] W0 + ΔW = W0 + BA, B ∈ R d×r ,A∈R r×k

[0058] 6. Evaluate the model using the VLLM framework.

[0059] VLLM (Virtual Large Language Model) is a high-performance engine designed for optimizing inference for large language models, aiming to significantly improve model response speed and throughput. By introducing an efficient key-value cache management mechanism and asynchronous batch processing scheduling strategy, it enables large models to achieve low-latency, high-throughput inference performance in scenarios involving multiple requests, long contexts, or high concurrency. VLLM also exhibits good memory efficiency during inference and supports concurrent deployment of multiple models and multiple instances, making it ideal for deploying large language models in industrial-grade recommendation systems.

[0060] The purpose of introducing VLLM in this technology is to address the issues of high inference costs and slow response times of large models in tasks such as generative recommendation and recommendation explanation. Specifically, after the traditional structured model generates an initial candidate set, we construct a prompt using the user's historical behavior sequence, contextual information, and candidate items. Then, a large language model generates personalized recommendation reasons, the user's potential interests, or scores candidate items for ranking. With VLLM, we can efficiently invoke large models in tasks such as batch candidate generation, text explanation generation, and multi-turn recommendation dialogues, significantly reducing inference time while maintaining strong generative and contextual understanding capabilities.

[0061] To evaluate model performance, after data preprocessing, we pruned the dataset into training, validation, and test sets in an 8:1:1 ratio. To verify the effectiveness of our method, we selected three publicly available subsets of datasets from Amazon Reviews for experiments, as detailed below:

[0062] (1) Beauty: Contains 22,363 users and 12,101 items, with an average user interaction sequence length of 8.87. This dataset mainly consists of cosmetics and skincare products. User behavior has obvious personalized characteristics, the correlation between products is high, the data is relatively sparse, and the cold start problem is prominent.

[0063] (2) Toys: Contains 19,412 users and 11,924 items, including children's toys, board games, and educational products. This dataset is greatly influenced by the diverse intentions of users, with a wide distribution of user profiles and significant differences in preferences.

[0064] (3) Sports: Contains 35,598 users and 18,357 items, covering sports equipment, outdoor products, fitness equipment, etc. The data volume is relatively large, the types of items are widely covered, and it has good representativeness.

[0065] The selection of the three datasets above reflects the diversity of data across different scenarios and item types, which helps to comprehensively evaluate the model's performance in various application scenarios and avoids the problem of insufficient robustness caused by over-reliance on data from specific domains. The following recommendation model is selected as a benchmark for comparison:

[0066] 1. LightGCN: A lightweight graph neural network model that propagates neighborhood information through linear transformations and element-wise addition operations;

[0067] 2.SASRec: A sequence recommendation model based on self-attention mechanism.

[0068] 3. MOLORec: A recommendation model that integrates collaborative signals and multimodal content.

[0069] 4. TALLRec is a recommendation model based on large language models for instruction fine-tuning.

[0070] The following two widely used evaluation metrics are adopted:

[0071] (1) Recall@K measures the proportion of the target item that the model hits in the first K recommendations, reflecting the model’s recall ability.

[0072] (2)NDCG@K considers the ranking position of items in the recommendation list, assigns higher weights to correct recommendations that are ranked higher, and comprehensively evaluates the accuracy and ranking ability of the model.

[0073] As shown in Table 1, the experimental results demonstrate that the present invention achieves significant performance improvements on all datasets. Specific results are as follows:

[0074] On the Beauty dataset, Recall@1 and NDCG@1 reached 0.3362 and 0.3462 respectively, representing improvements of 10.04% and 7.6% compared to TALLRec.

[0075] On the Toys dataset, Recall@1 and NDCG@1 reached 0.3502 and 0.3539, respectively, representing improvements of 11.5% and 12.1% compared to MoLoRec.

[0076] Table 1. Recommendation results of this invention on three public datasets.

[0077]

[0078]

Claims

1. A generative large language model recommendation method based on data pruning, comprising the following steps: Step 1: Data preprocessing. Clean the acquired user-item interaction data, delete useless and redundant data, delete unreasonable data, and delete data whose user-item interaction length is shorter than the set threshold. Step 2: Introduce the second-order Hessian matrix of the model on the entire dataset and the overall empirical risk of the sample to express the average loss of removing each sample on the entire dataset, so as to perform data pruning and selection; divide the dataset into the core dataset S1 and the generalization dataset S2. Step 3: Use the RQ-VAE vector quantization mechanism to obtain the index ID corresponding to each item; The core features of an item in the semantic space are captured by encoding the text description or multimodal content of the item to obtain the index ID, and then generating a discrete token sequence through multi-level residual quantization. Step 4: The pre-trained large model is first fine-tuned on the generalization dataset S2 to obtain a model M1 that can perform preliminary recommendations; Step 5: In the process of constructing Prompt2 using the core dataset S1, the initial input is constructed based on the item index ID; two Prompt construction strategies are adopted to enhance the model's understanding of the correspondence between the item index ID and its semantic ID. Step 6: Model training and recommendation generation; Based on the large model fine-tuning method, the model parameters are merged by linear weighting, and a prompt is constructed to enable the model to output a recommendation list.

2. The generative large language model recommendation method based on data pruning as described in claim 1, characterized in that, The specific method for step 3 is as follows: Step 3.1: A series of features of a user's items, including item number, title, item description, category, and brand, are represented as embedding vectors I using embedding techniques. e Then, through an encoding layer, the embedding vector I is processed. e Perform a linear transformation to obtain H e =Encoder(I e Encoder represents the encoding layer; Step 3.2: Let That is, in the first step, the search vector is initialized as H. e Then, look up the corresponding code in the first-level encoding index. The closest embedding vector, denoted as e c0 Then let Next, continue searching for vectors in the second-level encoding index. Find the closest embedding vector, and then repeat this process m times; Step 3.3: After m iterations, obtain the item's index ID: (c0, c1, c2, ..., c m Meanwhile, in order to train the encoding index, as well as the encoder and decoder, we record... in Let i = 0, 1, ..., m be the search vector for each level, and finally let... Let the loss function be L = L Recon +L Rqvae ;in sg[] is the gradient stopping operator, D represents the decoder, I e The embedding vector I of the item before it enters the encoder. e ,e cd This represents the embedding vector that is retrieved and extracted from the encoding table based on the index in each layer of the model.

3. The generative large language model recommendation method based on data pruning as described in claim 1, characterized in that, The specific method for step 4 is as follows: The selected pre-trained large model is Qwen-7B; Fine-tuning Qwen-7B on the S2 dataset was performed using the Prompt1 instruction with the prompt: "Given the User's historical interactions."<a_125> ,<b_136> ,…,<c_128> ,Try to predict next item to user.Note that the historical interactions are arranged in chronologicalorder.Answer:<a_49> ,<b_62> ,<c_119> ,<d_2> During training, the error is calculated every 100 training epochs, and the best-performing model M1 is saved.

4. The generative large language model recommendation method based on data pruning as described in claim 1, characterized in that, The specific method for step 5 is as follows: Further fine-tuning was performed on the S1 dataset, with the following instruction: An item is called: DevaCurlNo-Poo Zero Lather Conditioning Cleanser 12.0oz. The description of this item: DevaCurlNo-Poo Zero Lather Conditioning Cleanser (12.0oz) is a gentle, non-lathering cleanser designed for curly hair. It cleanses the scalp without stripping natural oils, leaving curls hydrated, soft, and frizz-free. Answer: <a_25> ,<b_31> ,<c_121> ,<d_29> . Similarly, the error is calculated every 100 training rounds, and the model that performs best at that stage is retained.

5. The generative large language model recommendation method based on data pruning as described in claim 1, characterized in that, Select a portion of the weight matrix from the large language model. Do not update this portion of the weight matrix W_0. Add a low-rank adapter in the bypass, with weight matrices A and B in the low-rank adapter. This yields the LoRA weight update term ΔW for each task. (k) : ΔW (k) =A (k) B (k) ,k=1,2,..,K Where k represents the k-th model, and K is the total number of models; the final model weights are: Where, α k This represents the correction factor.