The realm of possibilities for artificial intelligence may have broadened over the last few years, but can it program a machine to be funny? Given that this requires the ability to understand the complexities and nuances of human communication, can it be trained to develop a sense of humour and imagination? Perhaps yes, if generating good memes can be seen as one of the metrics to measure this.
Internet users have been flocking Dylan Wenlau’s meme generator Imgflip (and others) for years now, but the platform has been leveraging neural networks to create its own memes. Calling its AI-powered tool ‘This Meme Does Not Exist’, it matches captions against a slew of popular formats to predict what it thinks a meme should look like.
How To Let Deep Neural Networks Create A Meme For You
Memes have become ubiquitous as a means to share information cloaked in humour and cultural themes. And as AI technology continues its rapid arc of development, neural networks can indeed generate them — albeit a few limitations.
Using over 100 million meme captions posted by Imgflip users and 48 popular meme formats, According to his blog post, Wenlau used ML platform TensorFlow and Keras to build this tool. While not so much as a meme maker, as a meme caption generator, it still shows great promise. Created by a deep artificial neural network, these captions are not hardcoded, except for capping the maximum length of each text. However, while surprisingly hitting the mark most of the time, it does periodically churn out bizarre images as demonstrated below.
Typically, users have been uploading new images and adding text to those. But with this AI-powered tool, you simply have to select a format from numerous blank templates of popular memes, allowing the network to generate a fitting caption for the selected format.
It is quite addictive, and the results are often witty, consistent with the corresponding image and even eerily appropriate for the current times, leaving you wondering how an artificial neural network can be trained to throw up such results. For instance, take this iteration of the ‘That Would Be Great’ meme:
You can either save it for your personal use or submit it to the AI memes stream on the platform. Alternatively, users can also create an animated GIF template here. While this meme makes sense — and even seems appropriate to the vibe and mood of the meme — some can also miss the mark and churn gibberish. What is more, the platform conceded that it may contain vulgarity since no profanity filtering was done on the training data.
How AI Generates Memes
Neural network was feed with massive amounts of data to teach how to make predictions on what data should look like. For this, Imgflip trained the neural network using a large collection of memes and then tried to predict the caption that should go with a corresponding image.
Researchers from Stanford University had studied AI to create a ‘novel meme generation system’ using deep learning. Calling the project ‘Dank Learning’, Abel L Peirson V and E Meltem Tolunay began by feeding a computer over 4,00,000 memes using a Python script to train the machine. This AI took images as inputs and converted them into mathematical representations called vector embeddings (an encoder) and a long short-term memory (LSTM) recurrent neural network (RNN) to create the captions.
Following this, the duo evaluated the quality of the model using human assessment. Volunteers from diverse backgrounds were asked to attempt to differentiate between images created by people, and those they thought were generated by the machine.
The researchers concluded that the model they created produced original memes that were difficult to differentiate from the ‘real’ ones they were inspired from. This indicates that AI may be as good at making memes as people are.