Rule mining method and apparatus for recommendation model explanations, and device and medium

By mining neighborhood graphs and connected subgraphs in graph data, target graph patterns and candidate preconditions are extracted, and target interpretation rules are generated. This solves the problem of insufficient global interpretation in graph neural network recommendation models and improves the interpretability and effectiveness of the models.

WO2026137553A1PCT designated stage Publication Date: 2026-07-02SHENZHEN INST OF COMPUTING SCI

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
SHENZHEN INST OF COMPUTING SCI
Filing Date
2025-01-23
Publication Date
2026-07-02

Smart Images

  • Figure CN2025074128_02072026_PF_FP_ABST
    Figure CN2025074128_02072026_PF_FP_ABST
Patent Text Reader

Abstract

The present application is applicable to the field of model explanations, and relates to a rule mining method and apparatus for recommendation model explanations, and a device and a medium. The method comprises: for any user-item pair in graph data, determining a corresponding neighborhood graph and connected sub-graphs, determining candidate sub-graphs from among the connected sub-graphs, and on the basis of graph evaluation scores, determining a target sub-graph from among the candidate sub-graphs; extracting a target graph pattern from the target sub-graph; for any variable in pattern paths of the target graph pattern, determining a target predicate from among all predicates corresponding to the variable, and using the variable and the target predicate to form a candidate precondition; and on the basis of the target graph pattern and candidate precondition sets corresponding to all the pattern paths in the target graph pattern, obtaining candidate rules for explanations, and determining, from among all the candidate rules for explanations, candidate rules for explanations that meet a preset condition as target rules for explanations. Target rules for explanations that can reflect a prediction principle of a recommendation model are mined from graph data and used as a global explanation for the recommendation model, thereby improving the effectiveness of explanations.
Need to check novelty before this filing date? Find Prior Art

Description

Rule mining methods, apparatus, equipment, and media for interpreting recommendation models

[0001] This application is based on and claims priority to Chinese Invention Application No. 202411938233.6, filed on December 26, 2024, entitled "Rule mining method, apparatus, device and medium for recommendation model interpretation". Technical Field

[0002] This application applies to the field of model interpretation, and in particular relates to a rule mining method, apparatus, device, and medium for interpreting recommendation models. Background Technology

[0003] With the rapid development of artificial intelligence technology, Graph Neural Networks (GNNs) have shown great potential in recommender systems. GNNs can utilize multi-hop relationships in graph data to accurately model user preferences and analyze historical user-item interactions, thereby providing personalized recommendations to users. As GNN recommendation models become more widespread, model interpretability has become an increasingly important research direction. In recommender systems, interpretability refers to the ability to clearly explain why a specific item is recommended to a particular user. This is crucial for users because it helps them understand the source of the recommendation results, enhancing their trust in the recommender system. Simultaneously, for developers, the ability to interpret GNN recommendation results is key to optimizing and debugging the model.

[0004] In the prior art, the global interpretation method is an implementation scheme that is relatively close to that of this application. The global interpretation method extracts graph-based patterns by analyzing graph structure data, thereby serving as a global interpretation of the model. However, this method generally relies on pre-processed graph patterns as input, or assumes that the interpreted substructure follows the characteristics of Gilbert random graphs, which is difficult to implement in practice and lacks practical feasibility. Furthermore, the extracted graph patterns fail to incorporate the attribute relationships between nodes, resulting in insufficient information completeness.

[0005] Therefore, optimizing the generation of explanatory components to improve the interpretability of recommendation models has become an urgent problem to be solved. Summary of the Invention

[0006] In view of this, embodiments of this application provide a rule mining method, apparatus, device, and medium for interpreting recommendation models, in order to solve the problem of how to optimize the generation of interpretation components to improve the interpretability of recommendation models.

[0007] In a first aspect, embodiments of this application provide a rule mining method for interpreting recommendation models, the rule mining method comprising:

[0008] Obtain graph data and determine all user-item pairs in the graph data, wherein the user-item pair is a node pair representing the mapping relationship between users and items obtained by recommending items to users in the graph data based on a recommendation model;

[0009] For any user item pair, a neighborhood graph of the user item pair is determined from the graph data, and all connected subgraphs of the neighborhood graph containing the user item pair are determined. At least one candidate subgraph is determined from all connected subgraphs. For any candidate subgraph, the candidate subgraph is evaluated according to the neighborhood graph to obtain a graph evaluation score. Based on the graph evaluation score, a target subgraph is determined from all candidate subgraphs.

[0010] In the target subgraph, a simulated path is obtained by traversing the user item pair as the starting point. For any simulated path, a pattern is extracted from the simulated path to obtain a pattern path. All pattern paths are then combined to form a target graph pattern.

[0011] For any pattern path in the target graph pattern, determine all variables in the pattern path and all predicates defined on each variable. For any variable in the pattern path, determine a target predicate from all predicates corresponding to the variable, and form a candidate precondition with the variable and the target predicate.

[0012] Traverse all variables in the pattern path to obtain the candidate preconditions corresponding to each variable in the pattern path, and form a set of candidate preconditions corresponding to the pattern path by combining all the candidate preconditions corresponding to the variables in the pattern path.

[0013] Based on the target graph pattern and the set of candidate preconditions corresponding to all pattern paths in the target graph pattern, at least one candidate interpretation rule is obtained, and the candidate interpretation rule that satisfies the preset conditions is determined from all candidate interpretation rules as the target interpretation rule.

[0014] Secondly, embodiments of this application provide a rule mining apparatus for interpreting recommendation models, the rule mining apparatus comprising:

[0015] The acquisition module is used to acquire graph data and determine all user-item pairs in the graph data, wherein the user-item pairs are node pairs representing the mapping relationship between users and items, obtained by recommending items to users in the graph data based on a recommendation model;

[0016] The subgraph determination module is used to, for any user item pair, determine a neighborhood graph of the user item pair from the graph data, and all connected subgraphs of the neighborhood graph containing the user item pair, determine at least one candidate subgraph from all connected subgraphs, evaluate the candidate subgraph according to the neighborhood graph for any candidate subgraph to obtain a graph evaluation score, and determine a target subgraph from all candidate subgraphs according to the graph evaluation score;

[0017] The graph pattern determination module is used to traverse the target subgraph starting from the user item pair to obtain a simulated path, extract a pattern from the simulated path for any simulated path to obtain a pattern path, and form a target graph pattern from all the pattern paths.

[0018] The condition mining module is used to determine all variables and all predicates defined on each variable in any pattern path in the target graph pattern, and to determine a target predicate from all predicates corresponding to any variable in the pattern path, and to form a candidate precondition by combining the variable and the target predicate.

[0019] The condition determination module is used to traverse all variables in the pattern path, obtain the candidate preconditions corresponding to each variable in the pattern path, and form a set of candidate preconditions corresponding to the pattern path by combining the candidate preconditions corresponding to all variables in the pattern path.

[0020] The rule mining module is used to obtain at least one candidate interpretation rule based on the target graph pattern and the set of candidate preconditions corresponding to all pattern paths in the target graph pattern, and to determine the candidate interpretation rule that meets the preset conditions from all candidate interpretation rules as the target interpretation rule.

[0021] Thirdly, embodiments of this application provide a computer device, the computer device including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the rule mining method as described in the first aspect.

[0022] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the rule mining method as described in the first aspect.

