Text Watermarking for AI-Generated Text: Detection Methods and Engineering Limits

    Text watermarking offers a statistical signal for identifying AI involvement in writing, but it is probabilistic rather than conclusive. This article explains how token-selection watermarks work, why detection scores only indicate likelihood, and why non-native writing is more prone to false positives. It then outlines a practical architecture combining multiple signals, tiered decisions, human review, and governance to build a reliable content moderation workflow.

    1. Why Content Provenance Matters: Lessons from an Award Controversy

    Shortly after a major literary award was announced, one of the winners publicly acknowledged using an AI generation tool during the writing process. The disclosure triggered a wide debate over the boundary between human and machine authorship. Around the same period, a cloud vendor announced plans to add text watermarking to a new version of its large model for a regional market, aiming to help determine whether a piece of content involved model-generated text.

    Together, these two events turned “the identifiability of machine-generated text” from an academic topic into an engineering problem.

    For developers and enterprise users, the requirement is straightforward: in scenarios such as content moderation, academic plagiarism screening, marketing material compliance, and customer support knowledge base governance, there needs to be an automated signal that can help answer the question “Could this text have been produced by a model?” However, once teams try to implement such a signal, they discover that it is inherently probabilistic rather than a deterministic binary judgment.

    2. Core Principle of Text Watermarking: Turning Word Choice into a Statistical Marker

    When a large language model generates text, it makes a selection at each step from a set of candidate tokens. There are certain positions where several candidates are semantically close, and choosing one over another has limited impact on the meaning of the sentence. Watermarking techniques exploit these “replaceable choices” by making the model prefer certain words at specific positions according to predefined rules. This leaves a pattern across the entire text that is difficult for ordinary readers to notice but can be statistically detected by a specific algorithm.

    The following illustrative pseudocode helps explain the idea of “rule-based word selection” (it expresses the principle only and is not a real API):

    1. def pick_token(candidates, key, watermark_strength):
    2. # candidates: a set of semantically similar candidate words
    3. # key: a stable hash derived from the context and a secret key
    4. # watermark_strength: strength of the rule bias, 0 means no watermark
    5. if len(candidates) < 2:
    6. return candidates[0]
    7. h = stable_hash(key) % len(candidates)
    8. if watermark_strength > 0 and h == 0:
    9. return candidates[0] # hits the "green list", forming a detectable statistical bias
    10. return sample_by_model_prob(candidates)

    The result is that unwatermarked text is statistically close to a random distribution, while watermarked text exhibits a detectable shift. The detection side does not need to know the original text. It only needs to perform the same segmentation and statistics on the text to obtain a “watermark score,” which is then converted into the “likelihood that the text was generated by the model.”

    3. Necessary Boundaries: Why It Can Only Provide “Likelihood”

    One of the most common engineering mistakes is treating the watermark score as definitive proof. Three boundaries must be maintained:

    1. The output is a probability, not a conclusion. Detection tools provide confidence or likelihood, which should not be used directly as a basis for punishment.
    2. It cannot distinguish “full generation” from “partial polishing.” Even if the likelihood approaches 100%, it can only indicate possible model involvement; it cannot determine whether this was initial drafting, paragraph expansion, or merely language polishing.
    3. It is sensitive to rewriting, translation, and excerpting. After substantial rewriting, cross-language conversion, or extensive manual editing, the statistical bias may be weakened or even disappear, leading to false negatives.

    Therefore, a reasonable product design is “risk flagging plus human review,” not “automatic classification.”

    4. False Positive Risks: Why Non-Native Writing Is More Likely to Be “Wrongly Flagged”

    Industry research has long indicated systematic bias in detectors. A university research team once selected a batch of standardized English essays written by non-native English speakers for testing. The results showed that the average proportion of essays wrongly flagged as machine-generated exceeded 60%. The reason is not that the model is too “human-like,” but that such writing often features standardized sentence structures and well-organized layouts. Its statistical characteristics are closer to textbook examples, which happen to overlap with the “machine features” identified by some detectors.

    This leads to two engineering conclusions:

    • A single score cannot be used in high-stakes scenarios (such as degree review or hiring evaluation); human review and appeal channels must be introduced.
    • Detection thresholds need to be calibrated by population, language, and genre to avoid structural false positives against specific groups.

    5. Engineering Implementation: Building a Trustworthy Content Moderation Pipeline

    To integrate similar capabilities into your own system, it is recommended to adopt a “multi-signal fusion” architecture rather than relying on a single watermark:

    • Signal layer: model-side watermark score, perplexity and burstiness statistics, style consistency features, metadata (generation time, editing history).
    • Decision layer: weighted fusion and tiered thresholds, outputting three levels of “low/medium/high risk” rather than a single value.
    • Review layer: medium and high risk cases enter a human review queue; evidence snapshots and operation logs are retained to support appeals and traceability.
    • Governance layer: continuous observation of false positive rates and appeal success rates through logging and monitoring/alerting, with periodic regression calibration.

    When implementing on the cloud, you can use object storage to save evidence snapshots, message queues to handle peak shaving and drive asynchronous detection, container platforms to host detection services, and logging and monitoring systems for observability. All thresholds and weights should be configurable for gradual adjustment by business scenario.

    6. Practical Checklist for Developers

    1. Clarify the purpose: Is it risk flagging or compliance forensics? This determines the strictness of thresholds and processes.
    2. Never assign blame based on a single point: Position detection conclusions as clues, supported by human review and appeals.
    3. Calibrate by layers: Evaluate false positive rates separately by language, genre, and user group.
    4. Preserve explainability: Output should include score composition and key evidence to facilitate review.
    5. Monitor adversarial evolution: Rewriting, translation, and compression all affect watermark survival rates and require continuous regression testing.
    6. Prioritize privacy and compliance: Minimize detection data collection, and clearly define retention periods and access permissions.

    7. Conclusion

    Text watermarking provides an engineering-friendly statistical signal for identifying AI involvement in writing, but it is inherently a probabilistic tool, not a judgment machine. Understanding its principles, acknowledging its boundaries, and building a closed loop with multiple signals and human review is the prudent path for developers and enterprises to address content provenance challenges.