A method, system, and medium for detecting ai-generated text

By employing a dual-channel design of a semantic topology analysis engine and a deep feature extractor, combined with dependency tree depth and semantic role offset, the problem of insufficient generalization and adversarial capabilities in AI-generated text detection is solved, achieving efficient and accurate text detection and self-learning capabilities.

CN120849593BActive Publication Date: 2026-01-13SHANDONG ZHONGFU INFORMATION IND
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511339929.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-19
Publication Date
2026-01-13
Estimated Expiration
2045-09-19

AI Technical Summary

Technical Problem

Existing AI-generated text detection technologies suffer from poor generalization ability, blind spots in mixed content, and poor adversarial capabilities. They cannot effectively distinguish between purely AI-generated text and human-modified text, and have high false positive and false negative rates.

Method used

It adopts a dual-channel design of semantic topology analysis engine and deep feature extractor. It generates topological feature vectors and semantic deep feature vectors by using dependency tree depth ΔD and semantic role offset Var·SRL. It combines the dual-channel decision module for detection and uses adversarial examples to train and update the model to achieve self-learning and adversarial capabilities.

Benefits of technology

It improves the adaptability to different model architectures, accurately identifies AI text modified by humans, reduces the false judgment rate, has the ability to continuously learn and resist interference from attacks, and adapts to the rapidly evolving AI generation technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120849593B_ABST
    Figure CN120849593B_ABST
Patent Text Reader

Abstract

The application discloses a method and system for detecting AI-generated text and a medium, mainly relates to the technical field of text detection, and is used to solve the problems of poor generalization ability, mixed content blind area and poor adversarial ability of the existing scheme. It includes: preprocessing the received original input text to obtain a preset standard text; generating a topological feature vector and a semantic depth feature vector; inputting the topological feature vector and the semantic depth feature vector into a double-channel decision module, and generating a vector weight according to the topological feature vector and the semantic depth feature vector; calculating the confidence by using the topological feature vector, the semantic depth feature vector and the vector weight; determining the detection result of the original input text based on the falling interval of the confidence; generating an adversarial sample by using the detection result and the original input text, and updating the semantic topology analysis engine and the depth feature extractor by using the adversarial sample.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of text detection technology, and in particular to a method, system and medium for detecting AI-generated text. Background Technology

[0002] With the popularization of generative AI (such as GPT and Llama), AI-generated text has been widely used in all aspects of society. While AI has greatly facilitated daily office needs, the risk of its abuse is becoming increasingly prominent, and detection technology is urgently needed to detect and assist in its management.

[0003] Current AI text detection technologies are mostly based on the following approaches: Statistical feature analysis: identifying AI traces by analyzing word frequency and syntactic structure differences (such as perplexity and n-grams). Model probabilistic analysis: calculating the probability of text generation using language models (such as GPT Zero). Deep learning analysis: classifying text based on models such as BERT (such as DetectGPT and Turnitin).

[0004] However, the above solutions have the following drawbacks: Poor generalization ability: Most tools are only compatible with specific models (such as GPT), with a sharp drop in performance on Llama, Wenxin Yiyan, etc., and insufficient detection accuracy for non-Latin languages ​​such as Chinese. Blind spots in mixed content: They cannot effectively distinguish between "purely AI-generated" and "human-modified AI text," resulting in high false negative and false positive rates. Poor adversarial ability: For specific adversarial samples or semantics, the detection accuracy is low, and they cannot learn or defend themselves. Summary of the Invention

[0005] This application provides a method, system, and medium for detecting AI-generated text, in order to solve the problems of poor generalization ability, blind spots in mixed content, and poor adversarial ability in existing solutions.

[0006] Firstly, this application provides a method for detecting AI-generated text, the method comprising:

[0007] The received raw input text is preprocessed to obtain a preset standard text; the preset Unicode obfuscated content is filtered out from the preset standard text, and the preset standard text is updated.

[0008] Using a semantic topology analysis engine, the maximum depth ΔD of the dependency tree and the semantic role offset Var·SRL corresponding to the preset standard text are calculated; using ΔD and Var·SRL, a topological feature vector is generated.

[0009] The preset standard text is converted into a two-dimensional tensor. A deep feature extractor is then used to extract features from the two-dimensional tensor to obtain a semantic deep feature vector.

