Method and system for detecting machine-generated text based on preference-aware curvature metrics

By constructing the original text and perturbation implicit reward model and the preference-aware curvature measurement module, the problem of insufficient log probability of the discrimination signal in existing methods is solved, realizing efficient machine-generated text detection without labeled data, and improving detection accuracy and robustness.

CN123179086APending Publication Date: 2026-11-27CHINA ACAD OF CIVIL AVIATION SCI & TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611474036.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-21
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing machine-generated text detection methods rely on log-probability discriminative signals, resulting in weak discriminative ability and failing to fully utilize the implicit preference capabilities of surrogate models, leading to poor detection performance.

Method used

By constructing the original implicit reward model, the perturbation implicit reward model, and the preference-aware curvature measurement module, and using the conditional probability ratio between the policy model and the reference model and the expected value of the perturbation implicit reward, the normalized bias is calculated as the preference-aware curvature, breaking through the logarithmic probability limitation and achieving efficient detection without labeled data and trained classifiers.

Benefits of technology

It improves the detection accuracy and efficiency of machine-generated text and human-written text, enhances the performance of AUROC, AUPR and TPR@5%FPR, strengthens the robustness against adversarial attacks, and maintains stability across different datasets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123179086A_ABST
    Figure CN123179086A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on preference perception curvature measure machine-generated text detection method and system, method includes: constructing including original text implicit reward model, perturbation implicit reward model, preference perception curvature measure module in text detection model, obtains research text input original text implicit reward model obtains each position conditional logarithm probability ratio and is as implicit reward;Perturbation implicit reward model is replaced with research text original text position in perturbation word element table perturbation word element and is calculated to obtain expected implicit reward;Preference perception curvature measure module calculates the normalized deviation of implicit reward of research text original text relative to expected implicit reward of perturbation word element as preference perception curvature;Text detection model is provided with determination threshold, if preference perception curvature is greater than determination threshold, then it is determined as machine-generated text.The present application does not need to train classifier with labeled data, can utilize the implicit preference ability of preference optimization model and improve detection precision, robustness and efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machine-generated text detection, and in particular to a method and system for machine-generated text detection based on preference-aware curvature measurement. Background Technology

[0002] The widespread adoption of Large Language Models (LLMs) has led to a surge in machine-generated text in academic writing, news reporting, and other contexts, resulting in issues such as the spread of misinformation. Therefore, a reliable machine-generated text detection technology is urgently needed to accurately distinguish between machine-generated and human-written text. Existing machine-generated text detection methods are mainly divided into two categories: training-based and training-free. Training-based methods require labeled data to train a classifier, but they often suffer from poor generalization ability. Training-free methods, on the other hand, calculate text statistical features to uncover inherent discriminative signals between machine-generated and human-written text, achieving better generalization and detection results without labeled data, making them more suitable for real-world applications. Most of these methods are based on lexical probability features. This is because LLMs use the prediction of the next lexical term as the training objective, learning the conditional distribution of the next lexical term given the preceding context on a large-scale human text corpus. During generation, the model then autoregressively samples word by word according to this conditional distribution; the resulting machine-generated text falls within the model's own statistical distribution. In contrast, human-written text does not follow a uniform conditional distribution, and word selection is more random. Therefore, lexical probability features can provide an inherent signal that distinguishes the two. However, the source model of machine-generated text is often unknown, and existing methods often use locally deployable LLMs as surrogate models for scoring. Furthermore, since the source model is often an instruction-tuned model, the scoring model also tends to apply instruction-tuned models to achieve more effective detection results.

[0003] One of the most effective training-free methods currently available is the curvature metric-based detection method. This method assumes that word selection perturbations are applied to the tokens of the text to generate several variants. A surrogate model is then used to calculate the log probability of the original text and the log probabilities of the perturbated variants, and the average of these probabilities is taken. The difference between the two is called the "probability curvature," which serves as an effective discriminative signal. The reason is that machine-generated text is obtained by sampling from its own distribution using an LLM model, which often results in local maxima of probability. After word perturbation, the probability decreases significantly, and the curvature is often positive. Human text, however, does not exhibit this statistical trend, and its curvature is close to zero. This type of detection method has explored various perturbation schemes. Representative methods (such as DetectGPT) employ masking models (e.g., the T5 model) to randomly apply masks and backfill to multiple lexical units, resulting in multiple lexical unit perturbation variants. However, this process is too time-consuming. Subsequent work (e.g., Fast-DetectGPT) further introduces an autoregressive model as a sampling model for conditional probability sampling. This model estimates the conditional probability of the replacement word at each position on the vocabulary in one go and aggregates the probabilities at that lexical position using a weighted aggregation based on the vocabulary's sampling distribution. This compresses the overhead of multiple forward propagations into a single forward propagation, balancing efficiency and accuracy. However, these methods have significant drawbacks. First, they always measure curvature based on logarithmic probability, which corresponds to the likelihood maximization objective in the supervised fine-tuning (SFT) stage. This reflects surface attributes like fluency and coherence, precisely the aspects that modern large models excel at mimicking. The assumptions underlying this are not always valid, thus making the discrimination signal unreliable. Meanwhile, modern instruction fine-tuning models, often used as surrogate models, generally undergo preference learning, such as Reinforcement Learning from Human Feedback (RLHF) and Direct Preference Optimization (DPO). These models implicitly possess preference discrimination capabilities beyond surface fluency. Existing methods have verified that effective detection can be achieved directly using the implicit rewards in DPO—the implicit rewards for machine-generated text are often higher than those for human-written text. However, these methods have not further explored using the implicit preference capabilities inherent in preference learning for detection.

