Skip to main content
QUICK REVIEW

[Paper Review] CoCo: Coherence-Enhanced Machine-Generated Text Detection Under Data Limitation With Contrastive Learning

Xiaoming Liu, Zhaohan Zhang|arXiv (Cornell University)|Dec 20, 2022
Topic ModelingComputer Science7 citations
TL;DR

This paper proposes CoCo, a contrastive learning framework that enhances machine-generated text detection under low-resource conditions by modeling text coherence through an entity-based graph representation. By integrating graph-structured linguistic features with a difficulty-aware contrastive loss, CoCo achieves state-of-the-art performance on multiple datasets, including surprising findings that GPT-3.5-generated texts are easier to detect than those from older models.

ABSTRACT

Machine-Generated Text (MGT) detection, a task that discriminates MGT from Human-Written Text (HWT), plays a crucial role in preventing misuse of text generative models, which excel in mimicking human writing style recently. Latest proposed detectors usually take coarse text sequences as input and fine-tune pretrained models with standard cross-entropy loss. However, these methods fail to consider the linguistic structure of texts. Moreover, they lack the ability to handle the low-resource problem which could often happen in practice considering the enormous amount of textual data online. In this paper, we present a coherence-based contrastive learning model named CoCo to detect the possible MGT under low-resource scenario. To exploit the linguistic feature, we encode coherence information in form of graph into text representation. To tackle the challenges of low data resource, we employ a contrastive learning framework and propose an improved contrastive loss for preventing performance degradation brought by simple samples. The experiment results on two public datasets and two self-constructed datasets prove our approach outperforms the state-of-art methods significantly. Also, we surprisingly find that MGTs originated from up-to-date language models could be easier to detect than these from previous models, in our experiments. And we propose some preliminary explanations for this counter-intuitive phenomena. All the codes and datasets are open-sourced.

Motivation & Objective

  • To address the limitations of existing MGT detectors that ignore high-level linguistic structure and struggle under low-resource conditions.
  • To model text coherence through an entity coherence graph based on Centering Theory, capturing sentence-level and cross-sentence entity consistency.
  • To improve model generalization in low-resource settings using a contrastive learning framework with a difficulty-reweighted loss function.
  • To investigate why newer, more advanced language models like GPT-3.5 may produce texts that are easier to detect than those from older models.
  • To provide an explainable, structure-aware detection method that leverages graph-based features for improved discrimination between human- and machine-written text.

Proposed method

  • Construct an entity coherence graph where nodes represent named entities and edges represent co-occurrence within sentences and across sentences, modeling text structure.
  • Encode text using pre-trained language models and project entity representations into a graph structure to capture semantic coherence.
  • Design a contrastive learning framework that pairs positive samples (augmentations of the same text) and negative samples (different texts) to learn discriminative representations.
  • Propose a difficulty-aware contrastive loss that reweights negative samples based on their difficulty score, reducing interference from easy negatives and improving focus on hard samples.
  • Integrate the graph representation with the sequence-level encoding via a graph convolutional network (GCN) to refine contextual representations.
  • Train the model end-to-end using a combination of contrastive loss and cross-entropy loss for classification, enabling robust detection under data scarcity.

Experimental results

Research questions

  • RQ1Can modeling text coherence through an entity-based graph improve the detection of machine-generated text compared to flat sequence modeling?
  • RQ2How does contrastive learning with difficulty-aware loss design enhance detection performance under low-resource conditions?
  • RQ3Why do machine-generated texts from GPT-3.5 appear easier to detect than those from older models like GROVER and GPT-2?
  • RQ4To what extent do graph-based structural features such as clustering coefficient, core-number, and structure entropy differentiate human-written from machine-generated texts?
  • RQ5How does data imbalance—especially when human-written texts are underrepresented—affect detector performance, and can CoCo mitigate this?

Key findings

  • CoCo outperforms state-of-the-art methods on two public datasets (GROVER, GPT-2) and two self-constructed datasets, demonstrating significant gains in detection accuracy under low-resource settings.
  • The average clustering coefficient of HWTs (0.2213) is 11.6% higher than that of MGTs (0.1983), indicating stronger local semantic cohesion in human-written texts.
  • HWTs have a higher average core-number (5.772) than MGTs (4.458), reflecting more complex hierarchical structure in human-written texts, a 29.5% difference.
  • Structure entropy of HWTs (2.263) is 6.80% higher than MGTs (2.119), indicating more organized and informative global semantic structure in human-written texts.
  • Surprisingly, GPT-3.5-generated texts are significantly easier to detect than those from GPT-2 and GROVER, despite their higher quality, suggesting newer models may leave detectable statistical signatures.
  • Under extreme data imbalance (e.g., 10% human-written texts), most models, including CoCo, suffer accuracy drops below 50%, but CoCo maintains relatively better robustness compared to baselines.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.