acceptodds
Under review as a conference paper at ICLR 2027

Robust Detection of LLM-Generated Text under Contamination.

Abstract

We study the detection of LLM-generated text under editing and contamination. Modeling human and machine text as finite-order Markov processes with Huber contamination, we characterize an exact boundary for reliable detection under our assumptions. Detection is impossible when contamination is sufficiently large relative to clean-source separation. Below this boundary, a collection of clipped likelihood-ratio tests achieves vanishing worst-case errors. This construction motivates clipping as a simple modification of existing statistical detectors. For a broad class of additive scores, we identify conditions under which the clipped test is consistent while the raw test's worst-case power tends to zero. We evaluate seven detectors across three datasets and three generation models, and on the RAID benchmark. Clipping improves robustness in both studies, with gains varying across detectors and contamination settings. For example, at a target false-positive rate of 5%, clipping improves the log-likelihood–log-rank ratio (LRR) detector's true-positive rate by a median of 8.3 percentage points in the controlled study and 2.1 and 4.3 points in rate- and attack-specific RAID evaluations, respectively.

Primary area:
foundation or frontier models, including LLMs
Keywords:
LLM-generated text detection, robust hypothesis testing, Markov Chain, Huber Contamination, clipping

Reviews

Among:
Shape:
1234this paper, Top 49%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.33 over 3 reviews, above 51% of the others.
Reviewer_bZgBOpenReview ↗
Rating
2
Confidence
4
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

The paper studies when LLM-generated text remains detectable after editing. Under a Markov model with Huber contamination, it derives a detection boundary and identifies conditions under which clipped tests succeed while raw tests fail. Experiments show that clipping can improve robustness, although the gains vary substantially across detectors and editing settings.

Critical strengths

The theoretical analysis identifies a detection boundary and conditions, helping explain when clipping can improve robustness.

Critical weaknesses
  1. The raw-versus-clipped comparisons do not establish an advantage over existing alternatives. Missing comparisons include kNNProxy’s lower-tail clipping component and trimmed means.
  2. The main RAID results rely on attack- or rate-specific fitting, which requires information usually unavailable at detection time. With a universal rule, gains are concentrated in Rank and LRR, while other detectors improve little. Some gains also reduce clean-text detection and increase human false positives. Thus, the proposed method’s practical value as a general robustness enhancement is uncertain.
Questions for authors
  1. How do Theorems 3.1 and 4.1 extend existing robust-testing results for composite hypotheses and history-dependent contamination?
  2. Without attack or modification-rate information, under the same scoring model and tuning budget, how does universal clipping compare with kNNProxy’s clipping component and trimmed means?
  3. How much of the RAID TPR gain remains after matching human FPR and limiting clean TPR loss, particularly for Binoculars?
2 comments

We thank the reviewer for the feedback and the constructive criticisms.

1. Theoretical contribution. As mentioned in Section~1.1, Huber and Strassen study minimax testing for composite hypotheses. Saha and Ramdas address composite hypotheses and adaptive contamination in a sequential setting. We ask a fixed-length question: For a fixed sample-size, how much contamination makes reliable detection impossible? To our knowledge, Theorem 3.1 gives the first exact boundary for unwatermarked LLM detection under a composite class of human Markov sources and history-dependent Huber contamination. Theorem 4.1 distinguishes this limit from failure of a particular detector: under its assumptions, clipping an additive score can preserve consistency even when the raw test loses worst-case power at vanishing FPR. This framework provides a benchmark for studying other detection rules.

2. Universal clipping versus alternatives. We compared clipping and trimming on the same scores with equal tuning budgets, without attack or rate labels at prediction time. At matched 5% human FPR, rank TPR rose from 37.75% raw to 56.79% with clipping and 58.16% with trimming. For LRR, the two were nearly tied (62.02% vs. 62.11%). For others, the two are nearly tied as well. Clipping therefore does not outperform trimming in the full-universial comparison. On the same Falcon log probabilities, kNNProxy’s fixed-floor component yielded 52.15% TPR versus 52.33% for both raw and tuned clipping. We also mention here that our analysis goes beyond log-likelihood: it shows why clipping can help a broader class of additive scores.

