A recommendation system explanation method and device based on weighted association rule mining

By using a weighted association rule mining method, which considers user ratings and item frequency to generate association rules, we can provide flexible and generalized explanations for recommendation systems. This solves the problems of flexibility and monotonous explanation style in existing models, and improves user experience and the persuasiveness of recommendation systems.

CN117194975BActive Publication Date: 2025-12-16WUHAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311009773.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-10
Publication Date
2025-12-16
Estimated Expiration
2043-08-10

AI Technical Summary

Technical Problem

Existing recommendation explanation models lack flexibility and generalization, and association rule mining methods only consider the frequency of item occurrence while ignoring user ratings, resulting in a monotonous explanation style and poor user experience.

Method used

We employ a weighted association rule mining method to generate recommended items by training a latent factor recommendation model. We then use weighted transaction data mining to generate association rules, taking into account user ratings and item frequency, to provide users with topic-level and item-level explanations.

Benefits of technology

It improves the interpretability and persuasiveness of the explanation style of the recommendation system, enhances the user experience, and is applicable to different recommendation models without affecting the recommendation accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117194975B_ABST
    Figure CN117194975B_ABST
Patent Text Reader

Abstract

The application discloses a recommendation system explanation method and device based on weighted association rule mining, first, using the rating data of users to the items to train the latent factor recommendation model, based on the trained latent factor recommendation model, generating top-N recommended items for each user; then, the rating data of users to the items is preprocessed into weighted transaction data in the form of <T id ,{(I1,R1),…,(I x ,R x )}>; then, using the weighted transaction data as input, generating weighted association rules using the weighted association rule mining algorithm; finally, matching the recommended items of each user with the weighted association rules, generating personalized explanations for the users. The recommendation system explanation method based on the weighted association rule mining uses the weighted association rules to explain the recommended items, decouples the explanation mechanism from the recommendation model, generates explanations after the recommendation model provides the recommended items, can be applied to different latent factor recommendation models, and has the characteristics of flexibility and generality.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the field of computer science and interpretative modeling technology, and particularly relates to a recommendation system explanation method and device based on weighted association rule mining (WARM). BACKGROUND

[0002] With the development of 5G networks, the Internet is flooded with a vast amount of information, and people's dependence on recommendation systems is increasing, which puts higher requirements on the quality of recommendation systems. A high-quality recommendation system not only has high prediction accuracy, but also has good explainability. Explainability explains why these items are recommended, which can help users make the right decision and thus increase their confidence in the recommendation system.

[0003] Most existing recommendation explanation models consider the explainability of the recommendation model, and are coupled with the recommendation model, integrating the explanation mechanism into the recommendation model to generate explanations while providing recommended items. This method can directly explain the internal working mechanism of the recommendation model, but it is only applicable to specific recommendation models, lacking flexibility and generalizability.

[0004] In order to make the explanation model flexible and generalizable, some people have proposed post-hoc explanation methods, which separate the explanation mechanism from the recommendation model and generate explanations after the recommendation model provides recommendations. Although post-hoc explanation cannot directly explain the internal working mechanism of the recommendation model, it can still achieve the purpose of persuading users to accept recommendations. Post-hoc explanation methods can be applied to different recommendation models, and have the characteristics of flexibility and generalizability.

[0005] Ribeiro et al. proposed the Local Interpretable Model-agnostic Explanations (LIME) method to faithfully explain the predictions of any model in an interpretable way. Singh and Anand proposed a post-hoc explanation for learning-to-rank algorithms from the perspective of web search. Wang et al. proposed a model-agnostic reinforcement learning framework to explain any recommendation model. Cheng et al. conducted an impact analysis on interpretable recommendations on latent factor models and proposed a Fast Impact Analysis (FIA) explanation method. Peake and Wang proposed a post-hoc interpretability method for latent factor models of recommendation systems, which uses association rules to explain the recommendations provided by the latent factor model. The above methods do not change the latent factor model itself, so the accuracy of the recommendation can be maintained, avoiding the trade-off between accuracy and explainability. However, it still has the following shortcomings. First, the Apriori algorithm is used to mine association rules, and the generation of association rules only considers the frequency of item occurrence, discarding user ratings for items; second, it only focuses on association rules of size 2, and can only generate item-level explanations, which will result in a single explanation style and poor user experience. SUMMARY

[0006] To solve the above technical problems, the present application proposes a recommendation system explanation method and device based on weighted association rule mining, which uses weighted association rules to explain recommended items, decouples the explanation mechanism from the recommendation model, generates explanations after the recommendation model provides recommended items, and can be applied to different latent factor recommendation models.

