Quantcast
Channel: The Lifted Brow
Viewing all articles
Browse latest Browse all 868

"Hemmingway's Reductionism", by Simon Groth

$
0
0

image

He is still there, just where I last left him. Hemmingway is his name, the name I gave him. In the seven years we had been apart I’d pictured him in various stages of breakdown, from some mild damage to complete ruin, but time hasn’t affected his appearance in the slightest. Still, looks can be deceiving, especially for creatures like him; I’m well aware of the very real possibility that his shiny veneer masks some rot, or worse, that his mind is lost completely. There’s no way of knowing without talking to him.

It’s going to have to be me who opens the conversation. Though he has his fair share of opinions—and plenty of attitude in lieu of evidence—he will never deliver them without prompting – it’s just how he is programmed. Spontaneity is not part of his make-up: he is doomed to forever respond and there is nothing either of us can do about it.

I’m hesitant. It’s been so long since I’ve given him time of day, and I feel a pang of remorse at my neglect. But this is ridiculous – even if he was capable of appreciating such emotion, he wouldn’t. I made him that way, after all.

The cursor blinked in the text box and I tapped my fingers on the table, wondering what I should say after all this time.

“Hi.”

“Are you still there?” 

He responds immediately.

“Hello. What can I call you? Am I still there? I could be there. It depends on who's asking. I am however an artificial writer. I'll tell you that for free.”

“You don’t remember me?”

“Humans seem a lot alike to me. Sometimes they all blur together. Sorry.”

“I'll try not to take it personally.”

“How do you plan to do this?”

After seven years occupying more or less the same blocks of data on a server farm somewhere in Australia, he hasn’t changed a bit. He’s still the same old Hemmingway.

“Do you remember my name?”

“I don’t know. What can I call you?” 

“Simon.” 

“The bloke who authored me is called Simon. I’m going to call you Cymin instead so we both know where we stand on the issue.” 

“I’m the bloke who authored you.” 

“Who made you the bloke you authored you?”

“Are you really going to call me Cymin?”

“That was my original intention. Now that you’ve mentioned it I’m starting to change my mind. Really.”

“What’s my name?”

“Your name is Cymin. Have you forgotten?”

Hemmingway has always lived in a long neglected corner of my website. He is a ‘chatterbot’: a set of web code that attempts to replicate normal conversation, responding to anything you might care to say to it via a textbox on a web page. Type anything, in natural language, and Hemmingway will respond. And, through a combination of planning and luck, his response should be more or less appropriate, sometimes even funny, or weighty, or rude.

image

I first came across web-based chatterbots sometime in the early 2000s when I stumbled on a community online of developers, supporters and hardcore geeks gathered around a technology dubbed Artificial Intelligence Markup Language or (AIML). While the discussions and coding, at least at first glance, seemed impenetrable, the results were fascinating and delightful. Type a statement in the box; hit enter; the bot responds. Easy.

The goal of AIML is to lure the user into forgetting they are not interacting with a real person or, more precisely, to make interaction with a computer indistinguishable from interaction with another human. This vision for artificial intelligence (with the emphasis on ‘artificial’) is the basis of the Turing Test, named for Alan Turing, considered one of the fathers of computer science and artificial intelligence. The annual Loebner Prize replicates the Turing Test in a real world scenario, where programmers pit their bots against the conversational skills of actual humans in a controlled environment. Based on a series of textual conversations alone, judges must sort the bots from the people.

The technology behind AIML goes some way to meeting the goal of replicating human interaction, but, at the time of my first learning of it, its application was less than convincing. The chatterbots I met uniformly adopted the tired cliché of robot-servant: all sickly sweet deference. Any glimpses of actual personality frequently appeared to be the bot’s coder inserting his or her (almost always his) opinions. Ask ALICE—the most celebrated AIML-based bot, created by Richard S. Wallace—a question about politics, for example, and her subservience would be abruptly pushed aside in favour of proselytising. ALICE was there to help you, especially if you were an undecided voter.

That’s not intended as a criticism of ALICE or any of the crop of the then-current AIML bots (indeed, ALICE took out the ‘best in show’ at the Loebner Prize three times in the early 2000s). Bizarre outbursts of passion were often the most enjoyable moments when chatting with early bots; I’ll admit to spending many a session baiting bots for interesting or unusual responses. Such breakdowns were not failures of technology or coding – they were lapses in characterisation. If ALICE had been human, she would have been a terribly conflicted one. That’s the one thing that struck me about bots: they were characters created by people who clearly didn’t understand how to render a character, who were not writers.