3. Binoculars and clean-performance cost. After limiting clean tuning TPR loss to one percentage point, no full-universal gain remained for Binoculars at matched 5% human FPR: attacked TPR was 72.81% raw and 72.72% clipped. At independently calibrated thresholds, clean test TPR increased by 0.10 points and human FPR by 0.02 points. We will revise the paper to reflect this limited benefit.

We agree with the reviewer that, although clipping improves detection in some settings, our experiments do not support it as a general solution for detecting contaminated LLM-generated text. However, we want to emphasize that, our main contribution is, to our knowledge, the first framework to characterize an exact detection boundary for unwatermarked LLM. Clipping arises naturally from the test that achieves this boundary; it is one way to improve existing detectors. We see the framework as a stepping stone for developing other rules and will revise the paper to include the trimmed-mean comparisons.

Thanks for the response. For Weakness1 and Qusetion2, the newly added comparison experiments address my concerns about the missing comparison. However, for Question1, I think the theoretical novelty remains unclear. Actually, the existing work (e.g. Saha and Ramdas) also covers fixed sample-sizes, so the fixed-length setting alone is not novel enough. Given the limited gains from universal clipping, the theoretical improvement is key to evaluating the paper’s novelty. Thus, I keep my original rating.

Reviewer_DoWBOpenReview ↗
Rating
2
Confidence
4
Informativeness
1
Presentation
3
Soundness
3
Read review
Paper summary

The work in question is mainly an abstract study of how contamination affects the detection of machine generated text. They consider a detector of machine generated text which works by scoring each token and averaging the scores across tokens to generate a document score. They assume human text and machine text have different distributions of these scores, and consider the case when a machine generated text is contaminated by having certain sentences rewritten by humans. They give theoretical results on the rate of contamination at which distinguishing human and machine text becomes impossible.

They also revisit the idea of clipping the token scores to make the average less dominated by a few extreme tokens, and show that this can strengthen detectors, in the sense that a higher rate of contamination is needed before human and machine text become indistinguishable.

Critical strengths

The mathematics in this paper is done well.

The paper clearly positions itself as a theoretical paper of some real world interest, rather than attempting to oversell the real world applicability. This is refreshing!

The contamination works the other way around to most papers, usually one starts with purely human text and slowly contaminates with machine generated sentences, whereas this contaminates machine text by introducing human rewrites. This is useful, it is useful for the community to have a diversity of approaches to studying the contamination question.

Critical weaknesses

While the results are new, I think it was always fairly clear that there must exist some contamination rate at which human and contaminated machine text become indistinguishable. I don't think the theory is a step towards finding this contamination rate (one would probably just experiment directly with data), and so for me this makes the theoretical results purely abstract. Abstract results are welcome, and this is not a weakness per se, but I don't really count the theory part as advancing our understanding of an important real world problem.

I did find the experimental results interesting, but I think I would state the conclusion differently to the authors. For me, the main conclusion is that clipping extreme token values has only a modest increase in the score of detectors, and that crucially all of these detectors are run on machine generated text where a decoding strategy (top-k or temperature) has been used to steer the machine text away from extreme tokens. (N.B. The Raid dataset accidentally used top-k=50, see DMAP: A Distribution Map for Text). This remains a useful result, but I would state it that clipping is not a solution to the problem of contamination, rather than highlighting the strongest two results from your suite of experiments in the abstract and leaving the more modest results to the experimental section.

Questions for authors

Do you know how decoding strategy affects the results? (I'm not asking for a big suite of experiments here, this will not materially affect my score, but I'm interested).

Since there is no summary box, let me write here that I don't think there's anything wrong with the article at all, but for me it remains just a little bit too niche for ICLR. I regret that this is purely opinion/taste, but I think there's an important place for opinion in peer review, and remain very open minded if other reviewers are more excited about the suitability of the work for ICLR.

3 comments

We thank the reviewer for the feedback and the constructive criticisms.

Theoretical insight: We agree that sufficiently strong contamination making detection impossible is intuitive. However, Theorem 3.1 provides a less obvious insight: detectability depends not only on the contamination rate, but on its relationship to the separation between the clean human and machine sources.

For example, consider two binary i.i.d. source pairs:

  • A: machine (0.5,0.5)(0.5,0.5), human (0.6,0.4)(0.6,0.4);
  • B: machine (0.8,0.2)(0.8,0.2), human (0.9,0.1)(0.9,0.1).

Both have total variation distance 0.10.1, so one might intuitively expect “large enough” contamination to mean the same threshold for both. However, our theory shows that, contamination must retain (1−ϵ)P1(1-\epsilon)P_1: reducing the second token’s probability to the human level requires 20% contamination in A but 50% in B. Thus, equally separated sources in total variation can have substantially different robustness to contamination.

Beyond identifying this obstruction, Theorem 3.1 establishes its sufficiency under our assumptions: below the boundary, reliable detection is achievable uniformly over the composite human class and all admissible history-dependent contamination strategies. Experiments with selected attacks cannot establish this distinction between failure of a particular detector and impossibility for every detector.

Role of decoding. Thank you for raising this question. Our intuition is that the benefit of clipping may be less sensitive to decoding when the extreme scores come mainly from edits: a human replacement can introduce a word the generator would have been unlikely to sample under either decoding strategy. Decoding can still affect how much that word stands out against the unedited text. We did not vary decoding in our controlled study, so we plan to test this intuition by changing the decoding strategy and get back as soon as we finish the experiments.

We agree that the abstract should better represent the range of outcomes. We will revise the abstract so that our results are the most highlighted in the theoretical setup. Our claim is not that clipping solves contamination, but that it can recover detection power in some settings, with little benefit in others.

Finally, we want to emphasize that, to our knowledge, we are the first to formalize the question of when LLM-generated text remains detectable under this model of contamination. Our framework gives a principled way to study that question. Clipping may not always be the best way to improve detection power, but the same framework can help researchers develop and compare other approaches. We agree with the reviewer that detection under editing remains an important open problem, and we see our work as a step toward addressing it.

Decoding sensitivity. We've finished the decoding experiments and found that decoding strategies can indeed change the benefit of clipping. On 500 paired Granite 8B–XSum sources, we kept the detectors and thresholds fixed and repeated generation at temperature 1 with top-kk and top-pp truncation disabled. On unedited text, LRR went from losing 10.2 percentage points of TPR with clipping to gaining 3.2 points. Under 20% random replacement, LRR’s clipping gain fell from 31.73 to 2.00 points, while the entropy-gap gain rose from 12.27 to 19.93 points. So changing the decoding settings can increase the benefit of clipping in some cases and reduce it in others, depending on the detector and the editing condition.

Many thanks for the clarification. I accept that, in addition to showing that some threshold exists at which machine text becomes indistinguishable from human text, you also show that this function depends on the specifics of the underlying probability distribution.

Thanks for running the experiment on decoding strategy. I think this muddies slightly the argument in favour of clipping.

Overall, my thoughts on this paper remain as before. 'Since there is no summary box, let me write here that I don't think there's anything wrong with the article at all, but for me it remains just a little bit too niche for ICLR. I regret that this is purely opinion/taste, but I think there's an important place for opinion in peer review, and remain very open minded if other reviewers are more excited about the suitability of the work for ICLR.' Unfortunately it seems that there are no other non-LLM reviewers to disagree with me....

Reviewer_2PLmOpenReview ↗
Rating
3
Confidence
2
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

This paper studies LLM-generated text detection under human editing, paraphrasing, and human–machine text mixing. Modeling text sources as finite-order Markov processes with Huber contamination, the authors characterize an exact boundary between possible and impossible reliable detection. They further propose clipping token-level detection scores to limit the influence of a small number of extreme tokens. Experiments covering seven detectors, three datasets, three generation models, and the RAID benchmark show that clipping generally improves robustness to text modifications, although the gains vary across detectors and attacks and may come at the cost of reduced performance on clean machine-generated text.

Critical strengths
  • The paper establishes an exact theoretical boundary for detectability under contamination and connects it to clipped likelihood-ratio tests, providing a clear theoretical motivation for improving existing statistical detectors.

  • Clipping is simple and broadly applicable. It improves robustness in both the controlled study and the RAID evaluation, with substantial gains in several detector–attack settings, without requiring fundamental changes to the original detectors.

Critical weaknesses
  • The practical clipping procedures are only partially covered by the theory. Theorem 4.1 applies to additive token scores under specific assumptions, whereas LRR and Binoculars use ratios of aggregated quantities with customized clipping rules. These detectors produce some of the strongest empirical gains, but those gains are theoretically motivated rather than guaranteed by the stated results.

  • The deployment evaluation still depends heavily on labeled, in-distribution tuning data. The primary RAID results use attack- or rate-specific clipping bounds, while the universal rules in Appendix G.5 are trained on the same mixture of attacks, generators, and domains represented at test time. The controlled study also tunes separately for each dataset-generator pair. Transfer to unseen attacks, generators, or domains is therefore not established.

  • Clipping is selected using a fixed objective that assigns 80% weight to modified text and 20% to clean text. This choice produces one particular robustness-clean-performance trade-off, and clipping reduces clean-machine TPR for five detectors in the controlled study. Without weight sensitivity, a Pareto analysis, or a minimum clean-performance constraint, the paper does not provide an operational rule for deciding when clipping should be used.

  • The empirical evaluation compares clipping mainly with each detector’s raw aggregation and does not include alternative robust aggregators such as trimmed means, Winsorization, or median-of-means. Moreover, the confidence intervals hold the selected clipping bounds, score directions, and calibration thresholds fixed. They therefore do not capture uncertainty from refitting the complete procedure, while the many RAID fits are reported with uncorrected pointwise intervals.

Questions for authors
  • Which parts of Theorem 4.1 extend to LRR and Binoculars, whose document scores are ratios rather than additive token-score averages? If the theorem does not apply, could the paper more clearly separate theoretically guaranteed detectors from heuristic extensions?

  • Appendix C.3 studies several sequence lengths under the theoretical model. Can the authors provide a finite-sample bound or a real-text truncation study at practical lengths such as 64, 128, 256, and 512 tokens?

  • How does universal clipping perform when the tuning set excludes the test attack type, generator, or domain? Can useful clipping bounds be selected without labeled attacked data and with a single global calibration procedure?

  • How sensitive are the results to the 0.8/0.2 robustness-clean weighting? Could the authors report a Pareto curve or results under constraints on clean-machine TPR and human FPR?

  • How does clipping compare with other robust aggregation methods? Can uncertainty be recomputed by repeating clipping-bound selection and threshold calibration within each bootstrap or across independent tuning splits?

3 comments

We thank the reviewer for the feedback and the constructive criticisms.

1. Does Theorem 4.1 cover LRR and Binoculars? We do not currently have a theoretical guarantee for our LRR and Binoculars clipping rules. We chose what to clip based on the role of each component. In LRR, both the surprise and the log rank depend on the word that actually appears, so we cap each before forming the ratio. In Binoculars, the denominator measures expected surprise given the preceding context. At the edited position, changing the word does not change that expectation, so we cap only the numerator. This intuition works well in several settings in the controlled study and on RAID (Sections 5.2–5.3).

2. What happens at practical text lengths? Thanks for raising this question. The proof of Theorem 4.1 (In Appendix C.1) already gives a finite-length guarantee, which we will state explicitly as a corollary. For a clipping floor aa with guaranteed mean separation γ(a)>0\gamma(a)>0, let W=ϕ‾−aW=\overline{\phi}-a denote the clipped score range. At the midpoint threshold used in the proof, the probability of missing a contaminated machine text of length nn is at most exp⁡{−nγ(a)2/(8W2)}\exp\{-n\gamma(a)^2/(8W^2)\}, uniformly over all admissible history-dependent contamination strategies. Thus, the sufficient length for a given miss probability depends on the separation relative to the score range: halving γ(a)/W\gamma(a)/W quadruples that length.

3. Does clipping transfer to an unseen attack? We omitted each RAID attack from tuning in turn, fitted the clipping rule on the other ten, and calibrated one global threshold per rule on independent human texts. At matched 5% human FPR, clipping improved mean TPR across the eleven omitted attacks by 15.10 percentage points for LRR and 13.24 for rank. Gains were smaller for log rank (+0.65), entropy (+0.33), and Binoculars (+0.16); log likelihood was unchanged, and entropy gap declined (−0.75). Overall, the held-out results follow the same pattern as the full-universal RAID analysis in Appendix G.5: clipping yields its largest gains for rank and LRR, while changes for the other five detectors remain below one percentage point in magnitude.

4. How sensitive are the results to the clean–attacked weighting? We chose the 80/20 weighting to prioritize detection after editing while still rewarding performance on clean text. Our current experiments do not establish how sensitive the selected bounds are to that choice. We plan to vary the weighting while keeping the data splits and calibration procedure fixed, then report how gains in attacked-text TPR change alongside clean-text TPR and achieved human FPR. We will follow up with those results once the analysis is complete.

5. How does clipping compare with other aggregators, and what do the intervals capture? We compared universal clipping and trimming on the same RAID scores with equal tuning budgets. At matched 5% human FPR, rank TPR rose from 37.75% raw to 56.79% with clipping, 58.19% with symmetric trimming, and 58.16% with one-sided trimming. For LRR, clipping and one-sided trimming were nearly tied (62.02% vs. 62.11%); for the other five detectors, their TPRs differed by at most 0.24 percentage points. We will include these comparisons in the revision. We suggest that clipping does not outperform other aggregation methods in general.

We agree that the current intervals answer a narrower question: how much would test performance vary for the already fitted detector? Our 2,000 paired bootstrap resamples preserve source groups but hold directions, clipping bounds, and thresholds fixed. The intervals are pointwise, not simultaneous across attacks. To assess fitting variability separately, we plan to resample tuning and calibration sources, repeat bound selection and threshold calibration, and measure how often the selected rule changes and how much its gain varies on the same held-out test sources.

We have completed the follow-up experiments and thank the reviewer again for suggesting them.

Q4. Sensitivity to tuning weights. In the full-universal RAID analysis, we compared three weightings of attacked and clean TPR: 50/50, 80/20, and 95/5. Each of the seven detectors selected the same rule under all three weightings, so the test results were identical.

Q5. Refitting uncertainty. We repeated the full-universal RAID analysis 100 times. In each refit, we independently resampled the tuning and calibration sources, refitted the rules and thresholds, and evaluated them on the same test sources. Rank and LRR selected clipping in every refit. Their mean TPR gains on attacked texts were 20.31 and 3.21 percentage points, with central 95% ranges across refits of 18.01 to 22.02 and 2.03 to 4.63 points, respectively. For Binoculars, the mean gain was 0.09 points, with a central 95% range of −0.29 to 0.44. Overall, the main conclusions were stable across refits.

The author's response addresses most of my methodological concerns and shows that clipping provides detector-specific benefits, mainly for Rank and LRR, without generally outperforming trimming. If the authors incorporate these analyses into the revision, narrow the practical claims, and distinguish the additive-score guarantees from the heuristic LRR and Binoculars rules, I will keep my score.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.