A recommendation data augmentation method based on fine-tuning large language models
By lightweight fine-tuning of large language models and refined data enhancement, the problems of data sparsity and cold start in recommendation systems are solved, high-quality user-item interaction data and item attributes are generated, and the performance of the recommendation system and user experience are improved.
Patent Information
- Application Number
- CN202510109710.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2045-01-23
AI Technical Summary
Existing recommendation systems face data sparsity and cold start problems, and traditional data augmentation methods have limitations, especially when dealing with complex contexts and multimodal data. Large language models have output uncertainty and instruction design complexity when generating rich semantic content.
Lightweight fine-tuning technology is used to adjust the parameters of the large language model. By designing sophisticated data enhancement task instruction templates, high-quality user-item interaction data and item attributes are generated. Combined with low-rank adaptive fine-tuning technology, the large language model is optimized to generate data that meets the requirements of the recommendation system.
It significantly improves the performance of the recommendation system in data sparsity and cold start scenarios, generates data that is more in line with actual application needs, improves the relevance and efficiency of recommendation results, reduces computing costs and manual intervention, is applicable to multiple recommendation models, and enhances user experience.
Smart Images

Figure CN119988598B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of recommendation systems and fine-tuning large language models, and in particular to a recommendation data enhancement method based on fine-tuning a large language model. Background Art
[0002] Recommender systems have become a key component of modern digital platforms, playing an indispensable role in e-commerce, social media, online streaming, and other fields. With the rapid growth of data volumes and the increasing complexity of user needs, recommender systems face challenges such as data sparsity and cold start, which severely hinder improvement in recommendation performance. Traditional data augmentation methods include graph-based methods, negative sampling, and diffusion models. While these methods improve recommendation performance, they are limited by complexity and model expressiveness, particularly when dealing with complex contexts and multimodal data. Compared to traditional methods, large language models (LLMs), leveraging their powerful language understanding and generation capabilities, can generate rich user-item interaction data and attribute descriptions from minimal information. These methods typically use hint engineering and instruction design to guide large models in generating diverse interaction records and attribute information, enriching the training data for recommender systems. While fundamentally alleviating the data sparsity problem, large language models often generate rich semantic content but are often accompanied by challenges such as output uncertainty, instruction design complexity, and knowledge gaps in the recommendation domain. Summary of the Invention
[0003] To address the above shortcomings, the present invention proposes a recommendation data enhancement method based on fine-tuning a large language model. By enhancing user-item interaction, enriching item attributes, and generating high-quality item summaries, it effectively alleviates the data sparsity problem and improves the generalization ability and recommendation effect of the recommendation system.
[0004] To achieve the above objectives, the present invention provides the following technical solution: a recommendation data enhancement method based on fine-tuning a large language model, comprising the following steps:
[0005] S1: Focusing on the core tasks in the recommendation system of the recommendation model, combined with the user-item interaction characteristics and auxiliary information in the recommendation system scenario, determine the optimization objectives of the data enhancement task and design the instruction template for the corresponding data enhancement task;
[0006] S2: Use lightweight fine-tuning techniques to adjust the parameters of the large language model based on the content related to the data augmentation task to generate high-quality data that is highly aligned with the core task, thereby fine-tuning the large language model;
[0007] S3: Generate new user-item interaction data, supplementary item feature information, and enhanced data of project summaries by fine-tuning the large language model;
[0008] S4: Integrate the enhanced data with the original data of the recommendation model to optimize the training of the recommendation model.
[0009] As an improvement, the optimization objectives of the data augmentation task in step S1 include user-item interaction enhancement, item attribute completion, and item summary generation.
[0010] As an improvement, the instruction template in step S1 includes an instruction input module and an instruction output module. The instruction input module includes a task instruction module and a task input module, and the instruction output module includes a task output module. The task instruction module and the task input module describe the data augmentation task instructions in natural language to guide the large language model to generate data and output it through the task output module.
[0011] As an improvement, in step S2, the low-rank adaptation fine-tuning technique is adopted to only fine-tune the user-item interaction generation strategy, item attribute expansion ability, and item summary generation method to reduce the computational overhead and ensure the quality and consistency of the generated data.
[0012] As an improvement, the low-rank adaptation fine-tuning technique adopts multi-objective fine-tuning. A trainable parameter matrix is added to each layer of the Transformer structure in the pre-trained model of the recommendation model. Task alignment is achieved by jointly optimizing the supervised objective and the generation objective, including the following objectives:
[0013] The fine-tuning of the user-item interaction generation strategy fills in the sparse interaction information in the original data by generating new user-item interaction edges. The optimization objective is represented by the following formula:
[0014]
[0015] where x represents the input, y represents the output, Z represents the training set, y t represents the t-th token in the output, y<t represents all tokens before the t-th token, Φ is the original parameter of M, and Θ1 is the rank decomposition matrix parameter representing the new interaction generation;
[0016] The fine-tuning of the item attribute expansion ability makes the item attributes contain more descriptive information by expanding the features of the item. The optimization objective is represented by the following formula:
[0017]
[0018] where a t represents the attribute feature of the t-th token, and Θ2 is the rank decomposition matrix parameter for generating or expanding item attributes;
[0019] The fine-tuning of the item summary generation method generates a more representative summary for each item to facilitate more accurate recommendations. The optimization objective is represented by the following formula:
[0020]
[0021] where p t represents the summary of the tth token, Θ3 is the rank decomposition matrix parameter used to generate the item summary;
[0022] The final learning objective is calculated as:
[0023]
[0024] Among them, λ1, λ2, and λ3 are hyperparameters that balance the importance of each target.
[0025] As an improvement, in step S3, by fine-tuning the large language model, the user-item interaction data generated by inferring potential interests from the user's historical behavior is expanded to reflect the user's real interest distribution and behavior pattern, which is formalized as:
[0026]
[0027] in LLM according to the input prompt The obtained positive and negative interaction samples.
[0028] As an improvement, the item feature information supplemented in step S3 is generated based on the existing auxiliary information of the item, and additional descriptive features are generated. The generated features include a more detailed description. The item attribute enhancement is expressed as:
[0029]
[0030] Among them A i Represents the text attribute of the generated item i, text is the attribute refinement of item i.
[0031] As an improvement, the item summary in step S3 generates a high-quality natural language description for the item, outlining the content characteristics and main attributes of the item. The specific process is outlined as follows:
[0032]
[0033] Among them, P i Represents the generated text summary of item i.
[0034] As an improvement, in step S4, the enhanced data and the original data are integrated in a unified format to form a new training set, and adapted to the needs of different recommendation models so as to be seamlessly integrated into a variety of existing recommendation models to optimize the training of the recommendation models.
[0035] Compared with the prior art, the advantages of the present invention are:
[0036] (1) This paper fully utilizes the excellent capabilities of large language models in semantic understanding and high-quality data generation, and introduces them into the field of data enhancement for recommendation systems. With the powerful text generation and context analysis capabilities of large language models, it can generate richer, more diverse, and highly reliable user-item interaction data and auxiliary information, significantly improving the coverage and accuracy of recommendation data, thereby optimizing the performance of recommendation systems in data sparsity and cold start scenarios.
[0037] (2) The present invention designs sophisticated fine-tuning targets to align the large language model with the specific data augmentation tasks of the recommendation system. The fine-tuning process not only considers the unique needs of the recommendation system scenario, but also accurately optimizes tasks such as user behavior, preference inference, and item attribute expansion. The generated data is more in line with the needs of the actual application scenarios of the recommendation system and can better reflect user interests and item characteristics, thereby significantly improving the relevance and effectiveness of the recommendation results, enhancing user experience and recommendation satisfaction;
[0038] (3) The present invention designs customized fine-tuning instructions, which guide the large language model to generate target data through clear generation goals and multi-level task guidance. Compared with traditional manual rules and fixed template methods, this mechanism has higher flexibility and automation capabilities. By reducing manual intervention and development complexity, it not only significantly reduces labor costs but also improves the generation efficiency of data enhancement, enabling the recommendation system to quickly adapt to changing application scenarios and dynamic data requirements;
[0039] (4) The method proposed in this paper is not only applicable to a specific model, but also model-agnostic, that is, it can be seamlessly integrated into various existing recommendation models to enhance the performance of these models;
[0040] (5) The present invention ensures that the data generated by each task is more targeted and practical by clarifying the optimization goal, and designs a refined template to make the generation process more controllable and stable;
[0041] (6) During the training process, the present invention uses quantized low-rank adaptation to perform efficient parameter fine-tuning, thereby greatly reducing the number of trainable parameters and accelerating the training process;
[0042] (7) The present invention uses low-rank adaptive lightweight fine-tuning technology to adjust only a small number of model parameters to reduce computational overhead while ensuring the quality and consistency of the data generated by the model. The core idea of the low-rank adaptive lightweight fine-tuning technology is to decompose the changes in model parameters into a low-rank matrix form and only update the decomposition matrix to complete the fine-tuning of a specific task. This method avoids the direct adjustment of all model parameters, effectively reduces the amount of computation and storage requirements, and maintains the accuracy and consistency of data generation while reducing the computational cost, meeting the high-quality data requirements of the recommendation system. This method can be easily extended to different task requirements without large-scale changes to the model structure, thereby improving the overall applicability.
[0043] (8) By jointly optimizing multiple task objectives, the model's comprehensive adaptability to the requirements of recommendation system scenarios is improved. Through parameter sharing and multi-objective optimization, parameter redundancy during fine-tuning is reduced. While taking into account both performance and efficiency, the objective functions designed for different tasks make the generated data more in line with actual recommendation needs.
[0044] (9) By inferring potential interests and generating new interaction data, the scale of user-item interaction data is significantly expanded. The generated data is based on a fine-tuned large language model, which has higher semantic understanding ability and context consistency, thereby improving the quality of recommendations.
[0045] (10) By generating additional features, the feature dimension of items is significantly expanded, providing more comprehensive input information for the recommendation model. The generated feature description has strong semantic relevance and adaptability and can be widely used in different recommendation scenarios.
[0046] (11) By generating high-quality natural language summaries, the semantic expression ability of item information can be significantly improved, enabling the recommendation system to better understand the characteristics of the item. The summary can clearly and concisely summarize the core content of the item, making it easier for users to quickly understand the key information of the item.
[0047] (12) The newly generated supplementary features and project profiles are added to the original data according to the established fields without changing the basic organizational structure of the original data. For different recommendation scenarios, the ratio of original data to enhanced data is dynamically adjusted to better balance diversity and relevance during training. In the process of integrating data, the basic characteristics of the original data are retained to ensure that the enhanced data has a high degree of consistency with the original data after addition, so that the recommendation model can seamlessly adapt to the input after data enhancement. Through the model-agnostic design, there is no need to adjust the data format or characteristics separately for different recommendation algorithms, reducing the development workload and the cost of model migration. By adopting a dynamic adjustment strategy, the ratio of enhanced data can be flexibly configured according to actual needs, so that the recommendation system can better adapt to different data distributions and scenario requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments:
[0049] Figure 1 This is a brief flowchart of a recommendation data augmentation method based on fine-tuning a large language model;
[0050] Figure 2 A detailed flowchart of a recommendation data augmentation method based on fine-tuning a large language model;
[0051] Figure 3 Schematic diagram for lightweight fine-tuning of large language models;
[0052] Figure 4 Enhanced graphs for model-agnostic recommendations. DETAILED DESCRIPTION
[0053] like Figures 1 to 4 As shown in FIG, a recommendation data enhancement method based on fine-tuning a large language model includes the following steps:
[0054] S1: Determine the fine-tuning target:
[0055] Based on the actual application scenarios of the recommendation system, we analyze the interaction characteristics between users and items, users' historical behaviors (clicks, purchases, ratings, etc.), the changing patterns of users' interests (long-term and short-term interests), and the availability of auxiliary information (item descriptions, category tags, etc.). Based on the core tasks of the recommendation system, we determine the following optimization goals:
[0056] (1) User-item interaction enhancement: Generate new interaction records consistent with the user's historical behavior to enrich the user behavior sequence;
[0057] (2) Item attribute completion: Based on the existing item auxiliary information, more fine-grained descriptive features are added to enhance the expressiveness of item features;
[0058] (3) Project summary generation: Generate a high-quality natural language summary for the project, summarizing its main content and key attributes;
[0059] Build instruction templates for various data augmentation tasks, describe fine-tuning goals in natural language, and clearly guide the model to generate data;
[0060] Project summary generation instruction template:
[0061]
[0062] User-item interaction enhancement instruction template:
[0063]
[0064]
[0065] Item Attribute Completion Instruction Template:
[0066]
[0067] S2: Fine-tune the large language model:
[0068] The capabilities of the large language model are customized to meet the requirements of specific tasks. A lightweight adjustment strategy is adopted to achieve efficient multi-objective fine-tuning. The central premise of this strategy is that contemporary language models usually have a large number of parameters, but the information of these parameters may be concentrated in lower intrinsic dimensions. Therefore, by adjusting only a small part of the parameters, similar performance to fully fine-tuning the entire model can be achieved. A lightweight fine-tuning technique called LoRA is adopted on lamafactory. The core idea of the LoRA method is to freeze most of the parameters of the pre-trained model and only introduce trainable rank decomposition matrices in each layer of the Transformer architecture.
[0069] Specifically, task alignment is achieved through the following optimization of the following fine-tuning objectives:
[0070] User-Item Interaction Generation Strategy Fine-tuning fills in sparse interaction information in the original data by generating new user-item interaction edges. The optimization objective is represented by the following formula:
[0071]
[0072] where x represents the input, y represents the output, and Z represents the training set. y t represents the t-th token in the output, and y<t represents all tokens before the t-th token. Φ is the original parameter of M, and Θ1 is the parameter of the rank decomposition matrix used to generate new interactions;
[0073] Item Attribute Expansion Ability Fine-tuning: Expand the features of items to include more descriptive information. The optimization objective is represented by the following formula:
[0074]
[0075] where, a t represents the attribute feature of the t-th token, and Θ2 is the parameter of the rank decomposition matrix used to generate or expand item attributes;
[0076] Summary Generation Method Fine-tuning: Generate a more representative summary for each item to facilitate more accurate recommendations. The optimization objective is represented by the following formula:
[0077]
[0078] where, pt represents the summary of the tth token, Θ3 is the rank decomposition matrix parameter used to generate the item summary;
[0079] The final learning objective is calculated as:
[0080]
[0081] Among them, λ1, λ2, and λ3 are hyperparameters that balance the importance of each target;
[0082] S3: Generate augmented data:
[0083] In the face of the sparsity of interaction data, we use the fine-tuned LLM as a sampler to generate paired interaction training data from a natural language perspective. In this way, we can mine potential supervisory signals from the original data and integrate contextual knowledge (such as year, genre, etc.) into user-item interactions to help better understand user preferences and behaviors. This method is particularly suitable for users and items that lack sufficient historical interaction records, because the LLM has been aligned with the recommendation task through fine-tuning and can generate data that is more consistent with the actual interaction distribution. Specifically, we first select the items with which each user has interacted historically and combine them with the user's auxiliary information (such as browsing history, rating habits, etc.). Then, we introduce an item candidate pool Cu = {i3,i7,…,i n}, which contains items that have less than 10 interactions with all users in the original dataset. Since LLM cannot process all items directly, this candidate pool is selected to limit the input scale. Then, the user's historical interactions, auxiliary information, and item candidate pool are input into LLM. During the reasoning process of LLM, it randomly outputs pairs of items that users may like. or don't like The generated interaction data not only enriches the original sparse interaction matrix, but also better reflects the user's real interest distribution and behavior pattern. The process of enhancing user-item interaction is formalized as follows:
[0084]
[0085] in LLM according to the input prompt Positive and negative samples obtained from the candidate pool Cu;
[0086] Faced with the lack of textual information on item attributes in the original dataset, a method based on fine-tuning LLM is used to enrich item attribute information by leveraging its powerful generation capabilities. LLM has a huge knowledge base and can understand and generate diverse information related to items. Therefore, LLM can be guided to expand and supplement the missing or incomplete item attributes in the original dataset. Specifically, each item is first provided with auxiliary information (such as title, description, category, etc.) in the dataset as prompts. These prompts are input into the fine-tuned LLM, and the model generates additional item attributes based on these prompts. These generated attributes may include more detailed descriptions, additional category labels, related topics, and an overview of user reviews. This information does not exist or is incomplete in the original dataset. Formally, LLM-based item attribute enhancement is expressed as:
[0087]
[0088] A i Represents the text attribute of the generated item i, text prompt is the attribute refinement of item i;
[0089] A project summary is a comprehensive portrayal of the overall characteristics and attributes of a project. It not only describes the main content of the project, but also clarifies the specific types of users that the project is suitable for attracting, and showcases the project's characteristics and qualities that are consistent with the preferences and interests of these users. An accurate and detailed project summary can help the recommendation system better match users and projects, thereby providing more personalized and accurate recommendations. When constructing a project summary, how to generate high-quality summary information that is highly matched with user needs has always been a challenge. To this end, a method of fine-tuning the LLM is adopted to leverage its powerful capabilities in natural language generation to create more descriptive and attractive project summaries. Based on these research results, a simplified input prompt is designed and used as part of the LLM input to clearly define the LLM's function in generating project summaries. This prompt provides clear guidance for the LLM to ensure that the generated project summary can comprehensively and accurately reflect the main content and unique attributes of the project. The specific process is outlined as follows:
[0090]
[0091] P i The generated text summary of project i is represented by the input prompts. Specifically, the input prompts only require basic project information and the summary generation task requirements. The fine-tuned LLM is able to generate more complete and detailed project summaries based on these prompts.
[0092] S4: Model-agnostic enhancements:
[0093] This paper aims to improve the recommendation performance of the model by enhancing the interaction data and item text features in the original dataset. The proposed method is not only applicable to specific models, but also model-agnostic, that is, it can be seamlessly integrated into various existing recommendation models to enhance the performance of these models. Specifically, the method generates enhanced data through the fine-tuned LLM. This data includes richer user-item interaction records and expanded item text features. These enhanced data can provide additional training signals for any recommendation model using this dataset, helping the model to better capture user preferences and item characteristics, thereby making more accurate recommendations. The method is highly flexible for different types of recommendation models. For example, for recommendation models based on collaborative filtering, the model mainly relies on the interaction data between users and items, and does not directly utilize the text information of items. Therefore, in this case, the enhancement of item text features may not be necessary, and only the enhanced interaction data can be used. For recommendation models that require the use of text features (such as content-based recommendation models or hybrid models), the enhanced item text features can provide richer input and help the model understand the match between item content and user interests. In practical applications, this can be achieved through the following steps: First, use the enhancement process described above to generate a dataset including enhanced interaction data and text features. Then, combine this enhanced data with the original data and input it into an existing SOTA recommendation model for training.
[0094] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0095] The units described in some embodiments of the present disclosure may be implemented in software or hardware. The units described may also be provided in a processor, and the functions described above may be at least partially performed by one or more hardware logic components.
[0096] The above description is merely a description of the preferred embodiment of the present invention and is not to be construed as limiting the scope of the claims. The present invention is not limited to the above embodiment, and variations in the specific structure are permitted. Any variations within the scope of the independent claims of the present invention are also within the scope of protection of the present invention.
Claims
1. A recommendation data enhancement method based on fine-tuning a large language model, characterized in that: The following steps are involved: S1: For the core tasks in the recommendation system of the recommendation model, combined with the user-item interaction characteristics and auxiliary information in the recommendation system scenario, determine the optimization objectives of the data enhancement task and design the instruction template for the corresponding data enhancement task; S2: Use lightweight fine-tuning technology to adjust the parameters of the large language model based on the content related to the data augmentation task to generate high-quality data that is highly aligned with the core task, thereby fine-tuning the large language model; S3: Generate new user-item interaction data, supplementary item feature information, and enhanced data of project summaries through the fine-tuned large language model; S4: Integrating the enhanced data with the original data of the recommendation model to optimize the training of the recommendation model; In step S2, low-rank adaptive fine-tuning technology is used to fine-tune only the user-item interaction generation strategy, item attribute expansion capability, and project summary generation method to reduce computational overhead and ensure the quality and consistency of generated data. The low-rank adaptive fine-tuning technology uses multi-objective fine-tuning to add a trainable parameter matrix to each layer of the Transformer structure in the pre-trained model of the recommendation model. Task alignment is achieved by jointly optimizing the supervision objective and the generation objective, including the following objectives: The user-item interaction generation strategy is fine-tuned by generating new user-item interaction edges to fill the sparse interaction information in the original data. The optimization objective is expressed as follows: in Indicates input, Indicates output, represents the training set, Indicates the output tokens, No. All tokens before token, yes The original parameters, is the rank decomposition matrix parameter used to generate new interactions; Fine-tuning the item attribute expansion capability expands the item's features so that the item attributes contain more descriptive information. The optimization goal is expressed as the following formula: in Indicates the The attribute characteristics of a token, is the rank decomposition matrix parameter used to generate or expand item attributes; Fine-tuning the item summary generation method generates a more representative summary for each item to facilitate more accurate recommendations. The optimization objective is expressed as follows: in Indicates the Summary of tokens, are the rank decomposition matrix parameters used to generate the project summary; The final learning objective is calculated as: in 、 、 is a hyperparameter that balances the importance of each objective.
2. The method for enhancing recommendation data based on fine-tuning a large language model according to claim 1, characterized in that: The optimization objectives of the data enhancement task in step S1 include user-item interaction enhancement, item attribute completion, and project summary generation.
3. The method for enhancing recommendation data based on fine-tuning a large language model according to claim 2, characterized in that: The instruction template in step S1 includes an instruction input module and an instruction output module. The instruction input module includes a task instruction module and a task input module. The instruction output module includes a task output module. The task instruction module and the task input module enhance the task instructions through natural language description data to guide the large language model to generate data and output it through the task output module.
4. The method for enhancing recommendation data based on fine-tuning a large language model according to claim 1, characterized in that: In step S3, the user-item interaction data generated by fine-tuning the large language model and inferring potential interests from the user's historical behavior is expanded to reflect the user's real interest distribution and behavior pattern, which is formalized as: = = in , LLM according to the input prompt The obtained positive and negative interaction samples.
5. The method for enhancing recommendation data based on fine-tuning a large language model according to claim 1, characterized in that: The supplementary item feature information in step S3 is based on the existing auxiliary information of the item to generate additional descriptive features. The generated features include a more detailed description. The item attribute enhancement is represented as follows: = in Represents the generated project The text property of the text prompt It is a project Attribute refinement.
6. The method for enhancing recommendation data based on fine-tuning a large language model according to claim 1, characterized in that: The project summary in step S3 generates a high-quality natural language description of the project, outlining the content, characteristics and main attributes of the item. The specific process is summarized as follows: = in Represents the generated project A summary of the text.
7. The method for enhancing recommendation data based on fine-tuning a large language model according to claim 1, characterized in that: In step S4, the enhanced data and the original data are integrated in a unified format to form a new training set, and adapted to the requirements of different recommendation models so as to be seamlessly integrated into a variety of existing recommendation models to optimize the training of the recommendation models.
Citation Information
Patent Citations
Conversation recommendation system based on prompt learning method
CN115525744A
Network user two-stage recommendation method and device based on large language model optimization
CN118551100A