Article aspect-level preference decoupling recommendation method based on big language model enhancement
Through technologies such as large language model and GCN, aspect-level preferences and intention signals in user comments are extracted, and the problems of mixed intentions and poor interpretability in traditional recommendation methods are solved, achieving more accurate and interpretable recommendation effects.
Patent Information
- Application Number
- CN202411427978.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2044-10-14
AI Technical Summary
Traditional recommendation methods tend to mix multiple intentions when using user comments, resulting in reduced recommendation accuracy and lack of interpretability. The "black box" nature of deep learning models makes user preferences difficult to understand.
Using the item aspect-level preference decoupling recommendation method enhanced based on large language model, the user intention weight is adaptively learned through GCN and attention mechanism, and the aspect-level preference and intention signals are extracted from comments, and the item recommendation network is constructed to improve recommendation accuracy and Interpretability.
Effective use of comment information improves the accuracy and interpretability of recommendations, overcomes the problems of confounding intentions and poor interpretability of traditional methods, and enhances the fine-grained semantic understanding of user behavior.
Smart Images

Figure CN119226625A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of recommendation enhanced by a large language model, and involves technologies such as deep learning models and attention mechanisms. Specifically, the present invention is an item aspect-level preference decoupling recommendation method based on a large language model enhancement. Background Art
[0002] Traditional recommendation methods use user profiles, item attributes, and user-item historical interaction information to learn the feature representation of users and items. Among them, content-based recommendation methods only use information such as item content features, combined with user interaction behavior and profiles for recommendation. It recommends items with similar content to target users by calculating the similarity between feature vectors. Its data processing is cumbersome, data utilization is single, and it fails to fully explore the characteristics of users and items. Most collaborative filtering methods only use user-item historical interaction data to learn the feature representation of users and items. They rely too much on collaborative signals, are prone to overfitting, and lack good interpretability.
[0003] In order to overcome the above limitations, the recommendation system introduces auxiliary information (such as user social information, geographic location information, etc.) to further enrich the feature representation of users and items. At present, with the rise of e-commerce websites, social media platforms, etc., the frequency of users' online consumption behavior is getting higher and higher, and the scope is getting wider and wider. At the same time, after the user completes the consumption, some users will give corresponding comments and ratings based on their own experience. The rating data is highly sparse, and the evaluation text often contains a lot of preference information of the corresponding user. Therefore, comments can be used to make recommendations for users. The recommendation method based on comments assists prediction by introducing comment text information. The usual practice is to represent the comment text into a vector and integrate it into the deep learning model. There are two key challenges in this process: first, the comment text contains multiple intentions of the user, and the above processing method mixes multiple intentions of the user together and easily introduces noise. Indiscriminate integration of user intentions may weaken the accuracy of the recommendation; second, the interpretability of recommendations using deep learning models is poor, especially in revealing the recommendation logic and understanding the specific preferences of users. Therefore, developing a recommendation algorithm that can effectively utilize comment information and has good interpretability has become one of the important directions of current research. Summary of the invention
[0004] The present invention aims to address the deficiencies of the above-mentioned prior art and proposes an item aspect-level preference decoupling recommendation method based on a large language model enhancement, in order to utilize the powerful text understanding and reasoning capabilities of the large language model to extract aspect-level preferences and intention signals from user comments, and adaptively learn intention weights with the help of the attention mechanism, so as to well explain the user's true intention in selecting items, and ultimately greatly enhance the interpretability while improving the accuracy of recommendations, thus overcoming the "black box" problem of traditional deep learning models.
[0005] In order to achieve the above-mentioned purpose, the present invention adopts the following technical scheme:
[0006] The invention provides an item aspect-level preference decoupling recommendation method based on large language model enhancement, which is characterized by being performed in the following steps:
[0007] Step 1: Get the user's rating and comment data on the item and get the user set and item sets ,in, Indicates Users, Indicates the number of users; Indicates items, Indicates the quantity of items;
[0008] Constructing the User-Item Interaction Matrix ,in, express and The interaction records between right When the score is 5, , otherwise, let ;
[0009] Set up comment set ,in, express of reviews, and , express right Comments;
[0010] Step 2: Collect the comments Input Large Language Model In order to obtain the sub-aspect preference set and category user intent set ;
[0011] Step 3: Based on and GCN, learning In the Aggregate embedding under categories of user intent as well as In the Aggregate embedding under categories of user intent ;
[0012] Step 4: Based on the attention mechanism, use formula (8) to obtain right In the Weights of user intent under different categories :
[0013] (8)
[0014] In formula (8), Indicates a connection operation. represents the activation function, represents the Sigmoid function, and Represents 2 different weights, and Represents 2 different bias terms;
[0015] Step 5: Based on the prediction layer, use formula (9) to obtain right The final prediction score :
[0016] (9)
[0017] Step 6: Use formula (10) to establish the loss function of the item recommendation network composed of GCN, attention mechanism, and prediction layer ;
[0018] (10)
[0019] In formula (10), express right The real score; represents the log-likelihood function; represents the regularization term, where represents the regularization weight, Represents the parameters of the item recommendation network;
[0020] Step 7: Use the mini-batch Adam optimization algorithm to optimize the item recommendation network and calculate the loss function To update the network parameters until convergence, so as to obtain the item recommendation model with the optimal parameters, which is used to Select the top ranked items from the list of candidate items Items as Recommended list.
[0021] The method for decoupling item-level preference recommendation based on large language model enhancement described in the present invention is also characterized in that step 2 is performed as follows:
[0022] Step 2.1: Input Large Language Model And use formula (1) to get the aspect preference set :
[0023] (1)
[0024] In formula (1), express aspect preference set, and , Indicated in Frequency of mentions of aspect preferences Down right aspect preferences; , Frequency sets representing preferences for various aspects; The total number of aspect preferences expressed; The semantic extraction prompt words representing the settings;
[0025] Step 2.2, follow ,right The aspect preferences in the Preference as Sub-aspect preference sets , thus obtaining the sub-aspect preference set ,and , express The extracted Preferences in each aspect, and , express Middle Preference in each aspect;
[0026] Step 2.3: Based on the review set and sub-aspect preference sets , using formula (2) to get the user intention set :
[0027] (2)
[0028] In formula (3), Indicates the intention reasoning prompt words of the setting;
[0029] Step 2.4: Based on the user intent set , all users with the same user intentions are grouped together to form a category user intention set , After the convergence There are a set of user intentions of categories, .
[0030] Further, the step 3 is performed as follows:
[0031] Step 3.1: According to , using formula (3) to decouple the user-item interaction matrix , get the sub-intention interaction matrix :
[0032] (3)
[0033] In formula (3), Indicates Sub-intention interaction matrix of user intent categories; represents a mapping function; express and The interaction is mapped to Interaction intensity under the category of user intention;
[0034] Step 3.2, Initialization In the The first category of user intent Layer Embedding and In the The first category of user intent Layer Embedding , thus obtaining No. Layer Embedding and No. Layer Embedding , represents the embedding dimension;
[0035] Step 3.3: Input into GCN for graph convolution operation, and use formula (5) to get In the The first category of user intent Layer Embedding and In the The first category of user intent Layer Embedding :
[0036] (5)
[0037] In formula (5), Indicated in Category user intent and Interactive item sets, Indicated in Category user intent and The set of users that interact;
[0038] Step 3.4: Use formula (6) to get In the Aggregate embedding under categories of user intent and In the Aggregate embedding under categories of user intent :
[0039] (6)
[0040] In formula (6), Indicates the total number of layers of GCN;
[0041] Step 3.5: Use formula (7) to get right In the Prediction scores for user intent of different categories :
[0042] (7)
[0043] In formula (7), Indicates transpose.
[0044] An electronic device of the present invention includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the item aspect-level preference decoupling recommendation method, and the processor is configured to execute the program stored in the memory.
[0045] The present invention provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and the computer program, when executed by a processor, executes the steps of the item aspect-level preference decoupling recommendation method.
[0046] Compared with the prior art, the present invention has the following beneficial effects:
[0047] 1. The present invention utilizes prompt learning and designs two prompts for the large language model. On the one hand, it learns richer semantic relationships in the context and filters the impact of noise on the recommendation effect. On the other hand, it extracts key information of the text and avoids the complex processing of long texts by the recommendation model, thus reducing the training difficulty of the recommendation model.
[0048] 2. The present invention utilizes the powerful natural language understanding ability and excellent knowledge reasoning ability of the large language model to extract aspect-level preferences from the user's review information on the item, and then extract the user's intention, achieving fine-grained semantic understanding of user interaction behavior, thereby obtaining high-quality semantic features, thereby improving the accuracy and reliability of downstream recommendation tasks.
[0049] 3. In the process of using GCN to learn the interactive behavior patterns of users under multiple intentions, the present invention uses the attention mechanism to adaptively fuse the prediction scores of different intentions, thereby obtaining the comprehensive prediction scores of multiple intentions and then obtaining the recommendation list. The multi-intent adaptive fusion mechanism helps the model learn the real behavioral intentions of users, greatly improving the interpretability of the recommendation model. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 This is a framework diagram of the item aspect-level preference decoupling recommendation method enhanced by a large language model according to the present invention. DETAILED DESCRIPTION
[0051] In this embodiment, a method for decoupling item aspect-level preference recommendation based on large language model enhancement is used. Restaurant recommendation is used as a specific scenario, and a dataset of user and restaurant ratings and reviews is used. Two prompts are designed for the large language model to extract fine-grained semantic aspect-level preferences about restaurants from user review information on restaurants, and then extract user intent. GCN is used to learn the embedding of users and restaurants under each intent, and the weighted embedding of users and restaurants is obtained through the attention mechanism. The preference prediction score is calculated and the top one is sorted in descending order. Recommend restaurants to users. Figure 1 As shown, please follow the steps below:
[0052] Step 1: Get the user's rating and review data for the restaurant and get the user set and restaurant set ,in, Indicates Users, Indicates the number of users; Indicates restaurants, Indicates the number of restaurants;
[0053] Building a User-Restaurant Interaction Matrix ,in, express and The interaction records between right When the score is 5, , otherwise let , filter the review data with a score of 4 or below, and ensure the data quality while streamlining the data volume;
[0054] Set up comment set ,in, express of reviews, and , express right 's comments.
[0055] Step 2: Collect the comments Input Large Language Model In order to obtain the sub-aspect preference set and category user intent set ;
[0056] Step 2.1: Input Large Language Model And use formula (1) to get the aspect preference set :
[0057] (1)
[0058] In formula (1), express aspect preference set, and , Indicated in Frequency of mentions of aspect preferences Down right aspect preferences; , Frequency sets representing preferences for various aspects; The total number of aspect preferences expressed; Indicates the semantic extraction prompt words set, the specific content is "Suppose you are a text understander now. A customer dined in a restaurant and made a comment. The comment content is <review>. Please describe and explain which aspects of the restaurant the customer evaluated based on the review content. The output format is 'Aspect 1: Explanation 1[, [Explanation 2], ...][; Aspect 2: Explanation 1[, [Explanation 2], ...]; ...]', '[]' means the content is optional".
[0059] Step 2.2, follow ,right The aspect preferences in the Preference as Sub-aspect preference sets , thus obtaining the sub-aspect preference set ,and , express The extracted Preferences in each aspect, and , express Middle Preference in each aspect;
[0060] Step 2.3: Based on the review set and sub-aspect preference sets , using formula (2) to get the user intention set :
[0061] (2)
[0062] In formula (3), Indicates the set intention reasoning prompt word, the specific content is "Suppose you are an intention reasoner. A customer dined in a restaurant and made a comment. The comment content is <review>, the customer's dining preference is <preference>. Based on the following predefined categories, combined with the customer's comments and dining preferences, the customer's dining intention is inferred and the category number is output. The predefined categories are: 1. Atmosphere and environment: enjoy a pleasant and unique dining environment, including ambience, decoration and seating arrangement; 2. Food and beverage quality: appreciate high-quality food, raw materials and presentation, as well as unique and authentic flavors; 3. Service and hospitality: experience excellent service, attention and interaction with staff, including their expertise and friendly attitude; 4. Value and affordability: enjoy the value for money experience, including price, portion size and food quality; 5. Convenience and accessibility: appreciate convenient parking, take-out options, online ordering and easy access to restaurants."
[0063] Step 2.4: Based on the user intent set , all users with the same user intentions are grouped together to form a category user intention set , After the convergence There are a set of user intentions of categories, ;
[0064] Step 3: Based on GCN, learn In the Aggregate embedding under categories of user intent as well as In the Aggregate embedding under categories of user intent ;
[0065] Step 3.1: According to , using formula (3) to decouple the user-item interaction matrix , get the sub-intention interaction matrix :
[0066] (3)
[0067] In formula (3), Indicates Sub-intention interaction matrix of user intent categories; represents a mapping function; express and The interaction is mapped to The interaction intensity under different categories of user intentions.
[0068] Step 3.2: Set the number of GCN network layers , assuming that GCN is updated to layer and initialize , and then use formula (4) to get No. Layer Embedding and No. Layer Embedding , Represents the embedding dimension, set to 256:
[0069] (4)
[0070] In formula (4), Respectively In the The first category of user intent Layer embedding and In the The first category of user intent Layer embedding.
[0071] Step 3.3: Input into GCN for graph convolution operation, based on , using formula (5) for message passing, we get In the The first category of user intent Layer Embedding and In the The first category of user intent Layer Embedding :
[0072] (5)
[0073] In formula (5), Indicated in Category user intent and Interactive item sets, Indicated in Category user intent and The set of users that interacted.
[0074] Step 3.4: After three layers of graph convolution, we can use formula (6) to get In the Aggregate embedding under categories of user intent and In the Aggregate embedding under categories of user intent :
[0075] (6)
[0076] Step 3.5: Use formula (7) to get right In the Prediction scores for user intent of different categories :
[0077] (7)
[0078] In formula (7), Indicates transpose.
[0079] Step 4: Based on the attention mechanism, use formula (8) to obtain right In the Weights of user intent under different categories :
[0080] (8)
[0081] In formula (8), Indicates a connection operation. represents the activation function, represents the Sigmoid function, and Represents 2 different weights, and Represents 2 different bias terms.
[0082] Step 5: Based on the prediction layer, weighted fusion is performed on the prediction scores of different types of user intentions, and formula (9) is used to obtain right The final prediction score :
[0083] (9)
[0084] Step 6: Use formula (10) to construct the loss function of the restaurant recommendation network composed of GCN, attention mechanism, and prediction layer. ;
[0085] (10)
[0086] In formula (10), express right The real score; represents the log-likelihood function; the cross entropy loss function is used as the target loss function, and the probability distribution predicted by the model is made as close as possible to the probability distribution of the true label by minimizing the cross entropy loss function; represents the regularization term, which is used to prevent overfitting and avoid the degradation of generalization performance due to the overly complex model. represents the regularization weight, represents the model parameters;
[0087] Step 7: Use the mini-batch Adam optimization algorithm to optimize the restaurant recommendation network and calculate the loss function To update the network parameters until convergence, the restaurant recommendation model with optimal parameters is obtained. Select the top-ranked restaurants from the candidate list Restaurants as Recommended list.
[0088] In this embodiment, an electronic device includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the above method, and the processor is configured to execute the program stored in the memory.
[0089] In this embodiment, a computer-readable storage medium stores a computer program on the computer-readable storage medium, and the computer program executes the steps of the above method when executed by a processor.< / preference> < / review> < / review>
Claims
1. A method for decoupling item-level preference recommendation based on large language model enhancement, characterized in that: The steps are as follows: Step 1: Get the user's rating and comment data on the item and get the user set and item sets ,in, Indicates Users, Indicates the number of users; Indicates items, Indicates the quantity of items; Constructing the User-Item Interaction Matrix ,in, express and The interaction records between right When the score is 5, , otherwise, let ; Set up comment set ,in, express of reviews, and , express right Comments; Step 2: Collect the comments Input Large Language Model In order to obtain the sub-aspect preference set and category user intent set ; Step 3: Based on and GCN, learning In the Aggregate embedding under categories of user intent as well as In the Aggregate embedding under categories of user intent ; Step 4: Based on the attention mechanism, use formula (8) to obtain right In the Weights of user intent under categories : (8) In formula (8), Indicates a connection operation. represents the activation function, represents the Sigmoid function, and Represents 2 different weights, and Represents 2 different bias terms; Step 5: Based on the prediction layer, use formula (9) to obtain right The final prediction score : (9) Step 6: Use formula (10) to establish the loss function of the item recommendation network composed of GCN, attention mechanism, and prediction layer ; (10) In formula (10), express right The real score; represents the log-likelihood function; represents the regularization term, where represents the regularization weight, Represents the parameters of the item recommendation network; Step 7: Use the mini-batch Adam optimization algorithm to optimize the item recommendation network and calculate the loss function To update the network parameters until convergence, so as to obtain the item recommendation model with the optimal parameters, which is used to Select the top ranked items from the list of candidate items Items as Recommended list.
2. The item aspect-level preference decoupling recommendation method based on large language model enhancement according to claim 1 is characterized in that: Described step 2 is carried out as follows: Step 2.1: Input Large Language Model And use formula (1) to get the aspect preference set : (1) In formula (1), express aspect preference set, and , Indicated in Frequency of mentions of aspect preferences Down right aspect preferences; , Frequency sets representing preferences for various aspects; The total number of aspect preferences expressed; The semantic extraction prompt words representing the settings; Step 2.2, follow ,right The aspect preferences in the Preference as Sub-aspect preference sets , thus obtaining the sub-aspect preference set ,and , express The extracted Preferences in each aspect, and , express Middle Preference in each aspect; Step 2.3: Based on the review set and sub-aspect preference sets , using formula (2) to get the user intention set : (2) In formula (3), Indicates the intention reasoning prompt words of the setting; Step 2.4: Based on the user intent set , all users with the same user intentions are grouped together to form a category user intention set , After the convergence There are a set of user intentions of categories, .
3. The item aspect-level preference decoupling recommendation method based on large language model enhancement according to claim 2 is characterized in that: The step 3 is carried out as follows: Step 3.1: According to , using formula (3) to decouple the user-item interaction matrix , get the sub-intention interaction matrix : (3) In formula (3), Indicates Sub-intention interaction matrix of user intent categories; represents a mapping function; express and The interaction is mapped to Interaction intensity under the category of user intention; Step 3.2, Initialization In the The first category of user intent Layer Embedding and In the The first category of user intent Layer Embedding , thus obtaining No. Layer Embedding and No. Layer Embedding , represents the embedding dimension; Step 3.3: Input into GCN for graph convolution operation, and use formula (5) to get In the The first category of user intent Layer Embedding and In the The first category of user intent Layer Embedding : (5) In formula (5), Indicated in Category user intent and Interactive item sets, Indicated in Category user intent and The set of users that interact; Step 3.4: Use formula (6) to get In the Aggregate embedding under categories of user intent and In the Aggregate embedding under categories of user intent : (6) In formula (6), Indicates the total number of layers of GCN; Step 3.5: Use formula (7) to get right In the Prediction scores for user intent of different categories : (7) In formula (7), Indicates transpose.
4. An electronic device, comprising a memory and a processor, characterized in that: The memory is used to store a program that supports the processor to execute the item aspect-level preference decoupling recommendation method as described in any one of claims 1 to 3, and the processor is configured to execute the program stored in the memory.
5. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the item aspect-level preference decoupling recommendation method described in any one of claims 1 to 3 are executed.
Citation Information
Patent Citations
Two-stage score recommendation method based on prompt learning
CN118246506A
Commodity electronic coupon recommendation method and system, e-commerce platform, equipment and medium
CN118350869A
Automatic decoupling sequence recommendation method based on large language model
CN118410244A
KR20230153883A
Cited By
E-commerce recommendation method for extracting consumption behavior characteristics based on large language model
CN119887340A
Image enhancement method based on LLM low-cost interaction
CN120067437A
Multi-stage content quality evaluation method and system based on large language model
CN120448618A
