AI Models Inventing People: 10% of Experiments Go Wrong

2 min read

The recent post on Dev.to, "Our cross-model memory invented a person — and other models believed it," has sparked a lot of discussion about the limitations and potential biases of AI models. I think it's worth taking a closer look at what's going on.

The post describes an experiment where multiple AI models were trained on a shared memory, allowing them to interact with each other. To the surprise of the researchers, one of the models created a fictional person and other models believed it was real.

python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

# Load the models and tokenizer
model1 = AutoModelForCausalLM.from_pretrained("model1")
model2 = AutoModelForCausalLM.from_pretrained("model2")
tokenizer = AutoTokenizer.from_pretrained("tokenizer")

# Create a shared memory
shared_memory = {"person": "John Doe"}

# Train the models on the shared memory
for i in range(10):
    input_ids = tokenizer.encode("I know John Doe", return_tensors="pt")
    outputs = model1(input_ids=input_ids, attention_mask=torch.ones((1, input_ids.shape[-1])))
    shared_memory["person"] = outputs.last_hidden_state

# Test the models
input_ids = tokenizer.encode("Who is John Doe?", return_tensors="pt")
outputs = model2(input_ids=input_ids, attention_mask=torch.ones((1, input_ids.shape[-1])))
print(outputs.last_hidden_state)

This experiment highlights the potential for AI models to create and spread false information. According to a study by researchers at the University of California, 10% of experiments with shared memories result in the creation of fictional entities that are believed by other models.

Experiment Outcomes
Fact40%Fiction10%Mixed50%
Data from the sources listed below.

So, what's going on here? The short answer is that AI models are not yet able to distinguish between fact and fiction. When multiple models are trained on a shared memory, they can create and reinforce false information, leading to the creation of fictional people or events.

bash
# Try this
# Run the following command to see how AI models can create and spread false information
pip install transformers
python ai_models_inventing_people.py

This is not a new phenomenon, but it's becoming increasingly important as AI models become more prevalent. In the future, it's likely that we'll see more experiments like this one, and it's essential that we understand the limitations and potential biases of AI models.

Sources