[0007] The technical solution adopted by the method of the present application is: a recommendation system explanation method based on weighted association rule mining, comprising the following steps:

[0008] Step 1: Use user rating data for items to train a latent factor recommendation model, and generate top-N recommended items for each user based on the trained latent factor recommendation model; wherein top-N is a preset value;

[0009] Step 2: Preprocess the user rating data for items into weighted transaction data in the form of <T id , {(I1,R1),…,( I x ,R x )}>, wherein each transaction T id represents a user, I1~I x represents an item that has interacted with the user, and R1~ R x represents the user's rating for each item;

[0010] Step 3: Use a weighted association rule mining algorithm to generate weighted association rules with the weighted transaction data as input;

[0011] Step 4: Match each user's recommended items with the weighted association rules to generate personalized explanations for the user.

[0012] As a preferred embodiment, the specific implementation of step 1 includes the following sub-steps:

[0013] Step 1.1: Divide the user rating data into a training set and a test set;

[0014] Step 1.2: Select a latent factor recommendation model and confirm the hyperparameters;

[0015] Step 1.3: Train the latent factor recommendation model using the training data and hyperparameters;

[0016] Step 1.4: Evaluate the performance of the latent factor recommendation model using the test data;

[0017] Step 1.5: Use the trained latent factor recommendation model to generate top-N recommended items for the user.

[0018] As a preferred embodiment, in step 2, the user rating data for items is obtained in the form of <U n ,In ,R n >, wherein U n represents a user column, U n I n represents an item column, R n represents a rating column, each row of data is traversed in the form of <T id , {(I1,R1),…,(I x ,R x )}>, and preprocessed into weighted transaction data.

[0019] As preferred, the specific implementation of step 3 includes the following sub-steps:

[0020] Step 3.1: Calculate the item weight w( w ) in the weighted transaction T is , and generate a weighted 1-candidate set C1;

[0021] (1)

[0022] wherein, is j represents the i-th item in the item set, c( j ) represents the number of times an item appears in a transaction; when the size of the item set is 1, the item weight w( i ) is a special item set weight w(is), and c( i ) is a special c(is); i

[0023] Step 3.2: Calculate the weighted support , and screen the weighted 1-frequent item set F1 from the weighted 1-candidate item set C1;

[0024] (2)

[0025] (3)

[0026] wherein, P f is the frequency ratio, P w is the weight ratio, P f and P w the sum of which is equal to 1; is the frequency of the item set appearing in a transaction; is a threshold value for distinguishing whether an item is praised by a user or not, referred to as an optimal threshold value; transaction is a weighted transaction;

[0027] ​The frequent item set is an item set with a weighted support degree not less than a predefined minimum weighted support degree;

[0028] Step 3.3: based on Generating a weighted k-candidate item set C k Where T needs to be scanned w The item set weight is calculated according to formula (1), and the occurrence number of the item set is calculated;

[0029] Step 3.4: calculating the weighted support degree according to formula (2) and formula (3) from the weighted k-candidate item set C k Generating a weighted k-frequent item set F k ,

[0030] Step 3.5: using the weighted frequent item sets F2, F3, …, F k Generating a weighted association rule.

[0031] As preferred, in step 4, for each recommended item of a user, a rule is retrieved from the association rule set, which can explain to the user why the item is recommended; if the size of the antecedent of the rule is greater than 1, a topic-level explanation is generated for the user, and if the size of the antecedent of the rule is equal to 1, an item-level explanation is generated for the user; wherein the user has interacted with all the items in the antecedent of the rule and has not interacted with the items in the consequent of the rule.

[0032] The technical scheme adopted by the equipment of the present application is: a recommendation system explanation equipment based on weighted association rule mining, comprising:

[0033] One or more processors;

[0034] A storage device for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the recommendation system explanation method based on weighted association rule mining.

[0035] The recommendation system explanation tool of the weighted association rule mining (WARM) proposed by the present application belongs to a kind of post hoc explanation method, which can be applied to different potential factor recommendation models, has the characteristics of flexibility and generalization, and the beneficial effects are: first, the WARM algorithm improved on the basis of Apriori algorithm is used to mine association rules in the present application. In the WARM algorithm, the present application not only considers the frequency of occurrence of items, but also considers the rating of users to items, so that more effective association rules can be generated, and the explainability of using association rules to explain recommendation is improved. Second, the present application also generates association rules with a size greater than 2 to explain recommended items, converts the explanation style from the item level to the topic level, enhances the persuasiveness of using association rules to explain recommendation, and enriches the explanation style of the recommendation system. Attached Figure Description