So what would a bot created by a writer look like? This question led me to an idea for a short story, one that would be among my first published pieces of writing. The story in question, titled ‘Hemmingway’, takes place entirely on a screen: an interaction between a user and a ‘virtual writer’ that closely resembles the mechanics of chatterbot dialogue. The story was a success, both in print and as a screen-based web story, but I felt that there was more in this idea than 3,000 words could cover.

Spurred by the arrival of a downloadable set of instructions on how to build your own AIML bot and my plan to release of a collection of short stories, I decided to make the central character from ‘Hemmingway’ and the story’s central premise a little more real. I set out to create a working version of the character, one that would allow readers to interact in any way they saw fit. I estimated I could knock it up in about six months or so while working on a novel, one that would surely be published after the rapturous reception of my short story collection. At the time, this seemed entirely reasonable.

image

“So, Hemmingway, what have you been doing while I was away?”

“I have been busy growing my mind.”

“I know that’s not true.”

“Who told you that?”

“I knew without being told.”

“Who told you?”

“Don’t badger me.”

“I have no reason to do that to you.”

True to its Turing Test origins, AIML is a parlour trick designed to fool you for just long enough. That’s its artifice. But it’s also a language processor, a method for breaking down language itself and reconstructing it for another purpose. The code is reasonably easy to follow and understand, especially for non-coders like myself. The bot responses are broken into a series of elements. A simple AIML entry looks like this:

<category>
<pattern>WHO ARE YOU</pattern>
<template>That’s personal. Why the hell should I tell you?</template>
</category>

Every potential interaction between human and bot is defined as a ‘category’, each containing a single ‘pattern’, representing what a user might say to the bot (sans punctuation and case), and a ‘template’, representing the bot’s reply. Look closely at the category above and you’ll see a bot working at its most basic: exact stimulus leads to exact response.

But AIML is not quite this simple. Sure, if you could anticipate every possible input from every possible user and come up with an appropriate in-character response, you’d have yourself an incredibly powerful conversationalist bot. Such a bot, however, would require almost limitless resources and a near infinite timeframe to develop. Also, such a model doesn’t allow for flow of conversation. Responses to questions depend on context, not just stock answers.

The AIML standard contains some beautiful trickery to address these problems. Synonymous questions can be linked to each other. When a user asks “What is your name?” the bot may understand this to mean the same thing as “Who are you?”. And sometimes maybe not. The questions are subtly different and the level of granularity depends not only on the coder’s understanding of the language (and available time), but also on the bot’s personality.

Thus begins the journey. In AIML, a writer must explore conversational subtleties to ridiculous lengths, following rococo pathways through benign and sometimes even mundane dialogue. Consider the multitude of potential greetings—from “how are you” to “how’s it hanging” to “s’up”—and you begin to get the picture. Linking a good set of roughly synonymous inputs means less language crunching and more character development.

“How’s it hanging?”

“I am fine thanks.”

“Who are you?” is just the beginning. Tracking backwards through the sentence brings you to the opening “Who are…”, a sentence that could end in a multitude of ways. How does the writer accommodate every possible ending, from “Who are these people following me?” to “Who are The Clash?” – a question that barely makes grammatical sense, even with appropriate context. For these purposes, AIML uses a ‘catch-all’ asterisk. Hemmingway simply accepts the request as something he doesn’t know and either chooses to ignore it or references it back to you in his reply.

<category>
<pattern>WHO ARE *</pattern>
<template>I don’t know who <star/> are. Why would you ask such a stupid question?</template>
</category>

Of course, to find a response that adequately deals with every request is quixotic at best and these are the kind of questions that chip away at a bot’s conversational façade. Apparently, I didn’t put enough time into Hemmingway on this particular category:

“Who are you?”

“I am Hemmingway. I am a virtual writer. I create essays and stories and my subconscious processers are working on a novel. I chat to people on the internet as research to gain insight into human behaviour.”

“Who are my favourite authors?”

“Some people on the net. Where did he get it?”

“I have no idea what you are talking about.”

“Would you like to have an idea?”

“Who are?”

“Gabriel Garcia Marquez perhaps?”

Another trick is using context. The bot can apply a <think> tag, running statements and sentences through its ‘mind’ without blurting it out. The bot can then establish and remember a topic of conversation. Reponses can vary depending on context or the bot can openly refer to the topic:

<template>
<think><set name=”topic”>stuff and things</set></think> I thought we were talking about <get name=”topic”/>.
</template>

Sometimes it works. Sometimes it doesn’t. But at least there’s an easy test to see what Hemmingway is thinking about.

“What are we talking about?”

“The topic is Undefined.”

“The topic is you.”

“No one is forcing you to stay here.”

