Large spaceflight model reliability enhancement method based on knowledge graph and causal relationship
By sorting and processing aerospace data in the knowledge graph and causal relationship model in the aerospace field, and building relationship graphs and causal attention modules, the hallucination problem of large machine learning models in the aerospace field is solved, and the reliability and prediction accuracy of the model are improved. .
Patent Information
- Application Number
- CN202411166746.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-08-23
AI Technical Summary
There are hallucinations in the application of large-scale machine learning models in the aerospace field, resulting in inaccurate or biased output results, affecting system security, and the solutions to increase data volume and diversity have problems such as data acquisition and large resource investment.
Using aerospace big model reliability enhancement method based on knowledge graphs and causal relationships, the CAS-FS attention module and CASFS-AM overall module are constructed through text data sorting, processing and training, and the open information extraction technology and co-reference digestion technology are constructed. Relationship graph and adjacency matrix enhance the causal inference ability of the model.
It improves the causality of the big model, enhances the speed of troubleshooting and the accuracy of prediction technology, helps evaluate mission risks, solves hallucinations, and improves the reliability of the aerospace field system.
Smart Images

Figure CN119166828A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of aerospace information extraction, and specifically relates to a method for enhancing the reliability of aerospace large models based on knowledge graphs and causal relationships. Background Art
[0002] With the rapid development of artificial intelligence technology, large machine learning models, especially large language models, are improving at an unprecedented rate, greatly promoting technological innovation and industry change. However, the development of large models has also aroused attention and discussion from many aspects, and the hallucination problem of large models has become a hot topic in related discussions. Inaccurate or biased model output results in the question-and-answer process will lead to wrong decisions, especially in the aerospace field, which may affect the safety of the entire system and cause huge losses. At present, the solution of increasing the amount and diversity of data has certain difficulties due to the difficulty in obtaining data. Strengthening the promotion method also requires a lot of human resources and computing resources. Summary of the invention
[0003] The problem to be solved by the present invention is to improve the high reliability of large models in the aerospace field, and propose a method for enhancing the reliability of large aerospace models based on knowledge graphs and causal relationships.
[0004] To achieve the above object, the present invention is implemented through the following technical solutions:
[0005] A method for enhancing the reliability of aerospace large models based on knowledge graph and causal relationship includes the following steps:
[0006] S1. Text data collation, collect industry data related to the aerospace field, and organize text data sets as input data for large models;
[0007] S2. Text data processing: construct an adjacency matrix for the input data obtained in step S1, construct a relationship graph using open information extraction technology, and construct an adjacency matrix using coreference resolution technology;
[0008] S3. The aerospace model structure design based on knowledge graph and causal relationship includes building the CAS-FS attention module, then building the CASFS-AM overall module based on the CAS-FS attention module, then iterating the CASFS-AM overall module to L times, and then passing through the linear layer to obtain the judgment prediction;
[0009] S4. Use the text data set obtained in step S1 to train the aerospace model based on knowledge graph and causal relationship constructed in step S3 to obtain a large model exclusive to the aerospace field with causal relationship inference.
[0010] Furthermore, the specific implementation method of step S1 includes the following steps:
[0011] S1.1. Collect and organize text data and industry data related to the aerospace field, including scientific experiment reports, policy evaluation reports, scientific papers, case studies, text data with causal relationships, and texts describing events without clear causal relationships;
[0012] S1.2. Filter the selected texts to remove text noise, including irrelevant information, repeated content, and erroneous or inaccurate expressions, and obtain the sorted aerospace-related industry data.
[0013] Furthermore, the specific implementation method of step S2 includes the following steps:
[0014] S2.1. Perform text data vectorization on the aerospace-related industry data obtained in step S1, and use the encoding layer of transformer to transform the aerospace-related industry data into an embedding representation matrix X;
[0015] S2.2. Use open information extraction technology to construct the relationship graph G;
[0016] S2.3. Based on the relationship graph obtained in step S2.2, construct the adjacency matrix A using the coreference resolution technique.
[0017] Furthermore, the specific implementation method of step S2.2 includes the following steps:
[0018] S2.2.1. First, perform data analysis on the data to count the length of each sentence and the number of triples, as well as the number distribution of each relationship, to assist in determining the input size of the model and understanding the data structure;
[0019] S2.2.2. Clean the text data, remove useless symbols and stop words, use the jieba tool to perform Chinese word segmentation on the text data, first use the BIO annotation system to annotate the sentences, and at the same time annotate the predicates, marking them as VERB or custom role labels. The B-label indicates that the current word is the beginning of an entity, the I-label indicates the inside of an entity, that is, the component of the word, and the O-label indicates that the current word does not belong to any entity, that is, it is not a component of any entity;
[0020] S2.2.3. Input text sequence X, use ALBERT+Bi-LSTM+CRF model to perform sequence annotation of custom labels, use ALBERT model as feature extractor, generate initial word vector representation E; input the obtained vector into Bi-LSTM for enhancement, learn word order and long-distance dependency, and improve the model's ability to understand sequences; sequence generation model CRF is used as decoder combined with Bi-LSTM output, and the optimal annotation path is found by calculating the score of each label sequence, and the entities and predicates in the prediction model are used as nodes;
[0021]
[0022] Among them, x t is the vector representation of the tth word in the input text sequence, and x t The forward and reverse hidden states of and The forward hidden state of the previous unit and the reverse hidden state of the next unit are respectively combined to obtain the feature representation h of the tth unit. t ;
[0023] S(t,t+1)=s(h t ,y t+1 )+λ(y t ,y t+1 )
[0024] where S(·,·) represents the score of the CRF layer and s(·) is the hidden state h t to label y t+1 , λ(·,·) is the transfer score of the label pair;
[0025]
[0026] Among them, Θ represents the model parameters and T represents the sequence length;
[0027] S2.2.4. Select machine learning or deep learning methods to predict the relationship between the nodes of the graph. This is achieved by training a classification model. The input is node features and context information, and the output is the relationship type. The relationship graph is constructed using the extracted subject and object, and the relationship between predicate nodes and nodes.
[0028] Furthermore, the specific implementation method of step S2.3 includes the following steps:
[0029] S2.3.1. For the relationship graph G obtained in step S2, perform co-reference mentions on the nodes and create a candidate set C for each mention m, m is the index mentioned, the candidate set C m Include all other references that may refer to the same entity;
[0030] C m ={n|n∈N,n≠m, mention n and mention m may refer to the same entity}
[0031] Where N is the set of all mentions in the relationship graph;
[0032] S2.3.2. Extract the coreference features from the relationship graph G obtained in step S2, including syntactic structure, part-of-speech grammatical features, semantic features, and contextual features, to form the feature set F m ;
[0033] S2.3.3. Step S2.3.2. The similarity score S between the mentions in the candidate set is calculated using the co-reference feature. mn ;
[0034] S mn =f(F m ,F n )
[0035] Where m and n are the mentioned indices, and f is the similarity calculation function, which is cosine similarity or Jaccard similarity;
[0036] S2.3.4. Based on the similarity scores, use hierarchical clustering or K-means clustering to group the mentions. Mentions in the same group refer to the same entity, denoted as G'. The clustering goal is to maximize the similarity within the group and minimize the similarity between groups.
[0037] S2.3.5. Update the coreference and dependency relationships. For each node in the relationship graph, insert the [NCI] symbol at the beginning and end of the whole, between each sentence, and before the subject, predicate, and object in each sentence to block the connection between non-causal information. Convert all [NCI] symbols into blocking nodes at the corresponding positions in the matrix. The corresponding row and column values of the blocking nodes in the matrix are 0, and the corresponding values of the matrix are A. ij The confidence or similarity score based on coreference resolution, i.e., A ij =S mn ; For nodes pointing to the same entity, they share dependencies in the process of building the adjacency matrix, which means that the corresponding value of the node of the same entity to other nodes in the adjacency matrix is the maximum value of the similarity between all nodes of the same entity and the node.
[0038] Furthermore, the specific implementation method of step S3 includes the following steps:
[0039] S3.1. Construct CAS-FS attention module;
[0040] The sorted aerospace industry data is used as input, and the input vector of the attention module is set to be X = [x1, x2, ..., x T ], the vector representation X is mapped to the query matrix Q through linear mapping and FSMN memory blocks respectively. t , key matrix K t , value matrix V t , the expression is as follows:
[0041]
[0042]
[0043] V t =W V x t
[0044] Among them, N1 is the review sequence, which represents the review of the historical projects in the past, N2 is the prospect sequence, which represents the size of the prospect window into the future; ⊙ represents the Hadamard product, x t is the tth input vector in the input vector X, a i , b i , c j , d j All are weights;
[0045] Using the obtained Q t , K t , V t Calculate the basic attention weight S, the expression is:
[0046]
[0047] Where d is the dimension of the input vector X;
[0048] The new attention weight is derived from the basic attention weight, and the new attention weight is S', which is expressed as:
[0049] S′=αS+(1-α)S⊙A
[0050] Among them, α is the causal weight, A is the adjacency matrix constructed in step S2.3, the obtained S' is connected to the softmax function and multiplied by V, and the output Y of the causal attention module is obtained according to the causal attention, which is expressed as:
[0051] Y = softmax(S′)V
[0052] Where V is the calculated value matrix;
[0053] S3.2. Construct the CASFS-AM overall module: The output of the CAS-FS attention module obtained in step S3.1 is added and normalized with the embedding representation matrix obtained in step S2, and then passed through a fully connected feedforward network consisting of two linear transformations with a RELU activation set between the two linear transformations. The expression is:
[0054] FFN(X)=RELU(XW1+b1)W2+b2
[0055] Among them, FFN(X) is the output result of the feedforward neural network, W1 and W2 represent the first linear transformation and the second linear transformation, b1 and b2 represent the deviation;
[0056] S3.3. Iterate the CASFS-AM module, and repeat the iteration L times of the CASFS-AM module obtained in step S3.2, where L is adjusted according to the actual situation, to obtain the output of the attention module part based on causality and memory reduction;
[0057] S3.4. The output of the causal relationship and memory reduction attention module obtained in step S3.3 is used as the input of the linear layer and input into a linear layer to obtain the final judgmental prediction output.
[0058] Furthermore, the evaluation indicators in the training process of step S4 are selected from perplexity, BLEU score, ROUGE score, aerospace-specific domain relevance score and expert review aerospace domain professionalism score;
[0059] S4.1. The perplexity is calculated by taking the logarithm of the predicted probability of each word and then averaging the logarithmic probability of all words. The expression is:
[0060]
[0061] Among them, PP(W) is the perplexity, P(w i |w1,…,w i-1 ) is the probability given the previous context;
[0062] S4.2. The BLEU score evaluates the translation quality by comparing the n-gram overlap between the machine translation output and a set of translations, expressed as:
[0063]
[0064] Among them, C n is the number of correct n-grams, r n is the total number of n-grams in machine translation, c n is the total number of n-grams in the reference translation;
[0065] S4.3.ROUGE score is used to evaluate automatic summarization and machine translation, and evaluates the similarity between the generated text and the reference text by calculating the overlapping n-grams;
[0066] Extract the corresponding two-word bigrams from the generated text, and count the corresponding bigrams extracted from the generated text and the reference text; count the number of bigrams in the generated text that appear in the reference text, calculate the precision and recall based on the bigrams of the generated text and the reference text, and thus calculate the harmonic mean;
[0067] S4.4. Design a dedicated aerospace relevance score. Invite relevant technicians to specify a list of keywords in the aerospace field, calculate the number of occurrences of these keywords in the input questions, and match them with the number of keywords in the output answers. The expression of the aerospace-specific keyword matching score Shared KMS is:
[0068]
[0069] Among them, m is the number of common keywords, TF i,q is the frequency of the ith keyword in the question, TF i,a is the frequency of the ith keyword in the answer;
[0070] Assisted manual evaluation measures semantic understanding and text quality, and invites experts to evaluate questions and answers to assess their expertise and depth in the aerospace field;
[0071] S4.5. Comprehensively weight the above scores to obtain a large model trained specifically for the aerospace field with causal inference capabilities.
[0072] Beneficial effects of the present invention:
[0073] The invention discloses a method for enhancing the reliability of aerospace large models based on knowledge graph and causal relationship. It utilizes the open information extraction technology and coreference resolution technology in the knowledge graph to obtain the adjacency matrix, and utilizes the matrix with causal relationship to linearly transform the attention weights. This method is combined with the original large model network to enhance the relevant causality of the large model. It is applied to aerospace systems to solve the hallucination problem of large models, improve the speed of troubleshooting, enhance the accuracy of prediction technology, and help assess the risks of various tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Figure 1 This is a flow chart of a method for enhancing the reliability of aerospace large models based on knowledge graph and causal relationship according to the present invention;
[0075] Figure 2This is a data processing schematic diagram of a method for enhancing the reliability of aerospace large models based on knowledge graph and causal relationship according to the present invention;
[0076] Figure 3 This is a schematic diagram of the algorithm framework of a method for enhancing the reliability of aerospace large models based on knowledge graph and causal relationship described in the present invention. DETAILED DESCRIPTION
[0077] In order to make the purpose, technical solution and advantages of the present invention more clear, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention, that is, the specific embodiments described are only part of the embodiments of the present invention, rather than all of the specific embodiments. The components of the specific embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations, and the present invention can also have other embodiments.
[0078] Therefore, the following detailed description of the specific embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents the selected specific embodiments of the present invention. Based on the specific embodiments of the present invention, all other specific embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.
[0079] In order to further understand the content, features and effects of the present invention, the following specific implementation methods are given as examples, and the attached Figure 1-3 The detailed instructions are as follows:
[0080] Embodiment 1:
[0081] A method for enhancing the reliability of aerospace large models based on knowledge graph and causal relationship includes the following steps:
[0082] S1. Text data collation, collect industry data related to the aerospace field, and organize text data sets as input data for large models;
[0083] Furthermore, the specific implementation method of step S1 includes the following steps:
[0084] S1.1. Collect and organize text data and industry data related to the aerospace field, including scientific experiment reports, policy evaluation reports, scientific papers, case studies, text data with causal relationships, and texts describing events without clear causal relationships;
[0085] S1.2. Screen the selected texts to remove text noise, including irrelevant information, repeated content, and erroneous or inaccurate expressions, and obtain the sorted aerospace-related industry data;
[0086] S2. Text data processing: construct an adjacency matrix for the input data obtained in step S1, construct a relationship graph using open information extraction technology, and construct an adjacency matrix using coreference resolution technology;
[0087] Furthermore, the specific implementation method of step S2 includes the following steps:
[0088] S2.1. Perform text data vectorization on the aerospace-related industry data obtained in step S1, and use the encoding layer of transformer to transform the aerospace-related industry data into an embedding representation matrix X;
[0089] S2.2. Use open information extraction technology to construct the relationship graph G;
[0090] Furthermore, the specific implementation method of step S2.2 includes the following steps:
[0091] S2.2.1. First, perform data analysis on the data to count the length of each sentence and the number of triples, as well as the distribution of the number of each relationship, to assist in determining the input size of the model and understanding the data structure;
[0092] S2.2.2. Clean the text data, remove useless symbols and stop words, use the jieba tool to perform Chinese word segmentation on the text data, first use the BIO annotation system to annotate the sentences, and at the same time annotate the predicates, marking them as VERB or custom role labels. The B-label indicates that the current word is the beginning of an entity, the I-label indicates the inside of an entity, that is, the component of the word, and the O-label indicates that the current word does not belong to any entity, that is, it is not a component of any entity;
[0093] S2.2.3. Input text sequence X, use ALBERT+Bi-LSTM+CRF model to perform sequence annotation of custom labels, use ALBERT model as feature extractor, generate initial word vector representation E; input the obtained vector into Bi-LSTM for enhancement, learn word order and long-distance dependency, and improve the model's ability to understand sequences; sequence generation model CRF is used as decoder combined with Bi-LSTM output, and the optimal annotation path is found by calculating the score of each label sequence, and the entities and predicates in the prediction model are used as nodes;
[0094]
[0095] Among them, x t is the vector representation of the tth word in the input text sequence, and x t The forward and reverse hidden states of and The forward hidden state of the previous unit and the reverse hidden state of the next unit are respectively combined to obtain the feature representation h of the tth unit. t ;
[0096] S(t,t+1)=s(h t ,y t+1 )+λ(y t ,y t+1 )
[0097] where S(·,·) represents the score of the CRF layer and s(·) is the hidden state h t to label y t+1 , λ(·,·) is the transfer score of the label pair;
[0098]
[0099] Among them, Θ represents the model parameters and T represents the sequence length;
[0100] S2.2.4. Select machine learning or deep learning methods to predict the relationship between nodes in the graph, which is achieved by training a classification model, with node features and context information as input and relationship types as output, and constructing a relationship graph using the extracted subject and object, and the relationship between predicate nodes and nodes;
[0101] S2.3. Based on the relationship graph obtained in step S2.2, construct an adjacency matrix A using the coreference resolution technique;
[0102] Furthermore, the specific implementation method of step S2.3 includes the following steps:
[0103] S2.3.1. For the relationship graph G obtained in step S2, perform co-reference mentions on the nodes and create a candidate set C for each mention m , m is the index mentioned, the candidate set C m Include all other references that may refer to the same entity;
[0104] C m ={n|n∈N,n≠m, mention n and mention m may refer to the same entity}
[0105] Where N is the set of all mentions in the relationship graph;
[0106] S2.3.2. Extract the coreference features from the relationship graph G obtained in step S2, including syntactic structure, part-of-speech grammatical features, semantic features, and contextual features, to form the feature set F m ;
[0107] S2.3.3. Step S2.3.2. The similarity score S between the mentions in the candidate set is calculated using the co-reference feature. mn ;
[0108] S mn =f(F m ,F n )
[0109] Where m and n are the mentioned indices, and f is the similarity calculation function, which is cosine similarity or Jaccard similarity;
[0110] S2.3.4. Based on the similarity scores, use hierarchical clustering or K-means clustering to group the mentions. Mentions in the same group refer to the same entity, denoted as G'. The clustering goal is to maximize the similarity within the group and minimize the similarity between groups.
[0111] S2.3.5. Update the coreference and dependency relationships. For each node in the relationship graph, insert the [NCI] symbol at the beginning and end of the whole, between each sentence, and before the subject, predicate, and object in each sentence to block the connection between non-causal information. Convert all [NCI] symbols into blocking nodes at the corresponding positions in the matrix. The corresponding row and column values of the blocking nodes in the matrix are 0, and the corresponding values of the matrix are A. ij The confidence or similarity score based on coreference resolution, i.e., A ij =S mn ; For nodes pointing to the same entity, they share dependencies in the process of building the adjacency matrix, which means that the corresponding value of the node of the same entity to other nodes in the adjacency matrix is the maximum value of the similarity between all nodes of the same entity and the node;
[0112] S3. The aerospace model structure design based on knowledge graph and causal relationship includes building the CAS-FS attention module, then building the CASFS-AM overall module based on the CAS-FS attention module, then iterating the CASFS-AM overall module to L times, and then passing through the linear layer to obtain the judgment prediction;
[0113] Furthermore, the specific implementation method of step S3 includes the following steps:
[0114] S3.1. Construct CAS-FS attention module;
[0115] The sorted aerospace industry data is used as input, and the input vector of the attention module is set to be X = [x1, x2, ..., x T ], the vector representation X is mapped to the query matrix Q through linear mapping and FSMN memory blocks respectively. t , key matrix K t , value matrix V t, the expression is as follows:
[0116]
[0117] V t =W V x t
[0118] Among them, N1 is the review sequence, which represents the review of the historical projects in the past, N2 is the prospect sequence, which represents the size of the prospect window into the future; ⊙ represents the Hadamard product, x t is the tth input vector in the input vector X, a i , b i , c j , d j All are weights;
[0119] Using the obtained Q t , K t , V t Calculate the basic attention weight S, the expression is:
[0120]
[0121] Where d is the dimension of the input vector X;
[0122] The new attention weight is derived from the basic attention weight, and the new attention weight is S', which is expressed as:
[0123] S′=αS+(1-α)S⊙A
[0124] Among them, α is the causal weight, A is the adjacency matrix constructed in step 2.3, the obtained S' is connected to the softmax function and multiplied by V, and the output Y of the causal attention module is obtained according to the causal attention, which is expressed as:
[0125] Y = softmax(S′)V
[0126] Where V is the calculated value matrix;
[0127] S3.2. Construct the CASFS-AM overall module: The output of the CAS-FS attention module obtained in step S3.1 is added and normalized with the embedding representation matrix obtained in step S2, and then passed through a fully connected feedforward network consisting of two linear transformations with a RELU activation set between the two linear transformations. The expression is:
[0128] FFN(X)=RELU(XW1+b1)W2+b2
[0129] Among them, FFN(X) is the output result of the feedforward neural network, W1 and W2 represent the first linear transformation and the second linear transformation, b1 and b2 represent the deviation;
[0130] S3.3. Iterate the CASFS-AM module, and repeat the iteration L times of the CASFS-AM module obtained in step S3.2, where L is adjusted according to the actual situation, to obtain the output of the attention module part based on causality and memory reduction;
[0131] S3.4. The output of the causal relationship and memory reduction attention module obtained in step S3.3 is used as the input of the linear layer and input into a linear layer to obtain the final judgmental prediction output.
[0132] S4. Use the text data set obtained in step S1 to train the aerospace model based on knowledge graph and causal relationship constructed in step S3 to obtain a large model exclusive to the aerospace field with causal relationship inference.
[0133] Furthermore, the evaluation indicators in the training process of step S4 are selected from perplexity, BLEU score, ROUGE score, aerospace-specific domain relevance score and expert review aerospace domain professionalism score;
[0134] S4.1. The perplexity is calculated by taking the logarithm of the predicted probability of each word and then averaging the logarithmic probability of all words. The expression is:
[0135]
[0136] Among them, PP(W) is the perplexity, P(w i |w1,…,w i-1 ) is the probability given the previous context;
[0137] S4.2. The BLEU score evaluates the translation quality by comparing the n-gram overlap between the machine translation output and a set of translations, expressed as:
[0138]
[0139] Among them, C n is the number of correct n-grams, r n is the total number of n-grams in machine translation, c n is the total number of n-grams in the reference translation;
[0140] S4.3.ROUGE score is used to evaluate automatic summarization and machine translation, and evaluates the similarity between the generated text and the reference text by calculating the overlapping n-grams;
[0141] Extract the corresponding two-word bigrams from the generated text, and count the corresponding bigrams extracted from the generated text and the reference text; count the number of bigrams in the generated text that appear in the reference text, calculate the precision and recall based on the bigrams of the generated text and the reference text, and thus calculate the harmonic mean;
[0142] S4.4. Design a dedicated aerospace relevance score. Invite relevant technicians to specify a list of keywords in the aerospace field, calculate the number of occurrences of these keywords in the input questions, and match them with the number of keywords in the output answers. The expression of the aerospace-specific keyword matching score Shared KMS is:
[0143]
[0144] Among them, m is the number of common keywords, TF i,q is the frequency of the ith keyword in the question, TF i,a is the frequency of the ith keyword in the answer;
[0145] Assisted manual evaluation measures semantic understanding and text quality, and invites experts to evaluate questions and answers to assess their expertise and depth in the aerospace field;
[0146] S4.5. Comprehensively weight the above scores to obtain a large model trained specifically for the aerospace field with causal inference capabilities.
[0147] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0148] Although the present application has been described above with reference to specific embodiments, various modifications may be made thereto and parts thereof may be replaced with equivalents without departing from the scope of the present application. In particular, as long as there is no structural conflict, the various features in the specific embodiments disclosed in the present application may be used in combination with each other in any manner, and the fact that these combinations are not exhaustively described in this specification is only for the sake of omitting space and saving resources. Therefore, the present application is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.
Claims
1. A method for enhancing the reliability of aerospace large models based on knowledge graph and causal relationship, characterized in that: The steps include: S1. Text data collation, collect industry data related to the aerospace field, and organize text data sets as input data for large models; S2. Text data processing: constructing an adjacency matrix for the input data obtained in step S1, constructing a relationship graph using open information extraction technology, and constructing an adjacency matrix using coreference resolution technology; S3. The aerospace model structure design based on knowledge graph and causal relationship includes building the CAS-FS attention module, then building the CASFS-AM overall module based on the CAS-FS attention module, then iterating the CASFS-AM overall module to L times, and then passing through the linear layer to obtain the judgment prediction; S4. Use the text data set obtained in step S1 to train the aerospace model based on knowledge graph and causal relationship constructed in step S3 to obtain an aerospace-specific model with causal relationship inference.
2. According to claim 1, a method for enhancing the reliability of aerospace large models based on knowledge graph and causal relationship, characterized in that: The specific implementation method of step S1 includes the following steps: S1.
1. Collect and organize text data and industry data related to the aerospace field, including scientific experiment reports, policy evaluation reports, scientific papers, case studies, text data with causal relationships, and texts describing events without clear causal relationships; S1.
2. Filter the selected texts to remove text noise, including irrelevant information, repeated content, and erroneous or inaccurate expressions, and obtain the sorted aerospace-related industry data.
3. A method for enhancing the reliability of aerospace large models based on knowledge graph and causal relationship according to claim 1 or 2, characterized in that: The specific implementation method of step S2 includes the following steps: S2.
1. Perform text data vectorization on the aerospace-related industry data obtained in step S1, and use the encoding layer of transformer to transform the aerospace-related industry data into an embedding representation matrix X; S2.
2. Use open information extraction technology to construct the relationship graph G; S2.
3. Based on the relationship graph obtained in step S2.2, construct the adjacency matrix A using the coreference resolution technique.
4. According to claim 3, a method for enhancing the reliability of aerospace large models based on knowledge graph and causal relationship is characterized in that: The specific implementation method of step S2.2 includes the following steps: S2.2.
1. First, perform data analysis on the data to count the length of each sentence and the number of triples, as well as the distribution of the number of each relationship, to assist in determining the input size of the model and understanding the data structure; S2.2.
2. Clean the text data, remove useless symbols and stop words, use the jieba tool to perform Chinese word segmentation on the text data, first use the BIO annotation system to annotate the sentences, and at the same time annotate the predicates, marking them as VERB or custom role labels. The B-label indicates that the current word is the beginning of an entity, the I-label indicates the inside of an entity, that is, the component of the word, and the O-label indicates that the current word does not belong to any entity, that is, it is not a component of any entity; S2.2.
3. Input text sequence X, use ALBERT+Bi-LSTM+CRF model to perform sequence annotation of custom labels, use ALBERT model as feature extractor, generate initial word vector representation E; input the obtained vector into Bi-LSTM for enhancement, learn word order and long-distance dependency, and improve the model's ability to understand sequences; sequence generation model CRF is used as decoder combined with Bi-LSTM output, and the optimal annotation path is found by calculating the score of each label sequence, and the entities and predicates in the prediction model are used as nodes; Among them, x t is the vector representation of the tth word in the input text sequence, and x t The forward and reverse hidden states of and The forward hidden state of the previous unit and the reverse hidden state of the next unit are respectively combined to obtain the feature representation h of the tth unit. t ; S(t,t+1)=s(h t ,y t+1 )+λ(y t ,y t+1 ) where S(·,·) represents the score of the CRF layer and s(·) is the hidden state h t to label y t+1 , λ(·,·) is the transfer score of the label pair; Among them, Θ represents the model parameters and T represents the sequence length; S2.2.
4. Select machine learning or deep learning methods to predict the relationship between the nodes of the graph. This is achieved by training a classification model. The input is node features and context information, and the output is the relationship type. The relationship graph is constructed using the extracted subject and object, and the relationship between predicate nodes and nodes.
5. According to claim 4, a method for enhancing the reliability of aerospace large models based on knowledge graph and causal relationship is characterized in that: The specific implementation method of step S2.3 includes the following steps: S2.3.
1. For the relationship graph G obtained in step S2, perform co-reference mentions on the nodes and create a candidate set C for each mention m , m is the index mentioned, the candidate set C m Include all other references that may refer to the same entity; C m ={n|n∈N,n≠m, mention n and mention m may refer to the same entity} Where N is the set of all mentions in the relationship graph; S2.3.
2. Extract the coreference features from the relationship graph G obtained in step S2, including syntactic structure, part-of-speech grammatical features, semantic features, and contextual features, to form the feature set F m ; S2.3.
3. Step S2.3.
2. The similarity score S between the mentions in the candidate set is calculated using the co-reference feature. mn ; S mn =f(F m ,F n ) Where m and n are the mentioned indices, and f is the similarity calculation function, which is cosine similarity or Jaccard similarity; S2.3.
4. Based on the similarity scores, use hierarchical clustering or K-means clustering to group the mentions. Mentions in the same group refer to the same entity, denoted as G'. The clustering goal is to maximize the similarity within the group and minimize the similarity between groups. S2.3.
5. Update the coreference and dependency relationships. For each node in the relationship graph, insert the [NCI] symbol at the beginning and end of the whole, between each sentence, and before the subject, predicate, and object in each sentence to block the connection between non-causal information. Convert all [NCI] symbols into blocking nodes at the corresponding positions in the matrix. The corresponding row and column values of the blocking nodes in the matrix are 0, and the corresponding values of the matrix are A. ij The confidence or similarity score based on coreference resolution, i.e., A ij =S mn ; For nodes pointing to the same entity, they share dependencies in the process of building the adjacency matrix, which means that the corresponding value of the node of the same entity to other nodes in the adjacency matrix is the maximum value of the similarity between all nodes of the same entity and the node.
6. According to claim 5, a method for enhancing the reliability of aerospace large models based on knowledge graph and causal relationship is characterized in that: The specific implementation method of step S3 includes the following steps: S3.
1. Construct CAS-FS attention module; The sorted aerospace industry data is used as input, and the input vector of the attention module is set to be X = [x1, x2, ..., x T ], the vector representation X is mapped to the query matrix Q through linear mapping and FSMN memory blocks respectively. t , key matrix K t , value matrix V t , the expression is as follows: V t =W V x t Among them, N1 is the review sequence, which represents the review of the historical projects in the past, N2 is the prospect sequence, which represents the size of the prospect window into the future; ⊙ represents the Hadamard product, x t is the tth input vector in the input vector X, a i , b i , c j , d j All are weights; Using the obtained Q t , K t , V t Calculate the basic attention weight S, the expression is: Where d is the dimension of the input vector X; The new attention weight is derived from the basic attention weight, and the new attention weight is S', which is expressed as: S'=αS+(1-α)S⊙A Among them, α is the causal weight, A is the adjacency matrix constructed in step S2.3, the obtained S' is connected to the softmax function and multiplied by V, and the output Y of the causal attention module is obtained according to the causal attention, which is expressed as: Y=softmax(S')V Where V is the calculated value matrix; S3.
2. Construct the CASFS-AM overall module: The output of the CAS-FS attention module obtained in step S3.1 is added and normalized with the embedding representation matrix obtained in step S2, and then passed through a fully connected feedforward network consisting of two linear transformations with a RELU activation set between the two linear transformations. The expression is: FFN(X)=RELU(XW1+b1)W2+b2 Among them, FFN(X) is the output result of the feedforward neural network, W1 and W2 represent the first linear transformation and the second linear transformation, b1 and b2 represent the deviation; S3.
3. Iterate the CASFS-AM module, and repeat the iteration L times of the CASFS-AM module obtained in step S3.2, where L is adjusted according to the actual situation, to obtain the output of the attention module part based on causality and memory reduction; S3.
4. The output of the causal relationship and memory reduction attention module obtained in step S3.3 is used as the input of the linear layer and input into a linear layer to obtain the final judgmental prediction output.
7. The method for enhancing the reliability of aerospace large models based on knowledge graph and causal relationship according to claim 6 is characterized in that: In step S4, the evaluation indicators in the training process include perplexity, BLEU score, ROUGE score, aerospace-specific domain relevance score, and expert review aerospace domain professionalism score; S4.
1. The perplexity is calculated by taking the logarithm of the predicted probability of each word and then averaging the logarithmic probability of all words. The expression is: Among them, PP(W) is the perplexity, P(w i |w1,…,w i-1 ) is the probability given the previous context; S4.
2. The BLEU score evaluates the translation quality by comparing the n-gram overlap between the machine translation output and a set of translations, expressed as: Among them, C n is the number of correct n-grams, r n is the total number of n-grams in machine translation, c n is the total number of n-grams in the reference translation; S4.3.ROUGE score is used to evaluate automatic summarization and machine translation, and the similarity between the generated text and the reference text is evaluated by calculating the overlapping n-grams; Extract the corresponding two-word bigrams from the generated text, and count the corresponding bigrams extracted from the generated text and the reference text; count the number of bigrams in the generated text that appear in the reference text, calculate the precision and recall based on the bigrams of the generated text and the reference text, and thus calculate the harmonic mean; S4.
4. Design a dedicated aerospace relevance score. Invite relevant technicians to specify a list of keywords in the aerospace field, calculate the number of occurrences of these keywords in the input questions, and match them with the number of keywords in the output answers. The expression of the aerospace-specific keyword matching score Shared KMS is: Among them, m is the number of common keywords, TF i,q is the frequency of the ith keyword in the question, TF i,a is the frequency of the ith keyword in the answer; Assisted manual evaluation measures semantic understanding and text quality, and invites experts to evaluate questions and answers to assess their expertise and depth in the aerospace field; S4.
5. Comprehensively weight the above scores to obtain a large model trained specifically for the aerospace field with causal inference capabilities.
Citation Information
Patent Citations
Event atlas construction system and method based on multi-dimensional feature fusion and dependency syntax
CN111581396A
Semantic recognition method and system for inscriptions on ancient bronze objects
CN112036189A
Cross-sentence event causal relationship identification system and method based on graph neural network
CN117474009A
System and method for hybrid question answering over knowledge graph
US20220292262A1
Method For Extracting Dam Emergency Event Based On Dual Attention Mechanism
US20230119211A1
Cited By
Blade machining parameter determination method and device
CN120038595A
