Large language model text generation detection method and device
By performing discourse segmentation and rhetorical relationship analysis on the input text, a multi-relation graph neural network model is constructed to explicitly model the logical structure and semantic features, solving the problem of insufficient granularity in mixed text classification in existing technologies, and achieving accurate detection of text generated by large language models.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- INST OF COMPUTING TECH CHINESE ACAD OF SCI
- Filing Date
- 2026-02-13
- Publication Date
- 2026-06-02
AI Technical Summary
Existing technologies are insufficient to meet the refined regulatory needs of fields such as academic writing when distinguishing between human-written text and text generated by large language models. They ignore the distinction between the initial creator and the subsequent editor, resulting in insufficient granularity of mixed text classification and blurred decision boundaries.
By segmenting the input text, extracting the rhetorical relationship types between basic text units, constructing a multi-relation graph, extracting semantic features using a pre-trained language model, and learning features through a multi-relation graph neural network, the logical structure and semantic expression are explicitly modeled, and the probability distribution of fine-grained categories is generated.
It achieves accurate differentiation between purely human-written text, purely model-generated text, human-written text polished by a large language model, and model-generated text with human-like modifications, significantly improving detection accuracy and reducing false positive rate.
Smart Images

Figure CN122133636A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of natural language processing, and in particular to a method and apparatus for detecting text generated by a large language model. Background Technology
[0002] With the widespread application of Large Language Models (LLMs), distinguishing between human-written text and model-generated text has become crucial. Existing detection techniques primarily employ binary classification (human, LLM) or multi-classification (human, LLM, collaborative hybrid) settings. However, this level of classification granularity cannot meet the demands of refined oversight in complex real-world scenarios. In fields such as academic writing, while both "human-edited text polished by an LLM" and "human-modified LLM-generated text" belong to the category of hybrid text, their compliance and consequences are drastically different. Existing methods typically rely on a unified feature space to capture the differences between humans and LLMs, ignoring the distinction between the "initial creator" and the "subsequent editor" in the text generation process. This leads to blurred decision boundaries when facing such fine-grained classification tasks, making it difficult to address regulatory requirements. Summary of the Invention
[0003] To address the shortcomings of existing technologies, this invention proposes a method and apparatus for text detection generated by a large language model, which enables fine-grained text detection.
[0004] This invention provides a method for detecting text generated by a large language model, comprising:
[0005] The input text is segmented into multiple basic text units, which correspond to clauses, phrases, or text fragments with independent semantic functions in natural language.
[0006] Extract the rhetorical relationship types between the multiple basic discourse units and construct a multi-relationship graph, wherein the multi-relationship graph includes a first node and a second node, the first node corresponds to the rhetorical relationship type, and the second node corresponds to the basic discourse unit;
[0007] The first semantic expression features of the text segment corresponding to the first node and the second semantic expression features of the second node are extracted by a pre-trained language model.
[0008] The multi-relation graph is input into the multi-relation graph neural network model for feature learning. The message passing process between nodes is guided by the rhetorical relationship type, and the first semantic expression feature and the second semantic expression feature are updated.
[0009] The first and second semantic expression features, after being learned and updated, are processed by graph reading to generate probability distributions for different fine-grained categories corresponding to the input text, and the classification results are output; wherein, the different fine-grained categories are divided based on human-written text and model-generated text.
[0010] In one embodiment of the present invention, the different fine-grained categories include purely human-written text, purely model-generated text, human-written text polished by a large language model, and model-generated text with human-modified features, wherein each fine-grained category corresponds to a label, and all fine-grained categories form a label set.
[0011] In one embodiment of the present invention, the step of constructing a multi-relationship graph includes:
[0012] By assigning each basic text unit to a leaf node, we obtain the second node;
[0013] Merge two adjacent second nodes that have a logical relationship to form a new parent node as the first node, and assign the corresponding rhetorical relationship type to the edge from the first node to the second node;
[0014] The first node and its logically related second node are merged layer by layer from bottom to top until all nodes are merged into a single root node, forming a tree-like multi-relationship graph.
[0015] In one embodiment of the present invention, the input text is encoded using a pre-trained language model to obtain a text context embedding sequence;
[0016] For the second node, the second semantic expression feature is obtained by averaging all word embeddings within the corresponding segment in the text context embedding sequence.
[0017] For the first node, the second semantic expression features of all its descendant second nodes are recursively averaged to obtain the first semantic expression features.
[0018] In one embodiment of the present invention, before inputting the multi-relationship graph into the multi-relationship graph neural network model for feature learning, the method further includes:
[0019] Add corresponding node type embedding vectors to the first node and the second node respectively, and add the first semantic expression feature and the second semantic expression feature to the corresponding node type embedding vector to initially update the first semantic expression feature and the second semantic expression feature.
[0020] In one embodiment of the present invention, the multi-relation graph neural network model is a relation graph convolutional network. During the training process, the contrastive learning loss function and the cross-entropy loss function are used to optimize the model parameters in order to capture the differential patterns of different rhetorical relationship types in different fine-grained categories.
[0021] In one embodiment of the present invention, graph readout processing is performed on the learned and updated first semantic expression features and second semantic expression features to generate probability distributions of the input text corresponding to different fine-grained categories, and the classification result is output, including:
[0022] The semantic representation features of the root node are read out from the first and second semantic representation features after learning and updating, so as to obtain the global feature representation of the input text.
[0023] The global feature representation is input into a fully connected classification layer to generate the probability distribution of the input text for different fine-grained categories.
[0024] In one embodiment of the present invention, the output classification result is: the category label with the highest probability in the label set and its corresponding probability, or a complete distribution result containing the corresponding probabilities of various fine-grained categories.
[0025] In one embodiment of the present invention, the rhetorical relationship type includes at least one of exposition, contrast, causation, and attribution.
[0026] Another aspect of the present invention provides a large language model-generated text detection device, comprising:
[0027] The discourse segmentation module is used to segment the input text into multiple basic discourse units, where each basic discourse unit corresponds to a clause, phrase, or text segment with independent semantic function in natural language.
[0028] A multi-relationship graph construction module is used to extract the rhetorical relationship types between the multiple basic discourse units and construct a multi-relationship graph, wherein the multi-relationship graph includes a first node and a second node, the first node corresponds to the rhetorical relationship type, and the second node corresponds to the basic discourse unit;
[0029] The feature initialization module is used to extract the first semantic expression features of the text segment corresponding to the first node and the second semantic expression features corresponding to the second node through a pre-trained language model.
[0030] The graph learning module is used to input the multi-relation graph into the multi-relation graph neural network model for feature learning, guide the message passing process between nodes through the rhetorical relationship type, and update the first semantic expression feature and the second semantic expression feature.
[0031] The graph reading module is used to perform graph reading processing on the first semantic expression features and the second semantic expression features after learning and updating, generate the probability distribution of the input text corresponding to different fine-grained categories, and output the classification results; wherein, the different fine-grained categories are divided based on human-written text and model-generated text.
[0032] As can be seen from the above solutions, the advantages of the present invention are:
[0033] This invention provides a text detection method generated by a large language model. It segments the input text into multiple basic discourse units, extracts the rhetorical relationship types between these units, and constructs a multi-relationship graph relating the basic discourse units and rhetorical relationship types. Then, a pre-trained language model extracts the first semantic expression features of the text segment corresponding to the first node and the second semantic expression features corresponding to the second node. The multi-relationship graph is then input into a multi-relationship graph neural network model for feature learning, updating the first and second semantic expression features. Finally, graph reading is performed to generate probability distributions for different fine-grained categories of the input text. This method explicitly models the logical structure and semantic expression, combining the semantic understanding capability of the pre-trained language model with the structural learning capability of the multi-relationship graph neural network. By guiding message passing between nodes through rhetorical relationships, semantic features and logical structure features are mutually constrained and dynamically updated. This breaks away from the traditional method's reliance on a single dimension of semantic features, accurately capturing the essential differences between humans and large language models in text organization logic. It significantly improves the detection accuracy of mixed text categories with a low false positive rate at a strict four-class fine-grained classification level. Attached Figure Description
[0034] Figure 1 A flowchart illustrating a text detection method generated by a large language model according to an embodiment of the present invention is shown.
[0035] Figure 2 It shows Figure 1 A detailed flowchart of step S2 is shown below;
[0036] Figure 3 It shows Figure 3 This illustrates a concrete example of constructing a binary rhetorical structure tree;
[0037] Figure 4 It shows Figure 1 A detailed flowchart of step S3 is shown below;
[0038] Figure 5 A schematic diagram of the structure of a large language model-generated text detection device provided in an embodiment of the present invention is shown.
[0039] The attached figures are labeled as follows:
[0040] 500: Large language model-generated text detection device;
[0041] 510: Discourse segmentation module;
[0042] 520: Multi-relationship graph construction module;
[0043] 530: Feature initialization module;
[0044] 540: Graph Learning Module;
[0045] 550: Graph Readout Module. Detailed Implementation
[0046] It should be noted that, in this invention, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus.
[0047] In the absence of further restrictions, an element defined by the phrase "comprising a..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0048] To address the shortcomings of existing technologies in fine-grained large language model-generated text detection tasks, which suffer from insufficient granularity and weak detection performance due to the use of single-view modeling and the neglect of the different consequences arising from the roles of "initial creator" and "subsequent editor," this invention provides a fine-grained large language model-generated text detection method based on rhetorical structure analysis. This method extracts basic discourse units and uses a pre-trained language model for feature extraction to characterize the features of the "subsequent editor." Then, it utilizes rhetorical structure theory to extract the rhetorical relationship types between basic discourse units. By constructing a multi-relation graph neural network model, it explicitly establishes the constraint effect of the logical structure of the "initial creator" on the semantic expression of the "subsequent editor," achieving fine-grained text detection to distinguish between purely human-written text, purely LLM-generated text, human-written text with LLM polishing, and LLM-generated text with human-modified modifications.
[0049] Specifically, refer to Figure 1 As shown, Figure 1 The diagram shows a flowchart of a text detection method for generating large language models according to an embodiment of the present invention.
[0050] Step S1: Perform discourse segmentation on the input text, dividing it into multiple basic discourse units, where each basic discourse unit corresponds to a clause, phrase, or text segment with independent semantic function in natural language.
[0051] Step S2: Extract the rhetorical relationship types between the multiple basic discourse units and construct a multi-relationship graph, wherein the multi-relationship graph includes a first node and a second node, the first node corresponds to the rhetorical relationship type, and the second node corresponds to the basic discourse unit.
[0052] Step S3: Extract the first semantic expression features of the text segment corresponding to the first node and the second semantic expression features corresponding to the second node through a pre-trained language model;
[0053] Step S4: Input the multi-relationship graph into the multi-relationship graph neural network model for feature learning, guide the message passing process between nodes through the rhetorical relationship type, and update the first semantic expression feature and the second semantic expression feature;
[0054] Step S5: Perform graph reading processing on the learned and updated first semantic expression features and second semantic expression features to generate the probability distribution of the input text corresponding to different fine-grained categories, and output the classification result.
[0055] The different fine-grained categories are divided based on human-written text and model-generated text, including but not limited to purely human-written text, purely model-generated text, human-written text polished by a large language model, and human-modified model-generated text. Each fine-grained category corresponds to a label, and all fine-grained categories form a label set. For example, label 0 corresponds to purely human text, label 1 corresponds to purely large language model text, label 2 corresponds to human-written text polished by a large language model, and label 3 corresponds to human-modified large language model text, forming a label set. In this embodiment, four fine-grained classifications are set, which are more granular than traditional binary classifications and more accurately adapt to actual needs.
[0056] In this embodiment, by explicitly modeling the logical structure and semantic expression, the semantic understanding ability of the pre-trained language model is combined with the structural learning ability of the multi-relation graph neural network. The message passing between nodes is guided by rhetorical relationships, so that semantic features and logical structure features are mutually constrained and dynamically updated. This breaks away from the traditional method that relies solely on the single dimension of semantic features, accurately captures the essential differences between humans and large language models in text organization logic, and significantly improves the detection accuracy of mixed text categories with a low false alarm rate under strict four-class fine granularity.
[0057] In one embodiment, in step S1, the input text is segmented into basic discourse units. These basic discourse units correspond to clauses, phrases, or text fragments with independent semantic functions in natural language, carrying specific vocabulary selection and syntactic implementation information. For example, for the input text... Perform discourse segmentation, where The number of tokens is used to divide the text into a series of consecutive basic discourse units. ,in, A continuous segment in the corresponding text For example, a clause or a phrase with independent semantic function. This indicates the total number of basic discourse units.
[0058] Further in step S2, rhetorical structure theory is used to extract the rhetorical relationship types between the multiple basic discourse units, constructing a multi-relationship graph. The rhetorical relationship types include exposition, contrast, causality, and attribution, reflecting the organizational logic and argumentative structure of the text content. The multi-relationship graph contains two types of nodes: a first node and a second node. The first node corresponds to the rhetorical relationship type, and the second node corresponds to the basic discourse unit.
[0059] In the specific implementation, a bottom-up recursive strategy is used to construct a binary rhetorical structure tree. For example... Figure 2 As shown, Figure 2 The flowchart for step S2 is shown. Step S21: Assign a leaf node to each basic text unit to obtain a second node; Step S22: Using a bottom-up recursive strategy, merge two adjacent second nodes with logical relationships to form a new parent node as the first node. This involves connecting the two second nodes through the first node and assigning a corresponding rhetorical relationship type to the edge from the first node to the second node; Step S23: Further merge the first node with its logically related second nodes layer by layer from bottom to top until all nodes are merged into a single root node, forming a tree-like multi-relationship graph. Thus, the second nodes are all leaf nodes, serving as carriers of the semantic expression of the "subsequent editors," while the first nodes are all internal nodes, serving as carriers of the logical structure of the "initial creators."
[0060] For example, from The sequence begins, Each segment is treated as a second node, and two adjacent segments are iteratively selected as follows: The nodes are merged to form a new parent node, the first node. During each merge, a rhetorical structure parser (such as IsaNLP RST Parser) is used to assign a label of a specific rhetorical relation type to the generated first node. (For example, "elaboration," "transition," "cause and effect," etc.) are used to describe the logical relationship between its two child nodes. This process continues until all nodes are merged into a single root node, forming a complete binary rhetorical tree structure. The second set of nodes in the tree (i.e., leaf nodes) is: Each node corresponds to a basic discourse unit in the text, representing a specific semantic expression; the first node set of the tree Each node is assigned a rhetorical relation type label. This represents the logical organizational structure of the text. Furthermore, to facilitate graph neural network processing, the aforementioned tree structure is... Formalize it as a multi-relationship graph , where the set of nodes The set of edges containing all first and second nodes. Each edge in the array is represented as a triple. It retains the explicit dependency structure, that is, the first node controls the second node or the first node of its child nodes.
[0061] Figure 3 This example illustrates the construction of a binary rhetorical structure tree. For instance, the input text "I believe that driverless car are not good at all because we will have nothing to work for. But at the same time there are positive effects and negative ones as well." is segmented by the rhetorical structure parser into the discourse units "I believe", "that driverless car are not good at all", "because we will have nothing to work for", and "But at the same time there are positive effects and negative ones as well...", which are then processed using... This indicates that these discourse units are treated as leaf nodes, i.e., the second node. Because... "that driverless cars are not good at all", There is a logical relationship between the two adjacent text units “because we will have nothing to work for”, that is, firstly, Merge to construct a first node , the first node Further with discourse units The "I believe" merges to obtain the first node. , the second node Further with discourse units "But at the same time, there are positive effects and negative ones as well..." (Merge to get the second node) This forms a complete binary rhetorical structure tree. Furthermore, it should be noted that this invention is not limited to Chinese or English texts; it is applicable to texts of any language.
[0062] Further in step S3, a first semantic expression feature of the text segment corresponding to the first node and a second semantic expression feature of the second node are extracted using a pre-trained language model. (Reference) Figure 4 , Figure 4 The diagram illustrates the specific flow of step S3. Specifically, step S31 involves encoding the input text using a pre-trained language model (PLM, such as RoBERTa) to obtain a text context embedding sequence. ,in This is the hidden layer dimension of PLM. Step S32: For the second node, perform average pooling on all word embeddings within the corresponding segment in the text context embedding sequence to obtain the initial second semantic expression feature. Step S33: For the first node, recursively average the initial second semantic expression features of all its descendant second nodes to obtain the initial first semantic expression feature, ensuring that the relation node can serve as the semantic centroid of the text segment it governs. The formula is expressed as:
[0063]
[0064] in, It is the first Word embedding, Represents a node The second node of all its descendants in its subtree.
[0065] Step S34: Add corresponding node type embedding vectors to the first node and the second node respectively. Add the initial first semantic expression feature and the initial second semantic expression feature to the corresponding node type embedding vector to initially update the initial first semantic expression feature and the initial second semantic expression feature, resulting in the initially updated first semantic expression feature and second semantic expression feature, represented as:
[0066]
[0067] in, Indicates the node type; 0 represents the second node, and 1 represents the first node. It is a learnable node type embedding vector.
[0068] At this point, the first and second semantic expression features are high-dimensional features, which are further mapped to a lower-dimensional feature space to remove potential irrelevant noise.
[0069] Further in step S4, the multi-relationship graph is input into the multi-relationship graph neural network model for feature learning. The message passing process between nodes is guided by the rhetorical relationship type, and the first and second semantic expression features mentioned above are updated again. The multi-relationship graph neural network model is a relational graph convolutional network. During training, contrastive learning loss and cross-entropy loss functions are used to optimize model parameters to capture the differential patterns of different rhetorical relationship types in different fine-grained categories. Iterative learning of the multi-relationship graph is performed using a relational graph convolutional network (R-GCN), with the rhetorical relationship type guiding the initialization of edge weights. Different rhetorical relationship types correspond to different convolutional kernel parameters. Each node aggregates the features of its neighboring nodes and integrates its own type embedding, containing both semantic information and encoding logical structural relationships.
[0070] Finally, in step S5, graph readout processing is performed on the learned and updated first and second semantic expression features to generate probability distributions for different fine-grained categories corresponding to the input text, and the classification result is output. Specifically, the semantic expression features of the root node are read from the learned and updated first and second semantic expression features. This root node is the first node at the top level of the tree structure, resulting in a global feature representation of the input text. This global feature representation is input into a fully connected classification layer to generate probability distributions for different fine-grained categories corresponding to the input text, and the classification result is output. This classification result includes the category label with the highest probability in the label set and its corresponding probability, or it includes the complete distribution results of the probabilities corresponding to each fine-grained category.
[0071] Therefore, in summary, the large language model-generated text detection method provided by this invention segments the input text into multiple basic discourse units, extracts the rhetorical relationship types between these units, and constructs a multi-relation graph relating the basic discourse units and rhetorical relationship types. Then, a pre-trained language model extracts the first semantic expression features of the text segment corresponding to the first node and the second semantic expression features corresponding to the second node. The multi-relation graph is input into a multi-relation graph neural network model for feature learning, updating the first and second semantic expression features. Finally, graph reading is performed to generate probability distributions for different fine-grained categories of the input text. This method, through explicit modeling of logical structure and semantic expression, combines the semantic understanding capability of the pre-trained language model with the structural learning capability of the multi-relation graph neural network. By guiding message passing between nodes through rhetorical relationships, semantic features and logical structure features mutually constrain and dynamically update, breaking away from the traditional method's reliance on a single dimension of semantic features. It accurately captures the essential differences between humans and large language models in text organization logic, significantly improving the detection accuracy of mixed text categories with a low false alarm rate at a strict four-class fine-grained classification level.
[0072] In one embodiment, a large language model-generated text detection device is further provided. This embodiment is a device embodiment corresponding to the above embodiment, such as... Figure 5 As shown, Figure 5 This diagram illustrates the overall structure of a large language model-generated text detection device according to an embodiment of the present invention. This device embodiment can be implemented in conjunction with the above-described embodiments. The relevant technical details mentioned in the above embodiments remain valid in this device embodiment, and will not be repeated here to avoid repetition.
[0073] A large language model-generated text detection device 500 includes:
[0074] The discourse segmentation module 510 is used to segment the input text into multiple basic discourse units, where the basic discourse units correspond to clauses, phrases or text fragments with independent semantic functions in natural language.
[0075] The multi-relationship graph construction module 520 is used to extract the rhetorical relationship types between the multiple basic discourse units and construct a multi-relationship graph, wherein the multi-relationship graph includes a first node and a second node, the first node corresponds to the rhetorical relationship type, and the second node corresponds to the basic discourse unit;
[0076] The feature initialization module 530 is used to extract the first semantic expression features of the text segment corresponding to the first node and the second semantic expression features corresponding to the second node through a pre-trained language model.
[0077] Graph learning module 540 is used to input the multi-relation graph into the multi-relation graph neural network model for feature learning, guide the message passing process between nodes through rhetorical relationship types, and update the first semantic expression feature and the second semantic expression feature.
[0078] The graph reading module 550 is used to perform graph reading processing on the first semantic expression features and the second semantic expression features after learning and updating, generate the probability distribution of the input text corresponding to different fine-grained categories, and output the classification results; wherein, the different fine-grained categories are divided based on human-written text and model-generated text.
[0079] In addition, embodiments of the present invention also provide a readable storage medium storing a program or instructions that, when executed by a processor, implement the steps of the above-described large language model-generated text detection method and achieve the same technical effect.
[0080] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described large language model-generated text detection method and achieves the same technical effect.
[0081] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of the present invention.
Claims
1. A method for text detection generated by a large language model, characterized in that, include: The input text is segmented into multiple basic text units, which correspond to clauses, phrases, or text fragments with independent semantic functions in natural language. Extract the rhetorical relationship types between the multiple basic discourse units and construct a multi-relationship graph, wherein the multi-relationship graph includes a first node and a second node, the first node corresponds to the rhetorical relationship type, and the second node corresponds to the basic discourse unit; The first semantic expression features of the text segment corresponding to the first node and the second semantic expression features of the second node are extracted by a pre-trained language model. The multi-relation graph is input into the multi-relation graph neural network model for feature learning. The message passing process between nodes is guided by the rhetorical relationship type, and the first semantic expression feature and the second semantic expression feature are updated. The first and second semantic expression features, after being learned and updated, are processed by graph reading to generate probability distributions for different fine-grained categories corresponding to the input text, and the classification results are output; wherein, the different fine-grained categories are divided based on human-written text and model-generated text.
2. The method according to claim 1, characterized in that, The different fine-grained categories include purely human-written text, purely model-generated text, human-written text polished by a large language model, and model-generated text with human-like modifications. Each fine-grained category corresponds to a label, and all fine-grained categories form a label set.
3. The method according to claim 1, characterized in that, The steps to construct a multi-relationship graph include: By assigning each basic text unit to a leaf node, we obtain the second node; Merge two adjacent second nodes that have a logical relationship to form a new parent node as the first node, and assign the corresponding rhetorical relationship type to the edge from the first node to the second node; The first node and its logically related second node are merged layer by layer from bottom to top until all nodes are merged into a single root node, forming a tree-like multi-relationship graph.
4. The method according to claim 3, characterized in that, The input text is encoded using the pre-trained language model to obtain a text context embedding sequence; For the second node, average pooling is performed on all word embeddings within the corresponding segment in the text context embedding sequence to obtain the second semantic expression feature; For the first node, the second semantic expression features of all its descendant second nodes are recursively averaged to obtain the first semantic expression feature.
5. The method according to claim 4, characterized in that, Before inputting the multi-relationship graph into the multi-relationship graph neural network model for feature learning, the process also includes: Add corresponding node type embedding vectors to the first node and the second node respectively, and add the first semantic expression feature and the second semantic expression feature to the corresponding node type embedding vector to initially update the first semantic expression feature and the second semantic expression feature.
6. The method according to claim 1, characterized in that, The multi-relationship graph neural network model is a relational graph convolutional network. During training, the contrastive learning loss function and the cross-entropy loss function are used to optimize the model parameters in order to capture the differential patterns of different rhetorical relationship types in different fine-grained categories.
7. The method according to claim 5, characterized in that, The first and second semantic representation features, after being learned and updated, are subjected to graph readout processing to generate probability distributions for different fine-grained categories corresponding to the input text, and the classification results are output, including: Read the semantic expression features of the root node from the first and second semantic expression features after learning and updating, and obtain the global feature representation of the input text; The global feature representation is input into a fully connected classification layer to generate the probability distribution of the input text for different fine-grained categories.
8. The method according to claim 7, characterized in that, The output classification result is: the category label with the highest probability in the label set and its corresponding probability, or a complete distribution result containing the corresponding probabilities of various fine-grained categories.
9. The method according to claim 1, characterized in that, The rhetorical relationship types mentioned include at least one of exposition, contrast, causation, and attribution.
10. A text detection device for generating large language models, characterized in that, include: The discourse segmentation module is used to segment the input text into multiple basic discourse units, where each basic discourse unit corresponds to a clause, phrase, or text segment with independent semantic function in natural language. A multi-relationship graph construction module is used to extract the rhetorical relationship types between the multiple basic discourse units and construct a multi-relationship graph, wherein the multi-relationship graph includes a first node and a second node, the first node corresponds to the rhetorical relationship type, and the second node corresponds to the basic discourse unit; The feature initialization module is used to extract the first semantic expression features of the text segment corresponding to the first node and the second semantic expression features corresponding to the second node through a pre-trained language model. The graph learning module is used to input the multi-relation graph into the multi-relation graph neural network model for feature learning, guide the message passing process between nodes through the rhetorical relationship type, and update the first semantic expression feature and the second semantic expression feature. The graph reading module is used to perform graph reading processing on the first semantic expression features and the second semantic expression features after learning and updating, generate the probability distribution of the input text corresponding to different fine-grained categories, and output the classification results; wherein, the different fine-grained categories are divided based on human-written text and model-generated text.