Large-model medical knowledge editing method based on knowledge conflict perception

By adopting a large-scale medical knowledge editing method based on knowledge conflict awareness, the conflict problem in medical knowledge updates is solved, and new knowledge can be dynamically injected without destroying the original knowledge, thereby improving the accuracy of medical knowledge testing and the stability of the model.

CN121659902APending Publication Date: 2026-03-13BEIHANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-03
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing technologies in the medical field lack a mechanism to perceive potential conflicts between old and new medical knowledge across time and space. This makes it easy for contradictions or errors to be introduced when updating knowledge, and the failure to dynamically adjust editing strategies affects the stability and accuracy of the model.

Method used

By employing a large-scale medical knowledge editing method based on knowledge conflict awareness, we utilize backpropagation to calculate sensitive gradient changes, select highly relevant subspace regions, perform local parameter optimization, and dynamically inject new knowledge using a knowledge routing mechanism to maintain the stability of the original knowledge.

Benefits of technology

It enables the dynamic injection of new knowledge without destroying existing knowledge, improving the accuracy of medical knowledge tests from 55.6% to 98.9%, and supporting the continuity and robustness of multi-round editing tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121659902A_ABST
    Figure CN121659902A_ABST
Patent Text Reader

Abstract

The invention provides a large model medical knowledge editing method based on knowledge conflict perception, and relates to the technical field of natural language processing, and the method comprises the steps: obtaining an editing direction of target medical knowledge to model medical knowledge memory through back propagation calculation based on an input sample containing a to-be-edited medical fact; based on an editing direction, selecting from the medical knowledge subspace candidate set by utilizing knowledge conflict perception to obtain a subspace region highly related to the target knowledge; on the basis of the selected subspace region, a local region sensitive to knowledge representation is obtained through recognition; adjusting and optimizing in the local area sensitive to the knowledge representation to obtain an adjusting and optimizing result; and dynamically selecting the most relevant subspace region for reasoning generation according to knowledge semantics required by a specific problem by utilizing an adjustment and optimization result and a medical knowledge routing mechanism, so as to obtain a large-model medical knowledge editing result. The problem that long-term, stable and controllable cross-space-time medical knowledge updating tasks are difficult to realize in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of natural language processing technology, and in particular to a large-scale medical knowledge editing method based on knowledge conflict perception. Background Technology

[0002] With the widespread application of large-scale language models in fields such as medical question answering, assisted diagnosis, and medical knowledge graph construction, continuously injecting new medical knowledge into these models has become a significant challenge in ensuring their timeliness and professional reliability. In real-world medical scenarios, models face frequent knowledge update needs due to updates to clinical guidelines, changes in disease patterns, and the discovery of new drug mechanisms. However, traditional fine-tuning methods suffer from the "catastrophic forgetting" problem, meaning that introducing new knowledge often damages existing knowledge, affecting the overall stability of their cross-temporal and spatial clinical expression.

[0003] In recent years, researchers have begun to focus on knowledge editing tasks in neural language models, that is, finely adjusting model parameters to enable the model to update individual knowledge points. Existing research, such as ROME and MEMIT, attempts to achieve knowledge injection by locating relevant parameter regions in the model's knowledge memory and making limited modifications. These methods have made initial progress in general factual knowledge. However, in the medical field, knowledge often has characteristics such as complex relationships, strong contextual dependencies, and high semantic accuracy requirements. Existing methods still have significant shortcomings in the following aspects: Current methods lack a mechanism to perceive potential conflicts between old and new medical knowledge across time and space, which can easily lead to contradictory knowledge representations or introduce errors in medical facts. Furthermore, most methods fail to dynamically adjust the model's editing strategy based on the sensitivity of specific medical knowledge, resulting in inaccurate placement of core medical knowledge within the model. Summary of the Invention

[0004] To address the aforementioned shortcomings in existing technologies, this invention provides a large-scale medical knowledge editing method based on knowledge conflict perception, which solves the problem that existing technologies struggle to achieve long-term, stable, and controllable cross-temporal and spatial medical knowledge update tasks.

