Elamur Research

Dutch Humor Detection by Generating Negative Examples

Paper · 2020 · Thomas Winters and Pieter Delobelle

Summary

A joke and a news headline can differ in their length, vocabulary, and shape. A program trained to tell them apart can use any of those differences, including ones that have little to do with how a joke works. This paper tests Dutch humor detection with a closer comparison. The authors take jokes from Dutch websites and edit them in place, replacing selected words with words of the same grammatical category drawn from other jokes. A riddle can keep its question and answer while losing the connection that makes the answer a punchline. The authors present their study as the first investigation of Dutch humor detection to their knowledge.

The experiments use collected jokes as positive examples and try different sources for the negative examples. News headlines and proverbs provide comparisons with earlier humor benchmarks. The edited jokes provide a test in which both classes draw from the same vocabulary and share much of their structure. Most experiments ask for a decision about an individual text. A separate experiment presents an original alongside its edited counterpart and asks the detector to pick the original. In both formats the assigned labels come from the origin of the text.

On the held-out single-text tests, the strongest system reaches 98.8% accuracy against headlines and 99.6% against proverbs. It achieves 89.2% when the alternatives are edited jokes. The recurrent and convolutional systems reach about 94% on the simpler comparisons and have much more trouble with the edits. The strongest system also does reasonably well on pairs, although its accuracy falls compared with its single-text result on edited jokes. The authors suggest that fitting both versions into the available input space can cut off parts of the text. The system with the strongest results is RobBERT.

The edited examples change the kind of evidence available to a detector. They make familiar joke vocabulary and format less decisive and give the system a reason to pay attention to how the words fit together. The authors find edited texts that still hang together or preserve some humor, even though the benchmark counts them as negatives. They also find that the detector trained on edits assigns joke labels to many ordinary headlines and proverbs. That behavior is consistent with a detector that responds to coherence. The main result is that closely related negatives make the classification task harder, and that RobBERT distinguishes the originals from those negatives more successfully than the other systems tested.

Deep dive: Dutch Humor Detection by Generating Negative Examples

Dutch humor detection gets a tougher test when classifiers must distinguish original jokes from close copies made by replacing words. · about 35 minutes to read

The problem and its context

What the ending changes

A joke can lead a reader towards an interpretation and then give that reader a reason to revise it. Before the ending, the interpretation makes sense on the evidence available. The punchline adds something that fits poorly with that reading. A different reading, available in the earlier wording but easy to overlook, can make sense of both the setup and the ending. The authors motivate their experiment with this account, typically called incongruity-resolution theory.

Incongruity and resolution do different jobs. The incongruity is the moment at which the reader's expectation comes under pressure. Resolution is the discovery that the text can be understood another way. An arbitrary ending can create a surprise by making the initial reading untenable. Its effect will be different if the reader can go back to the setup and see what else its words could have meant. A replacement that leaves an ending odd but makes that earlier wording irrelevant can remove the resolution while preserving something of the surprise.

The order in which the reader gets the information is important for the authors' argument. An ending placed at the beginning can give away the reading that the setup would otherwise conceal. The inventory of words could be identical in the two arrangements. The experience of reading them would still differ because the reader would encounter the critical clue at a different point. A computational representation that pays attention to where words appear has a way to register the difference. A representation based purely on the presence of particular words has much less to work with.

The paper also emphasizes the reader's part in the process. A joke can rely on linguistic knowledge that makes a second reading available, or on an everyday assumption about the situation described. A reader who already sees the alternative may have little reason to form the expectation the ending was meant to upset. A reader who cannot recover the alternative may experience the ending as arbitrary. For a computer to account for the effect in the terms of this theory, it would have to represent the interpretations and account for their availability to a person. That is a wider problem than the prediction task the authors set up.

This distinction explains the point of the paper's benchmark design. A correct label says that the decision agrees with the category assigned to the example. An explanation of a joke would have to identify the clue, give the readings it makes possible, and account for the timing of the change. The paper narrows the gap between the two questions by trying to remove some easy clues to the label. The practical task remains an instance of text classification.

Why the source of a negative example matters

The paper describes a familiar setup in earlier humor detection work. Texts taken to be jokes form the positive class, and examples from sources such as news and proverb collections form the negative class. Researchers can use these collections to assemble a labeled dataset without constructing a companion text for every joke. The Dutch experiments retain these comparisons to provide a point of contact with earlier research. One of the studies cited for this approach is Making Computers Laugh.

In that setup, class membership and the type of writing can go hand in hand. A headline may be compact where a joke uses a question and answer or spends longer setting up the final line. A proverb may have its own characteristic turns of phrase. The joke collection may mention familiar characters or use words that turn up less often elsewhere. A system that learns which of these patterns goes with each label can give useful predictions on another sample drawn from the same sources. That success leaves a question about which of the patterns would still help if the negative examples were also written in the form of jokes.

The authors describe earlier systems that used manually chosen features, frequently based on words. A feature in this setting is a property of a text that the classifier can use as evidence. The occurrence of a particular term is one possibility. Features hand-designed for humor can express more specific hypotheses about useful clues than a plain count of terms. The literature discussed in the paper also includes work on locating the wording that contributes to a joke's effect. The authors cite Humor Recognition and Humor Anchor Extraction.

One way to see the problem is to consider a name that recurs in a joke collection. Its presence might predict the label because the name appears disproportionately frequently in the positives. The prediction could work independently of what the character is doing or what the final sentence reveals. A negative built by editing a collected joke can contain that same name, along with many of the surrounding expressions. If a system can still decide correctly under those conditions, a familiar name alone is a less complete account of its success.

By the authors' account, prior work in English had also begun to use parallel collections of satirical headlines and related versions. These examples are closer to one another in wording and form than texts drawn from unrelated sources. Small edits can matter once the broad properties are shared. This offered a precedent for making the contrast more local to the text itself. It also highlights a practical issue for languages and tasks without suitable parallel material. As far as the authors knew, Dutch already had research on computational humor, including generation, but lacked both a public dataset for Dutch humor detection and published studies addressing that detection task.

