Even AI can have “hallucinations”: what they are, how to prevent them and why they are a risk

Artificial intelligence, although it can be a useful tool and with enormous potential for the development of our society, is not infallible as it is sometimes passed off by software companies that work in this area: an example are the “hallucinations” of modern generative AI systems, a term used to indicate outputs that are not based on reality or objective truth, which are inconsistent with the input data provided by the user.

Any examples of AI hallucination? The “absurd mouse” that appeared a few months ago in a scientific magazine and, more recently, the extravagant advice from Google (and in this case its new AI Overviews function), such as that of put glue on pizza (instead of mozzarella) e eat rocks. There are various reasons why such hallucinations exist, including the imprecision of the data used for training and the high complexity of the model.

What are artificial intelligence hallucinations and what do they depend on?

The term “hallucination” referring to artificial intelligence could be in some ways anachronistic and paradoxical, this is because hallucinations are typically associated with the human brain and not with that of machines. From a metaphorical point of view, however, the word “hallucination” accurately describes the phenomenon we are talking about. This is because in fact the hallucination of artificial intelligence is a phenomenon in which a large linguistic model – i.e. an LLM (Large Language Model) – has a distorted perception of realityproposing it to the user when it generates meaningless and imprecise output, whether textual (in the case of chatbots, such as ChatGPT and Google Gemini) or visual (in the case of tools text-to-image, like DALL-E or text-to-videolike Sora).

An obvious hallucination in an image generated by artificial intelligence. Credit: Mikko Paananen, CC BY–SA 4.0, via Wikimedia Commons

Such inaccuracies depend on multiple factors. Contrary to what some might think, AI is not perfect. The data with which models are trained can sometimes be incomplete, distorted and not representative of reality. Furthermore, we must consider the fact that the real world is complex, full of details and details that are sometimes difficult to understand. In trying to always provide answers, sometimes artificial intelligence may oversimplify certain concepts or even incorrectly connect them together, producing results that are, in fact, incomprehensible.

Why chatbot hallucinations are a risk

The hallucinations of chatbots and other AI systemsalthough they may sometimes arouse a certain hilarity, I'm a risk. This is because the misleading outputs generated by the models could be taken as true by users, which could lead to several problems.

If, for example, an artificial intelligence model is applied in the healthcare sector, when he has hallucinations, it could return unreliable results, leading doctors to perform unnecessary surgical interventions or, vice versa, not to diagnose diseases for which treatment is necessary. Also from the point of view of disinformation AI hallucinations could do quite a bit of damage, rapidly spreading false news and information, potentially leading large numbers of people to believe distorted facts.

How to defend yourself and prevent generative AI hallucinations

Companies that develop artificial intelligence models are aware of the phenomenon and, clearly, it is in their interest to try to solve it or, at least, contain it as much as possible by reducing the chances of encountering hallucinations of generative AI. To achieve this they are adopting various techniques, such asadversarial training. What is it about? A model is trained on a mix of examples, some normal and some contradictory, so as to enable it to discern what is real from what is not.

It must be said, however, that the best way to defend ourselves from the hallucinations of generative AI (at least on the part of us users) is to use this technology adopting a critical and aware approachwhich means not taking the outputs of the artificial intelligence at “at face value”, always carrying out a manual verification of the latter by consulting reliable sources to verify the accuracy of the information.