ChatPaper.aiChatPaper

DNA-GPT: Analisi Divergente degli N-Grammi per il Rilevamento Senza Addestramento di Testo Generato da GPT

DNA-GPT: Divergent N-Gram Analysis for Training-Free Detection of GPT-Generated Text

May 27, 2023
Autori: Xianjun Yang, Wei Cheng, Linda Petzold, William Yang Wang, Haifeng Chen
cs.AI

Abstract

I modelli linguistici di grandi dimensioni (LLM) hanno notevolmente migliorato la fluidità e la diversità del testo generato automaticamente. Tuttavia, questo progresso presenta anche una sfida significativa nel rilevare l'origine di un determinato testo, e la ricerca attuale sui metodi di rilevamento è in ritardo rispetto alla rapida evoluzione degli LLM. I metodi convenzionali basati su addestramento hanno limitazioni in termini di flessibilità, in particolare quando si adattano a nuovi domini, e spesso mancano di potere esplicativo. Per colmare questa lacuna, proponiamo una nuova strategia di rilevamento senza addestramento chiamata Analisi Divergente N-Gram (DNA-GPT). Dato un testo, lo tronchiamo prima a metà e poi utilizziamo solo la parte precedente come input per gli LLM per rigenerare le nuove parti rimanenti. Analizzando le differenze tra le parti rimanenti originali e nuove attraverso l'analisi N-gram in modalità black-box o la divergenza di probabilità in modalità white-box, possiamo illustrare chiaramente le significative discrepanze tra il testo generato automaticamente e quello scritto da esseri umani. Abbiamo condotto esperimenti estesi sui più avanzati LLM di OpenAI, inclusi text-davinci-003, GPT-3.5-turbo e GPT-4, nonché su modelli open-source come GPT-NeoX-20B e LLaMa-13B. I risultati mostrano che il nostro approccio zero-shot offre prestazioni all'avanguardia nel distinguere tra testo umano e generato da GPT su quattro dataset in inglese e uno in tedesco, superando il classificatore di OpenAI, che è addestrato su milioni di testi. Inoltre, i nostri metodi forniscono spiegazioni ragionevoli e prove a supporto della nostra affermazione, che è una caratteristica unica del rilevamento esplicabile. Il nostro metodo è anche robusto sotto l'attacco di testo rivisto e può inoltre risolvere il problema dell'identificazione del modello. I codici sono disponibili su https://github.com/Xianjun-Yang/DNA-GPT.
English
Large language models (LLMs) have notably enhanced the fluency and diversity of machine-generated text. However, this progress also presents a significant challenge in detecting the origin of a given text, and current research on detection methods lags behind the rapid evolution of LLMs. Conventional training-based methods have limitations in flexibility, particularly when adapting to new domains, and they often lack explanatory power. To address this gap, we propose a novel training-free detection strategy called Divergent N-Gram Analysis (DNA-GPT). Given a text, we first truncate it in the middle and then use only the preceding portion as input to the LLMs to regenerate the new remaining parts. By analyzing the differences between the original and new remaining parts through N-gram analysis in black-box or probability divergence in white-box, we can clearly illustrate significant discrepancies between machine-generated and human-written text. We conducted extensive experiments on the most advanced LLMs from OpenAI, including text-davinci-003, GPT-3.5-turbo, and GPT-4, as well as open-source models such as GPT-NeoX-20B and LLaMa-13B. Results show that our zero-shot approach exhibits state-of-the-art performance in distinguishing between human and GPT-generated text on four English and one German dataset, outperforming OpenAI's own classifier, which is trained on millions of text. Additionally, our methods provide reasonable explanations and evidence to support our claim, which is a unique feature of explainable detection. Our method is also robust under the revised text attack and can additionally solve model sourcing. Codes are available at https://github.com/Xianjun-Yang/DNA-GPT.
PDF10February 8, 2026