Learn-to-Distance: Distance Learning for Detecting LLM-Generated Text

Hongyi Zhou, Jin Zhu, Erhan Xu, Kai Ye, Ying Yang, Chengchun Shi · 2026

Read Learn-to-Distance: Distance Learning for Detecting LLM-Generated Text by Hongyi Zhou, Jin Zhu, Erhan Xu, Kai Ye, Ying Yang, Chengchun Shi (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2601-21895.txt.

Introduction

Hongyi Zhou and co-authors build tools to detect text written by large language models. Systems such as GPT, Claude, and Gemini now produce prose that reads as human. That fluency raises real concerns about misinformation and academic integrity, and it creates urgent demand for reliable detection.

Their 2026 preprint proposes learning distances between texts, so that machine-written and human writing sit measurably apart. A distance-based detector can flag suspect passages without needing the generating model itself. Detection will never be perfect, but dependable methods help schools, publishers, and platforms enforce their rules. The work joins a fast-moving contest between generation and detection that shows no sign of slowing.

Catalog record

CREATORHongyi Zhou, Jin Zhu, Erhan Xu, Kai Ye, Ying Yang, Chengchun Shi
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE72 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2601-21895

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Learn-to-Distance: Distance Learning for Detecting LLM-Generated Text Hongyi Zhou, Jin Zhu, Erhan Xu, Kai Ye, Ying Yang, Chengchun Shi Abstract Modern large language models (LLMs) such as GPT, Claude, and Gemini have transformed the way we learn, work, and communicate. Yet, their ability to produce highly human-like text raises serious concerns about misinformation and academic integrity, making it an urgent need for reliable algorithms to detect LLM-generated content. In this paper, we start by presenting a geometric approach to demystify rewrite-based detection algorithms, revealing their underlying rationale and demonstrating their generalization ability. Building on this insight, we introduce a novel rewrite-based detection algorithm that adaptively learns the distance between the original and rewritten text. Theoretically, we demonstrate that employing an adaptively learned distance function is more effective for detection than using a fixed distance. Empirically, we conduct extensive experiments with over 100 settings, and find that our approach demonstrates superior performance over baseline algorithms in the majority of scenarios. In particular, it achieves relative improvements from 57.8% to 80.6% over the strongest baseline across different target LLMs (e.g., GPT, Claude, and Gemini). 1 Introduction The past few years have witnessed the emergence and rapid development of large language models (LLMs) such as GPT ( 30 ) , DeepSeek ( 37 ) , Claude ( 3 ) , Gemini ( 11 ) , Grok ( 62 ) and Qwen ( 64 ) . Their impact is everywhere, from education, academia and software development to healthcare and everyday life ( 4 ; 7 ; 26 ) . On one side of the coin, LLMs can support users with conversational question answering, help students learn more effectively, draft emails, write computer code, prepare presentation slides and more. On the other side, their ability to closely mimic human-written text also raises serious concerns, including the generation of biased or harmful content, the spread of misinformation in the news ecosystem, and the challenges related to authorship attribution and intellectual property ( 14 ; 17 ; 40 ; 38 ; 33 ) . Addressing these concerns requires effective algorithms to distinguish between human-written and LLM-generated text, which has become an active and popular research direction in recent literature (see 12 ; 60 , for reviews) . Existing works either actively detect LLM-generated text, by embedding watermarks into LLM-generated text during the design of the model ( 1 ; 10 ; 13 ; 19 ; 59 ; 61 ; 20 ; 36 , see e.g.,) , or passively , without any prior knowledge of the watermarking process. This paper focuses on the latter category of passive detection algorithms. We review these algorithms below. 1.1 Related works Most existing passive detection algorithms fall into the following two categories: (i) zero-shot methods and (ii) machine learning (ML)-based approaches, depending on whether they rely on external data for training the detector. Within each category, methods can be further classified into three subtypes: (1) logits-based; (2) rewrite-based, and (3) other approaches. This yields a total of 6 combinations. Zero-shot detection . Zero-shot methods use only the observed text and a surrogate LLM for detection, without utilizing any additional dataset for training. They compute a statistical measure from the observed text to determine whether it was authored by a human or an LLM. The underlying rationale is that human-written text tends to produce statistics that differ (either larger or smaller) from those of LLM-generated text, and this difference can be exploited for detection ( 18 ) . Based on the type of statistical measure employed, these methods can be further categorized into three subtypes: 1. Logits-based methods construct the statistic using the logits of tokens computed by the surrogate LLM across the observed text ( 42 ; 53 ; 6 ; 24 ; 63 , see e.g.,) . 2. Rewrite-based methods define the statistic as a suitable distance between the observed text and its rewritten (or regenerated) version ( 74 ; 45 ; 65 ; 54 ) . 3. Beyond logits or rewrite-based distances, other statistics have been introduced, including the intrinsic dimensionality of the observed text ( 57 ) , its latent representation patterns ( 9 ) , N-gram distributions ( 51 ) and maximum mean discrepancy ( 70 ; 52 ) . ML-based detection . ML-based methods leverage external human- and LLM-authored text to enhance the detection power of zero-shot methods. A primary approach is to formulate the detection task as a classification problem and utilize external data to train the classifier. Similar to zero-shot methods, ML-based approaches can also be categorized into three subtypes: 1. Logits-based methods fine-tune the surrogate LLM’s logits to improve the classification accuracy. Various LLMs have been employed in the literature, including RoBERTa ( 51 ; 21 ) , BERT ( 31 ) , DistilBERT ( 43 ) , and reward models for aligning LLMs with human feedback ( 34 ) . Recent works have extended these methods to more challenging scenarios, including handling adversarial attacks ( 28 ; 32 ; 50 ) , short texts such as tweets and reviews ( 56 ) , black-box settings under diverse prompts ( 69 ; 8 ) , and statistical inference with performance guarantees ( 73 ) . 2. Rewrite-based methods either use the distance between the observed text and its rewritten version as an input feature for training the classifier ( 39 ; 67 ; 29 ; 47 ) , or apply ML to fine-tune the the rewriting model itself to improve the detection accuracy ( 25 ) . 3. Other methods extract features beyond logits or rewrite-based distances, and then apply ML algorithms to these features for classification. Examples of features range from classical N-grams and term frequency–inverse document frequency widely used in natural language processing ( 51 ) , to more complex representations such as various combinations of features constructed based on token probabilities ( 58 ) , cross-entropy loss between the text and a surrogate LLM ( 22 ) , hidden latent representations ( 66 ) and features learned via multi-level contrastive learning ( 23 ) , and even classification probabilities of fine-tuned LLMs ( 2 ) . 1.2 Contributions Our proposal falls under the category of ML-based, rewrite-based detection. We study a commonly encountered setting in practice, where LLM-authored text is generated using prompts that are unobserved by the detector. Our main contributions are as follows: • Methodologically , we develop a new rewrite-based method for detecting LLM-generated text. Unlike existing approaches that primarily employ a fixed distance to compare the original text with its rewritten version, we propose to adaptively learn this distance via ML. Our proposal better discriminates between LLM- and human-authored text (see Figure 2 for a graphical illustration), leading to substantial performance gains. • Theoretically , we develop a geometric approach to demystify the rationale behind rewrite-based methods (see Figure 1 for illustration and Proposition 1 for the detailed statement). We next show that these methods generalize well to unobserved prompts (Proposition 2 ). Finally, we demonstrate the rationale for learning a distance function rather than relying on a fixed distance (Proposition 3 ). • Empirically , we conduct comprehensive experiments across 24 datasets, 7 target language models, and 3 types of unseen prompts, covering over 100 settings.

Read the complete text