A conflict-aware progressive large model knowledge editing method based on statistical covariance constraint

By adopting a progressive knowledge editing method based on statistical covariance constraints, the problems of inaccurate conflict detection and easy crashes in knowledge updates of large language models are solved, thereby improving the robustness and continuity of the model.

CN122133775APending Publication Date: 2026-06-02SHANXI UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANXI UNIV
Filing Date
2026-03-17
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing large language models suffer from problems such as inaccurate conflict detection, catastrophic forgetting during knowledge updates, lack of reflective ability, and complex multi-model collaborative deployment during knowledge updates.

Method used

We adopt a conflict-aware progressive large-scale model knowledge editing method based on statistical covariance constraints. By detecting conflicts through causal tracing, constructing a statistical covariance matrix for flexible optimization, and combining multi-round interactive updates and error reflection mechanisms, we achieve robustness in deep semantic conflict identification and knowledge updates.

Benefits of technology

It achieves more accurate conflict detection, more robust knowledge updates, more adaptive reasoning processes, and a lighter deployment architecture, thereby improving the editing robustness and continuity of large language models and preventing model crashes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122133775A_ABST
    Figure CN122133775A_ABST
Patent Text Reader

Abstract

This invention discloses a conflict-aware progressive knowledge editing method for large language models based on statistical covariance constraints, belonging to the field of knowledge editing and retrieval enhancement generation technology. The method includes the following steps: Step 1, Conflict Detection: Extracting model parameter knowledge triples through causal tracing, parsing external retrieved documents into structured triples, calculating conflict intensity based on temporal and priority weighting, and triggering the knowledge editing process when the conflict intensity exceeds a preset threshold; Step 2, Conflict Knowledge Encoding: Constructing statistical covariance constraints based on the distribution of pre-trained data, obtaining the covariance matrix of model parameters, and calculating its inverse matrix; Step 3, Progressive Knowledge Update; Step 4, Cascaded Verification of Related Knowledge; Step 5, Dynamically Weighted Inference Output. This invention achieves technical effects such as more accurate conflict detection, more robust knowledge updates, adaptive inference processes, safer related knowledge, and a lightweight deployment architecture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of knowledge editing and retrieval enhancement generation technology of large language models, and particularly relates to a conflict-aware progressive large model knowledge editing method based on statistical covariance constraints. Background Technology

[0002] Currently, large language models generally adopt a paradigm of one-time pre-training and static deployment, which fundamentally contradicts the dynamic evolutionary nature of real-world knowledge. To bridge this gap while avoiding the high cost of retraining, model knowledge editing technology has emerged, aiming to accurately correct the parameterized knowledge stored within the model. However, existing model editing technologies still face significant challenges in practical applications: Conflict detection mechanisms are unreliable: Traditional detection mechanisms rely solely on vector similarity retrieval and lack verification mechanisms for deep semantic conflicts between parameter knowledge and external documents. For example, when external documents contain the latest facts while the model parameters still hold outdated knowledge, simple splicing often leads to illusions or logical disconnects in the model.

[0003] Knowledge updates trigger catastrophic forgetting: Existing model editing methods often employ hard-constraint optimization, failing to fully utilize the statistical distribution characteristics of pre-training data. Research shows that after continuously editing a large amount of knowledge, the update vector disrupts the model's original parameter covariance structure, leading to a sharp increase in the model's perplexity on general tasks and ultimately causing its original capabilities to collapse.

[0004] Existing editing methods are mostly single forward updates, lacking reasoning abilities similar to humans' trial-and-error, reflection-and-correction. When the model faces complex reasoning paths, it often cannot correct itself through self-feedback if it makes a single mistake.

[0005] Therefore, there is an urgent need for a single architectural approach that can systematically address issues such as inaccurate conflict detection, disruption of existing structures during updates, and lack of reflective capabilities. Summary of the Invention

[0006] To address the problems of existing technologies, this invention provides a conflict-aware progressive large-scale model knowledge editing method based on statistical covariance constraints. It has the advantages of accurate conflict detection, robust knowledge updates, adaptive reasoning process, secure associated knowledge, and lightweight deployment architecture. It solves the problems of existing technologies, such as lack of deep semantic verification in conflict detection, catastrophic forgetting caused by knowledge updates, lack of reflective correction capabilities in the editing process, susceptibility of associated knowledge to updates, and complex multi-model collaborative deployment.

