If you can read this, it was generated by AI

Sana Tariq
OPUS
Published in
3 min readDec 28, 2018
Source

…or not. Turns out, making sense of AI-generated text is not that simple.

I love stories. Story-telling is an art and language is a beautiful way of expression. So, when I came across this code, I was intrigued and excited.

TensorFlow’s “Text Generation using a RNN” uses a dataset of Shakespeare’s writing to train a recurrent neural network (RNN) to generate text. I tweaked things slightly and used Jane Austen’s Sense and Sensibility by changing a simple line of code:

Step 3 in the code

The result? Something that reads like Austen’s writing, looks like Austen’s writing but doesn’t sound like her writing because the text doesn’t make sense. (Some might argue that Austen’s writing doesn’t make inherent sense but that’s a topic for another discussion).

Output text

No; what I mean is that the words/sentences have little meaning. So, what does this mean for AI-generated text?

AI uses natural language processing (NLP) to analyze language. The goal of NLP is to allow computers to achieve a human-level understanding of language. NLP tasks can be divided into speech, syntax, semantics, and discourse. Some popular real-world applications of NLP include voice-based systems like Siri or Alexa, predictive-text analyses for completing text/email messages, and semantic analyses such as Google translate services.

TensorFlow’s text generation model is character-based, which means that the RNN views the input and output sentences as a sequence of characters rather than words. There are numerous benefits to such an approach:

  1. the preprocessing is simplified;
  2. the computational cost is lower compared to a word-based model (characters are limited but vocabulary words are in the millions);
  3. the model is able to interpret and generate unseen word forms. However, the originality and flexibility come at the cost of meaning.

The model provides proof-of-concept: AI can generate text and shows the hidden ability of the technology.

However, for humans, story-telling is a mastery of language and imagination. And where AI is quite smart in certain tasks of NLP, it still lacks meaningful imagination. Human imagination has n number of dimensions: context, time, relationships, emotions, subjective sense… the list goes on. But AI is only able to decipher the shallower layers, and perhaps one dimension at a time. I’m hopeful, however, that AI will get there. It will not only craft stories but entire worlds. It’s only a matter of time…

--

--

Sana Tariq
OPUS
Editor for

Research Scientist. Hobbyist writer. Sometimes, philosopher. Dreamer. Achiever.