[0004] Current methods score candidate texts to obtain statistics that separate human and machine text distributions, then input these scores into a classifier (trained) or compare them with candidate thresholds (train-free) to determine the text source. The training method collects labeled datasets of human and machine text, then fine-tunes pre-trained models like RoBERTa as binary classifiers to fit the mapping between text and source labels. Subsequent solutions build upon this by introducing adversarial learning, multi-level contrastive learning, or having the model mimic machine writing style before detection to alleviate overfitting. The training-free method, on the other hand, does not rely on labeled data but directly uses available pre-trained large models as surrogate models to mine the probabilistic characteristics of the text. Single-model methods extract basic statistics such as likelihood, entropy, and log-rank from the surrogate model as discrimination criteria; multi-model methods introduce a second model to provide complementary signals, such as using the cross-perplexity ratio between the observer and executor models to suppress interference from prompt words, or mining local fluctuation features of word probability sequences. Another type of curvature-based method involves applying lexical perturbations to candidate text to generate variants, and measuring the variation in model scores between the original text and the perturbated text. This can be achieved by using a masked language model (e.g., DetectGPT uses a masked language model) to mask and backfill lexical units to generate multiple perturbation variants, then comparing their log probabilities under a surrogate model to estimate curvature. However, each variant requires a complete evaluation of the Markov chain probability on the surrogate model, meaning each variant generation requires an independent forward propagation, typically requiring hundreds of forward propagations to obtain a stable curvature estimate, resulting in high computational costs. To address this, an autoregressive model is introduced as a sampling model to perform conditional probability sampling (e.g., Fast-DetectGPT). Candidate lexical units are generated at each position, and their conditional probabilities are calculated. Leveraging the property that all candidate words share the same prediction distribution, this avoids repeated evaluation of each variant, compressing curvature calculation into a single forward propagation, reducing overhead while improving detection accuracy.

[0005] For machine-generated text detection tasks, both trained and training-free methods aim to construct a discriminative score that can distinguish the source of the text, and then compare this score with a threshold to obtain a detection conclusion. Trained methods collect labeled data to fine-tune the classifier. While performing well within the training distribution, they heavily rely on the coverage of the labeled data, and their performance drops significantly when faced with unseen domains, generative models, and writing styles, limiting their generalization ability. Curvature-based methods, which dominate the training-free approach, always rely on the logarithmic probability difference between the original text and the perturbated text. This essentially only utilizes the likelihood maximization objective of the surrogate model during the supervised fine-tuning phase. The generative objective measures surface-level attributes such as text fluency and coherence, which are precisely the parts that modern large language models can already imitate with high fidelity. Therefore, the log probability curvature itself is an unrobust discriminative signal. Even if we replace the surrogate model with a more capable instruction fine-tuning model according to existing conclusions, the curvature distribution of human text and machine text still overlaps significantly, and the detection rate is particularly unsatisfactory under the constraint of low false alarm rate. At the same time, modern instruction fine-tuning models have generally undergone preference optimization through RLHF and DPO and have learned to capture preference signals beyond surface attributes, but existing methods do not utilize this capability at all.

[0006] In summary, existing technologies for machine-generated text detection suffer from two main problems: First, the discriminative signal is derived solely from logarithmic probabilities, reflecting only the model's supervised fine-tuning objectives and the surface fluency of the text. This results in significant overlap between the distributions of machine-generated text features and human-written text features, leading to weak discriminative ability. Second, the implicit preference capabilities inherent in the surrogate model after preference optimization are not fully exploited, failing to transform them into stronger discriminative criteria. These issues result in poor detection performance of existing technologies. Therefore, it is necessary to provide a machine-generated text detection method and system that can utilize preference-aware information, requires no labeled training, and achieves higher detection accuracy and efficiency. Summary of the Invention

[0007] The purpose of this invention is to provide a machine-generated text detection method and system based on preference-aware curvature measurement. The implicit reward of the original text is obtained by the ratio of the conditional probability of the policy model and the reference model. The expected value of the perturbation implicit reward is obtained by weighted aggregation of the sampling model on the vocabulary according to the perturbation sampling distribution. Then, the normalized deviation is calculated as the preference-aware curvature. The curvature measurement is transferred from the log probability space to the implicit reward space. The normalized deviation of the implicit reward of the original text relative to the expected implicit reward of the perturbation word is used as the preference-aware curvature. This fully utilizes the implicit preference ability of the surrogate model after preference learning, and breaks through the technical limitation of existing methods that only rely on log probability and surface fluency. Moreover, it can more reliably distinguish between machine-generated text and human-written text without the need for labeled data and trained classifiers.

