There are various things that we have often regarded as uniquely human endeavors that robots have been quietly getting rather good at. For instance, I wrote recently about a study whereby robots were being taught how to empathize, whilst there has also been a project to devise a robot capable of improvising jazz solos.
Humor remains altogether more challenging however, but it’s a challenge a team of researchers have tackled head on in a recently published paper.
The authors wanted to test whether they could teach a machine to appreciate the kind of visual, animated gif style humor that so often fills the front page of sites such as Reddit.
You’re a funny robot
What’s more, the researchers are so confident in their work that they believe that their creation is not only capable of detecting humor, but also of creating them, even though they have no real idea why something is funny.
The first step was to understand what exactly humor is, which is prickly in itself. Whilst it isn’t exactly formulaic, most previous studies suggest it often contains things such as unexpectedness, pain, incongruity and so on.
The study, which was limited to pictures, attempted to build a database of humor upon which the machine could be trained by recruiting people via Mechanical Turk, who were asked to summarize why they thought particular images were funny.
This process, together with the creation of scenes that were tagged as not funny at all enabled the team to amass a database of around 6,400 images roughly split 50/50 between funny and unfunny.
This database was then calibrated by asking a separate group to rate the funniness of each scene.
The anatomy of humor
As any glance of the frontpage of Reddit will tell you, animals play a big part in what we find funny, vying for top spot with humans doing daft things.
These basic heuristics allowed the team to attempt to alter images to make them more funny. This was initially done to try and make the scenes less funny than they originally were.
”This helps us understand fine-grained semantics that causes a specific object category to contribute to humor,” the team say.
After the machine was trained on this extensive database, it was set the task of first predicting the fun rating of an image, and more interestingly, then being able to alter the image to make it more funny.
This first task is one that it can actually perform rather well, but understandably the second was rather more complex, as it requires being able to both identify the elements of the image that make it funny, and then to know how to change that to influence its fun level.
It performed reasonably well at the first aspect of this, and after a slow start it began to show distinct improvement in the second task.
“It eliminates humor in most scenes by choosing to replace objects contributing to humor with other objects that blend into the background well,” the researchers say.
When the results of the machine’s meddling were tested by a fresh group of human judges, they did indeed find the altered images less funny than they were originally.
It was slightly less successful in actually making scenes funnier, but this is clearly a work in progress, and whilst it’s still far from clear that the machine really understands the nature of humor, it might not be long before our jokes become automated.