Heterogeneous information network element path mining method and system based on large language model

By using large language models to generate new metapaths in complex heterogeneous information networks, the problems of low metapath mining efficiency and semantic information ignorance in the existing technology are solved, and more efficient metapath mining and link prediction are achieved.

CN120146182APending Publication Date: 2025-06-13NAT UNIV OF DEFENSE TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510191311.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-20
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

The prior art has low efficiency in metapathic information networks and ignores semantic information in metapathic paths.

Method used

The metapathic information network metapathic path mining method based on a large language model is used to determine the metapath instance by using sample triplets in link prediction and input it into the large language model to generate a new metapath, thereby improving the efficiency of metapath mining.

Benefits of technology

It significantly improves the efficiency of metapath mining, generates more and better metapaths, can better capture semantic information in heterogeneous information networks, and improves the accuracy of link prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120146182A_ABST
    Figure CN120146182A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a heterogeneous information network element path mining method and system based on a large language model, and the method comprises the steps: taking a relation to be reasoned in link prediction as a query relation, and selecting a triple containing the query relation from a heterogeneous information network as a sample triple; determining a meta-path instance through the sample triple; inputting the meta-path instance into a large language model to enable the large language model to output a newly generated meta-path based on the meta-path instance, and determining an applicable meta-path from the newly generated meta-path; and applying the applicable meta-path to the heterogeneous information network for link prediction. In the technical scheme, the large language model is combined with the heterogeneous information network, and the meta-path sample is utilized to guide the large language model to generate the new meta-path, so that more and better meta-paths can be generated in the link prediction task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of heterogeneous information networks, and particularly to a method and system for mining meta-paths in heterogeneous information networks based on large language models. Background Art

[0002] Heterogeneous information networks (HINs) constitute complex systems in which different types of entities are interconnected through various relationships. In a heterogeneous information network, nodes can represent various entities, including individuals, objects, organizations, etc., while edges represent various different relationships, such as friendship, cooperation, transactions, or influence, etc. In modern times, there is an increasing need to understand the complex interrelationships in large and diverse networks. Studying heterogeneous information networks helps enhance people's understanding and simulation of the structure and dynamic behavior of these complex systems, such as academic events, business activities, and drug-target interactions.

[0003] Meta-paths can be used to explain the detailed structural data in heterogeneous information networks. Essentially, a meta-path is a sequence of edges connecting different node types in a heterogeneous information network, and each edge in the sequence represents a specific type of relationship.

[0004] Due to its interpretability, meta-paths are crucial for heterogeneous information network inference tasks such as link prediction. In addition, meta-paths also contribute to knowledge transfer in inductive environments. Discovering meta-paths is a way to abstract the structure and capture the underlying data of heterogeneous information networks. Therefore, meta-paths can improve the accuracy of predictions and provide the necessary interpretability for heterogeneous information network inference.

[0005] Although meta-path reasoning plays a crucial role in human-computer interaction networks, its application faces many challenges. The first is complexity. The diversity of entities and relationships in heterogeneous information networks leads to a large number of potential meta-path combinations, which require a large amount of computing resources to comprehensively cover. In addition, the ignorance of semantic information is also a huge challenge. Meta-paths contain rich semantic information and are of great significance. However, in existing technologies, whether based on embedding or reinforcement learning (RL), most studies have to some extent ignored this information.

[0006] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:

[0007] Traditional methods can only be applied to simple HINs. When applied to complex heterogeneous information networks, as the network scale increases, the number of possible meta-paths grows exponentially. Therefore, the efficiency of mining meta-paths is very low. Therefore, how to more effectively improve the efficiency of meta-path mining is a problem that needs to be solved. Summary of the Invention

[0008] An embodiment of the present invention provides a method and system for mining meta-path rules in a heterogeneous information network based on a large language model to improve the efficiency of meta-path mining.

[0009] To achieve the above object, on the one hand, an embodiment of the present invention provides a method for mining meta-paths in a heterogeneous information network based on a large language model, including: using the relationship to be inferred in link prediction as the query relationship, and selecting triples containing the query relationship from the heterogeneous information network as example triples; determining meta-path instances through the example triples; inputting the meta-path instances into the large language model, so that the large language model outputs newly generated meta-paths based on the meta-path instances, and determining applicable meta-paths from the newly generated meta-paths; applying the applicable meta-paths to the heterogeneous information network for link prediction.

