Model defect knowledge detection method, control device and storage medium
Through the Monte Carlo tree search method based on knowledge graph, the one-dimensional structural entropy evaluation function is used to identify and repair knowledge defects in large language models, solving the problems of scarcity of training data and insufficient knowledge coverage, and achieving self-improvement and performance improvement of the model.
Patent Information
- Application Number
- CN202510572115.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2045-04-30
AI Technical Summary
Existing large language models have limitations in terms of scarcity of training data and knowledge defects, especially in professional fields, which are difficult to cover missing knowledge, and synthetic data cannot effectively enhance the performance of teacher models, and there are problems of knowledge hallucinations and low-frequency domain knowledge omissions.
The Monte Carlo tree search method based on knowledge graph is used to identify and evaluate the uncertainty areas in the knowledge path through one-dimensional structural entropy as an evaluation function. Monte Carlo tree search is used to efficiently explore model defects, and defective knowledge paths are repaired through synthetic data.
Effectively identify and repair knowledge defects in large language models, significantly improve the knowledge coverage and performance of the model in professional fields, and improve the overall performance of the model.
Smart Images

Figure CN120493099A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of large model technology, and in particular relates to a model defect knowledge detection method, a control device and a storage medium. Background Art
[0002] Large Language Models (LLMs) have revolutionized the field of natural language processing by leveraging massive pre-trained corpora (which can be considered the "fossil fuel" of modern AI), demonstrating superior performance in many areas. However, as model size increases, data volumes grow, and computing resources are invested, the performance of LLMs follows scaling laws. At the same time, the supply of high-quality human-annotated data, especially in specialized fields, is dwindling. Therefore, synthetic data is needed as a new energy source to drive further progress.
[0003] To address the current scarcity of training data in the large model space, related technologies have focused on LLMs-driven synthetic data generation as an alternative to manual data annotation methods. However, existing data synthesis methods primarily rely on knowledge distillation, where a teacher model generates training data for a lightweight student model. However, this one-way distillation paradigm has fundamental limitations. For example, synthetic data is not explicitly designed to address the knowledge gaps in the teacher model itself. Although it can improve the performance of the student model, it does not enhance the performance of the teacher model itself, but rather simply replicates the knowledge distribution of the existing teacher model. Summary of the Invention
[0004] This application provides a model defect knowledge detection method, a control device and a storage medium, which are intended to detect knowledge defects in large language models.
[0005] According to the first aspect of the present application, a method for detecting model defect knowledge is provided, comprising: determining an initial Monte Carlo tree based on a preset knowledge graph; starting from the root node of each initial Monte Carlo tree, selecting the next node based on the relationship between the current node and the neighboring nodes and a preset tree strategy; in the process of selecting the next node, if the current node is a leaf node, expanding the current node and adding the expanded new node to the corresponding Monte Carlo tree; evaluating the expanded new node using one-dimensional structural entropy as the intrinsic reward mechanism of the evaluation function; and when reaching the termination state, updating the statistical data of each node, and cyclically executing the process of selecting the next node, expanding the new node, and evaluating the new node, so as to determine the knowledge path where the target model has defects through the preset knowledge graph.
[0006] In an optional embodiment, entities in the knowledge graph are defined as nodes or states of the corresponding Monte Carlo tree. In each state, an action set is used to represent the relationship between the current entity and its neighbor nodes. The next node is selected based on the relationship between the current node and the neighbor nodes and a preset tree strategy, including: determining the next node using the cumulative value of action a taken in the current state and the access frequency of the current state.
[0007] In an optional embodiment, before evaluating the expanded new nodes using the intrinsic reward mechanism of the one-dimensional structural entropy as the evaluation function, the model defect knowledge detection method further includes: for the knowledge graph G = (V, E) consisting of the set V of all nodes and the set E of all edges and its triple τ = <subject e i ,relationρ,subject e j >, each edge ρ∈E is assigned a weight based on self-information to determine the entity node e i ∈V, each edge ρ∈E is assigned a weight based on self-information to determine the entity node e i ∈V; and according to the determined weighted degree of each entity node, determine the one-dimensional structural entropy of the knowledge graph G.
[0008] In an optional embodiment, the one-dimensional structural entropy H of the knowledge graph G is determined by the following formula: 1 (G):
[0009]
[0010] Among them, d i Represents entity node e i The weighted degree vol(G) represents the total weighted degree of G, and V represents the set of all nodes.
[0011] In an optional embodiment, when the current node is expanded, starting from the expanded new node, multiple knowledge paths with the new node as the starting node are simulated by taking random actions, and the expanded new node is evaluated by using the one-dimensional structural entropy as the intrinsic reward mechanism of the evaluation function, including: calculating the one-dimensional structural entropy of each simulated knowledge path, and selecting the knowledge path with the highest one-dimensional structural entropy as the target path.
[0012] In an optional embodiment, the determining of the knowledge path with defects in the target model through the preset knowledge graph includes: determining the target path with the highest one-dimensional structural entropy or the target path with the one-dimensional structural entropy exceeding a preset threshold as the knowledge path with defects in the target model.
[0013] In an optional embodiment, the model defect knowledge detection method further includes: extracting a corresponding trajectory for the determined defective knowledge path; synthesizing data by prompting questions that instruct the target model to generate key entities and answers that logically explain the relationship between adjacent entities of the key entity in the trajectory to repair the defective knowledge path.
[0014] In an optional embodiment, the model defect knowledge detection method further includes: using a predefined prompt template to prompt the generation of questions and answers for key entities to ensure that the structure, punctuation and length of the synthesized data meet the requirements.
[0015] According to the second aspect of the present application, a control device is provided, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-mentioned model defect knowledge detection method.
[0016] According to a third aspect of the present application, a machine-readable storage medium is provided, on which instructions are stored, and the instructions enable a machine to execute the above-mentioned model defect knowledge detection method.
[0017] Through the above technical solution, the embodiment of the present application provides a model defect knowledge detection method, including: determining an initial Monte Carlo tree based on a preset knowledge graph; starting from the root node of each initial Monte Carlo tree, selecting the next node based on the relationship between the current node and the neighboring nodes and the preset tree strategy; in the process of selecting the next node, if the current node type is a leaf node, expanding the current node and adding the expanded new node to the corresponding Monte Carlo tree; using one-dimensional structural entropy as the intrinsic reward mechanism of the evaluation function to evaluate the expanded new node; and when reaching the terminal state, updating the statistical data of each node, and cyclically executing the process of selecting the next node, expanding the new node, and evaluating the new node to determine the knowledge path with defects in the target model through the preset knowledge graph. This model defect knowledge detection method provides a collaborative verification framework based on knowledge structure entropy, and detects knowledge defects in large models through structured knowledge detection. For knowledge defect detection, the embodiment of the present application introduces the knowledge structure entropy indicator to measure the knowledge uncertainty of large language models, and models uncertainty as structural entropy on the knowledge graph path. And using Monte Carlo tree search to efficiently explore the maximum uncertainty region, the embodiment of the present application can identify key knowledge defects.
[0018] Other features and advantages of the present application will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present application. The purpose and other advantages of the present application can be achieved and obtained through the structures and processes indicated in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following is a brief introduction to the drawings required for use in the embodiments or related technical descriptions. It is obvious that the drawings described below are certain embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0020] Figure 1 It is a flowchart of the model defect knowledge detection method provided by the exemplary embodiment of the present application.
[0021] Figure 2 It is a schematic diagram of the principle of model defect knowledge detection provided by the exemplary embodiment of the present application.
[0022] Figure 3 is a schematic diagram of example prompts for the synthetic data generation phase of an exemplary embodiment of the present application.
[0023] Figure 4 It is a schematic diagram of data distribution analysis of an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solutions and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0025] In response to the problems mentioned above, the embodiments of the present application provide a self-generation paradigm, that is, the model generates data only based on its own capabilities to achieve continuous self-improvement. However, the self-generation of the model faces key challenges: 1) Pre-training bias. The content generated by large language models (LLMs) is affected by pre-training bias and is difficult to cover the missing knowledge outside the pre-training corpus, especially in professional fields. Even with prompt engineering, the generated output tends to be biased towards the high-frequency distribution that appears in the pre-training data, resulting in a systematic omission of low-frequency domain knowledge. 2) Knowledge illusion. When generating knowledge that the model itself lacks, LLMs have no inherent fact verification mechanism, which increases the risk of generating "pseudo-knowledge" that contradicts real facts.
[0026] Based on this, an embodiment of the present application provides a model defect knowledge detection method, which provides a collaborative verification framework SENATOR based on knowledge structure entropy (SE) to detect knowledge defects in large language models through structured knowledge detection.
[0027] Figure 1 : is a flow chart of a method for detecting model defect knowledge provided by an exemplary embodiment of the present application. The method for detecting model defect knowledge may include the following steps:
[0028] Step S110: Determine an initial Monte Carlo tree based on a preset knowledge graph.
[0029] Please refer to Figure 2 For example, the embodiment of the present application is based on the standard Monte Carlo Tree Search (MCTS) paradigm to implement the process of model defect knowledge detection, which may include: selection, expansion, simulation and back propagation. MCTS starts from the initial state s0, which corresponds to the seed entity (i.e., the root node of the initial Monte Carlo tree), and defines the entities in the knowledge graph as nodes or states of the Monte Carlo tree. In each state, the possible action set A{a1, a2, ..., a m} represents the connection relationship between the current entity and its neighbor entities. By selecting an action, the algorithm will move to a new node (i.e., a new state) s t+1 , that is, move along the selected edge (relationship) ρ to another entity e j Based on the above exploration, we can identify paths in the knowledge graph that can reveal the knowledge gaps of large language models.
[0030] Step S120: Starting from the root node of each initial Monte Carlo tree, the next node is selected based on the relationship between the current node and neighboring nodes and a preset tree strategy.
[0031] In an embodiment of the present application, for the selection process, a node that balances search quality and computational efficiency can be identified as the next node.
[0032] In a preferred embodiment of the present application, selecting the next node based on the relationship between the current node and the neighboring nodes and the preset tree strategy may include: determining the next node using the cumulative value of taking action a in the current state and the access frequency of the current state.
[0033] For example, two key variables can be used to guide the selection process: the key variable Q(s t , a), can be expressed in state s t (Please refer to Figure 2 , for example, the cumulative value of taking action a in the current entity in the knowledge graph; the key variable N(s t ), can represent the state s t In order to balance the exploration of new nodes and the use of the relationship between visited nodes, at node s t At , you can use the following formula to select the next node
[0034]
[0035] Among them, c puct represents the coefficient of the PUCT algorithm, P(a|s t ) means in state s t The prior probability of selecting action a, N(s t , a) represents the transition from state s t The number of times action a is chosen.
[0036] Step S130: During the process of selecting the next node, if the current node is a leaf node, the current node is expanded, and the expanded new node is added to the corresponding Monte Carlo tree.
[0037] Continuing with the above example, the expansion process occurs at the leaf nodes in the selection process. The integration of new nodes and the evaluation of rewards can be achieved through the following formula:
[0038]
[0039] Among them, r t+1 represents the immediate reward function at step (t+1), r(s t , a) represents the quantization of the state s t For each available action a, I(s t ,a,s t+1 ) represents the self-information of the corresponding triple, Indicates state s t+1The corresponding weighted degree, vol(G) represents the total weighted degree of G, and γ represents the future state value V(s t ), T represents the depth of the Monte Carlo tree search space, and k represents the number of steps from state s t Start the simulation at the number of steps, and when the knowledge path length reaches the total search depth T, stop and backpropagate.
[0040] Step S140: using the one-dimensional structural entropy as the intrinsic reward mechanism of the evaluation function to evaluate the newly expanded nodes.
[0041] The embodiment of the present application provides a knowledge defect measure based on structural entropy. The reward function based on structural entropy combines the uncertainty of the large language model on the knowledge graph triples with the topological structure information of the knowledge graph. The reward function based on structural entropy then guides the intelligent agent driven by the large language model to search in the knowledge graph in the manner of Monte Carlo tree search to find the knowledge path with key defects. Among them, the larger the value of structural entropy, the greater the uncertainty, indicating that the model has a lower degree of mastery of the knowledge.
[0042] Preferably, before step S140, the model defect knowledge detection method may further include: for the knowledge graph G = (V, E) consisting of the set V of all nodes and the set E of all edges and its triple τ = <subject e i ,relationρ,subject e j >, each edge ρ∈E is assigned a weight based on self-information to determine the entity node e i ∈V; and according to the determined weighted degree of each entity node, determine the one-dimensional structural entropy of the knowledge graph G.
[0043] In the embodiment of the present application, for the self-information used to measure the uncertainty of the triple, the self-information quantifies the amount of information contained in the "fact" under a given probability distribution. In the knowledge graph, "fact" can represent the triple τ = <subjecte i ,relationρ,subject e j >. In order to measure the uncertainty of large language models about such “facts”, the embodiment of the present application converts τ into a cloze form. The context of the cloze can be represented by the entity e i The self-information of τ can be expressed as follows:
[0044] I(e i ,ρ,e j )=-log2P(e j |e i ,ρ) (4)
[0045] Among them, P(e j |e i ,ρ) represents the output probability in the cloze context. Since the relations in the knowledge graph are directed, the self-information calculated by formula (4) can be regarded as a measure of the confidence of the factual knowledge of the entire triple.
[0046] In the embodiment of the present application, for a given knowledge path, in order to integrate the uncertainty of all triples on the path and consider the structural importance of all triples, the embodiment of the present application preferably uses structural entropy to measure the knowledge confidence of a large language model, such as Figure 2 1(e) of . Structural importance captures the topological importance of triples in the knowledge graph. Triples involving highly connected entities are considered more core because these entities participate in more relationship paths and exert a broader influence on the entire graph. Unlike self-information or Shannon entropy, structural entropy describes the topological structure of the knowledge graph and the interactions between knowledge elements. Because each triple is not an isolated piece of information but part of a structured network, the relationships between entities contribute to the overall knowledge representation.
[0047] For example, for a given knowledge graph G = (V, E), each edge ρ∈E can be assigned a weight based on the self-information in formula (4). The entity node e can be expressed as follows: i The weighted degree d of ∈V i :
[0048]
[0049] Among them, Nei(e i ) represents the entity node e i The set of neighbor nodes, d i The overall uncertainty contained in the node can be measured. In order to quantify the average information content of the knowledge graph G, the embodiment of the present application preferably determines the one-dimensional structural entropy H of the knowledge graph G by the following formula: 1 (G):
[0050]
[0051] Where vol(G) represents the total weighted degree of G.
[0052] In the embodiment of the present application, H 1 Higher (G) values can indicate more complex and less confident regions within the knowledge graph. By using one-dimensional structural entropy as the exploration reward in MCTS, embodiments of the present application enable the search algorithm to prioritize paths that traverse the knowledge structure with the greatest uncertainty, thereby effectively exposing the model's systematic weaknesses.
[0053] In a preferred embodiment of the present application, when expanding the current node, starting from the expanded new node, multiple knowledge paths with the new node as the starting node are simulated by taking random actions. Preferably, step S140 may include: calculating the one-dimensional structural entropy of each simulated knowledge path, and selecting the knowledge path with the highest one-dimensional structural entropy as the target path.
[0054] Please refer to Figure 2 For example, from the newly expanded node (for example, node s t ) starts, and simulates the search for knowledge paths by taking random actions until the terminal state is reached. Next, an evaluation function is used to evaluate the newly expanded nodes. The embodiment of the present application preferably uses one-dimensional structural entropy as the intrinsic reward mechanism of the evaluation function, so that the evaluation function integrates future rewards, state relevance, and actual results. Through the above-mentioned intrinsic reward mechanism, the problem of unbalanced exploration of low-value states in the Shannon entropy strategy can be solved. The following formula represents the use of one-dimensional structural entropy as an intrinsic reward to achieve effective exploration:
[0055]
[0056] Among them, g is a subgraph of the knowledge graph G, S = {s0, s1, ..., s t} represents the selection trajectory (simulated knowledge path) of the tth iteration, which ends in the terminal state s after a complete simulation. T Finish, represents the expected value, and H(S) represents the structural entropy of the knowledge path S.
[0057] Step S150: When the termination state is reached, the statistics of each node are updated, and the process of selecting the next node, expanding the new node, and evaluating the new node is executed cyclically to determine the knowledge path where the target model has defects through the preset knowledge graph.
[0058] Please refer to Figure 2 During the backpropagation process, the embodiment of the present application updates the statistics of each state in the tree traversed during the selection phase. During the backpropagation process, the cumulative value and visit count of all root nodes on the trajectory (i.e., the target path) are updated to ensure that the evaluation results of leaf nodes can provide information for higher-level decision-making. The update rules are as follows:
[0059]
[0060] in, Indicates that in the slave state s t Whether action a was chosen in the i-th simulation run at the beginning, if yes, it can be 1, otherwise it can be 0.
[0061] In a preferred embodiment of the present application, determining the knowledge path where the target model has defects through the preset knowledge graph may include: determining the target path with the highest one-dimensional structural entropy or the target path with one-dimensional structural entropy exceeding a preset threshold as the knowledge path where the target model has defects.
[0062] Please refer to Figure 2 ,According to the preset number of cycles (Repeated X times), one or more target paths can be obtained.,The target path with the highest one-dimensional structural,entropy can be determined as the knowledge path with defects in the knowledge graph,,and the target path with the one-dimensional structural entropy exceeding the preset,threshold can also be determined as the knowledge path with defects in the target model.
[0063] The model defect knowledge detection method provided in the embodiment of the present application provides a collaborative verification framework SENATOR based on knowledge structure entropy, which detects knowledge defects in large models through structured knowledge detection; further, the embodiment of the present application can also form a closed loop of targeted synthetic data to realize the repair of knowledge gaps in large models.
[0064] In a preferred embodiment of the present application, the model defect knowledge detection method may also include: extracting the corresponding trajectory for the determined defective knowledge path; synthesizing data by prompting questions that indicate the target model generates key entities and answers that logically explain the relationship between adjacent entities in the trajectory with the key entities to repair the defective knowledge path.
[0065] like Figure 2 As shown in (f) to (h), embodiments of the present application also provide for using the trajectory with the highest structural entropy value obtained through MCTS to guide the generation of synthetic data. For example, by prompting the large language model agent to synthesize one or more sets of question-answer pairs according to a determined knowledge path, the large language model on these paths has high uncertainty, so as to compensate for the knowledge gap of the large language model by training on these question-answer pairs.
[0066] like Figure 3 As shown, for a given trajectory e = {e0, e1, ..., e r} or S={s0,s1,…,s t}, indicating that the large language model generation focuses on key entities e i The problem, and the logical explanation of e i and its neighbor entity Nei(e i ) between the answer. The synthesized question-answer pairs can follow the basic knowledge of the knowledge path and make up for the knowledge gaps of the large language model. In addition, to maintain high-quality data, the embodiment of the present application provides a multi-level evaluation mechanism including heuristic rules and judgments based on large language models.
[0067] In a preferred embodiment of the present application, the model defect knowledge detection method may further include: using a predefined prompt template to prompt the generation of questions and answers for key entities to ensure that the structure, punctuation and length of the synthesized data meet the requirements.
[0068] like Figure 3 As shown, the multi-level evaluation mechanism can include: 1) Format consistency, the generated question-answer pairs adhere to the predefined prompt template, ensuring that the structure, punctuation and length meet the specifications to ensure that the format of the synthesized data is unified and convenient for downstream processing. 2) Logical coherence, the question-answer pairs can express clear and reasonable reasoning. The answers should provide logically consistent explanations, that is, the relationships and contexts derived from the knowledge path, ensuring that the data effectively captures and solves the identified knowledge gaps. 3) Avoiding hallucinations, the generated content is based on the input trajectory. For example, all entities and facts mentioned in the question-answer pair come from the given trajectory, preventing the introduction of foreign or unfounded information that may undermine the reliability of the model. Data samples that do not meet the above standards can be filtered out through the evaluation mechanism, thereby ensuring that only high-quality synthetic data is used to fill the knowledge gaps of large language models.
[0069] The present application also provides a method to verify the effectiveness of a large language model agent based on knowledge structure entropy in detecting model knowledge deficiencies. For example, all data samples are projected into a unified semantic space, and the kernel density estimation (KDE) graph of the original pre-trained data and the synthetic data is calculated in a two-dimensional UMAP space. Data distribution analysis shows that the synthetic data generated by the framework covers the knowledge missing in the pre-trained corpus (such as Figure 4 As shown, red represents the distribution of synthetic data, and blue represents the distribution of original pre-trained data. Among them, MedQA is used to represent the multiple-choice question dataset for evaluating medical understanding and reasoning ability. MedMCQA is also used to represent the dataset, which can include more than 194,000 exam questions, covering 2,400 topics in 21 disciplines. PubMedQA represents the biomedical question-and-answer dataset built based on PubMed abstracts, including 1,000 expert annotations and 211,000 automatically generated question-and-answer pairs). The results show that the synthetic data of the embodiment of the present application effectively expands the knowledge coverage of the existing pre-training corpus and injects domain knowledge that was previously missing in large-scale language models, which indirectly proves the efficiency of the embodiment of the present application as a "new energy" for artificial intelligence data annotation.
[0070] Furthermore, this data was used to fine-tune models such as Llama-3 and Qwen2. Verification showed that the SENATOR framework improved the average performance of Llama-3 and Qwen2 by 5.07 and 4.42 percentage points, respectively, across four benchmarks. This significantly improved model performance. This demonstrates that the targeted injection of missing knowledge in the embodiments of this application can significantly enhance the overall performance of the model, and that this targeted strategy for missing knowledge is more efficient than traditional, large-scale, untargeted knowledge supervision methods.
[0071] Accordingly, an embodiment of the present application provides a method for detecting model defect knowledge, comprising: determining an initial Monte Carlo tree based on a preset knowledge graph; starting from the root node of each initial Monte Carlo tree, selecting the next node based on the relationship between the current node and its neighboring nodes and a preset tree strategy; in the process of selecting the next node, if the current node is a leaf node, expanding the current node and adding the expanded new node to the corresponding Monte Carlo tree; evaluating the expanded new node using one-dimensional structural entropy as the intrinsic reward mechanism of the evaluation function; and when reaching the terminal state, updating the statistical data of each node, and cyclically executing the process of selecting the next node, expanding the new node, and evaluating the new node to determine the knowledge path with defects in the target model through the preset knowledge graph. This model defect knowledge detection method provides a collaborative verification framework based on knowledge structure entropy, detecting knowledge defects in large models through structured knowledge detection. For knowledge defect detection, the embodiment of the present application introduces the knowledge structure entropy indicator to measure the knowledge uncertainty of large language models, modeling uncertainty as structural entropy on the knowledge graph path. Monte Carlo tree search is used to efficiently explore the maximum uncertainty region, and the embodiment of the present application can identify key knowledge defects.
[0072] Furthermore, the embodiments of this application also provide a closed loop formed by targeted synthetic data to achieve the repair of knowledge gaps in large models. For knowledge synthesis and repair, synthetic data is generated by leveraging the defective knowledge paths identified by MCTS, while using the knowledge graph to ensure the credibility of the data source and synthetic content. This synthetic data is then used to fine-tune the model through supervised learning (SFT), achieving continuous self-improvement and effective knowledge gap repair.
[0073] An embodiment of the present application also provides a control device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the computer program to implement the above-mentioned model defect knowledge detection method.
[0074] An embodiment of the present application also provides a machine-readable storage medium, on which instructions are stored, and the instructions enable a machine to execute the above-mentioned model defect knowledge detection method.
[0075] It should be noted that the above-mentioned control device and machine-readable storage medium can implement the model defect knowledge detection method provided in the above-mentioned embodiment. The specific implementation method can be found in the description of the model defect knowledge detection method in the above-mentioned embodiment, which will not be repeated here.
[0076] It is understood that the circuit structures, names, and parameters described in the above embodiments are merely examples. Those skilled in the art may also readily conceive of combinations and adjustments to the structural features of the above embodiments as needed, and should not limit the concept of this application to the specific details of the above examples.
[0077] Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for detecting model defect knowledge, characterized in that: The model defect knowledge detection method includes: Determine the initial Monte Carlo tree based on the preset knowledge graph; Starting from the root node of each initial Monte Carlo tree, the next node is selected based on the relationship between the current node and its neighboring nodes and the preset tree strategy; In the process of selecting the next node, if the current node is a leaf node, expand the current node and add the expanded new node to the corresponding Monte Carlo tree; Using one-dimensional structural entropy as an intrinsic reward mechanism for the evaluation function to evaluate the newly expanded nodes; and When the terminal state is reached, the statistics of each node are updated, and the process of selecting the next node, expanding the new node, and evaluating the new node is executed cyclically to determine the knowledge path where the target model has defects through the preset knowledge graph.
2. The method for detecting model defect knowledge according to claim 1, characterized in that: Entities in the knowledge graph are defined as nodes or states of the corresponding Monte Carlo tree. In each state, an action set is used to represent the relationship between the current entity and its neighboring nodes. The next node is selected based on the relationship between the current node and its neighboring nodes and the preset tree strategy, including: The next node is determined using the accumulated value of taking action a in the current state and the visit frequency of the current state.
3. The method for detecting model defect knowledge according to claim 1, characterized in that: Before evaluating the expanded new nodes using the one-dimensional structural entropy as the intrinsic reward mechanism of the evaluation function, the model defect knowledge detection method further includes: For the knowledge graph G = (V, E) consisting of the set V of all nodes and the set E of all edges and its triple T = < subject e i ,relation ρ,subject e j >, each edge ρ∈E is assigned a weight based on self-information to determine the entity node e i The weighted degree of ∈V; and According to the determined weighted degree of each entity node, the one-dimensional structural entropy of the knowledge graph G is determined.
4. The method for detecting model defect knowledge according to claim 1, wherein: Determine the one-dimensional structural entropy H of the knowledge graph G through the following formula: 1 (G): Among them, d i Represents entity node e i , vol(G) represents the total weighted degree of G, and V represents the set of all nodes.
5. The method for detecting model defect knowledge according to claim 1, wherein: When the current node is expanded, starting from the expanded new node, multiple knowledge paths starting from the new node are simulated by taking random actions. The one-dimensional structural entropy is used as the intrinsic reward mechanism of the evaluation function to evaluate the expanded new node, including: The one-dimensional structural entropy of each simulated knowledge path is calculated, and the knowledge path with the highest one-dimensional structural entropy is selected as the target path.
6. The method for detecting model defect knowledge according to claim 5, characterized in that: The knowledge path of determining the defective target model through the preset knowledge graph includes: The target path with the highest one-dimensional structural entropy or the target path with the one-dimensional structural entropy exceeding a preset threshold is determined as a knowledge path with defects in the target model.
7. The method for detecting model defect knowledge according to claim 1, characterized in that: The model defect knowledge detection method further includes: For the identified defective knowledge paths, the corresponding trajectories are extracted; Data is synthesized by prompting a target model with questions that instruct the target model to generate a key entity and answers that logically explain the relationship between adjacent entities in the trajectory and the key entity to repair the defective knowledge path.
8. The method for detecting model defect knowledge according to claim 7, characterized in that: The model defect knowledge detection method further includes: Leverage predefined prompt templates to generate questions and answers about key entities to ensure that the structure, punctuation, and length of the synthesized data meet the requirements.
9. A control device, characterized in that: The control device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the model defect knowledge detection method according to any one of claims 1 to 8.
10. A machine-readable storage medium, characterized in that The machine-readable storage medium stores instructions, which enable the machine to execute the model defect knowledge detection method according to any one of claims 1-8.
Citation Information
Patent Citations
Information identification method for power grid equipment defect text
CN109977228A
Signal transmission system for measuring traffic state by using road network sensor
CN116994434A
Structured graph federal learning method and system based on high-order heterogeneous information
CN117094028A
Knowledge graph question and answer retrieval method based on large language model and MCTS algorithm
CN118296114A
Hyperbolic graph clustering-based social public opinion event detection method
CN118377900A