An Ensemble of Humour, Sarcasm, and Hate Speechfor Sentiment Classification in Online Reviews
Paper · 2019 · Rohan Badlani, Nishit Asnani and Manan Rai
Summary
A restaurant review can sound like a recommendation until the writer explains what a visit will actually involve. If the promised experience is being shouted at while buying pastries, the wording of an invitation carries a complaint. That kind of reversal makes sentiment analysis difficult. A system that has learned to identify favourable language may still need to recognise what a writer is doing with it. The authors ask whether training a system to recognise sarcasm, humour, or offensive language can help it judge whether a Yelp review is positive or negative.
The paper tests the idea in two ways. In an initial experiment, it adds predictions from a Reddit sarcasm detector to a BERT sentiment classifier. The reported Yelp test accuracy is 95.22% with the added predictions and 95.13% for BERT Base alone. The main experiment takes a different approach. The authors train separate convolutional networks on sentiment, sarcasm, humour, and offensive language, using the same architecture for each task. For a new review, each network supplies a vector of internal features that retains more detail than its final yes-or-no decision. A separate sentiment classifier learns to use those vectors together.
On the held-out Yelp set of 36,614 reviews, the classifier using all four feature sources reaches 96.18% accuracy in the comparison of feature combinations, while the sentiment-only classifier reaches 95.95%. The full combination also comes out ahead in the other reported runs on the same test set. The contribution of a feature source depends on its companions. Sarcasm improves on sentiment alone in the combination comparison. Humour and offensive-language features yield lower accuracy when each is added on its own, yet both appear in the highest-scoring combination.
The authors illustrate the gains with reviews whose complaints take the form of mock praise, exaggerated comparisons, or hostility. They find few clear examples in which humour accounts for a correction. Other examples expose difficulties with an elongated word carrying the main judgment and with reviews that change direction partway through. The results show that features learned on related tasks can improve binary sentiment classification in this Yelp setup. They leave open which cues the combined classifier uses on an individual review and how well the method would transfer to other collections or finer ratings.
Deep dive: An Ensemble of Humour, Sarcasm, and Hate Speechfor Sentiment Classification in Online Reviews
The paper tests whether features learned for sarcasm, humour, and offensive language improve positive and negative sentiment prediction on Yelp. · about 33 minutes to read
The problem and its context
When wording and judgment point in different directions
The paper studies a familiar form of text classification. Given a review, a classifier has to decide which of the available categories applies. The categories here are positive and negative sentiment. The practical motivation in the paper is that reviews contain opinions about products and services that organisations want to understand. The linguistic motivation is that reviewers can communicate a judgment through the way they describe an experience, including when the words they choose seem favourable in isolation.
A recommendation is a useful example because its shape is easy to recognise. It frequently tells readers where to go if they want something. In the pastries example that the authors discuss, the reviewer uses that shape to advertise mistreatment by the staff. To interpret the recommendation, a reader has to connect the invitation with the undesirable experience it promises. A classifier rewarded only for getting the polarity label right could learn that connection from reviews with similar wording. The authors ask whether it can also acquire relevant information by training on a separate collection explicitly labelled for sarcasm.
The tasks differ in what their labels ask a reader to decide. Sentiment is the evaluation the review conveys. Sarcasm may change how a seemingly favourable passage should be understood. Humour is about whether the text is funny under the criterion used to label it, and a joke can serve a favourable or an unfavourable judgment. Offensive wording can be evidence of dissatisfaction in a review. The paper uses “hate speech” broadly for this last source of information in its review experiments. That working usage matters because the examples of hostility toward service staff are much broader than the ordinary distinction between offensive language and hate speech that the paper itself acknowledges.
The authors’ premise is that a classifier trained on sentiment is rewarded for whichever textual features help it make sentiment decisions. It receives no separate reward for distinguishing ridicule from praise, or for recognising offensive wording as a category of its own. The obvious training signal for those distinctions is available in collections assembled for other tasks. The first hypothesis is that representations or predictions from classifiers trained on those collections can improve sentiment classification. The second is that a single architectural design can be trained separately on the different tasks and produce representations worth reusing. The common design is a convenience and a research question in its own right. It gives each task a comparable route from text to a vector, in spite of differences in how the task labels were obtained.
What earlier sarcasm research made available
The authors trace work on sarcasm through self-labelled material from Twitter and Reddit. In their account of Identifying Sarcasm in Twitter, researchers looked at both lexical features, which concern the words used, and pragmatic features, which concern how an utterance is used. The authors say the pragmatic features were more informative in that study. Subsequent work added context to the text under examination. This strand of research makes the input to a sarcasm detector an important design choice. A post can be examined as a string of words, as a contribution to a conversation, or as something written by a person whose other comments may help interpret it.
CASCADE represents that broader approach. It uses the current comment together with information about the writer and the discussion. The paper describes the writer’s representation as coming from that person’s comments in other threads. It describes the thread representation as coming from other participants’ comments in the same thread. These inputs give the system sources of information beyond the wording of the comment it has to label. The authors also discuss Representing Social Media Users for Sarcasm Detection, which they characterise as reaching similar performance with a simpler use of user representations and without the same forum context.
Those earlier systems help explain the choice Badlani and colleagues face. They want to apply a sarcasm detector to individual Yelp reviews, using text available for sentiment classification. Some of the inputs used by CASCADE are unavailable in their setup. Their initial experiment therefore uses a version with the comment text and no user or thread representations. The larger question becomes how much useful information a detector can transfer through the words of a review alone. A contextual system's success on Reddit establishes the value of a broader input in that setting. The transfer experiment uses a restricted input and asks a different question.
The paper also identifies a precedent for combining features trained to recognise different aspects of language. A Deeper Look into Sarcastic Tweets uses information about sentiment, emotion, and personality to help detect sarcasm. Badlani and colleagues take the exchange in another direction by asking whether sarcasm-related information can improve sentiment decisions. They also keep the features in their own experiments tied to the review text. Personality and author history would raise separate questions about how to represent a reviewer and what context would be available when the classifier is used.
Humour, offensive language, and sentiment
The earlier humour work described in the paper draws on collections of puns, one-liners, and other short jokes. The authors mention a system that processes text with a convolutional network and passes the resulting information through a highway network. They also point to earlier use of convolutional sentence classification with Yelp's funny votes. These settings differ in what an example represents. A joke collection gives the classifier material presented as humour. A Yelp review is written about an experience and can receive a funny vote for the way it tells the story. For the paper’s downstream task, the Yelp source lets the humour branch learn from reviews, even though the labels ask something other than whether an experience was good or bad.
For offensive language, the authors describe a field in which labelling boundaries are consequential. Automated Hate Speech Detection and the Problem of Offensive Language provides the Twitter data used in their experiments. The paper reports that the earlier study compared several classification approaches using 5-fold cross-validation, which evaluates a system across partitions that take turns serving as held-out data. Logistic regression and a linear support vector machine did well in that comparison. The authors also discuss neural approaches, including the convolutional work associated with the Hate Speech Dataset from a White Supremacy Forum. Their use of offensive language as a possible cue about a review follows from the practical sentiment question. A reviewer’s verbal aggression can reveal a negative evaluation even if the feature is too broad to identify hate speech in other settings.
For sentiment, the paper points to online review collections as a source of real consumer commentary and discusses both convolutional and transformer approaches. Convolutional Neural Networks for Sentence Classification supplies a direct architectural precedent for detecting useful phrases and collecting the strongest responses across a sentence. The paper also situates the Yelp benchmark in work on Character-level Convolutional Networks for Text Classification. Its own main architecture works with sequences of words. Those sequences are represented as trainable vectors before the convolution is applied.
The paper describes BERT and XLNet as strong approaches to polarity classification based on the transformer architecture introduced in Attention Is All You Need. The motivation for examining their failures is that accurate aggregate performance still leaves individual reviews whose wording is difficult to interpret. Badlani and colleagues investigate whether explicit training on other kinds of signals is worthwhile in that setting. Their convolutional experiment further asks whether useful transfer requires a different architecture for every kind of signal.
The method, step by step
The paper first makes a small change to a sentiment classifier, then builds a system in which learned features are the main object of transfer. In the first experiment, the sentiment classifier receives the output of a sarcasm detector along with its usual review representation. The output says whether or how confidently the other classifier detects sarcasm. In the second experiment, the sentiment classifier receives features from inside several networks, each previously trained on its own task. These features can express different patterns within the same category. Reviews containing a sarcastic invitation and reviews containing an exaggerated comparison might both be judged sarcastic, for instance, while eliciting different responses inside the sarcasm network.
Adding a prediction to BERT Base
The initial test uses BERT Base for sentiment on Yelp. For sarcasm, the authors use their text-only adaptation of CASCADE. The intended operation is simple. The same review goes to both systems. BERT produces a representation for the review, and the sarcasm detector makes a prediction about its language. The authors concatenate the extra prediction with the BERT representation. Concatenation appends features as new entries in the input to the sentiment decision, so the classifier can learn that an estimated sign of sarcasm matters in combination with particular wording.
The paper also describes an existing humour detector using a support vector machine with bag-of-words features, and a logistic regression detector for offensive language. A bag of words represents a text through the words it contains, without encoding their order in the feature description given here. A support vector machine learns a boundary between categories from those features. Logistic regression likewise provides a score for class membership from its inputs. The paper’s method discussion presents the auxiliary detectors as sources of predicted probabilities. Its numerical account of the early Yelp experiment explicitly identifies the augmentation as BERT plus the sarcasm classifier. That result belongs to the sarcasm test. The evidence about combining all the tasks comes from the convolutional experiments.
The early table uses P for a predicted probability and L for a predicted label. A probability can distinguish a borderline case from a strong prediction. A label communicates the side of the decision boundary on which the review falls. The table groups the augmented setting under a single result, so the article can describe the two forms of input while the measured comparison remains between unaugmented BERT Base and the reported augmented entry. The authors use BERT Base as implemented in PyTorch and report running training for three epochs with batches of 32 and a 2e-5 learning rate. An epoch is a pass through the training data, the learning rate controls the size of updates, and the batch size specifies how many examples are processed together for an update.
Training a network for each kind of label
The convolutional experiment starts with independently trained branches. Each branch sees the examples and labels for one task. The sentiment branch learns from positive and negative Yelp reviews. The sarcasm branch learns from Reddit comments, the humour branch from Yelp reviews classified using funny votes, and the offensive-language branch from labelled tweets. All of them solve a binary problem, but the meaning of a positive label varies. A positive humour label means that the review qualifies as funny by the paper’s rule. A positive sentiment label means the review belongs to the favourable category. When the branches are brought together, Yelp polarity supplies the training target for the final classifier.
An architecture is the specification of how inputs are transformed. The authors reuse that specification at the branch level. The branches are trained separately, so each can learn its own word representations and its own convolutional filters. A position in a sentiment vector and the corresponding position in a sarcasm vector need not describe the same pattern. This independence matters for how the final classifier is built. It receives the branches as separate blocks of features, where it can associate a pattern with the task that produced it. A shared design gives those blocks a common size, and separate training gives them distinct sources of supervision.
From task labels to a Yelp sentiment decision
The steps in order.
The flow includes two uses of training labels. In branch training, labels teach each network which features help with its own assignment. In the final training stage, sentiment labels teach the classifier how to interpret the preferred combination of such features. The held-out review goes through the fitted sequence of operations and receives a positive-sentiment score. This distinction explains why a weakly sarcastic review can still receive a confident negative decision, or why a strong sarcasm signal need only matter in conjunction with other information. The final classifier learns a sentiment mapping from a batch of review features rather than applying a hand-written rule to a detector's prediction.
Turning a review into a vector
The mathematical description begins with a sentence containing a specified number of words. The experiment applies the encoder to Yelp review inputs. A word embedding represents a word by a vector of numbers, and in this architecture those numbers are trainable. Stacking the vectors in the order of the words gives an input matrix.
d × 128
Here d is the number of words in the input sentence s. The multiplication sign describes the dimensions of the matrix, with d rows and 128 columns. The 128 columns are the components of each trainable word vector. Keeping the words in order lets a filter respond differently to different sequences involving the same words.
A convolutional filter computes a response for a local window. Its width determines the number of neighbouring words it reads together, and it spans the full word vector at every position in that window. The network learns a collection of filters of each width. Thus even filters with the same shape can learn to respond to different patterns of words or parts of their representations.
n × 128, with n ∈ {3, 4, 5}
Here n is the window width in words. The sign × gives the filter dimensions, and 128 is the number of components per word. The membership sign ∈ means that n takes a value from the set inside the braces. The entries 3, 4, and 5 specify the available widths. The filters look at successive windows of each width, moving by 1 word at a time. The narrowest and widest windows thus have different local spans even when they are applied to the same review.
The output at a given width records each filter’s response at each position where its full window fits. The paper gives the dimensions directly.
(d − n + 1) × f
Here d counts the input words, n is the width in words, and f is the number of filters of that width. Subtracting n and adding 1 gives the number of starting positions for a full window at the reported stride. The × sign separates the position dimension from the filter dimension. A column can be read as the responses of a particular filter as it encounters different portions of the input.
The network then applies max pooling. For each filter it takes the highest response over positions, retaining a single number for that filter. The point of this operation is that a strong cue can contribute to the representation wherever it occurs in the input. A feature can register an exaggerated phrase deep into a review without adding separate features for that phrase near the beginning, middle, or end. The exchange is that the pooled value records the strength of the response and drops its position. Other local patterns may supply information about how a phrase is being used, but the pooled vector has no direct record of which filter reached its maximum first.
Pooling yields a vector for each width. Appending those vectors gives the branch's representation.
3f = 300, with f = 100
Here f is the number of filters per width, 3 counts the widths, and 3f denotes their product. The equality sign indicates that the branch has a 300-dimensional vector when each width uses 100 filters. The network produces such a vector from its own learned weights. The branches can all return 300 values for the same review while reacting to different local patterns.
Combining features and learning the final decision
The authors calculate task-specific vectors for the Yelp reviews used in the final classification stage. They then choose which vectors to concatenate for each comparison. The sentiment-only setting uses features from the sentiment branch. Other settings use those features together with vectors from selected auxiliary branches. Each setting has a separately trained final classifier, so it can learn a mapping appropriate to the features it actually receives. Removing a branch in this experiment changes the training input as well as the input used for prediction.
1 ≤ m ≤ 4
Here m is the number of task encoders selected, and ≤ means less than or equal to. The lower limit, 1, permits a single encoder, and the upper limit, 4, is the full set of available encoders. In the reported combination comparisons, the sentiment encoder is present throughout.
dimension of v = 300 × m
Here v is the concatenated feature vector for the review. The equality sign gives its length, 300 is the length of one task vector, × denotes multiplication, and m is the number of selected encoders. The operation preserves the components from each branch. A pronounced response in the humour branch and a pronounced response in the sarcasm branch appear in separate portions of v, available for the final classifier to use together.
C(v) ∈ [0, 1]
Here C denotes the final sentiment classifier and v is the review's combined feature vector. The parentheses indicate that C takes v as its input. The membership sign ∈ places the output in the closed interval delimited by the brackets, from 0 to 1. The authors interpret the result as the probability of positive sentiment. The classifier uses two fully connected layers, with a hidden size of 50 and a rectified linear activation, or ReLU. A fully connected layer can draw on every component of its input. ReLU passes positive activation values through and sets negative ones to zero, giving the classifier a nonlinear transformation of the concatenated features.
This stage makes the proposal more flexible than combining task decisions by a fixed vote. An auxiliary branch can be informative even when it would assign the same binary label to two reviews. Some of its filters may respond differently, and the sentiment classifier can use that variation with responses from the other branches. Conversely, a feature from the sarcasm branch can be useful without serving as direct evidence of sarcasm for every Yelp example in which it activates. The objective at the combination stage is to predict polarity. It is free to reuse a pattern that helps with that objective, regardless of the most intuitive description of the pattern.
The authors report a convolutional training setup with 100 kernels at each window width, a batch size of 64, a learning rate of 0.001, and a dropout probability of 0.5. A kernel is the learned filter used at successive positions. Dropout suppresses some activations during training, limiting dependence on any particular active component. The paper describes fitting a network on each task, obtaining the vectors for Yelp reviews, then fitting the combined classifiers and evaluating them on the sentiment test set. Several combinations are evaluated as separate training configurations, which is what makes the comparison of feature sources possible.
Experiments and results
What the branches learn from
The target data are Yelp reviews with binary sentiment labels. The authors describe the larger collection as containing about 560,000 reviews. They use 100,000 of them for sentiment training and validation together and 36,614 for testing. Training examples supply the labels used to learn the system’s parameters, while validation examples are available during development. The held-out test reviews supply the accuracy comparisons. The main feature experiment and the repeated comparisons are all about polarity in this Yelp setting, even when the features being compared originated in different collections.
Sarcasm supervision comes from the Self-Annotated Reddit Corpus, referred to as SARC. The authors describe a collection of about 1.3 million comments whose writers supplied a marker for sarcasm. They work with the balanced portion, using 100,000 comments for training and validation together and 20,000 for testing. A balanced set gives comparable representation to the two classes. In this case balance is a property of the experimental data selection. The training task uses the self-annotation as its signal for what sarcastic language looks like.
The humour labels come from Yelp’s funny field. A review qualifies as humorous if its funny score is greater than 2. The paper reports a ratio of 19:1 for non-humorous to humorous reviews before resampling. The authors keep the humorous reviews and add randomly sampled non-humorous reviews to reach a reported ratio of 2:1, with the non-humorous class still more common. They report 40k reviews for humour training and validation together and 8,661 reviews for humour testing. The rule ties the positive class to the votes a review received. A detector trained under that rule learns the distinction supplied by the score threshold.
For offensive-language training, the paper describes the Hatebase Twitter collection as consisting of 28,000 tweets with a binary label indicating offensive content in its task setup. The authors say the class they call hateful initially outnumbers the other class by 16 times. They oversample the non-hateful class by 4x and undersample the hateful class by 2x. Oversampling increases the representation of a class in the working data, while undersampling keeps a smaller portion of another class. The resulting ratio reported for both training and validation together and the test data is 2:1 in favour of the positive class. The paper reports 16,854 tweets for training and validation and 3,521 for testing after this preparation.
These sampling choices change which examples and class proportions the auxiliary networks encounter. Reddit supplies a balanced sarcasm set, Yelp humour training retains more non-humorous than humorous reviews, and the Twitter preparation retains a majority for the positive class as the paper defines it. The common convolutional architecture therefore works with tasks that share an output format while differing in annotation, class composition, and source. The downstream evaluation puts their representations on a common footing by testing their contribution to the same Yelp sentiment task.
How to read the comparison systems and metrics
The paper cites about 98.11% sentiment accuracy for BERT Large, drawing on Unsupervised Data Augmentation. This is a reference point from earlier work. The early experiment uses the smaller BERT Base so that the authors can evaluate the effect of adding sarcasm predictions. Consequently the baseline for this comparison is the authors’ own BERT Base sentiment run. The baseline for the main experiment is different again. It uses the sentiment branch of the convolutional architecture and the downstream sentiment classifier without auxiliary vectors.
The auxiliary detector scores mentioned in the initial methods establish the kinds of systems the authors started from. The original contextual CASCADE system is described as achieving 77% accuracy on the balanced SARC set and 79% on the unbalanced set. Those results include contextual inputs that the adapted detector used in the Yelp experiment lacks. The paper gives 83% humour detection accuracy on Yelp for the existing bag-of-words support vector machine and an F1 score of 0.90 on the Twitter offensive-language dataset for the logistic regression implementation. It leaves the evaluation split unspecified for those latter two quoted scores. F1 combines precision, the share of predicted positives that are correct, with recall, the share of actual positives recovered. Accuracy is the share of all examples assigned the correct label. The auxiliary scores concern their own label sets and implementations. They provide no direct ranking of the CNN branches’ contributions to Yelp polarity.
The main comparisons use Yelp sentiment accuracy. Each review contributes a correct or incorrect decision relative to its sentiment label. This gives a shared endpoint for evaluating the feature combinations. It also means the reported accuracy cannot say how often a system is right on reviews independently identified as sarcastic or funny. The paper uses comparisons of the predictions and individual review examples to address the character of the changes.
The initial sarcasm test
BERT Base alone reaches 95.13% accuracy on the Yelp sentiment test. The augmented BERT Base entry reaches 95.22%. The comparison shows a small improvement when the sentiment classifier receives the additional sarcasm prediction. The paper uses this result to motivate transferring feature vectors that can carry more varied information than a predicted probability or a label. The table provides a single accuracy for the augmented entry. It does not distinguish performance for the probability and label versions numerically.
Yelp sentiment test accuracy for BERT Base and sarcasm augmentation
The reported augmented BERT Base setting has higher accuracy.
The numbers
| System or setting | accuracy % |
|---|---|
| BERT Base | 95.13 |
| BERT Base with sarcasm predictions (this paper) | 95.22 |
In this comparison, the sentiment representation comes from BERT Base and the extra feature comes from the adapted sarcasm detector. The test of the shared convolutional architecture changes how both the sentiment and auxiliary features are produced and how they reach the classifier. The two comparisons provide evidence about augmentation within their respective setups. The paper does not use them as a controlled comparison of probability-and-label transfer against vector transfer with every other component held fixed.
The comparison of learned feature combinations
In the main experiment, every reported combination includes the sentiment vector. The sentiment-only classifier reaches 95.95% accuracy on the Yelp test set. Adding sarcasm gives 96.02%, while adding humour gives 95.93% and adding offensive language gives 95.69%. With sentiment, sarcasm, and humour together, the reported accuracy is 96.06%. The full combination reaches 96.18%. These values come from the comparison of separately trained sentiment classifiers using different subsets of the representations.
Yelp sentiment test accuracy by convolutional feature combination
The full combination scores highest, and sarcasm is the strongest single addition.
The numbers
| System or setting | accuracy % |
|---|---|
| Sentiment | 95.95 |
| Sentiment and sarcasm | 96.02 |
| Sentiment and humour | 95.93 |
| Sentiment and offensive language | 95.69 |
| Sentiment, sarcasm, and humour | 96.06 |
| All four feature sources (this paper) | 96.18 |
The highest accuracy comes from the setting with access to all the task representations, and the effect of an auxiliary source depends on the other sources available to the final classifier. The offensive-language vector provides the clearest illustration. It is present in the lowest-scoring pair and in the highest-scoring full combination. The humour vector likewise accompanies lower accuracy when added to sentiment alone and higher accuracy when added to the sentiment-and-sarcasm setting. These are comparisons of whole trained classifiers. They show which configurations fare better under the reported training procedure, while leaving the source of specific prediction changes to further analysis.
The authors also train the sentiment-only and full systems repeatedly with a fixed training set size, evaluating each on the same 36,614 held-out reviews. In run 1, test accuracy is 95.95% for sentiment alone and 96.18% for all feature sources. In run 2, the corresponding accuracies are 95.76% and 96.08%. In run 3, they are 95.85% and 96.40%. Accuracy varies from run to run for both systems. The full combination leads in every paired comparison reported in the paper.
The repeated-run table addresses whether the full system’s advantage appears again when the comparison is rerun. Its use of a fixed held-out set lets the authors compare systems on the same review judgments each time. The review sample itself stays the same throughout, so the runs show how the comparison behaves across training runs within that sample. The test set, the training size, and the particular features define the scope of the observed consistency.
What the ablations show
Each addition has a context
The combination study is the paper’s main ablation. It retains the sentiment representation and varies the auxiliary inputs to the final classifier. The comparisons make separate contributions visible to the extent that the tested subsets allow. Adding sarcasm to the sentiment-only classifier improves its reported test accuracy. That result aligns with the earlier BERT experiment, where sarcasm predictions also improve the tested sentiment system. The two experiments use different sentiment representations and different forms of auxiliary input. The common observation is that some information learned from sarcasm supervision is useful in both settings.
Adding humour alone has a different effect from adding humour to the setting that already contains sarcasm. The sentiment-and-humour pair scores below sentiment alone, while the sentiment, sarcasm, and humour combination scores above the corresponding setting with sentiment and sarcasm. For offensive language, the comparison with sentiment alone is also unfavourable. Adding its representation to the combination that already includes sentiment, sarcasm, and humour produces the best result in the table. This makes a general statement such as “offensive language improves sentiment classification” too coarse for the pattern of results. The evidence concerns the contribution of an added feature block to a particular system trained with a particular group of other feature blocks.
The tested subsets also set the boundaries of the interpretation. The table offers a direct comparison of the full system with the setting formed by leaving out offensive language. It does not show the full system with humour removed and everything else kept, or the full system with only sarcasm removed. The sentiment-and-sarcasm result establishes how that pair performs. Pulling sarcasm out of the full combination would address a different question because the remaining representations give the classifier other cues. The repeated training runs compare the full system against sentiment alone. They give less information about the run-to-run behaviour of the smaller steps between adjacent feature combinations.
The ablation changes the features and retrains the decision layers. That choice shows what the final classifier can learn from each subset. It does not track the effect of suppressing a particular vector in an already trained classifier for a single review. Those are different operations. In a retrained comparison, the classifier can place different weights on the sentiment features it still has. This can compensate for an absence or allow new features to change where the decision boundary falls. The accuracy differences capture that whole process.
What the feature plot can reveal
The authors inspect the representations directly using the first 100 reviews in the Yelp test set. They extract each task’s embedding for each review, normalise each vector to unit length, and project the vectors into 2D using t-SNE. Unit normalisation places the vectors on a common length scale. The projection gives a view in which each high-dimensional representation is shown as a point, making it possible to inspect how representations from different branches tend to lie relative to one another.
The points from the different tasks predominantly occupy different regions of the projection. That distinction is visible even though the branches encode the same reviews. It is consistent with separately trained networks learning representations with different overall properties. It also makes intuitive sense in light of their tasks. A network trained to respond to self-marked Reddit sarcasm has a different reward from one trained to distinguish positive Yelp reviews from negative ones. Different inputs to branch training can give rise to differences in the geometry of the output on shared Yelp inputs.
The projection itself compares sets of feature vectors. It does not compare how frequently the branches provide different correct answers, or indicate which coordinates a final decision depends on. Independent networks can arrange similar information differently, and t-SNE displays the result in a reduced space. The visible separation therefore supports the observation that the encoders organise the same reviews differently. The accuracy comparison supplies the evidence that combining their features helps the final task. Reading them together leaves room for overlap in the information the branches encode.
Where the prediction overlap changes
The paper also compares the labels produced by different feature combinations. For each kind of classification outcome, the displayed matrix treats the predictions in one column as the reference for a classifier named in a row. A reference can be the annotated ground truth, or it can be another system’s predictions. In the latter case, the cell describes agreement or disagreement under that reference. Agreement with a system is a different question from correctness against annotations, and the choice of column determines which question a reader is looking at.
The paper describes each cell by its row, column, and outcome category.
(i, j) for category c
Here i identifies the system whose predictions are counted, j identifies the reference for the comparison, and c is the outcome category. The parentheses and comma specify the ordered pair of matrix indices. TP means a positive prediction with a positive reference label, and TN a negative prediction with a negative reference label. FP means the system predicts positive against a negative reference, and FN means it predicts negative against a positive reference. In the ground-truth column, the reference labels are the Yelp sentiment annotations. When j is another classifier, the comparison uses that classifier’s predicted labels.
The paper reports that the sentiment-only baseline predicts 97% of the full system’s positive labels in the comparison between systems. This figure describes positive-label overlap with the full system as the reference. Read alongside the ground-truth comparisons, it shows where to look for differences even though the systems broadly agree. The reported false-positive rate against the ground truth is 0.02 for the full system and 0.03 for sentiment alone. The full system is thus less prone to assigning a positive label to a negative review in that comparison. The authors take this pattern, alongside their observation about true positives, as evidence of improved precision. A false-positive rate describes errors among reference negatives, while precision concerns correctness among predicted positives. The two measures use different denominators.
When the authors compare the full feature combination with sentiment, sarcasm, and humour, the reported true-negative fraction against the ground truth is 0.97 for the full system and 0.95 for the smaller combination. They interpret this as consistent with offensive-language features helping identify negative reviews. The comparison has a useful parallel in the feature ablation, since it adds that representation to the same set of task names. It still concerns decisions made after retraining on the expanded set of features. The matrix reveals how the decisions change in aggregate, while the review examples show the kinds of wording found among selected changes.
Reviews that change the interpretation
The authors inspect reviews that the combined classifier gets right and the sentiment-only classifier gets wrong. Several are complaints written in forms that can carry favourable meaning elsewhere. A nurse describes calling an office frustrating as a generous description. The apparent compliment helps calibrate the severity of the complaint. A customer uses the imagined work of growing and preparing the tea to say how long the service seemed to take. On its face the review describes a hypothetical alternative, but its point is the wait. The example about pastries makes a similar reversal through its invitation. The author presents mistreatment as though it were an amenity.
These examples clarify what a polarity decision has to take into account. The writer complains through the relation between a familiar form and the experience being described. Detecting praise, an invitation, or an alternative course of action in isolation leaves the central judgment unresolved. A feature learned in the sarcasm branch could help mark familiar language in an unfamiliar evaluative role. The examples demonstrate that some reviews of this kind receive different decisions from the two systems. The classifier’s individual activations are not traced back to the phrase that would justify a human reading.
The paper also gives an example of a negative review corrected by the full classifier in which a customer angrily criticises staff behaviour. The authors assign that example to the offensive-language source in their discussion. It makes the paper’s broad use of the category concrete. The review is about the way a customer was treated and conveys hostility toward people involved in the encounter. This example illustrates why detecting the way a complaint is worded can help with the target task, while leaving open whether the auxiliary representation responded to any particular insult.
The qualitative evidence for humour is thinner. The authors say they find few humorous reviews in the set of corrections they inspect. That observation can coexist with the slightly higher accuracy of the combination that includes humour alongside sentiment and sarcasm. A task-specific vector can bring useful information about wording even when a reviewer or an analyst would be reluctant to call the whole review humorous. The examples give a clearer account of how sarcasm and hostile criticism can matter than of which humorous cues the classifier uses.
The errors include a review told as a story. The opening describes staff who appear unwilling to take responsibility for a table. The writer later reframes that apparent setback as fortunate. The combined classifier misses the review’s annotated sentiment in this example while the sentiment-only system gets it right. The authors suspect the turning point was missed. This is a problem of combining evidence across a review. Strongly negative words early in the story can be entirely appropriate to the events being narrated, even when the writer is using the story to arrive at a favourable overall judgment.
Other examples defeat both systems. One review stretches out the spelling of the word conveying that something was bland. The authors identify a missed indicative word. Another juxtaposes a business closure with approval of the closure, which they discuss as a flip in sentiment. In each case the evidence points toward a more specific difficulty than simply failing to recognise sarcasm. These cases explain why the improvements are selective. Training additional branches can supply features that are useful for certain constructions, and the main experiment still leaves room for errors involving spelling, the target of approval, or the development of an evaluation over the course of a review.
Limitations
Limits the authors identify
The paper’s analysis points to difficulties when the sentiment of a passage changes as the review develops. The example of an inconvenient start turning into a favourable outcome receives an incorrect decision from the combined system. The authors also describe errors where neither classifier picks up the crucial word or change in stance. Their inference is that the added branches are useful for certain kinds of language and leave other kinds of interpretation difficult. The error examples show why a successful test on the aggregate polarity measure cannot stand in for an account of how the classifier reads every part of a review.
The authors find few humour examples among the reviewed cases that the combined system corrects. They can therefore connect sarcasm and offensive wording to recognisable examples more readily than they can connect humour to the improvement. The combination scores give humour a role in the comparisons, particularly when sarcasm is already present. The qualitative analysis leaves the character of that role unresolved.
The scope of the final task is also explicit. The authors propose testing finer sentiment categories in the future, including Yelp and the Stanford Sentiment Treebank, each in a 5-way classification setting. They suggest that offensive language might help distinguish a 1-star review from a 2-star review. That would require evidence about strength of dissatisfaction within the negative end of the rating scale. Detecting whether a review falls on the positive or negative side does not answer that question. They also raise entailment and entity detection as other tasks on which the reusable architecture could be tried. The experiments concern the tasks they train and the binary Yelp target they evaluate.
What the experimental design leaves open
The fuller transfer test uses different sources of annotation. Reddit users self-label sarcasm, Yelp funny votes are thresholded into a humour label, and the Twitter labels are used for a broad offensive-language task. These labels define what the branches learn to distinguish. A low funny score can reflect how readers voted and how a review was received. The experiment uses the score as a practical measure of humour without independently judging the presence of a joke in each review. Similarly, slang, criticism of staff, and language captured in the Twitter task can overlap in vocabulary while differing in speaker intent and what the wording targets. The usefulness of a learned vector for Yelp polarity leaves that distinction intact.
The sentiment and humour branches both learn from Yelp review material. The paper gives the sample construction and sizes for the respective tasks. It does not spell out how the review selections for the two tasks are coordinated at the level of individual review identities. This keeps the reader from using the reported counts to determine whether the humour branch was trained on any text also used for the sentiment evaluation. The reported setup supports a comparison on the held-out sentiment split, with the degree of independence from the auxiliary humour split left unspecified. For the Reddit and Twitter branches, the transfer question instead concerns applying features learned in one kind of social text to reviews written for another purpose.
The feature combination changes both the supervision represented in the input and the amount of input available to the final classifier. Appending vectors supplies more components than sentiment features alone. The paper does not report a width-matched control that adds comparably sized features learned from sentiment alone. Such a comparison would separate the benefit of access to more learned features from the benefit of their particular auxiliary training objectives. The existing combinations still give evidence of differences among feature sources. Some additions produce lower accuracy even though the classifier has more input components, which is consistent with the choice of source mattering. The comparisons leave its contribution entangled with the larger input and the fitted classifier that uses it.
The repeated experiment shows the same ordering for the full and sentiment-only systems across reported runs on the same reviews. The paper gives individual accuracy values and does not accompany them with an uncertainty interval or a statistical comparison. It also gives no repeated-run table for the individual branches or the intermediate combinations. Consequently the difference between the full system and sentiment alone has evidence of repeatability within this setup, while the finer rankings in the combination table deserve a narrower reading. A new test corpus would address performance variation across collections, a source of variation that repeated training with the same test reviews cannot assess.
The embedding projection and example-based analysis address complementary questions. The former compares the overall arrangement of vectors by branch. The latter shows selected successes and failures. Neither supplies task-level labels for the entire held-out sentiment set. As a consequence, the paper cannot determine the share of sarcastic, humorous, or hostile reviews corrected by the ensemble, or the share harmed by it. It also cannot establish from the plots that the branches encode mutually exclusive information. Distinct regions after projection and complementary contributions to accuracy are compatible with substantial redundancy in the representations.
Finally, local convolution followed by max pooling encourages a review representation that reacts strongly to informative passages wherever they occur. Since the pooled feature lacks a position, the final classifier has no direct view of the order of those maxima. This is a plausible architectural reason to pay attention to the authors’ example of a late reversal. The paper does not test an order-preserving alternative while holding the other factors fixed, so the error could have several causes. The more secure conclusion is that supervision for sarcasm, humour, and offensive language can help a classifier make better use of some review wording, while the tested architecture still makes errors when the overall evaluation depends on how several parts of a review fit together.
What came after
No subsequent citing work is identified for this paper. The authors outline a follow-up question about finer sentiment ratings, where an auxiliary feature would need to help distinguish degrees of approval or dissatisfaction within the same polarity. They also propose using the architecture on tasks such as entailment or entity detection. Those are directions raised by the paper. The reported evidence remains the transfer of auxiliary features to positive and negative sentiment prediction on Yelp.
Cite
Cite as Rohan Badlani, Nishit Asnani and Manan Rai. 2019. An Ensemble of Humour, Sarcasm, and Hate Speechfor Sentiment Classification in Online Reviews. Proceedings of the 5th Workshop on Noisy User-generated Text (W-NUT 2019).
@inproceedings{badlani2019ensemble,
title = {{An Ensemble of Humour, Sarcasm, and Hate Speechfor Sentiment Classification in Online Reviews}},
author = {Rohan Badlani, Nishit Asnani and Manan Rai},
booktitle = {Proceedings of the 5th Workshop on Noisy User-generated Text (W-NUT 2019)},
year = {2019},
doi = {10.18653/v1/d19-5544},
url = {https://doi.org/10.18653/v1/d19-5544}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/badlani-2019-ensemble-humour-sarcasm-hate-speechfor/