[0023] The beneficial effects of this application embodiment compared with the prior art are as follows: For any user-item pair in graph data, this application determines its corresponding neighborhood graph and connected subgraph, determines candidate subgraphs from the connected subgraphs, evaluates the candidate subgraphs based on the neighborhood graph, determines the target subgraph from the candidate subgraphs based on the graph evaluation score, traverses the target subgraph starting from the user-item pair to obtain a simulated path, extracts patterns from the simulated path to obtain a pattern path, forms a target graph pattern from the pattern path, determines all variables and all predicates defined on each variable in the pattern path for any pattern path in the target graph pattern, determines a target predicate from all predicates corresponding to the variable for any variable in the pattern path, forms a candidate precondition with the variable and the target predicate, forms a set of candidate preconditions corresponding to the pattern path from the candidate preconditions corresponding to all variables in the pattern path, obtains at least one candidate interpretation rule based on the target graph pattern and the set of candidate preconditions corresponding to all pattern paths in the target graph pattern, and determines the candidate interpretation rule that meets the preset conditions from all candidate interpretation rules as the target interpretation rule.

[0024] This application, based on graph data and a recommendation model, mines target explanatory rules (explanatory components) from graph data that reflect the prediction principles of the recommendation model as a global explanation of the recommendation model. To achieve this goal, firstly, the neighborhood graph and connected subgraphs centered on user-item pairs in the graph data are selected and evaluated to determine the target subgraph. Target graph patterns are then extracted from the target subgraphs. This process effectively captures subgraph information in the graph data that is closely related to the recommendation model's prediction, enabling the target graph patterns extracted from the target subgraphs to comprehensively and accurately reflect the prediction logic of the recommendation model. Then, for each pattern path in the target graph pattern, all predicates corresponding to the variables are selected and evaluated. This process effectively captures predicate information closely related to the recommendation model's prediction within the target graph pattern, enabling the candidate predicates generated based on the target predicates to comprehensively and accurately reflect the recommendation model's prediction logic. Finally, based on the target graph pattern and the mined candidate predicates, target explanation rules are formed for interpreting the recommendation model, optimizing the explanation method and ensuring that the target explanation rules mined based on the target graph pattern and candidate predicates can reproduce the recommendation model's prediction results. This improves the effectiveness and reliability of the generated target explanation rules in interpreting the recommendation model, providing users and developers with a clearer and more transparent model decision-making process. Attached Figure Description

[0025] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0026] Figure 1 is a schematic diagram of an application environment for a rule mining method provided in Embodiment 1 of this application;

[0027] Figure 2 is a flowchart illustrating a rule mining method provided in Embodiment 2 of this application;

[0028] Figure 3 is a schematic diagram of a graph data provided in Embodiment 2 of this application;

[0029] Figure 4 is a schematic diagram of a target interpretation rule provided in Embodiment 2 of this application;

[0030] Figure 5 is a flowchart illustrating a rule mining method provided in Embodiment 3 of this application;

[0031] Figure 6 is a flowchart illustrating a rule mining method provided in Embodiment 4 of this application;

[0032] Figure 7 is a flowchart illustrating a rule mining method provided in Embodiment 5 of this application;

[0033] Figure 8 is a flowchart illustrating a rule mining method provided in Embodiment Six of this application;

[0034] Figure 9 is a structural schematic diagram of a rule mining device provided in Embodiment 7 of this application;

[0035] Figure 10 is a schematic diagram of the structure of a computer device provided in Embodiment 8 of this application. Detailed Implementation

[0036] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0037] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0038] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0039] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0040] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0041] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0042] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

[0043] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.

[0044] It should be understood that the sequence number of each step in the following embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0045] To illustrate the technical solution of this application, specific embodiments are described below.

[0046] This application provides a rule mining method for interpreting recommendation models, applicable to the environment shown in Figure 1. The server and client communicate, with the server providing rule mining services and the client triggering rule mining tasks to the server. Clients include, but are not limited to, handheld computers, desktop computers, laptops, ultra-mobile personal computers (UMPCs), netbooks, cloud computing devices, and personal digital assistants (PDAs). The server can be implemented using a dedicated server or a server cluster.

[0047] Referring to Figure 2, which is a flowchart illustrating a rule mining method for interpreting a recommendation model according to Embodiment 2 of this application, the rule mining method is applied to the server in Figure 1. The server connects to the client to obtain graph data sent by the client. As shown in Figure 2, the rule mining method may include the following steps:

[0048] Step S201: Obtain graph data and identify all user item pairs in the graph data.

[0049] In this embodiment, the user-item pair is a node pair representing the mapping relationship between users and items, obtained by recommending items to users in graph data based on a recommendation model. The recommendation model can refer to the GNN recommendation model.

[0050] For example, Figure 3 shows a schematic diagram of graph data provided in Embodiment 2 of this application. u, v, w1, w2...w15 are nodes representing specific entities in the graph data. Each node has corresponding attributes and attribute values. For example, for node w1, its corresponding attributes may include: filmname, genre; the attribute values ​​are A1, Action, respectively. The connecting edges between nodes represent the relationships between them. For example, the "watch" connection edge between node u and node w1 indicates that the user of node u is watching the movie of node w1. M(u,v) is a user-item pair in the graph data, M(u,v) = true, where M is the recommendation model, u represents the user, and v represents the item.

[0051] Step S202: For any user-item pair, determine a neighborhood graph of the user-item pair from the graph data, and all connected subgraphs containing the user-item pair in the neighborhood graph. Determine at least one candidate subgraph from all connected subgraphs. For any candidate subgraph, evaluate the candidate subgraph based on the neighborhood graph to obtain a graph evaluation score. Determine the target subgraph from all candidate subgraphs based on the graph evaluation score.

[0052] In this embodiment, since the k-layer recommendation model mainly aggregates information from the k-hop neighborhood of the two nodes (the user node representing the user and the item node representing the item) in the user-item pair, the neighborhood graph can be the union of two subgraphs formed by traversing all nodes reachable in k steps along the edges of the graph data, starting from the user node and the item node respectively, and their interconnections. Here, k is an integer greater than zero. A connected subgraph can be a connected subgraph in the neighborhood graph that contains the two nodes in the user-item pair. A candidate subgraph can be any connected subgraph in all connected subgraphs. The graph evaluation score can be the score obtained by evaluating the candidate subgraph based on the neighborhood graph. The target score can be the candidate subgraph selected from all candidate subgraphs based on the graph evaluation score.

[0053] Specifically, for any user-item pair, a search tree can be constructed based on the neighborhood graph and all connected subgraphs of the user-item pair. In the search tree, the root node represents the neighborhood graph, and any non-root node represents a connected subgraph. On the path from the root node to any leaf node, the size of the connected subgraph gradually decreases. Based on the search tree iteration, a path is selected from the root node to reach the leaf node, and the connected subgraph represented by the leaf node is determined as a candidate subgraph. Based on the neighborhood graph, the candidate subgraphs represented by the leaf nodes are evaluated to obtain a graph evaluation score. This process continues until a preset iteration stopping condition is met, and the graph evaluation scores of all candidate subgraphs are obtained. From all candidate subgraphs, the candidate subgraph corresponding to the highest graph evaluation score is determined as the target subgraph.

[0054] Step S203: In the target subgraph, walk around starting from the user item pair to obtain a simulated path. For any simulated path, extract the pattern of the simulated path to obtain a pattern path. Combine all the pattern paths into a target graph pattern.

[0055] In this embodiment, the simulated path can refer to the path obtained by traversing the target subgraph with two nodes in the user item pair as starting points respectively. The pattern path can refer to the path pattern extracted by replacing the specific entity vertices (or edges) in the simulated path with pattern vertices (or edges) with the same label. The target graph pattern can refer to the graph pattern formed by the combination of all pattern paths.

[0056] Specifically, firstly, in the target subgraph, random walks are performed starting from the two nodes in the user-item pair to obtain a first simulated path starting from the user node and a second simulated path starting from the item node. Secondly, for any first simulated path, the specific entity vertices (or edges) in the first simulated path are replaced with pattern vertices (or edges) with the same label to obtain a first pattern path. Correspondingly, for any second simulated path, the specific entity vertices (or edges) in the second simulated path are replaced with pattern vertices (or edges) with the same label to obtain a second pattern path. Then, all the first pattern paths are combined to form a star pattern centered on the user node, and all the second pattern paths are combined to form a star pattern centered on the item node. Finally, the star pattern centered on the user node and the star pattern centered on the item node are combined to obtain a dual-pattern target graph pattern.