[0010] On the other hand, an embodiment of the present invention provides a system for mining meta-paths in a heterogeneous information network based on a large language model, including: an example selection module for using the relationship to be inferred in link prediction as the query relationship and selecting triples containing the query relationship from the heterogeneous information network as example triples; a meta-path instance extraction module for determining meta-path instances through the example triples; a meta-path extension module for inputting the meta-path instances into the large language model, so that the large language model outputs newly generated meta-paths based on the meta-path instances, and determining applicable meta-paths from the newly generated meta-paths; a meta-path application module for applying the applicable meta-paths to the heterogeneous information network for link prediction.

[0011] The above technical solution has the following beneficial effects:

[0012] In the technical solution of this application, the advantages of the large language model are fully utilized. The large language model is combined with the heterogeneous information network, and a small number of meta-path examples are used to guide the large language model to generate new meta-paths, which can greatly improve the efficiency of meta-path mining and realize the generation of more and better meta-paths in the link prediction task. Description of the Drawings

[0013] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0014] Figure 1 It is a flowchart of a method for mining meta-paths in a heterogeneous information network based on a large language model according to an embodiment of the present invention;

[0015] Figure 2It is a component diagram of a heterogeneous information network meta-path mining system based on a large language model according to an embodiment of the present invention;

[0016] Figure 3 It is a schematic diagram of the meta-path mining process in a specific embodiment of the present invention;

[0017] Figure 4 It is a schematic diagram of prompt words in a specific embodiment of the present invention;

[0018] Figure 5 It is the first schematic diagram of the results of the ablation experiment in the simulation experiment of the present invention;

[0019] Figure 6 It is the second schematic diagram of the results of the ablation experiment in the simulation experiment of the present invention;

[0020] Figure 7 It is the schematic diagram of the results of the inferential experiment in the simulation experiment of the present invention. Specific Embodiments

[0021] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0022] As Figure 1 shown, an embodiment of the present invention provides a heterogeneous information network meta-path mining method based on a large language model, including:

[0023] S101. Use the relationship to be inferred in link prediction as the query relationship, and select triples containing the query relationship from the heterogeneous information network as example triples;

[0024] S102. Determine meta-path instances through the example triples;

[0025] S103. Input the meta-path instances into the large language model, so that the large language model outputs newly generated meta-paths based on the meta-path instances, and determine applicable meta-paths from the newly generated meta-paths;

[0026] S104. Apply the applicable meta-paths to the heterogeneous information network for link prediction.

[0027] Traditional meta-path mining methods are inefficient on complex HINs. Traditional methods are mostly based on enumeration and induction. For a HIN with an entity type of T and a relationship number of R, the search space for meta-paths of length l is T×(T×R) l-1, The method of graph embedding needs to traverse this space for training and learning. Most of the other meta-path methods are for simple HINs, such as the dblp citation network. Although its data volume is large, there are only four node types (authors, papers, terms, and locations) and three relationship types (authors write papers, papers contain terms, and papers are published somewhere), and all meta-paths can be easily obtained by enumeration. However, the proposed method is for heterogeneous information networks with complex patterns, aiming to mine meta-paths in them. For example, the dataset NELL selected by this method contains 756 entity types and 827 relationship types. When the length of the meta-path is 4, the scale of its search space reaches 10 20 orders of magnitude, and the methods of the prior art cannot complete the search.

[0028] Therefore, in this technical solution, it is intended to take advantage of the large language model, combine the large language model with the knowledge graph, and propose a meta-path mining framework LLM4HIN using the LLM. It can generate a large number of meta-paths in HINs with complex patterns and can perform reasoning and prediction with only a few examples. Compared with traditional meta-path discovery techniques, LLM4HIN demonstrates higher efficiency and better grasp of semantic information.

[0029] The powerful capabilities of large language models (LLMs) in natural language processing and logical reasoning have enabled them to demonstrate excellent performance in multiple cross-domains related to natural language processing. The most significant advantage of large language models is their ability to capture information that small-scale models cannot obtain. After being trained on a vast amount of corpus, large language models usually contain hundreds of millions of parameters, which enables them to capture the nuances in language. At the same time, the pre-training-fine-tuning mode of large language models enables them to adapt to different downstream tasks. In addition, large language models have powerful generation capabilities, can achieve fast and efficient logical reasoning, and have been widely applied in many fields.