[0005] To achieve the aforementioned objectives, the technical solution adopted by this invention is: a large-scale medical knowledge editing method based on knowledge conflict perception, comprising: S1: Based on the input sample containing the medical facts to be edited, the sensitive gradient change of the target medical knowledge on the existing model parameters is calculated through backpropagation to obtain the editing direction of the target medical knowledge on the model's medical knowledge memory; S2: Based on the editing direction of the model's medical knowledge memory according to the target medical knowledge, select from the candidate set of medical knowledge subspaces using knowledge conflict perception to obtain the subspace region that is highly related to the target knowledge; S3: Based on the selected subspace region, a local region sensitive to knowledge representation is obtained through identification; S4: In a local region sensitive to knowledge representation, neurons with a limited range of parameters are tuned to maintain the stability of the original medical knowledge while injecting new medical knowledge, thus obtaining the tuning results. S5: Utilizing the optimization results and medical knowledge routing mechanism, based on the semantic knowledge required for the specific problem, the most relevant subspace region is dynamically selected for reasoning and generation to obtain the medical knowledge editing results of the large model, thus completing the editing of the medical knowledge of the large model.

[0006] Further, S1 includes: Obtain an input sample containing the medical facts to be edited; Based on the large language model to be edited, the input samples are analyzed using the forward propagation method to obtain the output results of the large language model; Based on the output of the large language model, backpropagation is used to calculate the sensitive gradient changes of the target medical knowledge on the existing model parameters, thereby obtaining the editing direction of the target medical knowledge on the model's medical knowledge memory.

[0007] Furthermore, the expression for the editing direction is: ; ; in, Indicates the editing direction. Represents the gradient operator. Represents the cross-entropy edit loss. Indicates medical knowledge objectives, This represents the output of a large language model. This represents the forward inference output of a large language model. Indicates a medical knowledge query. This represents the initial weights of the large language model.

[0008] Further, S2 includes: Based on the editing direction of the model's medical knowledge memory based on the target medical knowledge, selection is made from the candidate set of medical knowledge subspaces, and the cumulative editing impact of each subspace in the existing medical knowledge subspace set is calculated respectively. Based on the current editing direction of the target medical knowledge and the cumulative editing impact of each subspace, the correlation indicators between the current target knowledge and the memory of each subspace are obtained through calculation. Based on the relevant indicators of target knowledge and subspace memory, the subspace with the highest relevance to target knowledge is selected using knowledge conflict perception, thus obtaining the subspace region that is highly related to the target knowledge.

[0009] Furthermore, the expression for the subspace region highly related to the target knowledge is: ; ; ; ; ; in, This represents a subspace region that is highly relevant to the target knowledge. This indicates that the operator maximizes the independent variable. This represents the relevance between the current target knowledge and the i-th medical knowledge subspace, and is a real number between -1 and 1. This represents a newly created subspace for medical knowledge. Represents the initial weights of the large language model. This indicates an update assignment. This represents a subspace of medical knowledge. Indicates the current editing direction of the target knowledge. This indicates the editing direction that has been applied to the i-th medical knowledge subspace. This represents the i-th medical knowledge subspace. This represents the first medical knowledge subspace. This represents the second medical knowledge subspace. Let n represent the nth medical knowledge subspace.

[0010] Furthermore, the expression for the knowledge-representation-sensitive local region is: ; in, This represents a local region that is sensitive to knowledge representation. Indicates the editing direction. This represents the dot product operation of matrices. Indicates the row index of the parameter matrix. Indicates the column index of the parameter matrix. This represents the sensitivity threshold hyperparameter. This represents the dimensions of all parameters in the subspace.