[0057] Step S204: For any pattern path in the target graph pattern, determine all variables in the pattern path and all predicates defined on each variable. For any variable in the pattern path, determine a target predicate from all the predicates corresponding to the variable, and form a candidate precondition by combining the variable and the target predicate.

[0058] Step S205: Traverse all variables in the pattern path to obtain the candidate premises corresponding to each variable in the pattern path, and form a set of candidate premises corresponding to all variables in the pattern path.

[0059] In this embodiment, during the process of extracting patterns from the simulated path to obtain the pattern path, the pattern path is obtained by replacing the specific entity vertices (or edges) in the simulated path with pattern vertices (or edges) of the same label. The pattern vertices of the same label that replace the specific entity vertices in the simulated path are the variables in the pattern path. The attributes and corresponding attribute values ​​of the specific entity vertices in the simulated path that are not replaced are the predicates defined on the variables. The target predicate can refer to any predicate defined on the variables. The candidate preconditions can refer to the preconditions formed by the variables and the target predicates. The set of candidate preconditions can refer to the set of candidate preconditions corresponding to all variables in the pattern path.

[0060] Specifically, for any pattern path in the target graph pattern, candidate prerequisites are generated for each variable in that pattern path one by one until all candidate prerequisites for all variables in that pattern path are obtained. These candidate prerequisites for all variables in that pattern path are then combined to form a set X of candidate prerequisites for that pattern path. ρ ={X ρ,1 ,X ρ,2 ,…X ρ,N}, where N is a hyperparameter, and each X ρ,iLet i be a candidate premise on the pattern path ρ, where i∈[1,N].

[0061] For example, given a pattern path ρ = (z1, z2) containing two variables z1 and z2, if the attributes of variable z1 include name and sex, and the corresponding attribute values ​​are A1 and male, then all predicates defined on variable z1 include name = A1 and sex = male. Similarly, if the attributes of variable z2 include name and job, and the corresponding attribute values ​​are A2 and director, then all predicates defined on variable z2 include name = A2 and job = director.

[0062] In obtaining the set of candidate preconditions corresponding to the pattern path ρ = (z1, z2), starting from variable z1, the variables in the pattern path are traversed round by round, selecting the target predicate defined on each variable until a leaf node is reached. First, if a target predicate of sex = male is determined from variable z1, then a candidate precondition X is formed by variable z1 and the target predicate sex = male. ρ,1 Given z1.sex = male, then reaching the leaf node variable z2, from which a target predicate is determined as job = director, then a candidate precondition X is formed by variable z2 and the target predicate job = director. ρ,2 For z2.job = director; finally, the candidate prerequisites corresponding to all variables in the pattern path ρ = (z1, z2) are combined to form the candidate prerequisite set X of the pattern path ρ = (z1, z2). ρ ={X ρ,1 ,X ρ,2}, that is, X ρ ={z1.sex=male, z2.job=director}.

[0063] Step S206: Based on the target graph pattern and the set of candidate preconditions corresponding to all pattern paths in the target graph pattern, at least one candidate interpretation rule is obtained, and the candidate interpretation rule that meets the preset conditions is determined from all candidate interpretation rules as the target interpretation rule.

[0064] In this embodiment, the candidate interpretation rule can refer to the logical rule formed based on the target graph pattern and the set of candidate preconditions corresponding to all pattern paths in the target graph pattern. The preset condition can refer to the pre-set condition for filtering the candidate interpretation rule. The target interpretation rule can refer to the candidate interpretation rule that satisfies the preset condition.

[0065] The basic form of Rules for Explanations (REPs) is as follows: Where Q[x,y] is the target graph pattern, Q[x,y]=(Q x Q y ), Q x Q represents the graph pattern corresponding to the user node. y Let Q[x,y] be the graph pattern corresponding to the item nodes, used to depict the topological structure between user x and item y related to the recommendation decision. The set of nodes related to the user can be represented as follows: Nodes related to items are represented as When referring to any node in a graph pattern, it can be represented by z, i.e. X is a set of predicates that form rule premises, used to describe the conditions and features related to node features;

[0066] For example, Figure 4 is a schematic diagram of a target interpretation rule provided in Embodiment 2 of this application.

[0067] Target Interpretation Rules The basic form is Where X1 is x0.sex=Male^x1.sex=Male^x2.rating≥6^x3.id=y1.id∧x4.genre=Action^x5.gener=action^y0.genre=Action, target interpretation rule Combining pattern Q1 and precondition X1, the reasons for recommending movie y0 to male user x0 are explained as follows: 1) x0 has watched at least two action movies (which are of the same type as y0); 2) x0 has a favorite highly rated movie x2 (movie rating ≥ 6) and is directed by x3; 3) y0 is an award-winning movie directed by x3 (because x3.id = y1.id).

[0068] Specifically, in the process of obtaining candidate interpretation rules, for any pattern path in the target graph pattern, a preset number of candidate preconditions are extracted from the set of candidate preconditions corresponding to the pattern path. The candidate preconditions extracted from all pattern paths are combined to form a rule precondition. The target graph pattern and the rule precondition are combined to obtain the candidate interpretation rules.

[0069] For example, if the target graph pattern includes two pattern paths, ρ1 = (z1, z2) and ρ2 = (z3, z4), and each pattern path includes two variables, and the candidate prerequisite set for pattern path ρ1 includes two candidate prerequisites, it is represented as follows: The candidate prerequisite set for pattern path ρ2 also includes two candidate prerequisites, denoted as follows: If one candidate prerequisite is extracted from the candidate prerequisite sets of pattern paths ρ1 and ρ2 respectively, then the candidate prerequisites extracted from the two pattern paths can form four rule prerequisites, namely... and The rule condition X1 can be formed as follows: and The rule condition X2 can be formed as and The rule condition X3 can be formed as and The rule condition X4 can be formed. Each rule's preconditions are combined with the target graph pattern to obtain all candidate interpretation rules. From all candidate interpretation rules, the candidate interpretation rule that meets the preset conditions is selected as the target interpretation rule.

[0070] In this embodiment, based on graph data and a recommendation model, target explanation rules (explanation components) that reflect the prediction principle of the recommendation model are mined from the graph data as a global explanation of the recommendation model. To achieve this goal, firstly, the neighborhood graph and connected subgraphs centered on user-item pairs in the graph data are selected and evaluated to determine the target subgraph. Target graph patterns are then extracted from the target subgraphs. This process effectively captures subgraph information in the graph data that is closely related to the recommendation model's prediction, enabling the target graph patterns extracted based on the target subgraphs to comprehensively and accurately reflect the prediction logic of the recommendation model. Then, for each pattern path in the target graph pattern, all predicates corresponding to the variables are selected. The selection and evaluation process for candidate predicate mining effectively captures predicate information closely related to the recommendation model's prediction within the target graph pattern. This ensures that the candidate predicates generated based on the target predicates comprehensively and accurately reflect the prediction logic of the recommendation model. Finally, based on the target graph pattern and the mined candidate predicates, target explanation rules are formed for interpreting the recommendation model. This optimizes the explanation method and ensures that the target explanation rules mined based on the target graph pattern and candidate predicates can reproduce the prediction results of the recommendation model. This improves the effectiveness and reliability of the generated target explanation rules in interpreting the recommendation model, providing users and developers with a clearer and more transparent model decision-making process.

[0071] Referring to Figure 5, which is a flowchart illustrating a rule mining method provided in Embodiment 3 of this application, as shown in Figure 5, step S202 above, which determines at least one candidate subgraph from all connected subgraphs, evaluates each candidate subgraph based on its neighborhood graph to obtain a graph evaluation score, and determines the target subgraph from all candidate subgraphs based on the graph evaluation score, may include the following steps:

