A Reliability Enhancement Method for Aerospace Large Models Based on Knowledge Graphs and Causal Relationships
By building a space model based on knowledge graphs and causal relationships, the reliability problem of large-scale machine learning models in the aerospace field is solved, the accuracy of causal relationship judgment and system security are improved, and the troubleshooting and prediction capabilities are enhanced.
Patent Information
- Application Number
- CN202411166746.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2044-08-23
AI Technical Summary
There are reliability problems in the application of large machine learning models in the aerospace field, especially incorrect decisions caused by inaccurate judgment of causal relationships, which affects system security and is difficult to effectively solve existing methods.
By building a space model based on knowledge graphs and causal relationships, including text data sorting, adjacency matrix construction, CAS-FS attention module design and iterative processing, the model's causal relationship inference ability is enhanced by using open information extraction and co-referential digestion technology.
It improves the reliability of large models in the aerospace field, enhances the speed of troubleshooting and prediction accuracy, solves the illusion problem of causal judgment, and improves the safety and risk assessment capabilities of the system.
Smart Images

Figure CN119166828B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of aerospace information extraction, and particularly relates to a method for enhancing the reliability of an aerospace large model based on a knowledge graph and causal relationships. Background Art
[0002] With the rapid development of artificial intelligence technology, large machine learning models, especially large language models, are advancing at an unprecedented speed, greatly promoting technological innovation and industrial transformation. However, the development of large models has also attracted widespread attention and discussion from multiple aspects, and the hallucination problem of large models has become a hot issue in related discussions. Inaccurate or biased model output results during the question-and-answer process can lead to wrong decisions, especially when applied to the aerospace field, which may affect the safety of the entire system and cause huge losses. Currently, the solution of increasing the data volume and diversity has certain difficulties due to the difficulty of obtaining data, and the method of strengthening promote also requires a large amount of human and computing resources. Summary of the Invention
[0003] The problem to be solved by the present invention is to meet the requirement of improving the high reliability of large models in the aerospace field, and a method for enhancing the reliability of an aerospace large model based on a knowledge graph and causal relationships is proposed.
[0004] To achieve the above object, the present invention is realized through the following technical solutions:
[0005] A method for enhancing the reliability of an aerospace large model based on a knowledge graph and causal relationships, comprising the following steps:
[0006] S1. Text data collation, collecting industrial data related to the aerospace field, and collating the text data set as the input data of the large model;
[0007] 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;
[0008] S3. Structure design of the aerospace large model based on a knowledge graph and causal relationships, including constructing a CAS-FS attention module, then constructing a CASFS-AM overall module based on the CAS-FS attention module, then iterating the CASFS-AM overall module L times, and then obtaining a judgmental prediction through a linear layer;
[0009] S4. Training the aerospace large model constructed in step S3 using the text data set obtained in step S1 to obtain an aerospace field-specific large model with causal relationship inference.
[0010] Furthermore, the specific implementation method of step S1 includes the following steps:
[0011] S1.1. Collect and organize the text data and industrial data related to the aerospace field, including the text data with causal relationships and the text describing events without clear causal relationships in scientific experiment reports, policy evaluation reports, scientific papers, and case studies in the aerospace field;
[0012] S1.2. Screen the selected text to remove the noise of the text, including irrelevant information, duplicate content, and incorrect or inaccurate expressions, to obtain the organized industrial data related to the aerospace field.
[0013] Furthermore, the specific implementation method of step S2 includes the following steps:
[0014] S2.1. Vectorize the text data of the organized industrial data related to the aerospace field obtained in step S1, and use the encoding layer of the transformer to convert the organized industrial data related to the aerospace field into an embedded representation matrix X;
[0015] S2.2. Use the open information extraction technology to construct a relationship graph G;
[0016] S2.3. Based on the relationship graph obtained in step S2.2, use the coreference resolution technology to construct an adjacency matrix A.
[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, count the length of each sentence and the number of triples, and the quantity 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, marked as VERB or custom role tags, the B-tag indicates that the current word is the start of a certain entity, the I-tag indicates the inside of a certain entity, that is, the component of the word, and the O- indicates that the current word does not belong to any entity, that is, it does not belong to the component of any entity;
[0020] S2.2.3. Input the text sequence X, and perform sequence labeling of custom tags using the ALBERT+Bi-LSTM+CRF model. Use the ALBERT model as a feature extractor to generate the initial word vector representation E; input the obtained vector into Bi-LSTM for enhancement to learn word order and long-distance dependencies, and improve the model's understanding ability of the sequence; the sequence generation model CRF is used as a decoder to combine the output of Bi-LSTM, and find the optimal annotation path by calculating the scores of each tag sequence, and predict the entities and predicates in the model as nodes;
[0021]
[0022] where, x t is the vector representation of the t-th word in the input text sequence, and are the forward and backward hidden states of x t respectively, and are the forward hidden state of the previous unit and the backward hidden state of the next unit respectively. Combine the forward and backward states of BiLSTM to obtain the feature representation h t of the t-th unit;
[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, s(·) is the score from the hidden state h t to the label y t+1 , and λ(·, ·) is the transition score of the label pair;
[0025]
[0026] where, Θ represents the model parameters, and T represents the sequence length;
[0027] S2.2.4. Select machine learning or deep learning methods to predict the relationships between the nodes of the graph, which is achieved by training a classification model. The input is the node features and context information, and the output is the relationship type. Use the extracted subject, object, predicate nodes and the relationships between the nodes to construct a relationship graph.
[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 coreference mention on the nodes, and create a candidate set C for each mention m, where m is the mentioned index, and the candidate set C m contains all other mentions that may point to the same entity;
[0030] C m = {n|n ∈ N, n ≠ m, mention n and mention m may point to the same entity}
[0031] where N is the set of all mentions in the relational graph;
[0032] S2.3.2. For the relational graph G obtained in step S2, extract coreference features, including syntactic structure, part-of-speech and grammar features, semantic features, and context features, to form the feature set F m ;
[0033] S2.3.3. Calculate the similarity scores S between the mentions in the candidate set using the coreference features obtained in step S2.3.2 mn ;
[0034] S mn = f(F m , F n )
[0035] where m and n are the indices of the mentions, and f is the similarity calculation function, which is the cosine similarity or the Jaccard similarity;
[0036] S2.3.4. According to the similarity scores, use hierarchical clustering or K-means clustering to group the mentions. The mentions within the same group point to the same entity, denoted as G'. The clustering objective is to maximize the within-group similarity and minimize the between-group similarity;
[0037] S2.3.5. Update the coreference relationship and the dependency relationship. For each node in the relational graph, insert the [NCI] symbol at the beginning and end of the whole text, between each sentence, and before the subject, predicate, and object within each sentence to block the connection between non-causal information. Convert all the [NCI] symbols into blocking nodes at the corresponding positions in the matrix. The row and column values of the blocking nodes in the matrix are 0, and the corresponding value A of the matrix ij is based on the confidence or similarity score of coreference resolution, that is, A ij = S mn ; For the nodes pointing to the same entity, share the dependency relationship during the construction of the adjacency matrix, that is, the corresponding values of the nodes pointing to the same entity for other nodes in the adjacency matrix are the maximum values of the similarities between all nodes of the same entity and this node.
[0038] Furthermore, the specific implementation method of step S3 includes the following steps:
[0039] S3.1. Construct the CAS-FS attention module;
[0040] Taking the organized industrial data related to the aerospace field as input, set the input vector representation of the attention module as X = [x1, x2, …, x T , and map the vector representation X through linear mapping and FSMN memory block into query matrix Q t , key matrix K t , and value matrix V t , obtaining the following expressions:
[0041]
[0042]
[0043] V t = W V x t
[0044] where N1 is the retrospective sequence, representing the historical items in the past, N2 is the prospective sequence, indicating the size of the prospective window into the future; ⊙ represents the Hadamard product, x t is the t-th input vector in the input vector X, a i , b i , c j , d j are all weights;
[0045] Using the obtained Q t , K t , V t to 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', the expression is:
[0049] S′ = αS + (1 - α)S⊙A
[0050] where α is the causal relationship weight, A is the adjacency matrix constructed in step S2.3, connect the obtained S' to the softmax function, multiply it with V, and obtain the output Y of the causal attention module according to the causal attention, the expression is:
[0051] Y = softmax(S′)V
[0052] where V is the calculated value matrix;
[0053] S3.2. Construct the CASFS-AM overall module: Add and normalize the output of the CAS-FS attention module obtained in step S3.1 and the embedding representation matrix obtained in step S2, and pass through a fully connected feed-forward network, which consists of two linear transformations with a RELU activation set in between, to obtain the expression:
[0054] FFN(X) = RELU(XW1 + b1)W2 + b2
[0055] Among them, FFN(X) is the output result of the feed-forward neural network, W1 and W2 represent the first linear transformation and the second linear transformation respectively, and b1 and b2 represent the biases;
[0056] S3.3. Iterate the CASFS-AM module. Repeat the CASFS-AM overall module obtained in step S3.2 for L times, where L is adjusted according to the actual situation, to obtain the output of the attention module part based on causal relationship and reduced memory;
[0057] S3.4. Use the output of the attention module part based on causal relationship and reduced memory obtained in step S3.3 as the input of the linear layer, and input it into a linear layer to obtain the final judgmental prediction output.
[0058] Furthermore, the evaluation metrics in the training process of step S4 are selected as perplexity, BLEU score, ROUGE score, aerospace-specific domain relevance score, and expert review aerospace domain professionalism score;
[0059] S4.1. Perplexity is to calculate the logarithm of the prediction probability of each word, and then average the logarithms of all words. The expression is:
[0060]
[0061] Among them, PP(W) is the perplexity, and 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. The expression is:
[0063]
[0064] Among them, C n is the number of correct n-grams, r n is the total number of n-grams in the machine translation, and c n is the total number of n-grams in the reference translation;
[0065] S4.3. The ROUGE score is used to evaluate automatic summarization and machine translation. It evaluates the similarity between the generated text and the reference text by calculating the n-grams of the overlap degree;
[0066] Extract two corresponding related words (bigram) from the generated text, and count the 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, and calculate the precision and recall based on the bigrams of the generated text and the reference text, and then calculate the harmonic mean;
[0067] S4.4. Design a dedicated aerospace domain relevance score. Invite relevant technical personnel to specify a list of keywords in the aerospace domain, calculate the number of occurrences of these keywords in the input question, and match them with the number of keywords in the output answer. The expression for the aerospace exclusive keyword matching score Shared KMS is:
[0068]
[0069] where m is the number of common keywords, TF i,q is the frequency of the i-th keyword in the question, and TF i,a is the frequency of the i-th keyword in the answer;
[0070] Assist manual evaluation to measure semantic understanding and text quality. Invite experts to evaluate the question and answer, and evaluate their professionalism and depth in the aerospace domain;
[0071] S4.5. Comprehensively weight the above scores to obtain a trained aerospace domain exclusive large model with causal relationship inference.
[0072] Advantages of the present invention:
[0073] A method for enhancing the reliability of an aerospace large model based on a knowledge graph and causal relationships according to the present invention uses the open information extraction technology and coreference resolution technology in the knowledge graph to obtain an adjacency matrix, and uses matrix linear transformation attention weights with causal relationships to combine with the original large model network, which can enhance the relevant causality of the large model. Applied to the aerospace domain system, it can solve the hallucination problem of the large model, improve the speed of troubleshooting, enhance the accuracy of prediction technology, and help evaluate the risks of various tasks. Description of the Drawings
[0074] Figure 1 is a flowchart of a method for enhancing the reliability of an aerospace large model based on a knowledge graph and causal relationships according to the present invention;
[0075] Figure 2Schematic diagram of data processing for a method for enhancing the reliability of a space large model based on a knowledge graph and causal relationships according to the present invention;
[0076] Figure 3 Schematic diagram of the algorithm framework for a method for enhancing the reliability of a space large model based on a knowledge graph and causal relationships according to the present invention. Specific implementation manners
[0077] In order to make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific implementation manners. It should be understood that the specific implementation manners described herein are only used to explain the present invention and are not used to limit the present invention, that is, the specific implementation manners described are only a part of the implementation manners of the present invention, rather than all of the specific implementation manners. The components of the specific implementation manners of the present invention usually described and shown in the accompanying drawings here can be arranged and designed in various different configurations, and the present invention can also have other implementation manners.
[0078] Therefore, the detailed description of the specific implementation manners of the present invention provided in the accompanying drawings below is not intended to limit the scope of the claimed invention, but only represents the selected specific implementation manners of the present invention. All other specific implementation manners obtained by those skilled in the art based on the specific implementation manners of the present invention without creative efforts belong to the scope of protection of the present invention.
[0079] To further understand the content, features and effects of the present invention, the following specific implementation manners are exemplified and described in detail in conjunction with the attached Figures 1-3 as follows:
[0080] Example 1:
[0081] A method for enhancing the reliability of a space large model based on a knowledge graph and causal relationships, comprising the following steps:
[0082] S1. Text data arrangement, collecting industrial data related to the space field, and arranging the text data set as the input data of the large model;
[0083] Further, the specific implementation method of step S1 includes the following steps:
[0084] S1.1. Collect and arrange text data and industrial data related to the space field, including text data with causal relationships and text describing events without clear causal relationships in scientific experiment reports, policy evaluation reports, scientific papers, and case studies in the space field;
[0085] S1.2. Screen the selected text to remove the noise of the text, including irrelevant information, duplicate content, and incorrect or inaccurate expressions, to obtain the industrial data related to the space field after arrangement;
[0086] S2. Text data processing: construct an adjacency matrix for the input data obtained in step S1, build 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. Vectorize the text data of the sorted aerospace-related industrial data obtained in step S1, and use the encoding layer of the transformer to convert the sorted aerospace-related industrial data into an embedding representation matrix X;
[0089] S2.2. Build a relationship graph G using open information extraction technology;
[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, count the length of each sentence and the number of triples, and the quantity distribution of each relationship, which is used 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, perform Chinese word segmentation on the text data using the jieba tool, first annotate the sentences using the BIO annotation system, and at the same time annotate the predicates, marked as VERB or a custom role label. The B-label indicates that the current word is the start of a certain entity, the I-label indicates the inside of a certain entity, that is, a component of the word, and the O-label indicates that the current word does not belong to any entity, that is, does not belong to the component of any entity;
[0093] S2.2.3. Input the text sequence X, and use the ALBERT+Bi-LSTM+CRF model for sequence annotation of custom labels. Use the ALBERT model as a feature extractor to generate an initial word vector representation E; input the obtained vector into the Bi-LSTM for enhancement to learn word order and long-distance dependencies, and improve the model's understanding ability of the sequence; the sequence generation model CRF is used as a decoder to combine the output of the Bi-LSTM, and find the optimal annotation path by calculating the scores of each label sequence, and predict the entities and predicates in the model as nodes;
[0094]
[0095] where x t is the vector representation of the t-th word in the input text sequence, and are the forward and backward hidden states of x t respectively, and are the forward hidden state of the previous unit and the backward hidden state of the subsequent unit respectively. The forward and backward states of the BiLSTM are merged to obtain the feature representation h of the t-th 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, s(·) is the score from the hidden state h t to the label y t+1 , and λ(·, ·) is the transition score of the label pair;
[0098]
[0099] where Θ represents the model parameters and T represents the sequence length;
[0100] S2.2.4. Select a machine learning or deep learning method to predict the relationship between the nodes of the graph, which is achieved by training a classification model. The input is the node features and context information, and the output is the relationship type. Use the extracted subject, object, predicate nodes and the relationships between the nodes to construct a relationship graph;
[0101] S2.3. Based on the relationship graph obtained in step S2.2, use the coreference resolution technology to construct an adjacency matrix A;
[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 coreference mentions on the nodes, and create a candidate set C m for each mention, where m is the index of the mention. The candidate set C m contains all other mentions that may point to the same entity;
[0104] C m = {n|n ∈ N, n ≠ m, mention n and mention m may point to the same entity}
[0105] where N is the set of all mentions in the relationship graph;
[0106] S2.3.2. For the relationship graph G obtained in step S2, extract coreference features, including syntactic structure, part-of-speech grammar features, semantic features, and context features, to form a feature set F m ;
[0107] S2.3.3. Calculate the similarity score S between mentions in the candidate set using co-reference features obtained in step S2.3.2 mn ;
[0108] S mn = f(F m , F n )
[0109] where m and n are the indices of the mentions, and f is a similarity calculation function, which is the cosine similarity or Jaccard similarity;
[0110] S2.3.4. Group the mentions using hierarchical clustering or K-means clustering according to the similarity scores. Mentions within the same group point to the same entity, denoted as G'. The clustering objective is to maximize the within-group similarity and minimize the between-group similarity;
[0111] S2.3.5. Update the co-reference relationship and dependency relationship. 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 within 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 row and column values of the blocking nodes in the matrix are 0, and the corresponding value A of the matrix ij Based on the confidence or similarity score of co-reference resolution, that is, A ij = S mn ; For nodes pointing to the same entity, share the dependency relationship during the construction of the adjacency matrix, that is, the corresponding values of nodes pointing to the same entity for other nodes in the adjacency matrix are the maximum value of the similarities between all nodes of the same entity and that node;
[0112] S3. Aerospace large model structure design based on knowledge graph and causal relationship, including constructing the CAS-FS attention module, then constructing the CASFS-AM overall module based on the CAS-FS attention module, then iterating the CASFS-AM overall module L times, and then obtaining the judgment prediction through the linear layer;
[0113] Furthermore, the specific implementation method of step S3 includes the following steps:
[0114] S3.1. Construct the CAS-FS attention module;
[0115] Use the organized industrial data related to the aerospace field as the input, set the input vector representation of the attention module as X = [x1, x2,..., x T , and map the vector representation X to the query matrix Q t , key matrix K t , and value matrix V t, the following expression is obtained:
[0116]
[0117] V t = W V x t
[0118] Among them, N1 is the retrospective sequence, representing historical items in the past, and N2 is the prospective sequence, indicating the size of the prospective window into the future; ⊙ represents the Hadamard product, and x t is the t-th input vector in the input vector X, a i , b i , c j , d j are all weights;
[0119] Using the obtained Q t , K t , V t calculate the basic attention weight S, and the expression is:
[0120]
[0121] Among them, 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', and the expression is:
[0123] S′ = αS+(1 - α)S⊙A
[0124] Among them, α is the causal relationship weight, A is the adjacency matrix constructed in step 2.3, connect the obtained S' to the softmax function, multiply it with V, and obtain the output Y of the causal attention module according to the causal attention, and the expression is:
[0125] Y = softmax(S′)V
[0126] Among them, V is the calculated value matrix;
[0127] S3.2. Construct the overall CASFS-AM module: Add and normalize the output of the CAS-FS attention module obtained in step S3.1 and the embedding representation matrix obtained in step S2, and pass through a fully connected feed-forward network, which consists of two linear transformations, and a RELU activation is set in the middle of the two linear transformations, and the expression obtained is:
[0128] FFN(X) = RELU(XW1 + b1)W2 + b2
[0129] Among them, FFN(X) is the output result of the feed-forward neural network, W1 and W2 represent the first linear transformation and the second linear transformation, and b1 and b2 represent the biases;
[0130] S3.3. Iterate the CASFS-AM module. Repeat the entire CASFS-AM module obtained in step S3.2 for L times, where L is adjusted according to the actual situation, to obtain the output of the attention module part based on causal relationship and reduced memory;
[0131] S3.4. Use the output of the attention module part based on causal relationship and reduced memory obtained in step S3.3 as the input of the linear layer, and input it into a linear layer to obtain the final judgmental prediction output.
[0132] S4. Use the text dataset obtained in step S1 to train the aerospace large model based on knowledge graph and causal relationship constructed in step S3, to obtain an aerospace domain-specific large model with causal relationship inference.
[0133] Furthermore, the evaluation metrics in the training process of step S4 are selected as perplexity, BLEU score, ROUGE score, aerospace domain-specific relevance score, and expert review aerospace domain professionalism score;
[0134] S4.1. Perplexity is to calculate the logarithm of the prediction probability of each word, and then average the logarithms of all words. The expression is:
[0135]
[0136] Among them, PP(W) is the perplexity, and P(w i |w1,…,w i-1 ) is the probability given the previous context;
[0137] S4.2. BLEU score evaluates the translation quality by comparing the n-gram overlap between the machine translation output and a set of translations. The expression is:
[0138]
[0139] Among them, C n is the number of correct n-grams, r n is the total number of n-grams in the machine translation, and 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 bigrams of two related words 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, and calculate the precision and recall based on the bigrams of the generated text and the reference text, so as to calculate the harmonic mean;
[0142] S4.4. Design a dedicated aerospace domain relevance score. Invite relevant technical personnel to specify a list of keywords in the aerospace domain, calculate the number of occurrences of these keywords in the input question, and match them with the number of occurrences of the keywords in the output answer. The expression for the aerospace-exclusive keyword matching score Shared KMS is:
[0143]
[0144] where m is the number of common keywords, TF i,q is the frequency of the i-th keyword in the question, and TF i,a is the frequency of the i-th keyword in the answer;
[0145] Assist manual evaluation to measure semantic understanding and text quality. Invite experts to evaluate the question and the answer to assess their professionalism and depth in the aerospace domain;
[0146] S4.5. Comprehensively weight the above scores to obtain a trained aerospace domain-specific large model with causal inference.
[0147] It should be noted that relational terms such as "first" and "second" are only used 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 term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising a..." does not exclude the existence of additional identical elements in the process, method, article or device comprising the element.
[0148] Although the present application has been described above with reference to specific embodiments, various modifications can be made thereto and components thereof can be replaced with equivalents without departing from the scope of the present application. In particular, as long as there is no structural conflict, the features in the specific embodiments disclosed in the present application can be combined with each other in any way, and the exhaustive description of these combinations is not given in this specification only for the sake of saving space and 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 a large aerospace model based on a knowledge graph and causal relationships, characterized in that It includes the following steps: S1. Text data arrangement: Collect industrial data related to the aerospace field, and arrange the text data set as the input data for the large model; S2. Text data processing: Construct an adjacency matrix for the input data obtained in step S1, use open information extraction technology to construct a relationship graph, and use coreference resolution technology to construct an adjacency matrix; The specific implementation method of step S2 includes the following steps: S2.
1. Vectorize the text data of the industrial data related to the aerospace field obtained in step S1, and use the encoding layer of the transformer to convert the industrial data related to the aerospace field after arrangement into an embedding representation matrix X; S2.
2. Use open information extraction technology to construct a relationship graph G; S2.
3. Based on the relationship graph obtained in step S2.2, use coreference resolution technology to construct an adjacency matrix A; S3. Aerospace large model structure design based on knowledge graph and causal relationship, including constructing a CAS-FS attention module, then constructing a CASFS-AM overall module based on the CAS-FS attention module, then iterating the CASFS-AM overall module L times, and then obtaining a judgmental prediction through a linear layer; The specific implementation method of step S3 includes the following steps: S3.
1. Construct a CAS-FS attention module; Taking the sorted industrial data related to the aerospace field as input, set the input vector representation of the attention module as X = [x1, x2, …, x T , and map the vector representation X to the query matrix Q through linear mapping and FSMN memory block respectively t , the key matrix K t , and the value matrix V t , and the expression is as follows: V t = W V x t Among them, N1 is the retrospective sequence, representing the historical projects in the past, and N2 is the prospective sequence, indicating the size of the prospective window into the future; ⊙ represents the Hadamard product, and x t is the t-th input vector in the input vector X, a i , b i , c j , d j are all weights; Using the obtained Q t , K t , V t Calculate the basic attention weight S, and 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′, and the expression is: S′ = αS+(1 - α)S⊙A where α is the causal relationship weight, A is the adjacency matrix constructed in step S2.3, connect the obtained S′ to the softmax function, multiply it by V, and obtain the output Y of the causal attention module according to the causal relationship attention, and the expression is: Y = softmax(S′)V where V is the calculated value matrix; S3.
2. Construct a CASFS-AM overall module: Add and normalize the output of the CAS-FS attention module obtained in step S3.1 and the embedding representation matrix obtained in step S2, and pass through a fully connected feed-forward network, which consists of two linear transformations, and set a RELU activation in the middle of the two linear transformations, and obtain the expression: FFN(X) = RELU(XW1 + b1)W2 + b2 where FFN(X) is the output result of the feed-forward neural network, W1 and W2 represent the first linear transformation and the second linear transformation, and b1 and b2 represent the biases; S3.
3. Iterate the CASFS-AM module, repeat the CASFS-AM overall module obtained in step S3.2 L times, where L is adjusted according to the actual situation, and obtain the output of the attention module part based on the causal relationship and reducing memory; S3.
4. Use the output of the attention module part based on the causal relationship and reducing memory obtained in step S3.3 as the input of the linear layer, and input it into a linear layer to obtain the final judgmental prediction output; S4. Use the text dataset obtained in step S1 to train the aerospace large model based on the knowledge graph and causal relationship constructed in step S3, and obtain an aerospace domain-specific large model with causal relationship inference.
2. The reliability enhancement method of the aerospace large model based on the knowledge graph and causal relationship according to claim 1, characterized in that The specific implementation method of step S1 includes the following steps: S1.
1. Collect and organize text data and industrial data related to the aerospace field, including text data with causal relationships and texts describing events without clear causal relationships in scientific experiment reports, policy evaluation reports, scientific papers, and case studies in the aerospace field. S1.
2. Screen the selected texts to remove the noise of the texts, including irrelevant information, duplicate content, and incorrect or inaccurate expressions, and obtain the organized industrial data related to the aerospace field.
3. The reliability enhancement method of the aerospace large model based on the knowledge graph and causal relationship according to claim 2, 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, count the length of each sentence and the number of triples, and the quantity distribution of each relationship, which is used 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, marked as VERB or custom role tags. The B-tag indicates that the current word is the start of a certain entity, the I-tag indicates the inside of a certain entity, that is, the component of the word, and the O-tag indicates that the current word does not belong to any entity, that is, it does not belong to the component of any entity. S2.2.
3. Input the text sequence X, and use the ALBERT+Bi-LSTM+CRF model for sequence annotation of custom tags. Use the ALBERT model as the feature extractor to generate the initial word vector representation E; input the obtained vector into Bi-LSTM for enhancement, learn the word order and long-distance dependencies, and improve the model's understanding ability of the sequence; the sequence generation model CRF is used as the decoder to combine the output of Bi-LSTM, and find the optimal annotation path by calculating the scores of each tag sequence, and predict the entities and predicates in the model as nodes. where x t is the vector representation of the t-th word in the input text sequence, and are the forward and backward hidden states of x t respectively, and are the forward hidden state of the previous unit and the backward hidden state of the next unit respectively. The forward and backward states of the BiLSTM are merged to obtain the feature representation h t of the t-th unit; S(t,t + 1)=s(h t ,y t+1 )+λ(y t ,y t+1 ) Among them, S(·, ·) represents the score of the CRF layer, s(·) is the score from the hidden state h t to the label y t+1 and λ(·, ·) is the transition 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 relationships between the nodes of the graph, which is achieved by training a classification model. The input is the node features and context information, and the output is the relationship type. Use the extracted subject, object, predicate nodes and the relationships between the nodes to construct a relationship graph.
4. A method for enhancing the reliability of a space large model based on a knowledge graph and causal relationships according to claim 3, 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, coreference mentions are performed on the nodes, and a candidate set C is created for each mention m , where m is the index of the mention, and the candidate set C m contains other mentions that may point to the same entity; C m = {n|n ∈ N, n ≠ m, the mention of n and the mention of m may refer to the same entity} Among them, N is the set of all mentions in the relationship graph; S2.3.
2. For the relationship graph G obtained in step S2, extract coreferential features, including syntactic structures, part-of-speech and grammatical features, semantic features, and context features, to form a feature set F m ; S2.3.
3. Calculate the similarity score S between mentions in the candidate set using the co-reference feature obtained in step S2.3.2 mn ; S mn = f(F m , F n ) Among them, m and n are the indices of the mentions, and f is the similarity calculation function, which is the cosine similarity or Jaccard similarity; S2.3.
4. According to the similarity scores, use hierarchical clustering or K-means clustering to group the mentions. The mentions within the same group point to the same entity, denoted as G′. The clustering goal is to maximize the within-group similarity and minimize the between-group similarity. S2.3.
5. Update the co-reference relationship and the dependency relationship. For each node in the relationship graph, insert the [NCI] symbol at the beginning and end of the whole text, between every two sentences, and before the subject, predicate, and object within 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 row and column values of the blocking nodes in the matrix are 0, and the corresponding value A in the matrix ij Based on the confidence or similarity score of coreference resolution, i.e., A ij = S mn ; For nodes pointing to the same entity, share the dependency relationship during the construction of the adjacency matrix, that is, the corresponding values of the nodes referring to the same entity for other nodes in the adjacency matrix are the maximum similarity values of all nodes of the same entity and that node 5. The reliability enhancement method of the aerospace large model based on the knowledge graph and causal relationship according to claim 4, characterized in that, In the evaluation index selection during the training process of step S4, perplexity, BLEU score, ROUGE score, aerospace-specific domain relevance score, and expert review aerospace domain professionalism score are selected; S4.
1. Perplexity is calculated as the logarithm of the predicted probability of each word, and then the average of the logarithms of all words is taken. The expression is: Among them, PP(W) is the perplexity, and 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. The expression is: where C n is the number of correct n-grams, r n is the total number of n-grams in the machine translation, and c n is the total number of n-grams in the reference translation; S4.
3. The 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-gram; Extract two corresponding related words (bigram) from the generated text, and count the 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, and calculate the precision and recall based on the bigrams of the generated text and the reference text, and then calculate the harmonic mean; S4.
4. Design a specific aerospace domain relevance score. Invite relevant technical personnel to specify a list of keywords in the aerospace domain, calculate the number of occurrences of these keywords in the input question, and match them with the number of keywords in the output answer. The expression for the aerospace-specific keyword matching score SharedKMS is: where m is the number of common keywords, TF i,q is the frequency of the i-th keyword in the question, and TF i,a is the frequency of the i-th keyword in the answer; Assist manual evaluation to measure semantic understanding and text quality. Invite experts to evaluate the question and answer, and evaluate their professionalism and depth in the aerospace domain; S4.
5. Comprehensively weight the above scores to obtain a trained aerospace domain-specific large model with causal relationship inference.
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