Machine generated text detection method and device and storage medium

Through probability distribution estimation technology combined with white box detection method, the high cost and low efficiency problems of detecting private large language models in the prior art are solved, and machine-generated text detection with fast speed, high accuracy and versatility are achieved.

CN119272757APending Publication Date: 2025-01-07WESTLAKE UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411331683.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

Existing machine-generated text detection methods have shortcomings in terms of efficiency, accuracy and versatility, especially when detecting text generated by private large language models, the calculation cost is high, the calculation time is long, and multiple indicators cannot be taken into account.

Method used

Through probability distribution estimation technology, combined with white box detection method, the Top-K word probability generation module, complete distribution estimation module and detection module of the large language model are used, and the geometric distribution, Zipfian distribution or MLP model distribution is used to calculate the conditional probability curvature index. Determine whether the text is machine-generated.

Benefits of technology

It realizes machine-generated text detection with fast speed, low cost, high accuracy and versatility, which exceeds the detection accuracy and versatility of existing methods and can effectively detect text in different fields and languages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119272757A_ABST
    Figure CN119272757A_ABST
Patent Text Reader

Abstract

The invention relates to a machine generated text detection method and device and a storage medium. The detection method comprises the following steps that a to-be-detected text is obtained, and the probability of generating Top-K words at the current position is predicted by a large language model according to context; adopting a probability distribution estimation algorithm to estimate and obtain a complete distribution probability according to the probability of the Top-K word; and judging whether the to-be-detected text is a machine-generated text or not according to the complete distribution probability. Compared with the prior art, the method has the advantages that the existing white box detection method can also be used for the black box model through the probability distribution estimation technology, so that the high efficiency and the universality of the white box method can be utilized, the universality of the most advanced private large language model can also be utilized, and the accuracy, the speed and the universality are considered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of large language models, and in particular to a method, device and storage medium for detecting machine-generated text. Background Art

[0002] Large language models (LLMs) have had a profound impact in various fields. These models have improved productivity in fields as diverse as news reporting, story writing, and academic research. However, their misuse has also caused some problems, especially in fake news, malicious product reviews, and plagiarism. The content generated by these models is so fluent and coherent that even experts find it difficult to distinguish whether it is a human or machine source. Therefore, we need reliable machine-generated text detection methods to solve this problem.

[0003] Existing detectors can be mainly divided into two categories: supervised classifiers and zero-shot classifiers. While supervised classifiers perform well in their specific training domain, they perform poorly when faced with text from different domains or generated by unfamiliar models. Zero-shot classifiers are immune to domain-specific degradations and can be comparable to supervised classifiers in detection accuracy.

[0004] However, typical zero-shot classifiers, such as DetectGPT and DNA-GPT, need to perform multiple model calls or interact with services such as the OpenAI API to create perturbed text, which results in excessively high computational costs and long computational times. At the same time, it requires the source language model that generates the text to perform detection calculations, making this method unusable for detecting text generated by unknown models. More efficient zero-shot detectors (such as Fast-DetectGPT) often require the use of the full predictive distribution of the language model (called white-box methods), making these methods only usable on open source large language models (called white-box models) and not on the latest and most advanced private large language models (called black-box models). These limitations make it difficult for us to balance multiple indicators such as efficiency, accuracy, and versatility. Summary of the invention

[0005] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and to provide a machine-generated text detection method, device and storage medium that take into account multiple indicators such as high efficiency, accuracy and versatility.

[0006] The purpose of the present invention can be achieved by the following technical solutions:

[0007] In a first aspect, the present invention provides a method for detecting machine-generated text, comprising the following steps:

[0008] Get the text to be tested, and use the large language model to predict the probability of the top-K words at the current position based on the context;

[0009] Using a probability distribution estimation algorithm, the complete distribution probability is estimated based on the probability of the Top-K words;

[0010] It is determined whether the text to be detected is machine-generated text according to the complete distribution probability.

[0011] Furthermore, when the estimation obtains the complete distribution probability, the estimation problem is regarded as a constraint satisfaction problem, and the basic constraints include a total probability constraint and a monotonically decreasing constraint.

[0012] Furthermore, when the estimation obtains the complete distribution probability, the parameterized distribution type adopted includes geometric distribution, Zipfian distribution or MLP model distribution.

[0013] Furthermore, a white-box detection method is used to determine whether the text to be detected is machine-generated text according to the complete distribution probability, and the white-box detection method includes Entropy, Rank, LogRank or Fast-DetectGPT.