[0007] This invention is implemented as follows: a conflict-aware progressive large-scale model knowledge editing method based on statistical covariance constraints, comprising the following steps: Step 1, Conflict Detection: Perform meta-verification detection of knowledge conflicts on the input query, extract model parameter knowledge triples through causal tracing, parse the external retrieved document into structured triples, calculate the conflict intensity based on time sequence and priority weighting, and trigger the knowledge editing process when the conflict intensity exceeds the preset threshold; Step 2, Conflict Knowledge Encoding: Construct statistical covariance constraints based on the distribution of pre-trained data, obtain the covariance matrix of model parameters and calculate its inverse matrix, encode the conflict knowledge into an update key matrix, and generate a three-part guidance prompt containing explicit conflict markers, adjudication results and editing instructions. Step 3, Progressive Knowledge Update: Perform multiple rounds of interactive progressive knowledge update. After generating the answer and hidden state in each round, calculate the semantic similarity feedback signal with the externally retrieved document. When the feedback is lower than the threshold, activate the error reflection mechanism to generate a reflection vector. Construct a regularized least squares objective function based on the statistical covariance matrix, calculate the parameter update increment for correction, until the termination condition is met. Step 4, Cascade Validation of Related Knowledge: Contextual knowledge dependency modeling is performed on the updated knowledge, a set of predecessor and successor nodes in the knowledge graph is constructed, the causal effect propagation score of the update on the related nodes is calculated, and the cascade validation process is triggered when the effect score exceeds the preset value. Step 5, Dynamically Weighted Inference Output: Perform robust inference combining generation and prediction, dynamically weight and fuse the model parameterized distribution and retrieval enhancement distribution, score the candidate token set in parallel through the validation model, adopt a speculative decoding strategy to accept tokens that meet the accept-reject sampling conditions, and finally output the retrieval-enhanced context modeling results.

[0008] Compared with the prior art, the beneficial effects of the present invention are as follows: Conflict detection precision: By extracting parameter knowledge triples through causal tracing, and combining time sequence and priority weighting to calculate conflict intensity, the precision of deep semantic conflict identification is achieved; Knowledge update robustness: Construct a flexible optimization objective based on statistical covariance constraints of pre-trained data to avoid the destruction of the original parameter structure of the model by hard constraints; Adaptive reasoning process: Multi-round progressive updates + error reflection mechanism, simulating human trial-and-error-correction logic, improving editing accuracy in complex scenarios; Security of related knowledge: cascading verification of related knowledge and assessment of causal effect propagation to avoid the chain reaction of damage to related knowledge caused by update operations; Lightweight deployment architecture: Single-model architecture eliminates the need for multi-model collaboration, caches and reuses the covariance matrix, reducing deployment costs and computational overhead.

[0009] This method is the first to achieve an organic unity of conflict detection, statistical protection, and progressive guidance within a single architecture, solving the model collapse problem in continuous editing scenarios. This invention integrates previously scattered conflict detection, knowledge protection, and progressive learning technologies. By using statistical covariance constraints, a mathematical tool based on data distribution characteristics, it can more flexibly balance new and old knowledge compared to traditional hard constraints, significantly improving the robustness and continuity of knowledge editing in large language models. Attached Figure Description

[0010] Figure 1 This is a schematic diagram of the overall process provided for an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating the statistical covariance matrix construction and regularization process provided in an embodiment of the present invention; Figure 3 A flowchart illustrating the multi-round interactive progressive update process provided in this embodiment of the invention; Figure 4 A schematic diagram of context-dependent causal modeling provided in an embodiment of the present invention; Figure 5 This is a diagram of the generative prediction fusion architecture provided in an embodiment of the present invention. Detailed Implementation

[0011] To make the technical solution, structural features and achieved technical effects of the present invention clearer and more complete, the technical solution of the present invention will now be described and explained in detail with reference to the accompanying drawings and specific embodiments.

[0012] refer to Figures 1 to 5 As shown, the present invention proposes a conflict-aware progressive large model knowledge editing method based on statistical covariance constraints, which mainly includes five core steps.

