April 25, 2025
Trending News

What are AI model hallucinations?

  • April 15, 2023
  • 0

A few days ago, when I was browsing the news of GPT-4, I mentioned hallucinations as one of the main problems with AI models. Although the chosen term

What are AI model hallucinations?

A few days ago, when I was browsing the news of GPT-4, I mentioned hallucinations as one of the main problems with AI models. Although the chosen term is quite self-explanatory, I still think it is interesting to delve into it a little to understand what it consists of, why it means that we should never take the output of artificial intelligence as something 100% reliable. and finally the reasons why they occur and what measures are taken to mitigate them. So let’s start from the beginning.

What are hallucinations?

In the context of artificial intelligence, hallucinations refer to abnormal behavior in which the model generates false information or perceptions, without there being an external source of stimulus to justify its existence. We’ve talked more than once about the tendency of some generative tools (not just text, but image and many other areas) to provide contrived/inconsistent information. From the horror faces of DALL-E 2 to the fictional poems of Miguel Hernández, but also the misinterpretation of the data received by the sensors can be considered hallucinations.

Hallucinations are a problem in any AI-based system that must derive an answer, of any type, from an interpretation of its input data based on a learning process. However, their meaning varies considerably depending on the context. Because, of course, it’s not the same for a text-generating artificial intelligence to invent a poem and attribute it to a real author, or to give the wrong definition of a word to an expert system responsible for driving an autonomous vehicle. misinterpret the information from your sensors and cause an accident.

The advent of AI in critical applications has therefore focused on a problem that was previously identified, but that has become more important than everbecause fields like security, medicine, and the like cannot risk trusting AI if there is a risk that hallucinations will cause incorrect answers without being at least in principle inferred from the data with which the model has been fed.

What are AI model hallucinations?

Why are they made?

There are several reasons why an AI model can hallucinate, which usually differ depending on whether we are talking about supervised learning models and unsupervised learning models. We have already explained it in article on the basics of artificial intelligencebut let’s recall it briefly.

  • supervised learning: the model is trained on the labeled data along with the expected output. The goal of the model is to learn to map input data to their corresponding expected outputs in order to predict the output for new input data. For a simple example, we feed the model a dataset of photos of cats and dogs, labeling each with the type of pet depicted in it. The goal is for the model to learn to distinguish between cats and dogs and identify them in the images we provide when they are ready for action.
  • Unsupervised learning: in this case, as you probably already imagined, the model is trained with unlabeled data. This type of training is used when we want the model to be able to find hidden patterns and structures in the data by itself. For example, if you’re analyzing social media data to identify groups of users with similar interests using unsupervised learning, the model will look for hidden patterns in the data that indicate some users have similar interests without assigning them any specific labels.

Hallucinations in supervised learning models

The main cause of hallucinations in the supervised learning model is overgrazing (overfitting), which occurs when a model overfits the training data and loses the ability to generalize to new data. Returning to the example of the cat and dog photos, if the model matches the training images too well, it can memorize them instead of learning useful patterns that it can apply to new images. As a result, the model can correctly classify the training images, but fails on new images that it has not seen before.

Hallucinations in unsupervised learning models

In this case, the most cited cause of model “hallucinations” is a lack of sufficient information in the learning input. If the model does not have enough information to fully understand the patterns in the data, it may generate incorrect information.

The presence of noise is also particularly important in unsupervised learning models, that is, information that is not useful but can lead the model to discover false patterns that it will later use when processing the input data.

Other common causes in both types of learning

In both cases, there may be some problems (although some of them may be more common with one type of learning than the other). These are the most common:

  • insufficient training: based on its function and its complexity, the model may need a huge data set to train it sufficiently. Otherwise, you may not be able to get all the information you need to correctly identify the patterns.
  • Distorted datasets: Data sets used in training should be as diverse as possible. For example, imagine a model who has to analyze photos using face recognition. If the artificial intelligence responsible for this feature was trained using only photos of people of one race-ethnicity, it is very likely that it will make mistakes when processing images with people of other races.
  • Model complexity: If the model is too complex, it can learn to recognize patterns that are not important or do not directly correspond to reality, which can lead to the generation of false information.
  • Errors in algorithm design: If there are errors in the model code, it can also cause hallucinations. These errors can be caused by typos, logical errors, or problems with the way data is processed.

What are AI model hallucinations?

How can they be avoided?

At this point, you are already fully aware that we are talking about a very complex problem and that it therefore has no simple solution. However, yes, there are best practices and techniques that can substantially reduce the risk a model who is hallucinating.

The first thing, of course, is to start with a large and well-edited dataset. For this, we must take into account that they must be as representative and diverse as possible, minimize the volume of noise as much as possible, and of course not use the same data for the training and validation processes. The latter is what is known as naive cross-validationand the result of this is that we get results that can be much better than what we would get using another data set. Result? We will think the model works better than it actually does.

Another good practice is regulation, which imposes constraints on model complexity with which we can avoid problems such as overfitting. There are several regularization techniques such as LASSO (Least Absolute Shrinkage and Selection Operator), Rigde (also known as contracted regression), and outlier regularization, among others. In all cases, the goal is to reduce complexity and prevent the model from having to memorize the training data, rather than being able to generalize from said process.

A very interesting approach is to use generative adversarial models (GAN and probably familiar from NVIDIA’s GauGAN2) to generate dummy data that can be used to train a neural network to be more resistant to hallucinations. During training, the generator network and the discriminator network are trained against each other. The source network tries to create data that fools the discriminator network, while the discriminator network tries to distinguish between the data generated by the source network and the real data. Over time, the generator network learns to generate more realistic data, and the discriminator network becomes more efficient at detecting the generated data.

What are AI model hallucinations?

Another approach to reducing hallucinations in artificial intelligence is to use explainability techniques. These techniques allow us to understand how a neural network makes decisions and which features of the input data are most important to its learning process. By better understanding how the model works, it is possible to identify the causes of hallucinations and take steps to correct them.

Moreover, they are developing specific techniques to reduce hallucinations in critical applications for safety such as autonomous driving. In this context, it is necessary for the neural network to be able to accurately detect objects and situations in the environment in order to make safe decisions. To achieve this, reinforcement learning techniques are used, which allow the neural network to learn iteratively from the feedback it receives from its surroundings.

These are just some of the methods and best practices for avoiding or at least mitigating hallucinations from AI models. However, and although there are regular advances in this regard, and there are also generative AIs like the new Bing that always document their answers with resources, an excellent measure to mitigate hallucinations, We must realize that these can occur at any time. and consequently we must always act with certain reservations before the departure of the same.

Of course, this does not mean that we should rule out the use of artificial intelligence, far from it. Modelers prefer to find a solution to this problem, and the result is reliable in many cases. The important thing is, yes, not to trust us.

Source: Muy Computer

Leave a Reply

Your email address will not be published. Required fields are marked *