Social network knowledge perception recommendation method, program and system based on anti-factual reasoning, and storage medium
Through the combination of counterfactual reasoning and graph neural network, the false correlation and data sparse problems in the recommendation system are solved, and more accurate and personalized recommendation results are achieved, balancing the recommendation of homogeneous and diversified content.
Patent Information
- Application Number
- CN202411301425.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-04-26
- Filing Date
- 2024-09-18
- Publication Date
- 2025-01-07
AI Technical Summary
Existing recommendation systems rely on correlation learning, resulting in data bias, data sparseness and hyperaccuracy issues, and it is difficult to balance the recommendations of homogeneous and diversified content.
Using a social network knowledge-aware recommendation method based on counterfactual reasoning, generate counterfactual interactions by constructing a knowledge graph and Markov decision-making process, use graph neural network to learn user and project representations to mitigate the impact of false correlations, and optimize the generation through reward mechanism The device generates high-quality counterfactual data.
It improves the performance of the recommendation model, reduces the impact of false correlation, enhances the accuracy and personalization of recommendations, solves the problems of data sparseness and diversity, and achieves more accurate and interpretable recommendation results.
Smart Images

Figure CN119271904A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of social network, and specifically relates to a social network knowledge-aware recommendation method, program, system and storage medium based on counterfactual reasoning. Background Art
[0002] In this era of information overload, recommendation systems (RecSys) have become a basic service that facilitates users to obtain information. From the early shallow models [Koren Y, Bell R, Volinsky C. Matrix Factorization Techniques for Recommender Systems [J]. Computer, 2009, 42 (8): 30-37.], to the recent deep learning-based models [Covington P, Adams J, Sargin E. Deep Neural Networks for YouTube Recommendations [C] / / Proceedings of the 10th ACM Conference on Recommender Systems. New York, NY, USA: Association for Computing Machinery, 2016: 191-198.], to the graph neural network-based [Ying R, He R, Chen K, et al. Graph Convolutional Neural Networks for Web-Scale Recommender Systems [C] / / Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining. New York, NY, USA: Association for Computing Machinery, 2018: 974-983.], the technology and models in the recommendation system have been developing rapidly. In general, the goal of the recommendation system is to understand the user's preferences by fitting the user's historical behavior and the collected user information, project attributes or other contextual information. The data source here is mainly the existing historical data, and is largely affected by the recommendation strategy. Then, the recommendation system screens the project candidate pool to select projects that meet the user's personalized preferences and requirements. After deployment, the system will collect new data and update the model during operation, so that the entire framework constitutes a feedback loop.
[0003] Recommendation system algorithms are generally divided into two types: user-based collaborative filtering and content-based collaborative filtering. User-based collaborative filtering algorithms analyze user interests and needs based on the user's historical behavior data and other users' behavior data. Content-based collaborative filtering algorithms analyze user interests and needs based on the characteristics of the recommended content. Research on recommendation systems has always been a hot topic in the field of machine learning and data mining, and new algorithms and technologies are constantly being proposed. With the continuous development of Internet technology, recommendation systems are also constantly evolving and improving.
[0004] The basis of today's recommendation systems is to model correlations, such as behavioral correlations in collaborative filtering, feature-feature correlations, or feature-behavior correlations. Due to the relevance-driven paradigm, existing recommendation systems still have serious bottlenecks. Specifically, the main problems they face include:
[0005] (1) Data bias problem. The data collected by the recommendation system is observational rather than experimental, such as the most important user-item interaction data. This may lead to biases including herd bias and popularity bias [Wei Tiantian, Chen Li, Fan Tingting, et al. Collaborative filtering recommendation algorithm combined with project popularity weighting [J]. Computer Application Research, 2020, 37(3): 676-679.]. This makes the model expected by the recommendation system learn both user preferences and data bias, ultimately resulting in poor recommendation performance.
[0006] (2) Data sparsity problem. The data required in the recommendation system is limited by the collection process, which may cause the data to be sparse. For example, despite the large-scale item pool, users only interact with a small number of items, which means that it is impossible to collect a large amount of unobserved user-item feedback. In addition, sometimes the observed feedback is inaccurate and cannot reflect the user's actual satisfaction. For example, a user left a bad review after a shopping trip, which means that although the recommended product attracted the user to click and place an order, the user was ultimately dissatisfied with the product.
[0007] (3) The problem of over-accuracy. In addition to accuracy, recommendation systems should also consider other goals, such as fairness, explainability, transparency, etc. Improving these goals beyond accuracy may lead to a decrease in recommendation accuracy, ultimately leading to a dilemma. For example, a model that considers multiple driving factors in user behavior, based on separating each driving factor and interpretable analysis, can better provide accurate and explainable recommendations. Another example is diversity. There is currently a criticism that recommendation systems trap users in an "information cocoon" full of homogeneous content, but if we only focus on the diversity of recommendations, we may not be able to meet user needs. How to balance the recommendation frequency of homogeneous content and diverse content is a difficult problem.
[0008] Most of the above problems come from the same reason, that is, the high reliance on correlation learning. In fact, the real world is driven by causality rather than correlation, and correlation does not imply causality. Formally speaking, causality can be defined as two parts: cause and effect, where the cause has a partial impact on the effect [Yao L, Chu Z, Li S, et al. A Survey on Causal Inference [J]. ACM Transactions on Knowledge Discovery from Data, 2021, 15 (5): 74: 1-74: 46.]. There are two types of causality widely present in recommendation systems, user-side and interaction-side. User-side causality means that the user's decision-making process is driven by causality. For example, a user may buy a charger after buying a mobile phone, and the former can be the cause of the latter. This causal relationship is irreversible. Interaction-side causality means that the recommendation strategy greatly affects the interaction between the user and the system. For example, an unobserved user-item interaction does not mean that the user does not like the item. It may just be caused by the item not being exposed to the user.
[0009] Causal inference is a method of reasoning [Pearl J.Causal Inference in Statistics:AnOverview[J].Statistics Surveys,2009,3:96-146.], which infers unknown factors and relationships from known factors and relationships through analysis and understanding of causal relationships. It mainly includes two methods: intervention and counterfactual reasoning. Counterfactual reasoning infers different possible outcomes of things by assuming that known facts are different. Counterfactual data that does not exist in the original data can be generated by setting counterfactual questions. Unlike correlation reasoning, causal reasoning focuses on understanding causal relationships, that is, whether the occurrence of one thing will lead to the occurrence of another thing. Therefore, causal reasoning is a more in-depth and accurate way of reasoning.
[0010] At present, many researchers of recommendation systems are trying to solve the problems of recommendation systems mentioned above by carefully designing causal reasoning methods. First, recommendation methods with causal relationships can construct causal graphs. Under causal graphs, biases can be regarded as confounding factors in most cases, and the impact of confounding factors can be mitigated or eliminated through causal reasoning methods. Secondly, for missing data, counterfactual reasoning methods can help build a counterfactual world, so that missing data can be created through counterfactual reasoning. Finally, causal reasoning can help build interpretable and controllable models, on this basis, the interpretability of the model itself and the recommendation results can be achieved.
[0011] In summary, causal reasoning is a theory that is expected to solve the difficulties currently faced by recommendation systems. By studying the improvement of recommendation systems through causal reasoning, we can improve the recommendation effect and accuracy and solve the problem of data sparsity. The counterfactual reasoning method in causal reasoning has unique advantages in solving problems related to recommendation system data, and has important research value and application prospects. Summary of the invention
[0012] The object of the present invention is to provide a social network knowledge-aware recommendation method, program, system and storage medium based on counterfactual reasoning.
[0013] The purpose of the present invention is achieved through the following technical solutions:
[0014] A knowledge-aware recommendation method for social networks based on counterfactual reasoning, the specific steps are as follows:
[0015] Step 1: Build a knowledge graph based on the interaction set between users and items, and initialize the graph neural network to build a recommender;
[0016] Step 2: The counterfactual generator first selects the knowledge graph triples that cause false correlations and uses a Markov decision process to formulate the generation process; the state consists of the current user and the counterfactual item, and the action space contains all modification operations; the modification operation is divided into two steps: selecting the target entity and replacing the entity, aiming to identify the attribute entity that causes the false correlation and update the counterfactual item;
[0017] Step 3: The probability of each modification operation of the generated strategy is determined by the learning parameters and the softmax function;
[0018] Step 4: The reward feedback device guides the counterfactual generator to generate more informative and accurate counterfactual interactions by combining the two reward mechanisms;
[0019] Step 5: The recommender uses an inductive GNN architecture to learn item representations. Once the structure of the knowledge graph is modified, a signal is generated to enable the counterfactual generator to update the knowledge graph using local neighborhood information.
[0020] Step 6: The recommender also uses a transductive GNN architecture to aggregate information from user-item interactions to learn user representations and update node representations based on the entire graph, thereby reducing information loss;
[0021] Step 7: Finally, based on the updated matching scores between users and items, a user-item interaction score is formed to recommend items to users.
[0022] Furthermore, in step 2, the inner product is used to calculate the score between the attribute entity and the state;
[0023]
[0024] in and is a learnable parameter, e a represents the target entity, s t ∈S represents the state of the Markov process at the current step t.
[0025] Furthermore, the step 4 is specifically as follows:
[0026] Step 4.1: Information-based rewards encourage the removal of redundant entities and the retention of useful causal entities by optimizing the information bottleneck loss;
[0027] Step 4.2: Prediction-based rewards utilize the recommender system as a discriminator to evaluate the predicted differences of counterfactual interactions, thereby generating more informative counterfactual terms.
[0028] A social network knowledge perception recommendation system based on counterfactual reasoning, comprising a counterfactual data generation device, a data screening device, a reward feedback device and a recommendation device;
[0029] The counterfactual data generating device uses the Markov decision process framework to explore potential false correlations in the recommendation system and generate positive or negative counterfactual interactions; by modifying the item attribute information in the knowledge graph triple, the target entity is selected and replaced with the modified entity to reduce the impact of false correlations, and a probability strategy for each modification operation is generated.
[0030] The data screening device screens the generated explicit counterfactual data by setting a confidence parameter to reduce the number of inaccurate counterfactual examples;
[0031] The reward feedback device is designed and combines information-based rewards and prediction-based rewards based on the feedback signal of the recommendation system to guide the operation of the counterfactual generator;
[0032] The recommendation device uses a graph neural network (GNN) to build a recommender, jointly learns the knowledge graph and user-item interaction information to generate representations of items and users, and predicts user recommendations.
[0033] A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: when the computer program / instruction is executed by a processor, the steps of a social network knowledge-aware recommendation method based on counterfactual reasoning are implemented.
[0034] A computer program product includes a computer program / instruction, characterized in that: when the computer program / instruction is executed by a processor, the steps of a social network knowledge-aware recommendation method based on counterfactual reasoning are implemented.
[0035] The beneficial effects of the present invention are:
[0036] The present invention can add counterfactual reasoning methods to the knowledge-aware recommendation model to reduce the impact of false correlations on the model effect and achieve the goal of improving model performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 This is a typical application environment of the present invention;
[0038] Figure 2 is a structural block diagram of the system described in the present invention;
[0039] Figure 3 A schematic diagram of counterfactual generation for a knowledge-aware recommendation system and method for social networks based on counterfactual reasoning;
[0040] Figure 4 A community search flow chart for a knowledge-aware recommendation system and method for social networks based on counterfactual reasoning;
[0041] Figure 5 It is the experimental reward curve;
[0042] Figure 6 To add the effect of false correlation on the results;
[0043] Figure 7 The influence of different values of μ1 and μ2 on the results. DETAILED DESCRIPTION
[0044] The present invention is further described below in conjunction with the accompanying drawings.
[0045] Figure 1 To implement the typical application environment of the present invention, specifically:
[0046] Figure 1 We show an example of false correlation in a movie recommendation scenario and how to mitigate the false correlation problem using counterfactual data. Figure 1 In the first half, the user watched a lot of English movies, so the recommendation system tends to infer that English is the main reason for the user to watch these movies and continue to recommend English movies to the user. However, the actual situation is that the user watched these movies because he likes science fiction and suspense movies, and language is not the main reason.
[0047] Since the knowledge graph contains a large number of project features, the false correlation of these knowledge information may affect the performance of the knowledge-aware recommendation system. According to the above description, the potential false correlation in knowledge-aware recommendation can be mitigated by designing counterfactual interactions. Specifically, for a given user and his interactive items, a knowledge fact that may cause false correlation can be replaced with another related knowledge fact. Figure 1 As shown in the lower part, there is an interaction record in the training data, and the corresponding fact is "the user watched this movie, and the language of the movie is English". Then, we can generate counterfactual interactions by setting the counterfactual question "If the language is changed to Japanese, will the user still watch this movie?" If the recommendation system responds "yes", the false correlation caused by language will be eliminated.
[0048] Figure 2 The structure block diagram of the system of the present invention is shown, comprising:
[0049] Counterfactual data generation device: Using the Markov decision process framework, it explores potential false correlations in the recommendation system and generates positive or negative counterfactual interactions. It modifies the attribute information of the item (knowledge graph triples), selects the target entity and replaces it with the modified entity to weaken the impact of the false correlation, thereby generating the probability of each modification operation of the strategy.
[0050] Data screening device: The generated explicit counterfactual data is screened by setting the confidence parameter, and is only accepted when the generator is confident enough in it, thereby reducing the number of inaccurate counterfactual examples and avoiding the performance degradation of the re-optimized anchor model.
[0051] Reward feedback device: Based on the feedback signal of the recommender system, we design and combine information-based rewards and prediction-based rewards to guide the operation of the counterfactual generator, aiming to effectively generate high-quality and information-rich counterfactual interactions.
[0052] Recommendation device: A recommender is built using a graph neural network (GNN), which jointly learns the information of the knowledge graph and user-item interactions to generate representations of items and users, and makes recommendation predictions through two different aggregation functions (aggregating knowledge information and aggregating interaction information).
[0053] Figure 3 The principle diagram of attribute completion of social network knowledge-aware recommendation system and method based on counterfactual reasoning, specifically:
[0054] The purpose of the counterfactual generator is to generate counterfactual interactions (positive or negative) by exploring potential spurious correlations in the recommender system. Figure 3The generation process of counterfactual interactions is shown. For factual interactions (u,i), the core idea of CKRec is to modify the attribute information of item i (i.e., knowledge graph triples) to generate counterfactual item i cf , and then form a counterfactual interaction with user u (u,i cf ). To perform these KG-based modifications, we first select a KG triple that may lead to spurious correlations and then replace it with a KG triple that is not directly observed from the dataset.
[0055] However, given a factual interaction, it is difficult to make appropriate modifications efficiently because the possible space of modification operations is large and there is no direct guidance for effective exploration. To address this problem, in CKRec, the generation process of counterfactual interactions is formulated as a Markov Decision Process (MDP), and the signal from the recommender is used as a reward to guide the generation of counterfactual interactions.
[0056] Formally, in reinforcement learning, a general MDP environment can be defined by a tuple (S, A, δ, R), where S represents the state space, A represents the action space, δ:S×A→S represents the state transition function, is the reward function of the environment.
[0057] For the generation of counterfactual interactions, at step t, the state s t ∈S is defined as a tuple where u∈U is the current user, is the counterfactual term in step t. is calculated by calculating the counterfactual term at step t-1. In particular, the initial state s0 = (u, i) consists of user u and fact item i, which represents the observed fact interaction. The complete action space A t Counterfactual All possible modification operations.
[0058] In Status Need to efficiently search for actions to modify the counterfactual CKRec decomposes the modification operation into two steps: (1) Select an attribute entity e from the attribute information of item i a (target entity); (2) use another attribute entity (Modify entity) Replace e a These two steps together aim to identify attribute entities that may lead to spurious associations and further update counterfactuals that are conducive to weakening the impact of spurious associations. Such a process is formalized as:
[0059]
[0060] in and Represent the target entity e a and modify entities The probability of being selected.
[0061] For the sake of Modeling requires learning the state s t Representation Status t The counterfactual term First, use and represents user u and counterfactual term Then combine and v u Get status indication as follows:
[0062]
[0063] in and is a learnable parameter, Represents a cascade operation. Use the inner product to calculate the attribute entity e a and status t The score between:
[0064]
[0065] in and is a learnable parameter. After that, the scores of all candidate attribute entities are normalized using the softmax function:
[0066]
[0067] where e a′ Represents the target entity e a The modified version generated after counterfactual reasoning, E i is the project entity i in the knowledge graph G kg Neighbor entities in .
[0068] In order to P(e a |s t ,e a ) is modeled, given the state s t and the attribute entity e selected from the first step a , the following scoring function is used to select the modified entity e a :
[0069]
[0070] in and is a learnable parameter, and “e” is the element-wise product. Then the softmax function is used to generate the selection probability:
[0071]
[0072] in Represents an approximate or modified version of the entity in counterfactual reasoning, usually used to reflect further adjustments made to the embedding representation of the target entity during counterfactual reasoning or intervention. i Represents the target entity e a The set of all possible neighbor entities with the same relationship type, that is, the neighbor entities of project i. For example, given the triple 〈The Wandering Earth, Director, Guo Fan〉, if we believe that The Wandering Earth is project i and Guo Fan is e a , then only other neighbor entities with similar relationships to item i will be considered to replace Guo Fan. However, E i The size of E is usually very large, which brings computational efficiency issues. Inspired by the sampling strategy, a pruning strategy can be adopted to maintain high-quality exploration. Specifically, first, i We randomly select a subset from E and then design a scoring function to select potential entities as new E i , heuristically filters out useless and irrelevant entities. Formally, the user embedding v is measured using the dot product u and candidate entities The similarity in this subset is then used to select the Top-N entities with the largest or smallest similarity scores as positive or negative counterfactual generators, respectively. In this way, more relevant counterfactual interactions can be generated for the target user.
[0073] Through the above formula, CKRec can generate the probability of each modification operation of strategy π.
[0074] Figure 4 The overall framework of the social network knowledge-aware recommendation system and method based on counterfactual reasoning is given, specifically:
[0075] First, through data preparation, a knowledge graph is constructed and user-item interaction data is collected. Then, the counterfactual data generation device selects and optimizes entities that may cause false correlations based on the knowledge graph and interaction data through information-based rewards and prediction-based rewards, and generates high-quality counterfactual interactions. Subsequently, the reward feedback device combines the reward function to guide the operation of the generator, and uses confidence parameters and optimization methods to screen the generated counterfactual data. Furthermore, the recommendation device uses graph neural networks to aggregate knowledge information and transductive GNNs to aggregate interaction information, trains the recommender and integrates counterfactual interaction data to improve the accuracy and personalization of recommendations. Finally, the trained recommender is used to predict the items that users like, weaken false correlations, and provide users with more accurate and personalized recommendation results.
[0076] The following describes in detail the experimental example scenarios of the present invention, and analyzes the implementation results in combination with the advantages of the present invention.
[0077] In terms of hardware, the CPU is Intel(R) Xeon(R) Platinum 8255C, the GPU is Nvidia RTX 3080, and the memory is 43GB; in terms of software, the Python version is 3.8, the CUDA version is 11.0, and the PyTorch version is 1.7.0.
[0078] Since the knowledge-aware recommendation algorithm based on counterfactual reasoning requires information about the project attributes in the dataset to extract knowledge information, the experiment uses the MovieLens, Yelp, and LFM Music datasets, and extracts the project attributes in the dataset to construct knowledge metadata.
[0079] (1) MovieLens is a commonly used movie recommendation dataset maintained by GroupLens Research. It mainly contains movie rating data and meta-information, including movie name, release year, genre, etc.
[0080] (2) Yelp is a well-known online business review platform. The Yelp dataset is a large dataset provided by Yelp that contains information about businesses and users on the platform. In the Yelp dataset, each business contains basic information such as the business ID, name, address, longitude and latitude, each user contains basic information such as the user ID, name, and avatar, and each review contains information such as the user ID, business ID, review text, and rating. In addition, the dataset also contains attribute information and photo information of users and businesses, and these attributes can be used as knowledge information.
[0081] (3) The LFM Music dataset is an open music dataset provided by Last.FM. It contains music records and metadata information played by users around the world on the Last.FM platform. The knowledge information that can be extracted includes user ID, song ID, timestamp, and number of plays, as well as metadata information of songs and artists, such as song title, artist name, album name, and genre.
[0082] The specific information of the three datasets is shown in Table 1. For each dataset, 80% of the interactions are randomly selected as the training set, and the rest are equally divided into the validation set and the test set. For each user, all items that the user has not interacted with are considered negative items.
[0083] Table 1
[0084]
[0085] All methods in the experiment use Adam as the optimizer, the initial embedding size is fixed to 64, and the batch size is set to 2048. Grid search is used for hyperparameters: the learning rate is searched between [0.0001, 0.0005, 0.001, 0.005, 0.01]; the L2 normalization coefficient is searched between [10-6, 10-5, 10-4, 10-3]; the dropout ratio is searched between [0.1, 0.2, ···, 0.9]; for GNN-based methods, the number of GNN layers is searched in [1, 2, 3]. Finally, the parameters of each model are adjusted to its best performance on the validation set.
[0086] To verify the effectiveness of the CKRec-based counterfactual recommendation model, we compare it with the following baseline models:
[0087] (1) NCF: NCF replaces the inner product in matrix factorization with a neural network, which can capture the complex interactive relationships in user-item interaction data.
[0088] (2) RippleNet: RippleNet combines knowledge graphs to enrich user representations. It uses a memory network-like approach to propagate user preferences on knowledge graphs.
[0089] (3) CFKG: CFKG proposes to strengthen the collaborative filtering (CF) method based on knowledge graph embedding to achieve personalized recommendation and defines a translation-based measurement criterion.
[0090] (4) KGAT: KGAT learns the representation of users and items by leveraging the structure of the knowledge graph. It adopts a GNN-based architecture to build a collaborative knowledge graph.
[0091] (5) JNSKR: JNSKR designs a non-sampling optimization algorithm for knowledge-aware recommendation and uses an attention mechanism to model user preferences through knowledge graphs.
[0092] (6) CauseRec: CauseRec learns accurate and robust user representations by generating counterfactual user behavior sequences.
[0093] The hit rate (HR) and normalized discounted cumulative gain (NDCG) results of the experiment are shown in Table 2.
[0094] Table 2
[0095]
[0096] Based on these results, we can conclude that most knowledge-aware methods achieve better results than the general recommendation method NCF, especially on the Yelp and LFM Music datasets. This is because the rich item attribute information from the knowledge graph can help the recommender better model items and user preferences, thereby making more accurate recommendations. Among the knowledge-aware methods, JNSKR achieves the best results because it optimizes the model through a designed non-sampling learning algorithm to better utilize knowledge information. These results show that how to utilize and model knowledge information is very important for improving recommendation systems.
[0097] For counterfactual generation methods, they achieve better results than most knowledge-aware recommendation methods and the general recommendation method NCF. CauseRec achieves better results because the generated counterfactual data helps alleviate the data sparsity problem and makes the recommendation system more robust to noisy data.
[0098] CKRec achieved better results than all baseline methods. Like other knowledge-aware methods, CKRec has a more obvious advantage on the Yelp and LFM Music datasets. In addition, CKRec also achieved better results than the counterfactual generation method CasueRec. This is because CKRec can effectively alleviate the pseudo-correlation problem by generating counterfactual interactions from the knowledge level. In this way, the recommendation system pays more attention to the causal relationship between item knowledge and user behavior, and can better capture user interests.
[0099] The reward value changes with the number of iterations in the experiment as shown below: Figure 5 As shown, we can see that the reward feedback values on the three data sets can grow rapidly and gradually stabilize, indicating that under the feedback of the recommender, the counterfactual generator has learned the ability to stably generate appropriate counterfactual interactions and can generate stable and usable counterfactual examples for the model.
[0100] To further verify the effectiveness of CKRec, more false correlations can be manually added to test the robustness of the recommendation method. Specifically, by extracting some positive items that frequently appear in user behaviors and linking them with a (a <= 5) identical false knowledge facts, false correlations are constructed between these false knowledge facts and positive user behaviors. Similarly, some negative items that rarely appear in user behaviors are sampled and the same operation is performed to construct another false correlation between a false knowledge fact and negative user behaviors. Then, CKRec and the baseline method are trained on the modified training set and tested on the original test set.
[0101] like Figure 6 As shown in Figure 2, as the number of sampled positive and negative items increases, the baseline model is more susceptible to injected spurious correlations and its performance drops significantly, but the performance of CKRec remains stable. Overall, CKRec consistently outperforms all baselines, further confirming that CKRec can effectively mitigate spurious correlations in knowledge-aware recommendation.
[0102] Figure 7 The left figure shows the result of changing the weight of the counterfactual interaction μ1 of the positive term. As μ1 increases, the performance first improves, because the counterfactual interaction can help mitigate false correlations to improve performance. As μ1 continues to increase, the performance begins to decline, because a large value of μ1 may cause an overall loss of the counterfactual interaction part about the positive term and cause performance degradation. Figure 7 The figure on the right shows the result of changing the weight of the negative counterfactual interaction μ2, which leads to the same conclusion as μ1.
[0103] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A knowledge-aware recommendation method for social networks based on counterfactual reasoning, characterized by: The specific steps are as follows: Step 1: Build a knowledge graph based on the interaction set between users and items, initialize the graph neural network to build a recommender; Step 2: The counterfactual generator first selects the knowledge graph triples that cause false correlations and uses a Markov decision process to formulate the generation process; the state consists of the current user and the counterfactual item, and the action space contains all modification operations; the modification operation is divided into two steps: selecting the target entity and replacing the entity, aiming to identify the attribute entity that causes the false correlation and update the counterfactual item; Step 3: The probability of each modification operation of the generated strategy is determined by the learning parameters and the softmax function; Step 4: The reward feedback device guides the counterfactual generator to generate more informative and accurate counterfactual interactions by combining the two reward mechanisms; Step 5: The recommender uses an inductive GNN architecture to learn item representations. Once the structure of the knowledge graph is modified, a signal is generated to enable the counterfactual generator to update the knowledge graph using local neighborhood information. Step 6: The recommender also uses a transductive GNN architecture to aggregate information from user-item interactions to learn user representations and update node representations based on the entire graph, thereby reducing information loss; Step 7: Finally, based on the updated matching scores between users and items, a user-item interaction score is formed to recommend items to users.
2. The social network knowledge-aware recommendation method based on counterfactual reasoning according to claim 1, characterized in that: In step 2, the inner product is used to calculate the score between the attribute entity and the state; in and is a learnable parameter, e a represents the target entity, s t ∈S represents the state of the Markov process at the current step t.
3. The social network knowledge-aware recommendation method based on counterfactual reasoning according to claim 1, characterized in that: The step 4 is specifically as follows: Step 4.1: Information-based rewards encourage the removal of redundant entities and the retention of useful causal entities by optimizing the information bottleneck loss; Step 4.2: Prediction-based rewards utilize the recommender system as a discriminator to evaluate the predicted differences of counterfactual interactions, thereby generating more informative counterfactual terms.
4. A social network knowledge-aware recommendation system based on counterfactual reasoning according to any one of claims 1 to 3, characterized in that: It includes a counterfactual data generating device, a data screening device, a reward feedback device and a recommendation device; The counterfactual data generating device uses the Markov decision process framework to explore potential false correlations in the recommendation system and generate positive or negative counterfactual interactions; by modifying the item attribute information in the knowledge graph triple, the target entity is selected and replaced with the modified entity to reduce the impact of false correlations, and a probability strategy for each modification operation is generated. The data screening device screens the generated explicit counterfactual data by setting a confidence parameter to reduce the number of inaccurate counterfactual examples; The reward feedback device is designed and combines information-based rewards and prediction-based rewards based on the feedback signal of the recommendation system to guide the operation of the counterfactual generator; The recommendation device uses a graph neural network (GNN) to build a recommender, jointly learns the knowledge graph and user-item interaction information to generate representations of items and users, and predicts user recommendations.
5. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented.
6. A computer program product comprising a computer program / instructions, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented.
Citation Information
Cited By
Commodity association rule intelligent analysis method and system based on knowledge mining
CN121480728A
Intelligent analysis method and system for commodity association rules based on knowledge mining
CN121480728B
Intelligent agent memory library optimization method and device based on anti-fact marginal contribution analysis
CN121766357A