ChatGPT: how to detect text written by artificial intelligence?

ChatGPT how to detect text written by artificial intelligence

The ax has fallen at Sciences Po. Students are strictly prohibited from using AIs such as ChatGPT when carrying out their work. Violating this rule exposes them to “sanctions which can go as far as expulsion from the establishment”, underlines a recent memo from school. A call to order which shows the disarray of schools in the face of the artificial intelligence of OpenAI, the use of which is spreading like wildfire among unscrupulous students. A teacher at the Faculty of Lyon, Stéphane Bonvallet thus discovered during a recent assignment that 50% of the copies of his students had actually been written by ChatGPT.

“It was not about copying and pasting. But the copies were built in exactly the same way, he explains in Progress. We find the same grammatical constructions. The reasoning was conducted in the same order, with the same qualities and the same faults. Finally, they were all illustrated by a personal example, relating to a grandmother or a grandfather…” Cases destined to multiply which all raise the same question: how to differentiate texts written by humans from those written by AI?

The most solid method to date is to act upstream and to ensure that the IA “initials” invisibly all their texts. “We can insert signatures that are undetectable by humans but perfectly recognizable by models trained for this. The idea will be, for example, to insert a certain number of repetitions of letters or sequences of letters in a generated text and to leave a mark. A bit like acrostics in certain poems or textual information encoded in images. Roughly, we can see a form of steganography there”, explains Djamé Seddah, lecturer at Sorbonne University, seconded to the Inria Paris.

AIs “sign” their texts

A team from the University of Maryland published in late January a promising method integration of this type of “watermark” to texts generated by artificial intelligence. To summarize it in broad strokes, the idea is to arbitrarily narrow the perimeter of words in which the AI ​​draws to generate a sentence. Let’s take for example the sequence of terms “I like fruits such as…”. The list of terms from which a ChatGPT will make its next choice will undoubtedly include words such as “apples”, “pears”, “strawberries”, etc. The idea is then to divide this list: on one side, a “green” list of authorized words, on the other, a “black list” of arbitrarily prohibited words. And to force the AI ​​​​to choose its terms in the green lists.

Applying this rule (with some adjustments to protect the consistency of the text), it becomes possible to distinguish human productions from those of AIs: the former contain more terms from blacklists than the latter since the AI ​​is forced to favor greenlists. An effective, reliable method “and which works even on very short texts”, specifies to L’Express Tom Goldstein, associate professor at the University of Maryland, specialist in AI and co-author of the publication.

If the designer of an AI does not integrate detection codes himself, other methods can be employed to unmask the digital intelligences. “Just as everyone has a way of writing, a style, these models also have one, at least for the moment”, underlines Christophe Cerisara, CNRS researcher at the Lorraine Laboratory for Research in Computer Science and its Applications. By analyzing the frequency of use of words, the way in which punctuation is used, the lengths of sentences, it therefore becomes possible to distinguish repeating patterns in the texts of an AI, in the same way that one finds patterns in those of a Rabelais or a Françoise Sagan.

Marie-France Marchandise, the economist invented by ChatGPT

“If we have a sufficient quantity of texts generated by an AI, we can then train a tool to identify what differentiates them from texts written by humans”, confirms Sasha Luccioni, researcher at the company Hugging Face, who has developed a detector of this type specialized on OpenAI productions.

Finally, there are the blunders that the AI ​​responses sometimes contain. ChatGPT may be stunning in many ways, but from time to time it comes up with perfectly absurd answers. To David Cayla, an economist at the University of Angers who asks him to quote French Keynesian economists, ChatGPT thus evokes with comic aplomb the existence of a Marie-France Marchandise.

When the economy pushes him to his limits by asking him for details on this expert with such a tasty aptonym, the AI ​​persists and manufactures from scratch a career for its imaginary economist: “Marie-France Marchandise is a French economist specializing in economics She is known for her work on Keynesian theory and macroeconomics. She is professor emeritus at the University of Paris-Nanterre and has published several books on these subjects, including “Macroeconomics: a Keynesian Approach”. But AIs are not always so obviously wrong. And AI detection techniques aren’t foolproof. OpenAI, which on January 31 launched a detector based on the stylistic approach, in response to growing concerns, points out himself. “In our tests on English texts, our detector correctly identifies texts written by AIs in 26% of cases […] but it produces false positives by wrongly labeling human productions as if they came from AI in 9% of cases”. The stylistic approach also works poorly if the text to be analyzed is short.

“Signature” techniques, on the other hand, can be undermined if the user significantly modifies the writing generated by the AI, for example by paraphrasing it extensively. The use of “automatic translation or the transformation of the text using homographs, letters of an alphabet different from ours which resemble ‘graphically’ our own letters but which from a computer point of view are totally different “Could also damage these signatures, points out Djamé Seddah.

Models similar to ChatGPT could even be built for the sole purpose of transforming the outputs of an AI enough to make them undetectable, with just a few clicks. Society and the economy will therefore have to adapt to this new situation in the medium term. And the educational sphere must now adjust to it, by rethinking homework and assessments, but also the training of students in these tools that will disrupt the way companies work. Stanford University Professor of Economics and Information Technology, Erik Brynjolfsson, interviewed by Bloomberg, sees in ChatGPT “the equivalent of the calculator for writing”. It would be absurd to act as if we were still living in a world of abacus.



lep-general-02