Choosing an editing method and a detector

Text generated from scratch could still give away its source through a change in format. The paper describes methods that produce text by successively predicting words, including methods that use short sequences and methods that use more recent language technology. Such generation can produce plausible neighboring words while allowing the overall output to be longer, shorter, or organized differently from the texts it imitates. The authors want to start from the opposite end of that design problem. They begin with the entire joke already in place and allow the generator to alter parts of it. The overall form is inherited from an actual example. This is the role of text generation in the study.

For detection, the authors are interested in representations that can respond to context. The same written form can function differently depending on the words around it. A fixed representation gives that form the same vector across occurrences. A contextual representation can reflect which use fits the particular passage. This distinction matters in a joke because an interpretation can depend on information supplied some distance away from the word being interpreted. It is the distinction the paper draws between fixed and contextual word embeddings.

The paper points to promising results from earlier English humor detection with contextual systems. It also raises the difficulty of wordplay based on similarities in spelling. The input units used by a system can conceal the letter-by-letter resemblance on which a pun depends. Context gives a detector information about how meanings fit together, while access to the form of a word can matter for a different reason. The earlier English results make the approach worth testing in Dutch without settling how it handles that kind of joke. One of the English studies the authors discuss is Humor Detection: A Transformer Gets the Last Laugh.

The method, step by step

Give the same joke a nearby alternative

Consider a riddle whose question describes something and whose answer offers a name that makes the description funny. An editor could keep the order and wording of the question and answer almost intact while changing the action described in the question. The new action can fit into the same grammatical position and make much less sense in relation to the answer. Changing a word in the answer can further weaken the connection. This is the authors' way of obtaining a near neighbor of a given joke without writing a separate negative example by hand.

Their example concerns Kermit. In the original, the question supplies the clues of greenness and sticking to a wall. The answer uses the Dutch term for a sticker in place of the similar-sounding word for a frog. Those parts work together. Sticking makes the sticker reading relevant, while Kermit supplies a reason to expect the other word. In the edited riddle, the action involves telephoning, and the ending has Kermit as a spider. The question still gives a color and describes an action, and Kermit still appears in the answer. The changed material gives the reader much less reason to connect the two parts in the original way.

The authors use a procedure called a dynamic template to make edits of that kind. The template is the joke itself with some of its word positions available for substitution. Much of what made the joke look like a riddle, dialogue, or other piece of humorous writing can remain because those features were already present in the starting text. The method gets a different template whenever it operates on a different original. There is no requirement that the whole collection use a single format.

An edit has two ingredients. The procedure needs to identify a position where the word can be changed, and it needs to find a replacement that suits that position at a broad grammatical level. It uses frequency information for the first job and grammatical categories for the second. A often occurring word may contribute little to the specific situation of the joke. A less common word is more likely to help establish a particular character, object, or action. The authors use this tendency as a practical way to seek changes that can affect the meaning while leaving the general arrangement in place.

Assemble the source collections

The authors collect 3235 Dutch jokes from Kidsweek, DeBesteMoppen, and LachJeKrom. Entry in this collection supplies the positive label. The collection also serves as the material for building the generated negatives. It provides the texts to be edited and the contexts from which replacement vocabulary comes. A generated example therefore has a close relationship with the positive class even when a replacement changes its topic or makes the resulting proposition seem absurd.

The independent negative examples have separate origins. For the news condition, the authors uniformly sample 3235 headlines from the 100K Dutch news headlines dataset. For the proverb condition, they use 1887 proverbs from the Dutch Wikipedia collection of proverbs. These figures refer to the gathered collections. The experiment uses the different negative sources in separate comparisons, so the headline result concerns a classifier trained to distinguish jokes from headlines, and the proverb result concerns one trained for the proverb comparison.

That separation is part of how the study tests the effect of dataset design. A combined collection of negatives would ask a classifier to learn a decision boundary against several kinds of writing at once. The separate conditions let a reader see how the same family of detectors fares when each source defines the negative class in turn. The dynamic-template condition supplies the comparison in which the negative source is itself derived from the positives. The authors make their code, trained classifiers, data collectors, and a demonstration available with the work.

Select words and replacements

The procedure analyzes the original using part-of-speech tagging. A part-of-speech tag identifies the grammatical category assigned to a word in its context. A noun and a verb generally occupy different kinds of positions, so choosing a replacement with the corresponding tag gives the generator a simple form of grammatical control. The tag also gives it a way to select from donor words without treating all words in the collection as interchangeable.

The procedure prioritizes low unigram frequency. A unigram is an item considered individually in a sequence, and its frequency records how often that item occurs. A word that recurs widely can be less informative about the particular situation described by the joke. A lower-frequency word can be a better place to interfere with that situation. Frequency is a proxy for this purpose. The method can act on it without identifying a punchline or deciding which parts of the text a reader has to reinterpret. Single items and sequences of consecutive items belong to the wider idea of an n-gram.

The authors reuse the settings from the earlier work on the generator. They give the maximum word frequency as the 62% percentile. This setting concerns eligibility by frequency in the generation process. A percentile is a position in a ranking, so the number describes a frequency cutoff. The extent of the edits is specified separately. The minimum is expressed as one replacement for every 25 characters of text. Thus the frequency rule governs the candidates and the character-based rule relates the amount of editing to the size of the joke.

Three randomly sampled jokes supply the context words for replacement. Drawing donor material from jokes keeps the replacement vocabulary within the domain the classifier is meant to recognize. A detector can encounter familiar joke words in either class. The part-of-speech requirement acts locally, with the replacement picked to match the grammatical tag of the word it displaces. The rest of the text supplies the context into which the new word has to fit.

