Subgraph extraction program, method, and device
By calculating similarity and degree constraints, the method ensures the extracted subgraph closely relates to the edge of interest while preserving the graph's structure, addressing the limitations of existing subgraph extraction methods.
Patent Information
- Application Number
- PCT/JP2024/013284
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-03-29
- Publication Date
- 2025-10-02
AI Technical Summary
Existing methods for extracting subgraphs from complex graphs, such as those used in AI ethical risk assessments, struggle to maintain structural integrity while identifying edges related to an edge of interest, often including weakly related edges and failing to preserve attribute relationships.
A method that calculates similarity and degree constraints to select edges based on their attributes and structural importance, using a similarity matrix and adaptive update mechanisms to ensure the extracted subgraph closely relates to the edge of interest while maintaining graph structure.
The method effectively extracts a subgraph that is structurally similar to the input graph and closely related to the edge of interest, improving attribute similarity and maintaining the graph's overall structure.
Smart Images

Figure JP2024013284_02102025_PF_FP_ABST
Abstract
Description
Subgraph extraction program, method, and apparatus
[0001] The disclosed technology relates to a subgraph extraction program, a subgraph extraction method, and a subgraph extraction device.
[0002] Artificial intelligence (AI) systems are used to perform a variety of tasks in a variety of industries. The use of AI systems can sometimes result in ethical risks (hereinafter referred to as "AI ethical risks"). When AI ethical risks occur, not only can the companies and organizations that provide the AI systems lose social credibility, but there can also be significant negative impacts on the users of the AI systems and the society beyond. When considering AI ethical risks, it is also necessary to take into account changes in the social situation surrounding the multiple stakeholders related to AI systems.
[0003] Assessment techniques for analyzing the emergence of AI ethical risks through the use of AI systems such as those described above are being actively researched. Graphs, in particular, with stakeholders as nodes and risks that may arise in interactions between stakeholders as edges, are easy to visualize and analyze, and demand for these techniques is growing. When the graphs resulting from analysis using assessment techniques are complex, users have difficulty interpreting the results, such as risk propagation, from the graph. Representing analysis results in graphs like the ones described above is not limited to assessing AI ethical risks, but can also be used to analyze a variety of data. Similarly, when the graphs resulting from analysis are complex, users have difficulty interpreting them.
[0004] Therefore, a technique has been proposed that probabilistically outputs a subgraph whose average degree is closest to that of the input graph. This technique evaluates the average degree of the subgraph each time an edge to be included in the subgraph is selected. If the difference in average degree between the input graph and the subgraph is positive, edges with higher degrees are selected preferentially, and if the difference in average degree is negative, edges with lower degrees are selected preferentially.
[0005] Also, for example, a method has been proposed for recording a summary graph summarized from a large-scale graph and calibration information indicating the difference between the large-scale graph and the summary graph. This method detects changed edges from the large-scale graph, detects changed nodes connected by the changed edges based on the changed edges, and updates the summary graph and calibration information based on each changed node.
[0006] Also proposed is a method for adaptively assessing meta-relationships in a semantic graph, for example. The method includes providing a semantic graph based on a knowledge base in which concepts in the form of graph nodes are linked by semantic relationships in the form of graph edges, encoding weights for measuring the meta-relationships into metadata for the edges and nodes of the semantic graph, where the meta-relationships are applied to the concepts in the semantic graph and are independent of the semantic relationships defined by the edges of the semantic graph, and performing graph activation on input contexts related to one or more concepts in the semantic graph, where the weights are applied to spreading activation signals through the semantic graph to generate measures of meta-relationships for a subset of the concepts in the semantic graph.
[0007] JP 2022-019505 A U.S. Patent Application Publication No. 2018 / 0373701
[0008] Wang, K., "An adaptive graph sampling framework for graph analytics," Social Network Analysis and Mining, 2023.
[0009] However, in the method of extracting subgraphs by evaluating the average degree of a graph, there are cases where the subgraph contains edges that are weakly related to the edge of interest, and it can be difficult to discover the relationship between edge attributes from the output subgraph.In addition, neither the method of creating a summary graph from a large-scale graph nor the method of adaptively evaluating meta-relationships in a semantic graph extracts subgraphs related to the edge of interest.
[0010] In one aspect, the disclosed technology aims to extract a subgraph related to an edge of interest while suppressing differences in structure from an input graph.
[0011] In one aspect, the disclosed technology calculates a similarity between an edge of interest included in a graph and other edges other than the edge of interest based on the attributes associated with the edge of interest and the other edges. The graph includes multiple nodes, multiple edges connecting the nodes, and multiple attributes associated with each of the edges that indicate relationships between the nodes connected by the edges. The disclosed technology also calculates the degree of a subgraph including an edge selected from the graph. The disclosed technology then creates a subgraph including an edge selected from the graph and a node connected by the selected edge with a probability based on the similarity, a first constraint on the similarity, and a second constraint on the degree.
[0012] As one aspect, it has an effect of being able to extract a subgraph related to an edge of interest while suppressing differences in structure from the input graph.
[0013] 1 is a diagram showing an example of a graph representing the analysis results of an AI ethical risk assessment. FIG. 2 is a diagram for explaining the degree of a graph. FIG. 3 is a diagram for explaining reference method 1. FIG. 4 is a diagram for explaining reference method 2. FIG. 5 is a diagram for explaining the method of this embodiment. FIG. 6 is a functional block diagram of a subgraph extraction device according to this embodiment. FIG. 7 is a diagram for explaining similarity. FIG. 8 is a diagram for explaining uniformity. FIG. 9 is a block diagram showing a schematic configuration of a computer that functions as a subgraph extraction device. FIG. 10 is a flowchart showing the flow of subgraph extraction processing. FIG. 11 is a flowchart showing the flow of λ update processing. FIG. 12 is a diagram for explaining an example of λ update processing. FIG. 13 is a schematic diagram showing the effect of this embodiment. FIG. 14 is a diagram for explaining another example of λ update processing.
[0014] Hereinafter, an example of an embodiment of the disclosed technology will be described with reference to the drawings.
[0015] Before describing the details of this embodiment, the purpose of extracting subgraphs in this embodiment and the issues with the reference method will be described using an example of assessment analysis of AI ethical risks.
[0016] Figure 1 shows a graph representing the analysis results of an AI ethical risk assessment. The graph includes multiple nodes, multiple edges connecting the nodes, and multiple attributes associated with each edge, showing the relationships between the nodes connected by the edges.
[0017] In AI ethical risk assessment, nodes correspond to stakeholders, edges connect nodes corresponding to stakeholders where interactions occur, and attributes correspond to risks that may arise in the interactions. In Figure 1, ellipses represent nodes, and the names of stakeholders corresponding to the nodes are written inside the nodes. Furthermore, arrows connecting nodes represent edges, and risk-related statements (text data) written alongside the edges represent attributes associated with the nodes. This is also true for the following figures.
[0018] Generally, a graph showing the analysis results of an AI ethical risk assessment has a complex structure, for example, with tens of nodes and hundreds of edges, and the risks corresponding to each edge are diverse. This makes it difficult for a user to identify, for example, the propagation of risks they want to focus on. Therefore, in this embodiment, the purpose of extracting a subgraph from the input graph is to support the user's understanding, such as identifying risk propagation, by extracting a subgraph with a limited number of edges that includes an edge of interest specified by the user. Hereinafter, the edge of interest specified by the user is referred to as the "edge of interest."
[0019] In the following, the input graph is G=(V, E, T), and the edge of interest is e q , e q A subgraph including these is represented as G' = (V', E', T'). V and V' are node sets, E and E' are edge sets, and T and T' are attribute sets. In this embodiment, the graph also includes multiple edges that have the same direction and the same node, and are associated with multiple different attributes.
[0020] As a method for extracting a subgraph from an input graph, there is a method for extracting a subgraph by evaluating the average degree of the graph (hereinafter referred to as "Reference Method 1").
[0021] Here, the degree of a graph is a representative value that takes into account the shape and structure of the graph. Specifically, as shown in FIG. 2, the degree nd of node u is u is the number of edges connecting to the node, and the degree ed of edge e e The average degree ed of the nodes u and w at both ends of the edge e e = (nd u +nd w ) / 2, the average degree of graph G (ND) G , (ND) G = 2|E| / |V|, where |E| is the number of edges included in graph G, and |V| is the number of nodes included in graph G. By using such degrees, nodes and edges with high degrees represent nodes and edges corresponding to stakeholders who have frequent interactions with each other.
[0022] Reference method 1 imposes a constraint on the difference in average degree between graph G and subgraph G′ (|(ND) G -(ND) ̄ G’ Under the constraints of |<ε) and the number of edges to be included in the subgraph (r|E|=|E'|), edges to be included in the subgraph are selected. ε is an arbitrary threshold, r is a sampling rate, and 0<r<1. Edge selection is performed based on the sampling probability of the following equation (1):
[0023]
[0024] Reference method 1 adaptively updates α in equation (1). Specifically, (ND) G >(ND) ̄ G’ If , then α is increased so that edges with lower degrees are selected. G <(ND) ̄ G’ If , then α is decreased so that edges with higher degrees are selected. Note that if the difference in average degrees is sufficiently small (|(ND) G -(ND) ̄G’ |<ε) does not update α. Reference method 1 repeats the selection of a predetermined number of edges and the update of the probabilities until the above constraint on the number of edges is satisfied.
[0025] However, Reference Method 1 does not take into account the attributes corresponding to the edges in the output subgraph. Therefore, as shown in Figure 3, a subgraph may be output that includes risks that are not very similar to the risk corresponding to the edge of interest specified by the user. In the example of Figure 3, the subgraph includes edges associated with risks related to "adequacy of anomaly testing" and "data privacy," which are weakly related to the risk related to "group fairness" corresponding to the edge of interest. It is difficult to discover the relationship between the attributes corresponding to the edges from such a subgraph.
[0026] One method that can be easily envisioned to solve the problems of Reference Method 1 is to sample only edges that have attributes similar to the edge of interest, as shown in Figure 4. Hereinafter, this method will be referred to as "Reference Method 2." Reference Method 2 performs preprocessing to extract edges that have attributes similar to the edge of interest from graph G, and then applies Reference Method 1, for example, to extract a subgraph.
[0027] However, in Reference Method 2, preprocessing that only considers the similarity of edge attributes makes it difficult to maintain the graph structure, and there is a possibility that the properties of graph G cannot be maintained. In other words, there is no guarantee that an optimal subgraph can be output from the set of edges after preprocessing. In this case, for example, a disconnected subgraph may be extracted, and by looking at a local subgraph, the overall picture of the graph may be overlooked.
[0028] Therefore, in this embodiment, in order to consider a trade-off equation that simultaneously considers the graph structure and the attribute similarity, constraints on the attribute similarity and degree, and an update equation for appropriately adjusting these are newly proposed. As a result, in this embodiment, when selecting an edge, in addition to the degree of the edge, the overall similarity of the graph is evaluated, and a subgraph related to the edge of interest is extracted while suppressing differences in structure from the input graph, as shown in FIG. 5. This embodiment will be described in detail below.
[0029] 6 , the subgraph extraction device 10 according to this embodiment functionally includes a similarity calculation unit 12, a degree calculation unit 14, a selection unit 16, an update unit 18, and a creation unit 20. The selection unit 16, the update unit 18, and the creation unit 20 are examples of the creation unit of the disclosed technology. A selected edge set 30 is also stored in a predetermined storage area of the subgraph extraction device 10.
[0030] The similarity calculation unit 12 calculates the graph G and the target edge e input to the subgraph extraction device 10. q The similarity calculation unit 12 acquires the designation of the target edge e included in the graph G. q and the target edge e q The similarity with other edges other than the edge e q and the attributes associated with each of the other edges.
[0031] Specifically, the similarity calculation unit 12 calculates the similarity between each edge, including the similarity between other edges, for use in the update unit 18, which will be described later. For example, when a graph G including edges e1, e2, e3, e4, and e5 as shown in the upper diagram of FIG. 7 is input, and edge e1 is the target edge e q The similarity calculation unit 12 calculates the similarity sim(ei, ej) between the edge ei and the edge ej, and generates a similarity matrix M as shown in the lower diagram of FIG. s sim(ei, ej) is stored as the element in the i-th row and j-th column of the matrix.
[0032] When each attribute is classified into categories, the similarity calculation unit 12 may calculate the similarity based on whether the categories are the same, or in the case of a numerical attribute, may calculate the similarity based on whether the difference in value is within a threshold. In this embodiment, since risk-related statements are used as attributes, the similarity may be calculated based on the degree of match of character strings, the distance between word vectors, etc. Note that the method of calculating the similarity is not limited to the above method.
[0033] The degree calculation unit 14 calculates the degree of the intermediate subgraph G′ that includes the edges included in the selected edge set 30. Specifically, the degree calculation unit 14 calculates the degree nd of the above-mentioned node u for the subgraph G′.u , the degree ed of edge e e , and the average degree (ND) G’ Similarly to Reference Method 1, the degree calculation unit 14 updates α in the above formula (1) based on the difference in average degree between the graph G and the subgraph G′, and calculates the constraint term w e Calculate.
[0034] The selection unit 16 calculates a sampling probability for each edge included in the graph G based on the similarity with the target edge, the first constraint on the similarity, and the second constraint on the degree. For example, the selection unit 16 calculates the sampling probability P(e) for edge e using the following equation (2):
[0035]
[0036] w e is the value calculated by the degree calculation unit 14 using equation (1), and sim(e, e q ) is the similarity matrix M calculated by the similarity calculation unit 12 s The edge e stored in q is the similarity between P(e) and k. λ is a constraint that adjusts the degree of influence of similarity on the sampling probability, and is a value that is updated by the update unit 18, which will be described later. β∈[0, 1] is a trade-off control parameter that is set in advance by the designer. The denominator is used to randomize the value of P(e) between 0 and 1. The selector 16 selects k edges e with the sampling probability P(e), and adds the selected edges to the selected edge set 30.
[0037] The update unit 18 determines whether the number of edges, which is the number of edges included in the selected edge set 30 and selected by the selection unit 16, has reached a predetermined number. Specifically, the update unit 18 determines whether the constraint on the number of edges (r|E|=|E'|) is satisfied. The update unit 18 updates λ in equation (2) based on the intermediate subgraph G' that includes the edges included in the selected edge set 30, until the constraint on the number of edges is satisfied. After updating λ, the update unit 18 causes the degree calculation unit 14 and the selection unit 16 to repeatedly execute the process.
[0038] Specifically, the update unit 18 extracts edges (hereinafter referred to as "similar edges") that have a predetermined similarity relationship with the edge of interest from among the edges included in the selected edge set 30. For example, the update unit 18 extracts transitionally selected edges as similar edges by designating an edge whose similarity to the edge of interest satisfies a predetermined condition as a first edge and a second edge whose similarity to the first edge satisfies the predetermined condition as a new first edge. The predetermined condition may be, for example, the case where the similarity to the edge of interest is the highest among the other edges. If the ratio of similar edges to the edges included in the selected edge set 30 is equal to or greater than a threshold, the update unit 18 updates the currently set λ to decrease it, and if the ratio is less than the threshold, the update unit 18 updates the currently set λ to increase it.
[0039] This takes into consideration the uniformity of similar edges in the subgraph G' during the process. Uniformity is an index for determining whether the edges included in a subgraph at a certain point in time are all similar. Specifically, it is the ratio of the size of the set of the edge of interest and similar edges to the size of the set of all edges in the subgraph. As shown in Figure 8, if the ratio of the set of the edge of interest and similar edges to the whole is high, the uniformity is considered high, and if the ratio is low, the uniformity is considered low.
[0040] That is, when the uniformity is high, similar edges are considered to be uniformly present throughout the entire subgraph, and in order to make it easier to select dissimilar edges, the update unit 18 updates λ to be smaller and weakens the similarity term in the sampling probability P(e). On the other hand, when the uniformity is low, similar edges are considered to be unevenly distributed within the subgraph, and in order to make it easier to select similar edges, the update unit 18 updates λ to be larger and strengthens the similarity term in the sampling probability P(e). For example, the update unit 18 updates λ using the following equation (3):
[0041]
[0042] Here, c is a parameter that can be set arbitrarily to adjust the effect of λ. The update unit 18 may also update λ by adding or subtracting a predetermined value, a value that is a predetermined percentage of the current λ, or the like, to λ.
[0043] The creation unit 20 creates a final subgraph G containing the edges included in the selected edge set 30 at the stage where the constraint on the number of edges is satisfied, the nodes connected by the edges, and the attributes corresponding to the edges. * Create and output.
[0044] The subgraph extraction device 10 may be realized by, for example, a computer 40 shown in FIG. 9 . The computer 40 includes a CPU (Central Processing Unit) 41, a GPU (Graphics Processing Unit) 42, a memory 43 serving as a temporary storage area, and a non-volatile storage device 44. The computer 40 also includes an input / output device 45 such as an input device and a display device, and an R / W (Read / Write) device 46 that controls reading and writing of data from and to a storage medium 49. The computer 40 also includes a communication I / F (Interface) 47 that is connected to a network such as the Internet. The CPU 41, GPU 42, memory 43, storage device 44, input / output device 45, R / W device 46, and communication I / F 47 are connected to one another via a bus 48.
[0045] The storage device 44 is, for example, a hard disk drive (HDD), a solid state drive (SSD), or a flash memory. The storage device 44, which serves as a storage medium, stores a subgraph extraction program 50 for causing the computer 40 to function as the subgraph extraction device 10. The subgraph extraction program 50 includes a similarity calculation process control instruction 52, a degree calculation process control instruction 54, a selection process control instruction 56, an update process control instruction 58, and a creation process control instruction 60. The storage device 44 also includes an information storage area 70 in which information constituting the selected edge set 30 is stored.
[0046] The CPU 41 reads the subgraph extraction program 50 from the storage device 44, expands it in the memory 43, and sequentially executes the control instructions of the subgraph extraction program 50. The CPU 41 operates as the similarity calculation unit 12 shown in FIG. 6 by executing the similarity calculation process control instruction 52. The CPU 41 operates as the degree calculation unit 14 shown in FIG. 6 by executing the degree calculation process control instruction 54. The CPU 41 operates as the selection unit 16 shown in FIG. 6 by executing the selection process control instruction 56. The CPU 41 operates as the update unit 18 shown in FIG. 6 by executing the update process control instruction 58. The CPU 41 operates as the creation unit 20 shown in FIG. 6 by executing the creation process control instruction 60. The CPU 41 also reads information from the information storage area 70 and expands the selected edge set 30 in the memory 43. As a result, the computer 40 that executed the subgraph extraction program 50 functions as the subgraph extraction device 10. The CPU 41 that executes the program is hardware. A part of the program may be executed by the GPU 42.
[0047] The functions realized by the subgraph extraction program 50 may be realized by, for example, a semiconductor integrated circuit, more specifically, an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array), or the like.
[0048] Next, the operation of the subgraph extraction device 10 according to this embodiment will be described. q When the specification is input and extraction of a subgraph is instructed, the subgraph extraction device 10 executes the subgraph extraction process shown in Fig. 10. Note that the subgraph extraction process is an example of a subgraph extraction method of the disclosed technology.
[0049] In step S10, the similarity calculation unit 12 calculates the graph G and the target edge e input to the subgraph extraction device 10. q The selection unit 16 also initializes the selected edge set 30 (E') to an empty set.
[0050] Next, in step S12, the similarity calculation unit 12 calculates the similarity sim(ei, ej) between edge ei and edge ej for each edge included in the graph G, and generates a similarity matrix M s The value is stored as the element in the i-th row and j-th column of the
[0051] Next, in step S14, the update unit 18 determines whether the constraint on the number of edges (r|E|=|E'|) is satisfied. If the constraint on the number of edges is not satisfied, that is, if r|E|>|E'|, the process proceeds to step S16.
[0052] In step S16, the selection unit 16 selects the edge of interest e q Determine whether or not e has been added. q If it has been added, the process proceeds to step S20. If it has not been added, the selection unit 16 selects the edge of interest e q Then, the process proceeds to step S20. In step S20, a λ update process (described in detail later) is executed.
[0053] Next, in step S50, the degree calculation unit 14 calculates the degree nd of the node u for the intermediate subgraph G' that includes the edges included in the selected edge set E'. u , the degree ed of edge e e , and the average degree (ND) G’ Then, the degree calculation unit 14 updates α in the formula (1) based on the difference in the average degree between the graph G and the subgraph G′, and calculates the constraint term w e Calculate.
[0054] Next, in step S52, the selection unit 16 selects the similarity matrix M calculated in step S10. s , λ updated in step S20, and w calculated in step S50 e Next, in step S54, the selector 16 selects k edges e with the sampling probability P(e), adds them to the selected edge set E′, and returns to step S14.
[0055] In step S14, if the update unit 18 determines that the constraint on the number of edges is satisfied, that is, if r|E|≦|E′|, the process proceeds to step S56. In step S56, the creation unit 20 creates a final subgraph G including the edges included in the currently selected edge set E′, the nodes connected by those edges, and the attributes corresponding to those edges. * Then, the subgraph extraction process is completed.
[0056] Next, the λ update process executed in step S20 will be described in detail with reference to FIG.
[0057] In step S22, the update unit 18 transfers the edges included in the selected edge set E' to a set E" for λ update processing. l Note the edge e q Further, the update unit 18 sets the comparison target edge e l The edge with the highest similarity to max is emptied, and the comparison edge e l and e max Similarity with (hereinafter referred to as "maximum similarity") sim max The update unit 18 sets the target edge e q and a set E of similar edges s Note the edge e q Add E s A set S of similarities between edges included in e Set to the empty set.
[0058] Next, in step S24, the update unit 18 updates the set E s It is determined whether the number of edges included in |E s If |<|E"|, the process proceeds to step S26, and |E s If |≧|E″|, the process proceeds to step S42. In step S26, the update unit 18 e The average similarity E included in s avg Calculate.
[0059] Next, in step S28, the update unit 18 updates the set E" by s The comparison target edge e is not included in l It is determined whether there are any edges other than those listed above that have not been selected as targets for processing in the following steps S32 to S36. If there are any unselected edges, the process proceeds to step S30, and if there are no unselected edges, the process proceeds to step S38.
[0060] In step S30, the update unit 18 updates the set E" by s The comparison target edge e is not included in l An edge e is selected from the edges other than those that have not been selected as the processing target for steps S32 to S36 below.
[0061] Next, in step S32, the update unit 18 updates the similarity matrix M s With reference to the edge e l The similarity sim(e l , e) and sim(e l , e) is the average E calculated in step S26. s avg Determine whether it is greater than sim(e l , e)>E s avg In this case, the process proceeds to step S34, and sim(e l , e) ≦E s avg If so, the process returns to step S28.
[0062] Next, in step S34, the update unit 18 updates sim(e l , e) is the maximum similarity sim max Determine whether it is greater than sim(e l , e) > sim max In this case, the process proceeds to step S36, and sim(e l , e) ≦ sim max In step S36, the update unit 18 updates the edge e to e max and sim(e l , e) to simmax and return to step S28.
[0063] In step S38, the update unit 18 max It is determined whether an edge e exists. max If it exists, the process proceeds to step S40, and if it does not exist, the process proceeds to step S42. max E s Add to sim(e l , e max ) to S e Save it to max wo e l Set it to sim max Set to 0, e max is emptied, and the process returns to step S24.
[0064] In step S42, if the ratio of |Es| to |E"| is equal to or greater than a threshold, the update unit 18 updates the currently set λ to decrease it, and if the ratio is less than the threshold, updates λ to increase it, and then returns to the subgraph extraction process (FIG. 10).
[0065] An example of the λ update process will be described with reference to FIG. 12. As shown in the upper diagram of FIG. 12, it is assumed that edges e1, e2, e3, e4, and e5 are included in a set E″. The target edge e q The edge e1 in the set E s and the comparison edge e l In the similarity matrix of FIG. 12, edges corresponding to the hatched column headings are set as follows: s The edges corresponding to the rows indicated by the thick lines are the comparison target edges e l As shown in FIG. 12A, E s Among the edges e2, e3, e4, and e5 that are not included in E at this point, the edge e1 has the highest similarity with the edge e1. s avg The edge e2 with a similarity greater than E s Then, the edge e2 is added to the comparison edge e l (S28 to S40).
[0066] Next, as shown in FIG. 12B, s Among the edges e3, e4, and e5 that are not included in E at this point, the edge e2 has the highest similarity. s avg = 0.5 is the edge e4 s Then, the edge e4 is added to the comparison target edge e l Next, as shown in FIG. 12C, E s Among the edges e3 and e5 that are not included in E at this point, the edge e4 has the highest similarity. s avg = 0.65 is the edge e3 s Then, the edge e3 is added to the comparison target edge e l is set to
[0067] Next, as shown in FIG. s The similarity of edge e5, which is not included in E s avg = 0.73, so edge e5 is E s The selection of similar edges is completed without adding them to E (NO in S38). s The edges added to are edges e1, e2, e3, and e4, so |E″|=5 and |E s Based on |=4, λ is updated (S42).
[0068] As described above, the subgraph extraction device according to this embodiment acquires a graph including multiple nodes, multiple edges connecting the nodes, and multiple attributes associated with each edge, each indicating a relationship between the nodes connected by the edges. The subgraph extraction device also calculates the similarity between a target edge included in the graph and other edges other than the target edge based on the attributes associated with the target edge and each of the other edges. The subgraph extraction device also calculates the degree of an intermediate subgraph including an edge selected from the graph. The subgraph extraction device then creates a subgraph including an edge selected from the graph with a probability based on the similarity with the target edge, λ, which is a first constraint on the similarity, and a second constraint on the degree, and the nodes connected by the selected edge. This makes it possible to extract a subgraph related to the target edge while suppressing structural differences from the input graph.
[0069] FIG. 13 schematically illustrates the effects of this embodiment. As shown in FIG. 13, in this embodiment ("this technology" in FIG. 13), the difference in average degree between an input graph and an extracted subgraph remains comparable to that of existing technologies, while the average attribute difference is improved compared to existing technologies. The average attribute difference is the average difference (dissimilarity) between attributes corresponding to edges included in the subgraph. In other words, this embodiment makes it possible to extract a subgraph composed of edges related to the attribute of an edge of interest while maintaining the degree of the input graph.
[0070] In the above embodiment, when selecting an edge similar to the edge of interest in updating λ, an edge having the highest similarity to the comparison edge and above the average is selected in a transitional manner. However, the present invention is not limited to this. For example, each edge pair may be ranked in descending order of the calculated similarity, and the edge with the highest ranking may be selected from the top N edges starting from the edge of interest.
[0071] 14 shows an example where N=5. In this case, the target edge e1 is first compared with the comparison target edge e l Then, as shown in FIG. 14A, E sAmong the edges e2, e3, e4, and e5 that are not included in E, and that are ranked within the top five based on the similarity to the edge e1, the edge e2 with the highest ranking is E. s Then, the edge e2 is added to the comparison edge e l is set to
[0072] Next, as shown in FIG. 14B, s Among the edges e3, e4, and e5 that are not included in E, the edge e5 that is ranked within the top five based on the similarity with the edge e2 is E s Then, the edge e5 is added to the comparison target edge e l Next, as shown in FIG. 14C, E s Among the edges e3 and e4 that are not included in E, the edge e4 that is ranked within the top 5 based on the similarity with the edge e5 is E s Then, the edge e4 is added to the comparison target edge e l is set to
[0073] Next, as shown in FIG. s The ranking of edge e3, which is not included in E, is not within the top 5. s The selection of similar edges is terminated without adding the edge to the list.
[0074] In the above embodiment, a case has been described in which an analysis result graph is used for assessing ethical risks, but the present disclosure is not limited to this. The technology of the present disclosure can be applied to any graph in which attributes are assigned to edges.
[0075] In the above embodiment, the subgraph extraction program is stored (installed) in advance in a storage device, but this is not limiting. The program according to the disclosed technology may be provided in a form stored in a storage medium such as a CD-ROM, a DVD-ROM, or a USB memory.
[0076] REFERENCE SIGNS LIST 10 Subgraph extraction device 12 Similarity calculation unit 14 Degree calculation unit 16 Selection unit 18 Update unit 20 Creation unit 30 Selected edge set 40 Computer 41 CPU 42 GPU 43 Memory 44 Storage device 45 Input / output device 46 R / W device 47 Communication I / F 48 Bus 49 Storage medium 50 Subgraph extraction program 52 Similarity calculation process control command 54 Degree calculation process control command 56 Selection process control command 58 Update process control command 60 Creation process control command 70 Information storage area
Claims
1. A subgraph extraction program for causing a computer to execute a process including: calculating the similarity between an edge of interest included in a graph including a plurality of nodes, a plurality of edges connecting the nodes, and a plurality of attributes corresponding to each of the edges that indicate the relationships between the nodes connected by the edges, and other edges other than the edge of interest based on the attributes corresponding to the edge of interest and each of the other edges; calculating the degree of a subgraph including an edge selected from the graph; and creating a subgraph including the edge selected from the graph and the nodes connected by the selected edge with a probability based on the similarity, a first constraint on the similarity, and a second constraint on the degree.
2. The subgraph extraction program according to claim 1, wherein the process of creating the subgraph includes: selecting a predetermined number of edges from the graph and adding them to a selected edge set; updating the first constraint based on a subgraph including the edges included in the selected edge set; selecting the predetermined number of edges from the graph with a probability based on the similarity, the updated first constraint, and the second constraint; and creating the subgraph based on the selected edge set at a stage where this process is repeated until the number of edges included in the selected edge set reaches the number based on the second constraint.
3. The subgraph extraction program according to claim 2, wherein the first constraint is a constraint for adjusting the degree of influence of the similarity on the probability, and the process of updating the first constraint includes updating the currently set degree of influence of the similarity to decrease when a first ratio of edges included in the selected edge set that have a predetermined similarity relationship with the target edge is equal to or greater than a threshold, and updating the currently set degree of influence of the similarity to increase when the first ratio is less than the threshold.
4. The subgraph extraction program according to claim 3, wherein the edge having a predetermined similarity relationship with the edge of interest is an edge that is transitively selected by defining an edge whose similarity with the edge of interest satisfies a predetermined condition as a first edge, and defining a second edge whose similarity with the first edge satisfies the predetermined condition as a new first edge.
5. A subgraph extraction program according to any one of claims 1 to 4, wherein the second constraint is that the difference between the degree of the graph and the degree of the subgraph is smaller than a predetermined value, and the number of edges included in the subgraph is a second ratio of the number of edges included in the graph.
6. A subgraph extraction program according to any one of claims 1 to 4, wherein the graph is a graph representing ethical risks, the nodes correspond to stakeholders, the edges connect the nodes corresponding to the stakeholders where interactions occur, and the attributes correspond to risks that may arise in the interactions.
7. A subgraph extraction method in which a computer executes processes including: calculating a similarity between an edge of interest included in a graph including a plurality of nodes, a plurality of edges connecting the nodes, and a plurality of attributes corresponding to each of the edges that indicate relationships between the nodes connected by the edges, and other edges other than the edge of interest based on the attributes corresponding to the edge of interest and each of the other edges; calculating the degree of a subgraph including an edge selected from the graph; and creating a subgraph including an edge selected from the graph and a node connected by the selected edge with a probability based on the similarity, a first constraint on the similarity, and a second constraint on the degree.
8. The subgraph extraction method according to claim 7, wherein the process of creating the subgraph includes: selecting a predetermined number of edges from the graph and adding them to a selected edge set; updating the first constraint based on a subgraph including the edges included in the selected edge set; and selecting the predetermined number of edges from the graph with a probability based on the similarity, the updated first constraint, and the second constraint; and creating the subgraph based on the selected edge set at a stage where this process is repeated until the number of edges included in the selected edge set reaches the number based on the second constraint.
9. The subgraph extraction method according to claim 8, wherein the first constraint is a constraint for adjusting the degree of influence of the similarity on the probability, and the process of updating the first constraint includes updating the currently set degree of influence of the similarity to decrease when a first ratio of edges that have a predetermined similarity relationship with the target edge to edges included in the selected edge set is equal to or greater than a threshold, and updating the currently set degree of influence of the similarity to increase when the first ratio is less than the threshold.
10. A subgraph extraction method according to claim 9, wherein the edge having a predetermined similarity relationship with the edge of interest is an edge that is transitively selected by defining an edge whose similarity with the edge of interest satisfies a predetermined condition as a first edge, and defining a second edge whose similarity with the first edge satisfies the predetermined condition as a new first edge.
11. A subgraph extraction method according to any one of claims 7 to 10, wherein the second constraint is that the difference between the degree of the graph and the degree of the subgraph is smaller than a predetermined value, and the number of edges included in the subgraph is a second ratio of the number of edges included in the graph.
12. A subgraph extraction method according to any one of claims 7 to 10, wherein the graph is a graph representing ethical risks, the nodes correspond to stakeholders, the edges connect the nodes corresponding to the stakeholders where interactions occur, and the attributes correspond to risks that may arise in the interactions.
13. A subgraph extraction device comprising: a similarity calculation unit that calculates a similarity between an edge of interest included in a graph including a plurality of nodes, a plurality of edges connecting the nodes, and a plurality of attributes corresponding to each of the edges that indicate relationships between the nodes connected by the edges, and other edges other than the edge of interest based on the attributes corresponding to the edge of interest and each of the other edges; a degree calculation unit that calculates a degree of a subgraph including an edge selected from the graph; and a creation unit that creates a subgraph including an edge selected from the graph and a node connected by the selected edge with a probability based on the similarity, a first constraint on the similarity, and a second constraint on the degree.
14. The subgraph extraction device described in claim 13, wherein the creation unit creates the subgraph based on the selected edge set at a stage where the creation unit selects a predetermined number of edges from the graph and adds them to a selected edge set, updates the first constraint based on a subgraph including the edges included in the selected edge set, and selects the predetermined number of edges from the graph with a probability based on the similarity, the updated first constraint, and the second constraint, until the number of edges included in the selected edge set reaches the number based on the second constraint.
15. A subgraph extraction device as described in claim 14, wherein the first constraint is a constraint that adjusts the degree of influence of the similarity on the probability, and the process of updating the first constraint includes updating to lower the currently set degree of influence of the similarity when a first ratio of edges that have a predetermined similarity relationship with the target edge to edges included in the selected edge set is equal to or greater than a threshold, and updating to raise the currently set degree of influence of the similarity when the first ratio is less than the threshold.
16. A subgraph extraction device according to claim 15, wherein the edge having a predetermined similarity relationship with the edge of interest is an edge that is transitively selected by designating an edge whose similarity with the edge of interest satisfies a predetermined condition as a first edge, and designating a second edge whose similarity with the first edge satisfies the predetermined condition as a new first edge.
17. A subgraph extraction device according to any one of claims 13 to 16, wherein the second constraint is that the difference between the degree of the graph and the degree of the subgraph is smaller than a predetermined value, and the number of edges included in the subgraph is a second ratio of the number of edges included in the graph.
18. A subgraph extraction device according to any one of claims 13 to 16, wherein the graph is a graph representing ethical risks, the nodes correspond to stakeholders, the edges connect the nodes corresponding to the stakeholders where interactions occur, and the attributes correspond to risks that may arise in the interactions.
19. A non-transitory storage medium storing a subgraph extraction program for causing a computer to execute a process including: calculating the similarity between an edge of interest included in a graph including a plurality of nodes, a plurality of edges connecting the nodes, and a plurality of attributes corresponding to each of the edges that indicate the relationships between the nodes connected by the edges, and other edges other than the edge of interest based on the attributes corresponding to the edge of interest and each of the other edges; calculating the degree of a subgraph including an edge selected from the graph; and creating a subgraph including an edge selected from the graph and a node connected by the selected edge with a probability based on the similarity, a first constraint on the similarity, and a second constraint on the degree.
Citation Information
Patent Citations
Scale-limited community search method and device on attribute graph and readable storage medium
CN116805024A
Information processing device and information processing program
JP2016218512A