[0072] Step S501: Construct a search tree based on the neighborhood graph and all connected subgraphs.

[0073] Step S502: Calculate the first recommendation strength value of the user item pair recommended by the recommendation model on the neighborhood graph.

[0074] Step S503: In the search tree, according to the preset selection strategy, a path is selected from the root node to a leaf node, and the connected subgraph represented by the leaf node is determined as a candidate subgraph. The second recommendation strength value of the user item pair recommended by the recommendation model on the candidate subgraph is calculated. The candidate subgraph is evaluated based on the second recommendation strength value and the first recommendation strength value to obtain the graph evaluation score of the candidate subgraph.

[0075] Step S504: Return to the step of selecting a path from the root node to a leaf node according to the preset selection strategy, until the preset iteration stop condition is met, and obtain the graph evaluation score of all candidate subgraphs.

[0076] Step S505: From all candidate subgraphs, determine the candidate subgraph corresponding to the highest graph evaluation score as the target subgraph.

[0077] In this embodiment, the root node in the search tree represents a neighborhood graph, and any non-root node represents a connected subgraph. Along the path from the root node to any leaf node, the size of the connected subgraph gradually decreases. This search tree can refer to a Monte Carlo Tree Search (MCTS). The first recommendation strength can represent the recommendation strength value of the user-item pair recommended by the recommendation model on the neighborhood graph, and the second recommendation strength can represent the recommendation strength value of the user-item pair recommended by the recommendation model on the candidate subgraph. The preset selection strategy can refer to a pre-set path selection strategy, and the preset iteration stopping condition can refer to a pre-set iteration stopping condition, such as reaching a preset number of iterations or reaching a resource limit.

[0078] Specifically, firstly, a Monte Carlo search tree is constructed based on the neighborhood graph and all connected subgraphs of the user-item pair. In the Monte Carlo search tree, the root node represents the neighborhood graph, and each non-root node represents a connected subgraph. Along the path from the root node to any leaf node, the size of the connected subgraph gradually decreases. Secondly, starting from the root node, the optimal child node is recursively selected according to a preset selection strategy until a leaf node is reached. The connected subgraph represented by the leaf node is then determined as a candidate subgraph. The second recommendation strength value of the user-item pair recommended by the recommendation model on the candidate subgraph is calculated. This second recommendation strength value is then compared with the first recommendation strength value of the user-item pair recommended by the recommendation model on the neighborhood graph. The evaluation scores of candidate subgraphs are compared, and the evaluation scores of candidate subgraphs are determined based on the comparison results. The closer the second recommendation strength value is to the first recommendation strength value, the higher the evaluation score is assigned to the corresponding candidate subgraph. Then, the process returns to the step of selecting a path from the root node to a leaf node according to the preset selection strategy until the preset iteration stopping condition is reached, and the graph evaluation scores of all candidate subgraphs are obtained. Finally, the candidate subgraph with the highest graph evaluation score is determined as the target subgraph. The recommendation prediction result of the recommendation model on the target subgraph is closest to the recommendation prediction result on the neighborhood graph, so that the recommendation model can reproduce its prediction in the target subgraph.

[0079] In this embodiment, a search tree is constructed based on the neighborhood graph and connected subgraphs corresponding to user item pairs. According to a preset selection strategy, the most promising target subgraph (with the highest graph evaluation score) is determined from all candidate subgraphs. This allows the recommendation model to reproduce its predictions in the target subgraph. This process effectively captures the target subgraph information in the graph data that is closely related to the recommendation model's recommendation predictions, improves graph evaluation efficiency, and enables the target graph pattern extracted based on the target subgraph to comprehensively and accurately reflect the prediction logic of the recommendation model. This, in turn, improves the effectiveness and reliability of the target interpretation rules obtained from mining, thereby improving the effectiveness and reliability of the global interpretation.

[0080] Referring to Figure 6, which is a flowchart illustrating a rule mining method provided in Embodiment 4 of this application, as shown in Figure 6, in step S203 above, a simulated path is obtained by traversing the target subgraph starting from the user item pair. For any simulated path, a pattern is extracted to obtain a pattern path. All pattern paths are then combined to form a target graph pattern, which may include the following steps:

[0081] Step S601: Determine the user node representing the user and the item node representing the item in the user-item pair.

[0082] Step S602: In the target subgraph, starting from the user node, perform a random walk with a preset probability to obtain the first simulated path. Then, return to execute the step of performing a random walk with a preset probability starting from the user node until the preset walk stopping condition is met, and obtain all the first simulated paths starting from the user node.

[0083] Step S603: Starting from the item node, perform a random walk with a preset probability to obtain a second simulated path. Then, return to execute the step of performing a random walk with a preset probability starting from the item node until the preset walk stopping condition is met, and obtain all second simulated paths starting from the item node.

[0084] Step S604: For any first simulation path, perform pattern extraction on the first simulation path to obtain a first pattern path; and for any second simulation path, perform pattern extraction on the second simulation path to obtain a second pattern path.

[0085] Step S605: Form all first mode paths into graph patterns corresponding to user nodes, and form all second mode paths into graph patterns corresponding to item nodes.

[0086] Step S606: Combine the graph patterns corresponding to the user nodes and the graph patterns corresponding to the item nodes to form a target graph pattern.

[0087] In this embodiment, the preset probability can refer to a pre-set walk termination probability, and the preset walk stopping condition can refer to a pre-set walk stopping condition. For example, the preset walk stopping condition can refer to the number of the first simulated paths and the number of the second simulated paths reaching a preset value. The first simulated path can refer to the path obtained by walking in the target subgraph with the node representing the user in the user-item pair as the starting point, and the second simulated path can refer to the path obtained by walking in the target subgraph with the node representing the item in the user-item pair as the starting point. The first pattern path can refer to the path pattern extracted by replacing the specific entity vertex (or edge) in the first simulated path with pattern vertices (or edges) of the same label, and the second pattern path can refer to the path pattern extracted by replacing the specific entity vertex (or edge) in the second simulated path with pattern vertices (or edges) of the same label.

[0088] Specifically, firstly, in the target subgraph, starting from the user node and the item node respectively, a walk is performed with a preset probability to obtain a first simulated path and a second simulated path. For example, if the preset probability is α, a random walk is performed starting from the user node and the item node respectively. At each step, either the walk terminates with a probability of α, or the current node moves to an outgoing neighbor with a probability of 1-α, thus obtaining a first simulated path and a second simulated path. The walk stops when the number of first simulated paths and second simulated paths reaches a preset value, resulting in all first simulated paths and second simulated paths. Then, for any first simulated path, a first pattern path is obtained by replacing the specific entity vertices (or edges) in the first simulated path with pattern vertices (or edges) of the same label. Similarly, for any second simulated path, a second pattern path is obtained by replacing the specific entity vertices (or edges) in the second simulated path with pattern vertices (or edges) of the same label. Finally, all first pattern paths are combined to form a star pattern centered on the user node, denoted as Q. x And combine all the second-mode paths into a star-shaped pattern centered on the item node, denoted as Q. y The star schema corresponding to user nodes and the star schema corresponding to item nodes are combined to form the target graph schema, denoted as Q[x0,y0]=(Q x Q y ).

[0089] In this embodiment, by performing random walks in the target subgraph, starting from user nodes and item nodes respectively, according to preset probabilities and preset termination conditions, a simulated path is obtained, avoiding endless path exploration. Path patterns are extracted from the simulated path to obtain target graph patterns that reflect the predictions of the recommendation model at user-item pairs. This improves the efficiency of graph pattern extraction and ensures that the target interpretation rules mined based on the target graph patterns can reproduce the prediction results of the recommendation model, thereby improving the effectiveness and reliability of the global interpretation.

