Elamur Research⌕
☰
home / papers / 2023 / Intrinsic Dimension Estimation for Robust Detection of AI-Generated Texts

Intrinsic Dimension Estimation for Robust Detection of AI-Generated Texts

Paper · 2023 · Eduard Tulchinskii, Kristian Kuznetsov, Laida Kushnareva et al.

Summary

Detectors of machine-generated text often fail when the generator, topic domain or writer changes. They also tend to flag essays by non-native speakers as AI-written. The authors look for a property of human writing that stays stable across these conditions. They treat each text sample as a cloud of embedding points and estimate the intrinsic dimension of that cloud, mainly with a persistent homology dimension (PHD) estimator, alongside an MLE estimator. They also provide an efficient algorithm for computing the estimate.

Human texts consistently show higher intrinsic dimension than fluent LLM output. This gap lets a single threshold act as a detector that needs no knowledge of the generator. In cross-domain and cross-model tests, the detector is much more stable than supervised RoBERTa classifiers. It also resists prompt-based style manipulation and is less biased against non-native writers. The authors release code and a multilingual dataset of GPT-3.5 generations paired with human texts. This gives a model-agnostic detection tool that has been tested on several languages, including Ukrainian.

Key points

  • Dimension gap: Average intrinsic dimension of human text is about 9 for several alphabet-based languages and about 7 for Chinese. AI-generated text in each language scores roughly 1.5 lower, and the two distributions separate clearly.
  • Robustness to domain and model shift: Supervised RoBERTa-cls classifiers score near-perfectly in-domain but fall to roughly 0.39–0.69 accuracy on unseen domains (Wikipedia, Reddit, StackExchange). PHD stays at about 0.77–0.86 across all pairs and is similarly flat across GPT2, OPT and GPT3.5.
  • Multilingual results: The authors measured ROC-AUC on ChatGPT text in 10 languages: Chinese, English, French, German, Italian, Japanese, Polish, Russian, Spanish and Ukrainian. In the extracted table, Ukrainian scores about 0.77 with PHD and 0.82 with MLE.
  • Less bias against non-native writers:
    • On TOEFL essays, false positive rates were 58% for the OpenAI detector, 52% for GPTZero and 26% for PHD.
    • After the essays were polished by GPT-4, PHD's rate fell to 7.7%, versus 19% for GPTZero.
  • Limitations:
    • The estimate is stochastic, which adds noise to individual scores.
    • The detector works only for fluent, low-temperature generators; otherwise it needs recalibration.
    • Low-resource languages have not been tested.
    • Short texts and texts dense with proper nouns or addresses are error-prone.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

 Fields, topics and concepts

Cite

Cite as Eduard Tulchinskii, Kristian Kuznetsov, Laida Kushnareva, Daniil Cherniavskii, Serguei Barannikov, Irina Piontkovskaya, Sergey Nikolenko and Evgeny Burnaev. 2023. Intrinsic Dimension Estimation for Robust Detection of AI-Generated Texts. arXiv:2306.04723.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.2306.04723 · arXiv 2306.04723

@misc{tulchinskii2023intrinsic,
  title = {{Intrinsic Dimension Estimation for Robust Detection of AI-Generated Texts}},
  author = {Eduard Tulchinskii, Kristian Kuznetsov, Laida Kushnareva, Daniil Cherniavskii, Serguei Barannikov, Irina Piontkovskaya, Sergey Nikolenko and Evgeny Burnaev},
  year = {2023},
  doi = {10.48550/arxiv.2306.04723},
  eprint = {2306.04723},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2306.04723}
}

References