[0008] The objective of this invention is achieved through the following technical solution: A machine-generated text detection method based on preference-aware curvature metric, the method comprising: S1. Construct a text detection model including the original text implicit reward model, the perturbation implicit reward model, and the preference-aware curvature measurement module. Obtain the conditional log probability ratio of each position in the original text of the research text input and use it as the implicit reward. S2, Perturbation-based Implicit Reward Model for Studying Original Text Location Replace the perturbation words in the perturbation word table and calculate their positions. The expected implicit reward; S3. The Preference-Aware Curvature Measurement Module calculates the normalized deviation of the implicit reward of the original research text relative to the expected implicit reward of the perturbed word as the preference-aware curvature. S4. The text detection model has a preset judgment threshold. If the preference perception curvature is greater than the judgment threshold, it is judged as machine-generated text.

[0009] To better implement this invention, the text detection model includes a strategy model and a reference model. The strategy model is used to optimize the research text using DPO preferences, and the reference model is used as the base model before DPO preference optimization. The original text implicit reward model includes original text lexical units. In position Implicit rewards The expression is as follows: ,in The policy model represents the policy model given the preceding context. Assigning original words to terms under certain conditions The conditional probability; Indicates that the reference model is in the given context Assigning original words to terms under certain conditions The conditional probability; given the preceding text For the original word units In position The preceding context; Optimize the DPO temperature coefficient to suit preferences.

[0010] Preferably, in method S2, a perturbation lexical table is constructed in the perturbation implicit reward model. The perturbation lexical table includes several candidate lexical units, and the perturbation sampling distribution of the candidate lexical units is recorded in the perturbation lexical table. The perturbation implicit reward model traverses all candidate lexical units in the perturbation lexical table and obtains their positions. The expected implicit reward.

[0011] Preferably, the perturbation implicit reward model is located at... Expected implicit reward under perturbation sampling distribution The expression is as follows: ,in This indicates that candidate lexical elements are assigned to the perturbation lexical table. The sampling probability; The policy model represents the policy model given the preceding context. Assigning candidate word elements under certain conditions The conditional probability; Indicates that the reference model is in the given context Assigning word elements under certain conditions The conditional probability; This indicates that the conditional logarithmic probability ratio is weighted by the sampling probability.

[0012] Preferably, in method S3, the normalized bias of the preference-perceived curvature measurement module is... The expression is as follows: ,in This is an implicit reward for the original word units. Let be the mean of the expected implicit reward for the perturbation word. The preference-aware curvature measurement module uses the standard deviation of the implied reward expected by the perturbation lexical unit as the normalized bias. As a preference-perceived curvature.

[0013] Preferably, in method S3, the preference-aware curvature measurement module calculates the preference-aware curvature at each position; in method S4, the text detection model performs a preset judgment threshold judgment on each position and outputs the judgment result for each position.

[0014] Preferably, the text detection model selects a certain interval of text or the entire text in the research text, aggregates the implicit reward of the certain interval of text or the entire text according to method S1, aggregates the expected implicit reward of the certain interval of text or the entire text according to method S2, aggregates the preference-perceived curvature of the certain interval of text or the entire text according to method S3, and outputs the judgment result of whether the certain interval of text or the entire text is machine-generated text according to the judgment method of method S4.

[0015] Preferably, the DPO preference optimization expression for the text detection model is as follows: ,in This represents a preference dataset that includes cue words; This indicates that a preference triple is obtained by sampling from the preference dataset; Indicates a preference sample; This represents a non-biased sample; Represents the Sigmoid function; Indicator words With preference samples The corresponding rewards; Indicator words With non-preference samples The corresponding rewards; This indicates the reward interval between the two; This means mapping the reward interval to an optimizable log-likelihood objective.

[0016] Preferably, in method S4, if the preference perception curvature is less than or equal to the determination threshold, it is determined to be non-machine-generated text, which includes human-written text.

[0017] A machine-generated text detection system based on preference-aware curvature measurement includes a text detection model. The text detection model comprises an original text implicit reward model, a perturbation implicit reward model, and a preference-aware curvature measurement module. The original text implicit reward model obtains the conditional log probability ratios at various positions in the original text and uses them as implicit rewards. The perturbation implicit reward model uses the position of the original text... Replace the perturbation words in the perturbation word table and calculate their positions. The expected implicit reward; the preference-aware curvature measurement module calculates the normalized deviation of the implicit reward of the original text of the study text relative to the expected implicit reward of the perturbation word as the preference-aware curvature; the text detection model has a preset judgment threshold, and if the preference-aware curvature is greater than the judgment threshold, it is judged as machine-generated text.