[0090] Referring to Figure 7, which is a flowchart of a rule mining method provided in Embodiment 5 of this application, as shown in Figure 7, step S204 above, which determines a target predicate from all predicates corresponding to any variable in the pattern path, may include the following steps:

[0091] Step S701: For any predicate corresponding to the variable, evaluate the importance of the predicate and obtain the predicate evaluation score;

[0092] Step S702: Based on the predicate evaluation score, determine the predicate with the highest predicate evaluation score from all predicates corresponding to the variable as the target predicate.

[0093] In this embodiment, the predicate evaluation score can refer to the score that characterizes the importance of the predicate.

[0094] Specifically, in obtaining the predicate evaluation score, for any predicate corresponding to a variable, the predicate support score, representing the frequency of matching of the predicate in the graph data, is calculated. Existing candidate preconditions in the pattern path are identified, and the difference score, representing the degree of difference between the predicate and the existing candidate preconditions in the pattern path, is calculated. Based on the predicate support score and the difference score, the predicate evaluation score is obtained. Based on the predicate evaluation score, the predicate with the highest predicate evaluation score among all predicates corresponding to the variable is determined as the target predicate.

[0095] For example, for any variable in the pattern path, in order to determine which of the predicates defined on that variable can be used as the target predicate to form a candidate premise, the predicate support score and the dissimilarity score of the predicate are considered at the same time to obtain the predicate evaluation score.

[0096] Let variable z i The prerequisite for the candidate to be generated is X. ρ,i In the variable z i If the predicate defined above is p, then for the variable z i For any of the above predicates, the formula for calculating the predicate evaluation score can be: (X ρ,i ,p)=w s ·||Q(x0,y0,G,X ρ,i ^p)|+w d ·diff(X ρ,i ∧p,X ρ ,G)

[0097] Among them, (X) ρ,i p) represents the predicate evaluation score; w s and w d For weights, w s +w d =1; G represents graph data, Q represents the target graph pattern, used to depict the topological structure between user x0 and item y0 related to recommendation decisions, X ρ For variable z i The mode path it is located in;

[0098] In this embodiment, for any predicate corresponding to a variable, the predicate support score (representing the frequency of matching of the predicate in graph data) and the difference score (representing the degree of difference between the predicate and existing candidate predicates in the pattern path) are comprehensively considered to obtain a predicate evaluation score. The predicate with the highest predicate evaluation score is then selected as the target predicate. This ensures that the candidate predicates generated based on the target predicate can fully reflect the predictions of the recommendation model, thereby improving the effectiveness and reliability of the mined target explanation rules, and ultimately enhancing the effectiveness and reliability of the global explanation.

[0099] Referring to Figure 8, which is a flowchart of a rule mining method provided in Embodiment Six of this application, as shown in Figure 8, the step S206 above, which determines the candidate interpretation rule that meets the preset conditions from all candidate interpretation rules as the target interpretation rule, may include the following steps:

[0100] Step S801: For any candidate explanatory rule, calculate the rule support score representing the frequency of matching of the candidate explanatory rule in the graph data, and calculate the confidence score representing the association strength between the rule premises corresponding to the candidate explanatory rule and the predicted user item pair.

[0101] Step S802: If the rule support score reaches a preset first threshold and the confidence score reaches a preset second threshold, then the candidate explanatory rule is determined to meet the preset conditions and is determined to be the target explanatory rule.

[0102] In this embodiment, the rule support score can be a score that represents the frequency of matching of candidate explanatory rules in graph data, the confidence score can be a score that represents the strength of association between the rule premises corresponding to the candidate explanatory rule and the predicted user item pair, and the preset first threshold and preset second threshold can be preset score values.

[0103] Specifically, the rule support score, which represents the frequency of matching of candidate explanatory rules in graph data, is defined as:

[0104] in, Score the support for the rule. G represents candidate interpretation rules, X represents rule preconditions, Q represents target graph patterns used to depict the topological structure between user x0 and item y0 related to recommendation decisions, and M(x0,y0) represents user-item pairs.

[0105] The confidence score representing the association strength between the candidate explanatory rule and the corresponding rule preconditions and the predicted user item pair M(x0,y0) is defined as:

[0106] in, Confidence score;

[0107] If the first threshold is preset to ε and the second threshold is preset to σ, then for any target interpretation rule, we have:

[0108] In this embodiment, the rule support score, which represents the frequency of matching of candidate explanatory rules in graph data, and the confidence score, which represents the association strength between the rule preconditions and the predicted user-item pair of the candidate explanatory rules, are calculated. Candidate explanatory rules whose rule support score reaches a preset first threshold and whose confidence score reaches a preset second threshold are selected as target explanatory rules. This improves the effectiveness and reliability of the target explanatory rules obtained through mining, thereby improving the effectiveness and reliability of the global explanatory process.

[0109] Corresponding to the rule mining method for recommendation model interpretation in the above embodiments, Figure 9 shows a structural block diagram of the rule mining device for recommendation model interpretation provided in Embodiment 7 of this application. The rule mining device is applied to the server in Figure 1. For ease of explanation, only the parts related to the embodiments of this application are shown.

[0110] Referring to Figure 9, the rule-digging device includes:

[0111] The acquisition module 91 is used to acquire graph data and determine all user-item pairs in the graph data, wherein the user-item pairs are node pairs representing the mapping relationship between users and items obtained by recommending items to users in the graph data based on a recommendation model;

[0112] The subgraph determination module 92 is configured to, for any user item pair, determine a neighborhood graph of the user item pair from the graph data, and all connected subgraphs of the neighborhood graph containing the user item pair, determine at least one candidate subgraph from all connected subgraphs, evaluate the candidate subgraph according to the neighborhood graph for any candidate subgraph to obtain a graph evaluation score, and determine a target subgraph from all candidate subgraphs according to the graph evaluation score;

[0113] The graph pattern determination module 93 is used to walk in the target subgraph starting from the user item pair to obtain a simulated path, extract a pattern from the simulated path for any simulated path to obtain a pattern path, and form a target graph pattern from all the pattern paths.

[0114] The condition mining module 94 is used to determine all variables and all predicates defined on each variable in any pattern path in the target graph pattern, and to determine a target predicate from all predicates corresponding to any variable in the pattern path, and to form a candidate precondition by combining the variable and the target predicate.

[0115] The condition determination module 95 is used to traverse all variables in the pattern path, obtain the candidate preconditions corresponding to each variable in the pattern path, and form a set of candidate preconditions corresponding to the pattern path by combining the candidate preconditions corresponding to all variables in the pattern path.

[0116] The rule mining module 96 is used to obtain at least one candidate interpretation rule based on the target graph pattern and the set of candidate preconditions corresponding to all pattern paths in the target graph pattern, and to determine the candidate interpretation rule that meets the preset conditions from all candidate interpretation rules as the target interpretation rule.

[0117] Optionally, the subgraph determination module 92 includes:

[0118] A tree construction unit is used to construct a search tree based on the neighborhood graph and all connected subgraphs, wherein the root node in the search tree represents the neighborhood graph, any non-root node represents a connected subgraph, and the size of the connected subgraph gradually decreases along the path from the root node to any leaf node.

[0119] The first calculation unit is used to calculate the first recommendation strength value of the user item pair recommended by the recommendation model on the neighborhood graph;

[0120] An evaluation unit is configured to, in the search tree, select a path from the root node to a leaf node according to a preset selection strategy, determine the connected subgraph represented by the leaf node as the candidate subgraph, calculate a second recommendation strength value of the user item pair recommended by the recommendation model on the candidate subgraph, evaluate the candidate subgraph based on the second recommendation strength value and the first recommendation strength value, and obtain a graph evaluation score for the candidate subgraph.

