
“It has been two weeks, and the last of my kind has gone.” As opening lines to a story about alien abduction go, it isn’t bad. It is even more impressive when you realise the writer isn’t human, but a newly developed artificial intelligence.
Getting machines to create stories is hard. At a minimum, a good yarn must have a plausible sequence of events that lead you from the beginning to the end. Yetmaintaining coherence over multiple sentences is something that existing text-generation systems struggle with.
“They write in a very simplistic way, deciding word by word what to say next,” says Angela Fan at Facebook AI Research, who helped create the story-writing AI. That means each sentence may not relate to the ones before it.
Advertisement
To get around this issue, the Facebook team broke the story-generation task into two steps. First, the system creates a sketch of the story’s structure. Itthen fleshes out this scaffold with full sentences to produce stories that are 150 words long.
The team trained its neural network, a type of algorithm inspired by the human brain, on 272,600 human-written stories paired with prompts, such as “The Mage, the Warrior, and the Priest” or “Aliens start abducting humans”. These were taken from an online forum for writing prompts, where users inspire each other to write by submitting story premises. See examples below.
Room for improvement
The AI sometimes repeated itself in sentences, such as in one line “She wasn’t sure if she was going to cry or if she just wanted to cry.” Fan wants to improve the system so that it can look back at what it has already written and amend it.
But the team is happy that the software could produce stories in which a character remained sad orthe weather stayed stormy. “Staying on topic is quite difficult for neural network models because they have no explicit memory,” says Fan.
The researchers evaluated their system by asking crowdworkers on Amazon’s Mechanical Turk internet marketplace whether they preferred its stories over those created by a previous text-generation technique. People preferred the new system’s stories around 67 per cent of the time.
“The results are impressive,” says Mark Riedl at the Georgia Institute of Technology. “It is always reasonable to be sceptical of cherry-picked examples, but overall I’m a big fan of this work.”
Riedl and his colleagues have developed their own technique for generating more-consistent stories. Instead of sticking to a prompt, their neural network aims for a particular climax, such as two characters getting married or a villain being punished. It is drip-fed rewards as it generates story events to keep it on track.
Riedl’s team trained its system on a series of events taken from the summaries of movie plots. People on Mechanical Turk again judged the stories generated by this technique to have more-plausible event ordering and more-coherent plots than stories written by a previous approach.
Facebook AI Research’s work onstory generation is part of its efforts to improve text generation in general, says Fan. For example, it could improve the suggestions of what to write next that pop upon your phone when you textsomeone.
Software that can string sentences together with more consistency will also help machine translation. Existing algorithms are good at translating individual sentences but cannot translate entire paragraphs well, says Fan. “Story generation tests our algorithms in these challenging areas.”
A Facebook AI writes…
Prompt: Aliens start abducting humans
It has been two weeks, and the last of my kind has gone. It is only a matter of time until there will be nothing left. I’m not sure what the hell is going on… I can’t think. I can hear a distant scream. I think of a strange, alien sound. I try to speak, but am interrupted by something, something that feels like a drum, I cannot tell. I mean I’m just a little bit older than an average human. But I can, and I can feel the vibrations . I hear the sound of a ship approaching. The ground quakes at the force of the impact, and a loud explosion shatters the silence.
Prompt: Write a letter to your ex
I’m so proud of you! I miss you so much. I just want to hold on. I miss all the times we’ve spent together. And every time we don’t get along anymore, I think about her sometimes and think she’s still there and she’s never really seen me at all. I wish I could tell you more than you would have wanted. I am sorry you didn’t know that but you left a lot of questions in my mind. We both have a good relationship, both of us are in a relationship. I love you. You’ve always been so happy to share. The only thing that I know for sure is that if you were to ask me, I would be the one to tell you.
Reference: arXiv, ,