[0011] Further, S4 includes: Based on knowledge conflict perception, neurons with a limited range of parameters are tuned in a local region that is sensitive to knowledge representation. The output of the medical knowledge subspace is obtained through forward propagation in the selected medical knowledge subspace. By backpropagation and using cross-entropy editing loss calculation, the gradient matrix of the target knowledge in the editing layer parameters in the subspace is obtained; Gradient descent is used to fine-tune highly sensitive neural nodes within a subspace, maintaining the stability of existing medical knowledge while injecting new medical knowledge to obtain the fine-tuning results.

[0012] Furthermore, the expression for the optimization result is: ; ; ; in, This represents the optimization results for the selected medical knowledge subspace. This indicates an update assignment. Indicates the edit learning rate. This represents a local region that is sensitive to knowledge representation. This represents the dot product operation of matrices. This indicates the editing direction for the selected medical knowledge subspace. Represents the gradient operator. Represents the cross-entropy edit loss. Indicates medical knowledge objectives, This indicates the model output using the selected medical knowledge subspace. This represents the forward inference output of a large language model. This indicates a search for medical knowledge.

[0013] Further, S5 includes: By utilizing the optimization results and the medical knowledge routing mechanism, the most relevant subspace region is dynamically selected for reasoning generation based on the knowledge semantics required for the specific problem. For all medical knowledge query samples input during medical knowledge editing and medical knowledge queries during reasoning, the corresponding knowledge activation vectors are obtained through calculation. Based on the knowledge activation vector, the matching degree between medical knowledge and the memory of each subspace during reasoning is obtained through calculation; The subspace with the highest matching degree is selected. When the subspace is greater than the set matching degree threshold, the subspace is used for inference; otherwise, the initial weights of the model are used for inference to obtain the editing results of the large model medical knowledge and complete the editing of the large model medical knowledge.

[0014] Furthermore, the expression for the large-scale medical knowledge editing result is: ; ; ; in, This represents the results of editing medical knowledge in a large model. This represents the forward inference output of a large language model. Indicates a medical knowledge query. Represents the initial weights of the large language model. This represents the medical knowledge subspace with the highest matching degree. Indicates the matching threshold. This represents the i-th medical knowledge subspace. This represents the knowledge activation vector of a medical knowledge query sample. This represents the knowledge activation vector for medical knowledge queries during reasoning. Represents the knowledge activation vector. This represents the forward propagation output of the large language model in the part before the editing layer.

[0015] The beneficial effects of this invention are as follows: This invention provides a large-scale medical knowledge editing method based on knowledge conflict perception. By introducing medical knowledge subspace modeling, a conflict perception mechanism, and a knowledge routing strategy in the reasoning stage, it achieves dynamic injection of new knowledge without destroying the original medical knowledge, and supports the continuity and robustness of multi-round medical editing tasks. The model before editing lacks or cannot correctly utilize the knowledge needed to answer medical questions, leading to incorrect analyses. The algorithm provided by this invention not only provides correct answers in the target medical knowledge test but also keeps irrelevant medical knowledge unaffected, thereby achieving accurate editing of medical knowledge related to mental and psychological diseases. The accuracy rate of the target medical knowledge test answers is significantly improved from 55.6% before medical knowledge editing to 98.9% after medical knowledge editing. Attached Figure Description

[0016] This specification will be further described by way of exemplary embodiments, which will be described in detail with reference to the accompanying drawings. These embodiments are not limiting; in these embodiments, the same reference numerals denote the same structures, wherein: Figure 1 This is an exemplary flowchart of a large-model medical knowledge editing method based on knowledge conflict perception, as shown in some embodiments of this specification. Detailed Implementation

[0017] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.

[0018] Example Figure 1This is an exemplary flowchart illustrating a large-scale medical knowledge editing method based on knowledge conflict awareness, according to some embodiments of this specification. Figure 1 As shown, the process includes the following steps. In some embodiments, the process may be executed by a processor.

[0019] S1: Based on the input sample containing the medical facts to be edited, the sensitive gradient change of the target medical knowledge on the existing model parameters is calculated through backpropagation to obtain the editing direction of the target medical knowledge on the model's medical knowledge memory.