[0013] Step 1: Meta-verification detection of knowledge conflicts This step aims to accurately determine whether the editing process needs to be triggered. The specific implementation is as follows: Step 1.1, input query Using causal mediation analysis, the associated facts stored in the model parameters are located, and parameter knowledge triples are extracted. , , ),in Represents the subject entity in parameterized knowledge. Indicates a relationship. Represents the object object in parameterized knowledge; Step 1.2, retrieve external documents Parsed as structured triples ( , , ),in This represents the subject entity in the retrieved knowledge. This refers to the object in the retrieved knowledge; Step 1.3, calculate the conflict intensity score: in This represents the time-series weighting coefficient, with a value range of [0.2, 0.8]. For document timestamp based and time decay factor The exponentially decaying function, This represents the priority weight coefficient, with a value range of [0.3, 0.7]. It is a logarithmic function based on the authority rating of document sources; Step 1.4, when and When it is determined to be a knowledge conflict, among which The threshold for entity differences is set between 0.6 and 0.9. If the conflict intensity threshold is set to 0.5-0.8, the subsequent editing process will be triggered; otherwise, the answer will be generated directly using parameter knowledge.

[0014] Step 2: Constructing Statistical Covariance Constraints This step utilizes statistical features to constrain the update direction while preserving existing knowledge. The specific implementation is as follows: Step 2.1: Obtain the statistical covariance matrix of the model's target layer on the pre-training dataset. ,in This matrix represents the dimension of the model's hidden layers. It characterizes the distribution of the model's existing knowledge in the parameter space. Step 2.2: Regularize and invert the covariance matrix: in This is the ridge regression regularization coefficient, used to ensure numerical stability. It is the identity matrix; Step 2.3: Encode the conflicting knowledge into an update key matrix. ,in Indicates the number of conflicting knowledge items. The maximum value is 100. Each column vector is obtained by RoPE encoding and layer normalization of conflict knowledge triples; Step 2.4, generate guiding prompts: in This represents the statistical characteristic constraint strength coefficient, with a value range of [0.5, 2.0]. This represents the knowledge embedding strength coefficient, with a value range of [0.3, 1.5]. The Embedding() function converts the retrieved document into a 768-dimensional dense vector representation. Step 2.5, validate using the format checker. Includes explicit <conflict> <verdict> <instruction>The three-part structure, in which <conflict>The segment contains a comparison of conflicting triples. <verdict>The segment contains authoritative rulings based on time sequence. <instruction>The segment contains parameter update constraints.

[0015] Step 3: Multi-round interactive progressive knowledge update This step introduces a reflection mechanism, iteratively optimizing parameters, as detailed below: Step 3.1, First Round Generation: The model is based on Generate initial answer At the same time, output the hidden state corresponding to the last token. ; Step 3.2, Feedback Collection: [The following text appears to be incomplete and requires further context: "will..."] and The feedback signal is obtained by performing semantic similarity calculation: in Indicates the state drift amount. This is the drift penalty coefficient, with a value range of [0.1, 0.5]. Step 3.3, Error Reflection: When When the error reflection mechanism is activated, The feedback threshold, with a value range of [0.3, 0.6], is generated by the following method: in It is a three-layer feedforward network with a hidden layer dimension of 1024 and the activation function is GELU; Step 3.4, Parameter Update: In the... At the end of the round, construct a least-squares objective function based on covariance weights and calculate the parameter update amount: in Indicates the first The weight matrix of the feedforward layer in the wheel model. To integrate the target value matrix of the reflection vector, The covariance inverse matrix calculated in step 2.2, is the regularization coefficient, with a value range of [0.01, 0.1]. For learning rate, according to attenuation, The initial value is set to 0.05-0.2. The attenuation factor is set to 0.7-0.9; Step 3.5, Termination Condition: When or ,in The maximum number of interaction rounds, ranging from 3 to 10, is used to output the final answer. .

[0016] Step 4: Contextual knowledge dependency modeling This step prevents the update from causing uncontrollable ripple effects, and is implemented as follows: Step 4.1, update the knowledge triples for this round. Retrieve its predecessor node set in the knowledge graph. and the set of successor nodes Where KG represents an external knowledge graph; Step 4.2, calculate and update the causal effect propagation score for associated nodes: in The semantic similarity weights between nodes are calculated using cosine similarity. If the security threshold is exceeded, cascading verification will be triggered, affecting the nodes. The corresponding knowledge triples are added to the next round. In this context, constraints are imposed on its knowledge to prevent it from being erroneously altered.