[0010] The topological feature vector and semantic deep feature vector are input into the dual-channel decision module, and vector weights are generated based on the topological feature vector and semantic deep feature vector. The confidence score is calculated using the topological feature vector, semantic deep feature vector and vector weights. The detection result of the original input text is determined based on the fallback interval of the confidence score.

[0011] Using the detection results and the original input text, adversarial examples are generated, and these adversarial examples are used to train and update the semantic topology analysis engine and the deep feature extractor.

[0012] In one implementation of this application, the received raw input text is preprocessed to obtain a preset standard text, specifically including:

[0013] Remove preset non-semantic content from the original input text; the preset non-semantic content includes at least: preset special characters and HTML tags;

[0014] Convert all characters in the original input text to UTF-8 encoding format;

[0015] For original input text exceeding the preset word count, a sliding window is used to divide it into blocks to obtain the preset standard text.

[0016] In one implementation of this application, the maximum depth ΔD of the dependency tree corresponding to the preset standard text and the semantic role offset Var·SRL are calculated; using ΔD and Var·SRL, a topological feature vector is generated, specifically including:

[0017] Construct a dependency tree for a predefined standard text using Stanford CoreNLP; convert the JSON-formatted dependency tree into a sequence of parent-to-child nodes; calculate the maximum depth ΔD of the dependency tree using a depth-first search algorithm;

[0018] The preset standard text is segmented and converted into ID sequences. Using a preset general model, the generated ID sequences are converted into role semantic tags.

[0019] The span information of each character's semantic tag is statistically analyzed; the span information includes the start position and the end position.

[0020] Through the formula:

[0021] Center point = (starting position + ending position) / 2, calculate the center point of the span information for each character;

[0022] Based on the center point, the position variance is calculated to generate the semantic role offset Var·SRL.

[0023] In one implementation of this application, the topological feature vector and the semantic deep feature vector are input into a dual-channel decision module, and vector weights are generated based on the topological feature vector and the semantic deep feature vector, specifically including:

[0024] The topological feature vector and semantic deep feature vector are used as input tensors and then input into the gating mechanism function to obtain the vector weight gate.

[0025] In one implementation of this application, the confidence level is calculated using topological feature vectors, semantic deep feature vectors, and vector weights, specifically including:

[0026] Through the formula:

[0027] fused_features = gate * text_features + (1 - gate) * depth_features, calculate the fused data fused_features;

[0028] Where gate represents vector weights, text_features represents semantic deep feature vectors, and depth_features represents topological feature vectors;

[0029] The CLS label is taken from the fused data to obtain the confidence level.

[0030] In one implementation of this application, adversarial examples are generated using the detection results and the original input text. These adversarial examples are then used to train and update the semantic topology analysis engine and the deep feature extractor. Specifically, this includes:

[0031] Store the detection results and the original input text in a preset sample classification storage database;

[0032] Using the preset generation strategy in the generator, the detection results and the original input text are converted into adversarial examples;

[0033] Inject adversarial examples into the training set;

[0034] Using the training set, train and update the semantic topology analysis engine and the deep feature extractor.

[0035] Secondly, this application provides a system for detecting AI-generated text, the system comprising:

[0036] The preprocessing module is used to preprocess the received raw input text to obtain the preset standard text; filter out the preset Unicode obfuscated content from the preset standard text, and update the preset standard text;

[0037] The semantic topology analysis module is used to calculate the maximum depth ΔD and semantic role offset Var·SRL of the dependency tree corresponding to the preset standard text using the semantic topology analysis engine; and to generate topological feature vectors using ΔD and Var·SRL.

[0038] The deep feature extraction module is used to convert the preset standard text into a two-dimensional tensor, and then use the deep feature extractor to extract features from the two-dimensional tensor to obtain a semantic deep feature vector.

[0039] The dual-channel decision module is used to acquire topological feature vectors and semantic depth feature vectors, generate vector weights based on the topological feature vectors and semantic depth feature vectors, calculate confidence scores using the topological feature vectors, semantic depth feature vectors and vector weights, and determine the detection results of the original input text based on the confidence score's fall interval.

[0040] The adversarial update module is used to generate adversarial examples using the detection results and the original input text, and to train and update the semantic topology analysis engine and deep feature extractor using the adversarial examples.

[0041] In one implementation of this application, the preprocessing module includes a preprocessing unit.

[0042] Used to remove preset non-semantic content from the original input text; wherein, preset non-semantic content includes at least: preset special characters and HTML tags;

[0043] Convert all characters in the original input text to UTF-8 encoding format;

[0044] For original input text exceeding the preset word count, a sliding window is used to divide it into blocks to obtain the preset standard text.

[0045] In one implementation of this application, the semantic topology analysis module includes a topology feature calculation unit.

[0046] Used to build dependency trees for predefined standard text using Stanford CoreNLP; converts JSON-formatted dependency trees into sequences of parent-to-child nodes; calculates the maximum depth ΔD of the dependency tree using a depth-first search algorithm;

[0047] The preset standard text is segmented and converted into ID sequences. Using a preset general model, the generated ID sequences are converted into role semantic tags.

[0048] The span information of each character's semantic tag is statistically analyzed; the span information includes the start position and the end position.

[0049] Through the formula:

[0050] Center point = (starting position + ending position) / 2, calculate the center point of the span information for each character;

[0051] Based on the center point, the position variance is calculated to generate the semantic role offset Var·SRL.

[0052] Thirdly, this application provides a non-volatile computer storage medium storing computer instructions thereon, which, when executed, implement a method for detecting AI-generated text as described in any of the preceding claims.

[0053] As can be seen from the above technical solutions, this application has the following advantages:

[0054] The dual-channel design of the semantic topology analysis engine and the deep feature extractor fundamentally changes the limitations of single-model adaptation. Semantic topology analysis constructs universal language features based on dependency tree depth ΔD and semantic role offset Var·SRL, and its mathematical modeling does not depend on the output distribution of a specific model. Meanwhile, the deep feature extractor achieves underlying semantic encoding through two-dimensional tensor transformation. Together, they can cover the generated features of different architecture models such as GPT, Llama, and Wenxin Yiyan. In particular, the Unicode obfuscation filtering preprocessing module effectively eliminates interference from non-Latin characters, ensuring a basic guarantee of analysis accuracy for languages ​​such as Chinese.

[0055] The dual-channel decision module uses dynamic vector weight allocation technology to accurately capture human-modified AI text: when topological features show grammatical structure abnormalities but deep features exhibit human writing patterns, the system automatically increases the weight of topological features; otherwise, it focuses on deep feature analysis. This adaptive strategy based on confidence intervals enables the system to identify AI text that has been manually edited (e.g., only 30% of the content has been modified), solving the problem of traditional solutions misjudging "partial human involvement" as purely human creation.

[0056] By generating adversarial examples in real time and feeding them back to the semantic topology analysis engine and deep feature extractor, a positive loop is built to continuously enhance detection capabilities. When encountering adversarial attacks (such as specific semantic rewriting), the system can automatically extract new feature patterns to update the topology analysis rules and deep extraction parameters, giving it an anti-interference advantage compared to static detection models. This mechanism enables model iteration without manually labeled data, making it particularly suitable for rapidly evolving AI generation technologies. Attached Figure Description

[0057] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the description will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0058] Figure 1 This is a flowchart of a method for detecting AI-generated text provided in an embodiment of this application.

[0059] Figure 2 This is a schematic diagram of the internal structure of a system for detecting AI-generated text provided in an embodiment of this application. Detailed Implementation

[0060] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0061] Those skilled in the art should understand that the embodiments described below are merely preferred embodiments of this disclosure and do not imply that this disclosure can only be implemented through these preferred embodiments. These preferred embodiments are merely used to explain the technical principles of this disclosure and are not intended to limit the scope of protection of this disclosure. All other embodiments obtained by those skilled in the art based on the preferred embodiments provided in this disclosure without inventive effort should still fall within the scope of protection of this disclosure.

[0062] It should also be noted that 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 process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0063] The technical solutions proposed in the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0064] The embodiment provides a method for detecting AI-generated text, such as Figure 1 As shown in the embodiments of this application, the method mainly includes the following steps:

[0065] Step 110: Preprocess the received raw input text to obtain the preset standard text; filter out the preset Unicode obfuscated content from the preset standard text and update the preset standard text.

[0066] In some embodiments, the received raw input text is preprocessed to obtain a preset standard text, specifically including:

[0067] Remove preset non-semantic content from the original input text; the preset non-semantic content includes at least: preset special characters and HTML tags;

[0068] Convert all characters in the original input text to UTF-8 encoding format;

[0069] For original input text exceeding the preset word count, a sliding window is used to divide it into blocks to obtain the preset standard text.

