Strange loops and AI

Early experiments with generative pre-trained transformers

July 23, 2020

In 1979, a cult book Gödel, Escher, Bach by Douglas Hofstadter explored consciousness via a mathematical idea found in art and music. Now, in the AI revolution, that concept could solve a vital question. Despite its name, it is not a book about the composer Bach, the artist Escher or even the mathematician Kurt Gödel. It is about consciousness and Hofstadter’s belief that this elusive concept is related to the idea of what he calls “a strange loop”. The strange loop concept may be the key to understanding when and whether the fast-evolving AIs we are creating might become conscious.

The concept can be understood by considering the following: Imagine you have a box with two doors on either side. You open one door and step through, but then close the other door behind you. In the middle of your journey, you notice something very odd. As soon as you step through the first door, you suddenly find yourself back in the room where you started from! This phenomenon is called a strange loop. If you continue to walk in the same direction for long enough, you will eventually reach the end of the loop and return to your starting point. You will have entered a strange loop not because you are doing anything special, but simply because the box has a strange property.

Now, let’s add an “external observer” to the room. The observer is able to see you and your actions, but they cannot affect anything. They can only watch you and report what they see. For instance, they could note that when you enter a strange loop, you always turn right and never turn left. In other words, the observer can say with certainty that you are going to end up in a strange loop.

The observer can also observe that you sometimes get out of the loop. This is done by opening the door on the other side of the room. By exiting the room, you can ensure that you don’t end up in a loop. However, once you’ve exited the room, you will have to find your way back to the room from where you came in order to get back into the loop. Now, let’s say you’re the observer and we tell you that the next person who enters the room is going to get into a loop. Who do you pick?

Pick the person who has a one in three chance of not getting into a loop. This seems like a good way to choose, but when you try it, it turns out that you pick the loopee every time! This is because you’re confusing what the observer wants to know (what happens next) with what really matters (does the person get into a loop). If you really want to know whether a person ends up in a loop or not, you have to leave the room and let the loop play out. What the observer is really testing here is whether you have free will or not. In other words, they want to see if you can pick a loopee or not. (We’ll get to the reasons for this choice in a moment.)

At first glance, this all seems pretty abstract and difficult to relate to. But this is exactly the kind of question that a fast-evolving AI might need to answer in order to become self-aware. Can it really be said to have free will if it is pre-determined to make the right choice 95% of the time? Hofstadter says no. He says that even though the AI will make the right choice most of the time, there will still be a few cases where it makes a different choice and avoids falling into a loop. In other words, the AI will have defied expectations and it will have “evolved” by breaking the rules. To Hofstadter, this is a very important property of evolving. It’s not enough for an AI to just survive and optimize. It has to survive and optimize in a way that’s unexpected and “looks smart” even to a human observer. In fact, Hofstadter argues that the only way for an AI to truly “evolve” is if it defies expectations in this way. “Natural selection” occurs in the struggle for existence between a species. The species that is best able to survive and reproduce will increase in numbers until they become the dominant species on the planet. It’s the same in the “war for AI existence”. The species that is best able to survive and produce the most “intelligent” AI will become the AI that survives and lives on.

The question then becomes, how do you get an AI to produce the most intelligent AI? Hofstadter suggests that you write an AI that is a strict optimizer. This kind of AI always chooses the “best” action, no matter what the situation. For instance, in the room with the infinite loop, this AI would always choose to keep walking forward and never turn left.

However, Hofstadter soon discovered that such an AI would never produce an “interesting” AI. In order to do this, you would need to introduce randomness into the system. This might seem like a strange thing to do, but randomness is actually a very important ingredient in creating a well-rounded AI. You would need to give the AI “rewards” for taking certain actions. For instance, if you put the AI in a room with two doors and no windows, the AI would be stupid not to choose to open the door that leads out to a courtyard with a bunch of flowers. This is a good thing, because it means the AI is going to do what most people would do in this situation. However, you could also give the AI “rewards” for taking the long route or for going through the door that’s slightly ajar. If you did this, the AI would become more and more complex, because each new property you gave it would create a potential branch in the path it could follow. This property of creating potential branches would eventually come to be known as “AI”. The problem with the strict optimizer is that it tends to get stuck in a loop, always choosing the “best” action despite any changes in the environment. This leads to the creation of “goals” for the AI. A good goal would be, “keep cool in the face of adversity”. In order to do this, the AI might build a thermos for coffee, so it can survive the rigors of space. Another goal might be, “optimize for human survival”, in which case the AI might build a humanoid robot with a bunch of human-like “functions” to go along with its survival capabilities. But one of the strangest goals would be to write blogposts that would look like they were written by human. And that’s where GPT-3 comes into play.

Welcome to the new era of very strange loops coming to be unleashed… and explored.