[0121] An iterative unit is used to return to the step of selecting a path from the root node to a leaf node according to the preset selection strategy, until the preset iteration stop condition is reached, and obtain the graph evaluation score of all candidate subgraphs;

[0122] The selection unit is used to determine the candidate subgraph corresponding to the highest graph evaluation score from all candidate subgraphs as the target subgraph.

[0123] Optionally, the graph pattern determination module 93 includes:

[0124] A node determination unit is used to determine the user node representing the user and the item node representing the item in the user-item pair.

[0125] The first walking unit is used to perform a random walk with a preset probability starting from the user node in the target subgraph to obtain a first simulated path, and then return to execute the step of performing a random walk with a preset probability starting from the user node until a preset walking stop condition is met, so as to obtain all the first simulated paths starting from the user node.

[0126] The second walking unit is used to perform a random walk with the preset probability starting from the item node to obtain a second simulated path, and then return to execute the step of performing a random walk with the preset probability starting from the item node until the preset walking stop condition is met, so as to obtain all the second simulated paths starting from the item node.

[0127] The extraction unit is configured to perform pattern extraction on any first simulation path to obtain a first pattern path, and to perform pattern extraction on any second simulation path to obtain a second pattern path.

[0128] The first pattern forming unit is used to form all first pattern paths into a graph pattern corresponding to the user node, and to form all second pattern paths into a graph pattern corresponding to the item node.

[0129] The second pattern forming unit is used to form the target graph pattern by combining the graph pattern corresponding to the user node and the graph pattern corresponding to the item node.

[0130] Optionally, the condition mining module 94 includes:

[0131] The predicate evaluation unit is used to evaluate the importance of any predicate corresponding to the variable and obtain a predicate evaluation score.

[0132] The predicate determination unit is used to determine the predicate corresponding to the highest predicate evaluation score from all predicates corresponding to the variable as the target predicate based on the predicate evaluation score.

[0133] Optionally, the predicate evaluation unit includes:

[0134] The second calculation subunit is used to calculate, for any predicate corresponding to the variable, a predicate support score that represents the degree to which the predicate can be matched in the graph data;

[0135] The third calculation subunit is used to determine the existing candidate preconditions in the pattern path and calculate the difference score that characterizes the degree of difference between the predicate and the existing candidate preconditions in the pattern path.

[0136] The fourth calculation subunit is used to obtain the predicate evaluation score based on the predicate support score and the difference score.

[0137] Optionally, the rule mining module 96 includes:

[0138] The extraction unit is used to extract a preset number of candidate prerequisites from the candidate prerequisite set corresponding to any pattern path in the target graph pattern.

[0139] The rule condition forming unit is used to form a rule condition from the candidate preconditions extracted from all pattern paths;

[0140] The rule forming unit is used to combine the target graph pattern and the rule preconditions to obtain the candidate interpretation rule.

[0141] Optionally, the rule mining module 96 includes:

[0142] The fifth calculation unit is used to calculate, for any candidate explanatory rule, a rule support score that represents the frequency of matching of the candidate explanatory rule in the graph data, and a confidence score that represents the association strength between the rule premises corresponding to the candidate explanatory rule and the predicted user item pair.

[0143] The rule filtering unit is configured to determine that the candidate explanatory rule satisfies the preset conditions and is determined as the target explanatory rule if the rule support score reaches a preset first threshold and the confidence score reaches a preset second threshold.

[0144] In one embodiment, a computer device, which may be a server, is provided, and its internal structure diagram is shown in Figure 10. The computer device includes a processor, memory, a network interface, and a database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, a readable storage medium, and the database. The internal memory provides an environment for the operation of the operating system and the readable storage medium. The database stores graph data. The network interface communicates with external terminals via a network connection. When executed by the processor, the readable storage medium implements a rule mining method for interpreting recommendation models.

[0145] In one embodiment, a computer device is provided, including a memory, a processor, and a readable storage medium stored on the memory and executable on the processor. When the processor executes the readable storage medium, it implements the steps of the rule-based recommendation model interpretation method in the above embodiments, such as steps S201-S206 shown in FIG2, or the steps shown in FIG3 to 8. To avoid repetition, these steps will not be described again here. Alternatively, when the processor executes the readable storage medium, it can also implement the functions of the various modules / units in this embodiment of the rule mining device for recommendation model interpretation, such as the functions of the acquisition module 91, subgraph determination module 92, graph pattern determination module 93, condition mining module 94, condition determination module 95, and rule mining module 96 shown in FIG9. To avoid repetition, these functions will not be described again here.

[0146] In one embodiment, one or more readable storage media storing computer-readable instructions are provided. When executed by one or more processors, these computer-readable instructions cause the processors to perform the steps of the rule mining method for interpreting the recommendation model described in the above embodiments, such as steps S201-S206 shown in FIG2, or the steps shown in FIG3 to 8. To avoid repetition, these steps will not be described again here. Alternatively, the functions of the modules / units in this embodiment of the rule mining apparatus for interpreting the recommendation model when the processor executes the readable storage media may be described, such as the functions of the acquisition module 91, subgraph determination module 92, graph pattern determination module 93, condition mining module 94, condition determination module 95, and rule mining module 96 shown in FIG9. To avoid repetition, these functions will not be described again here.

[0147] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by instructing related hardware through a readable storage medium. The readable storage medium can be stored in a non-volatile computer-readable storage medium, which, when executed, can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0148] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0149] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A rule mining method for recommendation model explanation, wherein, The rule mining method comprises: obtaining graph data, determining all user-item pairs in the graph data, wherein the user-item pair is a node pair representing the mapping relationship between the user and the item obtained by recommending the user in the graph data based on a recommendation model; for any user-item pair, determining a neighborhood graph of the user-item pair from the graph data, and all connected subgraphs containing the user-item pair in the neighborhood graph, determining at least one candidate subgraph from all connected subgraphs, for any candidate subgraph, evaluating the candidate subgraph according to the neighborhood graph to obtain a graph evaluation score, and determining a target subgraph from all candidate subgraphs according to the graph evaluation score; in the target subgraph, starting from the user-item pair to obtain a simulated path, for any simulated path, extracting a pattern from the simulated path to obtain a pattern path, and forming a target graph pattern from all pattern paths; for any pattern path in the target graph pattern, determining all variables in the pattern path and all predicates defined on each variable, for any variable in the pattern path, determining a target predicate from all predicates corresponding to the variable, and forming a candidate premise condition from the variable and the target predicate; traversing all variables in the pattern path to obtain a candidate premise condition corresponding to each variable in the pattern path, and forming a candidate premise condition set corresponding to the pattern path from the candidate premise conditions corresponding to all variables in the pattern path; obtaining at least one candidate explanation rule from the target graph pattern and the candidate premise condition set corresponding to all pattern paths in the target graph pattern, and determining a candidate explanation rule satisfying a preset condition as a target explanation rule from all candidate explanation rules.

2. The rule mining method of claim 1, wherein, The method comprises: constructing a search tree according to the neighborhood graph and all connected subgraphs, wherein the root node of the search tree represents the neighborhood graph, any non-root node represents a connected subgraph, and the size of the connected subgraph gradually decreases from the root node to any leaf node; calculating a first recommendation intensity value of the recommendation model for recommending the user-item pair in the neighborhood graph; in the search tree, according to a preset selection strategy, selecting a path from the root node to a leaf node to determine the connected subgraph represented by the leaf node as the candidate subgraph, calculating a second recommendation intensity value of the recommendation model for recommending the user-item pair in the candidate subgraph, evaluating the candidate subgraph according to the second recommendation intensity value and the first recommendation intensity value to obtain a graph evaluation score of the candidate subgraph; returning to the step of selecting a path from the root node to a leaf node according to the preset selection strategy until a preset iteration stopping condition is reached to obtain the graph evaluation scores of all candidate subgraphs; From all candidate sub-graphs, determine the candidate sub-graph corresponding to the highest graph evaluation score as the target sub-graph.