Taken together, the settings act at different levels. The frequency rule helps identify words whose removal may affect content. The replacement rule gives the procedure a length-dependent minimum amount of work to do. The donor sample controls where the new wording can come from. Since the changes are substitutions within an existing text, the method is designed to retain its broad organization. Similarity in that organization comes directly from the construction, even if individual edits produce awkward language. The paper describes the vocabulary frequencies of the resulting classes as comparable.

The difference between a grammatical category and a word's contribution becomes especially clear in the Kermit example. A new verb can occupy the position of the old verb while calling for a different situation to make sense of the clause. The tag identifies the broad kind of word expected there. An interpretation of the whole riddle would have to take into account the relation between that action, the object being described, and the name in the answer. The generator can disrupt those relations without explicitly representing them.

The negative label is assigned to the edited result. This step requires the assumption that the edits will often damage the joke. It gives the researchers an automatic way to obtain the labels and creates examples ready for either of the evaluation formats. Where an edit leaves the original humor intact or creates an amusing result in its own right, the example still keeps its assigned label. The later analysis of errors takes advantage of that distinction between the edit history and the effect of the resulting text.

Generating and evaluating close alternatives to Dutch jokes

The steps in order.

Generating and evaluating close alternatives to Dutch jokesStep 1: Start with a collected joke1. Start with a collected jokeStep 2: Identify grammatical categories in the text2. Identify grammatical categories in the textStep 3: Select positions using frequency and replacement rules3. Select positions using frequency and replacement rulesStep 4: Sample donor jokes for replacement vocabulary4. Sample donor jokes for replacement vocabularyStep 5: Fill selected positions with words of matching categories5. Fill selected positions with words of matching categoriesStep 6: Assign the edited text the negative label6. Assign the edited text the negative labelStep 7: Present individual texts or original and edited pairs7. Present individual texts or original and edited pairs

Decide what the classifier receives

In the single-text experiments, each input consists of a text to be assigned a joke or non-joke label. When the negative examples are headlines or proverbs, each text originates in the collection appropriate to its class. When the negatives are made by dynamic templates, the classifier gets either an original or an edit in isolation. It has to make a judgment using what it learned during training, with no companion version shown alongside the item.

For the pairwise experiment, each input contains the original and the variant made from it. The target is the identity of the original within that pair. The two texts can share an opening, a question structure, character names, or even most of their wording. The overlap provides a common frame in which to interpret the substitutions. A difference that seems insignificant when an example stands alone may become conspicuous when the other wording is available for comparison.

The paired design is related to preference learning, in which a system learns from choices between items. What determines the result for a given pair is which item came from generation and which came from collection. The authors view the task as a way towards systems that can compare humorous texts. As implemented, its supervision gives a well-defined answer for every pair by construction. It leaves the question of how people would order the same versions to a different kind of evaluation.

Represent the single texts

For a low-complexity baseline the authors use Naive Bayes. It predicts a category from evidence contributed by the input features under a simplifying assumption about their dependence. The paper gives its representation as 3000 (1,3)-gram features with TF-IDF weights. The range includes individual items and short consecutive sequences, so the baseline can respond to short phrases as well as single words. The weighting takes account of how often a feature occurs in the particular text and how common it is across texts. This is the role of TF-IDF.

A short sequence feature can pick up a characteristic way to begin a question, for instance. The same representation gives the classifier limited direct access to the relationship between that opening and a distant answer. What it can learn depends on whether the relevant distinction is reflected in the kinds of short sequences represented among its features. This makes the baseline a useful comparison with systems that can build representations from a longer input sequence.

The recurrent system uses long short-term memory, or LSTM, with Dutch word embeddings. A recurrent network passes an internal state along a sequence as it processes successive inputs. An LSTM regulates access to earlier information through gates, which can help it retain some information and discard other information as the sequence progresses. Its state can serve as a fixed-size representation even when inputs have different lengths. A detector can then use information accumulated across the sequence in making a class decision.

The Dutch embeddings give the recurrent system information about the words before it processes their order. Each word is represented by a vector learned from patterns of use in a corpus. The paper's background connects this approach to work on learning word representations from the contexts in which words appear. The embedding supplies information about a word in general, and the recurrent processing supplies information from its position in the current input. The authors cite Efficient Estimation of Word Representations in Vector Space.

The convolutional neural network, or CNN, also starts with Dutch word embeddings. It applies two convolutional layers to the sequence and uses max pooling. A convolution looks for learned patterns across nearby positions. Pooling keeps a strong response to such a pattern as a feature for the final decision. In a humor benchmark this could help the system recognize a characteristic arrangement of words even if that arrangement occurs in different positions in different texts. The paper draws on Convolutional Neural Networks for Sentence Classification.

RobBERT represents words in the context of the sequence being processed. The paper traces that design back to BERT, which builds contextual representations with an encoder based on self-attention. Self-attention provides a means for information from different input positions to affect a representation. The information available for a word near the start can include words that follow it. This gives the detector a mechanism through which an ending can influence how wording in the setup is represented. The underlying architecture is described in Attention Is All You Need.

The authors describe BERT as learning from tasks that can be set up using text itself. These include predicting words that have been hidden and deciding whether sentences follow each other. Training of this kind precedes the eventual classification experiment. The system can later be adapted with an output component for the labels a researcher wants to predict. In the Dutch study, the relevant distinction is the one defined by the jokes and the chosen negative collection. The earlier work introducing this approach is BERT.

RobBERT was trained on the Dutch part of OSCAR with the revised training regime described by RoBERTa. The authors start from this previously trained Dutch system and adapt it to the humor task. The labeled examples direct its predictions toward the categories or choices used in the experiment. The process of adapting a pretrained system to a particular task is fine-tuning.

Represent the pairs and select training settings

