CN-120181046-B - Post-processing method, device, medium and equipment for AI generated text
Abstract
The application discloses a post-processing method, device, medium and equipment for AI generated text. The method acquires the AI generated text to be processed, inputs the AI generated text into the trained text classifier model, trains the model based on the preset academic writing data set and the social media text data set, and can accurately identify the part (first text) belonging to the generation of the artificial intelligence software in the AI generated text. And then, carrying out fine granularity detection on the first text by using a preset integral gradient method and a Shapley value analysis method, and accurately identifying text units generated by each AI. Finally, inputting the text units generated by the AI into a preset Agent system, wherein the Agent system uses a generated language model to moisten the units and output a more natural and more accurate text result.
Inventors
- HE XINLEI
- LIU YULE
- SUN ZHEN
Assignees
- 香港科技大学(广州)
Dates
- Publication Date
- 20260505
- Application Date
- 20250219
Claims (9)
- 1. A post-processing method of AI-generated text, comprising: acquiring an AI generation text to be processed; Inputting the AI generated text into a trained text classifier model so that the text classifier model outputs a first text belonging to artificial intelligence software generation in the AI generated text; the text classifier model is obtained by training an initial text classifier according to a preset academic writing data set and a preset social media text data set; Detecting the first text according to a preset integral gradient method and a preset shape value analysis method to obtain text units generated by each AI in the first text, wherein the text units specifically comprise: according to a preset integral gradient method, calculating and obtaining each gradient of each text unit in the first text output by the text classifier model; according to the gradients, calculating to obtain importance scores of the output prediction contribution degree of each text unit in the first text to the text classifier model; according to a preset Shapley value analysis method, quantifying each contribution of each text unit to the output prediction result of the text classifier model, and determining each fair contribution value of each text unit; Identifying text units generated by each AI in the first text according to each importance score and each fairness contribution value; And inputting the text units generated by each AI into a preset Agent system so that the Agent system outputs the color rendering results of the text units generated by each AI.
- 2. The post-processing method of AI generated text according to claim 1, wherein the text classifier model is trained on an initial text classifier based on a preset academic authoring dataset and a preset social media text dataset, specifically: acquiring a preset academic writing data set and a preset social media text data set; inputting the preset academic authoring data set and the preset social media data set into an initial text classifier, so that the initial text classifier adjusts weight items and bias items according to a preset supervised learning principle; And stopping training when the loss function of the initial text classifier reaches a preset threshold value and is not changed within a preset time period, so as to obtain the text classifier model.
- 3. The post-processing method of AI-generated text of claim 2, wherein the acquiring a preset academic authoring dataset and a preset social media text dataset is specifically: the preset academic writing data set comprises various academic papers, research reports and technical documents; The preset social media text data set comprises articles, blogs and comments published on each social platform.
- 4. The post-processing method of AI generated text of claim 1, wherein the quantifying each contribution of each text unit to the output prediction result of the text classifier model according to a preset shape analysis method specifically comprises: The quantization calculation formula for quantizing each contribution of each text unit to the output prediction result of the text classifier model according to the preset Shapley value analysis method is as follows: ; In the formula, The representation model, under the input of subset S, predicts a first probability that the text is the first text generated by the artificial intelligence software, Representing the addition of features on the basis of subsets S Then, the text classifier model predicts that the text belongs to the second probability of the first text generated by the artificial intelligence software; Representing characteristics Shapley values of (2) for quantifying features Contributions to the text classifier prediction result; is a preset weight.
- 5. The post-processing method of AI-generated text of claim 1, wherein the calculating, according to the gradients, respective importance scores of output prediction contribution degrees of respective text units in the first text to the text classifier model specifically includes: The formula for calculating each importance score of each text unit in the first text for the output prediction contribution degree of the text classifier model according to each gradient is as follows: In the formula, An ith eigenvalue representing input x; Representing baseline input Is the i-th eigenvalue of (a); Represents a scale factor from 0 to 1, Representing text classifier models Input to The partial derivatives of the ith feature of (i) i.e. the respective gradients.
- 6. The post-processing method of AI-generated text according to claim 1, wherein the inputting the text units generated by each AI into a preset Agent system, so that the Agent system outputs the color rendering result of the text units generated by each AI, specifically: Inputting the text units generated by each AI into a preset Agent system, so that the Agent system calls a plurality of preset tools and a preset generation type language model to output the color rendering result of the text units generated by each AI.
- 7. The post-processing device for the AI generated text is characterized by comprising an acquisition module, a first input/output module, a detection module and a second input/output module; The acquisition module is used for acquiring an AI generated text to be processed; The first input/output module is used for inputting the AI generated text into a trained text classifier model so that the text classifier model outputs a first text which belongs to artificial intelligence software generation in the AI generated text; the text classifier model is obtained by training an initial text classifier according to a preset academic writing data set and a preset social media text data set; The detection module is used for detecting the first text according to a preset integral gradient method and a preset Shapley value analysis method to obtain text units generated by each AI in the first text, and specifically comprises the following steps: according to a preset integral gradient method, calculating and obtaining each gradient of each text unit in the first text output by the text classifier model; according to the gradients, calculating to obtain importance scores of the output prediction contribution degree of each text unit in the first text to the text classifier model; according to a preset Shapley value analysis method, quantifying each contribution of each text unit to the output prediction result of the text classifier model, and determining each fair contribution value of each text unit; Identifying text units generated by each AI in the first text according to each importance score and each fairness contribution value; The second input and output module is used for inputting the text units generated by each AI into a preset Agent system so that the Agent system outputs the color rendering results of the text units generated by each AI.
- 8. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored computer program, wherein the computer program, when run, controls a device in which the computer readable storage medium is located to perform the post-processing method of AI-generated text of any one of claims 1-6.
- 9. A terminal device comprising a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the post-processing method of AI-generated text of any of claims 1-6 when the computer program is executed.
Description
Post-processing method, device, medium and equipment for AI generated text Technical Field The present invention relates to the field of post-processing of AI generated text, and in particular, to a post-processing method, apparatus, medium, and device for AI generated text. Background With the rapid development of Artificial Intelligence (AI) technology, particularly the advancement of Natural Language Processing (NLP), AI-generated text has been widely used in various fields such as content creation, translation, customer service, marketing documents, and the like. However, although these texts have reached a certain level in terms of grammatical structure and information transfer, significant problems remain, particularly in terms of naturalness and accuracy. AI-generated text often lacks the emotion, style, and personality of human writing, and may be expressed too straightly, repeated or out of logic. In addition, AI models are trained based on large amounts of data, sometimes generating erroneous or misleading information, especially in the medical, legal, etc. profession areas, affecting the credibility of the text. The conventional AI detection tool can judge whether the text is generated by AI, but has limitation on fine granularity analysis, is difficult to capture fine unnatural or erroneous parts, lacks an effective later modification mechanism, and increases the workload and cost of manual correction. Many industries are increasingly aware of the importance of text quality control and collation while improving productivity of AI-generated text. Therefore, there is an urgent need to develop a technique capable of finely detecting and rewriting an AI-generated text. The text quality and the credibility can be improved, the workload of manual correction can be reduced, and the overall working efficiency is improved. The prior art has the defect of accurately detecting potential errors and unnatural parts of an AI generated text, particularly in a long text, the AI generated part is well fused with a human writing part, and is difficult to effectively distinguish and detect. These problems result in the AI-generated text of the prior art being deficient in naturalness and accuracy. Disclosure of Invention The invention provides a post-processing method, device, medium and equipment for an AI generated text, which are used for solving the problem that the naturalness and accuracy of the AI generated text in the prior art are insufficient. In a first aspect, the present application provides a post-processing method for AI-generated text, including: acquiring an AI generation text to be processed; Inputting the AI generated text into a trained text classifier model so that the text classifier model outputs a first text belonging to artificial intelligence software generation in the AI generated text; the text classifier model is obtained by training an initial text classifier according to a preset academic writing data set and a preset social media text data set; detecting the first text according to a preset integral gradient method and a preset Shapley value analysis method to obtain text units generated by each AI in the first text; And inputting the text units generated by each AI into a preset Agent system so that the Agent system outputs the color rendering results of the text units generated by each AI. According to the method, the AI generation text to be processed is obtained and then is input into the trained text classifier model, the model is trained based on the preset academic writing data set and the social media text data set, and the part (first text) which belongs to the generation of the artificial intelligence software in the AI generation text can be accurately identified. And then, carrying out fine granularity detection on the first text by using a preset integral gradient method and a Shapley value analysis method, and accurately identifying text units generated by each AI. Finally, inputting the text units generated by the AI into a preset Agent system, and enabling the Agent system to moisten the units by using a generated language model to output a more natural and accurate text result. The process not only improves the naturalness and accuracy of the text, but also reduces the workload of manual correction, improves the overall working efficiency, and effectively solves the problem that the naturalness and accuracy of the AI generated text in the prior art are insufficient. As a preferred embodiment of the first aspect, the text classifier model is obtained by training an initial text classifier according to a preset academic authoring data set and a preset social media text data set, specifically: acquiring a preset academic writing data set and a preset social media text data set; inputting the preset academic authoring data set and the preset social media data set into an initial text classifier, so that the initial text classifier adjusts weight items and bias items acc