Detecting LLM-Generated Texts with Classical Machine Learning

Detecting LLM-Generated Texts with "Classical" Machine Learning

Detecting LLM-Generated Texts with Classical Machine Learning

Fed up with low-quality AI fanfics on Lofter, I built a detector using scikit-learn and TF-IDF instead of complex LLMs. By training on pre-ChatGPT human texts and diverse AI outputs from Gemini, Qwen, and Deepseek, my simple models achieved 85% accuracy. This proves that traditional machine learning can effectively spot statistical patterns in AI writing without expensive inference.

Old-school ML still slaps—way better than those dumb online tools that just ask an LLM, Hey, is this text AI-generated?
  1. akersten

    Text is simply not information dense enough to be able to decode some arbitrary signal of provenance from it. Sure you might be able to detect today's tells (particular sentence structures preferred by Claude, phrases, etc) to get you some arbitrary chance percentage it was machine generated, but it's a bad fiction to perpetuate that any of this is anything more than tarot card reading.

    Images, absolutely, there are tell-tale artifacts from today's generators that simply aren't emitted by "natural" paths to create them, and you can "detect AI" with high confidence (for now). Words, no, the signal is far too sparse and we are well into undetectable sophistication with today's models, let alone tomorrow's.

  2. docheinestages

    I think figuring out if a text is AI-made is a losing battle. What could work is gauging how much effort went into writing the text, regardless of who the author might be. What's easy today is generating mountains of text that are extremely hard to read. What requires effort is knowing how to engage the reader, how to keep out extraneous information, and how to keep the text as short as possible without losing details. That needs effort, with or without AI.

  3. Krssst

    The classifier does not seem so big, I wonder if something like it for English could be used in a browser extension to run against every single paragraph being displayed ?

    If the internet is going to drown in LLM text it would be nice to have tools to detect that automatically just like we have adblockers today to avoid wasting time on ads.

    (the article was a good read, thanks!)

  4. connorboyle

    > Eventually, I faked my way through the thesis, and life moved on.

    This is a very startling admission! I checked the Chinese (original?) version of the post, and saw the author uses the word "糊弄" (in the place of "faked"); I'm not a native speaker but I think this may come across more as a self-effacing comment on the low quality and/or effort behind their thesis, whereas the English version implies fraud. May be wise to change this!

  5. moxza

    The thing I find most encouraging is that the best AI detector is still humans. Don't write the Turing test off yet.

    From what I understand, your approach is clever, it's like an accent detector. Known models tend toward a specific median approach. Humans have a much richer degree of randomness. Riffing on Anna Karenina... All models are alike in that they present predictable patterns. Humans inevitably write in unique ways.

    I gave a lot of thought to the idea that humans will devolve to the median led by volume of AI interactions, but in the end, I think we're still interacting with each other when not at work/on machines, and the fact that we even have a genetic heritage is always going to differentiate us.

  6. 40four

    I could be wrong, but I just don’t see how trying to “detect” LLM generated texts is ever going to work. The only thing that makes any sense if you truly want to have confidence a human wrote it is some type of “proof of work“ system. I think there’s a lot of interesting ways to approach the proof of work problem with different pros and cons, but that is where our energy should be focused if we seriously want to solve this problem.

  7. aberoham

    I wonder about this technique vs simple SVM classifiers: https://x.com/rosmine/status/2056406399471558872?s=20

  8. woadwarrior01

    Small encoder-only transformers are excellent at classifying LLM-Generated Text. I built an on-device iOS app using a custom small encoder that achieves an AUROC of 99.81 on RAID-bench.

More from this day

2026-07-16