For the paired inputs, the authors give the LSTM separate recurrent layers for the companion texts and use trainable Dutch word embeddings. They join the resulting representations before a fully connected layer. Each representation has therefore already processed its own text when the decision layer gets evidence from both. To combine information from both texts, the CNN uses a similar method and retains the base architecture used for the single-input comparison.

RobBERT receives both texts in a single input. A separator token, a special input unit marking a boundary, is placed between them. The paper describes using the same setup and training settings for this version. With both texts present during contextual processing, information from the pair can enter the same computation. The input budget is then shared by the companion texts. This implementation detail matters when an original is already long enough that including its edited counterpart can displace part of it.

The authors run a random search for training settings with the recurrent system, the convolutional system, and RobBERT in the single-text experiment. They report 10 runs for this search. These runs try different hyper-parameters, which are choices about the training procedure or configuration set before learning from the examples. Trying several assignments matters because a system's score can depend on the specific settings it receives. The paper lists the search spaces in its appendix.

Validation accuracy is used to select the strongest run for testing. Validation examples furnish feedback about which configuration works best. The held-out test then evaluates the selected configuration on examples reserved for that purpose. The authors also use the search outcomes to estimate maximum validation accuracy as a function of the number of trials. This gives them a way to examine whether the relative ordering of systems is sensitive to the number of attempts spent looking for good settings.

Experiments and results

Read each score against its own task

Accuracy is the proportion of evaluated inputs for which the prediction matches the assigned answer. In a single-text comparison, success means giving a joke the positive label or giving a text from the chosen negative set the negative label. In the paired comparison, success means selecting the original of the two texts. Both are accuracy measures, although the amount and kind of information in an input differ. The reported held-out accuracy results are accompanied by a 95% confidence interval, which expresses uncertainty around the estimate.

The gathered pools contain 3235 jokes, 3235 sampled headlines, and 1887 proverbs. Those are collection sizes. Each held-out score concerns the test split for a particular comparison. In the generated condition, the relationship between the examples is part of the design: the contrast is with derivatives of collected jokes. In the headline and proverb conditions, the contrast is with independent material. The same accuracy measure can be used for all these tests because each has defined labels.

The four approaches give the study several points of comparison. Naive Bayes tests one way to use weighted token and short-sequence features. The LSTM and CNN supply stronger sequence baselines using Dutch word embeddings. RobBERT tests a pretrained contextual approach. An architecture that scores well on headlines and proverbs demonstrates that it can learn useful distinctions under those conditions. Testing it against edited jokes indicates how much success it can retain once the other class shares more features with the originals.

Results with one text as input

The authors characterize the Naive Bayes baseline as doing no better than random on the three single-text comparisons. They find this surprising given prior use of that kind of classifier for English humor detection. They also note a difference in the way it was used. Earlier work frequently gave classifiers specially constructed features, while their own baseline uses weighted tokens and short sequences. The result establishes how the chosen feature representation fares on these Dutch comparisons. Another feature design would be a separate experiment.

According to the paper, the recurrent and convolutional systems correctly identify about 94% of examples in the easier single-text comparisons against news and proverbs. These systems produce far weaker distinctions against dynamic-template edits. The paper characterizes both as failing to reliably separate those edits from the originals. They can make effective use of Dutch embeddings and sequence information when the classes come from different sources. Under the closer comparison, the features available through those representations are much less effective in the tested systems.

RobBERT's held-out test accuracy on jokes versus news headlines is 98.8%. It reaches 99.6% in the corresponding comparison with proverbs. With dynamic-template edits as the negative class, its single-text held-out accuracy is 89.2%. Each score comes from the run selected for its particular task. The figures show how a detector built with the same underlying architecture fares as the task changes.

RobBERT held-out accuracy on Dutch jokes by negative source

Accuracy is lowest when the negative texts are edited versions of jokes.

RobBERT held-out accuracy on Dutch jokes by negative sourceNews headlines: 98.8News headlines98.8Proverbs (this paper): 99.6Proverbs (this paper)99.6Dynamic-template edits: 89.2Dynamic-template edits89.2
The numbers
System or settingaccuracy %
News headlines98.8
Proverbs (this paper)99.6
Dynamic-template edits89.2

The generated condition distinguishes the neural systems especially clearly. The recurrent and convolutional approaches can give strong results on the comparisons with independent sources and then struggle when faced with texts drawn from the joke vocabulary and shaped like jokes. RobBERT also loses accuracy on the harder test and retains substantial ability to separate the classes. Its result shows that the edited and original examples provide a usable distinction even when the negative class has been made to resemble the positive one.

The authors connect that finding to the ability of a pretrained contextual system to notice whether words fit together. The hypothesis is well aligned with the intervention. Moving words from different joke contexts into a single text can create incongruous propositions or cut the connection between a setup and answer. A detector sensitive to these effects could perform better than one that relies mainly on features distributed differently across sources. The measured accuracies establish the systems' performance on the constructed tasks. The paper also investigates how plausible the coherence explanation is through individual mistakes and a change in the source of test inputs.

The two easier conditions matter for interpreting the failure of the older neural approaches on edits. They show these systems succeeding at a related classification task with the same kind of positive text. Their difficulty emerges when the negative class becomes a closer imitation. This is evidence about the sensitivity of the benchmark to how negatives are selected. It is also a reason to read a high score in light of the actual sources from which the examples and labels came.

What validation adds to the test results

Trying several configurations can reveal whether a strong run is typical of a system under the chosen search procedure. The paper presents estimated maximum validation accuracy by number of hyper-parameter trials. A comparison at the same trial count asks what is attainable when each approach has the same number of opportunities to discover a favorable configuration. The estimates use the observed random runs to examine the performance available at different points in that search.