[0020] The input sample is an input sample containing the medical facts to be edited. For example, the input sample may include a text sample containing target mental health medical facts, each text sample including a medical knowledge query x and a corresponding medical knowledge target y.

[0021] In some embodiments, the processor can acquire an input sample containing medical facts to be edited; based on the large language model to be edited, analyze the input sample using forward propagation to obtain the output of the large language model; based on the output of the large language model, use backpropagation to calculate the sensitive gradient change of the target medical knowledge on the existing model parameters to obtain the editing direction of the target medical knowledge on the model's medical knowledge memory.

[0022] In some embodiments, the gradient matrix is ​​used to quantify the editing direction of the current target medical knowledge on the memory of the large language model.

[0023] In some embodiments, the expression for the editing direction can be: ; ; in, Indicates the editing direction. Represents the gradient operator. Represents the cross-entropy edit loss. Indicates medical knowledge objectives, This represents the output of a large language model. This represents the forward inference output of a large language model. Indicates a medical knowledge query. This represents the initial weights of the large language model.

[0024] S2: Based on the editing direction of the model's medical knowledge memory according to the target medical knowledge, select from the candidate set of medical knowledge subspaces using knowledge conflict perception to obtain the subspace region that is highly related to the target knowledge.

[0025] The subspace region that is highly related to the target knowledge is the subspace with the highest relevance to the target knowledge.

[0026] In some embodiments, the processor can select from the candidate set of medical knowledge subspaces based on the editing direction of the model's medical knowledge memory according to the target medical knowledge, and calculate the cumulative editing impact of each subspace in the existing medical knowledge subspace set; based on the editing direction of the current target medical knowledge and the cumulative editing impact of each subspace, the processor can calculate the correlation index between the current target knowledge and the memory of each subspace; based on the correlation index between the target knowledge and the memory of the subspace, the processor can use knowledge conflict perception to select the subspace with the highest correlation to the target knowledge, and obtain the subspace region that is highly related to the target knowledge.

[0027] The cumulative editing effect is the cumulative editing effect of each subspace in the existing medical knowledge subspace set.

[0028] Relevant indicators of current target knowledge and memory in each subspace It is a real number between -1 and 1. The smaller the value, the more severe the conflict between the target knowledge and the memory of the i-th subspace; The larger the value, the more relevant the target knowledge is to the memory of the i-th subspace.

[0029] In some embodiments, the processor can select the subspace with the highest relevance to the target knowledge based on the relevant indicators of the target knowledge and the subspace memory. If all subspaces in the current medical knowledge subspace set S have significant conflicts with the target knowledge, then... Initialize the new subspace and add it to the subspace set.

[0030] In some embodiments, the expression for the subspace region that is highly related to the target knowledge is: ; ; ; ; ; in, This represents a subspace region that is highly relevant to the target knowledge. This indicates that the operator maximizes the independent variable. This represents the relevance between the current target knowledge and the i-th medical knowledge subspace, and is a real number between -1 and 1. This represents a newly created subspace for medical knowledge. Represents the initial weights of the large language model. This indicates an update assignment. This represents a subspace of medical knowledge. Indicates the current editing direction of the target knowledge. This indicates the editing direction that has been applied to the i-th medical knowledge subspace. This represents the i-th medical knowledge subspace. This represents the first medical knowledge subspace. This represents the second medical knowledge subspace. Let n represent the nth medical knowledge subspace.

[0031] S3: Based on the selected subspace region, a local region sensitive to knowledge representation is obtained through identification.

[0032] A local region sensitive to knowledge representation is a highly sensitive local region in which the positions of each parameter within the integrated subspace are sensitive to the target knowledge.

[0033] In some embodiments, the processor can be in the selected subspace In this study, the backpropagation gradient is combined with the squared gradient to estimate the sensitivity of each parameter position in the subspace to the target knowledge, and highly sensitive neural node regions are extracted.