[0030] Large language models are developed by ingesting a large amount of text corpus. They can proficiently understand the meaning of natural language and perform complex reasoning combined with common sense. In addition, since LLMs are pre-trained, they can complete cross-modal reasoning in a relatively short time. Due to these two advantages, LLMs have great potential in solving computational efficiency and leveraging semantic information. Therefore, large language models can be used to improve the effect of current heterogeneous network meta-path mining.

[0031] Furthermore, the specific steps of step S102 include:

[0032] S1021. Using the two entities in the sample triple as anchor points, perform a breadth-first search for traversal, and extract paths from the triple sequence, where the triple sequence is composed of multiple triples connected end to end;

[0033] S1022. Sort all the extracted paths in descending order according to the repetition times;

[0034] S1023. According to the sorting result, select the paths that meet the preset quantity requirement as the meta-path instances.

[0035] Further, the step S103 specifically includes:

[0036] S1031. Use the meta-path instance as the initial demonstration meta-path;

[0037] S1032. Compile a prompt word according to the demonstration meta-path and the output requirement;

[0038] S1033. Input the prompt word into the large language model, so that the large language model understands the semantic information of the prompt word and outputs a newly generated meta-path that meets the output requirement;

[0039] S1034. Select the newly generated meta-path that meets the preset determination condition as the alternative meta-path;

[0040] S1035. Update the demonstration meta-path with the alternative meta-path;

[0041] Repeat the above steps S1032 to S1035 until the number of iterations meets the preset number requirement:

[0042] S1036. Use the alternative meta-path obtained in the last iteration during the iteration process as the applicable meta-path.

[0043] Further, the preset determination condition in step S1034 is that the coverage value of the newly generated meta-path is greater than the preset threshold;

[0044] The calculation method of the coverage is as follows:

[0045]

[0046] Among them, I M (v i , v j ) means that the nodes v i , v j can be connected by the meta-path M, φ represents the set of relationships, r q is the query relationship, represents the heterogeneous information network, and the nodes v i , v j are a pair of entities in the triple (v i , r, v j ).

[0047] Further, the prompt word also includes the coverage value of the newly generated meta-path obtained in the previous iteration process. Such an input method helps the large language model better understand and expand, and thus generate higher-quality meta-paths.

[0048] As Figure 2 shown, an embodiment of the present invention also provides a heterogeneous information network meta-path mining system based on a large language model, including:

[0049] A sample selection module 21, configured to use the relationship to be inferred in link prediction as a query relationship, and select triples containing the query relationship from the heterogeneous information network as sample triples;

[0050] A meta-path instance extraction module 22, configured to determine meta-path instances through the sample triples;

[0051] A meta-path extension module 23, configured to input the meta-path instances into the large language model, so that the large language model outputs newly generated meta-paths based on the meta-path instances, and determine applicable meta-paths from the newly generated meta-paths;

[0052] A meta-path application module 24, configured to apply the applicable meta-paths to the heterogeneous information network for link prediction.

[0053] Further, the meta-path instance extraction module 22 is specifically configured to: use the two entities in the sample triples as anchors, perform a breadth-first search to wander, and extract paths from the triple sequence, where the triple sequence is composed of multiple triples connected end to end; sort all the extracted paths in descending order according to the repetition times; according to the sorting result, select the paths that meet the preset quantity requirement as meta-path instances.

[0054] Further, the meta-path extension module 23 is specifically configured to: use the meta-path instance as an initial demonstration meta-path; compile a prompt word according to the demonstration meta-path and the output requirement; input the prompt word into the large language model to enable the large language model to understand the semantic information of the prompt word and output newly generated meta-paths that meet the output requirement; select the newly generated meta-paths that meet the preset determination condition as alternative meta-paths; update the demonstration meta-path with the alternative meta-paths; repeat the iteration until the number of iterations meets the preset number requirement, and the initial step of the iteration is: compile a prompt word according to the demonstration meta-path and the output requirement: use the alternative meta-path obtained in the last time of the iteration process as the applicable meta-path.

[0055] Further, the preset determination condition is that the coverage value of the newly generated meta-path is greater than a preset threshold;

[0056] The calculation method of the coverage is as follows:

[0057]

[0058] Among them, I M (v i , v j ) indicates that nodes v i , v j can be connected by the meta-path M, φ represents the set of relationships, and r q is the query relationship, represents the heterogeneous information network.

[0059] Furthermore, the prompt words also include the coverage value of the newly generated meta-path obtained in the previous iteration process.

[0060] As Figure 3 shown, a specific embodiment is used to introduce the foregoing method in detail.

[0061] First, define the heterogeneous information network: A heterogeneous information network can be defined as a directed graph G=(V, E, τ, φ), where V represents the set of entities in the graph, represents the set of edges connecting the entities in V. The function τ: V→T is the type assignment mapping, where $T$ represents the entity type classification, and φ: E→R is the relationship mapping function, where R is the set of relationships.

[0062] Definition of meta-path: A meta-path M of length l is a path on the schema graph T G and can be defined as where t i ∈T represents the entity type, and r in R i represents the relationship. A path is an instance of the path of the meta-path M,

[0063] t i ∈τ(v i ) and e i ∈φ(v i , v i+1 ), in this case, the entity pair (v i , v l ) is a pair of entities connected by the path M, denoted as I M (v 1 , v l ).

[0064] The main work process of this specific embodiment is as Figure 3Shown as follows: First, path instances are obtained through a meta-path sampler based on HINs, and then they are summarized to obtain meta-path instances. Combining background information, the LLM will generate more meta-paths based on the instances. After sorting, the meta-paths can be used to infer facts in HINs.

[0065] To enable the LLM to understand the internal structure of HINs, instance-level paths are first extracted, providing important structural information. These instances can represent meta-paths at the entity level to a certain extent. Given the systematic and efficient search for all possible path instances between anchor points, breadth-first search (BFS) can be used to extract path instances.

[0066] For a given triple (e 1 , r, e k ), a path instance can be represented as a sequence of triples, where the head and tail of each triple are connected in sequence. That is, the path instance P can be represented as follows: P = {(e 1 , r 1 , e 2 ), (e 2 , r 2 , e 3 ), …, (e {k-1} , r k , e k )}. In the presence of a target relationship, first, a subset of triples containing that relationship is selected. Subsequently, for each selected triple, breadth-first search is performed to determine all path instances of a specified length connecting the head entity and the tail entity. Since entities may have multiple types, common types must be identified to determine meta-paths. The lowest common ancestor (LCA) algorithm can effectively identify the lowest common ancestor of two types. Therefore, the LCA algorithm is adopted in this paper to derive meta-paths from path instances.

[0067] After deriving the meta-paths for a specific relationship, natural language constructs (such as the prompt words shown Figure 4 ) can be used to present them to facilitate the LLM's understanding of the semantic nuances in the meta-paths. For the inverse relationship of an existing relationship, the "inv_" symbol can be prefixed to represent it. Although the sampled meta-paths represent a finite subset of the entire spectrum, it is still impractical to input all meta-paths into the LLM. Therefore, k paths are randomly selected as prototypes and input into the LLM to prompt them to generate more meta-paths. A set of predefined allowed types and relationships are provided to the model to ensure that the model's output remains within the framework of recognized relationships. In addition, after generation, we refine the derivation rules by pruning any illegal meta-paths to obtain all newly generated meta-paths generated by the LLM.

[0068] Due to the serious hallucination problem of LLM, it is necessary to measure the effectiveness of the meta - path. The confidence and coverage metrics intuitively reflect the accuracy and universality of the meta - path respectively. Therefore, the confidence and coverage metrics can be used to screen the rules generated by the model.

[0069] Coverage, identifying the query relationship r according to M q The ability of, conceptualize the coverage of M as the proportion of entity pairs connected by the path instances of M among all entity pairs connected by r in q all entity pairs connected by r.

[0070]

[0071] Among them, I M (v i , v j ) indicates that the nodes v i , v j can be connected by the meta - path M, φ represents the set of relationships, r q is the query relationship, represents the heterogeneous information network.

[0072] Confidence, the confidence of the meta - path M in identifying r under the fact in the given HINs q is described as the ratio of the entity pairs connected by both r q and the path instances of M to all entity pairs connected by the path instances of M.