For the news and proverb settings, the authors describe RobBERT as consistently achieving around 99% validation accuracy. The LSTM and CNN sit somewhat below it in those comparisons. The paper also finds greater variability for the LSTM than for the CNN or RobBERT across the assignments tried. The LSTM result can therefore depend more strongly on which settings are sampled. In this part of the study, performance reflects both what a configuration can do and how reliably a search turns up a good one.

The validation and held-out test figures answer related questions. Validation is where the authors compare runs and choose among them. The estimate by trial count gives a view of the search process. The held-out figures come from evaluating the chosen runs on reserved examples. The value around 99% identifies the level described for RobBERT on validation in the easier settings. The values in the chart identify its final single-text test accuracies for the respective negative collections.

Results with both versions in view

In the pairwise experiment, the recurrent system remains unable to distinguish the originals reliably from the edits. The convolutional system gains a little compared with its single-text dynamic-template result. RobBERT does reasonably well in the paired task, but its accuracy is lower than on the single-text task with generated negatives. The directions of change matter because a paired input offers a direct comparison that could in principle help reveal what an edit has disrupted.

For the LSTM and CNN, the final decision uses separately processed representations of the two versions. The LSTM result shows that the representations provided by that architecture are still insufficient to make the distinction reliably. The small CNN improvement indicates some benefit under its paired arrangement, with the generated task remaining difficult. The result for RobBERT shows that its use of a shared input can bring a cost even when a second text offers relevant evidence.

The authors point to truncation as a likely explanation for RobBERT's decline. Truncation occurs when some of the text has to be omitted to fit the input length limit. If both versions have to fit together, less space is available to accommodate each of them than when it is supplied alone. Losing words can matter if the missing part contains the answer or a detail that makes the answer intelligible. The accuracy comparison measures performance under the chosen paired arrangement. How much of the decline is attributable to removed text remains a question about that implementation.

The results give a concrete reason to distinguish the value of a comparison text from the way it is supplied. An original can provide a valuable reference for reading its edit. If supplying the reference changes how much of the original or the edit can be seen, the observed score reflects both effects. The comparison in this paper is between complete experimental setups for making a decision, with different representations of the information available to the detector.

What the ablations show

The paper reports no component-removal ablation. Its analyses instead vary the source of negatives and the arrangement of inputs, examine validation performance across training runs, inspect mistaken predictions, and test the generated-negative classifier on unfamiliar material. These comparisons help establish where the advantage arises and which accounts of it remain plausible.

Change the source of the negative class

The main comparison varies the origin of the negatives while keeping collected jokes as the positive material and asking for a single-text decision. The newspaper and proverb sources give the classifiers access to differences in vocabulary, length, and structure. Generating the negatives from jokes reduces the usefulness of those differences together. The marked difficulty of the dynamic-template task for the recurrent and convolutional systems is consistent with the authors' suggestion that these systems had relied on vocabulary or text length in the easier settings.

Several properties change at once. The edited texts have a close structural relationship with the originals and use words selected from the same broad inventory. They can also exhibit unfamiliar combinations of words or abrupt changes in what the text is about. The comparison measures the effect of using the generated examples as a package. It supplies no separate measurement of the benefit of matching grammatical categories or of the contribution made by changing low-frequency words.

RobBERT's performance shows that some evidence for identifying the original is still accessible under this package of changes. The authors suggest that the way the words fit together is important. The experiment compares complete systems, so the stronger result can reflect the combination of contextual representations, prior training, and the procedure used to adapt the classifier. A difference between architectures tested in full is evidence about those implementations. It leaves the relative contribution of their ingredients open.

Inspect edits that still look positive

The paper examines examples that RobBERT calls jokes even though the dynamic-template procedure produced them. These are false positives with respect to the assigned labels. The authors find many cases among them where the amount of replacement is limited or the text remains coherent. An edit can remove an important word, but it can also change a detail that has little effect on the reading that supports the joke.

The authors illustrate this with the question whose answer connects Mars and Twix through a reference to a brother. The edited text changes Bruno to Bill. The relationship between the names that supplies some of the humor is still available. The name substitution is enough to place the result in the generated class, while its content gives a detector a possible reason to treat it as a joke. The example makes the label issue specific: the classification error is well defined by the benchmark, and the authors themselves see a degree of humor in the edited text.

This is a different kind of difficulty from an edit that destroys the original reading while retaining a convincing surface form. In that case success depends on noticing what fails to fit. In an edit that preserves the humor, a detector oriented towards the intended quality can have reasons to give the label the test counts as an error. The case inspection identifies both the importance of what was changed and the possibility of disagreement with the assigned category. The paper gives qualitative observations about errors. It provides no estimate of how common retained humor is across the full generated collection.

The Kermit and Mars examples also show why the amount of visible editing can be an incomplete guide to how much a text changes. What matters to the joke can depend on a particular relationship between words. A change close to that relationship can weaken it, while an edit elsewhere can leave it available. The frequency rule provides a tractable way to find candidate positions, and the examples show the variation in effect that can follow from using that proxy.

Apply the same detector to headlines and proverbs

The authors take RobBERT after fine-tuning it for the single-text comparison between jokes and dynamic-template edits and send it both independent negative collections. This is a test outside that classifier's training distinction. It receives ordinary headlines and proverbs after learning to distinguish collected jokes from edited versions. In this probe, the authors look at how frequently the classifier gives the positive label under that change of input source.

It assigns joke labels to 93.23% of the news collection and to 73% of the proverb collection. These percentages are rates of positive predictions across the respective collections in the probe. The news and proverb test accuracies reported earlier are for separate classifiers adapted to reject texts from those sources. The difference in training conditions makes the probe informative. The strong headline result shows that RobBERT can learn a boundary using headlines as negatives, while the probe shows where headlines tend to fall under a boundary learned from edits.

