Zero-Shot Detection of LLM-Generated Text using Token Cohesiveness

Shixuan Ma, Quan Wang
9/25/2024
cs.CL

Official code: Shixuan-Ma/TOCSIN (9 stars, MIT, last commit 2025-06-03).

Abstract

The increasing capability and widespread usage of large language models (LLMs) highlight the desirability of automatic detection of LLM-generated text. Zero-shot detectors, due to their training-free nature, have received considerable attention and notable success. In this paper, we identify a new feature, token cohesiveness, that is useful for zero-shot detection, and we demonstrate that LLM-generated text tends to exhibit higher token cohesiveness than human-written text. Based on this observation, we devise TOCSIN, a generic dual-channel detection paradigm that uses token cohesiveness as a plug-and-play module to improve existing zero-shot detectors. To calculate token cohesiveness, TOCSIN only requires a few rounds of random token deletion and semantic difference measurement, making it particularly suitable for a practical black-box setting where the source model used for generation is not accessible. Extensive experiments with four state-of-the-art base detectors on various datasets, source models, and evaluation settings demonstrate the effectiveness and generality of the proposed approach. Code available at: \url{https://github.com/Shixuan-Ma/TOCSIN}.

View on arXivView PDF

Code Implementations(1)

Shixuan-Ma/TOCSINOfficial100%
MIT

TOCSIN: Zero-Shot Detection of LLM-Generated Text using Token Cohesiveness

91Shell, PythonSep 23, 20241 years agoMIT

Similar Papers

Cite this paper

@article{ma2024zeroshot,
  title  = {Zero-Shot Detection of LLM-Generated Text using Token Cohesiveness},
  author = {Shixuan Ma and Quan Wang},
  year   = {2024},
  eprint = {2409.16914},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.16914v1}
}

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/2409.16914.svg)](https://codeofpaper.com/paper/2409.16914)

Discussion