[0073]

[0074] Obviously, the higher the confidence and coverage of the meta - path, the wider the range of entity pairs it can cover. Therefore, different thresholds can be set for each metric, and better - quality meta - paths can be screened accordingly.

[0075] However, the results of multiple experiments have confirmed that for the knowledge graph logic rule mining method based on the large - language model of this application, using coverage as a single experimental metric for sorting gives the best effect. Therefore, in practical applications, the coverage is used to screen the newly generated meta - paths.

[0076] After sorting the meta - paths, existing technologies can be used for logical reasoning or processing downstream tasks. Meta - path reasoning includes calculating the similarity between two entities using the meta - path. Given a pair of entities and the meta - path connecting them, metrics such as meta - path counting, binary features, and confidence features are usually used.

[0077] The actual effect of the present invention is illustrated by a simulation experiment as follows.

[0078] 1). Experimental settings

[0079] To measure the efficacy and efficiency of the (meta-path) model, the finally obtained applicable meta-paths are used to perform the link prediction task. As an empirical and quantifiable measurement method, link prediction can evaluate the utility and predictive ability of meta-paths, thereby determining their utility in network analysis.

[0080] In the field of HINs, link prediction needs to achieve the following: Given any pair of nodes in HINs, the goal is to predict whether there is a specific type of edge between them, or estimate the probability that they are connected by a meta-path.

[0081] For this purpose, experiments were conducted on two real-world online HINs and the knowledge bases Yago and NELL. Compared with HINs with simple patterns, these two datasets exhibit more complex type and relationship mappings. Link prediction evaluations were performed on three relationships for each dataset, namely "is a citizen of", "died of", "graduated from" in Yago and "works", "competes", "opposes" in NELL.

[0082] The LLM4HIN of this application was compared with eight inference models, including methods based on meta-path inference, embedding-based, and multi-hop inference, namely MPDRL, PCRW, Autopath, Metapath2Vec, HINs2VEC, RotatE, TransE, and MINERVA.

[0083] Two metrics were selected to verify the effectiveness of this method: the area under the receiver operating characteristic curve (ROC-AUC) and the average precision (AP). Each method was independently executed 5 times, and the metrics are expressed as (mean / standard deviation).

[0084] For the link prediction results, for a certain relationship task, such as the relationship: "is a citizen of", some path instances can be obtained using the BFS sampler and then generalized into a meta-path for "is a citizen of". Using the LLM-based meta-path generator, more meta-paths for "is a citizen of" are generated based on the instances and background information. After sorting all the meta-paths using coverage and confidence, the sorted meta-paths can be used for link prediction.

[0085]

[0086] Table 1. ROC-AUC and AP results of Yago and NELL (average of 5 runs)

[0087] The detailed results are shown in Table 1. The experimental results show that among the six relationships studied, the models of four relationships are better than all comparison methods. In the YAGO dataset, this model is better than all baseline methods. The average AUC is 0.885, which indicates that the vast majority of triples in the validation set are covered by the generated meta-paths. This shows that the precision of the meta-paths is very high, and the average AP is 0.926. In NELL, compared with "work", LLM4HIN shows significant performance. Although in the relationships of competition and confrontation, this model does not exceed several baselines, it still maintains a relatively high level compared with other baselines.

[0088] In addition, it is worth noting that LLM4HINs generate meta-paths through pre-trained models, which greatly reduces the time required for discovery. In contrast, embedding-based methods require a large number of embedding operations, while RL-based models require long training and learning phases. This model can quickly identify meta-paths. Table 2 shows the average time taken by LLM4HIN to generate 50 different meta-paths. Compared with existing meta-path discovery methods, the time consumption of LLM4HIN is more economical.

[0089]

[0090] Table 2. Time Overhead of LLM4HIN for Generating 50 Meta-Paths

[0091] Table 2 shows the time consumed by LLM4HIN to generate 50 meta-paths for each relationship. Combining with the performance of link prediction, it can be concluded that less time cost means less hallucination, thus producing better results. Next, the meta-paths will be directly analyzed to illustrate how LLM4HINs outperform most baselines.

[0092] 2) Meta-Path Analysis

[0093]

[0094] Table 3 Meta-Paths Found by LLM4HIN