[0018] Compared with the prior art, the present invention has the following advantages and beneficial effects: (1) The implicit reward of the original text is obtained by the ratio of the conditional probability of the policy model and the reference model. The expected value of the perturbation implicit reward is obtained by the sampling model on the vocabulary according to the perturbation sampling distribution. Then, the normalized deviation is calculated as the preference perception curvature. In the process, only a single forward propagation is required for the policy model and the reference model, which takes into account both detection accuracy and computational efficiency. The curvature measure is transferred from the log probability space to the implicit reward space. The normalized deviation of the implicit reward of the original text relative to the expected implicit reward of the perturbation word is used as the preference perception curvature. The implicit preference ability of the proxy model after preference learning is fully utilized, which breaks through the technical limitation of existing methods that only rely on log probability and surface fluency. Moreover, it can more reliably distinguish between machine-generated text and human-written text without the need for labeled data and training classifiers.

[0019] (2) This invention supports location-level, interval-level and full-text-level detection; it can calculate the preference-aware curvature of each location and make threshold judgments, and it can also aggregate the implicit reward, expected implicit reward and preference-aware curvature of a certain interval or the whole text in the research text and output the corresponding judgment results. The application is flexible.

[0020] (3) The present invention achieves superior detection performance compared to existing methods on publicly available benchmarks such as DetectRL, HART, MIRAGE (DIG), and MIRAGE (SIG). Compared to the strongest training-free baseline IRM, the present invention achieves relative improvements of 3.49%, 3.13%, and 10.66% in AUROC, AUPR, and TPR@5%FPR, respectively. Compared to Fast-DetectGPT, it achieves a relative improvement of 6.91% in average AUROC. In terms of robustness, the present invention achieves an average AUROC of 95.44% in the face of adversarial attacks such as cue word attacks, rewriting attacks, perturbation attacks, and data mixing. The AUROC exceeds 90% when the input consists of only 100 words and remains stable above 97% for long texts. In terms of efficiency, the present invention has an inference speed of 0.12 seconds per thousand words, achieving a good balance between performance and speed. Moreover, the present invention does not depend on specific model selection. Its detection performance remains stable when changing the strategy model, reference model, or sampling model. The threshold transfer experiment across datasets also shows that the obtained decision boundary has good stability across different datasets. Attached Figure Description

[0021] Figure 1 This is a schematic diagram of the machine-generated text detection method of the present invention; Figure 2 This is a schematic diagram illustrating the principle of the machine-generated text detection method in this embodiment. Detailed Implementation

[0022] The present invention will be further described in detail below with reference to embodiments: Example Curvature-based detection methods determine text sources by quantifying probability curvature, where curvature is defined as: ; in, Represents probability curvature; Indicates the candidate text to be detected; This represents the surrogate model used for scoring text, i.e., the scoring model, whose parameters are: ; The proxy model assigns the original text The logarithmic probability; This represents the perturbed text obtained after applying word selection perturbation to the original text. This represents the model used to generate the perturbation variant, i.e., the sampling model, whose parameters are... In earlier schemes of this type of method, DetectGPT, the masking model (such as the T5 model) was responsible for this task. In the given original text The distribution of perturbation text generated under the condition of, where Placeholders for perturbed text; Indicates perturbation text It was sampled from the perturbation distribution; Represents the mathematical expectation; This represents the expected logarithmic probability of the perturbed text under the surrogate model. Machine-generated text exhibits positive curvature because the probability decreases significantly after perturbation for each perturbation variant. calculate In such cases, multiple forward propagations along the entire Markov chain are required, resulting in high computational costs. To overcome this efficiency issue, subsequent methods introduce conditional probability sampling, replacing the joint probability with the conditional logarithmic probability: ; in, Indicates the first Replacement lexical units obtained by upsampling at each lexical unit position; Indicates the first in the original text The context prefix preceding each position, i.e. ; Indicates that in the given original text prefix Under the condition that the proxy model assigns replacement morphemes The conditional probability, It is in logarithmic form; the left side of equation (2) takes the expected value of the conditional logarithmic probability of the perturbation lexical at that position in terms of realization; Represents a vocabulary; Vocabulary Candidate word elements; Represents the sampling model Given the original text prefix Under the conditions, at the position Generating lexical units The conditional probability; The proxy model assigns lexical units under the same conditions. The conditional logarithmic probability; Indicated in the vocabulary Summation; This indicates multiplication. The meaning of this expression is: substitution of words. From the sampling model In position Above, based on the original text context The conditional log probability of a given position is obtained by independently sampling from the vocabulary and then weighting and aggregating the samples on the vocabulary according to their distribution.

[0023] Specifically, let the input text be... The length is Then the conditional probability curvature is defined as: ; in, Representing text The number of morphemes contained; This represents the conditional logarithmic probability of the original text, which is the sum of the logarithmic probabilities of each word in the original text given the preceding context. Indicates the original text's number Each word element, Indicates the proxy model in a given prefix Time assigns original word elements The conditional probability; This represents the expected mean of the conditional log probability of the perturbed sample; The standard deviation of the conditional log probability of the perturbation sample; This represents the deviation of the logarithmic probability of the original condition from the expected value of the perturbation, divided by... The normalized curvature is obtained.