[0036] The technical solutions described herein are further illustrated below using examples and specific implementation methods. Additionally, accompanying drawings are used in the description of the technical solutions. Those skilled in the art can, without any creative effort, obtain other drawings and the intent of the present invention based on these drawings.

[0037] Figure 1 This is a flowchart of a method according to an embodiment of the present invention.

[0038] Figure 2 This is a schematic diagram of the method in an embodiment of the present invention. Detailed Implementation

[0039] To facilitate understanding and implementation of the present invention by those skilled in the art, the present invention will be further described in detail below. It should be understood that the embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0040] Please see Figure 1 and Figure 2 This invention provides a method for interpreting recommendation systems based on weighted association rule mining, comprising the following steps:

[0041] Step 1: Use user rating data for items to train a latent factor recommendation model. Based on the trained latent factor recommendation model, generate top-N recommended items for each user; where top-N is a preset value.

[0042] In one implementation, step 1 specifically includes the following sub-steps:

[0043] Step 1.1: Divide the user rating data into a training set and a test set;

[0044] Step 1.2: Select a latent factor recommendation model, such as MF, CTR, NeuMF, etc., and confirm the hyperparameters;

[0045] Step 1.3: Train the latent factor recommendation model using training data and hyperparameters;

[0046] Step 1.4: Evaluate the performance of the latent factor recommendation model using test data;

[0047] Step 1.5: Use the trained latent factor recommendation model to generate top-N recommendations for the user.