[0070] Step 120: Using the semantic topology analysis engine, calculate the maximum depth ΔD of the dependency tree corresponding to the preset standard text and the semantic role offset Var·SRL; use ΔD and Var·SRL to generate a topological feature vector.

[0071] It should be noted that a sentence is a hierarchical structure composed of a core predicate and its subordinate components. Based on current human writing knowledge, it is generally believed that it should follow the following rules: complex ideas → multi-layered modification structure → deep dependency tree.

[0072] Large models generally follow these rules when generating statements:

[0073] AI-generated data is constrained by probability sampling and tends towards a flattened structure.

[0074] Based on the analysis of the current large-scale corpus, the maximum dependency tree depth ΔD of AI text is significantly lower than that of human text, and the maximum dependency tree depth follows a normal distribution, as follows:

[0075] Human text: ΔD~N (μ=7.2, σ=1.3);

[0076] AI text: ΔD~N(μ=4.1, σ=0.8);

[0077] Based on the above characteristic analysis, this application designs a dependency tree to be constructed and generated from the preprocessed data using Stanford CoreNLP, and calculates the maximum depth using a depth-first search algorithm, as follows:

[0078] Dependency tree construction:

[0079] A dependency tree consists of tokens and dependency relations. The meaning of each unit is as follows:

[0080] A token is the smallest unit (word, symbol, or number) in a text.

[0081] Dependency relations; syntactic relations are based on the Universal Dependencies (UD) standard and are defined as follows:

[0082] root: the root node (the core verb or noun of a sentence);

[0083] nsubj: noun subject (subject);

[0084] dobj: direct object;

[0085] amod: an adjective modifier;

[0086] punctuation marks.

[0087] The depth search algorithm calculates the maximum dependency tree depth.

[0088] DFS starts from the root node, recursively calculates the maximum depth of each subtree, and returns the maximum path length of the current node.

[0089] Algorithm logic:

[0090] 1. Recursion termination condition: If a node has no child nodes, return to depth 1.

[0091] 2. Recursive steps: Recursively call DFS for each child node, take the maximum depth and increment it by 1 (the current node contributes one level).

[0092] Based on the above description, the specific implementation logic of the maximum depth ΔD of the dependency tree in this step is as follows:

[0093] Construct a dependency tree for a predefined standard text using Stanford CoreNLP; convert the JSON-formatted dependency tree into a sequence of parent-to-child nodes; and calculate the maximum depth ΔD of the dependency tree using a depth-first search algorithm.

[0094] Additionally, role offset is used to represent the degree of positional dispersion between quantized predicates and arguments.

[0095] Based on existing human thinking and writing characteristics, the "semantic proximity principle" is generally followed, where predicates and arguments are located close to each other, resulting in a smaller degree of positional dispersion between predicates and arguments, i.e., a smaller offset variance. However, text generated by large AI models is subject to probability sampling interference, leading to a greater dispersion of predicates and arguments, and consequently, a larger offset variance in the final output.

[0096] Based on the semantic topological features mentioned above, under the same sentence length (e.g., 20-30 words), it is generally believed that the Val (SRL) of human-generated text is ≤2.3, while the Val (SRL) of AI-generated text is ≥3.8.

[0097] Based on the above description, the specific code logic for the semantic role offset Var·SRL in this step is as follows:

[0098] The pre-defined standard text is segmented and converted into ID sequences. Then, using a pre-defined general model (bidirectional LSTM-CRF model, BERT-CRF combined model, SpanBERT + pointer network, etc.), the generated ID sequences are converted into role semantic tags.

[0099] The span information of each character's semantic tag is statistically analyzed; the span information includes the start position and the end position.

[0100] Through the formula:

[0101] Center point = (starting position + ending position) / 2, calculate the center point of the span information for each character;

[0102] Based on the center point, the position variance is calculated, and the semantic role offset Var·SRL (position variance) is generated.

[0103] Specifically, it includes:

[0104] Calculate the average of all center points; calculate the squared difference between each center point and the average; finally, calculate the average of these squared differences as the location variance.

[0105] It should be noted that a multi-level decision-making approach can be used. For Var-SRL, the decision-making method can be as follows:

[0106] Var-SRL interval determination results;

[0107] [0, 2.5), human text;

[0108] [2.5, 3.5), suspicious text;

[0109] [3.5,∞), AI generates text.