[0095] Table 3 shows some new meta-paths generated by ~LLM4HIN. Obviously, the meta-paths generated by LLM4HIN are comprehensive. Taking the relationship "work" as an example, types such as chef, athlete, CEO, and journalist are all subclasses of "person". Utilizing its powerful natural language understanding ability, LLM4HIN can generate meta-paths that are difficult to discover by embedding-based or RL-based methods. In addition, this model can discover these meta-paths with just a few examples without going through a long learning phase. Therefore, it can be inferred that it is the extraordinary utilization of semantic information that enables this model to discover elusive meta-paths and thus outperform most comparison methods.

[0096] In the inferential experiment, only the NELL dataset that failed to outperform RotatE in the link prediction experiment was considered. 40% of the positive test samples were sampled, and after removing 0%, 20%, 50%, and 100% of the nodes that appeared in this sample pair from the instance graph in turn, training and link prediction were carried out. The ROC-AUC and AP results of LLM4HIN and RotatE under the four removal ratios are as Figure 5 、 Figure 6 shown. In addition, in order to further illustrate the efficacy of the LLM in LLM4HIN, ablation experiments were also carried out.

[0097] 3) Experiment on different base large models

[0098] By evaluating the link prediction performance of ChatGLM Llama2 at scales of 7B, 13B, and 70B, the ROC-AUC was used to compare their link prediction performance on the YAGO dataset, so as to analyze the impact of using different LLMs. As shown in Table 4, the model performs stably among different LLMs, demonstrating its robustness to the selection of LLMs

[0099]

[0100] Table 4 Comparison of different LLMs

[0101] The results show that larger models do not always produce better results. In addition, due to computational resource limitations, large-scale models often suffer from truncation and early stopping problems.

[0102] 4) Inferential experiment

[0103] Generally speaking, RotatE shows excellent performance in all metrics and is superior to LLM4HIN in competitive and adversarial relationships. To evaluate the generalization ability of the model, an inductive experiment was carried out using the NELL dataset. 40% of the samples were drawn from the positive test set, and all nodes that appeared in the pair were removed from the instance graph. The same metrics as before were adopted at this time. The results are shown as Figure 7 .

[0104] As Figure 7 shown, the AUC of RotatE dropped to 0.558 (this value is the mean of the three relationships, the same below), while the AUC of LLM4HINs remained at 0.818. Regarding AP, RotatE dropped to 0.770, while LLM4HINs remained at 0.866. In summary, compared with RotatE, the model shows stronger generalization ability. In addition, compared with other baselines, it can be clearly seen that even without removing nodes, the performance of several baselines is still lower than that of the model, which further highlights the robustness and stability of the model.

[0105] The ablation experiment is to verify the effectiveness of the method. The good performance on different base models indicates that the method is stable and does not change significantly due to model variations. In addition, the inferential experiment is to compare this method with current graph embedding-based methods, showing that this method can also perform well in inference when dealing with unseen entities.

[0106] The above-described disclosed embodiments are described to enable any person skilled in the art to implement or use the present invention. For those skilled in the art, various modification methods of these embodiments are obvious, and the general principles defined in this application can also be applied to other embodiments without departing from the spirit and protection scope of the present disclosure. Therefore, the present disclosure is not limited to the embodiments given in this application, but is consistent with the broadest scope of the principles and novel features disclosed in this application.

[0107] The specific embodiments described above further elaborate on the purpose, technical solutions, and beneficial effects of the present invention. It should be understood that the above are only specific embodiments of the present invention and are not used to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims

1. A meta-path mining method for heterogeneous information networks based on a large language model, characterized in that: include: The relationship to be inferred in link prediction is used as a query relationship, and a triple containing the query relationship is selected from a heterogeneous information network as a sample triple; Determine a meta-path instance through the sample triples; Inputting the meta-path instance into a large language model, so that the large language model outputs a newly generated meta-path based on the meta-path instance, and determines an applicable meta-path from the newly generated meta-path; The applicable meta-path is applied to the heterogeneous information network to perform link prediction.

