← Latest papers
📊 statistics

Token-Level Likelihood-Array Regression for Membership Inference and AI-Generated Text Detection

This paper proposes Likelihood-Array Regression (LAR), a novel method that organizes token-level probabilities across nested context windows into structured arrays to significantly improve membership inference and AI-generated text detection by capturing nuanced information about context scale and token position that traditional likelihood-based baselines miss.

Original authors: Jiajun Sun, Zhanrui Cai

Published 2026-08-25
📖 5 min read🧠 Deep dive

Original authors: Jiajun Sun, Zhanrui Cai

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

In the digital age, language models have become so proficient at mimicking human writing that distinguishing between a sentence written by a person and one generated by a machine has grown increasingly difficult. This challenge sits at the heart of two critical questions facing researchers and society today. The first is a matter of privacy and copyright: can we tell if a specific piece of text was used to train a model in the first place? This is vital for publishers and authors who want to know if their work was ingested by artificial intelligence without permission. The second question is about origin: was a given text created by a human or by an algorithm? This distinction is essential for maintaining trust in journalism, academic work, and online discourse. To answer these questions, scientists have long relied on a method that looks at how likely a model is to predict the next word in a sentence. If a model is very confident about the next word, it suggests the text might be familiar to it or generated by it. However, traditional methods have treated this confidence as a single, static number, often ignoring how the model's certainty changes as it reads more or less of the surrounding sentence.

A new study by researchers Jiajun Sun and Zhanrui Cai proposes a more nuanced way to look at this data, treating the confidence of a language model not as a single point, but as a rich, structured landscape. Instead of asking the model to judge a word based on the entire sentence that came before it, the researchers asked the model to judge the same word repeatedly, each time with a different amount of context. They started with just the immediate previous word, then added one more, then two, and so on, all the way up to the full sentence. This process created a detailed map of how the model's confidence shifts as the amount of available information grows. By organizing these thousands of confidence scores into a structured array, the researchers could see patterns that were invisible when looking at the full sentence alone. They then used a statistical technique to learn which parts of this map—whether short contexts, long contexts, or specific positions in the text—were the most reliable indicators of whether a text was human-written, machine-generated, or part of the model's training data.

The results of this approach were strikingly effective. When tested on membership inference, which asks if a text was used to train a model, the new method achieved a success rate between 91.4% and 98.3% across five different language models. This was a significant improvement over existing methods, which typically hovered between 50% and 87%. For detecting AI-generated text, the method performed even better, reaching success rates between 98.5% and 99.6%. The study revealed that the most valuable information often came from the shorter contexts. Contrary to the assumption that a model needs the full sentence to make a judgment, the researchers found that the model's reaction to a word based on just a few preceding words contained unique signals that the full-sentence view missed. Furthermore, the study showed that for membership inference, looking at how the model's confidence changed between different context lengths provided extra clues, allowing the system to detect subtle patterns of repetition or memorization that simpler methods overlooked.

The researchers also explored how much data was needed to make these detections accurate. They found that even with a very small number of labeled examples, the new method outperformed traditional approaches. With as few as one hundred labeled texts, the system could already distinguish between human and machine writing with high reliability, and its accuracy continued to climb as more data was added. This suggests that the method is efficient and does not require massive datasets to be effective. The study also demonstrated that the approach works well even when the model used to analyze the text is different from the model that generated it. This is a crucial finding, as it means the technique can be applied broadly without needing to know the exact identity of the AI that created the content.

By moving away from single-number summaries and embracing the full complexity of how a language model processes context, this research offers a powerful new tool for auditing artificial intelligence. It confirms that the path to understanding AI behavior lies not in simplifying the data, but in organizing it in a way that respects its structure. The work provides a clear, data-driven path forward for protecting intellectual property and verifying the authenticity of text in an era where the line between human and machine creation is increasingly blurred. The findings suggest that by paying attention to the subtle shifts in a model's confidence as it reads, we can uncover the hidden fingerprints of both the training data and the generation process, offering a robust defense against misuse and a clearer view of the digital landscape.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →