I have recently finished reading ‘You Look Like a Thing and I Love You,’ the book that sprang from one of my favourite blogs, AI Weirdness. It’s interesting and funny, and it proves how, to paraphrase author Janelle Shane, we should be wary of artificial intelligence, but not for the reasons you probably think. For instance: no AI is going to spontaneously revolt and kill us all for swearing at Siri. However, AI is very easy to confuse, which can lead a self-driving car to misinterpret road hazards, thereby accidentally killing drivers.
So, I thought, why not outsource this week’s post to an AI? After all, people seemed to like the poems it generated last time.
GPT-2, the neural network at Talk to Transformer, is apparently pretty good as text-generating AIs go. It has been trained with thousands of different pages from the general garbage heap of the internet. It therefore knows some of the kinds of things go together: not just the logical order of sentences, but the kinds of concepts that match, such as summer, winter, and spring. It doesn’t know what these are, or even what English is, but it knows what characters it has seen before, in what orders and proximities to one another, and it tries to imitate these.
It also has a memory. Not much of one, but it can often keep track of writing styles and important concepts in the text you give it. If you start with a list, it will generally go on trying to create a list, remembering its own text as it goes. Last time, I gave it a snippet of a horror story, written in second person, which mention a creepy man-like being on the train. It remembered (among other things) to use present tense, ‘he,’ ‘you,’ ‘train,’ and the general concept of strangeness throughout its story. In ‘You Look Like a Thing,’ Shane uses an example in which GPT-2 generates somewhat coherent Harry Potter fanfiction, and keeps track of the fact that Snape has a snake on his head.
On the other hand, it’s prone to go wandering off on random tangents. What starts as a poem can finish as a list of species. Its ability to make associations can lead it to weird places too. It knows that ‘dog’ appears near words like ‘black,’ ‘ball,’ ‘cute’ and ‘run.’ It may be able to refer to ‘the dog’s tail’ – but it’s just as likely to refer to ‘the dog’s fingers’ or say that the dog drove the car to the bathroom, because it doesn’t know how these things work in real life.
There are a few differences between this post and my last one.
Last time, I embraced GPT-2’s randomness to see what kind of interesting poetry it would spit out, since poetry is often pretty random anyway, in the name of art. This time, I’m doing the opposite: I want to see how long GPT-2 can seem to stay focused on a single story. Each of the stories below is a slightly different genre, as well.
I’m also curating its output a little more this time. I won’t be adding or changing any of its output, but I will be deleting parts to highlight the best things it produces. Some of today’s AI-generated stories were its fifth or sixth try, since the first few didn’t interest me. This is how other writers and artists who use AI do it as well. When AI is used to create art, the intention and creativity is really coming from humans. Humans decide what data goes into training the AI, what kinds of goals to give it, and what results to present.
The final difference between this post and the last is that this time, I’m prompting GPT-2 with its own text to create longer stories. I thought you might like a key, to keep track of which text means what.
- Normal text = commentary
- Italic text = GPT-2’s stories
- Bold italic text = prompt text
- Bold, italic, underlined = prompt from me (will only appear at the start of the story).
So let’s find out what kinds of stories an artificial brain might tell.
How about we start with a fairytale? I gave it the prompt, ‘once upon a time, a poor girl lived’ – it made up the rest.
Once upon a time, a poor girl lived in the heart of the city, under the shadow of the towers, at the foot of the trees.
Amazing first line! I especially like ‘under the shadow of the towers.’
Her name was Zazu.
Her father died when she was young, and she was left to the care of a neighbor, a wise old woman. One day the old woman was out on her own, and when she returned, she found her daughter in a deep sleep.
Okay – it’s forgotten that Zazu is the woman’s neighbour, not her her daughter, but still, not bad.
She took her outside to the edge of a great cliff, where she let her go with the wind and rain, and the tide. Zazu lived for twenty years, and then, in a moment of madness, she plunged from the cliff, and fell into the water. The old woman rescued Zazu, but the next day, when she went to take Zazu back to her old house, Zazu had disappeared. In her old age, the woman began to talk of the time when she took Zazu from the water.
Wow! This story has a beginning, a middle and an end: we’re introduced to Zazu and the old woman, madness happens, Zazu falls in the sea, and the old woman rescues her! Let’s see what happens when I use the last line as a prompt for the next paragraph.