[0024] Perturbation samples The logarithmic probability, mean, and variance are respectively: ; in, Indicates that in the given original text The entire perturbed text was obtained by sampling under the given conditions. Distribution; Indicates perturbation text Conditional logarithmic probability under the original text context; The variance of the conditional log probability of the perturbation sample is expressed as the arithmetic square root of which is the standard deviation in equation (3). .

[0025] Expanding the above expectation in the conditional probability form of equation (2), it can be efficiently calculated as follows: ; as well as: ; in, Indicates the first The expected log probability of each word position, weighted according to the sampling distribution; Indicates word elements The conditional logarithmic probability is the squared deviation of the expected value at that position. This form allows curvature calculation to be performed with only a single forward propagation of the scoring model, significantly reducing computational overhead while maintaining detection effectiveness.

[0026] like Figure 1As shown, a machine-generated text detection method based on preference-aware curvature metric is described, the method comprising: S1. Construct a text detection model including an original implicit reward model, a perturbation implicit reward model, and a preference-aware curvature measurement module. Obtain the conditional log probability ratio at each position in the original text of the research text as the implicit reward. Preferably, the text detection model includes a policy model and a reference model. The policy model is used to optimize the research text using DPO (Direct Preference Optimization), and the reference model is used as the base model before DPO optimization. The expression for DPO preference optimization (also known as PPO optimization objective, which maximizes the expected reward while constraining the policy model to closely approximate the reference model) of the text detection model is as follows: ,in This represents a preference dataset that includes cue words; This indicates that a preference triple is obtained by sampling from the preference dataset; Indicates a preference sample; This represents a non-biased sample; Represents the Sigmoid function; Indicator words With preference samples The corresponding rewards; Indicator words With non-preference samples The corresponding rewards; This indicates the reward interval between the two; This represents mapping the reward interval to an optimizable log-likelihood objective. The implicit reward is given by the likelihood ratio between the policy model and the reference model, expressed as follows: ,in This represents the implicit reward defined by the log-probability ratio between the policy model and the reference model; This represents the likelihood ratio of the strategy model relative to the reference model. The logarithm of the likelihood ratio is represented in this form, which allows the model to optimize the policy directly from the preference pairs without training a separate reward model.

[0027] The optimization objective of Proximal Policy Optimization (PPO) in reinforcement learning based on human feedback is expressed as follows: ,in Indicates the parameters of the policy model Maximize; Indicates a prompt word; Indicated by the policy model The sampled text; The representation strategy model is based on the given prompt word. Generation distribution at time; Representing text Sample from the generated distribution; This indicates that the pre-trained reward model responds to "cue words". With text "Quality rating of this pairing;" The coefficient representing the strength of the KL divergence penalty between the control strategy model and the reference model; Represents the reference model; The representation strategy model is based on the given prompt word. Text generated in time The conditional probability; This indicates that the reference model is in response to a given prompt word. Text generated in time The conditional probability; This represents the KL divergence (KLDivergence) between the distribution generated by the policy model and the distribution generated by the reference model. It is used to constrain the policy model from deviating excessively from the reference model.

[0028] In some embodiments, the original text lexical units in the original text implicit reward model In position Implicit rewards The expression is as follows: ,in The policy model represents the policy model given the preceding context. Assigning original words to terms under certain conditions The conditional probability; Indicates that the reference model is in the given context Assigning original words to terms under certain conditions The conditional probability; given the preceding text For the original word units In position The preceding context; Optimize the DPO temperature coefficient to suit preferences. (Text) The length is For example, implicit rewards The expression is as follows: ;in Indicates the original text Implicit rewards; Representing text Length; Indicates the first Each word element; The policy model represents the policy model given a prefix. Time assigns original word elements The conditional probability; Indicates the reference model under a given prefix Time assigns original word elements The conditional probability; Indicates the first The conditional log probability ratio of the strategy model relative to the reference model at each position; This means that the logarithmic probability ratios at each position are accumulated along the entire text. In this invention, the instruction fine-tuning model, which serves as the surrogate model, is a policy model optimized by preferences. The corresponding base model or the model before preference optimization is used as the reference model. .

[0029] In some embodiments, the implicit reward principle of the text detection model is as follows: The closed-form expression for the optimal policy solution of the DPO preference optimization of the text detection model is as follows: ,in Indicates word elements Given prompt words The optimal strategy distribution at that time; The normalized partition function used to distribute the policy is defined as follows: ,in This represents the summation over all possible word elements; Represents an exponential function; Represented by coefficient The scaled reward. After rearranging the formula, the reward can be expressed as a function of the policy model and the reference model, resulting in the implicit reward expression as follows: ; in, This indicates the relationship between the partition function and the text. Irrelevant, solely dependent on prompt words Additional features. In detection tasks, this invention scores the text directly, without relying on cue words, that is, it allows... and will Take the text to be detected, where This indicates an empty prompt. Under this no-prompt setting, the allocation function item... This becomes a constant shared across all texts to be detected. Since the final calculation is the difference in reward between the original text and the perturbed text, the constant terms appearing at both ends will cancel each other out, and therefore can be omitted without loss of generality.

