Lune

NeurIPS2024Top-tier venue

DeTeCtive: Detecting AI-generated Text via Multi-Level Contrastive Learning

Xun Guo, Yongxin He, Shan Zhang, Ting Zhang, Wanquan Feng, Haibin Huang, Chongyang Ma

Abstract

Current techniques for detecting AI-generated text are largely confined to manual feature crafting and supervised binary classification paradigms. These methodologies typically lead to performance bottlenecks and unsatisfactory generalizability. Consequently, these methods are often inapplicable for out-of-distribution (OOD) data and newly emerged large language models (LLMs). In this paper, we revisit the task of AI-generated text detection. We argue that the key to accomplishing this task lies in distinguishing writing styles of different authors, rather than simply classifying the text into human-written or AI-generated text. To this end, we propose DeTeCtive, a multi-task auxiliary, multi-level contrastive learning framework. DeTeCtive is designed to facilitate the learning of distinct writing styles, combined with a dense information retrieval pipeline for AI-generated text detection. Our method is compatible with a range of text encoders. Extensive experiments demonstrate that our method enhances the ability of various text encoders in detecting AI-generated text across multiple benchmarks and achieves state-of-the-art results. Notably, in OOD zero-shot evaluation, our method outperforms existing approaches by a large margin. Moreover, we find our method boasts a Training-Free Incremental Adaptation (TFIA) capability towards OOD data, further enhancing its efficacy in OOD detection scenarios. We will open-source our code and models in hopes that our work will spark new thoughts in the field of AI-generated text detection, ensuring safe application of LLMs and enhancing compliance. Our code is available at https://github.com/heyongxin233/DeTeCtive.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

16 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Learn-to-Distance: Distance Learning for Detecting LLM-Generated Text cites AdaDetectGPT: Adaptive Detection of LLM-Generated Text with Statistical Guarantees
  • AdaDetectGPT: Adaptive Detection of LLM-Generated Text with Statistical Guarantees cites Learn-to-Distance: Distance Learning for Detecting LLM-Generated Text
  • Human Texts Are Outliers: Detecting LLM-generated Texts via Out-of-distribution Detection cites A Simple Framework for Contrastive Learning of Visual Representations
  • Multitask Prompted Training Enables Zero-Shot Task Generalization cites Language Models are Few-Shot Learners
  • DETree: DEtecting Human-AI Collaborative Texts via Tree-Structured Hierarchical Representation Learning cites Multitask Prompted Training Enables Zero-Shot Task Generalization
  • DETree: DEtecting Human-AI Collaborative Texts via Tree-Structured Hierarchical Representation Learning cites A Simple Framework for Contrastive Learning of Visual Representations
  • DETree: DEtecting Human-AI Collaborative Texts via Tree-Structured Hierarchical Representation Learning cites Language Models are Few-Shot Learners
  • SimCSE: Simple Contrastive Learning of Sentence Embeddings cites A Simple Framework for Contrastive Learning of Visual Representations
  • Chain-of-Thought Prompting Elicits Reasoning in Large Language Models cites Multitask Prompted Training Enables Zero-Shot Task Generalization
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers16

  1. AdaDetectGPT: Adaptive Detection of LLM-Generated Text with Statistical GuaranteesHongyi Zhou, Jin Zhu, Pingfan Su, Kai Ye et al.NeurIPS 2025 · 23 citations
  2. DETree: DEtecting Human-AI Collaborative Texts via Tree-Structured Hierarchical Representation LearningYongxin He, Shan Zhang, Yixuan Cao, Lei Ma et al.NeurIPS 2025 · 13 citations
  3. Learn-to-Distance: Distance Learning for Detecting LLM-Generated TextHongyi Zhou, Jin Zhu, Kai Ye, Ying Yang et al.ICLR 2026 · 10 citations
  4. Human Texts Are Outliers: Detecting LLM-generated Texts via Out-of-distribution DetectionCong Zeng, Shengkun Tang, Yuanzhou Chen, Zhiqiang Shen et al.NeurIPS 2025 · 10 citations
  5. Iron Sharpens Iron: Defending Against Attacks in Machine-Generated Text Detection with Adversarial TrainingYuanfan Li, Zhaohan Zhang, Chengzhengxu Li, Chao Shen et al.ACL 2025 · 10 citations

Builds on26

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 citations
  3. Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
  4. SimCSE: Simple Contrastive Learning of Sentence EmbeddingsTianyu Gao, Xingcheng Yao, Danqi ChenEMNLP 2021 · 2,496 citations
  5. Multitask Prompted Training Enables Zero-Shot Task GeneralizationVictor Sanh, Albert Webson, Colin Raffel, Stephen H. Bach et al.ICLR 2022 · 1,976 citations

Related papers

  1. Breaking the Generator Barrier: Disentangled Representation for Generalizable AI-Text DetectionXiao Pu, Zepeng Cheng, Lin Yuan, Yu Wu et al.ACL 2026 · 1 citation
  2. MAGE: Machine-generated Text Detection in the WildYafu Li, Qintong Li, Leyang Cui, Wei Bi et al.ACL 2024 · 44 citations
  3. GigaCheck: Detecting LLM-generated Content via Object-Centric Span LocalizationIrina Tolstykh, Aleksandra Tsybina, Sergey Yakubson, Aleksandr Gordeev et al.ACL Findings 2026
  4. DNA-DetectLLM: Unveiling AI-Generated Text via a DNA-Inspired Mutation-Repair ParadigmXiaowei Zhu, Yubing Ren, Fang Fang, Qingfeng Tan et al.NeurIPS 2025 · 10 citations
  5. OpenTuringBench: An Open-Model-based Benchmark and Framework for Machine-Generated Text Detection and AttributionLucio La Cava, Andrea TagarelliEMNLP 2025
Dusk over the sea between two cliffs drawn in fine vertical lines