Beyond Global Scalars: Synergizing Token-Level Statistics and Deep Semantics for Adversarial AIGC Text Detection
Organizations: Tencent BAC · School of Electronic and Computer Engineering, Peking University
Abstract
The rapid evolution of large language models necessitates robust machine-generated text detection. Existing paradigms typically follow two isolated tracks. Training-free methods rely on global statistical scalars such as perplexity, while training-based methods utilize semantic hidden states. Both approaches exhibit fundamental vulnerabilities in adversarial scenarios. Global scalars act as lossy compressions that obscure local probabilistic burstiness in interleaved texts, whereas pure semantic models overfit to specific fingerprints and remain susceptible to spoofing. To expose these flaws, we introduce MOSAIC, a comprehensive adversarial benchmark comprising 16000 samples across a full-granularity attack spectrum. To address these challenges, we propose NeuroStat, an end-to-end framework bridging the statistical and semantic gap. NeuroStat captures uncompressed token-level probabilistic logits alongside deep semantic hidden states from a single causal language model backbone. We fuse these heterogeneous signals through Macro-State Residual Modulation, which adaptively calibrates local convolutional features using global uncertainty indicators. Orthogonal and contrastive losses further ensure the learning of complementary representations. Extensive experiments demonstrate that NeuroStat maintains exceptional robustness on MOSAIC compared to the severe degradation of state-of-the-art methods, establishing a new standard for adversarial text detection. Code and the MOSAIC benchmark are available at https://github.com/TencentBAC/NeuroStat.
Figures & tables
| Benchmark | Data Statistics | MGT Tasks | Adversarial Attack Coverage | Summary | |||||||||||
| Size | #Dom. | Gen. | Pol. | Rew. | Inter- leaved | Stat. Hijack | Trans- lation | Para- phrase | Prompt Inj. | Char./ Enc. | Recur- sive | Dom./ Fmt. | #Cat. | #Atk. | |
| TuringBench Uchendu et al. (2021) | 168.6K | 1 | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | 0 | 0 |
| HC3 Guo et al. (2023) | 85K | 3 | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | 0 | 0 |
| M4 Wang et al. (2024) | 24.5K | 4 | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✓ | 1 | 1 |
| MAGE Li et al. (2024) | 29K | 5 | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✓ | ✗ | ✗ | ✗ | ✓ | 2 | 2 |
| RAID Dugan et al. (2024) | 628.7K | 4 | ✓ | ✗ | ✓ | ✗ | ✗ | ✗ | ✓ | ✗ | ✓ | ✗ | ✗ | 2 | 11 |
| MIRAGE-DIG (Disjoint-Input Generation) | ||||||||||||
| Methods | Generate | Polish | Rewrite | |||||||||
| AUROC | Accuracy | MCC | TPR@5% | AUROC | Accuracy | MCC | TPR@5% | AUROC | Accuracy | MCC | TPR@5% | |
| Likelihood Solaiman et al. (2019) | 0.4936 | 0.5091 | 0.0183 | 0.0147 | 0.4653 | 0.5000 | 0.0000 | 0.0214 | 0.4337 | 0.5000 | 0.0000 | 0.0148 |
| LogRank Ippolito et al. (2020) | 0.4992 | 0.5128 | 0.0260 | 0.0220 | 0.4512 | 0.5000 | 0.0000 | 0.0195 | 0.4225 | 0.5000 | 0.0000 | 0.0132 |
| Entropy Gehrmann et al. (2019) | 0.6522 | 0.6150 | 0.2543 | 0.1099 | 0.5543 | 0.5417 | 0.1247 | 0.0954 | 0.5805 | 0.5566 | 0.1650 | 0.1189 |
| RoBERTa-Base Liu et al. (2019) | 0.5523 | 0.5397 | 0.1434 | 0.1250 | 0.4859 | 0.5010 | 0.0088 | 0.0460 | 0.5020 | 0.5049 | 0.0293 | 0.0569 |
| Robustness Evaluation on the MOSAIC Adversarial Benchmark | ||||||||||
| Methods | AUROC across 8 Adversarial Attack Categories | Overall Performance (%) | ||||||||
| Interleaved | Stat. Hijack | Translation | Paraphrase | Prompt Inj. | Char./Enc. | Recursive | Dom./Fmt. | AUROC | TPR@5% | |
| Likelihood Solaiman et al. (2019) | 49.8 | 30.6 | 62.8 | 47.0 | 47.8 | 34.1 | 46.4 | 50.0 | 46.1 | 3.5 |
| LogRank Ippolito et al. (2020) | 50.3 | 69.9 | 37.9 | 53.4 | 53.1 | 65.5 | 54.5 | 51.2 | 54.5 | 9.3 |
| Entropy Gehrmann et al. (2019) | 48.2 | 65.1 | 40.8 | 50.3 | 50.1 | 60.7 | 49.9 | 49.5 | 51.8 | 6.9 |
| RoBERTa-Base Liu et al. (2019) | 47.6 | 46.8 | 55.6 | 50.0 | 45.2 | 46.4 | 47.9 | 43.9 | 47.9 | 3.0 |
| Configuration | TF | TB | MSRM | MIRAGE DIG (AUROC) | ||
| Polish | Rewrite | Generate | ||||
| TB-Only (Seq. Cls.) | ✓ | 0.8990 | 0.8918 | 0.9787 | ||
| TF + TB (Concat) | ✓ | ✓ | 0.9280 | 0.9145 | 0.9934 | |
| NeuroStat (Full) | ✓ | ✓ | ✓ | 0.9576 | 0.9490 | 0.9955 |
| Configuration | MIRAGE DIG (AUROC) | |||||
| Polish | Rewrite | Generate | ||||
| CE Only | ✓ | 0.8859 | 0.8798 | 0.9850 | ||
| + | ✓ | ✓ | 0.9179 | 0.9124 | 0.9922 | |
| + | ✓ | ✓ | 0.9129 | 0.9051 | 0.9865 | |
| NeuroStat (Full) | ✓ | ✓ | ✓ | 0.9576 | 0.9490 | 0.9955 |
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
| Source Dataset | Domain | Raw Samples |
| MIRAGE-BENCH DIG | Multi-domain | 16,411 |
| MIRAGE-BENCH SIG | Multi-domain | 16,388 |
| AI Detection 3000 | Mixed | 3,354 |
| PubMed | Biomedical | 150 |
| SQuAD | Wikipedia/QA | 150 |
| Writing Prompts | Creative Writing | 150 |
| ImBD Test Dataset (GPT-3.5 & GPT-4o polished) | ||||||
| Methods | GPT-3.5 | GPT-4o | ||||
| XSum | Writing | PubMed | XSum | Writing | PubMed | |
| Likelihood Solaiman et al. (2019) | 0.4982 | 0.8788 | 0.5528 | 0.4396 | 0.8077 | 0.4596 |
| LogRank Ippolito et al. (2020) | 0.4711 | 0.8496 | 0.5597 | 0.4002 | 0.7694 | 0.4472 |
| Entropy Gehrmann et al. (2019) | 0.6742 | 0.3021 | 0.5662 | 0.6122 | 0.2802 | 0.5899 |
| RoBERTa-Base Liu et al. (2019) | 0.5806 | 0.7225 | 0.4370 | 0.4921 | 0.4774 | 0.2496 |
| Config | Int. | S.H. | Trans. | Para. | P.I. | C/E | Rec. | D/F | Avg. |
| TB-Only | 68.0 | 70.0 | 71.0 | 70.0 | 82.0 | 60.0 | 85.0 | 93.0 | 74.9 |
| TF-Only | 70.5 | 76.0 | 64.0 | 66.0 | 77.0 | 65.5 | 88.0 | 90.0 | 74.6 |
| Concat | 71.8 | 76.2 | 73.4 | 71.5 | 84.1 | 66.7 | 90.2 | 96.1 | 78.8 |
| +MSRM | 76.9 | 80.5 | 77.3 | 77.3 | 89.9 | 71.2 | 95.5 | 98.9 | 83.4 |
| Fusion Mechanism | Params | MOSAIC AUROC |
| Naive concatenation | 0 | 78.8 |
| Multiplicative gate (w/o residual) | 192 | 79.7 |
| Log-rank-only gate | 96 | 80.6 |
| Cross-attention fusion | 16,640 | 80.9 |
| Entropy-only gate | 96 | 81.3 |
| SE-style modulation | 2,128 | 81.5 |
| Train Pairs | MIRAGE-Polish | MOSAIC Avg. | MOSAIC TPR@5% |
| 100 | 0.8891 | 71.4 | 39.7 |
| 250 | 0.9247 | 78.9 | 51.6 |
| 500 (default) | 0.9576 | 83.4 | 57.7 |
| 1,000 | 0.9631 | 84.7 | 60.5 |
| 2,000 | 0.9694 | 85.9 | 63.4 |
| 5,000 | 0.9718 | 86.5 | 64.9 |
| Target Generator | Access | AUROC | TPR@5% |
| GPT-5.4 | Closed | 79.6 | 51.2 |
| Claude-Opus-4-6 | Closed | 81.3 | 54.7 |
| Gemini-3.1-Pro | Closed | 82.7 | 56.9 |
| MiniMax-M2.7 | Closed | 84.1 | 58.8 |
| GLM-5.0 | Open | 86.2 | 62.4 |
| Kimi-K2.5 | Open | 86.5 | 62.9 |
| Method | Train. Params | Peak Mem | Latency/Sample | Throughput | Train Time |
| RoBERTa-Base | 125M | 3.1GB | 6.2ms | 161/s | 3min |
| Fast-DetectGPT | 0 (frozen) | 2.4GB | 22.7ms | 44/s | – |
| ImBD (LoRA) | 4M | 4.7GB | 25.9ms | 39/s | 12min |
| DetectAnyLLM | 0.50B | 5.8GB | 28.4ms | 35/s | 21min |
| NeuroStat (Qwen2-0.5B) | 0.51B | 6.4GB | 31.1ms | 32/s | 24min |
| NeuroStat (Qwen3.5-0.8B) | 0.82B | 9.9GB | 42.6ms | 23/s | 38min |
AI-Generated Text Detection
AI-generated text detection develops methods to distinguish human-written, machine-generated, and AI-edited text.
See all 170 papers