[0030] S2, Perturbation-based Implicit Reward Model for Studying Original Text Location Replace the perturbation words in the perturbation word table and calculate their positions. The expected implicit reward. In some embodiments, a perturbation lexical table is constructed in the perturbation implicit reward model. Includes several candidate lexical units, perturbation lexical unit table The corresponding record contains the perturbation sampling distribution of candidate lexical units. The perturbation implicit reward model in the perturbation morpheme table Above, based on the original text context Conditional sampling is performed; in the perturbation implicit reward model, all candidate lexics in the perturbation lexical table are traversed and their positions are obtained. The expected implicit reward. Preferably, the perturbation implicit reward model is at position Expected implicit reward under perturbation sampling distribution The expression is as follows: , That is to say ,in This indicates that candidate lexical elements are assigned to the perturbation lexical table. The sampling probability; The policy model represents the policy model given the preceding context. Assigning candidate word elements under certain conditions The conditional probability; Indicates that the reference model is in the given context Assigning word elements under certain conditions The conditional probability; This indicates that the conditional log probability ratio is weighted by the sampling probability. (Based on the entire text...) The length is For example, by aggregating the positions, we can obtain the expected implicit reward of the entire perturbated text, expressed as follows: ; in, Indicates the relationship with the original text The corresponding perturbation text expects an implicit reward. This form only requires an adjustment to the policy model. Compared with the reference model Each forward propagation can characterize the expected implicit reward form under perturbation.

[0031] S3. The preference-aware curvature measurement module calculates the normalized deviation of the implicit reward of the original research text relative to the expected implicit reward of the perturbed lexical unit as the preference-aware curvature. In some embodiments, the normalized deviation of the preference-aware curvature measurement module... The expression is as follows: ,in This is an implicit reward for the original word units. Let be the mean of the expected implicit reward for the perturbation word. The standard deviation of the expected implicit reward for the perturbation lexical is used by the preference-aware curvature measurement module to normalize the bias. As a preference-perceived curvature.

[0032] With text The length is For example, see the following example: Due to the scaling factor Simultaneously appearing and In this case, it precisely cancels out the normalization bias, and therefore can be omitted; therefore, the following simplified form is adopted: ; as well as: ; Equations (16) and (17) are equations (12) and (15) after removing coefficients, respectively. The latter form, and the two in the subsequent normalized curvature with... The forms are equivalent. In this embodiment, the preference-perceived curvature is defined as the normalized bias fraction: ; in, Indicates candidate text In strategy model Reference Model With sampling model The perceived curvature of preferences; The original implicit reward given by equation (16); This represents the expected mean of the implicit reward for the perturbation sample; The standard deviation represents the implicit reward of the perturbation sample; This represents the deviation of the original reward from the expected perturbation reward, divided by... The normalized curvature score is obtained. This form naturally aligns with the training objective of DPO: treating the original text as the preferred sample and the perturbation variant as the unpreferred sample, it measures the reward interval that is explicitly amplified during training of the surrogate model. Expanding the expectation according to equation (17), it can be efficiently calculated as: ; as well as: ; ; in, In calculation, it is consistent with equation (17) Consistency indicates the expected implicit reward of the entire text perturbation; The variance of the implied reward for the perturbation is expressed as the arithmetic square root of which is given by equation (18). ; Indicates the first The expected implicit reward for the perturbation word element at each position; Indicates word elements The conditional implicit reward is the squared deviation of the expected value relative to that position.

[0033] S4. The text detection model has a preset judgment threshold. If the preference perceptual curvature is greater than the judgment threshold, it is judged as machine-generated text; if the preference perceptual curvature is less than or equal to the judgment threshold, it is judged as non-machine-generated text. Non-machine-generated text includes human-written text. (The text then lists candidate texts.) An example is provided below: After obtaining the preference-perceived curvature... Then, in this embodiment, it is compared with a given threshold to make a final detection decision, as shown in the following expression: ; in, Indicates the candidate text The test results; The preference-perceived curvature defined by equation (18) abbreviation; This represents the threshold for judgment; before practical application, the threshold... On a certain dataset, the score distribution of machine-generated text and human-written text should be calculated, and a trade-off should be made between the false positive rate and the true positive rate. A higher curvature indicates that the original text is at the reward maximum characteristic of machine generation, while a lower curvature indicates that the reward of the original text is closer to the perturbation mean, which is more consistent with the characteristics of human writing.

[0034] In some embodiments, in method S3, the preference-aware curvature measurement module calculates the preference-aware curvature at each position; in method S4, the text detection model performs a preset judgment threshold judgment on each position and outputs the judgment result for each position.

[0035] In some embodiments, the text detection model selects a certain interval of text or the entire text in the research text, aggregates the implicit reward of the certain interval of text or the entire text according to method S1, aggregates the expected implicit reward of the certain interval of text or the entire text according to method S2, aggregates the preference-aware curvature of the certain interval of text or the entire text according to method S3, and outputs the judgment result of whether the certain interval of text or the entire text is machine-generated text according to the judgment method of method S4.

