CoCo: Coherence-Enhanced Machine-Generated Text Detection Under Data Limitation With Contrastive Learning

Xiaoming Liu, Zhaohan Zhang, Yichen Wang, Hang Pu, Yu Lan +1 more
12/20/2022
cs.CL
contrastive-ssl

Official code: YichenZW/Coh-MGT-Detection (17 stars, Python, MIT, last commit 2024-03-26).

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

MIT

The code implementation of the paper CoCo: Coherence-Enhanced Machine-Generated Text Detection Under Low Resource With Contrastive Learning from XJTU.

171PythonOct 24, 20232 years agoMIT
emnlp2023machine-generated-text-detection

Similar Papers

Cite this paper

@article{liu2022coco,
  title  = {CoCo: Coherence-Enhanced Machine-Generated Text Detection Under Data Limitation With Contrastive Learning},
  author = {Xiaoming Liu and Zhaohan Zhang and Yichen Wang and Hang Pu and Yu Lan and Chao Shen},
  year   = {2022},
  eprint = {2212.10341},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2212.10341}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2212.10341.svg)](https://codeofpaper.com/paper/2212.10341)

Discussion