[0048] Step 2: Calculate user ratings for items using... <T id , {(I1,R1),…,( I x ,R xpreprocessed into weighted transaction data in the form of <T id represents a user, I1~I x represents items that the user has interacted with, R1~ R x represents the user's rating for each item;

[0049] In one embodiment, the rating data of a user for an item <U n ,I n ,R n > is obtained, where U n represents a user column, I n represents an item column, and R n represents a rating column. Each row of data is traversed to preprocess into weighted transaction data in the form of <T id , {(I1,R1),…,(I x ,R x )}>.

[0050] Step 3: Using the weighted association rule mining algorithm to generate weighted association rules with the weighted transaction data as input;

[0051] The item weight represents the user's preference for the item and is defined as w(i). For example, in the movie scenario, the item weight can be the average rating of the user for the movie. In the process of mining association rules, the present application needs to calculate the frequency of occurrence of the item set in the transaction. The present application also needs to calculate the weight of the item set in the transaction, referred to as the item set weight, defined as w(is). The method of calculating the item set weight is to calculate the weighted weight of each item in the item set:

[0052] (1)

[0053] where is j j represents the jth item in the item set, and c(i) represents the number of times an item appears in a transaction. When the size of the item set is 1, the item weight w(i) is a special item set weight w(is). Similarly, c(i) is a special c(is).

[0054] For example, there is an item set (A, B) here. w(A) is 4, and w(B) is 3. The number of times item A appears in a transaction is 20 times, and the number of times item B appears is 30 times. According to the calculation defined above, w(A, B) = 4 * 20 / (20+30) + 3 * 30 / (20+30) = 3.4 can be calculated.

[0055] The present application also defines the weighted support:

[0056] (2)

[0057] (3)

[0058] wherein, P f is the frequency ratio, P w is the weight ratio, P f and P w the sum is equal to 1; is the frequency of the item set appearing in the transaction; is the threshold for distinguishing whether the item is praised by the user, called the optimal threshold; transaction is the weighted transaction.

[0059] In order to combine the weight with the frequency of the appearance of the item to mine the association rules, the present application defines an item set as a frequent item set if its weighted support is not less than a predefined minimum weighted support.

[0060] In an embodiment, the specific implementation of step 3 includes the following sub-steps:

[0061] Step 3.1: Calculate the item weight w( is ) in the weighted transaction T w , and generate the weighted 1-candidate item set C1;

[0062] Step 3.2: Calculate the weighted support , filter out the weighted 1-frequent item set F1 from the weighted 1-candidate item set C1;

[0063] Step 3.3: Based on generate the weighted k-candidate item set C k , wherein T w needs to be scanned, the weight of the item set is calculated according to formula (1), and the number of appearances of the item set is calculated;

[0064] Step 3.4: Calculate the weighted support according to formula (2) and formula (3), and generate the weighted k-frequent item set F k from the weighted k-candidate item set C k ,

[0065] Step 3.5: Use the weighted frequent item sets F2, F3, …, F k to generate the weighted association rules.

[0066] Step 4: Match the recommended items of each user with the weighted association rules to generate personalized explanations for the user.

[0067] In an implementation, for each recommended item of a user, a rule is retrieved from the association rule set, which can explain to the user why the item is recommended; if the antecedent size of the rule is greater than 1, a topic-level explanation can be generated for the user, and if the antecedent size of the rule is equal to 1, an item-level explanation can be generated for the user; wherein the user has interacted with the items in the antecedent of the rule and has not interacted with the items in the consequent of the rule.

[0068] In summary, the recommendation system explanation tool based on weighted association rule mining provided by the present application uses weighted association rules to explain recommended items, decouples the explanation mechanism from the recommendation model, generates explanations after the recommendation model provides recommended items, can be applied to different potential factor recommendation models, and has the characteristics of flexibility and generality.

[0069] It should be understood that the above description of the case is relatively detailed, and therefore should not be considered as a limitation on the scope of patent protection of the present application. Those skilled in the art can make substitutions or modifications without departing from the scope of protection of the claims of the present application, and all fall within the scope of protection of the present application. The scope of protection of the present application shall be subject to the appended claims.

Claims

1.A method for interpreting a recommendation system based on weighted association rule mining, characterized in that, The method comprises the following steps: Step 1: training a latent factor recommendation model using user rating data of items, and generating top-N recommended items for each user based on the trained latent factor recommendation model; wherein top-N is a preset value; Step 2: Preprocess the user-item rating data into weighted transaction data in the form of <T id , {(I1,R1 ),…,( I x ,R x )}> where each transaction T id represents a user, I1~I x represents the items that the user has interacted with, and R1~ R x represents the rating of each item by the user. Step 3: using the weighted association rule mining algorithm to generate weighted association rules by taking the weighted transaction data as input; The specific implementation comprises the following sub-steps: Step 3.1: Compute the item weights w(is) in the transactions T and generate the weighted 1-candidate set C1. w Step 3.2: Compute the item weights w(is) in the transactions T and generate the weighted 1-candidate set C1. (1) in, is j Indicates the first item in the project set j Project, c( i The item weight w represents the number of times an item appears in a transaction; when the size of the item set is 1, the item weight w( i ) is a special item set weight w(is), c( i ) is a special c(is); Step 3.2: Calculate the weighted support From the weighted 1-candidate item set C1, filter out the weighted 1-frequent item set F1; (2) (3) wherein, P f is a frequency ratio, P w is a weight ratio, P f and P w the sum of which equals 1; is the frequency of the item set appearing in the transaction; is a threshold value for distinguishing whether the item is praised by the user or not, referred to as a good threshold value; transaction is a weighted transaction; The frequent item set is an item set with a weighted support degree not less than a predefined minimum weighted support degree; Step 3.3: Based on Generating a weighted k-candidate item set C k Where T needs to be scanned w Calculate the item set weight according to formula (1), and calculate the occurrence times of the item set; Step 3.4: Calculate the weighted support from the weighted k-candidate item set C k Generate the weighted k-frequent item set F k , Step 3.5: Using the weighted frequent itemsets F2, F3,..., F k Generating weighted association rules; Step 4: matching each user's recommended item with the weighted association rules to generate personalized explanations for the user. 2.The recommendation system explanation method based on weighted association rule mining of claim 1, wherein, The specific implementation of step 1 comprises the following sub-steps: Step 1.1: dividing the user rating data into a training set and a test set; Step 1.2: selecting a latent factor recommendation model and confirming hyperparameters; Step 1.3: training the latent factor recommendation model using the training data and the hyperparameters; Step 1.4: evaluating the performance of the latent factor recommendation model using the test data; Step 1.5: generating top-N recommended items for the user using the trained latent factor recommendation model. 3.The recommendation system explanation method based on weighted association rule mining of claim 1, wherein: In step 2, the user's rating data <U n is obtained n , n where U n represents a user column, I n represents an item column, and R n represents a rating column. Each row of data is traversed and preprocessed into weighted transaction data in the form of <T id , {(I1,R1 ),…,(I x ,R x )}>. 4.The recommendation system explanation method based on weighted association rule mining according to any one of claims 1-3, characterized in that: In step 4, for each recommended item of a user, a rule is retrieved from the association rule set that can explain to the user why this item is recommended; if the size of the rule antecedent is greater than 1, a theme-level explanation is generated for the user, and if the size of the rule antecedent is equal to 1, an item-level explanation is generated for the user; wherein the user has interacted with the items in the rule antecedent and has not interacted with the items in the rule consequent. 5.A recommendation system explanation device based on weighted association rule mining, characterized by, Comprise: One or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the recommendation system explanation method based on weighted association rule mining according to any one of claims 1 to 4.