Laughing Heads: Can Transformers Detect What Makes a Sentence Funny?

05/19/2021
by   Maxime Peyrard, et al.
0

The automatic detection of humor poses a grand challenge for natural language processing. Transformer-based systems have recently achieved remarkable results on this task, but they usually (1) were evaluated in setups where serious vs humorous texts came from entirely different sources, and (2) focused on benchmarking performance without providing insights into how the models work. We make progress in both respects by training and analyzing transformer-based humor recognition models on a recently introduced dataset consisting of minimal pairs of aligned sentences, one serious, the other humorous. We find that, although our aligned dataset is much harder than previous datasets, transformer-based models recognize the humorous sentence in an aligned pair with high accuracy (78 hard instances. Finally, by analyzing attention weights, we obtain important insights into the mechanisms by which transformers recognize humor. Most remarkably, we find clear evidence that one single attention head learns to recognize the words that make a test sentence humorous, even without access to this information at training time.

READ FULL TEXT

page 6

page 8

page 9

page 10

research
07/02/2021

Transformer-F: A Transformer network with effective methods for learning universal sentence representation

The Transformer model is widely used in natural language processing for ...
research
02/16/2021

Exploring Transformers in Natural Language Generation: GPT, BERT, and XLNet

Recent years have seen a proliferation of attention mechanisms and the r...
research
07/18/2023

Analyzing sports commentary in order to automatically recognize events and extract insights

In this paper, we carefully investigate how we can use multiple differen...
research
10/23/2020

Learning to Recognize Dialect Features

Linguists characterize dialects by the presence, absence, and frequency ...
research
07/31/2023

Performance Evaluation of Swin Vision Transformer Model using Gradient Accumulation Optimization Technique

Vision Transformers (ViTs) have emerged as a promising approach for visu...
research
10/11/2022

Shapley Head Pruning: Identifying and Removing Interference in Multilingual Transformers

Multilingual transformer-based models demonstrate remarkable zero and fe...
research
09/13/2023

Traveling Words: A Geometric Interpretation of Transformers

Transformers have significantly advanced the field of natural language p...

Please sign up or login with your details

Forgot password? Click here to reset