When you think about the mind, there is one thing that seems uniquely human: a sense of humour. The history of trying to understand humour dates back thousands of years, with little consensus. Plato and Aristotle pondered the issue and postulated the superiority theory — the idea that people laugh at the misfortune of others. Sigmund Freud, meanwhile, coined relief theory, which argued that the concept of humour was a way for people to release psychic energy from repressed thoughts. A theory forwarded by seventeenth-century French philosopher Blaise Pascal suggests humour arises when we discover inconsistency between expectations and reality.
If we can’t agree on a theory, how can we begin to determine what model should be used as the basis for comedic computers?
Despite our best efforts to explain the mysterious evolution of humour across every culture, and though the core mechanisms behind humour remain elusive, there is general consensus that the capacity to understand humour requires four things.
Firstly, it requires self-awareness, i.e. an ability to understand and acknowledge our own character and feelings. This is essential as it allows us to not take ourselves (and our thoughts) too seriously. Secondly, it requires spontaneity — behaviour that is spontaneous or impulsive — which is crucial when it comes to humour that is relevant only in the present moment. (Ever re-told a joke to other friends afterwards only to be met with blank stares before you meekly explained they “had to be there”? Yeah, that.)
It’s also important to have linguist sophistication, meaning the ability to express language in a cohesive and comprehensible way, to execute a joke with the correct intonations, timing, and expression to ensure it is well received. Lastly, understanding humour requires empathy, so you can understand why something has comedic value by putting yourself in the shoes of the people inside the joke or those telling the joke. None of these traits are traditionally associated with artificial intelligence (AI) —i.e., robots. Despite this, AI has gradually become programmed to subvert these expectations. Through the development of algorithms based on comedic schemas, AI is becoming trained to recognise and produce humour.
Computational humour, comedy that is generated by machines, is a combination of AI and computational linguistics, the formulation of algorithms to understand and create comedy. It might initially seem pointless to endeavour towards automated machines understanding humour, especially in comparison to concurrent ventures to prevent terminal illnesses and plane crashes.
Yet, modelling humour is one of the most important ways to model human thought. The adjectives referred to earlier — self-awareness, spontaneity, empathy — highlight something abstract and indeterminate lurking within this effort that is difficult to codify. According to David Gelernter, a professor of computer science at Yale University, “a machine must understand the full range and nuance of human emotion before it can be deemed capable of creative thought”. The human emotion that is involved in all facets of comedy is the main issue we face when creating comedy-comprehending machines — if we ourselves barely understand our own comedic tastes, how are we going to contextualise that for robots?
Researchers at Virginia Tech have trained an AI algorithm to understand and predict visual humour, which suggests that AI has the ability to recognise humour using the same tools humans use to recognise common sense. The study was limited to images made using a clip art-based program containing human and animal models that could be placed around objects like tables and chairs. The AI algorithm was continually being updated by the researchers to help produce comedic content. This algorithm was updated based off the judgment on participants on whether a picture generated by the AI was funny or not. This was then taken into account when the AI would choose which images to be placed in the photo.
According to researchers, humour is the major barrier to the advancement of AI and could hold the key to not only unlocking emotional intelligence, but also to understanding how humour works in humans. Most of us immediately understand the mocking tone of obvious sarcastic zingers, unlike our robot creations.
SASI (Semi-supervised Algorithm for Sarcasm Identification) aims to change that. It’s an invention developed by Israeli researchers in 2010 at the Hebrew University of Jerusalem dedicated to understanding the so far uniquely human characteristic of abrasive expression. Their algorithm scanned Amazon product reviews to define parameters for sarcasm, resulting in efficiency in detection of approximately 80 per cent.
The development of machines such as SASI opens up a new wave of humour detection capabilities, which could have great benefits to society such as using machines to help less socially adept people engage with society in a whole new way. The innovations could also be particularly helpful for those with ‘frontotemporal dementia’, a group of disorders that primarily affect the frontal and temporal lobes of the brain, which affect a person’s ability to detect sarcasm and lying. Humour detection capabilities could also be used as a spell-check for humour, saving people from embarrassment, particularly when conversing in a non-native language.
The advantage that AI has in the development of humour, however, is its ability to scour the Internet, for instance, for word combinations and images that fit into the schema of well known humorous phrases.
Whether or not you look forward to being told jokes produced by a piece of software, it is a reality which is quickly encroaching on us. While producing computational models for humour may not be a reality for many years, the development and research into AI that can both understand and produce humour is not trivial. It may become a useful tool for many in our society and in the process it may prove a crucial element into discovering who we are as humans.