Dad jokes-as-a-service: Amazon patents "humorous" AI pun generator
Tech behemoth's potentially hyper-annoying innovation could let Alexa crack jokes and "cheer up" sad users.

"When artists dream in colour, it's a pigment of their imagination."
That's just one example of the dreadful jokes Amazon has told in a patent filing for a new AI-powered pun generator capable of automatically producing cringey quips.
Today, the tech giant was granted a patent for a "virtual assistant humour management" system designed to let bots and voice-controlled devices make wisecracks without human intervention.
Humour is not a promising use case for LLMs and AI in general because machines have traditionally struggled with the linguistic juggling and boundary-breaking offensiveness typically required to make humans laugh.
However, Amazon believes it has finally found a way to get around AI's humour bypass - although we don't think the invention should worry the real writers employed to write jokes for Amazon's Alexa assistant.
Before we explain the invention, here's another example of the Amazonian hilarity contained in its patent filing: "The man found something to catch fish, which was a net gain."
Did you giggle?
Probably not - which is exactly the issue that Amazon's engineers have set out to solve.
"Humour serves multiple purposes and provides numerous benefits, such as relieving anxiety, avoiding painful feelings, and facilitating learning," Amazon wrote in its patent.
"As a specific example of humour, the creative uses of puns, wordplay, and ambiguity are important ways to come up with jokes.
"Pun understanding and generation are particularly challenging tasks to implement for a virtual assistant/chatbot system because they require extensive commonsense and world knowledge to compose and understand, even for humans."
Lacklustre language models

Until now, the "domain of humour understanding and generation" has generated only "limited amounts of data", Amazon warned.
Existing datasets of jokes are often annotated to indicate whether the sentence is a pun, joke or punchline - with little sense of whether the statement is actually funny.
"Such binary labels may be insufficient to benchmark the ability of machine learning models or other components to understand and generate humorous text," researchers wrote.
"Such sparse supervision signals and coarse-grained annotations may provide insufficient information to perform system configuration or training to effectively incorporate humour aspects in a system-to-user interaction."
The patent filing sets out various techniques which account for the "shortcomings" of humourless machines by generating humorous text based on keywords that reflect the context of conversations between users and their AI assistant or voice-controlled device.
READ MORE: Big Zucker is (still) watching: Can Meta read human emotions using ultrasound?
Amazon added: "Such tools may be incorporated into computing systems to both detect humorous text and to generate humorous text, enabling the system to interact with humans in a more realistic manner.
"For example, virtual assistant systems and chatbots that are adapted to engage in a dialogue with a user may be configured to recognise appropriate times to inject humour and then generate humorous content that makes sense within the context of the conversation.
"Such systems may effectively be instilled with a human-like 'sense of humour', thus making the experience of interacting with such systems more natural and enjoyable for users."
Machine groaning: Can Amazon make machines funny?

The actual protected part of the patent is a system that uses AI models to scan users' utterances for words that could form part of a "pair", which means they can be linked to another word to make a pun. Byte and bite would be an obvious example.
Researchers taught the models what was funny by feeding them example puns paired with human-written explanations of why they worked. A model was trained to generate those explanations and another was taught to classify whether a line was actually a pun.
For instance, discussing the "pigment" joke at the beginning of this article, Amazon's patent explained: "Pigments are non-soluble materials often used in painting, and pigment sounds like figment, which is something that is not real but some believe it is."
And why was the quip about a fisherman's net gain (allegedly) funny?
"This is a play on words," Amazon explained. "A ‘net gain’ means an increase in revenue, but here ‘net’ refers to how a net is used to catch fish."
READ MORE: Patented LLM system lets dead people continue posting from beyond the grave
Which reminds us of the famous quote falsely attributed to Mark Twain, but actually penned by E.B. White and his co-author Katharine White, in the 1941 book A Subtreasury of American Humour: "Explaining humour is a lot like dissecting a frog, you learn a lot in the process, but in the end you kill it."
Amazon said an implementation of its tech could also include a "sentiment detection component" to determine someone's mood and "whether the user is sad, frowning, or crying and could perhaps use some cheering up".
And, for the record, we're not sure listening to Alexa crack appalling jokes would really make the user experience "more natural and enjoyable", as Amazon has claimed, or just become extremely annoying.
We do not believe (but cannot prove) that Amazon has used the invention in its actual devices. Companies often patent technology they have no intention of implementing in actual products - so we could still be spared from the spectre of a "hilarious" AI assistant.
Laughing language models
Amazon is not the only company that has tried to give AI the ability to make jokes.
Last year, Google Deepmind published a study about its attempts to use language models as "creativity supertools for comedy".
It asked 20 comedians to use an LLM to produce material for their shows, but participants complained the models' oversensitive guardrails stopped them from writing about "many themes common in comedy writing, including sexually-suggestive material, dark humour and offensive jokes".
"The LLMs did not succeed as a creativity support tool, by producing bland and biased comedy tropes, akin to 'cruise ship comedy material from the 1950s, but a bit less racist, '" Google researchers wrote.
"Participants noted that existing moderation strategies used in safety filtering and instruction-tuned LLMs reinforced hegemonic viewpoints by erasing minority groups and their perspectives, and qualified this as a form of censorship."
Earlier this month, a paper from an academic at the Indian Institute of Technology stated that "automated humour generation with Large Language Models (LLMs) often yields jokes that feel generic, repetitive, or tone-deaf".
Do you disagree? Let us know at the address below.