[0017] Step 5: Generate Predictive Robust Fusion This step further ensures the robustness of the output during the inference phase, and is implemented as follows: Step 5.1: When generating the t-th token, dynamically calculate the hybrid weights using a gating network. And according to the following formula, the model parameter distribution is fused. With retrieval enhancement distribution : Meanwhile, a speculative decoding strategy is adopted, using a small verification model to score candidate tokens. If the token generated by the main model differs too much from the score of the verification model (i.e. the rejection sampling condition is met), the token is rejected and the process is backtracked to correct it. Finally, the enhanced retrieval result with double verification is output.

[0018] This invention integrates previously fragmented technologies such as conflict detection, knowledge protection, and progressive learning. By using statistical covariance constraints, a mathematical tool based on data distribution characteristics, it can more flexibly balance new and old knowledge compared to traditional hard constraints, significantly improving the robustness and continuity of knowledge editing in large language models.

[0019] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus.

[0020] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.< / instruction> < / verdict> < / conflict> < / instruction> < / verdict> < / conflict>

Claims

1. A conflict-aware progressive large-scale model knowledge editing method based on statistical covariance constraints, characterized in that, Includes the following steps: Step 1, Conflict Detection: Perform meta-verification detection of knowledge conflicts on the input query, extract model parameter knowledge triples through causal tracing, parse the external retrieved document into structured triples, calculate the conflict intensity based on time sequence and priority weighting, and trigger the knowledge editing process when the conflict intensity exceeds the preset threshold; Step 2, Conflict Knowledge Encoding: Construct statistical covariance constraints based on the distribution of pre-trained data, obtain the covariance matrix of model parameters and calculate its inverse matrix, encode the conflict knowledge into an update key matrix, and generate a three-part guidance prompt containing explicit conflict markers, adjudication results and editing instructions. Step 3, Progressive Knowledge Update: Perform multiple rounds of interactive progressive knowledge update. After generating the answer and hidden state in each round, calculate the semantic similarity feedback signal with the externally retrieved document. When the feedback is lower than the threshold, activate the error reflection mechanism to generate a reflection vector. Construct a regularized least squares objective function based on the statistical covariance matrix, calculate the parameter update increment for correction, until the termination condition is met. Step 4, Cascade Validation of Related Knowledge: Contextual knowledge dependency modeling is performed on the updated knowledge, a set of predecessor and successor nodes in the knowledge graph is constructed, the causal effect propagation score of the update on the related nodes is calculated, and the cascade validation process is triggered when the effect score exceeds the preset value. Step 5, Dynamically Weighted Inference Output: Perform robust inference combining generation and prediction, dynamically weight and fuse the model parameterized distribution and retrieval enhancement distribution, score the candidate token set in parallel through the validation model, adopt a speculative decoding strategy to accept tokens that meet the accept-reject sampling conditions, and finally output the retrieval-enhanced context modeling results.

2. The conflict-aware progressive large-scale model knowledge editing method based on statistical covariance constraints according to claim 1, characterized in that, Step 1 specifically involves: Step 1.1, input query Using causal mediation analysis, the associated facts stored in the model parameters are located, and parameter knowledge triples are extracted. , , ),in Represents the subject entity in parameterized knowledge. Indicates a relationship. Represents the object object in parameterized knowledge; Step 1.2, retrieve external documents Parsed as structured triples ( , , ),in This represents the subject entity in the retrieved knowledge. This refers to the object in the retrieved knowledge; Step 1.3, calculate the conflict intensity score: in This represents the time-series weighting coefficient, with a value range of [0.2, 0.8]. For document timestamp based and time decay factor The exponentially decaying function, This represents the priority weight coefficient, with a value range of [0.3, 0.7]. It is a logarithmic function based on the authority rating of document sources; Step 1.4, when and When it is determined to be a knowledge conflict, among which The threshold for entity differences is set between 0.6 and 0.

9. If the conflict intensity threshold is set to 0.5-0.8, the subsequent editing process will be triggered; otherwise, the answer will be generated directly using parameter knowledge.