[0014] Further, judging whether the to-be-detected text is a machine-generated text according to the complete distribution probability specifically includes:

[0015] Obtaining a conditional probability curvature index based on the complete distribution probability calculation;

[0016] According to the conditional probability curvature index and the set threshold, it is determined whether the text to be detected is machine-generated text.

[0017] Furthermore, obtaining the conditional probability curvature index specifically includes:

[0018] Based on the complete distribution probability, randomly sampling a number of possible candidate words from the distribution;

[0019] Using a large language model to score the candidate words and calculate the probability of the candidate words;

[0020] The actual word probability and the candidate word probability at each position of the text sequence are compared to calculate and obtain the conditional probability curvature index.

[0021] In a second aspect, the present invention further provides a machine-generated text detection device, comprising:

[0022] The Top-K word probability generation module is used to obtain the text to be detected, and the large language model generates the probability of the Top-K word at the current position based on the context prediction;

[0023] A complete distribution estimation module, used to estimate the complete distribution probability according to the probability of the Top-K words using a probability distribution estimation algorithm;

[0024] A detection module is used to determine whether the text to be detected is machine-generated text based on the complete distribution probability.

[0025] Furthermore, in the complete distribution estimation module, the estimation problem is regarded as a constraint satisfaction problem, and the basic constraints include a total probability constraint and a monotonically decreasing constraint.

[0026] Furthermore, in the detection module, a white-box detection method is used to determine whether the text to be detected is machine-generated text according to the complete distribution probability, and the white-box detection method includes Entropy, Rank, LogRank or Fast-DetectGPT.

[0027] In a third aspect, the present invention also provides a computer-readable storage medium, comprising one or more programs for execution by one or more processors of an electronic device, wherein the one or more programs include instructions for executing the machine-generated text detection method as described above.

[0028] Compared with the prior art, the present invention makes it possible to combine the traditional white-box detection method that can only be used for open source models with the black-box private model through the probability distribution estimation technology, combining the efficiency of the white-box method with the accuracy and versatility of the black-box model to obtain a high detection accuracy and versatility that exceeds the existing methods. The present invention has the following advantages:

[0029] Beneficial effects:

[0030] 1. Fast speed and low cost. In terms of speed, the present invention is more than 100 times that of DetectGPT and more than 4 times that of DNA-GPT; in terms of cost, it is 1% of DetectGPT and 1 / 10 of DNA-GPT. Given a piece of text to be detected, DetectGPT needs to call the T5 model to generate 100 perturbed texts (small local rewrites) for this text, and then call the private model 100 times, score these 100 perturbed texts respectively, obtain their logarithmic probabilities, and then calculate the probability curvature index for discrimination. DNA-GPT divides the text to be detected into two sections, calls the private large model to complete the first section of text 10 times, obtains 10 generated second sections of text, calculates the similarity between the generated second section of text and the original second section of text (the ratio of n-gram overlap), and then obtains the detection index. Unlike these methods, the probability distribution estimation technology only needs to call the model once to calculate the detection index, without generating any new text. Therefore, the present invention has the advantages of fast speed and low cost.

[0031] 2. Accurate. Compared with the white-box method using open source models (parameters of several B to dozens of B), the present invention is based on the probability distribution estimation technology PDE. PDE can use larger-scale private models (parameters of hundreds of B to thousands of B) to give full play to the capabilities of large models. PDE (Fast-DetectGPT) can use GPT-3.5 as a scoring model, and the average accuracy of Fast-DetectGPT using the open source model GPT-Neo-2.7B is increased from 91% to 96% (the average of text detection generated by 5 source models, including ChatGPT, GPT-4, Claude-3 Sonnet, Claude-3 Opus and Gemini-1.5Pro). Compared with other black-box methods, although they also use private large models, their methods of use cannot fully tap the capabilities of large models. PDE can make full use of the output distribution information of the large model to make accurate judgments. Compared with DNA-GPT (GPT-3.5), PDE (Fast-DetectGPT, GPT-3.5) has a greater improvement in accuracy, from an average of 86% for DNA-GPT to 96% for PDE.