[0036] like Figure 1 , Figure 2 As shown, a machine-generated text detection method based on preference-aware curvature metric (IRM) comprises three main components. First, it constructs an implicit reward model for the original text; the reward for the original text is designed directly with reference to existing IRM methods, i.e., using a policy model. Compared with the reference model The log probability ratio is used to calculate the implicit reward in the original text. This embodiment also uses IRM (ImplicitRewardModel) as the abbreviation for the implicit reward model of the original text; existing IRM methods have been verified to directly utilize this type of implicit reward for detection, and this embodiment further extends this framework to perturbation text; secondly, an implicit reward model for perturbation text is constructed; specifically, the expected reward is calculated on the distribution of perturbation lemmas. In the vocabulary Up sampling model The given sampling distribution is used to weight and aggregate word probabilities. Inspired by conditional probability sampling, this form can be efficiently calculated using a single forward propagation. Third, a preference-aware curvature metric is performed to quantify the results. and The normalization bias between them; machine-generated text exhibits strong preference discriminant, i.e., positive curvature, because it is at a local maximum of reward. In other words, treating the original text as a preferred sample and the perturbation variant as a non-preferred sample, this embodiment measures the reward interval that is explicitly amplified in preference optimization by the surrogate model, thereby deriving a stronger preference discrimination signal from the DPO objective. The machine-generated text satisfies Significantly higher than .

[0037] A machine-generated text detection system based on preference-aware curvature measurement includes a text detection model. The text detection model comprises an original text implicit reward model, a perturbation implicit reward model, and a preference-aware curvature measurement module. The original text implicit reward model obtains the conditional log probability ratios at various positions in the original text and uses them as implicit rewards. The perturbation implicit reward model uses the position of the original text... Replace the perturbation words in the perturbation word table and calculate their positions. The expected implicit reward is calculated; the preference-aware curvature measurement module calculates the normalized deviation of the implicit reward of the original text relative to the expected implicit reward of the perturbation word as the preference-aware curvature; the text detection model has a preset judgment threshold, and if the preference-aware curvature is greater than the judgment threshold, it is judged as machine-generated text.

[0038] This embodiment conducts testing: the present invention achieves state-of-the-art detection performance on four publicly available benchmarks: DetectRL, HART, MIRAGE (DIG), and MIRAGE (SIG). Compared to the strongest training-free baseline IRM, the present invention achieves relative improvements of 3.49%, 3.13%, and 10.66% in AUROC, AUPR, and TPR@5%FPR, respectively, with a relative improvement of 8.65% in AUROC on the more challenging HART benchmark for mixed text detection. Compared to Fast-DetectGPT, which also uses the curvature paradigm, the present invention achieves an average relative improvement of 6.91% in AUROC. Compared to the best-performing training-based method DetectAnyLLM, the present invention achieves a relative improvement of 11.15% in AUROC on DetectRL with a 96.53% improvement over 86.85%. In terms of robustness, facing four types of adversarial attacks—cue word attacks, rewriting attacks, perturbation attacks, and data mixing attacks—the average AUROC of this invention reaches 95.44%, exceeding IRM by 2.78% and DNA-DetectLLM by 4.35%, with an AUROC of 96.95% against perturbation attacks. Regarding text length, this invention achieves an AUROC exceeding 90% with only 100 words as input, while other methods require more than 120 words, maintaining a stable AUROC above 97% for long texts. In terms of efficiency, the inference speed of this invention is 0.12 seconds per thousand words, faster than Binoculars' 0.17 seconds and DNA-DetectLLM's 0.19 seconds, achieving an optimal trade-off between performance and speed.

[0039] Secondly, this invention also underwent thorough ablation and attribution verification. When the static KL divergence of the policy model and the reference model was used as a detector alone, the AUROC on the four benchmarks was only 0.47 to 0.58, close to random guessing, indicating that the performance gain did not come from the static difference between the model pairs, but from the preference-perceived curvature measure itself. When changing the model pairs, the combination of Llama-3.2-1B-Instruct and Llama-3.2-1B achieved an average AUROC of 97.93%, while the combinations of Gemma-2-2B and Qwen2.5-1.5B were 96.10% and 95.40%, respectively, with very small differences. When changing the sampling model, the performance remained stable between 95.55% and 97.97%, proving that the effectiveness of this invention does not depend on specific model selection. In the cross-dataset threshold transfer experiment, the accuracy of the present invention under four transfer settings was 94.25%, 93.55%, 91.66% and 91.51%, respectively, which fully exceeded the trained and untrained baselines, indicating that the derived decision boundary remains stable across different datasets.

[0040] In summary, this invention effectively taps into the implicit preference capabilities inherent in preference optimization models, elevates curvature measurement from probability space to implicit reward space, and significantly enhances the separability between human-written text and machine-generated text.