[0110] For structural anomalies that may occur during the Var·SRL parsing and generation process, specific judgment methods can be adopted, combined with the predicate type, to make targeted judgments.

[0111] For example, a preliminary judgment can be made on the main predicate type of the preset high Var·SRL. If it is an action verb, it may be generated by AI; if it is a copula, it needs to be judged in combination with subsequent features; if it is a mental verb, it is likely human text.

[0112] Step 130: Convert the preset standard text into a two-dimensional tensor, and use a deep feature extractor to extract features from the two-dimensional tensor to obtain a semantic deep feature vector.

[0113] It can be used for BERT feature extraction.

[0114] Step 140: Input the topological feature vector and semantic deep feature vector into the dual-channel decision module, generate vector weights based on the topological feature vector and semantic deep feature vector; calculate the confidence score using the topological feature vector, semantic deep feature vector and vector weights; determine the detection result of the original input text based on the confidence score's fall interval.

[0115] It should be noted that this step is a multimodal fusion based on a gating mechanism. Gating units (such as GRU, LSTM, and other common techniques) are used to control the interaction between the two types of features, dynamically filtering key information. Inputting semantic deep feature vectors and topological feature vectors (including dependency trees and role offsets Var), the gating unit generates weights based on the current input, determining how much semantic information to retain and how much structural information to introduce, calculating confidence levels, and outputting the final results in a tiered manner.

[0116] In some embodiments, the topological feature vector and the semantic deep feature vector are input into the dual-channel decision module, and vector weights are generated based on the topological feature vector and the semantic deep feature vector, specifically including:

[0117] The topological feature vector and semantic deep feature vector are used as input tensors and then input into the gating mechanism function to obtain the vector weight gate.

[0118] The confidence score is calculated using topological feature vectors, semantic deep feature vectors, and vector weights, specifically including:

[0119] Through the formula:

[0120] fused_features = gate * text_features + (1 - gate) * depth_features, calculate the fused data fused_features;

[0121] Where gate represents vector weights, text_features represents semantic deep feature vectors, and depth_features represents topological feature vectors;

[0122] The CLS label is taken from the fused data to obtain the confidence level.

[0123] As an example, the confidence interval can be defined as follows (for reference only, the definition may vary depending on the weighting ratio and the multimodal fusion technique):

[0124] Confidence interval output processing action;

[0125] [0,0.4) Human text is allowed to pass directly;

[0126] [0.4, 0.6) Suspected AI-generated, subject to manual review;

[0127] [0.6,1] AI generates text, automatically tags it, and records it in logs.

[0128] Step 150: Using the detection results and the original input text, generate adversarial examples, and use the adversarial examples to train and update the semantic topology analysis engine and deep feature extractor.

[0129] This step can be specifically described as follows:

[0130] Store the detection results and the original input text in a preset sample classification storage database;

[0131] Using the preset generation strategy in the generator, the detection results and the original input text are converted into adversarial examples;

[0132] Inject adversarial examples into the training set;

[0133] Using the training set, train and update the semantic topology analysis engine and the deep feature extractor.

[0134] It should be noted that the preset generation strategies include syntactic perturbation, semantic perturbation, and structural perturbation.

[0135] Grammatical perturbations: tense shifts (VBD↔VBZ), voice shifts (active↔passive);

[0136] Semantic perturbation: Synonym replacement based on WordNet;

[0137] Structural perturbation: Sentence restructuring that preserves the core predicate-argument relationship.

[0138] This application has a regular update mechanism, which regularly collects the latest samples and generates adversarial samples according to the generator strategy, adds them to the training set, and performs incremental updates to the model simultaneously.

[0139] As described above, this embodiment combines text topological features and text semantic features, which differs from existing single detection schemes. By combining structured rules with the generalization ability of deep learning, it improves the judgment of complex semantics, enhances the detection and recognition effect, and the detection method has universality. This application has an adversarial feedback loop design, which can effectively feed adversarial examples back into the training set and perform incremental updates to the model, ensuring continuous learning and evolution capabilities and the continuity of detection capabilities.

[0140] In addition, this application Figure 2 This application provides a systematic method for detecting AI-generated text. For example... Figure 2 As shown in the embodiments of this application, the system mainly includes:

[0141] The preprocessing module 210 is used to preprocess the received raw input text to obtain a preset standard text; filter out the preset Unicode obfuscated content from the preset standard text, and update the preset standard text.