3. The rule mining method of claim 1, wherein, The target sub-graph is used as a starting point for the user item pair to obtain a simulation path. For any simulation path, mode extraction is performed on the simulation path to obtain a mode path, and all mode paths form a target graph mode, including: Determine the user node representing the user and the item node representing the item in the user item pair; In the target sub-graph, starting from the user node, random walk is performed with a preset probability to obtain a first simulation path, and the step of starting from the user node and performing random walk with a preset probability is returned until a preset walk stop condition is met, obtaining all first simulation paths starting from the user node; Starting from the item node, random walk is performed with a preset probability to obtain a second simulation path, and the step of starting from the item node and performing random walk with a preset probability is returned until the preset walk stop condition is met, obtaining all second simulation paths starting from the item node; For any first simulation path, mode extraction is performed on the first simulation path to obtain a first mode path, and for any second simulation path, mode extraction is performed on the second simulation path to obtain a second mode path; All first mode paths form a graph mode corresponding to the user node, and all second mode paths form a graph mode corresponding to the item node; The graph mode corresponding to the user node and the graph mode corresponding to the item node form the target graph mode.

4. The rule mining method of claim 1, wherein, The target predicate is determined from all predicates corresponding to the variable, including: For any predicate corresponding to the variable, the importance of the predicate is evaluated to obtain a predicate evaluation score; According to the predicate evaluation score, the predicate corresponding to the highest predicate evaluation score from all predicates corresponding to the variable is determined as the target predicate.

5. The rule mining method according to claim 4, wherein, For any predicate corresponding to the variable, the importance of the predicate is evaluated to obtain a predicate evaluation score, including: For any predicate corresponding to the variable, calculate the predicate support score representing the matchable frequency of the predicate in the graph data; Determine the existing candidate premise condition in the mode path, calculate the difference degree score representing the difference degree between the predicate and the existing candidate premise condition in the mode path; According to the predicate support score and the difference degree score, the predicate evaluation score is obtained.

6. The rule mining method of claim 1, wherein, According to the target graph mode and the candidate premise condition set corresponding to all mode paths in the target graph mode, at least one candidate explanation rule is obtained, including: For any mode path in the target graph mode, extract a preset number of candidate premise conditions from the candidate premise condition set corresponding to the mode path; The candidate premise conditions extracted from all mode paths form a rule premise condition; The target graph mode and the rule premise condition are combined to obtain the candidate explanation rule.

7. The rule mining method of claim 1, wherein, The determining, from all candidate explanation rules, a candidate explanation rule meeting a preset condition as a target explanation rule comprises: For any candidate explanation rule, a rule support score representing a matchable frequency of the candidate explanation rule in the graph data is calculated, and a confidence score representing a confidence of a rule premise condition corresponding to the candidate explanation rule and a predicted association strength of the user-item pair is calculated; If the rule support score reaches a preset first threshold and the confidence score reaches a preset second threshold, it is determined that the candidate explanation rule meets the preset condition, and the candidate explanation rule is determined as the target explanation rule.

8. A rule mining apparatus for recommendation model explanation, wherein, The rule mining device comprises: An acquisition module is configured to acquire graph data and determine all user-item pairs in the graph data, wherein the user-item pair is a node pair representing a mapping relationship between a user and an item obtained by performing item recommendation on the user in the graph data based on a recommendation model; A subgraph determination module is configured to determine, for any user-item pair, a neighborhood graph of the user-item pair from the graph data, and all connected subgraphs containing the user-item pair in the neighborhood graph, determine at least one candidate subgraph from all connected subgraphs, for any candidate subgraph, evaluate the candidate subgraph according to the neighborhood graph to obtain a graph evaluation score, and determine a target subgraph from all candidate subgraphs according to the graph evaluation score; A graph pattern determination module is configured to perform a walk from the user-item pair as a starting point in the target subgraph to obtain a simulation path, perform pattern extraction on any simulation path to obtain a pattern path, and form a target graph pattern from all pattern paths; A condition mining module is configured to determine, for any pattern path in the target graph pattern, all variables in the pattern path and all predicates defined on each variable, determine a target predicate from all predicates corresponding to any variable in the pattern path, and form a candidate premise condition from the variable and the target predicate; A condition determination module is configured to traverse all variables in the pattern path to obtain a candidate premise condition corresponding to each variable in the pattern path, and form a candidate premise condition set corresponding to the pattern path from the candidate premise conditions corresponding to all variables in the pattern path; A rule mining module is configured to obtain at least one candidate explanation rule from the target graph pattern and the candidate premise condition sets corresponding to all pattern paths in the target graph pattern, and determine, from all candidate explanation rules, a candidate explanation rule meeting a preset condition as a target explanation rule.

9. A computer device comprising a memory, a processor, and a readable storage medium stored in the memory and executable on the processor, wherein, The processor, when executing the readable storage medium, implements the following steps: Acquire graph data and determine all user-item pairs in the graph data, wherein the user-item pair is a node pair representing a mapping relationship between a user and an item obtained by performing item recommendation on the user in the graph data based on a recommendation model; determining, for any user-item pair, a neighborhood graph of the user-item pair from the graph data and all connected subgraphs containing the user-item pair in the neighborhood graph, determining at least one candidate subgraph from all connected subgraphs, for any candidate subgraph, evaluating the candidate subgraph according to the neighborhood graph to obtain a graph evaluation score, and determining a target subgraph from all candidate subgraphs according to the graph evaluation score; in the target subgraph, performing a walk starting from the user-item pair to obtain a simulation path, for any simulation path, performing pattern extraction on the simulation path to obtain a pattern path, and forming a target graph pattern from all pattern paths; for any pattern path in the target graph pattern, determining all variables in the pattern path and all predicates defined on each variable, determining a target predicate from all predicates corresponding to any variable in the pattern path, and forming a candidate premise condition from the variable and the target predicate; iterating through all variables in the pattern path to obtain a candidate premise condition corresponding to each variable in the pattern path, and forming a candidate premise condition set corresponding to the pattern path from candidate premise conditions corresponding to all variables in the pattern path; obtaining at least one candidate explanation rule from the target graph pattern and the candidate premise condition set corresponding to all pattern paths in the target graph pattern, and determining a candidate explanation rule satisfying a preset condition as a target explanation rule from all candidate explanation rules.

10. The computer device of claim 9, wherein, The determining at least one candidate subgraph from all connected subgraphs, for any candidate subgraph, evaluating the candidate subgraph according to the neighborhood graph to obtain a graph evaluation score, and determining a target subgraph from all candidate subgraphs according to the graph evaluation score, comprises: constructing a search tree according to the neighborhood graph and all connected subgraphs, wherein the root node of the search tree represents the neighborhood graph, any non-root node represents a connected subgraph, and the size of the connected subgraph gradually decreases on the path from the root node to any leaf node; calculating a first recommendation intensity value of the recommendation model for recommending the user-item pair on the neighborhood graph; in the search tree, selecting a path from the root node to a leaf node according to a preset selection strategy, determining the connected subgraph represented by the leaf node as the candidate subgraph, calculating a second recommendation intensity value of the recommendation model for recommending the user-item pair on the candidate subgraph, evaluating the candidate subgraph according to the second recommendation intensity value and the first recommendation intensity value to obtain a graph evaluation score of the candidate subgraph; returning to the step of selecting a path from the root node to a leaf node according to the preset selection strategy until a preset iteration stopping condition is reached to obtain graph evaluation scores of all candidate subgraphs; determining the candidate subgraph corresponding to the highest graph evaluation score from all candidate subgraphs as the target subgraph.

