Unlocking clarity and courage for leaders in tech

Home

I trained an A.I. to imagine movie titles from ACMI’s collection

rick-and-morty-butter-robot-purpose-meme

My first few weeks at ACMI (Australian Centre for the Moving Image) have been a whirlwind of discovery, exploration, planning and excitement around its forthcoming renewal. One of my projects is to continue to flesh out explorations of machine learning and related AI techniques to ACMI’s collection of Australian moving image works.

This is not that project.

Or if it is, then it’s more of a fun steam-letting-off part of that project. Drawing from Dan Hon’s experiment in generating British place names, I trained a Recurrent Neural Network (RNN) on titles from ACMI’s collection, and asked it to generate some more.

Method

I used Jeff Thompson’s OS X instructions to get torch-rnn running, trained, and predicting new titles on my Mac. A good way to tell you’re working with bleeding-edge tech is that it is painful to install. I didn’t have to do much textfile editing to get it working, and it didn’t break many other things, but next time round I would definitely try the Docker version first. The moral is: keep your AIs safely contained!

The next step was to get a list of titles to train the AI with. I grabbed the Objects file from ACMI’s Collection Data Starter Kit, and wrote a quick Python script to write the titles to a text file. Here’s the complete list, if you’re interested.

Training the titles took an hour or so on my laptop — I didn’t stick around to find out exactly how long. Interestingly, the training process generates ‘checkpoint’ files, which you can use to generate titles based on a less-experienced network before the training has completed. I’ll give some example titles from these checkpoints below.

Once the training had finished, it was a simple matter to generate titles. It’s also possible to provide different ‘Temperature’ values, which change the amount of ‘novelty’ in the system. In the examples below, I explore the effects of more training and less novelty. The results I’ve highlighted are (because I chose them) an improvement on the average quality of results. In the most entertaining scenarios I’ve linked to longer lists of results.

The effect of more training

These generation commands vary by checkpoint. A higher number means the network is more trained, and the highest number is 17150. th sample.lua -checkpoint cv/acmititles_**1000**.t7

This is pretty rudimentary —nearly ‘lorem ipsum’-ish, but clearly better than random characters, and I give it extra points for inventing “Australiation”. It has also adopted ACMI’s protocols for marking Captions and DVDs in titles. I like that it seems to generate nonsense that evokes a particular language — English, German, French, Latin. (N.B. ACMI uses ‘=’ to indicate translated titles. The transformation of ‘No.’ to ‘№’ is Medium’s.)

Now it’s beginning to look like some thought has gone into it. It may help to imagine some of these being said in an Auld Scots dialect:

This model seems to have more sustained moments of being on the verge of making sense. I think the _temperature_ value may still be too high to be interesting — too much randomness can be as uninspiring as none.

This is the final model, after the training has finished. It’s pretty inventive — if only we knew what all those new words meant. I call this “young adult scifi novel mode”.

The effect of novelty

Remember, this neural network has no knowledge of English words, grammar or punctuation. It has only ever been shown these titles, not any other text, and we haven’t told it that these are necessarily titles, or even words.

Given how little we have told this AI about what it’s supposed to do (just ‘make more of this sort of thing’), it’s doing an admirable job. It’s also being quite brave about taking things in new directions. Perhaps a little too brave.

Luckily there’s a temperature control, that allows us to cool down the novelty (and maybe to dial back any sentience that occurs). The default temperature value is 1.0, i.e.most novel, which is what we’ve used until now. Dialling the temperature back will result in more words and word patterns that are already found in the training list. Check it out: th sample.lua -checkpoint cv/acmititles_17150.t7 **-temperature 0.2**

Very low novelty — the patterns used are the most common ones in the collection. We have lots of ‘stories of’ works, it seems.

Adding more novelty. In these results, most words are recognisably English and it is easier to select titles that are grammatically correct. I call this “bad concept album titles mode”. We’re close to being intriguingly novel, but the word patterns are a bit too repetitive (“The x in/of/and/to the y”) to be intriguing for long.

‘Undergraduate artist mode’. At this point, changing _temperature_ is a tradeoff between wanting perhaps more novel word patterns, but fewer novel words. If we were doing this seriously, we’d perhaps choose a model that knows more about (Australian) English.

That’s about all. I’ll be exploring these concepts further in my new album, The Conside of the Beat, available in absolutely no good record stores.