[0041] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A machine-generated text detection method based on preference-aware curvature measurement, characterized in that, The methods include: S1. Construct a text detection model including the original text implicit reward model, the perturbation implicit reward model, and the preference-aware curvature measurement module. Obtain the conditional log probability ratio of each position in the original text of the research text input and use it as the implicit reward. S2, Perturbation-based Implicit Reward Model for Studying Original Text Location Replace the perturbation words in the perturbation word table and calculate their positions. The expected implicit reward; S3. The Preference-Aware Curvature Measurement Module calculates the normalized deviation of the implicit reward of the original research text relative to the expected implicit reward of the perturbation word as the preference-aware curvature. S4. The text detection model has a preset judgment threshold. If the preference perception curvature is greater than the judgment threshold, it is judged as machine-generated text.

2. The machine-generated text detection method based on preference-aware curvature metric according to claim 1, characterized in that, The text detection model includes a strategy model and a reference model. The strategy model is used to optimize the research text using DPO preferences, while the reference model is used as the base model before DPO preference optimization. The original text implicit reward model includes original text words. In position Implicit rewards The expression is as follows: ,in The policy model represents the strategy model given the preceding context. Assigning original words to terms under certain conditions The conditional probability; Indicates that the reference model is in the given context Assigning original words to terms under certain conditions The conditional probability; given the preceding text For the original word units In position The preceding context; Optimize the DPO temperature coefficient to suit preferences.

3. The machine-generated text detection method based on preference-aware curvature metric according to claim 2, characterized in that, In method S2, a perturbation lexical table is constructed in the perturbation implicit reward model. The perturbation lexical table includes several candidate lexical units, and the perturbation sampling distribution of the candidate lexical units is recorded in the perturbation lexical table. The perturbation implicit reward model traverses all candidate lexical units in the perturbation lexical table and obtains their positions. The expected implicit reward.

4. The machine-generated text detection method based on preference-aware curvature metric according to claim 3, characterized in that, The perturbation implicit reward model is located at... Expected implicit reward under perturbation sampling distribution The expression is as follows: ,in This indicates that candidate lexical elements are assigned to the perturbation lexical table. The sampling probability; The policy model represents the strategy model given the preceding context. Assigning candidate word elements under certain conditions The conditional probability; Indicates that the reference model is in the given context Assigning word elements under certain conditions The conditional probability; This indicates that the conditional logarithmic probability ratio is weighted by the sampling probability.

5. The machine-generated text detection method based on preference-aware curvature metric according to claim 1, characterized in that, In method S3, the normalized bias of the preference-aware curvature metric module. The expression is as follows: ,in This is an implicit reward for the original word units. Let be the mean of the expected implicit reward for the perturbation word. The preference-aware curvature measurement module uses the standard deviation of the implied reward expected by the perturbation lexical unit as the normalized bias. As a preference-perceived curvature.

6. The machine-generated text detection method based on preference-aware curvature metric according to claim 1, characterized in that, In method S3, the preference-aware curvature measurement module calculates the preference-aware curvature at each position; in method S4, the text detection model performs a preset judgment threshold judgment on each position and outputs the judgment result for each position.

7. The machine-generated text detection method based on preference-aware curvature metric according to claim 1, characterized in that, The text detection model selects a certain interval of text or the entire text in the research text, aggregates the implicit reward of the certain interval of text or the entire text according to method S1, aggregates the expected implicit reward of the certain interval of text or the entire text according to method S2, aggregates the preference-perceived curvature of the certain interval of text or the entire text according to method S3, and outputs the judgment result of whether the certain interval of text or the entire text is machine-generated text according to the judgment method of method S4.

8. The machine-generated text detection method based on preference-aware curvature metric according to claim 1, characterized in that, The DPO preference optimization expression for the text detection model is as follows: ,in This represents a preference dataset that includes cue words; This indicates that a preference triple is obtained by sampling from the preference dataset; Indicates a preference sample; This represents a non-biased sample; Represents the Sigmoid function; Indicator words With preference samples The corresponding rewards; Indicator words With non-preference samples The corresponding rewards; This indicates the reward interval between the two; This means mapping the reward interval to an optimizable log-likelihood objective.

9. The machine-generated text detection method based on preference-aware curvature metric according to claim 1, characterized in that, In method S4, if the preference perception curvature is less than or equal to the judgment threshold, it is judged as non-machine-generated text, which includes human-written text.

10. A machine-generated text detection system based on preference-aware curvature measurement, characterized in that, This includes a text detection model, which comprises an original implicit reward model, a perturbation implicit reward model, and a preference-aware curvature metric module. The original implicit reward model obtains the conditional log probability ratio at each position in the original text and uses it as the implicit reward. The perturbation implicit reward model uses the position of the original text as the implicit reward. Replace the perturbation words in the perturbation word table and calculate their positions. The expected implicit reward; The preference-aware curvature measurement module calculates the normalized deviation of the implicit reward of the original research text relative to the expected implicit reward of the perturbation word as the preference-aware curvature; the text detection model has a preset judgment threshold, and if the preference-aware curvature is greater than the judgment threshold, it is judged as machine-generated text.