[0034] In some embodiments, the expression for a local region sensitive to knowledge representation can be: ; in, This represents a local region that is sensitive to knowledge representation. Indicates the editing direction. This represents the dot product operation of matrices. Indicates the row index of the parameter matrix. Indicates the column index of the parameter matrix. This represents the sensitivity threshold hyperparameter. This represents the dimensions of all parameters in the subspace.

[0035] S4: In a local region sensitive to knowledge representation, neurons with a limited range of parameters are tuned to maintain the stability of the original medical knowledge while injecting new medical knowledge, thus obtaining the tuning results.

[0036] The tuning results are achieved by using gradient descent to fine-tune and edit highly sensitive neural nodes within a subspace.

[0037] In some embodiments, the processor can, based on knowledge conflict perception, fine-tune neurons within a limited parameter range in a local region sensitive to knowledge representation. Using the selected medical knowledge subspace, the processor obtains the output result of the medical knowledge subspace through forward propagation; through backpropagation, it calculates the gradient matrix of the target knowledge parameters in the editing layer within the subspace using cross-entropy editing loss; and using gradient descent, it fine-tunes and edits highly sensitive neural nodes within the subspace, injecting new medical knowledge while maintaining the stability of the original medical knowledge, thus obtaining the fine-tuning result.

[0038] The gradient matrix is ​​the gradient matrix of the target knowledge in the subspace with respect to the parameters of the editing layer.

[0039] In some embodiments, the expression for the tuning result can be: ; ; ; in, This represents the optimization results for the selected medical knowledge subspace. This indicates an update assignment. Indicates the edit learning rate. This represents a local region that is sensitive to knowledge representation. This represents the dot product operation of matrices. This indicates the editing direction for the selected medical knowledge subspace. Represents the gradient operator. Represents the cross-entropy edit loss. Indicates medical knowledge objectives, This indicates the model output using the selected medical knowledge subspace. This represents the forward inference output of a large language model. This indicates a search for medical knowledge.

[0040] S5: Utilizing the optimization results and medical knowledge routing mechanism, based on the semantic knowledge required for the specific problem, the most relevant subspace region is dynamically selected for reasoning and generation to obtain the medical knowledge editing results of the large model, thus completing the editing of the medical knowledge of the large model.

[0041] The results of medical knowledge editing on the large model are the result of editing medical knowledge on the optimized large language model.

[0042] In some embodiments, the processor can utilize the tuning results and medical knowledge routing mechanism to dynamically select the most relevant subspace region for inference generation based on the knowledge semantics required for the specific problem. For all medical knowledge query samples input during medical knowledge editing and medical knowledge queries during inference, corresponding knowledge activation vectors are obtained through calculation. Based on the knowledge activation vectors, the matching degree between medical knowledge during inference and the memory of each subspace is calculated. The subspace with the highest matching degree is selected. When the subspace is greater than the set matching degree threshold, the subspace is used for inference; otherwise, the initial weights of the model are used for inference to obtain the medical knowledge editing result of the large model, thus completing the editing of the medical knowledge of the large model.

[0043] A knowledge activation vector is an activation vector used to calculate the matching degree between medical knowledge and the memories of each subspace during inference. For example, a knowledge activation vector may include the knowledge activation vector of a medical knowledge query sample and the knowledge activation vector of a medical knowledge query during inference.

[0044] In some embodiments, medical knowledge queries are received when the model performs reasoning. For all medical knowledge query samples entered during the editing process. Medical knowledge search during reasoning Calculate the knowledge activation vectors respectively and .

[0045] The matching degree between medical knowledge and the memories of each subspace during reasoning is a parameter used to determine the matching status between medical knowledge and subspaces.

[0046] In some embodiments, the processor may select the subspace with the highest matching degree. ,if Greater than the set matching threshold Then use subspace Perform inference; otherwise, use the model's initial weights. To reason.