The authors propose topical or semantic coherence as an explanation, especially for relatively short strings. An ordinary headline can describe a situation whose words fit together in a familiar way. A proverb can offer a readable, connected thought. Both can exhibit the coherence that a classifier may have found more frequently among original jokes than among edited ones. If that property makes the joke label more attractive to the classifier, coherent writing from a different source can be accepted even when it lacks the setup and revised interpretation used to motivate the study.

The probe measures predictions after a change of domain. It provides indirect evidence about the reasons for those predictions. Other properties of the collections may also affect the output, and the paper does not vary coherence independently within them. The strength of the observation is that it shows an actual limit on how the fitted decision transfers. The mechanism is an interpretation to be weighed alongside the design of the edits and the false positives that the authors inspected.

Compare input formats and trial counts

The single and paired dynamic-template experiments share the idea of distinguishing originals from edits, with the pair giving the detector access to a related version in the same decision. For the CNN and LSTM, the adaptation introduces a way to combine separately processed representations. For RobBERT, the extra text shares the original's input space. A change in score reflects the new information and the way the architecture receives it. These comparisons offer evidence about particular realizations of pairwise detection and leave the benefit of seeing a fully preserved counterpart unresolved.

The validation analysis varies how many attempts are available in the search for training settings and considers the best accuracy attainable on validation. It shows a difference in robustness to the sampled settings, especially between the LSTM and the two other neural approaches. This helps put the selected test results in context. A system with substantial variability can depend on a fortunate search assignment, while consistent performance across the sampled settings makes the high validation region easier to reach in that experiment. The analysis is about tuning behavior under the search used in the paper.

Limitations

Limits the authors identify

The authors explicitly identify grammar as a possible source of easy evidence in the generated data. A substitute can have the same grammatical tag as the original word and still fit the sentence poorly. A broad category puts a constraint on the replacement. It does not specify everything about the construction, such as what kind of phrase can follow a particular verb. A local grammatical problem can be visible before a reader has considered how the ending relates to the setup.

This matters because the test is meant to make it harder to exploit properties shared by texts from a particular source. An error found mostly in the generated class creates another source clue. A classifier may distinguish a natural construction from an awkward substitution and succeed for reasons that are only loosely connected to humor. The authors propose improving the construction of joke-like negatives so that grammatical errors provide fewer of these opportunities. Their reported experiments leave the size of this effect undetermined.

The authors also point to a challenge involving word form. Humor can depend on a reader noticing that two expressions resemble one another. Depending on how a detector receives the text, some similarities between their letters can be hard to recover from its units. A contextual representation can help use a sentence to choose a plausible meaning for a word and still provide limited evidence about how two strings look or sound alike. The authors raise this as a possible weakness of the approach. The experiments report aggregate classification performance, with no separate result for examples whose effect depends on that kind of wordplay.

The problem of understanding humor recurs here at the level of human expectations. In the theoretical account used to motivate the paper, the reader has to be able to establish the initial interpretation and discover the later one. The scope of the experiment is a supervised decision with labels supplied by collecting texts and editing them. It does not require the system to identify either interpretation. The authors place that distinction in the broader difficulty of accounting for the linguistic and everyday knowledge that people bring to jokes.

Truncation is another limitation the authors raise, specifically for the way RobBERT handles paired texts. The combined input can require more text to be discarded than an individual example. The paper offers this as the likely reason for the lower paired score. The explanation would be stronger with a comparison organized around intact and shortened inputs or evidence about which parts were removed. The observed score measures the paired implementation as used, and the cause of the decline is an interpretation of that outcome.

Limits that follow from the experimental setup

The central label in the generated task has a precise meaning about provenance. A positive comes from the collected jokes, and a negative is an edit produced by the algorithm. That is enough to specify success for a classifier and to score predictions consistently. The intended psychological distinction is less straightforward. An edit may preserve an original joke's effect, or an absurd substitution may become funny for a different reason. The observed false positive involving Mars and Twix gives a concrete instance in which the content and the label can point in different directions.

The same distinction carries through to the comparison of two versions. A pair gives the classifier a defined choice because the original can be identified independently of anyone's opinion. Calling that choice a measure of which text is funnier would require judgments from readers. The paper reports no such set of judgments for the pairs. Its results support conclusions about identifying original jokes under this editing procedure. The relation between that success and a human preference among near-identical phrasings remains unmeasured.

Coherence is also an incomplete proxy for the underlying property. The paper's theory gives coherence a role in the resolution of the incongruity, since the alternative reading must be available in the text. Ordinary writing can hang together without setting up the relevant shift in interpretation. The high positive prediction rates on headlines and proverbs show how easily a classifier fitted to the dynamic-template contrast can give labels to texts with a quite different function. The coherence explanation is consistent with those predictions. The study has no direct coherence assessments that would isolate the property and show how frequently it drives a decision.

Even in the generated comparison, matching the vocabulary in broad terms allows distributional differences within it. Targeting words according to frequency can change which words are likely to survive in an edit. Choosing donors from other contexts can change which words are likely to occur together. A classifier may be able to detect recurring traces of the procedure at that level. The fact that the source lexicon is shared reduces the usefulness of some vocabulary clues and leaves room for others tied to the placement or pairing of words.

Similarly, preserving global form is a control on some aspects of structure. An edited question followed by an answer will still have that arrangement. The size of the local difference, the plausibility of where it occurs, and its relationship to an ending can vary across items. The difficulty of the test is therefore partly a property of the editing procedure and its settings. The paper evaluates the generator with a fixed recipe. Accuracy on its outputs does not give a measured response to softer edits, more extensive edits, or different ways of constructing close alternatives.

The architecture comparison also leaves several explanatory factors linked. RobBERT brings contextual processing and the benefit of its prior training on Dutch text. The LSTM and CNN begin with Dutch embeddings and use different ways to process a sequence. A comparison of finished systems captures their combined performance. It cannot isolate a single design choice as the cause of the advantage without varying that choice under more closely matched conditions. The proposed role of semantic coherence is supported through behavior observed in the study, with the basis of individual decisions still open.