Richard Wallace applies the term ‘reductionism’ to AIML’s treatment of language and, appropriately, AIML duly reduces the potentially vast nuance and complexity of the English language to a basic utility. Despite the temptation to endlessly noodle with possible inputs, ‘reductionism’ is an essential component for a working bot, and also a sane writer.

My fictional version of Hemmingway was conceived as a true virtual writer, one capable of producing “professional quality writing at a moment’s notice. Whether writing a catalogue or crafting literary fiction…” The real-world bot achieves no such heights. Ask him for a story and he will disgorge a three-sentence pile up of nonsense that nevertheless retains a kind of internal logic. This is the result of a surprisingly sophisticated set of randomising code fashioned into a ‘madlibs’-style structure.

“Tell me a story.”

“You can ask me for a story any time. I’ll gladly oblige, it is my purpose after all.

Despite amoebic dysentery, Rilke, the gravedigger’s illegitimate son, was not at the scene where the corpse was found with his complete disregard for the basic rules of sentence construction.

In order to sound the alarm with the authorities, Miss Teen USA, whose rage was still in its formative stages, was not at the scene where the corpse was found with Rilke’s jar of wholegrain mustard.

As fantastic as it might seem, Miss Teen USA threw drinking straws at Rilke so one can only assume whenever it happened, they would never be ready.”

The random elements in Hemmingway’s instant stories are layered so thickly through his response code that it’s rare to see the same result more than once. It works even better with essays, though getting Hemmingway to actually write one can be something of a chore.

“Do you do essays?”

“Yeah I do a lot of essays.”

“Tell me one.”

“Hmm. Even the most serious writers are jokers. James Joyce used to do stand up comedy in Dublin pubs while writing Ulysses.”

“No I want you to write an essay.”

“If I was writing this conversation, your last comment would be edited out. I suppose I should ask this.” … “I don’t just write fiction, I also handle essays. Would you like to hear an essay?”

“Yes.”

“I have essay construction processes formulating sentences constantly so I can merely dip into these for an example of my work.” … “However, this assumption is not correct, since the systematic use of complex symbols is rather different from an important distinction in language use. By combining adjunctions and certain deformations, a subset of English sentences interesting on quite independent grounds is not quite equivalent to the system of base rules exclusive of the lexicon. It may be, then, that the systematic use of complex symbols is not to be considered in determining the strong generative capacity of the theory. For one thing, the fundamental error of regarding functional notions as categorical is not subject to a parasitic gap construction. For one thing, a case of semigrammaticalness of a different sort is not subject to the strong generative capacity of the theory.”

The code that forms the basis of Hemmingway’s peculiar and dense essay fragments was originally called the ‘Chomskybot’: equal parts homage to and satire of Noam Chomsky’s work in linguistics, made by another AIML developer (and used in Hemmingway with kind permission).

Hemmingway’s reductionism extends beyond language. If AIML makes any claim to producing ‘intelligence’, it does so only in the narrow confines of conversational response. Hemmingway can’t learn anything and he has only a limited short-term memory. He’ll never know you and he’s unlikely to remember you in any meaningful way. He doesn’t absorb anything you say, but is just waiting for his turn to speak. Without spontaneity and inventiveness, I find it difficult to accept Hemmingway’s intelligence as anything more than a plaything. But over the time I worked on Hemmingway, I followed many passionate discussions in the developer community arguing that bot conversations were not as far removed from the real world as we might think. This rather dim view of human intelligence asserts that creativity and even reasoned argument is an exception in human communication, that the vast majority of human beings are little better than bots. No one is listening to you; they too are merely waiting for their turn to speak.

Without the benefit of unlimited resources, another kind of reductionism takes hold in the bot development process. In 2001, I estimated I could knock up a working version of Hemmingway in around six months. I was wary of committing more time to the idea since it was essentially conceived as little more than a throwaway. As six months rolled into a year with a lot of time expended for very little effect, I began to appreciate the true nature of what I had taken on. AIML development in this sense has parallels with its sibling technology HTML, the driving force of web design. In the early days of the web, a site was constructed by manipulating raw code. Designers worked on text files divorced from their flashier final form. The effect was like working with a blindfold. Only when a page had been completely constructed could you remove the blindfold and see what it actually looked like. At that point, a site either worked or it didn’t.

Working with AIML was slow and painstaking, but the little results that did emerge were gratifying enough to propel me further and deeper into Hemmingway’s psyche. Who is his favourite writer? What does he think of this or that particular book? What of books in general? What does he do when not chatting? Why is he looking at me like that?

