← Latest papers
🔢 mathematics

Black-Box Detection of LLM-Generated Text Using Generalized Jensen-Shannon Divergence

The paper introduces SurpMark, a robust black-box detector for LLM-generated text that leverages token surprisal dynamics and a generalized Jensen-Shannon divergence metric to effectively distinguish between human and machine writing without requiring access to the source model.

Original authors: Shuangyi Chen, Ashish Khisti

Published 2026-05-12
📖 4 min read🧠 Deep dive

Original authors: Shuangyi Chen, Ashish Khisti

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

Imagine you are a detective trying to figure out if a story was written by a human or a robot. In the past, detectives looked for obvious clues like spelling mistakes or weird grammar. But today's robots (Large Language Models, or LLMs) are so good at writing that they rarely make those mistakes. They sound almost exactly like humans.

This paper introduces a new detective tool called SurpMark. Instead of looking at what words are used, SurpMark looks at how the writer thinks as they type.

Here is how it works, using simple analogies:

1. The "Surprise Meter"

Imagine you are reading a story.

  • Human writers often take unexpected turns. They might say something surprising, and then the next sentence feels a bit chaotic or jumps to a new idea.
  • Robots are trained to be predictable. When a robot writes, it usually picks the "safest" next word. If it does pick a surprising word (maybe to be creative), it immediately snaps back to being very predictable to stay on track.

SurpMark acts like a Surprise Meter. It measures how "surprised" a language model would be by each word in the text.

  • If the text is human, the surprise meter jumps up and down in a wild, irregular pattern.
  • If the text is a robot, the meter has a specific rhythm: a big jump (surprise) followed immediately by a calm, predictable dip.

2. Turning the Meter into a Map

The paper takes these "surprise" numbers and turns them into simple categories, like traffic lights:

  • 🟢 Green: Very predictable (not surprising).
  • 🟡 Yellow: A little surprising.
  • 🔴 Red: Very surprising.

Instead of looking at the raw numbers, SurpMark looks at the sequence of colors. It asks: "How often does the text go from Red to Green? How often does it go from Green to Yellow?"

3. The "State Transition" Map

Think of this like a dance floor.

  • Human dancers might jump from a slow step to a fast spin, then to a slide, in a very unique, unpredictable way.
  • Robot dancers have a specific habit. If they do a wild spin (Red), they almost always immediately return to a slow, steady step (Green). They have a "recovery" pattern.

SurpMark builds a map of these dance moves (transitions). It creates a "Human Dance Map" and a "Robot Dance Map" based on thousands of examples it studied beforehand.

4. The Final Test: The "Gap"

When a new text arrives, SurpMark records its dance moves and compares them to the two maps.

  • It calculates the distance between the new text and the Human Map.
  • It calculates the distance between the new text and the Robot Map.
  • It subtracts one from the other.

If the text's dance moves look more like the Robot Map (especially that specific "spin-then-steady" recovery pattern), the detector flags it as machine-generated. If it looks more like the chaotic Human Map, it's flagged as human.

Why is this special?

The paper highlights three main advantages:

  1. It doesn't need to know the robot's name: Many detectors need to know exactly which robot wrote the text to work well. SurpMark is a "black-box" detector. It works even if the text was written by a secret, powerful robot it has never seen before. It just looks at the style of the thinking, not the specific model.
  2. It's fast and cheap: Some other detectors try to rewrite the text or generate new versions of it to see how it changes. This is like asking a suspect to write a story five different times to see if they get nervous. It takes a lot of time and computer power. SurpMark just reads the text once, like a quick glance at a fingerprint.
  3. It catches the "Advanced" robots: The paper found that for very smart, expensive robots, the "surprise" levels look almost exactly like humans. However, the pattern of how they recover from surprises (the dance moves) is still different. SurpMark catches this subtle rhythm that other detectors miss.

The Bottom Line

SurpMark is a tool that detects AI text by analyzing the rhythm of surprise in the writing. It doesn't care about the specific words; it cares about the "heartbeat" of the text. If the heartbeat has that specific "jolt-and-recover" rhythm typical of machines, it knows it's AI, even if the robot is trying very hard to sound human.

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 →