Multimodal AI Detection for Math-Heavy Scientific Text
Organizations: Duke University · Indian Institute of Science
Abstract
As large language models become increasingly capable of generating, and assisting with, scientific writing, there is a need for greater transparency and disclosure around the use of AI in research. Consequently, a veritable subfield of research and a number of commercial services aim to flag AI-generated content automatically. However, existing detectors which rely only on text extracted from PDFs fail to benefit from the rich visual information contained in the formatting of math-heavy scientific content. To study this, we select human-written proof and prose passages from pre-2022 arXiv LaTeX sources and re-generate them using 15 modern LLMs within the context of the same paper. This leaves us with coupled human and AI outputs in three different representations: the LaTeX source, a rendered image of the PDF, and the text extracted from the PDF. We find that the accuracy of the state-of-the-art Pangram 4 drops significantly as the mathematical content in a passage increases, especially when evaluated on text as opposed to LaTeX. However, this is not an inherent limitation of detecting AI-generated math: finetuning Qwen-3.5-27B based detectors on this domain recovers the gap, with LaTeX inputs performing significantly better than text since they preserve more formatting information. Since LaTeX sources are rarely available in practice, we also train SnapJudge: an image-based detector operating on screenshots of both prose and proofs from papers. At 0.1% false positive rate, SnapJudge achieves a detection rate of 92% on proofs and 93% on prose generated by frontier models, substantially outperforming both Pangram 4 and our text-based detector. We release our data, models and code at https://nlplab.cs.duke.edu/snapjudge.
Figures & tables
| Train | Val | Test | Calib. | |
|---|---|---|---|---|
| LaTeX | 34.1k/30.2k | 1.3k/2.2k | 11.5k/12.2k | 357.4k |
| Text | 32.3k/30.1k | 1.1k/1.9k | 9.9k/11.9k | 354.0k |
| Image | 31.6k/30.0k | 1.1k/1.7k | 9.9k/11.8k | 351.6k |
| LaTeX | Text | |||||||
| Open avg. | Frontier avg. | Open avg. | Frontier avg. | |||||
| Prose | Proofs | Prose | Proofs | Prose | Proofs | Prose | Proofs | |
| Shallow baselines (features + logistic regression) | ||||||||
| stylometric | 0.030 | 0.003 | 0.014 | 0.000 | 0.014 | 0.002 | 0.006 | 0.000 |
| char TF-IDF | 0.558 | 0.394 | 0.288 | 0.100 | 0.480 | 0.317 | 0.238 | 0.145 |
| word TF-IDF | 0.664 | 0.584 | 0.359 | 0.308 | 0.559 | 0.485 | 0.247 | 0.238 |
| all 15 models in training | leave-one- model-out | |||
|---|---|---|---|---|
| 9B detector | Proofs | Prose | Proofs | Prose |
| LaTeX | 0.855 | 0.889 | 0.745 | 0.820 |
| text | 0.754 | 0.849 | 0.669 | 0.808 |
| SnapJudge | 0.880 | 0.847 | 0.812 | 0.806 |
| TPR at 0.1% FPR | MIRAGE | Peer review | RAID | EditLens |
|---|---|---|---|---|
| Binoculars | 0.242 | 0.540 | 0.771 | 0.194 |
| Fast-DetectGPT | 0.033 | 0.459 | 0.479 | 0.332 |
| EditLens-Llama | 0.995 | 0.964 | 0.849 | 1.000 |
| EditLens-RoBERTa | 0.851 | 0.684 | 0.537 | 0.995 |
| Benchmark paper | 0.777 ‡ | 0.765 | 0.927 ‡ | 1.000 |
| Ours (text) | 0.997 | 1.000 | 0.823 | 0.998 |
| Detector | Spearman |
|---|---|
| Binoculars | 0.420 |
| Fast-DetectGPT | 0.345 |
| EditLens-Llama | 0.651 |
| EditLens-RoBERTa | 0.561 |
| Ours (text) | 0.624 |
| SnapJudge | 0.649 |
Appendix figures & tables20 assets
Supplementary material from the paper’s appendix.
Appendix
| 27B models | LaTeX | Text | SnapJudge | OCR | AI-fraction estimator |
|---|---|---|---|---|---|
| backbone | Qwen3.5-27B | Qwen3.5-27B | Qwen3.5-27B | Qwen3.5-27B | Qwen3.5-27B |
| input | LaTeX source, 512-token windows, stride 256 | PyMuPDF text, 512-token windows, stride 256 | rendered image, visual tokens of pixels | OCR text of the rendered image, 512-token windows, stride 256 | rendered image |
| instruction | none | none | “Determine whether this mathematical proof was written by a human or generated by AI.” | none | “Estimate how much of this scientific page excerpt was written by AI.” |
| head output | 2 classes | 2 classes | 2 classes | 2 classes | 5 buckets |
| LoRA rank | 8 | 8 | 16 | 8 | 16 |
| learning rate |
| Proofs | Prose | ||||||||||
| rep. | GPT-4.1 | GPT-5.1 | o4-mini | Claude | Gemini | GPT-4.1 | GPT-5.1 | o4-mini | Claude | Gemini | |
| LaTeX | |||||||||||
| Shallow baselines (features + logistic regression) | |||||||||||
| stylometric | LaTeX | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.026 | 0.002 | 0.001 | 0.008 | 0.030 |
| char TF-IDF | LaTeX | 0.227 | 0.030 | 0.093 | 0.065 | 0.088 | 0.661 | 0.119 | 0.145 | 0.098 | 0.418 |
| word TF-IDF | LaTeX | 0.404 | 0.268 | 0.333 | 0.292 | 0.243 | 0.729 | 0.229 | 0.211 | 0.164 | 0.460 |
| Proofs | Prose | ||||
| Detector | FPR | Frontier avg. | Open avg. | Frontier avg. | Open avg. |
| LaTeX | 0.1% | 0.938 | 0.920 | 0.957 | 0.943 |
| 0.05% | 0.916 | 0.900 | 0.945 | 0.938 | |
| 0.01% | 0.846 | 0.849 | 0.919 | 0.924 | |
| 0.005% | 0.824 | 0.832 | 0.907 | 0.918 | |
| 0.001% | 0.678 | 0.745 | 0.858 | 0.893 | |
| EditLens Llama | EditLens RoBERTa | Fast- DetectGPT | Binoculars | Ours, text | SnapJudge | |
| EditLens test set | ||||||
| AI-edited | 0.593 | 0.382 | 0.025 | 0.009 | 0.204 | 0.249 |
| MIRAGE | ||||||
| polish | 0.706 | 0.254 | 0.002 | 0.015 | 0.439 | 0.393 |
| rewrite | 0.757 | 0.248 | 0.002 | 0.013 | 0.398 | 0.354 |
| APT-Eval | ||||||
| Easy | Hard | ||||||||
| AI-BP | AI-EP | AI-HI | H-AI | AI-BP | AI-EP | AI-HI | H-AI | H | |
| Pangram 3.0 † | 100.0 | 100.0 | 100.0 | 3.0 | 97.0 | 99.3 | 92.6 | 3.1 | 0.0 |
| GPTZero † | 96.7 | 93.3 | 91.0 | 3.0 | 96.0 | 95.8 | 89.4 | 3.4 | 1.0 |
| Ours, LaTeX | 100.0 | 100.0 | 99.9 | 44.3 | 99.9 | 100.0 | 99.95 | 35.6 | 0.0 |
| Ours, text | 100.0 | 100.0 | 100.0 | 45.9 | 100.0 | 100.0 | 99.95 | 40.4 | 0.0 |
| SnapJudge | 100.0 | 99.6 | 99.9 | 21.7 | 98.3 | 98.3 | 96.0 | 15.0 | 0.0 |
| Easy | Hard | |||||
|---|---|---|---|---|---|---|
| H-AI flagged | LaTeX | Text | SnapJudge | LaTeX | Text | SnapJudge |
| 98.6 | 99.0 | 100.0 | 97.1 | 98.7 | 98.0 | |
| 92.9 | 90.2 | 98.8 | 67.2 | 65.5 | 87.6 | |
| 74.5 | 50.3 | 92.0 | 29.9 | 16.9 | 66.1 | |
| 8.1 | 0.8 | 56.6 | 5.1 | 1.9 | 12.0 | |
| 0.1 | 0.0 | 12.3 | 0.4 | 0.1 | 0.5 | |
| Input | Passage | Model | Before | After | Pangram 4 |
|---|---|---|---|---|---|
| LaTeX | Proofs | GPT-6 astra | 0.395 | 0.789 | 0.084 (0.011) |
| Claude Opus 5.5 | 0.429 | 0.684 | 0.122 (0.000) | ||
| Prose | GPT-6 astra | 0.465 | 0.530 | 0.230 (0.120) | |
| Claude Opus 5.5 | 0.415 | 0.420 | 0.250 (0.120) | ||
| Text | Proofs | GPT-6 astra | 0.274 | 0.645 | 0.108 (0.022) |
| Claude Opus 5.5 | 0.391 | 0.615 | 0.146 (0.021) |
| Detector | Proof | Prose |
|---|---|---|
| CNNDetection ( Wang et al., 2020 ) | 0.55 | 0.54 |
| UnivFD ( Ojha et al., 2023 ) | 0.49 | 0.54 |
| NPR ( Tan et al., 2024 ) | 0.42 | 0.47 |
| SAFE ( Li et al., 2025 ) | 0.53 | 0.48 |
| Community Forensics ( Park and Owens, 2025 ) | 0.51 | 0.49 |
| SnapJudge (ours) | 0.99 | 0.99 |
| Mathematics | Computer science | Other fields | |||||||
|---|---|---|---|---|---|---|---|---|---|
| month | prose | proofs | prose | proofs | prose | proofs | |||
| 2023-01 | 626 | 0.0 | 0.2 | 600 | 0.5 | 0.0 | 322 | 0.3 | 0.0 |
| 2023-02 | 583 | 0.0 | 0.2 | 600 | 0.5 | 0.0 | 304 | 0.0 | 0.0 |
| 2023-03 | 638 | 0.0 | 0.0 | 600 | 0.8 | 0.0 | 381 | 0.5 | 0.0 |
| 2023-04 | 645 | 0.2 | 0.2 | 600 | 0.7 | 0.2 | 299 | 0.7 | 0.3 |
| 2023-05 | 566 | 0.2 | 0.2 | 600 | 0.8 | 0.0 | 367 | 0.3 | 0.0 |
| Prose | Proofs | |||||
|---|---|---|---|---|---|---|
| year | math | CS | other | math | CS | other |
| 2018 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
| 2019 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
| 2021 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
| 2022 | 0.0 | 0.1 | 0.1 | 0.0 | 0.0 | 0.0 |
| 2023 | 0.3 | 1.0 | 0.6 | 0.1 | 0.1 | 0.0 |
| mean review score | acceptance rate (%) | ||||||
|---|---|---|---|---|---|---|---|
| Year | submissions | with proofs | without | ( ) | with proofs | without | ( ) |
| 2020 | 2,213 | 4.64 | 4.34 | (3.8) | 36.5 | 29.1 | (3.3) |
| 2021 | 2,594 | 5.65 | 5.46 | (4.4) | 35.9 | 32.1 | (1.8) |
| 2022 | 2,617 | 5.77 | 5.41 | (7.0) | 47.2 | 39.3 | (3.8) |
| 2023 | 3,792 | 5.68 | 5.42 | (5.4) | 46.7 | 40.1 | (3.4) |
| 2024 | 7,404 | 5.44 | 5.05 | (11.8) | 46.0 | 36.2 | (6.7) |
| share of submissions with proofs | |||
| Primary area | 2024 | 2025 | 2026 |
| The nine high-proof areas (share in 2026) | |||
| learning theory | 69.0% | 71.5% | 78.4% |
| causal reasoning | 49.5% | 56.3% | 58.5% |
| optimization | 50.6% | 57.8% | 57.2% |
| probabilistic methods (Bayesian methods, sampling, UQ) | 40.6% | 42.4% | 51.6% |
| Generator | Proof passages | Prose passages | Cost (USD) |
|---|---|---|---|
| GPT-4.1 | 1,477 | 1,244 | 90 |
| GPT-5.1 | 1,487 | 1,600 | 85 |
| o4-mini | 801 | 1,600 | 60 |
| Claude Sonnet 5 | 1,053 | 1,147 | 70 |
| Gemini 3.1 Pro | 1,040 | 1,045 | 95 |
| Total | 5,858 | 6,636 | 390 |
| Flawed proofs (17) | Control proofs (13) | |
|---|---|---|
| Mean severity | 7.08 | 4.23 |
| Standard deviation | 2.46 | 2.20 |
| Median | 8.0 | 4.0 |
| Severity | 12/17 (71%) | 2/13 (15%) |
| Text | SnapJudge | LaTeX | ||||
| Score range | score | AI share | score | AI share | score | AI share |
| Our test sets | ||||||
| 0–0.05 | 0.001 | 0.032 | 0.012 | 0.017 | 0.001 | 0.026 |
| 0.05–0.2 | 0.113 | 0.255 | 0.096 | 0.102 | 0.115 | 0.189 |
| 0.2–0.35 | 0.282 | 0.351 | 0.267 | 0.203 | 0.282 | 0.234 |
| 0.35–0.5 | 0.443 | 0.478 | 0.426 | 0.295 | 0.450 | 0.489 |
| true pred. | 1 | 2 | 3 | 4 | 5 | MAE |
|---|---|---|---|---|---|---|
| 1 | 91.4 | 6.5 | 1.1 | 0.2 | 0.8 | 0.077 |
| 2 | 2.8 | 91.6 | 4.8 | 0.2 | 0.6 | 0.058 |
| 3 | 0.5 | 5.1 | 89.0 | 3.8 | 1.6 | 0.062 |
| 4 | 0.5 | 0.5 | 4.8 | 72.4 | 21.8 | 0.055 |
| 5 (AI) | 0.1 | 0.2 | 1.0 | 0.6 | 98.1 | 0.023 |
| all | 0.055 |
AI-Generated Text Detection
AI-generated text detection develops methods to distinguish human-written, machine-generated, and AI-edited text.
See all 170 papers