[0142] Preprocessing module 210 includes a preprocessing unit.

[0143] Used to remove preset non-semantic content from the original input text; wherein, preset non-semantic content includes at least: preset special characters and HTML tags;

[0144] Convert all characters in the original input text to UTF-8 encoding format;

[0145] For original input text exceeding the preset word count, a sliding window is used to divide it into blocks to obtain the preset standard text.

[0146] The semantic topology analysis module 220 is used to calculate the maximum depth ΔD of the dependency tree corresponding to the preset standard text and the semantic role offset Var·SRL using the semantic topology analysis engine; and to generate a topological feature vector using ΔD and Var·SRL.

[0147] The semantic topology analysis module 220 includes a topology feature calculation unit.

[0148] Used to build dependency trees for predefined standard text using Stanford CoreNLP; converts JSON-formatted dependency trees into sequences of parent-to-child nodes; calculates the maximum depth ΔD of the dependency tree using a depth-first search algorithm;

[0149] The preset standard text is segmented and converted into ID sequences. Using a preset general model, the generated ID sequences are converted into role semantic tags.

[0150] The span information of each character's semantic tag is statistically analyzed; the span information includes the start position and the end position.

[0151] Through the formula:

[0152] Center point = (starting position + ending position) / 2, calculate the center point of the span information for each character;

[0153] Based on the center point, the position variance is calculated to generate the semantic role offset Var·SRL.

[0154] The deep feature extraction module 230 is used to convert the preset standard text into a two-dimensional tensor, and use a deep feature extractor to extract features from the two-dimensional tensor to obtain a semantic deep feature vector.

[0155] The dual-channel decision module 240 is used to acquire topological feature vectors and semantic deep feature vectors, generate vector weights based on the topological feature vectors and semantic deep feature vectors, calculate confidence using the topological feature vectors, semantic deep feature vectors and vector weights, and determine the detection result of the original input text based on the confidence interval.

[0156] The adversarial update module 250 is used to generate adversarial examples using the detection results and the original input text, and to train and update the semantic topology analysis engine and deep feature extractor using the adversarial examples.

[0157] As described above, in this embodiment, the data processed by the preprocessing module 210 is input into the semantic topology analysis module 220 and the deep feature extraction module 230, respectively. The two modules extract the topological feature vector (dependency tree and role offset) and the deep feature vector, respectively. The two vector data are input into the dual-channel decision module 240, which is then fused with the two vector data according to the weights through the gating unit. Feature determination is performed, and the detection result is output. The detection result is used to classify the samples and generate adversarial samples simultaneously. The adversarial samples are injected into the model training set to train the model and incrementally update the detection model, thereby achieving the purpose of dynamic adversarial detection.

[0158] In addition, embodiments of this application also provide a non-volatile computer storage medium storing executable instructions, which, when executed, implement the method for detecting AI-generated text as described above.

[0159] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for detecting AI-generated text, characterized in that, The method includes: The received raw input text is preprocessed to obtain a preset standard text; the preset Unicode obfuscated content is filtered out from the preset standard text, and the preset standard text is updated. Using a semantic topology analysis engine, the maximum depth ΔD of the dependency tree and the semantic role offset Var·SRL corresponding to the preset standard text are calculated; using ΔD and Var·SRL, a topological feature vector is generated; specifically including: Dependency trees for predefined standard texts are constructed using Stanford CoreNLP; the JSON-formatted dependency trees are converted into sequences corresponding to parent and child nodes; the maximum depth ΔD of the dependency tree is calculated using a depth-first search algorithm; the predefined standard texts are segmented and converted into ID sequences, and the resulting ID sequences are converted into role semantic tags using a predefined general model; the span information corresponding to each role semantic tag is calculated; the span information includes the start and end positions; and the formula is used to calculate the span information. Center point = (starting position + ending position) / 2, calculate the center point of the span information for each character; based on the center point, calculate the position variance and generate the semantic character offset Var·SRL; The preset standard text is converted into a two-dimensional tensor. A deep feature extractor is then used to extract features from the two-dimensional tensor to obtain a semantic deep feature vector. The topological feature vector and semantic deep feature vector are input into the dual-channel decision module, and vector weights are generated based on the topological feature vector and semantic deep feature vector; specifically including: The topological feature vector and semantic deep feature vector are used as input tensors and input into the gating mechanism function to obtain the vector weight gate. The confidence score is calculated using topological feature vectors, semantic deep feature vectors, and vector weights; the detection result of the original input text is determined based on the confidence score's fall interval. Using the detection results and the original input text, adversarial examples are generated, and these adversarial examples are used to train and update the semantic topology analysis engine and the deep feature extractor.