The search analysis controls effort in terms of the number of trials. A trial count describes opportunities to try a configuration, and its meaning depends on what is available to sample. If one search space contains more favorable assignments than another, the systems can differ in how quickly they reach a useful setting. A run of one architecture can also entail different effort from a run of another. The estimates in the paper characterize robustness and attainable validation accuracy in the authors' search. They do not establish comparable costs by other measures of training effort.

The datasets finally determine the reach of the finding. The positive items come from particular Dutch websites, the unrelated negatives are Dutch headlines and proverbs, and the generated alternatives use words selected from the collected joke material. The authors regard the procedure as transferable to other languages where relevant text and grammatical information are available. The reported experiments establish results in Dutch for these written collections. They leave open how well the approach works with other joke sources, other languages, or humor that depends on properties outside the written input.

What came after

There is no documented follow-up study to describe here. The paper itself sets out future directions for improving the negative examples and using a comparator to help generate jokes. These are proposals that follow from the experiments. Their outcomes are outside the results reported in the paper.

The first direction is to make stronger imitations. The goal is an edited text that preserves the fluency and look of a genuine joke closely enough to make local grammatical mistakes less useful as clues. The observation about retained humor shows the delicacy of that goal. A close, fluent edit can still preserve the particular relationship that made the original work. A good comparison for detection would retain the ordinary linguistic fit of the text while making it harder to recover a satisfying connection between setup and ending. The paper identifies generation quality as an unresolved part of the evaluation problem.

Another direction is to use the detector within a generate-and-test procedure. A generator would produce candidate versions. A comparator could then choose among them, making the paired setup useful as a selection mechanism. The authors propose that different capabilities of RobBERT could play the two roles. Its ability to predict a missing word could supply a candidate substitution, while its trained comparison output could decide which candidate to retain. In the proposed genetic algorithm, substitutions would act as mutations and pairwise decisions would determine which variants advance.

The authors also imagine a collaborative use in which a comparator helps a person revise a joke. A possible change is to move a potential punchline word later, altering when a reader encounters the clue that makes another interpretation available. That proposal returns to the question about order that opened the study. The experiments demonstrate a way to compare collected jokes with nearby automatic edits. Selecting revisions that readers actually find funnier would require evidence about their responses to those versions.

Cite

Cite as Thomas Winters and Pieter Delobelle. 2020. Dutch Humor Detection by Generating Negative Examples. arXiv:2010.13652.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.2010.13652 · arXiv 2010.13652

@misc{winters2020dutch,
  title = {{Dutch Humor Detection by Generating Negative Examples}},
  author = {Thomas Winters and Pieter Delobelle},
  year = {2020},
  doi = {10.48550/arxiv.2010.13652},
  eprint = {2010.13652},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2010.13652}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/winters-2020-dutch-humor-detection-generating-negative/

References

