Fidelity-based iterative text refinement method, system, device, and medium
By employing an iterative text refinement method and utilizing a progressive denoising language model and a content fidelity evaluation module, the problems of irreversibility, insufficient fidelity, and redundancy in generated text in existing technologies are solved, thus achieving high-quality automated text generation.
Patent Information
- Application Number
- CN202511195539.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-26
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2045-08-26
AI Technical Summary
Existing automatic text generation technologies suffer from problems such as one-way irreversible generation, insufficient fidelity, content illusion, difficulty in guaranteeing structure and conciseness, and lack of automated correction and refinement mechanisms when dealing with tasks with high requirements for structure and factual accuracy, resulting in low quality of generated text.
An iterative text refinement method based on fidelity is adopted. Through a progressive denoising language model and a content fidelity evaluation module, multiple iterations are performed to identify and correct text fragments that lack source information support, have redundant content, or are logically incomplete, until the preset quality standard is met.
It significantly improves the fidelity, conciseness, and coherence of the generated text, ensuring that the output text is highly faithful to the source information, with a clear structure and no redundancy, thus achieving high-quality automated text generation.
Smart Images

Figure CN120706380B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of natural language processing (NLP) and artificial intelligence (AI), specifically to an iterative text refinement method, system, device, and medium based on fidelity. Background Technology
[0002] Automatic text generation aims to extract core content from structured or unstructured source information and generate a concise, coherent text that remains faithful to the original. This technology has significant application value in scenarios such as legal document analysis, debate and interpretation of government documents, product review integration, and academic literature reviews. Currently, text generation technology based on large language models (LLMs) has made significant progress. However, existing technologies still face the following major challenges when handling tasks with extremely high requirements for structure and factual accuracy:
[0003] ① Unidirectional generation and irreversibility: Most existing models adopt an autoregressive decoding strategy, which generates text one by one from left to right, word by word. If factual errors, logical deviations, or omissions of key information occur in the early stages of generation in this unidirectional mode, it is difficult or even impossible to correct them in subsequent texts, leading to the accumulation of errors.
[0004] ② Insufficient fidelity and content "illusion": Common generation strategies such as greedy decoding or beam search tend to select locally optimal high-probability terms. This can easily lead to the model generating seemingly fluent content that does not conform to the facts of the source information, i.e., model illusion. In many application scenarios, any statement that deviates from the source information is unacceptable.
[0005] ③ Difficulty in guaranteeing structure and simplicity: High-quality generated text not only requires accurate content, but also a clear and highly concise structure (avoiding redundancy). Existing models lack effective mechanisms to control the redundancy of generated content, and it is also difficult to ensure that all key information is fully and non-repetitively covered.
[0006] ④ Lack of automated correction and refinement mechanisms: Once the text is generated, existing technologies typically do not provide a systematic, automated post-processing correction and refinement mechanism. Any modifications to the generated results heavily rely on manual intervention, which is costly and inefficient.
[0007] The aforementioned problems severely restrict the reliability and usability of automated text generation technology in practical applications. Therefore, overcoming the limitations of unidirectional generation and achieving self-evaluation and iterative optimization of the generated text to ensure the high fidelity, conciseness, and coherence of the final output is a pressing technical problem that needs to be solved. Summary of the Invention
[0008] The technical objective of this invention is to provide a fidelity-based iterative text refinement method, system, device, and medium to address the limitations of unidirectional generation, achieve self-evaluation and iterative optimization of the generated text, and thus ensure the high fidelity, conciseness, and coherence of the final output.
[0009] The technical objective of this invention is achieved as follows: an iterative text refinement method based on fidelity, the specific method of which is as follows:
[0010] Collect a set of structured source information; wherein the structured source information set includes at least one core viewpoint and corresponding supporting materials;
[0011] Initialize a target text sequence, the length of which is determined by the estimated target text length, and fill it entirely with special [MASK] tokens;
[0012] The process enters an iterative refinement loop. Each iteration generates the following: a pre-trained stepwise denoising language model is used to denoise the target text sequence, generating a clearer intermediate version of the text; the content fidelity evaluation module evaluates the segments in the intermediate version of the text, identifying segments lacking source information support, content redundancy, or logical incompleteness; based on the evaluation results of the content fidelity evaluation module, the identified segments lacking source information support, content redundancy, or logical incompleteness are selectively masked for reconstruction.
[0013] Repeat the iterative generation process until the preset number of iterations is reached or the text quality meets the convergence condition, and obtain the refined target text.
[0014] As a preferred approach, the underlying architecture of the pre-trained progressive denoising language model is a Transformer-based model used to capture long-range dependencies in the text.
[0015] The pre-trained progressive denoising language model is trained using a mask prediction objective function. During training, a portion of the words in the input text are randomly masked, i.e., replaced with [MASK]. The progressive denoising language model is then required to predict and recover the original masked words based on the unmasked context. The loss function is negative log-likelihood, with the following specific form:
[0016] ;
[0017] in, Indicates the noise reduction loss; This represents the original, clear training text; Represents the set of words that are randomly masked; Indicates unmasked word elements; Indicates complement; Represents a subset; Represents the set of words that are covered; Indicates uncovered contextual words; Represents the set of source information; This represents the probability distribution of masked words predicted by the progressive denoising language model. It is the mathematical expectation symbol, representing the average value calculated over all possible random occlusion scenarios; This means that by applying multiple different random covers to the same text, the average loss is calculated for all cases, ensuring that the progressive denoising language model learns general repair capabilities rather than memories specific to a particular cover pattern. By minimizing the loss function, the progressive denoising language model learns contextual understanding and content repair capabilities.
[0018] Preferably, the denoising process in the iterative refinement loop is a reverse evolutionary process. The goal of the denoising process is to input the current masked text sequence and the source information set as guiding conditions into the progressive denoising language model. The progressive denoising language model predicts the most suitable lexical unit at the [MASK] position and optimizes the generated lexical units, sampling to obtain a clearer intermediate version of the text. The formula is as follows:
[0019] ;
[0020] in, Indicates time step The text state is a text sequence that is partially clear and partially obscured; This represents the set of source information used as conditions, guiding the gradual denoising language model to generate text consistent with the content of the source information throughout the process; Indicates the total number of iterations; This represents the core content learned by the progressively denoised language model, namely... The backtransfer kernel function represents the learned backtransfer kernel function. It is a probability distribution with parameter ϕ, used to handle text with a current noise level exceeding a set threshold. and source information set Under the given conditions, calculate all possible intermediate versions of text with noise levels below a set threshold. The probability; the ~ symbol indicates "sampling from," meaning the generation process is probabilistic, from... The most probable result is randomly selected from the defined probability distribution and used as the output of this denoising operation. .
[0021] As a preferred option, the content fidelity assessment module is evaluated using a supervised verification classifier and / or a logic reasoning module based on a large language model;
[0022] Among them, the supervised verification classifier is used to determine whether the text fragment to be evaluated is fully supported by the core viewpoints and supporting materials in the source information;
[0023] The logic reasoning module based on a large language model uses guided reasoning to determine the support, redundancy, or contradiction relationships between text fragments and source information.
[0024] More preferably, the fidelity prediction formula for the supervised check classifier is as follows:
[0025] ;
[0026] in, Indicates fidelity; A text fragment representing an intermediate version of the text; This indicates the core viewpoint of the source text associated with the text fragment in the intermediate version. A collection of supporting material associated with text fragments in the intermediate version of the text; This indicates the core viewpoint of the source text that will be associated with the text fragments in the intermediate version of the text. The set of supporting materials associated with text fragments of the intermediate version of the text spliced together Input; This represents a pre-trained RoBERTa or similar architecture classifier that outputs a score between 0 and 1, indicating... quilt Supported fidelity level; The Sigmoid activation function is used to output a probability value representing the fidelity level, that is, to map any real number to the interval (0, 1), thereby converting the output of the classifier into a probability value.
[0027] As a preferred approach, selective masking is used to assess the fidelity score of each token output by the content fidelity evaluation module during reconstruction. The guided reconstruction controller determines the reconstruction region for the next iteration, and the fidelity score of a lexical unit. The lower the value, the more likely the corresponding lexical unit is to be incorrect, unsupported, or redundant, and thus the higher the probability that the corresponding lexical unit will be masked again for reconstruction. The higher the probability, the more likely the word will be to be masked and reconstructed. The formula is as follows:
[0028] ;
[0029] in, The symbol "proportional to" means that each lexical unit is masked in preparation for reconstruction to reach a certain probability. and Proportional relationship; This is a core element, ensuring that lemmas with lower fidelity are more likely to be selected for reconstruction; It is a small random perturbation term used to increase exploratoryness and prevent the progressively denoised language model from getting stuck in local optima; Indicate uniformly distributed sampling terms to increase exploration diversity; This represents the balance factor.
[0030] Better still, the guided reconfiguration controller is based on probability. The distribution selects the worst-quality tokens by a set proportion and restores them to [MASK] tokens, forming a new text sequence to be processed.
[0031] A fidelity-based iterative text refinement system is provided to implement the fidelity-based iterative text refinement method described above. The system includes:
[0032] The information acquisition unit is used to acquire a set of structured source information; wherein the structured source information set includes at least one core viewpoint and corresponding supporting materials;
[0033] The text initialization unit is used to initialize a target text sequence. The length of the target text sequence is determined based on the estimated target text length and is filled entirely with special [MASK] tokens.
[0034] Iterative training units are used to enter iterative refining loops;
[0035] The text acquisition unit is used to repeatedly iterate the generation process until the preset number of iterations is reached or the text quality meets the convergence condition, and to obtain the refined target text.
[0036] The iterative training unit includes:
[0037] The denoising module is used to denoise the target text sequence using a pre-trained progressive denoising language model, generating a clearer intermediate version of the text.
[0038] The content fidelity assessment module is used to evaluate fragments in intermediate version text and identify fragments that lack source information support, have redundant content, or are logically incomplete.
[0039] The selective masking module is used to selectively mask out identified segments that lack source information support, have redundant content, or are logically incomplete, based on the evaluation results of the content fidelity assessment module, in order to facilitate reconstruction.
[0040] An electronic device includes: a memory and at least one processor;
[0041] The memory contains computer programs;
[0042] The at least one processor executes the computer program stored in the memory, causing the at least one processor to perform the fidelity-based iterative text refining method described above.
[0043] A computer-readable storage medium storing a computer program that can be executed by a processor to implement the fidelity-based iterative text refining method described above.
[0044] The fidelity-based iterative text refining method, system, device, and medium of the present invention have the following advantages:
[0045] (i) This invention uses a non-autoregressive stepwise denoising model as the generation basis, constructs text through a multi-step process, and introduces a core "content fidelity evaluation module". In each iteration, the content fidelity evaluation module actively evaluates the generated text fragments, identifies content that is inconsistent with the source information, lacks supporting evidence, is redundant or incomplete, and then uses the evaluation results to guide a "selective reconstruction controller" to mark problematic text fragments and regenerate them in a targeted manner. Through the closed-loop iteration of "evaluation-reconstruction", the fidelity, conciseness and overall quality of the generated text can be significantly improved, making it more accurate, reliable and structured, thus solving the problem of low quality of automatically generated text (especially argument summaries) in the prior art.
[0046] (ii) The core of this invention is the introduction of a "fidelity-guided refining loop". Instead of generating the text all at once, it iterates through multiple iterations to gradually denoise and refine the final text from a fuzzy, content-free state (a completely covered sequence). Each iteration is guided by a dedicated "content fidelity evaluation module", which overcomes the limitations of unidirectional generation and enables self-evaluation and iterative optimization of the generated text, thereby ensuring that the final output is highly faithful, concise and coherent.
[0047] (iii) This invention uses a non-autoregressive stepwise denoising language model as the generation backbone. The stepwise denoising language model starts from a sequence completely covered by special "[MASK]" words and gradually predicts and replaces the covered words in multiple time steps until the complete text is generated. This iterative characteristic provides a natural window for modification and refinement during the generation process.
[0048] (iv) After each generation iteration, the content fidelity evaluation module of this invention will conduct a comprehensive "physical examination" of the currently generated intermediate text. Its main task is to evaluate whether each segment in the text is truly supported by the input source information. The content fidelity evaluation module aims to identify three types of problems: ① No supporting content: Some statements in the text cannot be found in the source information with any direct or indirect basis; ② Redundant content: There are repeated or highly similar expressions in the text; ③ Incomplete or logically broken: The text fails to fully convey a key piece of information, or the logical relationship between the information is unclear.
[0049] (v) The content fidelity assessment module of the present invention can be implemented by two complementary technologies: one is to train a classifier through supervised learning to directly judge the fidelity of the text fragment; the other is to conduct a deeper logical and factual analysis of the text fragment through the chain-of-thought reasoning ability of a large language model.
[0050] (vi) The evaluation results of the content fidelity evaluation module of the present invention will directly guide the next refining operation. Based on the problem degree of each word or text fragment, a reconstruction probability is calculated. The lower the fidelity and the greater the problem of the fragment, the higher the probability that it will be covered up again and wait for the next round of regeneration. In this way, the model can focus its "attention" and computing resources on correcting the most defective parts of the text, rather than blindly or randomly modifying them.
[0051] (vii) This invention transforms the text generation process from a linear and irreversible process into a dynamic and self-improving optimization process through a closed-loop iteration of “generation-evaluation-labeling-reconstruction”. Each iteration improves the quality of the text, gradually eliminating unfaithful and redundant content, filling in missing key information, and ultimately producing a text that meets high standards.
[0052] (viii) Compared with the prior art, the present invention also has the following significant advantages:
[0053] ① High fidelity: Through fidelity assessment and iterative correction, the illusion of content is effectively eliminated, ensuring that every sentence in the text is rooted in the source information;
[0054] ② High conciseness: The redundancy detection mechanism can identify and merge duplicate information, making the text more concise;
[0055] ③ Controllability and interpretability: The iterative process makes the text formation path clearer, and the conclusions of the evaluation module also provide an interpretable basis for the quality of the text;
[0056] ④ Structural integrity: Through comprehensive evaluation, we ensured that all key information was covered, maintaining the integrity of the content structure. Attached Figure Description
[0057] The invention will be further described below with reference to the accompanying drawings.
[0058] Appendix Figure 1 This is a flowchart of an iterative text refinement method based on fidelity. Detailed Implementation
[0059] The following detailed description of the fidelity-based iterative text refining method, system, device, and medium of the present invention is provided with reference to the accompanying drawings and specific embodiments.
[0060] Example 1: As shown in the attached document Figure 1 As shown in the figure, this embodiment provides an iterative text refinement method based on fidelity, which is as follows:
[0061] S1. Collect a set of structured source information; wherein, the structured source information set includes at least one core viewpoint and corresponding supporting materials;
[0062] S2. Initialize a target text sequence. The length of the target text sequence is determined based on the estimated target text length, and it is filled entirely with special [MASK] tokens.
[0063] S3. Enter the iterative refining cycle. The specific generation process of each iteration is as follows:
[0064] S301. Using a pre-trained progressive denoising language model, the target text sequence is denoised to generate a clearer intermediate version of the text.
[0065] S302. Evaluate the segments in the intermediate version text through the content fidelity assessment module to identify segments that lack source information support, have redundant content, or are logically incomplete.
[0066] S303. Based on the evaluation results of the content fidelity assessment module, selectively cover up the identified segments that lack source information support, have redundant content, or are logically incomplete for reconstruction.
[0067] S4. Repeat the iterative generation process until the preset number of iterations is reached or the text quality meets the convergence condition, and obtain the refined target text.
[0068] The underlying architecture of the pre-trained progressive denoising language model in step S301 of this embodiment is a Transformer-based model used to capture long-distance dependencies in text.
[0069] The pre-trained progressive denoising language model is trained using a mask prediction objective function. During training, a portion of the words in the input text are randomly masked, i.e., replaced with [MASK]. The progressive denoising language model is then required to predict and recover the original masked words based on the unmasked context. The loss function is negative log-likelihood, with the following specific form:
[0070] ;
[0071] in, Indicates the noise reduction loss; This represents the original, clear training text; Represents the set of words that are randomly masked; Indicates unmasked word elements; Indicates complement; Represents a subset; Represents the set of words that are covered; Indicates uncovered contextual words; Represents the set of source information; This represents the probability distribution of masked words predicted by the progressive denoising language model. It is the mathematical expectation symbol, representing the average value calculated over all possible random occlusion scenarios; This means that by applying multiple different random covers to the same text, the average loss is calculated for all cases, ensuring that the progressive denoising language model learns general repair capabilities rather than memories specific to a particular cover pattern. By minimizing the loss function, the progressive denoising language model learns contextual understanding and content repair capabilities.
[0072] The stepwise denoising language model in this embodiment has non-autoregressive properties: it can predict and generate all lexical units in a text sequence in parallel, rather than generating them word by word, which makes it possible to modify and refine them at any position.
[0073] In this embodiment, the denoising process in the iterative refining loop of step S301 is a reverse evolution process. The goal of the denoising process is to input the current masked text sequence and the source information set as guiding conditions into the progressive denoising language model. The progressive denoising language model predicts the most suitable lexical unit at the [MASK] position and optimizes the generated lexical units, sampling to obtain a clearer intermediate version of the text. The formula is as follows:
[0074] ;
[0075] in, Indicates time step The text state is a text sequence that is partially clear and partially obscured; This represents the set of source information used as conditions, guiding the gradual denoising language model to generate text consistent with the content of the source information throughout the process; Indicates the total number of iterations; This represents the core content learned by the progressively denoised language model, namely... The backtransfer kernel function represents the learned backtransfer kernel function. It is a probability distribution with parameter ϕ, used to handle text with a current noise level exceeding a set threshold. and source information set Under the given conditions, calculate all possible intermediate versions of text with noise levels below a set threshold. The probability; the ~ symbol indicates "sampling from," meaning the generation process is probabilistic, from... The most probable result is randomly selected from the defined probability distribution and used as the output of this denoising operation. .
[0076] In this embodiment, the content fidelity evaluation module in step S303 performs the evaluation through a supervised verification classifier and / or a logic reasoning module based on a large language model.
[0077] Among them, the supervised verification classifier is used to determine whether the text fragment to be evaluated is fully supported by the core viewpoints and supporting materials in the source information;
[0078] The logic reasoning module based on a large language model uses guided reasoning to determine the support, redundancy, or contradiction relationships between text fragments and source information. Specifically, when using this module, a prompt is constructed, similar to: "Please judge the following text fragment..." Can it be expressed by the following viewpoints? and materials Completely, partially, or completely unsupported? Please provide a detailed reasoning process. After the analysis, you must provide a quantitative score in the following format: 'Fidelity Score: [a value between 0.0 and 1.0]'. Then send this prompt to a large language model (such as Deepseek) and parse its returned conclusions, reasons, and formatted fidelity score.
[0079] The fidelity prediction formula for the supervised check classifier in this embodiment is as follows:
[0080] ;
[0081] in, Indicates fidelity; A text fragment representing an intermediate version of the text; This indicates the core viewpoint of the source text associated with the text fragment in the intermediate version. A collection of supporting material associated with text fragments in the intermediate version of the text; This indicates the core viewpoint of the source text that will be associated with the text fragments in the intermediate version of the text. The set of supporting materials associated with text fragments of the intermediate version of the text spliced together Input; This represents a pre-trained RoBERTa or similar architecture classifier that outputs a score between 0 and 1, indicating... quilt Supported fidelity level; The Sigmoid activation function is used to output a probability value representing the fidelity level, that is, to map any real number to the interval (0, 1), thereby converting the output of the classifier into a probability value.
[0082] In this embodiment, during selective masking in preparation for reconstruction, the fidelity score of each token output by the content fidelity evaluation module is used. The guided reconstruction controller determines the reconstruction region for the next iteration, and the fidelity score of a lexical unit. The lower the value, the more likely the corresponding lexical unit is to be incorrect, unsupported, or redundant, and thus the higher the probability that the corresponding lexical unit will be masked again for reconstruction. The higher the probability, the more likely the word will be to be masked and reconstructed. The formula is as follows:
[0083] ;
[0084] The ∝ symbol represents "proportional to", meaning that each lexical unit is masked in preparation for reconstruction to reach a certain probability. and Proportional relationship; This is a core element, ensuring that lemmas with lower fidelity are more likely to be selected for reconstruction; It is a small random perturbation term used to increase exploratoryness and prevent the progressively denoised language model from getting stuck in local optima; Indicate uniformly distributed sampling terms to increase exploration diversity; This represents the balance factor.
[0085] In this embodiment, the guided reconfiguration controller operates based on probability. The distribution selects the worst-quality tokens by a set proportion and restores them to [MASK] tokens, forming a new text sequence to be processed.
[0086] A fidelity-based iterative text refinement system is provided to implement the fidelity-based iterative text refinement method described above. The system includes:
[0087] The information acquisition unit is used to acquire a set of structured source information; wherein the structured source information set includes at least one core viewpoint and corresponding supporting materials;
[0088] The text initialization unit is used to initialize a target text sequence. The length of the target text sequence is determined based on the estimated target text length and is filled entirely with special [MASK] tokens.
[0089] Iterative training units are used to enter iterative refining loops;
[0090] The text acquisition unit is used to repeatedly iterate the generation process until the preset number of iterations is reached or the text quality meets the convergence condition, and to obtain the refined target text.
[0091] The iterative training unit includes:
[0092] The denoising module is used to denoise the target text sequence using a pre-trained progressive denoising language model, generating a clearer intermediate version of the text.
[0093] The content fidelity assessment module is used to evaluate fragments in intermediate version text and identify fragments that lack source information support, have redundant content, or are logically incomplete.
[0094] The selective masking module is used to selectively mask out identified segments that lack source information support, have redundant content, or are logically incomplete, based on the evaluation results of the content fidelity assessment module, in order to facilitate reconstruction.
[0095] This embodiment aims to transform a set of structured source information, such as {(core viewpoint 1, [supporting material 1A, supporting material 1B]), (core viewpoint 2, [supporting material 2A])}, into a high-quality text.
[0096] Step 1: Input and Initialization: The system receives structured source information (set) provided by the user. ;in, It is the first One core viewpoint This is a collection of materials supporting this viewpoint. Simultaneously, the system initializes a target text sequence. The length of this sequence is determined based on the estimated target text length and is entirely filled with special [MASK] tokens. Here, represents the total number of iterations.
[0097] Step 2: Entering the Iterative Refining Loop: The system initiates a refining cycle from... arrive The loop. In each iteration step In the middle, perform the following operations:
[0098] (1) Progressive Denoising Generation: This step is performed by a pre-trained progressive denoising language model. This model does not refer to a specific commercially available model, but rather to a class of deep learning models built based on specific principles. Its core characteristics are:
[0099] ① Model architecture: Its underlying architecture is usually based on the Transformer model, similar to BERT or GPT, to effectively capture long-distance dependencies in the text.
[0100] ② Training Objective: Unlike traditional language models, its training objective is not to predict the next word, but to learn to "de-noise" or "repair" partially damaged or masked text. Specifically, it is trained using a mask prediction objective function. During training, the system randomly masks a portion of the words in the input text, replacing them with [MASK], and then requires the model to predict and recover these masked original words based on the unmasked context. Its loss function typically uses negative log-likelihood, which takes the following form:
[0101] ;
[0102] in, Indicates the noise reduction loss; This represents the original, clear training text; Represents the set of words that are randomly masked; Indicates unmasked word elements; Indicates complement; Represents a subset; Represents the set of words that are covered; Indicates uncovered contextual words; Represents the set of source information; This represents the probability distribution of masked words predicted by the progressive denoising language model. It is the mathematical expectation symbol, representing the average value calculated over all possible random occlusion scenarios; This means that by applying multiple different random covers to the same text, the average loss is calculated for all cases, ensuring that the progressive denoising language model learns general repair capabilities rather than memories specific to a particular cover pattern. By minimizing the loss function, the progressive denoising language model learns contextual understanding and content repair capabilities.
[0103] ③ Non-autoregressive property: It can predict and generate all lexical units in a text sequence in parallel, rather than generating them word by word, which makes it possible to modify and refine them at any position.
[0104] In practical implementation, the system will use the current masked text sequence. and the source information data that serves as the guiding condition. These are input into the model. The model predicts the most appropriate word at the [MASK] position and optimizes the generated words to output a slightly clearer version of the text. This process can be formally described as sampling from a learned, backward-evolving distribution:
[0105] ;
[0106] in, Indicates at time step The text state is a sequence that is partially clear and partially obscured. This represents the set of source information used as conditions, guiding the model to generate text consistent with the content of the source information throughout the process. The core capability learned by the model, namely the "backward transition kernel function," is a probability distribution with parameter ϕ. Its function is to: given text with a high current noise level... and source information set Under the given conditions, calculate all possible texts with lower noise levels. The probability. The ~ symbol means "sample from," implying that the generation process is probabilistic, and the system draws from... The most probable result is randomly selected from the defined probability distribution and used as the output of this denoising operation. .
[0107] In the initial step ( When the entire sequence is [MASK], the model will be entirely based on the source information set. Generate a first draft of the text.
[0108] (2) Content fidelity assessment module: generated intermediate text It is immediately sent to the content fidelity assessment module for evaluation. The content fidelity assessment evaluates every sentence or meaningful text segment in the text. Perform the analysis.
[0109] If a supervised check classifier is used: for fragments The system will find its most relevant source core viewpoints. and supporting materials Then, concatenate them into an input. It is fed into a pre-trained RoBERTa or similar architecture classifier. Classifier It will output a score between 0 and 1, representing the segment. quilt The supported fidelity level. The formula for calculation is:
[0110] ;
[0111] in, The Sigmoid activation function maps any real number to the interval (0, 1), thus converting the classifier's output into a probability value.
[0112] If the LLM logic reasoning module is used: the system will generate a prompt, similar to: "Please judge the following text fragment." Can it be expressed by the following viewpoints? and materials Completely, partially, or completely unsupported? Please provide a detailed reasoning process. After the analysis, you must provide a quantitative score in the following format: 'Fidelity Score: [a value between 0.0 and 1.0]'. Then send this prompt to a large language model (such as Deepseek) and parse its returned conclusions, reasons, and formatted fidelity score.
[0113] Combination mode: The system can combine the two methods mentioned above to obtain more robust evaluation results.
[0114] (3) Guided selective reconstruction: The content fidelity assessment module evaluates each word unit w in the text. j A fidelity score was generated for each. ∈[0,1]. The guided reconstruction controller uses these scores to determine the reconstruction region for the next iteration. A lexical fidelity score. The lower the value, the more likely it is to be erroneous, unsupported, or redundant, and therefore the lower the probability that it will be re-masked for reconstruction. The higher the probability, the better. This probability can be calculated as follows:
[0115] ;
[0116] in, The symbol "proportional to" means that the probability of being reconstructed is proportional to the expression on the right. This is a core element, ensuring that low-scoring words are selected with a high probability. This is a small random perturbation term used to increase exploratory power and prevent the model from getting trapped in local optima. Based on this probability distribution, the controller selects a certain proportion (e.g., 20%) of the "worst quality" tokens and restores them to [MASK] tokens, forming a new sequence to be processed. .
[0117] Step 3: Loop and Output: The system returns to step 2, using the new, selectively reconstructed sequence. Begin the next round of the "generate-evaluate-tag-reconstruct" cycle. This process repeats continuously, with each iteration refining the text based on the previous one, gradually fixing defects. The cycle continues until a preset number of iterations is reached. The loop terminates when (e.g., after 10 iterations) or when the text quality (assessed by the average score of the evaluation module) stabilizes and no longer improves.
[0118] At this point, the system outputs the final text version. This version is the result of multiple rounds of iterative optimization, and it has a high degree of fidelity, simplicity and consistency.
[0119] Through the above implementation methods, the present invention transforms the originally black-box, one-off text generation process into a transparent, controllable, and iteratively refined engineering process, thereby fundamentally improving the quality of automatically generated text.
[0120] Example 2: This example also provides an electronic device, including: a memory and a processor;
[0121] The memory stores the instructions executed by the computer.
[0122] The processor executes computer execution instructions stored in the memory, causing the processor to perform the fidelity-based iterative text refining method in any embodiment of the present invention.
[0123] The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor can be a microprocessor or any conventional processor.
[0124] Memory is used to store computer programs and / or modules. The processor implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory, and by accessing data stored in the memory. Memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, at least one application program required for a function, etc.; the data storage area can store data created based on the use of the terminal, etc. In addition, memory can also include high-speed random access memory, and can also include non-volatile memory, such as hard disks, RAM, plug-in hard disks, smart memory cards (SMC), secure digital cards (SD cards), flash memory cards, at least one disk storage device, flash memory devices, or other volatile solid-state storage devices.
[0125] Example 3: This example also provides a computer-readable storage medium storing multiple instructions, which are loaded by a processor to cause the processor to execute the fidelity-based iterative text refinement method according to any embodiment of the present invention. Specifically, a system or apparatus equipped with a storage medium may be provided, on which software program code implementing the functions of any of the above embodiments is stored, and the computer (or CPU or MPU) of the system or apparatus may read and execute the program code stored in the storage medium.
[0126] In this case, the program code read from the storage medium can itself implement the function of any of the above embodiments, and therefore the program code and the storage medium storing the program code constitute part of the present invention.
[0127] Storage media embodiments for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RYM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, program code can be downloaded from a server computer via a communication network.
[0128] Furthermore, it should be clear that not only can the program code read by the computer be executed, but also the operating system or other components operating on the computer can be instructed based on the program code to perform some or all of the actual operations, thereby realizing the function of any of the embodiments described above.
[0129] Furthermore, it is understood that the program code read from the storage medium is written to the memory set in the expansion board inserted into the computer or to the memory set in the expansion unit connected to the computer. Then, based on the instructions of the program code, the CPU or other components installed on the expansion board or expansion unit execute some and all of the actual operations, thereby realizing the function of any of the embodiments described above.
[0130] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A fidelity-based iterative text condensation method, characterized in that, The method specifically comprises the following steps: Collect a set of structured source information; wherein the structured source information set includes at least one core view and corresponding supporting materials; Initialize a target text sequence, the length of the target text sequence is determined according to the estimated target text length, and all are filled with special [MASK] word elements; Enter an iterative refining loop, and each iteration generates a process, which specifically comprises: using a pre-trained step-by-step denoising language model to denoise the target text sequence to generate an intermediate version of the text; through the content fidelity evaluation module, the fragments in the intermediate version of the text are evaluated to identify fragments that lack source information support, content redundancy or logical incompleteness; according to the evaluation result of the content fidelity evaluation module, the identified fragments that lack source information support, content redundancy or logical incompleteness are selectively covered for reconstruction; Repeat the iteration generation process until the preset number of iterations is reached or the text quality meets the convergence condition to obtain the refined target text; Wherein, the pre-trained step-by-step denoising language model is trained by a mask prediction target function, and during training, a part of the input text is randomly covered, that is, replaced by [MASK], and then the step-by-step denoising language model is required to predict and restore the original word element according to the context that has not been covered. The loss function uses negative log likelihood, and the form is specifically as follows: ; wherein, denotes the denoising loss; denotes the original clean training text; denotes the set of wordpieces that are randomly masked; denotes the wordpieces that are not masked; denotes the complement; denotes the subset; denotes the set of wordpieces that are masked; denotes the context wordpieces that are not masked; denotes the source information set; denotes the probability distribution of the masked wordpiece predicted by the stepwise denoising language model; is the mathematical expectation symbol, denoting the average value calculated for all possible random masking cases; denotes the average value of the loss calculated for all cases by performing multiple different random maskings on the same text, ensuring that the stepwise denoising language model learns general repair capabilities rather than memorizing specific masking patterns. By minimizing the loss function, the stepwise denoising language model can learn contextual understanding and content repair capabilities; The denoising processing in the iterative refining cycle is a reverse evolution process. The denoising processing aims to input the current text sequence with covering and the source information set as a guide condition into a step-by-step denoising language model. The step-by-step denoising language model predicts the most suitable word in the [MASK] position and optimizes the generated word. An intermediate version of the text is obtained by sampling , as follows: ; wherein, denotes the time step , the text state is a partially clear, partially covered text sequence; denotes the source information set as a condition, guiding the gradual denoising language model to generate text consistent with the source information content throughout the process; denotes the total number of iterations; denotes the core content learned by the gradual denoising language model, i.e. denotes the learned reverse transition kernel function, which is a probability distribution with as a parameter, used to calculate the probability of all possible intermediate version texts with noise level lower than the set threshold, given the text with noise level higher than the set threshold and the source information set ; the symbol ~ represents "sampling from …", i.e. the generation process is probabilistic, and a most likely result is randomly extracted from the probability distribution defined by as the output of this denoising ; The content fidelity evaluation module is evaluated by a supervised verification classifier and / or a large language model-based logical reasoning module; Wherein, the supervised verification classifier is used to judge whether the text fragment to be evaluated is fully supported by the core view and supporting materials in the source information; The large language model-based logical reasoning module judges the support, redundancy or contradiction relationship between the text fragment and the source information through guided reasoning; selectively unmasking for reconstruction, a word item is unmasked for reconstruction with a probability proportional to its fidelity score output by the content fidelity assessment module , the fidelity score of a word item is lower, the probability that the corresponding word item is unmasked for reconstruction is higher , the probability that the corresponding word item is unmasked for reconstruction is higher , the probability that the corresponding word item is unmasked for reconstruction is higher The formula is as follows: ; where, The symbol represents "proportional to", meaning that each word is covered to be reconstructed up to a probability and is in a proportional relationship; is the core term, ensuring that the lower the fidelity, the easier the word is to be selected for reconstruction; is a small random disturbance term to increase exploration, avoiding the local optimum of the step-by-step denoising language model; represents a uniform distribution sampling term to increase exploration diversity; represents a balance factor.
2. The fidelity-based iterative text refinement method of claim 1, wherein, The underlying architecture of the pre-trained step-by-step denoising language model is a model based on Transformer, which is used to capture long-distance dependencies in text.
3. The fidelity-based iterative text refinement method of claim 1, wherein, The fidelity prediction formula of the supervised verification classifier is as follows: ; wherein, represents fidelity; represents a text segment of the intermediate version text; represents a source core perspective associated with the text segment of the intermediate version text; represents a set of supporting materials associated with the text segment of the intermediate version text; represents a source core perspective associated with the text segment of the intermediate version text a set of supporting materials associated with the text segment of the intermediate version text spliced into input; represents a pre-trained RoBERTa, which outputs a score between 0 and 1, indicating supported by the degree of fidelity; is a Sigmoid activation function, which is used to output a probability value representing the fidelity level, that is, to map any real number to the interval (0, 1), so as to convert the output of the classifier into a probability value.
4. The fidelity-based iterative text refinement method of claim 1, wherein, Guided reconfiguration controller according to probability The distribution selects the worst quality word units and restores the worst quality word units to [MASK] word units to form a new to-be-processed text sequence.
5. A fidelity-based iterative text condensation system, characterized by, The system is used to implement the fidelity-based iterative text refining method according to any one of claims 1 to 4; the system comprises: An information collection unit is configured to collect a set of structured source information; wherein the structured source information set includes at least one core view and corresponding supporting materials; A text initialization unit is configured to initialize a target text sequence, the length of the target text sequence is determined according to the estimated target text length, and all are filled with special [MASK] word elements; An iterative training unit is configured to enter an iterative refining loop; A text acquisition unit is configured to repeat the iteration generation process until the preset number of iterations is reached or the text quality meets the convergence condition to obtain the refined target text; Wherein, the iterative training unit comprises: A denoising processing module is configured to use a pre-trained step-by-step denoising language model to denoise the target text sequence to generate a clearer intermediate version of the text; A content fidelity evaluation module is configured to evaluate the fragments in the intermediate version of the text to identify fragments that lack source information support, content redundancy or logical incompleteness; The selective covering to be reconstructed module is configured to selectively cover the identified fragments that lack source information support, content redundancy or logical incompleteness according to the evaluation result of the content fidelity evaluation module.
6. An electronic device, comprising: The method comprises: a memory and at least one processor; wherein the memory has stored thereon a computer program; the at least one processor executes the computer program stored in the memory, so that the at least one processor executes the fidelity-based iterative text refining method according to any one of claims 1 to 4.
7. A computer readable storage medium characterized in that, The computer readable storage medium has stored therein a computer program, which can be executed by a processor to implement the fidelity-based iterative text refining method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Improvements in retrieval-enhanced generation for large language models
DE202025101876U1
Text generation method, method for training text generation model, and related device
WO2025139386A1