[0032] 3. General. The present invention can achieve high detection accuracy in different fields and languages. Both DetectGPT and DNA-GPT assume that the source model used to generate the text is known, and then use this known source model as the scoring model for detection. If it is unknown which model the text comes from, these methods cannot accurately detect the text. PDE (Fast-DetectGPT) can use a fixed scoring model, such as GPT-3.5, to detect texts from different models. For example, DNA-GPT (GPT-3.5) detects text generated by GPT-3.5 with an accuracy of 93%, but only 84% for text generated by GPT-4. PDE (Fast-DetectGPT, GPT-3.5) detects text generated by GPT-3.5 with an accuracy of 98%, and detects text generated by GPT-4 with an accuracy of 95%. Furthermore, in addition to English, in the other 6 languages, including Chinese, Russian, Urdu, Indonesian, Arabic and Bulgarian, PDE (Fast-DetectGPT, GPT-3.5) achieved an average detection accuracy of 97%, while Fast-DetectGPT (GPT-Neo-2.7B) had a detection accuracy of only 92%. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION

[0034] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.

[0035] Example 1

[0036] The present embodiment provides a method for detecting machine-generated text, comprising the following steps: obtaining a text to be detected, and using a large language model to predict the probability of a Top-K word at a current position according to a context; using a probability distribution estimation algorithm (PDE, Probability Distribution Estimation) to estimate a complete distribution probability according to the probabilities of the Top-K words; and judging whether the text to be detected is a machine-generated text according to the complete distribution probability.

[0037] 1) Black Box GPT Model

[0038] In the above method, the probability of the top-K words at the current position is generated by a large language model. The most powerful large language models are mainly private large models developed by various large companies, such as OpenAI's GPT-4, Anthropic's Claude3, Google's Gemini1.5, etc. The use of these large models requires calling the corresponding model service through the API interface. These API interfaces usually only return limited information, such as the generated text, the probability of each word in the text, and the top K words with the highest probability under the current context conditions at each position (usually K is up to 10, which means that only the 10 words with the highest probability can be returned, and K can be at least 1).

[0039] 2) Probability distribution estimation algorithm

[0040] In the above method, the probability distribution estimation algorithm is used to estimate the remaining probabilities based on the Top-K probabilities returned by the private model, thereby forming a complete probability distribution. This probability distribution does not require complete word-probability pairs, only probability values ​​can meet the calculation requirements.

[0041] Take Fast-DetectGPT as an example. and variance Only relies on the probability values ​​in the distribution. That is, we can calculate them using only the 'probability' column of the full distribution in the figure above, where the 'token' column is unnecessary. This advantage is not only applicable to Fast-DetectGPT. Other methods, such as Entropy, Rank, and LogRank, can also be calculated only from probabilities.

[0042] To simplify the following discussion, we denote the probability as p(k), omitting the notation and position j. Using the first K probabilities We estimate that the rest where M represents the size of the list. It is worth noting that M does not have to be as large as the vocabulary size, as larger ranks usually correspond to lower probabilities. When the probabilities are small enough, their impact on the metric is negligible.

[0043] therefore, and is rewritten as:

[0044]

[0045] Therefore, for all possible words The sum of is transformed into the sum of all possible rankings k, where the specific word corresponding to each ranking is irrelevant to the calculation.

[0046] The probability distribution of the rankings follows a decaying pattern. Generally, larger models have higher top probabilities and larger decay factors, and the distribution is sharper. We use a parameterized distribution to approximate the decay trend, distributing the total amount of probability remaining after the top to each ranking.

[0047] In this study, we consider the estimation problem as a constraint satisfaction problem. The basic constraints include: 1) Total probability constraint - the sum of probabilities is equal to 1. 2) Monotonically decreasing constraint - the probability of larger ranks is lower. Using the total probability constraint, we decide how much total probability to assign to ranks greater than K. Using the monotonically decreasing constraint, we can choose a suitable distribution family.

[0048] Each parameterized distribution represents a family of distributions controlled by some parameters. This embodiment uses three parameterized distributions: a) Geometric distribution. We assume that the probability distribution as a whole conforms to the law of geometric distribution and has a fixed attenuation factor. According to the constraints, we estimate the attenuation factor of the geometric distribution, and then generate a complete probability distribution based on this attenuation factor. b) Zipfian distribution. We assume that the probability distribution as a whole conforms to the law of Zipfian distribution. According to the constraints, we estimate the parameters of Zipfian distribution, and then generate a complete probability distribution based on this parameter. c) MLP model distribution. We use the MLP model to model the probability distribution, and use the distribution data obtained on the open source small model to train the MLP model, and then predict the complete probability distribution based on the Top-K probability returned by the large model. Other distribution forms that meet the constraints can also be used.

[0049] This embodiment takes geometric distribution as an example:

[0050] As the simplest decay mode, we consider exponential decay with a fixed decay factor, which produces a geometric distribution. Considering only the Top-1 probability p1, the entire distribution can be estimated by p1:

[0051] p(k)=p1*(1-p1) k-1 ,for k∈[1..∞] (2)

[0052] where the probability decays by a factor of λ=(1-p1). However, this standard geometric distribution only considers the top-1 probability and is defined over infinite k, which is not suitable for finite vocabularies.

[0053] Therefore, we extend the distribution to multiple top probabilities and a finite range of k. We express the probability of a rank greater than K as a nearly geometric distribution:

[0054]

[0055] where λ is a decay factor in the range (0,1) and M is the size of the ranked list.

[0056] Using the total probability constraint, we calculate the total remaining probability of the assignment:

[0057]

[0058] Expanding p(k) in the left expression, we get

[0059]

[0060] and is rewritten as

[0061]

[0062] Assume λ M-K+1 close to zero, we can get an approximate solution:

[0063]

[0064] In practice, we first compute an approximate solution, named λ0, and then check λ M-K+1 is close to zero. If not, we will follow an iterative process to adjust λ until it converges:

[0065]

[0066] In addition to the specific estimation methods listed above, there may be other estimation methods. For example, assuming that the overall distribution conforms to a certain parameterized distribution function, then use the Top-K probability to estimate the parameters of this distribution function, and finally use this distribution function to generate a complete distribution. In addition to the MLP model, we can also use other models to model the distribution. For example, we use the Transformer model. Alternatively, we use an open source small model to predict and generate a complete probability distribution, and then use the Top-K probability of the large model to correct the probability distribution predicted by the small model. In short, we can use different methods to estimate the probability distribution, but the basic principle of using the estimated probability distribution for text detection will not change. And this basic principle is the key to the present invention.

[0067] 3) Conditional Probability Curvature Index

[0068] In the above method, a white box detection method is used to determine whether the text to be detected is a machine-generated text according to the complete distribution probability. The white box detection method includes Entropy, Rank, LogRank or Fast-DetectGPT. This embodiment is described by taking Fast-DetectGPT as an example.

[0069] Fast-DetectGPT believes that there is a difference between human and machine-generated language in the choice of words based on context. Although machines tend to choose words with higher model probability, humans do not necessarily follow this trend. This difference is quantified by a metric called conditional probability curvature.

[0070] Before discussing this metric, let us first understand the conditional probability function it uses. Formally, given a text paragraph x, a proprietary model p θ , and an estimated distribution We express the model's predicted probability as a conditional probability function:

[0071]