2. The method for mining heterogeneous information network meta-paths based on a large language model as claimed in claim 1, characterized in that: Determining the meta-path instance through the sample triples specifically includes: Taking two entities in the sample triple as anchor points, a breadth-first search is used to walk and a path is extracted from a triple sequence, wherein the triple sequence consists of a plurality of end-to-end connected triples; Sort all the extracted paths by the number of repetitions from high to low; According to the sorting result, the paths that meet the preset quantity requirement are selected as meta-path instances.

3. The method for mining heterogeneous information network meta-paths based on a large language model as claimed in claim 2, characterized in that: The step of inputting the meta-path instance into a large language model so that the large language model outputs a newly generated meta-path based on the meta-path instance, and determining an applicable meta-path from the newly generated meta-path specifically includes: Using the meta-path instance as an initial demonstration meta-path; Compiling prompt words according to the demonstration meta-path and output requirements; Inputting the prompt word into the large language model, so that the large language model understands the semantic information of the prompt word and outputs a new generator path that meets the output requirement; Selecting the newly generated meta-path that meets the preset judgment condition as the candidate meta-path; Updating the exemplary meta-path with the candidate meta-path; The iterative process is repeatedly performed until the number of iterations meets the preset number requirement. The initial step of the iterative process is: compiling prompt words according to the demonstration meta-path and output requirements: The candidate meta-path obtained last time in the iterative process is used as the applicable meta-path.

4. The method for mining heterogeneous information network meta-paths based on a large language model as claimed in claim 3, characterized in that: The preset judgment condition is that the coverage value of the new generator path is greater than a preset threshold; The calculation method of the coverage is: Among them, I M (v i ,v j ) represents node v i ,v j can be connected by a meta-path M, φ represents a set of relations, r q To query the relationship, Represents a heterogeneous information network.

5. The method for mining heterogeneous information network meta-paths based on a large language model as claimed in claim 4, characterized in that: The prompt word also includes the coverage value of the new generator path obtained in the previous iteration process.

6. A heterogeneous information network meta-path mining system based on a large language model, characterized by: include: A sample selection module, used to use the relationship to be inferred in link prediction as a query relationship, and select triples containing the query relationship from the heterogeneous information network as sample triples; A meta-path instance extraction module, used for determining a meta-path instance through the sample triples; a meta-path expansion module, configured to input the meta-path instance into a large language model, so that the large language model outputs a newly generated meta-path based on the meta-path instance, and determines an applicable meta-path from the newly generated meta-path; The meta-path application module is used to apply the applicable meta-path to the heterogeneous information network to perform link prediction.

7. The heterogeneous information network meta-path mining system based on a large language model as claimed in claim 6, characterized in that: The meta-path instance extraction module is specifically used to: take the two entities in the sample triples as anchor points, use breadth-first search to walk, and extract paths from the triple sequence, wherein the triple sequence is composed of multiple end-to-end connected triplets; sort all the extracted paths from high to low according to the number of repetitions; and select the paths that meet the preset quantity requirements as meta-path instances according to the sorting results.

8. The heterogeneous information network meta-path mining system based on a large language model as claimed in claim 7, characterized in that: The meta-path extension module is specifically used to: use the meta-path instance as an initial demonstration meta-path; compile prompt words according to the demonstration meta-path and output requirements; input the prompt words into the large language model, so that the large language model understands the semantic information of the prompt words, and outputs a newly generated meta-path that meets the output requirements; Selecting the newly generated meta-path that meets the preset judgment condition as the candidate meta-path; The exemplary meta-path is updated with the candidate meta-path; the iterative process is repeatedly performed until the number of iterations meets the preset number requirement, and the initial step of the iterative process is: compiling prompt words according to the exemplary meta-path and the output requirement: taking the candidate meta-path obtained last time in the iterative process as the applicable meta-path.

9. The heterogeneous information network meta-path mining system based on a large language model as claimed in claim 8, characterized in that: The preset judgment condition is that the coverage value of the new generator path is greater than a preset threshold; The calculation method of the coverage is: Among them, I M (v i ,v j ) represents node v i ,v j can be connected by a meta-path M, φ represents a set of relations, r q To query the relationship, Represents a heterogeneous information network.

10. The heterogeneous information network meta-path mining system based on a large language model as claimed in claim 9, characterized in that: The prompt word also includes the coverage value of the new generator path obtained in the previous iteration process.

Citation Information

Cited By

  • Local quotation recommendation method and system based on quotation statement heterogeneous network

    CN120929677A