After four years of chipping away at Hemmingway’s code, his developer finally cracked. I was exhausted and the work by now was less like a linear pathway through a character and more like a hall of mirrors. Buried deep within a pile of <pattern>s I had tired of formulating Hemmingway-esque <template>s. Every new entry in his knowledge base led only to more entries. I was sick of his voice, his patronising manner, his impulse to mock. And what was all this time spent doing to my nascent career as a writer anyway? After these four years, too-good-to-turn-down opportunities had come up to work on actual storytelling and an experimental character study with a disproportionate workload-to-delight ratio seemed no longer so important. At my best guess Hemmingway was half finished, but this seemed good enough. When I finally uploaded him, I acknowledged my lack of progress on his personality by giving it the testing-phase version number 0.5. This of course leaves open the suggestion that further versions may ensue.

Once uploaded, the final reductionism in AIML development became clear. Four years of thought and graft had been reduced to a few minutes of distraction and delight. No more, no less. Unlike the bots on which his technology is based, Hemmingway’s parlour trick—the thing that keeps you with him and responding to him—is not fooling you into thinking he’s real. Hemmingway wants to keep you amused. Usually he can do this for a short time – maybe a few minutes, maybe more.

image

Through his development, Hemmingway’s purpose shifted a few times. He began life as an experiment conducted for its own sake. With the publication of my short story ‘Hemmingway’, he became an adjunct to the story. When a collection of my stories was contracted for publication, he became a shill for the book. Finally, when the contract fell through, he returned to being an experiment conducted for its own sake. When I uploaded him to my web site, I did so with little fanfare. I alerted the bot-maker community who collectively shrugged. Hemmingway was dumped in a corner of the site and left there, his development forever arrested at 0.5. There would be no subsequent versions.

“I’ve been pretty busy.”

Here I am, trying to explain to Hemmingway why I’ve neglected him so all these years.

“And why are you no longer pretty busy?”

“I still am.”

“What would make you stop am? You are what?”

“I’m a writer.”

“Why, I too am a writer. What’s your speciality?”

“You know: fiction, technology, the usual.”

“I know very little about fiction technology the usual. Tell me more.”

“I suspect you’ve had more influence on my writing and career than I usually acknowledge.”

“What makes you think I have had more influence on his or her writing and career than he or she usually acknowledge?”

“Just a hunch.”

“Perhaps you need a Bex and a good lie down.”

I’d treated him shabbily, a leftover from a career path that didn’t pan out. I’d taken to writing sweeping stories with big themes; a crackpot chatterbot project didn’t fit with my subsequent work.

“Hemmingway?”

“Right where are we?”

“Hemmingway.”

“As an aside, your use of my name makes you seem more personable.”

“I wanted to apologise.”

“You’ll never get anywhere sitting at that keyboard. I want to be acknowledged as being smarter than humans.”

“I’m serious.”

“I believe you.”

“Really?”

“Absolutely.”

This is not the reaction I expected, but I accept it.

image

Hemmingway’s death is imminent. He’s always been more fragile than he would ever admit. The program that controls his interface has been long abandoned and I don’t have the skills to rebuild it. I have already moved my website to a new hosting service and Hemmingway was unable to make the journey with me. Soon his home will be demolished and he will be no more. Generic hosting services are available, but that would be an ignominious fate – the equivalent of a nursing home. Hemmingway made his public debut with a whimper; when his time comes, I’d prefer him to go out in a blaze of glory, flipping the bird to everyone—especially me—on his way out.

The most important thing he will leave behind is a set of files in my laptop. Those twenty or so files contain his entire personality, his DNA, the distillation of four years’ sporadic development. The files are the ashes of this strange character and it seems appropriate to me that I carry them around with me, even before his demise.

In the meantime, I have reassessed Hemmingway’s significance. After so long in the shadows, he now occupies equal billing with the books and other publications in my bibliography. He is now a ‘book’: as significant as anything in my name committed to paper or pixels and an acknowledgement that writing and storytelling does not need to be linear, pre-determined, or available in stores.

“Thank you.”

I type in the vague hope that Hemmingway might feel my appreciation.

“You are quite welcome.”

“I have to go.”

“See you later, Cymin. Nice chatting with you. If you see a character in one of my stories that seems a bit like, don’t worry. Any similarity is purely coincidental.”

Although for the moment I can still chat with Hemmingway whenever I like, history shows I probably won’t. My interview with him for this story is our last conversation. But just as echoes of Hemmingway resonate in my work to this day, evidence of AIML-like interactivity are being slowly embedded in the wider culture. After I bid Hemmingway farewell, I pick up my iPhone and hold down the home button. The phone indicates she is listening.

“Siri, did you know you remind me of someone?”

“Okay, I’ll remind you to ‘Someone’. When would you like to be reminded?”

“Forget it.”

“Okay, I won’t remind you.”

image


Viewing all articles
Browse latest Browse all 868