- 37. See also Mitchell, K. J. (2018). Innate: How the Wiring of Our Brains Shapes Who We Are. Princeton University Press and Winkelhorst, R. (2018). Robot-is-me?: De robotisering van de samenleving in praktisch, juridisch en maatschappelijk perspectief [Robot-is-me?: The robotisation of society in practical, legal, and social perspective]. Uitgeverij Paris.↩
- 38. Tests were conducted using the slightly less advanced (117M and 345M trained parameter) versions made available by OpenAI in 2019.↩
- 39. Zellers, R., Holtzman, A., Rashkin, H. et al. (2019). Defending against Neural Fake News. Curran Associates Inc., Red Hook, NY, USA.↩
- 40. Demo via the Allen Institute for AI (link).↩
- 41. In Japanese, kanji is used for writing nouns, adjectives, adverbs, and verbs. Hiragana is used for inflections following the verb and for conjunctions. For loanwords from Western languages, katakana script is employed.↩
- 42. Nikkei Hoshi Shinichi Literary Award. https://hoshiaward.nikkei.co.jp↩
"01000101 01100101 01101110 00100000 00101101 00100000 01110010 01101111 01100010 01101111 01110100 00100000 One robot knows zero. 01110111 01100101 01100101 01110100 01101110 01110101 01101100"
IN THE BIN[AI]RY WORLD
The robot writer: no longer a utopia?
Category: Writing
| Tuesday, 7 January 2020Robots are surfacing everywhere these days, including the world of writers. Fortunately — despite occasional bouts of severe retrospective jealousy — we have yet to see any killer robots. No, for this industry, it is specifically the artificial intelligence (AI) of the robot that proves interesting. For just imagine: a robot that takes a large portion of the writing off your hands, handles the editing, and translates the manuscript into eight languages. Useful, is it not?
And even more importantly... never again that troublesome writer's block.
The idea itself is not so far-fetched. In the worlds of music and art, the application of AI has already yielded successes. Artists like Mario Klingemann and Sougwen Chung use it as a unique selling point. No longer is it paramount what the artist does with their 'brush', but rather which algorithm is devised for the purpose.
Let us therefore examine what artificial intelligence actually is, and whether robots can use it to write stories.
Artificial intelligence
Intelligence is a difficult concept to define. What is certain is that it relates to the capacity for thought. In the human brain, nerve cells (neurons) are responsible for receiving, processing, and transmitting information stimuli. It is not the quantity of neurons, but the number of connections between these cells that determines the degree of intelligence.
Artificial intelligence, or AI, is a technology that, as it were, mimics the functioning of neurons in the human brain. This process takes place within a so-called artificial neural network (ANN) comprised of multiple layers, as shown in Figure 1.
To enable the interconnected neurons (nodes) in this network to function, smart algorithms are employed that allow the artificial brain to execute tasks. In this process, the AI brain receives, for example, a specific instruction or question [input A] which must lead to a result [output X]. All the layered nodes in the network possess a certain weight that influences the final outcome. Between the input and output layers lie so-called hidden layers that are invisible to us. Each hidden layer plays with the weighted information it receives from a underlying layer, which ultimately results in output [X] or [Y].
From successful results [X], the system learns how it arrived there. In the case of incorrect outcomes [Y], the process must be repeated until the neural network has assigned the correct weights and connections to the (intermediate) nodes. This is also referred to as self-learning capacity.37
By training such a neural network extensively with Big Data, the outcomes become increasingly accurate. The result, for instance, enables a robotic car to navigate traffic independently. The AI can then consistently apply what it has learned to various traffic situations—such as recognising a stop sign and subsequently yielding to traffic coming from the right.
Compared to this, learning to write should not be so difficult for the robotic brain, should it?
The writing robot
The idea of having robots write books is not new. In Orwell’s Nineteen Eighty-Four, the Ministry of Truth already made use of so-called ‘novel-writing machines’. Thus, the fictional ministry was far ahead of its time. It was not until 1956 — seven years after the publication of Orwell's book — that the term artificial intelligence was first coined in the scientific world. It led to an enormous hype, which soon proved unable to live up to its towering expectations.
In recent years, however, artificial intelligence has once again returned to the spotlight. This is thanks to the business world, which has found a multi-billion dollar market in its concrete application—for instance, in the field of language and text recognition. One might think here of Natural Language Processing (NLP), a technology used to help computers understand human natural language. This technology is seen, for example, in the familiar personal assistants SIRI and Alexa, humanoid femdroids, and chatbots in call centres.
For machines, it is no simple task to learn to understand how we communicate; yet it is precisely that knowledge that a robot requires to write a readable book. A research lab helping the robotic brain in this regard is the San Francisco-based OpenAI.
Under the name GPT-2, OpenAI developed a revolutionary language model (also known as a Large Language Model (LLM)) that enables robots to generate natural texts. The neural network used for this purpose can not only create words but also construct sentences and paragraphs that are indistinguishable from human-written content.
What makes GPT-2 remarkable is that the model is trained to consistently predict the next word in a text. The fact that it also taught itself skills in question-answering and translation was a welcome surprise for its designers. The robotic brain can thus navigate text domains for which it was not specifically trained. This is also referred to as zero-shot.
OpenAI was not initially as open as its name suggests. According to Sam Altman, CEO of OpenAI, this was due to the potential danger the technology entails—for instance, the possibility of generating fake news or dangerous ideologies. Out of fear of this, OpenAI first created an AI application capable of detecting robot-written texts. Only then did it make the full code available to scientists. A course of action that would, of course, have been unthinkable at Orwell's Ministry of Truth in Nineteen Eighty-Four.
The robotic brain at work
For research purposes, it is possible to experiment with OpenAI's trained robotic brain. To set this robot to writing, at least an opening sentence must be provided. The more information supplied to the robot, the more specific the story becomes. Fortunately, the brain is capable of handling both fiction and non-fiction. Nor is it averse to devising (edible) recipes. It should be noted, however, that if the output is not restricted, a voluminous tome may well emerge.38
The text passage below is a length-restricted example of what the robot devised after I entered the following opening sentence: "I did not know what to think, could robots really write?" The robotic brain analysed the input and wrote:
For a second test, I changed the input to: "What mystery is hidden here?" Linda asked. My hope that the robot would opt for a dialogue in the fiction genre was fulfilled.
"That means you're an adventurer," Linda said.
"Yes," Shane said, his expression bleak. "But I prefer not to use the word, as it conveys a negative image. The word adventurer also implies some romance, adventure and success, which isn't my impression of what I do."
"The point is," Linda said, "you've been setting yourself up for failure and misery."
"You're doing it to yourself," Shane answered.
Truth be told, at first glance, one would not say that a robot wrote this off the cuff. Let alone a robot that constructs sentences word by word itself and thus does not copy existing lines. Nor did it do so when the same input was entered ten times in succession.
Although the above may not pass for scientific research, it is substantively noteworthy that the robot made good use of the provided opening sentence (input). This was despite the fact that it was very short. After I entered longer texts, beyond these examples, the result responded even better to the specificities of the provided text. Naturally, there are caveats to be made regarding some word choices, but the core issue is that the text comes across as natural.
Problems are to be expected in the consistent use of the names and character traits of the personae in a story. This is evident in the first text, for instance, where Marge is both a cartoon character and a human being of flesh and blood. Is this a perceptual error on the part of the robot or an unfortunate choice of name?
There is much more to be said about the robot, for example, regarding its excellent analytical skills, but this lies beyond the scope of this article.
Grover
To enable even more purposeful writing, alternative versions of GPT-2 are also being developed, such as Grover from the Seattle-based Allen Institute for AI. With Grover, the user has more control over the final result. Unlike GPT-2, Grover was specifically trained to write credible neural fake news.39 That credibility is enhanced, for example, by checking whether the generated text aligns sufficiently with the title. Grover has analysed so many newspaper articles by now that it is capable of writing its own news articles and reviews that are indistinguishable from the real thing.40
As a test, I provided the following headline: 'Why Donald Trump won't settle for less.' The robotic editorial team devised the following 'news':
Why Donald Trump won't settle for less
January 7, 2020 - Paul Krugman
Signs all over the country suggest that Americans, believing that China was taking advantage of the United States, have run out of patience with the Trump administration’s trade war. President Trump’s trade policy, during which Washington has imposed unilateral tariffs and threatened to do so again, has played out over the past 18 months as a classic episode of the principal advantage Trump has over his predecessors: the capability to make his opponents feel as if they have achieved nothing.
Trump has taunted President Obama’s amiability with China. He has mocked Bill Clinton’s attempts to further relations with Beijing. Barack Obama, for his part, has responded, by accusing Trump of engaging in deception and one-upmanship.
And his threats have sent the fear factor throughout the world. Instead of the usual reciprocity and patience, global markets have been reacting to every trading shock, with anxiety about future trade disputes often leading investors to dump riskier assets. Trump’s single-minded willingness to use the rules against a prior opponent has plunged the United States into a standoff with China that is having an effect on the global economy. ...
The solution, like many others, would be to settle for less. Trump’s own economic advisors and allies in Congress and the media have called for him to lower his tariffs in return for greater Chinese cooperation on trade. Let China lower its tariffs on U.S. automobiles or U.S. corporate exports and Trump could lower or completely eliminate his tariffs. On the other hand, China could accept Washington’s calls for bilateral talks rather than impose retaliation, agreeing to continue removing restrictions on foreign capital into China and opening its markets in other sectors. There are plenty of other ways for Beijing to make concessions that are in America’s interest.
But Trump will not settle for less. Even after the allies convinced him to drop his tariffs on steel and aluminum (since the Chinese are major purchasers of those commodities, he likely felt they had to take some of the blame), Trump was too enraged by the deal to recognize it. If anything, he is even more eager to find another line of attack. And his allies don’t seem to realize that. They were no better at identifying the problem and resolving it than Trump was.
The result, obviously, is increased fear about the prospect of worsening trade conflict. The prospect of even more unrestrained U.S. behavior — not to mention the prospect of losing leverage to use as leverage — makes life even more miserable for China and other important Chinese trading partners. But Trump isn’t having it.
As Tom Milnam suggests in The Washington Post, the worst outcome is a scorched-earth policy in which no resolution is reached and all sides end up even more mistrustful of one another than they were. But even a compromise would only buy some time.
So far, Trump has shown that his advisors and allies haven’t a clue how to deal with him. But they should try, because he’s clearly getting worse at strategic thinking and negotiating. If Washington can’t stick to a basic rule of international trade negotiations — no one wins if everyone loses — then nothing can stop Trump from taking advantage of a situation where he has nothing else to lose.
Those who read scan-wise will simply not notice that they are reading fake news. The topicality of the report is truly spot on; even the input is specifically addressed. The fact that the fictional Tom Milnam of the Washington Post is casually cited as a 'consulted' source makes it eerily authentic.
All well and good, you might think, but surely a professional jury wouldn't fall for that?
The Professional Jury
A group of scientists from the Future University Hakodate in Japan put this to the test. Led by Hitoshi Matsubara, they designed a writing robot to compete for the third Nikkei Hoshi Shinichi Literary Award.41 A Japanese literary prize named after the fiction writer Shinichi Hoshi, which also allows robots to participate. The jury is not informed in advance whether artificial intelligence has been used.
Matsubara's team aimed high, submitting no fewer than two robotic novellas. To the surprise of many, one of these passed the first preliminary round. The title of the submission was quite fittingly Konpyuta ga shosetsu wo kaku hi, or ‘The Day a Computer Writes a Novel’. A story about a robot that decides to no longer be subservient to man and to focus entirely on writing.
The writing — the early beginnings of which you have read above — was preceded by several years of preparation. In the project named 'The whimsical AI project: I am a writer', the robotic brain was first introduced to some thousand short stories by Shinichi Hoshi. This was done with the objective of teaching the robot the writing style of Hoshi, who passed away in 1997, including the correct balance between the use of kanji and hiragana.42 As a reference for the robot, the designers then wrote a sample story. The text was subsequently divided into three basic components consisting of words, sentences, and sentence structure. Based on these parameters, the robot used an algorithm to arrive at a new novella — as a variation on the sample story. For those fond of figures: the number of possible narrative variations amounted to one million.
No changes were made by the team to the final result. Had the story been longer — and contained many dialogues — guidance would have been required regarding the plot and the characterisation of the personae. Developing this fully autonomously and automatically was not applied to either of the two submissions.
For the future, Matsubara does foresee more possibilities for making these AI choices resemble human creativity. Passing the first of the four rounds, for now, means no more than that the story appeared natural to the jury.
Writing with Common Sense
It would be interesting to see how far a book written with the aid of GPT-2 could get in the 8th book competition this year. Since Matsubara, no one has managed to equal that result. GPT-2's brain is more versatile, autonomous, and advanced than the model from Future University Hakodate. Greater dynamism in the story may therefore be expected, but whether the third or fourth round of the competition is achievable... I think not. Each subsequent round places higher demands on the narrative arc and, above all, creativity—a quality that is harder to capture in language models.
We — as humans — can see and process things we have never observed before. An AI must first be trained with data for that purpose. It can, provided sufficient data is available, adopt the writing characteristics of other authors and produce a similar book (a similar trajectory will undoubtedly be pursued with artworks as well). Such a result reminds me of the plateau-trivialisation I wrote about last year. In itself, that is quite impressive, but these AI forms still belong to the predominantly weak AIs. Thinking beyond the defined task is difficult for such a robotic brain. Just look at SIRI, who does not (correctly) answer questions outside the use of the telephone.
Because the results of GPT-2 appear so well thought out, it is difficult to imagine that this is not so much a matter of 'real' intelligence, but rather of feigning it. That is because the system possesses no true cognition—that is, the capacity for thought like the human brain. For that, the AI also requires (self-)consciousness and, with it, conative functions such as willing, striving, and acting, as well as the accompanying affective function consisting of emotions. The full spectrum of cognitive, conative, and affective functions is more comprehensive than a neural network as such. Insofar as a robot can distinguish emotions, for the AI this is externally merely a chunk of data, and it also lacks the chemical or hormonal component that influences every human brain in the perception and experience of events. And with that, we touch upon the heart of a book, for is emotion not heavily dependent on context?
In Context
As we have seen previously, a robotic brain is adept at establishing connections between data (words), but such a robot lacks an understanding of context. Fortunately, contextual thinking is currently receiving particular attention in the development of AI. The robotic brain is learning to combine (object) data with memories and to place these within the correct perspective, thereby creating meaning. This will assist the robot in the near future to communicate more naturally with humans. However, the robot still has a long way to go to properly understand the subtleties inherent in human communication and the associated intentions; let alone to translate these into meaningful text.
Current AI thus still falls short in the areas of: abstract thinking, the application of common sense, and the transfer of knowledge between different domains. This does not alter the fact that AI can fulfil a useful, supporting role in writing short stories or articles. There are already news feeds on the internet that automatically compile reports using AI. For fiction authors as well, AI can serve as a kind of muse. With the right algorithm, one can actually come a long way. For the writing of complete volumes, on the other hand, the robotic brain appears far from suitable.
Conversely, language is not a hard science, and it likewise lacks hard criteria. How is a robot ever to determine what makes a story a story — or which of the 30,000 devised variations is the best — if even a human cannot objectify this? That fact renders the generation of stories an exceptionally complex science. And perhaps an unrewarding one as well, for however well the artificial brain develops, the fact remains that readers prefer to read books written by real people.
Addendum (2022)
The research for this article was conducted in the autumn of 2019. At that time, OpenAI was an 'open', non-commercial research institution and ChatGPT(-2) was open-source. The organisation saw it as its mission to ensure that artificial intelligence would benefit all of humanity. Behind the scenes, however, something else was occurring. On a vast scale, copyrighted works were copied (from the internet) to 'train' a (closed) AI for commercial data services. Supported by Microsoft, OpenAI now parasitises original data from creators who receive no compensation for it. This concerns a service that consists of reusing and (re)generating (not creating) images and text via a user-entered text prompt (instruction).