3. The conflict-aware progressive large-scale model knowledge editing method based on statistical covariance constraints according to claim 2, characterized in that, Step 2 specifically involves: Step 2.1: Obtain the statistical covariance matrix of the model's target layer on the pre-training dataset. ,in This matrix represents the dimension of the model's hidden layers and characterizes the distribution of the model's original knowledge in the parameter space. Step 2.2: Regularize and invert the covariance matrix: in This is the ridge regression regularization coefficient, used to ensure numerical stability. It is the identity matrix; Step 2.3: Encode the conflicting knowledge into an update key matrix. ,in Indicates the number of conflicting knowledge items. The maximum value is 100. Each column vector is obtained by RoPE encoding and layer normalization of conflict knowledge triples; Step 2.4, generate guiding prompts: in This represents the statistical characteristic constraint strength coefficient, with a value range of [0.5, 2.0]. This represents the knowledge embedding strength coefficient, with a value range of [0.3, 1.5]. The Embedding() function converts the retrieved document into a 768-dimensional dense vector representation. Step 2.5, validate using the format checker. Includes explicit <conflict> <verdict> <instruction>The three-part structure, in which <conflict>The segment contains a comparison of conflicting triples. <verdict>The segment contains authoritative rulings based on time sequence. <instruction> The segment contains parameter update constraints.< / instruction> < / verdict> < / conflict> < / instruction> < / verdict> < / conflict> 4. The conflict-aware progressive large-scale model knowledge editing method based on statistical covariance constraints according to claim 3, characterized in that, Step 3 specifically involves: Step 3.1, First Round Generation: The model is based on Generate initial answer At the same time, output the hidden state corresponding to the last token. ; Step 3.2, Feedback Collection: [The following text appears to be incomplete and requires further context: "will..."] and The feedback signal is obtained by performing semantic similarity calculation: in Indicates the state drift amount. This is the drift penalty coefficient, with a value range of [0.1, 0.5]. Step 3.3, when When the error reflection mechanism is activated, The feedback threshold, with a value range of [0.3, 0.6], is generated by the following method: in It is a three-layer feedforward network with a hidden layer dimension of 1024 and the activation function is GELU; Step 3.4, Parameter Update: In the... At the end of the round, construct a least-squares objective function based on covariance weights and calculate the parameter update amount: in Indicates the first The weight matrix of the feedforward layer in the wheel model. To integrate the target value matrix of the reflection vector, The covariance inverse matrix calculated in step 2.2, is the regularization coefficient, with a value range of [0.01, 0.1]. For learning rate, according to attenuation, The initial value is set to 0.05-0.

2. The attenuation factor is set to 0.7-0.9; Step 3.5, Termination Condition: When or ,in The maximum number of interaction rounds, ranging from 3 to 10, is used to output the final answer. .

5. The conflict-aware progressive large-scale model knowledge editing method based on statistical covariance constraints according to claim 4, characterized in that, Step 4 specifically involves: Step 4.1 Update the knowledge triples for this round. Retrieve its predecessor node set in the knowledge graph. and the set of successor nodes Where KG represents an external knowledge graph; Step 4.2, calculate and update the causal effect propagation score for associated nodes: in The semantic similarity weight is calculated using cosine similarity and its value ranges from [0,1]. This represents the hidden representation of associated nodes in the model; Step 4.3, when Cascading verification is triggered at any time, where The effect threshold is defined, with a value range of [0.3, 0.5]. and The knowledge triples corresponding to the nodes in the data will be included in the next round. The construction was performed, and a covariance weighted constraint term was added. ,in For cascaded knowledge key matrix, This is the threshold for cascade constraints.

6. The conflict-aware progressive large-scale model knowledge editing method based on statistical covariance constraints according to claim 5, characterized in that, Step 5 specifically involves: Step 5.1: When generating the t-th token, fuse the model parameterized distribution according to the following formula. With retrieval enhancement distribution : in For dynamic weights, , For the sigmoid function, The learnable parameter vector is initialized by sampling from a standard normal distribution. The prior probability of the token; Step 5.2, process the generated candidate token set Through a small validation model Perform parallel scoring: in For a small-scale validation model, [;] indicates vector concatenation, and the VerificationScore ranges from [0,1]. Step 5.3: Using a speculative decoding strategy, select tokens that meet the accept-reject sampling conditions. in Sample from a uniform distribution Uniform(0,1), The proposed distribution takes the value of the top-k sampling distribution, where k ranges from 5 to 20.

7. The conflict-aware progressive large-scale model knowledge editing method based on statistical covariance constraints according to claim 1, characterized in that, The method is implemented using a single-model architecture, eliminating the need for multi-model collaboration. All computational steps are completed on a single GPU device. The statistical covariance matrix is ​​calculated and cached during the preprocessing stage and reused. Subsequent editing requests directly call the cached matrix.