[0047] In some embodiments, the expression for the large model medical knowledge editing result can be: ; ; ; in, This represents the results of editing medical knowledge in a large model. This represents the forward inference output of a large language model. express, Represents the initial weights of the large language model. This represents the medical knowledge subspace with the highest matching degree. Indicates the matching threshold. This represents the i-th medical knowledge subspace. express, express, express, This represents the forward propagation output of the large language model in the part before the editing layer.

[0048] In some embodiments of this specification, a large-scale medical knowledge editing method based on knowledge conflict perception is provided. By introducing medical knowledge subspace modeling, a conflict perception mechanism, and a knowledge routing strategy in the reasoning stage, it achieves dynamic injection of new knowledge without destroying existing medical knowledge, and supports the continuity and robustness of multi-round medical editing tasks. The model before editing lacks or cannot correctly utilize the knowledge needed to answer medical questions, leading to incorrect analyses. The algorithm provided by this invention not only provides correct answers in the target medical knowledge test but also keeps irrelevant medical knowledge unaffected, thereby achieving accurate editing of medical knowledge related to mental and psychological diseases. The accuracy rate of the target medical knowledge test answers is significantly improved from 55.6% before medical knowledge editing to 98.9% after medical knowledge editing.

Claims

1. A large-scale medical knowledge editing method based on knowledge conflict perception, characterized in that, include: S1: Based on the input sample containing the medical facts to be edited, the sensitive gradient change of the target medical knowledge on the existing model parameters is calculated through backpropagation to obtain the editing direction of the target medical knowledge on the model's medical knowledge memory; S2: Based on the editing direction of the model's medical knowledge memory according to the target medical knowledge, select from the candidate set of medical knowledge subspaces using knowledge conflict perception to obtain the subspace region that is highly related to the target knowledge; S3: Based on the selected subspace region, a local region sensitive to knowledge representation is obtained through identification; S4: In a local region sensitive to knowledge representation, neurons with a limited range of parameters are tuned to maintain the stability of the original medical knowledge while injecting new medical knowledge, thus obtaining the tuning results. S5: Utilizing the optimization results and medical knowledge routing mechanism, based on the semantic knowledge required for the specific problem, the most relevant subspace region is dynamically selected for reasoning and generation to obtain the medical knowledge editing results of the large model, thus completing the editing of the medical knowledge of the large model.

2. The large-scale medical knowledge editing method based on knowledge conflict perception according to claim 1, characterized in that, S1 includes: Obtain an input sample containing the medical facts to be edited; Based on the large language model to be edited, the input samples are analyzed using the forward propagation method to obtain the output results of the large language model; Based on the output of the large language model, backpropagation is used to calculate the sensitive gradient changes of the target medical knowledge on the existing model parameters, thereby obtaining the editing direction of the target medical knowledge on the model's medical knowledge memory.

3. The large-scale medical knowledge editing method based on knowledge conflict perception according to claim 2, characterized in that, The expression for the editing direction is: ; ; in, Indicates the editing direction. Represents the gradient operator. Represents the cross-entropy edit loss. Indicates medical knowledge objectives, This represents the output of the large language model. This represents the forward inference output of a large language model. Indicates a medical knowledge query. This represents the initial weights of the large language model.

4. The large-scale medical knowledge editing method based on knowledge conflict perception according to claim 1, characterized in that, S2 includes: Based on the editing direction of the model's medical knowledge memory based on the target medical knowledge, selection is made from the candidate set of medical knowledge subspaces, and the cumulative editing impact of each subspace in the existing medical knowledge subspace set is calculated respectively. Based on the current editing direction of the target medical knowledge and the cumulative editing impact of each subspace, the correlation indicators between the current target knowledge and the memory of each subspace are obtained through calculation. Based on the relevant indicators of target knowledge and subspace memory, the subspace with the highest relevance to target knowledge is selected using knowledge conflict perception, thus obtaining the subspace region that is highly related to the target knowledge.