2. The method for detecting AI-generated text according to claim 1, characterized in that, The received raw input text is preprocessed to obtain a preset standard text, specifically including: Remove preset non-semantic content from the original input text; the preset non-semantic content includes at least: preset special characters and HTML tags; Convert all characters in the original input text to UTF-8 encoding format; For original input text exceeding the preset word count, a sliding window is used to divide it into blocks to obtain the preset standard text.

3. The method for detecting AI-generated text according to claim 1, characterized in that, The confidence score is calculated using topological feature vectors, semantic deep feature vectors, and vector weights, specifically including: Through the formula: fused_features = gate * text_features + (1 - gate) * depth_features, calculate the fused data fused_features; Where gate represents vector weights, text_features represents semantic deep feature vectors, and depth_features represents topological feature vectors; The CLS label is taken from the fused data to obtain the confidence level.

4. The method for detecting AI-generated text according to claim 1, characterized in that, Using the detection results and the original input text, adversarial examples are generated. These adversarial examples are then used to train and update the semantic topology analysis engine and the deep feature extractor, specifically including: Store the detection results and the original input text in a preset sample classification storage database; Using the preset generation strategy in the generator, the detection results and the original input text are converted into adversarial examples; Inject adversarial examples into the training set; Using the training set, train and update the semantic topology analysis engine and the deep feature extractor.

5. A systematic method for detecting AI-generated text, characterized in that, The system includes: The preprocessing module is used to preprocess the received raw input text to obtain the preset standard text; filter out the preset Unicode obfuscated content from the preset standard text, and update the preset standard text; The semantic topology analysis module is used to calculate the maximum depth ΔD and semantic role offset Var·SRL of the dependency tree corresponding to the preset standard text using the semantic topology analysis engine; and to generate topological feature vectors using ΔD and Var·SRL. The semantic topology analysis module includes a topology feature calculation unit. This tool is used to construct dependency trees from predefined standard text using Stanford CoreNLP; convert the JSON-formatted dependency tree into a sequence of parent-to-child nodes; calculate the maximum depth ΔD of the dependency tree using a depth-first search algorithm; perform word segmentation and ID sequence conversion on the predefined standard text; use a predefined general model to convert the generated ID sequences into role semantic tags; and calculate the span information of each role semantic tag corresponding to the role, where the span information includes: start position and end position. Through the formula: Center point = (starting position + ending position) / 2, calculate the center point of the span information for each character; based on the center point, calculate the position variance and generate the semantic character offset Var·SRL; The deep feature extraction module is used to convert the preset standard text into a two-dimensional tensor, and then use the deep feature extractor to extract features from the two-dimensional tensor to obtain a semantic deep feature vector. The dual-channel decision module is used to obtain topological feature vectors and semantic deep feature vectors, and generate vector weights based on the topological feature vectors and semantic deep feature vectors; specifically, it includes: taking the topological feature vectors and semantic deep feature vectors as input tensors, inputting them into a gating mechanism function, and obtaining the vector weight gate; The confidence score is calculated using topological feature vectors, semantic deep feature vectors, and vector weights; the detection result of the original input text is determined based on the confidence score's fall interval. The adversarial update module is used to generate adversarial examples using the detection results and the original input text, and to train and update the semantic topology analysis engine and deep feature extractor using the adversarial examples.

6. The system for detecting AI-generated text according to claim 5, characterized in that, The preprocessing module includes preprocessing units. Used to remove preset non-semantic content from the original input text; wherein, preset non-semantic content includes at least: preset special characters and HTML tags; Convert all characters in the original input text to UTF-8 encoding format; For original input text exceeding the preset word count, a sliding window is used to divide it into blocks to obtain the preset standard text.

7. A non-volatile computer storage medium, characterized in that, It stores computer instructions that, when executed, implement a method for detecting AI-generated text as described in any one of claims 1-4.

Citation Information

Patent Citations

  • GPT text detection model establishment method and system, computer equipment and storage medium

    CN118228737A

  • Construction method and device of AI text detection model, equipment and storage medium

    CN118964615A