62 references, 16 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. H. Adams, M. Aminian, E. Farnell, M. Kirby, J. Mirth, R. Neville, C. Peterson, and C. Shonkwiler. A fractal dimension for measures via persistent homology. In Topological Data Analysis: The Abel Symposium 2018, pages 1–31. find
  2. D. I. Adelani, H. Mai, F. Fang, H. H. Nguyen, J. Yamagishi, and I. Echizen. Generating sentiment-preserving fake online reviews using neural language models and their human-and machine-based detection. In Advanced Information Networking and Applications: Proceedings of the 34th International Confere… find
  3. A. Aghajanyan, S. Gupta, and L. Zettlemoyer. Intrinsic dimensionality explains the effectiveness of language model fine-tuning. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volum…
  4. L. Albergante, J. Bac, and A. Zinovyev. Estimating the effective dimension of large biological datasets using fisher separability analysis. pages 1–8, 07 2019. doi: 10.1109/IJCNN.2019.8852450. — [doi:10.1109/ijcnn.2019.8852450](https://doi.org/10.1109/ijcnn.2019.8852450) find
  5. L. Amsaleg, O. Chelly, T. Furon, S. Girard, M. Houle, K.-i. Kawarabayashi, and M. Nett. Extreme-value-theoretic estimation of local intrinsic dimensionality. Data Mining and Knoweledge Discovery, 32(2):1–38, November 2018. doi: 10.1007/s10618-018-0578-6. — [doi:10.1007/s10618-018-0578-6](https://doi.org/10.1007/s10618-018-0578-6) find
  6. L. Amsaleg, O. Chelly, M. Houle, K.-i. Kawarabayashi, M. Radovanovic, and W. Treeratanajaru. Intrinsic dimensionality estimation within tight localities. pages 181–189, 05 2019. ISBN 978-1-61197-567-3. doi: 10.1137/1.9781611975673.21. — [doi:10.1137/1.9781611975673.21](https://doi.org/10.1137/1.9781611975673.21) find
  7. A. Ansuini, A. Laio, J. H. Macke, and D. Zoccolan. Intrinsic dimension of data representations in deep neural networks. Advances in Neural Information Processing Systems, 32, 2019. find
  8. J. Bac, E. M. Mirkes, A. N. Gorban, I. Tyukin, and A. Zinovyev. Scikit-dimension: a python package for intrinsic dimension estimation. Entropy, 23(10):1368, 2021. find
  9. A. Bakhtin, S. Gross, M. Ott, Y. Deng, M. Ranzato, and A. Szlam. Real or fake? learning to discriminate machine from human generated text. arXiv preprint arXiv:1906.03351, 2019. — [arXiv:1906.03351](https://arxiv.org/abs/1906.03351) find
  10. S. Barannikov. The framed Morse complex and its invariants. Advances in Soviet Mathematics, 21:93–115, 1994. find
  11. S. Barannikov. Canonical Forms = Persistence Diagrams. Tutorial. In European Workshop on Computational Geometry (EuroCG 2021), 2021. find
  12. S. Barannikov, I. Trofimov, G. Sotnikov, E. Trimbach, A. Korotin, A. Filippov, and E. Burnaev. Manifold topology divergence: a framework for comparing data manifolds. In Advances in Neural Information Processing Systems, volume 34, pages 7294–7305, 2021. URL https://proceedings.neurips.cc/ paper_fil… ↗
  13. U. Bauer. Ripser: efficient computation of Vietoris-Rips persistence barcodes. J. Appl. Comput. Topol., 5(3): 391–423, 2021. ISSN 2367-1726. doi: 10.1007/s41468-021-00071-5. URL https://doi.org/10.1007/ s41468-021-00071-5. — [doi:10.1007/s41468-021-00071-5](https://doi.org/10.1007/s41468-021-00071-5) find
  14. T. Birdal, A. Lou, L. J. Guibas, and U. Simsekli. Intrinsic dimension, persistent homology and generalization in neural networks. Advances in Neural Information Processing Systems, 34:6776–6789, 2021. find
  15. P. Campadelli, E. Casiraghi, C. Ceruti, and A. Rozza. Intrinsic dimension estimation: Relevant techniques and a benchmark framework. Mathematical Problems in Engineering, 2015:1–21, 2015. find
  16. R. Cangelosi and A. Goriely. Component retention in principal component analysis with application to cdna microarray data. Biology Direct, 2, January 2007. doi: 10.1186/1745-6150-2-2. — [doi:10.1186/1745-6150-2-2](https://doi.org/10.1186/1745-6150-2-2) find
  17. K. Carter, R. Raich, and A. Hero. On local intrinsic dimension estimation and its applications. Signal Processing, IEEE Transactions on, 58:650 – 663, 03 2010. doi: 10.1109/TSP.2009.2031722. — [doi:10.1109/tsp.2009.2031722](https://doi.org/10.1109/tsp.2009.2031722) find
  18. F. Chazal and B. Michel. An introduction to topological data analysis: fundamental and practical aspects for data scientists. arXiv preprint arXiv:1710.04019, 2017. — [arXiv:1710.04019](https://arxiv.org/abs/1710.04019) find
  19. D. Cherniavskii, E. Tulchinskii, V. Mikhailov, I. Proskurina, L. Kushnareva, E. Artemova, S. Barannikov, I. Piontkovskaya, D. Piontkovski, and E. Burnaev. Acceptability judgements via examining the topology of attention maps. In Findings of the Association for Computational Linguistics: EMNLP 2022,… find
  20. J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Sh…
  21. E. Facco, M. d’Errico, A. Rodriguez, and A. Laio. Estimating the intrinsic dimension of datasets by a minimal neighborhood information. Scientific Reports, 7, 09 2017. doi: 10.1038/s41598-017-11873-y. — [doi:10.1038/s41598-017-11873-y](https://doi.org/10.1038/s41598-017-11873-y) find
  22. T. Fagni, F. Falchi, M. Gambini, A. Martella, and M. Tesconi. Tweepfake: About detecting deepfake tweets. Plos one, 16(5):e0251415, 2021. find
  23. A. Fan, M. Lewis, and D. Yann. Hierarchical neural story generation. arXiv preprint arXiv: 1805.04833, 2018.
  24. A.-m. Farahmand, C. Szepesvári, and J.-Y. Audibert. Manifold-adaptive dimension estimation. volume 227, pages 265–272, 06 2007. doi: 10.1145/1273496.1273530. — [doi:10.1145/1273496.1273530](https://doi.org/10.1145/1273496.1273530) find
  25. S. Gehrmann, H. Strobelt, and A. M. Rush. Gltr: Statistical detection and visualization of generated text. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics: System Demonstrations, pages 111–116, 2019.
  26. I. Goodfellow, Y. Bengio, and A. Courville. deeplearningbook.org. Deep Learning. find
  27. MIT Press, 2016. http://www. find
  28. N. Goyal, J. Du, M. Ott, G. Anantharaman, and A. Conneau. Larger-scale transformers for multilingual masked language modeling. In Proceedings of the 6th Workshop on Representation Learning for NLP (RepL4NLP-2021), pages 29–33, 2021.
  29. P. Grassberger and I. Procaccia. Measuring the strangeness of strange attractors. volume 9, pages 189–208, 1983. doi: 10.1109/IJCNN.2019.8852450. — [doi:10.1109/ijcnn.2019.8852450](https://doi.org/10.1109/ijcnn.2019.8852450) find
  30. B. Guo, X. Zhang, Z. Wang, M. Jiang, J. Nie, Y. Ding, J. Yue, and Y. Wu. How close is ChatGPT to human experts? comparison corpus, evaluation, and detection. arXiv preprint arXiv:2301.07597, 2023.
  31. M. Guo, Z. Dai, D. Vrandečić, and R. Al-Rfou. Wiki-40B: Multilingual language model dataset. In Proceedings of the Twelfth Language Resources and Evaluation Conference, pages 2440–2452, Marseille, France, May 2020. European Language Resources Association. ISBN 979-10-95546-34-4. URL https://aclant… find
  32. X. He, X. Shen, Z. Chen, M. Backes, and Y. Zhang. Mgtbench: Benchmarking machine-generated text detection. arXiv preprint arXiv:2303.14822, 2023. — [arXiv:2303.14822](https://arxiv.org/abs/2303.14822) find
  33. M. Hein and J.-Y. Audibert. Intrinsic dimensionality estimation of submanifolds in rd. In Proceedings of the 22nd International Conference on Machine Learning, ICML ’05, page 289–296, New York, NY, USA, 2005. Association for Computing Machinery. ISBN 1595931805. doi: 10.1145/1102351.1102388. URL htt… find
  34. W.-N. Hsu, B. Bolte, Y.-H. Tsai, K. Lakhotia, R. Salakhutdinov, and A. Mohamed. Hubert: Self-supervised speech representation learning by masked prediction of hidden units. IEEE/ACM Transactions on Audio, Speech, and Language Processing, PP:1–1, 10 2021. doi: 10.1109/TASLP.2021.3122291.
  35. J. Jaquette and B. Schweinhart. Fractal dimension estimation with persistent homology: a comparative study. Communications in Nonlinear Science and Numerical Simulation, 84:105163, 2020. find
  36. J. Kirchenbauer, J. Geiping, Y. Wen, J. Katz, I. Miers, and T. Goldstein. A watermark for large language models. arXiv preprint arXiv:2301.10226, 2023.
  37. K. Krishna, Y. Chang, J. Wieting, and M. Iyyer. Rankgen: Improving text generation with large ranking models. arXiv preprint arXiv:2205.09726, 2022. find
  38. K. Krishna, Y. Song, M. Karpinska, J. Wieting, and M. Iyyer. Paraphrasing evades detectors of ai-generated text, but retrieval is an effective defense. arXiv preprint arXiv:2303.13408, 2023.
  39. A. Kuleshov, A. Bernstein, E. Burnaev, and Y. Yanovich. Machine learning in appearance-based robot self-localization. In 2017 16th IEEE International Conference on Machine Learning and Applications (ICMLA), pages 106–112, 2017. doi: 10.1109/ICMLA.2017.0-171. — [doi:10.1109/icmla.2017.0-171](https://doi.org/10.1109/icmla.2017.0-171) find
  40. L. Kushnareva, D. Cherniavskii, V. Mikhailov, E. Artemova, S. Barannikov, A. Bernstein, I. Piontkovskaya, D. Piontkovski, and E. Burnaev. Artificial text detection via examining the topology of attention maps. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing,… find
  41. E. Levina and P. Bickel. Maximum likelihood estimation of intrinsic dimension. volume 17, 01 2004. find
  42. C. Li, H. Farkhoor, R. Liu, and J. Yosinski. Measuring the intrinsic dimension of objective landscapes. In ICLR (Poster), 2018. URL https://openreview.net/forum?id=ryup8-WCW. ↗
  43. W. Liang, M. Yuksekgonul, Y. Mao, E. Wu, and J. Zou. GPT detectors are biased against non-native english writers. In ICLR 2023 Workshop on Trustworthy and Reliable Large-Scale Machine Learning Models, 2023.
  44. Y. Liu, M. Ott, N. Goyal, J. Du, M. Joshi, D. Chen, O. Levy, M. Lewis, L. Zettlemoyer, and V. Stoyanov. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692, 2019.
  45. G. Magai and A. Ayzenberg. Topology and geometry of data manifold in deep learning. arXiv preprint arXiv: 2204.08624, 2022. — [arXiv:2204.08624](https://arxiv.org/abs/2204.08624) find
  46. E. Mitchell, Y. Lee, A. Khazatsky, C. D. Manning, and C. Finn. DetectGPT: Zero-shot machine-generated text detection using probability curvature. arXiv preprint arXiv:2301.11305, 2023.
  47. OpenAI. AI text classifier, 2023. URL https://platform.openai.com/ai-text-classifier. Accessed: 2023-05-16. ↗
  48. P. Pope, C. Zhu, A. Abdelkader, M. Goldblum, and T. Goldstein. The intrinsic dimension of images and its impact on learning. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum?id=XJk19XzGq2J. ↗
  49. A. Radford, J. Wu, R. Child, D. Luan, D. Amodei, and I. Sutskever. Language models are unsupervised multitask learners. 2019. find
  50. V. S. Sadasivan, A. Kumar, S. Balasubramanian, W. Wang, and S. Feizi. Can ai-generated text be reliably detected? arXiv preprint arXiv:2303.11156, 2023.
  51. B. Schweinhart. Persistent homology and the upper box dimension. Discrete & Computational Geometry, 65(2): 331–364, 2021. find
  52. I. Solaiman, M. Brundage, J. Clark, A. Askell, A. Herbert-Voss, J. Wu, A. Radford, G. Krueger, J. W. Kim, S. Kreps, et al. Release strategies and the social impacts of language models. arXiv preprint arXiv:1908.09203, 2019.
  53. J. M. Steele. Growth rates of euclidean minimal spanning trees with power weighted edges. The Annals of Probability, 16(4):1767–1787, 1988. find
  54. C. Stokel-Walker. AI bot ChatGPT writes smart essays-should academics worry? Nature, 2022. find
  55. E. Tian. GPTZero: An AI text detector, 2023. URL https://gptzero.me/. Accessed: 2023-05-16. ↗
  56. E. Tulchinskii, K. Kuznetsov, L. Kushnareva, D. Cherniavskii, S. Barannikov, I. Piontkovskaya, S. Nikolenko, and E. Burnaev. Topological data analysis for speech processing. In Proc. INTERSPEECH 2023, pages 311–315, 2023. doi: 10.21437/Interspeech.2023-1861. URL https://www.isca-speech.org/archive/… — [doi:10.21437/interspeech.2023-1861](https://doi.org/10.21437/interspeech.2023-1861) ↗
  57. L. Valeriani, D. Doimo, F. Cuturello, A. Laio, A. Ansuini, and A. Cazzaniga. The geometry of hidden representations of large transformer models. CoRR, abs/2302.00294, 2023. URL https://doi.org/10. 48550/arXiv.2302.00294. — [arXiv:2302.00294](https://arxiv.org/abs/2302.00294) find
  58. A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, L. Kaiser, and I. Polosukhin. Attention is all you need. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 30. Curra…
  59. F. Xue, B. Yang, Y. Qi, and J. Xin. Searching intrinsic dimensions of vision transformers. arXiv preprint arXiv: 2204.07722, 2022. — [arXiv:2204.07722](https://arxiv.org/abs/2204.07722) find
  60. R. Zellers, A. Holtzman, H. Rashkin, Y. Bisk, A. Farhadi, F. Roesner, and Y. Choi. Defending against neural fake news. Advances in neural information processing systems, 32, 2019.
  61. W. Zhu, Q. Qiu, J. Huang, R. Calderbank, G. Sapiro, and I. Daubechies. Ldmnet: Low dimensional manifold regularized neural networks. In 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2743–2751, 2018. doi: 10.1109/CVPR.2018.00290. — [doi:10.1109/cvpr.2018.00290](https://doi.org/10.1109/cvpr.2018.00290) find
  62. (a) Point cloud concentrated around a straight line; P HD ≈ 1.0 (b) Point cloud concentrated around two curved intertwined lined; P HD ≈ 1.5 *Figure 7: Example of the difference between intrinsic dimensionality (PHD) of point clouds for different geometric shapes. The point cloud concentrated around… find

Updated

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/tulchinskii-2023-intrinsic-dimension-estimation-robust-detection/