5. The large-scale medical knowledge editing method based on knowledge conflict perception according to claim 1, characterized in that, The expression for the subspace region that is highly related to the target knowledge is: ; ; ; ; ; in, This represents a subspace region that is highly relevant to the target knowledge. This indicates that the operator maximizes the independent variable. This represents the relevance between the current target knowledge and the i-th medical knowledge subspace, and is a real number between -1 and 1. This represents a newly created subspace for medical knowledge. Represents the initial weights of the large language model. This indicates an update assignment. This represents a subspace of medical knowledge. Indicates the current editing direction of the target knowledge. This indicates the editing direction that has been applied to the i-th medical knowledge subspace. This represents the i-th medical knowledge subspace. This represents the first medical knowledge subspace. This represents the second medical knowledge subspace. Let n represent the nth medical knowledge subspace.

6. The large-scale medical knowledge editing method based on knowledge conflict perception according to claim 1, characterized in that, The expression for the knowledge representation-sensitive local region is: ; in, This represents a local region that is sensitive to knowledge representation. Indicates the editing direction. This represents the dot product operation of matrices. Indicates the row index of the parameter matrix. Indicates the column index of the parameter matrix. This represents the sensitivity threshold hyperparameter. This represents the dimensions of all parameters in the subspace.

7. The large-scale medical knowledge editing method based on knowledge conflict perception according to claim 1, characterized in that, S4 includes: Based on knowledge conflict perception, neurons with a limited range of parameters are tuned in a local region that is sensitive to knowledge representation. The output of the medical knowledge subspace is obtained through forward propagation in the selected medical knowledge subspace. By backpropagation and using cross-entropy editing loss calculation, the gradient matrix of the target knowledge in the editing layer parameters in the subspace is obtained; Gradient descent is used to fine-tune highly sensitive neural nodes within a subspace, maintaining the stability of existing medical knowledge while injecting new medical knowledge to obtain the fine-tuning results.

8. The large-scale medical knowledge editing method based on knowledge conflict perception according to claim 1, characterized in that, The expression for the optimization result is: ; ; ; in, This represents the optimization results for the selected medical knowledge subspace. This indicates an update assignment. Indicates the edit learning rate. This represents a local region that is sensitive to knowledge representation. This represents the dot product operation of matrices. This indicates the editing direction for the selected medical knowledge subspace. Represents the gradient operator. Represents the cross-entropy edit loss. Indicates medical knowledge objectives, This indicates the model output using the selected medical knowledge subspace. This represents the forward inference output of a large language model. This indicates a search for medical knowledge.

9. The large-scale medical knowledge editing method based on knowledge conflict perception according to claim 1, characterized in that, S5 includes: By utilizing the optimization results and the medical knowledge routing mechanism, the most relevant subspace region is dynamically selected for reasoning generation based on the knowledge semantics required for the specific problem. For all medical knowledge query samples input during medical knowledge editing and medical knowledge queries during reasoning, the corresponding knowledge activation vectors are obtained through calculation. Based on the knowledge activation vector, the matching degree between medical knowledge and the memory of each subspace during reasoning is obtained through calculation; The subspace with the highest matching degree is selected. When the subspace is greater than the set matching degree threshold, the subspace is used for inference; otherwise, the initial weights of the model are used for inference to obtain the editing results of the large model medical knowledge and complete the editing of the large model medical knowledge.

10. The large-scale medical knowledge editing method based on knowledge conflict perception according to claim 9, characterized in that, The expression for the medical knowledge editing result of the large model is: ; ; ; in, This represents the results of editing medical knowledge in a large model. This represents the forward inference output of a large language model. Indicates a medical knowledge query. Represents the initial weights of the large language model. This represents the medical knowledge subspace with the highest matching degree. Indicates the matching threshold. This represents the i-th medical knowledge subspace. This represents the knowledge activation vector of a medical knowledge query sample. This represents the knowledge activation vector for medical knowledge queries during reasoning. Represents the knowledge activation vector. This represents the forward propagation output of the large language model in the part before the editing layer.