37 references, from the paper's own bibliography.

  1. Annamoradnejad, I.: Colbert: Using bert sentence embedding for humor detection. arXiv preprint arXiv:2004.12765 (2020) OpenAlex ↗ · Scholar ↗
  2. van den Beukel, S., Aroyo, L.: Homonym detection for humor recognition in short text. In: Proceedings of the 9th Workshop on Computational Approaches to Subjectivity, Sentiment and Social Media Analysis. pp. 286–291 (2018) our card
  3. Branwen, G.: Gpt-3 creative fiction (2020) OpenAlex ↗ · Scholar ↗
  4. Brown, T.B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., et al.: Language models are few-shot learners. arXiv preprint arXiv:2005.14165 (2020) our card
  5. Caron, J.E.: From ethology to aesthetics: Evolution as a theoretical paradigm for research on laughter, humor, and other comic phenomena. Humor 15(3), 245–281 (2002) OpenAlex ↗ · Scholar ↗
  6. Cattle, A., Ma, X.: Recognizing humour using word associations and humour anchor extraction. In: Proceedings of the 27th International Conference on Computational Linguistics. pp. 1849–1858 (2018) our card
  7. Chen, P.Y., Soo, V.W.: Humor recognition using deep learning. In: Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers). pp. 113–117 (2018) OpenAlex ↗ · Scholar ↗
  8. Deckers, L., Buttram, R.T.: Humor as a response to incongruities within or between schemata. Humor: International Journal of Humor Research (1990) OpenAlex ↗ · Scholar ↗
  9. Delobelle, P., Cunha, M., Massip Cano, E., Peperkamp, J., Berendt, B.: Computational ad hominem detection. In: Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics: Student Research Workshop. pp. 203–209. Association for Computational Linguistics, Florence, Italy (Jul 2019) OpenAlex ↗ · Scholar ↗
  10. Delobelle, P., Winters, T., Berendt, B.: RobBERT: a Dutch RoBERTa-based language model. arXiv preprint arXiv:2001.06286 (2020) our card
  11. Devlin, J., Chang, M.W., Lee, K., Toutanova, K.: BERT: Pre-training of deep bidirectional transformers for language understanding. In: Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers). pp. 4171–4186. Association for Computational Linguistics, Minneapolis, Minnesota (Jun 2019) our card
  12. Dodge, J., Gururangan, S., Card, D., Schwartz, R., Smith, N.A.: Show your work: Improved reporting of experimental results. In: Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP). pp. 2185–2194. Association for Computational Linguistics, Hong Kong, China (Nov 2019) OpenAlex ↗ · Scholar ↗
  13. Fürnkranz, J., Hüllermeier, E.: Pairwise preference learning and ranking. In: European conference on machine learning. pp. 145–156. Springer (2003) OpenAlex ↗ · Scholar ↗
  14. Gibson, J.: A good sense of humor is a sign of psychological health. quartz (2016) OpenAlex ↗ · Scholar ↗
  15. Hochreiter, S., Schmidhuber, J.: Long short-term memory. Neural Computation 9(8), 1735–1780 (1997) OpenAlex ↗ · Scholar ↗
  16. Hossain, N., Krumm, J., Gamon, M.: " president vows to cut< taxes> hair": Dataset and analysis of creative text editing for humorous headlines. arXiv preprint arXiv:1906.00274 (2019) OpenAlex ↗ · Scholar ↗
  17. Kiddon, C., Brun, Y.: That’s what she said: double entendre identification. In: Proceedings of the 49th annual meeting of the association for computational linguistics: Human language technologies. pp. 89–94 (2011) OpenAlex ↗ · Scholar ↗
  18. Kim, Y.: Convolutional neural networks for sentence classification. In: Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP). pp. 1746–1751. Association for Computational Linguistics, Doha, Qatar (Oct 2014) our card
  19. Liu, Y., Ott, M., Goyal, N., Du, J., Joshi, M., Chen, D., Levy, O., Lewis, M., Zettlemoyer, L., Stoyanov, V.: RoBERTa: A Robustly Optimized BERT Pretraining Approach. arXiv:1907.11692 [cs] (Jul 2019) our card
  20. Mihalcea, R., Strapparava, C.: Making computers laugh: Investigations in automatic humor recognition. In: Proceedings of the Conference on Human Language Technology and Empirical Methods in Natural Language Processing. pp. 531–538. Association for Computational Linguistics (2005) our card
  21. Mikolov, T., Chen, K., Corrado, G., Dean, J.: Efficient estimation of word representations in vector space. arXiv preprint arXiv:1301.3781 (2013) our card
  22. Ortiz Suárez, P.J., Sagot, B., Romary, L.: Asynchronous Pipeline for Processing Huge Corpora on Medium to Low Resource Infrastructures. In: 7th Workshop on the Challenges in the Management of Large Corpora (CMLC-7). Cardiff, United Kingdom (Jul 2019) OpenAlex ↗ · Scholar ↗
  23. Radford, A., Wu, J., Child, R., Luan, D., Amodei, D., Sutskever, I.: Language models are unsupervised multitask learners. OpenAI Blog 1(8) (2019) OpenAlex ↗ · Scholar ↗
  24. Ritchie, G.: Developing the incongruity-resolution theory. Informatics Report Series (10 1999) OpenAlex ↗ · Scholar ↗
  25. Suls, J.M.: A two-stage model for the appreciation of jokes and cartoons: An information-processing analysis. The psychology of humor: Theoretical perspectives and empirical issues 1, 81–100 (1972) OpenAlex ↗ · Scholar ↗
  26. Taylor, J.M., Mazlack, L.J.: Computationally recognizing wordplay in jokes. In: Proceedings of the Annual Meeting of the Cognitive Science Society. vol. 26 (2004) OpenAlex ↗ · Scholar ↗
  27. Tulkens, S., Emmery, C., Daelemans, W.: Evaluating unsupervised dutch word embeddings as a linguistic resource. In: Chair), N.C.C., Choukri, K., Declerck, T., Grobelnik, M., Maegaard, B., Mariani, J., Moreno, A., Odijk, J., Piperidis, S. (eds.) Proceedings of the Tenth International Conference on Language Resources and Evaluation (LREC 2016). European Language Resources Association (ELRA), Paris, France (may 2016) our card
  28. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, L.u., Polosukhin, I.: Attention is all you need. In: Guyon, I., Luxburg, U.V., Bengio, S., Wallach, H., Fergus, R., Vishwanathan, S., Garnett, R. (eds.) Advances in Neural Information Processing Systems 30, pp. 5998–6008. Curran Associates, Inc. (2017) our card
  29. Weller, O., Seppi, K.: Humor detection: A transformer gets the last laugh. arXiv preprint arXiv:1909.00252 (2019) our card
  30. West, R., Horvitz, E.: Reverse-engineering satire, or “paper on computational humor accepted despite making serious advances”. In: Proceedings of the AAAI Conference on Artificial Intelligence. vol. 33, pp. 7265–7272 (2019) OpenAlex ↗ · Scholar ↗
  31. Winters, T.: Generating philosophical statements using interpolated markov models and dynamic templates. In: 31st European Summer School in Logic, Language and Information Student Session Proceedings. pp. 181–189. Riga, Latvia, ESSLLI (Aug 2019) OpenAlex ↗ · Scholar ↗
  32. Winters, T.: Generating dutch punning riddles about current affairs. 29th Meeting of Computational Linguistics in the Netherlands (CLIN 2019): Book of Abstracts (Jan 2019) OpenAlex ↗ · Scholar ↗
  33. Winters, T.: Modelling mutually interactive fictional character conversational agents. In: Proceedings of the 31st Benelux Conference on Artificial Intelligence (BNAIC 2019) and the 28th Belgian Dutch Conference on Machine Learning (Benelearn 2019). vol. 2491. CEUR-WS (2019) OpenAlex ↗ · Scholar ↗
  34. Winters, T., De Raedt, L.: Discovering textual structures: Generative grammar induction using template trees. Proceedings of the 11th International Conference on Computational Creativity pp. 177–180 (2020) OpenAlex ↗ · Scholar ↗
  35. Winters, T., Nys, V., De Schreye, D.: Towards a general framework for humor generation from rated examples. Proceedings of the 10th International Conference on Computational Creativity pp. 274–281 (2019) OpenAlex ↗ · Scholar ↗
  36. Yang, D., Lavie, A., Dyer, C., Hovy, E.: Humor recognition and humor anchor extraction. In: Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing. pp. 2367–2376 (2015) our card
  37. Yeh, C.L., Loni, B., Hendriks, M., Reinhardt, H., Schuth, A.: Dpgmedia2019: A dutch news dataset for partisanship detection. arXiv preprint arXiv:1908.02322 (2019) OpenAlex ↗ · Scholar ↗