Multi-language knowledge graph completion method based on efficient multi-language knowledge sharing
By employing a knowledge-level grouped hybrid expert architecture and an iterative entity rearrangement strategy, the problems of model structure mismatch and task paradigm inconsistency in multilingual knowledge graph completion are solved, enabling efficient capture and accurate completion of shared knowledge across multiple languages.
Patent Information
- Application Number
- CN202511004028.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-21
- Publication Date
- 2025-11-07
AI Technical Summary
Existing multilingual knowledge graph completion methods face challenges due to model structure mismatch and task paradigm inconsistency, making it difficult to accurately capture shared knowledge between languages and affecting completion performance.
We employ a large-model fine-tuning method based on a knowledge-level grouped hybrid expert architecture and an iterative entity reordering strategy. By combining a knowledge-level expert routing mechanism and a grouped hybrid expert architecture with an iterative entity reordering strategy, we adjust the ranking of multiple entities to improve the performance of multilingual knowledge graph completion.
It significantly improves the accuracy and robustness of multilingual knowledge graph completion, enhances the ability to capture shared knowledge across multiple languages, and strengthens the model's performance in cross-lingual environments.
Smart Images

Figure CN120911567A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to a multilingual knowledge graph completion method based on efficient multilingual knowledge sharing, and belongs to the technical field of natural language processing. BACKGROUND
[0002] A knowledge graph is a structured semantic knowledge base used to organize and represent real-world knowledge, and is widely used in search engines, intelligent question answering, recommendation systems and other fields. Current mainstream knowledge graphs (such as Wikidata and DBpedia) generally have multilingual characteristics. However, existing multilingual knowledge graphs usually have the problem of incompleteness, which affects their effectiveness in practical applications. To solve the problem of missing information in knowledge graphs, researchers have proposed the task of multilingual knowledge graph completion. Traditional multilingual knowledge graph completion methods are mainly based on embedding models, which map entities and relationships into low-dimensional vector spaces for knowledge completion. However, with the development of language models, more and more research attempts to transform the knowledge graph completion problem into a generation task, using pre-trained language models to capture cross-language semantic information, and has achieved significant performance improvement. Although large language models have certain multilingual understanding and knowledge transfer capabilities, directly applying them to the task of multilingual knowledge graph completion still faces two key challenges: (1) Model structure mismatch: existing parameter-efficient fine-tuning techniques are mainly designed for text generation tasks and are difficult to adapt to knowledge-centric tasks. In the multilingual scenario, single-channel methods are prone to knowledge overload, making it difficult for the model to accurately capture shared knowledge between languages and affecting completion performance; while multi-channel methods will cause knowledge fragmentation, damaging the atomicity of knowledge and affecting the model's understanding of the overall semantics. (2) Task paradigm inconsistency: the task of multilingual knowledge graph completion is essentially an entity ranking task, which deviates from the text generation paradigm that large models are good at. Existing methods that use large models for completion can only adjust the ranking of a single entity. When the large model makes a mistake, it cannot improve the position of the correct entity in the ranking. SUMMARY
[0003] To solve the above problems, the application proposes a multilingual knowledge graph completion method based on efficient multilingual knowledge sharing, which fully utilizes the shared knowledge between multiple languages to improve the performance of multilingual knowledge graph completion, including a fine-tuning method based on knowledge-level grouping and mixed expert architecture and an iterative entity rearrangement strategy. The application has achieved good results in the task of multilingual knowledge graph completion.
[0004] The technical solution of the application is: a multilingual knowledge graph completion method based on efficient multilingual knowledge sharing, the method comprising:
[0005] Step1, first, the Wikidata5M English knowledge graph completion dataset is used to construct a multilingual knowledge graph completion dataset containing English, French, Italian, Chinese and Japanese; then, according to the constructed multilingual knowledge graph completion dataset, a knowledge graph embedding model is used to obtain a candidate entity set, so as to construct a training instruction set for fine-tuning a large model;
[0006] Step2, based on the constructed training instruction set, a large model fine-tuning method based on knowledge level grouping mixed expert architecture is proposed to fine-tune the large model;
[0007] Step3, based on the fine-tuned large model, an iterative entity rearrangement strategy is further introduced, and the ranking of multiple entities is adjusted through multiple iterations to finally obtain a ranked entity list.
[0008] Further, the Step1 comprises:
[0009] First, Wikidata5M is used as a basic seed knowledge base;
[0010] On this basis, the dataset is further expanded to include French, Italian, Chinese and Japanese through data collected from Wikidata;
[0011] Then, a knowledge graph embedding model is used to obtain the top m entities of each query as a candidate entity set to construct a training instruction set for fine-tuning a large model;
[0012] For a query, the constructed instruction P(q) is represented by the following formula:
[0013] P(q) = [Q; D; N; M c ];
[0014] Where Q is the query, D is the specific descriptive information of the head entity h, N is the triple containing the head entity h, which is randomly sampled from the training data of the knowledge graph embedding model; M c = [e1,...,e m ] is the top m entities selected from the ranking results generated by the knowledge graph embedding model, where e m represents the mth entity.
[0015] Further, in the Step2, the large model fine-tuning method based on knowledge level grouping mixed expert architecture adopts a knowledge level expert routing mechanism and an architecture based on grouping mixed experts; in this architecture, only one A matrix and one B matrix in one expert group are activated during the processing of each sample; this architecture only acts on the feedforward network layer FFN layer of the large model; specifically:
[0016] In the forward propagation process, the matrix operation of the FFN layer is represented as:
[0017] y = W0X + y e ;
[0018] where W0 represents the parameter matrix of the original FFN layer, which remains frozen during the training process; X = [x h : x r : x t ] represents the input of the FFN layer, x h , x r , and x t are the representations of the head entity, the relation, and the tail entity, respectively; y e represents the output calculated based on the input X of the knowledge-level grouping hybrid expert architecture, and y represents the final output obtained by combining the FFN layer and the knowledge-level grouping hybrid expert architecture.
[0019] Further, the Step 2 includes:
[0020] (1) The knowledge-level grouping hybrid expert architecture adopts a grouping hybrid expert-based design, and each expert group is represented as:
[0021] G i = (A i , {B i,j |j∈{1,2,...,N b}}) ;
[0022] where i∈{1,2,...,N g}, N g represents the total number of expert groups; N b represents the number of B matrices in each expert group; in each expert group G i , a matrix A i and a B i,j are regarded as an expert E i,j = (A i , B i,j ); where the matrix A i is designed to capture a certain type of similar knowledge; and the multiple matrices B i,j within the group are regarded as modules for capturing subtle differences in this type of knowledge;
[0023] (2) The knowledge-level expert routing mechanism includes three different routing modules: R g , R k , and R l ; first, an expert group is selected through R g ; then, within the expert group, R k and R ldetermine a specific expert to process the input X of FFN layer;
[0024] (3), finally, determine the output y of the input X calculated by the expert E i,j = (A i , B i,j ) processing input X, after selecting the expert E i,j , the output y of the input X calculated by the mixed expert architecture based on knowledge level grouping e is expressed as:
[0025] y e = E i,j (X) = B i,j (A i X)
[0026] Then, y e will be added to the original FFN output.
[0027] Further, in the (2), the three routing specific experts include: g , R k and R l
[0028] Step2.2.1, R g is a routing module for selecting expert groups, which determines which expert group to process the input X; its selection process formula is as follows:
[0029]
[0030] Where, W g is the routing matrix of selecting expert groups, and G i represents the selected expert group for processing X;
[0031] Step2.2.2, R k and R l are routing modules for selecting specific experts, which act on the expert group G i ; R k and R l consider the input X and the output of the matrix A i to determine the specific expert; including:
[0032] R k generates expert selection score S k according to the input X, and the calculation method is as follows:
[0033]
[0034] Where, W k is the routing matrix receiving input X;
[0035] Rl Then, based on the matrix A i , an output A i x m1 is generated, and an expert selection score S l is calculated according to the following formula:
[0036]
[0037] where W l is a routing matrix that receives A i x as input;
[0038] Then, according to the sum of S k and S l , the matrix B i in the expert group G i,j processes X:
[0039]
[0040] Further, the Step3 includes that the iterative entity rearrangement strategy adjusts the training task and decoding strategy of the large model:
[0041] In the training stage, the number of candidate entities m is randomly set to different values, so that the large model has the ability to adjust the ranking of multiple entities in an iterative manner;
[0042] In the decoding stage, the iterative entity rearrangement strategy allows the large model to adjust the order of multiple entities through multiple rounds of entity prediction.
[0043] Further, the Step3 includes:
[0044] For a query q=(h, r,?), the initial candidate entity set is generated by a knowledge graph embedding model, denoted as The entity list to be sorted is initialized as
[0045] The large model performs N t rounds of entity prediction; in the t-th round t∈{1, 2,..., N t}, the operation of entity prediction is as follows:
[0046]
[0047] where denotes the candidate entity set in the t-th round, e (t) is the entity predicted by the large model from , and argmax means returning the maximum value of the function; denotes the candidate entity set in the t-th round given the head entity h, the relationship r, and the candidate entity set Select entity e under the condition i The probability, e i belong
[0048] Next, in the following way Updated to the candidate entity set for the next round
[0049]
[0050] in, Indicates from Remove entity e from the middle (t) ;
[0051] Finally, entity e (t) In L (t) The ranking in the list is updated to obtain the entity list L after the t-th round of sorting. (t+1) :
[0052] L (t+1) =Insert(L (t) \{e (t)},t,e (t) )
[0053] Among them, Insert(L (t) \{e (t)},t,e (t) ) indicates starting from L (t) Remove entity e from the middle (t) Then insert it into L (t) The t-th position;
[0054] After N t After rounds of iteration, a sorted list of entities is finally obtained. The beneficial effects of this invention are:
[0055] 1. This invention proposes a fine-tuning method based on a knowledge-level grouped hybrid expert architecture, which improves the ability to capture shared knowledge across multiple languages;
[0056] 2. This invention also proposes an iterative entity rearrangement strategy, which enables the model to make fuller use of multilingual shared knowledge and further improves the performance of multilingual knowledge graph completion tasks. Attached Figure Description
[0057] Fig. 1 This is a framework diagram of the knowledge-level grouping hybrid expert architecture and iterative entity rearrangement strategy proposed in this invention;
[0058] Fig. 2 This is a schematic diagram of the experimental results of multilingual data imbalance analysis according to an embodiment of the present invention;
[0059] Fig. 3 The implementation result of the analysis of the unseen language of the embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0060] Embodiment 1: As shown in the figure, a multi-language knowledge graph completion method based on efficient multi-language knowledge sharing, the method comprises: Figs. 1-3
[0061] Step1, use Wikidata5M as a basic seed knowledge base, which is a million-scale English knowledge graph data set, the data set is a large-scale multi-language knowledge graph completion data set, containing 351,299 entities, 2,264 relationships, and 3,028,767 triples; on this basis, through the data collected from Wikidata, the data set is further expanded to include French, Italian, Chinese and Japanese; then, the knowledge graph embedding model is used to obtain the top m entities of each query as the candidate entity set to construct the training instruction set of the fine-tuning large model; for the query, the constructed instruction P(q) is expressed as follows:
[0062] P(q)=[Q;D;N;M c ];
[0063] Wherein, Q is the query, D is the specific descriptive information of the head entity h, which enables the model to more accurately understand the meaning of the entity, N is the triple containing the head entity h, these triples are randomly sampled from the training data of the knowledge graph embedding model, these neighbor facts aim to enhance the understanding of the large language model to the entity h; M c =[e1,...,e m ] is the top m entities selected from the ranking results generated by the knowledge graph embedding model, wherein e m represents the mth entity.
[0064] Step2, based on the constructed training instruction set, a large model fine-tuning method based on knowledge level grouping mixed expert architecture is proposed to fine-tune the large model; the fine-tuning method can effectively model multi-language shared knowledge, so as to improve the performance of the multi-language knowledge graph completion task;
[0065] In Step2, the large model fine-tuning method based on the knowledge-level grouping mixed expert architecture adopts a knowledge-level expert routing mechanism and an architecture based on grouping mixed experts, aiming to improve the overall understanding of knowledge and efficient modeling of shared knowledge in multiple languages. The knowledge-level expert routing mechanism ensures that each sample is processed only by a specific expert, rather than by all experts together; in this architecture, only one A matrix and one B matrix in one expert group are activated during the processing of each sample; this architecture only acts on the feedforward network (FFN) layers of the large model; specifically:
[0066] During forward propagation, the matrix operation of the FFN layer is represented as:
[0067] y = W0X + y e ;
[0068] Where W0 represents the parameter matrix of the original FFN layer, which remains frozen during the training process; X = [x h :x r :x t ] represents the input of the FFN layer, x h , x r , and x t represent the representations of the head entity, the relation, and the tail entity, respectively; y e represents the output calculated based on the input X of the knowledge-level grouping mixed expert architecture, and y represents the final output obtained by combining the FFN layer and the knowledge-level grouping mixed expert architecture.
[0069] Further, Step2 includes:
[0070] (1) Based on the knowledge-level grouping mixed expert architecture, a grouping mixed expert-based design is adopted, and each expert group is represented as:
[0071] G i = (A i , {B i,j |j∈{1,2,...,N b}};
[0072] Where i∈{1,2,...,N g}, N g represents the total number of expert groups; N b represents the number of B matrices in each expert group; in each expert group G i , one matrix A i and one B i,j are considered as one expert E i,j = (A i , B i,j ); where matrix A i is designed to capture similar knowledge of a certain type; and multiple matrices Bi,j is considered as a module to capture the subtle differences in this kind of knowledge, and the design aims to improve the ability of language models to capture shared knowledge in a multilingual environment;
[0073] (2), the knowledge-level expert routing mechanism includes three different routing modules: R g , R k and R l ; first, an expert group is selected through R g ; then, a specific expert is determined to process the input X of the FFN layer within the expert group by combining R k and R l ;
[0074] The specific expert selection through R g , R k and R l is described in detail below:
[0075] Step2.2.1, R g is a routing module for selecting an expert group, which determines which expert group to process the input X; its selection process is as follows:
[0076]
[0077] where W g is the routing matrix for selecting an expert group, and G i represents the selected expert group for processing X;
[0078] Step2.2.2, R k and R l are routing modules for selecting a specific expert, which act on the expert group G i ; R k and R l consider the input X and the output of matrix A i to determine the specific expert; specifically including:
[0079] R k generates an expert selection score S k according to the input X, and the calculation method is as follows:
[0080]
[0081] where W k is the routing matrix that receives the input X;
[0082] R l generates an expert selection score S i based on the output A i x m1 of matrix Al with the following formula:
[0083]
[0084] where W l is the received A i X as input to the routing matrix;
[0085] Then, according to the sum of S k and S l , determine the matrix B i in the expert group G i,j handle X:
[0086]
[0087] (3), finally, determine the input X calculated by the expert E i,j = (A i , B i,j ) processing, after selecting the expert E i,j , the output y e calculated by the input X based on the knowledge level grouping mixed expert architecture represents:
[0088] y e = E i,j (X) = B i,j (A i X)
[0089] Then, y e will be added to the original FFN output.
[0090] Step3, based on the fine-tuned large model, further introduce the iterative entity rearrangement strategy, adjust the ranking of multiple entities through multiple iterations, and finally obtain the sorted entity list; to enhance the utilization efficiency of shared knowledge, thereby significantly improving the accuracy of multilingual knowledge graph completion.
[0091] The iterative entity rearrangement strategy aims to improve the utilization ability of large models for cross-language shared knowledge; this strategy fully excavates shared knowledge through multiple iterations, significantly improving the ranking accuracy of correct entities; the iterative entity rearrangement strategy adjusts the training task and decoding strategy of the large model:
[0092] In the training phase, randomly set the number of candidate entities m to different values, so that the large model has the ability to adjust the ranking of multiple entities in an iterative manner;
[0093] In the decoding phase, this iterative entity rearrangement strategy allows the large model to adjust the ranking of multiple entities through multiple rounds of entity prediction.
[0094] Further, the Step3 comprises:
[0095] For a query q = (h, r,?), the initial candidate entity set is generated by the knowledge graph embedding model, denoted as The entity list to be sorted is initialized as
[0096] The large model performs N t rounds of entity prediction; in the t-th round t e {1, 2,..., N t}, the operation of entity prediction is as follows:
[0097]
[0098] Wherein, denotes the candidate entity set in the t-th round, e (t) is the entity predicted by the large model from , and argmax means returning the maximum value of the function; denotes the probability of the large model selecting entity e i under the condition of given head entity h, relation r and candidate entity set in the t-th round, e i belongs to
[0099] Then, update to the candidate entity set in the next round
[0100]
[0101] Wherein, denotes removing entity e (t) from ;
[0102] Finally, update the ranking of entity e (t) in L (t) to obtain the sorted entity list L (t+1) in the t-th round:
[0103] L (t+1) = Insert (L (t) \{e (t)}, t, e (t) )
[0104] Wherein, Insert (L (t) \{e (t)}, t, e (t) ) means removing entity e (t) from L (t) and inserting it into the t-th position of L (t) ;
[0105] After N t After the iteration, the final sorted entity list is obtained
[0106] To verify the effect of the method proposed by the application, the application compares the performance of the proposed framework with the embedding-based method and the generation-based method on the dataset constructed by the application. Hits@1 represents the average proportion of triples in which the correct entity is ranked less than or equal to 1 in link prediction; Hits@3 represents the average proportion of triples in which the correct entity is ranked less than or equal to 3 in link prediction; Hits@10 represents the average proportion of triples in which the correct entity is ranked less than or equal to 10 in link prediction; MRR represents the average of the inverses of the correct entity rankings. Table 1 is the experimental results:
[0107] Table 1 is the comparison experimental results of the knowledge graph completion method
[0108]
[0109] As can be seen from Table 1, the experimental results show that the method of the application achieves the optimal performance in the average indicators of all languages. Specifically, the framework proposed by the application performs better than all the aforementioned methods in the five languages. Compared with the current most advanced multilingual knowledge graph completion method GC-PLM, the framework of the application improves by 5.47%, 3.27%, 1.01% and 6.13% in the Hits@1, Hits@3, Hits@10 and MRR indicators, respectively. In addition, compared with the current most advanced monolingual knowledge graph completion method DIFT based on large language models, the framework of the application also achieves significant performance improvement. In summary, the experimental results clearly demonstrate the effectiveness and superiority of the framework proposed by the application.
[0110] To evaluate the robustness of the application in the case of uneven language distribution in the training data, the application performs related experiments. Specifically, the application sets different proportions of training data for the five languages while keeping the total amount of training data unchanged. As shown in Fig. 2 Although the language proportion changes, the Hits@1 scores of each language (dotted line) and the average scores of the five languages (solid line) remain relatively stable. Obviously, the application is not sensitive to changes in language distribution. Based on this analysis, the application can effectively utilize the shared knowledge across languages, thereby showing strong robustness.
[0111] To evaluate the generalization ability of the application on languages not included in the training data, the application performs analysis experiments. These experiments use three different training configurations: (1) only English and French are used for training; (2) English, French and Chinese are used for training; (3) five languages are used for training. AsFig. 3 As shown, the (green) columnar chart shows that the LLMs trained only on English and French data also exhibit significant knowledge graph completion performance on unseen languages such as Italian (IT), Japanese (JA), and Chinese (ZH). This result clearly indicates that knowledge sharing is not only effective between languages that are encountered during training, but also exhibits significant cross-lingual generalization ability between unseen languages. In addition, the present application also observes that the performance of each language continues to improve as the number of training languages increases. This finding suggests that multilingual training data provides richer knowledge signals to the LLM, thereby facilitating the sharing of multilingual knowledge.
[0112] To verify the effectiveness of each component in the framework proposed by the present application, the present application conducts an ablation experiment. The present application assesses the contribution of each component by removing it one by one. As shown in Table 2, when the knowledge-level grouping-based hybrid expert architecture is removed, Hits@1 decreases from 41.88 to 40.28, Hits@3 decreases from 50.93 to 49.71, Hits@10 decreases from 58.78 to 58.07, and MRR decreases from 47.86 to 46.55. This indicates that this component plays a key role in improving the performance of multilingual knowledge graph completion (MKGC). In addition, when the knowledge-level grouping-based hybrid expert architecture and the iterative entity rearrangement strategy are removed at the same time, the values of Hits@3, Hits@10, and MRR further decrease compared to when only the knowledge-level grouping-based hybrid expert architecture is removed. This further indicates that the iterative entity rearrangement strategy also positively contributes to the performance of multilingual knowledge graph completion. These ablation experiment results strongly demonstrate the effectiveness of the two components proposed by the present application.
[0113] Table 2 is the ablation experiment results
[0114]
[0115] The knowledge-level grouping-based hybrid expert architecture is abbreviated as kg; the iterative entity rearrangement strategy is abbreviated as ire.
[0116] The specific embodiments of the present application are described in detail above in conjunction with the accompanying drawings, but the present application is not limited to the above-described embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the spirit of the present application.
Claims
1. A method for multilingual knowledge graph completion based on efficient multilingual knowledge sharing, characterized in that: The method comprises: Step1, first, the English knowledge graph completion dataset of Wikidata5M is used to construct a multilingual knowledge graph completion dataset containing English, French, Italian, Chinese and Japanese; then, according to the constructed multilingual knowledge graph completion dataset, a knowledge graph embedding model is used to obtain a candidate entity set, so as to construct a training instruction set of a fine-tuning large model; Step2, based on the constructed training instruction set, a large model fine-tuning method based on knowledge level grouping mixed expert architecture is proposed to fine-tune the large model; Step3, based on the fine-tuned large model, an iterative entity rearrangement strategy is further introduced, and the ranking of multiple entities is adjusted through multiple iterations to finally obtain a ranked entity list.
2. The multi-language knowledge graph completion method based on efficient multi-language knowledge sharing according to claim 1, characterized in that: The Step1 comprises: First, Wikidata5M is used as a basic seed knowledge base; On this basis, the dataset is further expanded to include French, Italian, Chinese and Japanese through data collected from Wikidata; Then, the knowledge graph embedding model is used to obtain the top m entities of each query as the candidate entity set to construct the training instruction set of the fine-tuning large model; For a query, the constructed instruction P(q) is represented by the following formula: P(q) = [Q; D; N; M c ]; wherein Q is a query, D is specific descriptive information of the head entity h, N is triples containing the head entity h, and these triples are randomly sampled from the training data of the knowledge graph embedding model; M c = [e1,..., em] is the top m entities selected from the ranking result generated by the knowledge graph embedding model, wherein em represents the mth entity. m m 3. The multi-language knowledge graph completion method based on efficient multi-language knowledge sharing according to claim 1, characterized in that: In the Step2, the large model fine-tuning method based on knowledge level grouping mixed expert architecture adopts a knowledge level expert routing mechanism and an architecture based on grouping mixed experts; In this architecture, during the processing of each sample, only one A matrix and one B matrix in one expert group are activated; the architecture only acts on the feedforward network layer (FFN layer) of the large model; specifically: During forward propagation, the matrix operation of the FFN layer is represented as: y = W0X + y e ; where W0represents the parameter matrix of the original FFN layer, which remains frozen during the training process; X = [x h :x r :x t ] represents the input of the FFN layer, x h , x r , x t are the representations of head entity, relation and tail entity respectively; y e represents the output calculated based on the input X of the knowledge level grouping hybrid expert architecture, and y represents the final output obtained by combining the FFN layer and the knowledge level grouping hybrid expert architecture.
4. The multi-language knowledge graph completion method based on efficient multi-language knowledge sharing according to claim 1, characterized in that: The Step2 comprises: (1) Based on the knowledge level grouping mixed expert architecture, a grouping mixed expert based design is adopted, and each expert group is represented as: G i = (A i , B i,j | j e {1, 2,..., N b}}; where i ∈ {1, 2,..., N g} g denotes the total number of expert groups; N b denotes the number of B matrices in each expert group; in each expert group G i , one matrix A i is considered together with one B i,j as one expert E i,j = (A i , B i,j ); where matrix A i is designed to capture a certain type of similar knowledge; while multiple matrices B i,j within a group are considered as modules to capture subtle differences in that type of knowledge. (2) The knowledge level expert routing mechanism contains three different routing modules: R g , R k and R l ; first, an expert group is selected by R g ; then, within the expert group, a specific expert is determined to process the input X of the FFN layer by combining R k and R l ; (3) Finally, determine the output y computed by the expert E i,j = (A i ,B i,j ) processing the input X, after selecting the expert E i,j based on the knowledge level grouping of the input X of the hybrid expert architecture e is expressed as: y e = E i,j (X) = B i,j (A i X) Then, y e The original FFN output will be added to.
5. The multi-lingual knowledge graph completion method based on efficient multi-lingual knowledge sharing according to claim 4, characterized in that: In the (2), by R g , R k and R l These three routing specific experts include: Step 2.2.1, R g is a routing module for selecting the expert group, deciding which expert group to process the input X; its selection process is formulated as follows: where W g is the routing matrix of the selected group of experts, G i denotes the selected group of experts for processing X; Step 2.2.2, R k and R l is a routing module for selecting a specific expert, which acts on the expert group G i internally; R k and R l comprehensively considers the input X and the output of the matrix A i to determine a specific expert; specifically comprising: R k Generating expert selection score S from input X k , computed as follows: where W k is a routing matrix that receives input X; R l Then, based on the matrix A i the output A i x m1 is generated, which is the expert selection score S l , whose calculation formula is as follows: where W l is a routing matrix receiving A i X as input; Then, according to the sum of S k and S l , the matrix B i in the expert group G i,j is determined Process X:
6. The multi-lingual knowledge graph completion method based on efficient multi-lingual knowledge sharing according to claim 1, characterized in that: The Step3 comprises that the iterative entity rearrangement strategy adjusts the training task and decoding strategy of the large model: In the training stage, the number of candidate entities m is randomly set to different values, so that the large model has the ability to adjust the ranking of multiple entities in an iterative manner; In the decoding stage, the iterative entity rearrangement strategy allows the large model to adjust the ranking of multiple entities through multiple rounds of entity prediction.
7. The method of claim 1, wherein the method is based on efficient multilingual knowledge sharing for multilingual knowledge graph completion. The Step3 comprises: For a query q = (h, r,?), the initial candidate entity set is generated by the knowledge graph embedding model, denoted as The entity list to be sorted is initialized as Large model performs N t entity predictions; in the t-th ∈ {1, 2,..., N t} round, the operation of entity prediction is as follows: wherein, denotes the set of candidate entities for the t-th round, e (t) is the entity predicted by the large model from argmax denotes returning the maximum value of a function; denotes the probability of the large model selecting entity e i under the condition that the head entity h, the relation r, and the set of candidate entities for the t-th round e i belongs to Next, the candidate entity set for the next round is updated by updating the candidate entity set for the next round wherein, represents removal of entity e from (t) ; Finally, the entities e (t) in L (t) are ranked and the list of ranked entities L (t+1) after the t-th round is obtained. L (t+1) = Insert(L (t) , t, e (t) ) (t) ) wherein, Insert(L (t) \{e (t)},t,e (t) ) denotes removing entity e (t) from L (t) and inserting it into the t-th position of L (t) ; After N t After N iterations, the final sorted entity list is obtained
Citation Information
Patent Citations
Knowledge graph completion method based on large language model
CN117634604A
Knowledge graph construction method and system based on large model technology
CN119494390A