[0072] This model represents the predicted distribution when x is used as input. Take the second word position (j=2) of the input paragraph in the figure above as an example. Its context is x <2 = `President', and The possible choices are [`Joe',`Biden',`Donald',...], and their probabilities are [0.37,0.24,0.11,...]. Given the input, the word Different j are independent of each other. This conditional independence allows the algorithm to perform efficient calculations.

[0073] Using the conditional probability function, we define the conditional probability curvature as:

[0074]

[0075] Among them, the proprietary model directly provides the likelihood probability p of each word in the paragraph θ (x j |x <j ), for example, the likelihood probability p of the second word in the paragraph θ (x2=′Joe′|x <2 =′President′) = 0.37. And the expected score and expected variance is to use the estimated distribution Calculated according to the following formula:

[0076]

[0077] In the mathematical expectation of the above formula, represents the sampling step, and Denotes the scoring step, corresponding to the two steps in the figure above. The expectation for the entire sequence is calculated by summing the mathematical expectations of all word positions.

[0078] Mean represents the entropy of the predicted distribution at the jth word. We can calculate its analytical solution by enumerating all possible choices:

[0079]

[0080] For example,

[0081] variance It is also obtained by calculating the analytical solution:

[0082]

[0083] Among them The sum of is achieved by enumerating all possible choices. For example,

[0084] refer to Figure 1As shown in the figure, the above method is explained by taking the extension of probability distribution estimation technology (Fast-DetectGPT with PDE) in the white-box method Fast-DetectGPT as an example. The text detection process shown in the figure includes three steps: a) Sampling (Sample): At each word position, the black-box GPT model predicts the probability of the Top-K words at the current position based on the context. The probability distribution estimation algorithm (PDE) estimates the complete distribution based on the probability of the Top-K words. According to the complete distribution, the sampling algorithm randomly samples several possible candidate words from the distribution. b) Scoring (Cond.Score): Also using the estimated complete distribution, the sampled candidate words can be scored and their probabilities calculated. c) Comparison (Compare): By comparing the probability of the actual word at each position in the text sequence with the probability of the sampled candidate word, the conditional probability curvature index is calculated. According to this index, a suitable threshold is used to determine whether the text is generated by the large language model.

[0085] The above method uses probability distribution estimation technology to enable the existing white-box detection method to be used in black-box models, thereby utilizing the high efficiency and general performance of the white-box method and the general capabilities of the most advanced private large language model. Specifically, at the position of each word in the text sequence, we use the model to predict the possible candidate words at the current position based on its previous context. On the white-box model, we can obtain a complete candidate word distribution covering the entire vocabulary, while on the black-box model, we can only obtain the probabilities of the top few words with the highest probabilities. Based on the probabilities of the top-ranked words, the method of the present invention can be used to estimate and restore the complete distribution, and then, based on the estimated distribution, the existing white-box method can be applied to the black-box private model, thereby greatly improving the effect of text detection and taking into account accuracy, speed and versatility.

[0086] Example 2

[0087] The present embodiment provides a device for detecting machine-generated text, including a Top-K word probability generation module, a complete distribution estimation module and a detection module, wherein: the Top-K word probability generation module is used to obtain a text to be detected, and a large language model is used to generate the probability of a Top-K word at a current position according to context prediction; the complete distribution estimation module is used to adopt a probability distribution estimation algorithm, and estimate the complete distribution probability according to the probability of the Top-K words; the detection module is used to determine whether the text to be detected is a machine-generated text according to the complete distribution probability.

[0088] The rest is the same as in Example 1.

[0089] If the above method is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0090] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The schemes in the embodiments of the present invention may be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.

[0091] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0092] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0093] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0094] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0095] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for detecting machine-generated text, characterized in that: The following steps are involved: Get the text to be tested, and use the large language model to predict the probability of the top-K words at the current position based on the context; Using a probability distribution estimation algorithm, the complete distribution probability is estimated based on the probability of the Top-K words; It is determined whether the text to be detected is machine-generated text according to the complete distribution probability.

2. The machine-generated text detection method according to claim 1, characterized in that: When the estimation obtains the complete distribution probability, the estimation problem is regarded as a constraint satisfaction problem, and the basic constraints include a total probability constraint and a monotonically decreasing constraint.

3. The machine-generated text detection method according to claim 1 or 2, characterized in that: When the estimation obtains the complete distribution probability, the parameterized distribution type adopted includes geometric distribution, Zipfian distribution or MLP model distribution.

4. The machine-generated text detection method according to claim 1, characterized in that: A white-box detection method is used to determine whether the text to be detected is machine-generated text according to the complete distribution probability. The white-box detection method includes Entropy, Rank, LogRank or Fast-DetectGPT.

5. The machine-generated text detection method according to claim 1, characterized in that: Judging whether the text to be detected is machine-generated text according to the complete distribution probability specifically includes: Obtaining a conditional probability curvature index based on the complete distribution probability calculation; According to the conditional probability curvature index and the set threshold, it is determined whether the text to be detected is machine-generated text.

6. The machine-generated text detection method according to claim 5, characterized in that: The acquisition of the conditional probability curvature index specifically includes: Based on the complete distribution probability, randomly sampling a number of possible candidate words from the distribution; Using a large language model to score the candidate words and calculate the probability of the candidate words; The actual word probability and the candidate word probability at each position of the text sequence are compared to calculate and obtain the conditional probability curvature index.

7. A machine-generated text detection device, characterized in that: include: The Top-K word probability generation module is used to obtain the text to be detected, and the large language model generates the probability of the Top-K word at the current position based on the context prediction; A complete distribution estimation module, used to estimate the complete distribution probability according to the probability of the Top-K words using a probability distribution estimation algorithm; A detection module is used to determine whether the text to be detected is machine-generated text based on the complete distribution probability.

8. The machine-generated text detection device according to claim 7, characterized in that: In the complete distribution estimation module, the estimation problem is regarded as a constraint satisfaction problem, and the basic constraints include a total probability constraint and a monotonically decreasing constraint.

9. The machine-generated text detection device according to claim 7, characterized in that: In the detection module, a white-box detection method is used to determine whether the text to be detected is machine-generated text according to the complete distribution probability. The white-box detection method includes Entropy, Rank, LogRank or Fast-DetectGPT.

10. A computer-readable storage medium, characterized in that: The method comprises one or more programs for execution by one or more processors of an electronic device, wherein the one or more programs comprise instructions for executing the machine-generated text detection method as claimed in any one of claims 1 to 6.