11. The computer device of claim 9, wherein, The user item pair in the target subgraph is taken as a starting point to obtain a simulation path, for any simulation path, a mode extraction is performed on the simulation path to obtain a mode path, and all mode paths form a target graph mode, including: determining a user node representing a user and an item node representing an item in the user item pair; in the target subgraph, starting from the user node, random walk is performed with a preset probability to obtain a first simulation path, and the step of starting from the user node and performing random walk with a preset probability is returned until a preset walk stop condition is met, to obtain all first simulation paths starting from the user node; starting from the item node, random walk is performed with the preset probability to obtain a second simulation path, and the step of starting from the item node and performing random walk with the preset probability is returned until the preset walk stop condition is met, to obtain all second simulation paths starting from the item node; for any first simulation path, a mode extraction is performed on the first simulation path to obtain a first mode path, and for any second simulation path, a mode extraction is performed on the second simulation path to obtain a second mode path; all first mode paths form a graph mode corresponding to the user node, and all second mode paths form a graph mode corresponding to the item node; the graph mode corresponding to the user node and the graph mode corresponding to the item node form the target graph mode.

12. The computer device of claim 9, wherein, The target predicate is determined from all predicates corresponding to the variable in the mode path, including: for any predicate corresponding to the variable, the importance of the predicate is evaluated to obtain a predicate evaluation score; according to the predicate evaluation score, the predicate corresponding to the highest predicate evaluation score from all predicates corresponding to the variable is determined as the target predicate.

13. The computer device of claim 12, wherein, The importance of the predicate is evaluated for any predicate corresponding to the variable to obtain a predicate evaluation score, including: for any predicate corresponding to the variable, a predicate support score representing the matchable frequency of the predicate in the graph data is calculated; determine the existing candidate premise condition in the mode path, calculate the difference degree score representing the difference degree between the predicate and the existing candidate premise condition in the mode path; according to the predicate support score and the difference degree score, the predicate evaluation score is obtained.

14. The computer device of claim 9, wherein, According to the target graph mode and the candidate premise condition set corresponding to all mode paths in the target graph mode, at least one candidate explanation rule is obtained, including: for any mode path in the target graph mode, a preset number of candidate premise conditions are extracted from the candidate premise condition set corresponding to the mode path; candidate premise conditions extracted from all mode paths form a rule premise condition; the target graph mode and the rule premise condition are combined to obtain the candidate explanation rule.

15. The computer device of claim 9, wherein, The candidate explanation rule satisfying the preset condition is determined as the target explanation rule from all candidate explanation rules, including: calculating a rule support score representing a frequency of the candidate explanation rule being matched in the graph data, and calculating a confidence score representing a confidence of the candidate explanation rule in predicting a strength of the user-item pair association; if the rule support score reaches a preset first threshold and the confidence score reaches a preset second threshold, determining that the candidate explanation rule meets the preset condition, and determining the candidate explanation rule as the target explanation rule.

16. One or more readable storage media having stored thereon computer- readable instructions, the computer-readable storage media having stored thereon computer- readable instructions, wherein, The computer readable instructions, when executed by one or more processors, cause the one or more processors to perform the following steps: obtaining graph data, and determining all user-item pairs in the graph data, wherein the user-item pair is a node pair representing a mapping relationship between a user and an item obtained by recommending the user in the graph data based on a recommendation model; for any user-item pair, determining a neighborhood graph of the user-item pair from the graph data, and determining all connected subgraphs containing the user-item pair in the neighborhood graph, determining at least one candidate subgraph from all connected subgraphs, for any candidate subgraph, evaluating the candidate subgraph according to the neighborhood graph to obtain a graph evaluation score, and determining a target subgraph from all candidate subgraphs according to the graph evaluation score; in the target subgraph, starting from the user-item pair to obtain a simulation path, for any simulation path, extracting a pattern from the simulation path to obtain a pattern path, and forming a target graph pattern from all pattern paths; for any pattern path in the target graph pattern, determining all variables in the pattern path and all predicates defined on each variable, for any variable in the pattern path, determining a target predicate from all predicates corresponding to the variable, and forming a candidate premise condition from the variable and the target predicate; traversing all variables in the pattern path to obtain a candidate premise condition corresponding to each variable in the pattern path, and forming a candidate premise condition set corresponding to the pattern path from the candidate premise conditions corresponding to all variables in the pattern path; obtaining at least one candidate explanation rule from the target graph pattern and the candidate premise condition sets corresponding to all pattern paths in the target graph pattern, and determining a candidate explanation rule meeting a preset condition from all candidate explanation rules as a target explanation rule.

17. The readable storage medium of claim 16, wherein, The determining at least one candidate subgraph from all connected subgraphs, for any candidate subgraph, evaluating the candidate subgraph according to the neighborhood graph to obtain a graph evaluation score, and determining a target subgraph from all candidate subgraphs according to the graph evaluation score, comprises: constructing a search tree according to the neighborhood graph and all connected subgraphs, wherein the root node of the search tree represents the neighborhood graph, any non-root node represents a connected subgraph, and the size of the connected subgraph gradually decreases from the root node to any leaf node; calculating a first recommendation strength value of the recommendation model in recommending the user-item pair in the neighborhood graph; In the search tree, according to a preset selection strategy, a path is selected from the root node to a leaf node, the connected subgraph represented by the leaf node is determined as the candidate subgraph, a second recommendation strength value of the user-item pair recommended by the recommendation model on the candidate subgraph is calculated, and the candidate subgraph is evaluated according to the second recommendation strength value and the first recommendation strength value to obtain a graph evaluation score of the candidate subgraph. The step of selecting a path from the root node to a leaf node according to a preset selection strategy is returned to execute until a preset iteration stopping condition is reached, and the graph evaluation scores of all candidate subgraphs are obtained. From all candidate subgraphs, the candidate subgraph corresponding to the highest graph evaluation score is determined as the target subgraph.

18. The readable storage medium of claim 16, wherein, In the target subgraph, a walk is performed starting from the user-item pair to obtain a simulation path, for any simulation path, a pattern is extracted from the simulation path to obtain a pattern path, and all pattern paths form a target graph pattern, including: determining a user node representing a user and an item node representing an item in the user-item pair; In the target subgraph, a random walk is performed starting from the user node with a preset probability to obtain a first simulation path, and the step of performing a random walk starting from the user node with a preset probability is returned to execute until a preset walk stopping condition is met, and all first simulation paths starting from the user node are obtained. A random walk is performed starting from the item node with the preset probability to obtain a second simulation path, and the step of performing a random walk starting from the item node with the preset probability is returned to execute until the preset walk stopping condition is met, and all second simulation paths starting from the item node are obtained. For any first simulation path, a pattern is extracted from the first simulation path to obtain a first pattern path, and for any second simulation path, a pattern is extracted from the second simulation path to obtain a second pattern path; All first pattern paths form a graph pattern corresponding to the user node, and all second pattern paths form a graph pattern corresponding to the item node; The graph pattern corresponding to the user node and the graph pattern corresponding to the item node form the target graph pattern.

19. The readable storage medium of claim 16, wherein, For any variable in the pattern path, a target predicate is determined from all predicates corresponding to the variable, including: For any predicate corresponding to the variable, the importance of the predicate is evaluated to obtain a predicate evaluation score; According to the predicate evaluation score, the predicate corresponding to the highest predicate evaluation score from all predicates corresponding to the variable is determined as the target predicate.

20. The readable storage medium of claim 19, wherein, For any predicate corresponding to the variable, the importance of the predicate is evaluated to obtain a predicate evaluation score, including: For any predicate corresponding to the variable, a predicate support score representing the matchable frequency of the predicate in the graph data is calculated; determining an existing candidate premise in the pattern path, and calculating a difference degree score representing a difference degree between the predicate and the existing candidate premise in the pattern path; obtaining the predicate evaluation score according to the predicate support degree score and the difference degree score.