Elamur Research

UNIBA - Integrating Distributional Semantics Features in a Supervised Approach for Detecting Irony in Italian Tweets

Paper · 2018 · Pierpaolo Basile and Giovanni Semeraro

Summary

A word can belong in a sentence grammatically and still strike a reader as badly out of place. In an Italian tweet about Mario Monti, a downgrade takes him from prime minister to caregiver. The occupational term is ordinary on its own. Its appearance in the language of political downgrading helps give the tweet its ironic effect. Pierpaolo Basile and Giovanni Semeraro ask whether a classifier can detect that kind of mismatch by learning which words tend to occur near each other. They test the idea on Italian tweets in the irony detection subtask of IronITA at EVALITA 2018, where the decision is whether a tweet is ironic.

The authors use distributional semantics to represent words by their patterns of use. They build a shared space from 40M tweets sampled from TWITA and use it in two ways. One representation sums the word vectors to characterize the tweet as a whole. The other compares each word’s usual surroundings with its neighbors on that particular occasion. The average, highest and lowest mismatch scores become features for a linear classifier, alongside features for words and short phrases, sentiment polarity and informal writing.

The study uses the organizers’ labeled training set of 3,977 tweets and test set of 872 tweets. Both official UNIBA submissions record an average F1-score of 0.710 on the test set, placing 3rd and 4th. Both include the word-context mismatch scores, and only UNIBA1 includes the whole-tweet vector. The class scores also agree at the reported precision. Adding that vector to the rest of the submitted feature set therefore yields the same published result.

The feature comparisons give a more detailed picture. A setting using individual words and short sequences reaches an average F1-score of 0.7168 in the task results. Adding microblogging indicators reaches the same reported average, with a different balance between the classes. The whole-tweet vector by itself scores 0.6406, and the mismatch summaries by themselves score 0.5290, above both official baselines. The distributional representations thus carry information about the labels by themselves. Their value depends on the company they keep: the strongest keyword setting already does well, and the paper’s way of combining the signals yields a weaker score than that setting.

Deep dive: UNIBA - Integrating Distributional Semantics Features in a Supervised Approach for Detecting Irony in Italian Tweets

UNIBA tests whether unusual word contexts and tweet-wide semantic vectors help a supervised classifier detect irony in Italian tweets. · about 34 minutes to read

The problem and its context

When a familiar word sounds out of place

The paper begins from a difficulty in reading ironic writing. The intended meaning can diverge from what the words literally describe, and a written message gives the classifier no tone of voice to consult. The authors look for a clue in the words themselves. An expression can look ordinary in isolation and become conspicuous when it appears alongside terms that usually belong to a different setting. The question is whether statistics about ordinary word use can make such a local surprise visible to a system that sees only the written tweet.

The tweet about Monti gives the authors a concrete example. It treats a change from prime minister to caregiver as a downgrade carried out by S&P. The Italian word badante names a caregiver. A reader can recognize the occupation while finding its use in this political and financial framing peculiar. The authors point to the uncommon pairing of that term with references to a prime minister or to Monti. Their procedure takes that intuition seriously at the level of nearby words. If the vocabulary around a term resembles the vocabulary that tends to accompany it elsewhere, the occurrence looks conventional by this measure. If the two sets of surrounding words have little resemblance, the occurrence looks more unusual.

This makes the computational question more specific than the general question of what irony means. A system can compare a word’s immediate surroundings with evidence accumulated from other tweets. It can make that comparison for several words in a message and let a supervised classifier learn whether the resulting pattern is associated with an irony label. The target is a decision about the whole tweet, although the evidence starts with individual occurrences. A reader’s interpretation of the Monti example can draw on the situation it invokes. The numerical feature starts from a narrower observation about which words occur together.

Word choice also offers more direct evidence. A classifier can learn that a particular word or short sequence occurs often enough with a label to help predict it. The distributional approach asks a different question about the same material. It judges a word against its surroundings and can give similar scores to different words in different tweets. A phrase feature preserves the identity of the expression. A mismatch score describes how a particular use compares with the corpus evidence for that word. The paper puts both kinds of information into the same supervised setup because each captures something the other representation leaves implicit.

The benchmark makes the prediction target concrete. IronITA includes a subtask for detecting irony and another that asks participants to distinguish sarcasm from other irony. UNIBA addresses the first. Every prediction considered in the paper is about whether a tweet belongs to the ironic or non-ironic class. The system has the scope of a binary text classification task. It is trained to make that decision for an entire message, and the shared task judges it against the labels supplied for the tweets.

What the approach inherits

The UNIBA entry draws on two lines of work described by the paper. One is the team’s earlier work on the polarity of Italian tweets. That work supplies much of the feature design, including words and short sequences, cues specific to informal posts, and a lexicon used to estimate positive and negative sentiment. These groups represent different properties of a tweet. An exclamation mark is a property of its written form. A strongly favorable word is evidence from a sentiment lexicon. A short sequence records the wording itself. Each can be turned into a value for a classifier even when the writer’s intention remains difficult to infer.

The use of polarity carries a particular motivation. A tweet can contain favorable and unfavorable language in close succession, and the change can matter as much as the presence of either kind of word. The system preserves both kinds of evidence. It records the strongest positive and negative lexicon scores and also tracks switches between positive and negative tags. A tweet can therefore share its strongest sentiment cues with another tweet yet receive a different feature value for how those cues are arranged. This part of the design comes from analysis of sentiment and emotion.

The other line of work concerns irony detection itself. The authors point to successful entries in the English-language SemEval task that used polarity contrast or contextual incongruity among the strongest approaches outside deep learning. Incongruity here means that parts of an utterance appear ill matched. The UNIBA paper takes that broad idea and gives it a particular operational definition for Italian tweets: measure how far a word’s immediate neighborhood is from the contexts that helped form its corpus representation. The paper presents the English task as motivation for attending to contrast and context. SemEval-2018 Task 3 on irony in English tweets

This relationship to earlier work explains why the authors retain so many familiar features around the distributional ones. They enter a supervised competition with an approach already suited to short Italian messages. The new question is how a corpus-derived representation behaves alongside that existing approach. The keyword features can record distinctive words and local sequences directly. The sentiment features can record prominence and change of polarity. Microblogging indicators can record devices such as punctuation or written laughter. A semantic-space feature can bring evidence from a much larger body of messages, including messages that have never been judged ironic or non-ironic.

The constrained setting makes that last distinction important. The supervised classifier learns the decision from the organizers’ training labels. The authors say they also used an external polarity lexicon and drew a sample from TWITA, which contains roughly 800 million Italian tweets. The sample is used to learn associations among words, independently of the task labels. The lexicon gives prior polarity values to words. Those resources determine what information can be encoded about a tweet before the classifier evaluates what the features mean for irony. The paper cites earlier work on Italian tweet sentiment for the TWITA collection. Sentiment analysis on Italian tweets

The motivating hypothesis concerns one kind of evidence within a larger prediction problem. A tweet that uses a word in unusual company may be ironic, and corpus statistics can sometimes register that company as unusual. The classifier still has to learn what to make of the score. The ordinary language features matter because they offer evidence about what was actually said, while the mismatch summarizes how expected part of that wording was. Bringing the two together lets the authors ask about the predictive value of context mismatch without making it the definition of irony.

The method, step by step

From an Italian tweet to a classifier input

UNIBA uses a supervised linear support vector machine, or SVM, implemented in LIBLINEAR. The authors specify an L2-regularized classifier with L2 loss. The regularization discourages excessively large feature weights, and the loss penalizes training decisions that fall short of the desired classification margin. The classifier learns from labeled tweets by assigning weights to the features present in its input. At prediction time, the contributions of those features combine into a score that determines the class.

The classifier works on a numerical description of a tweet. Part of that description comes from the individual words and sequences in the message. Another part comes from sentiment and writing style. The authors also construct a separate semantic space from unlabeled text. The space provides both a whole-message representation and the references needed for comparing individual words with their surroundings. Different experimental settings supply different selections of these features to the same kind of classifier.

From Italian tweets to irony predictions

The steps in order.

From Italian tweets to irony predictionsStep 1: Sample unlabeled tweets and establish a vocabulary1. Sample unlabeled tweets and establish a vocabularyStep 2: Assign each vocabulary word a random index2. Assign each vocabulary word a random indexStep 3: Accumulate indices from neighboring words3. Accumulate indices from neighboring wordsStep 4: Encode tweet wording, polarity and writing cues4. Encode tweet wording, polarity and writing cuesStep 5: Sum word vectors into a tweet representation5. Sum word vectors into a tweet representationStep 6: Compare words with their immediate contexts6. Compare words with their immediate contextsStep 7: Fit the linear classifier on labeled tweets7. Fit the linear classifier on labeled tweets

The first processing step for the keyword features is tokenization, the division of a tweet into units that can be recorded individually. The authors use individual tokens, adjacent pairs and adjacent triples. These are unigrams, bigrams and trigrams, respectively, and all belong to the broader family of n-grams. A unigram gives the classifier evidence about the occurrence of a particular token. A bigram or trigram keeps some information about order. It allows the classifier to attach a separate weight to a sequence in addition to whatever weights the component tokens acquire.

During tokenization, the authors replace user mentions with USER and web addresses with URL. The replacements keep the presence of each type of item available for the keyword representation while folding many distinct strings into a common form. A sequence next to a mention can then be represented with the same placeholder across messages addressed to different accounts. The paper specifies this replacement in its account of the keyword features. The distributional account separately describes which words are eligible to enter the semantic space.

The microblogging features record the presence of emoticons, character repetition, informal written laughter, exclamation marks and question marks. These indicators are binary. Once a cue is present, the feature records that fact. It has the same value when the cue occurs repeatedly. The authors treat character repetition as a way informal writing can intensify an expression and give repeated forms of ah as an example of written laughter. The binary features give the classifier a way to learn about such devices across many different word sequences. A question mark carries the same indicator value whether the tweet poses a political question or asks about something else.

The polarity features require a resource adapted to Italian. The authors start from SentiWordNet, a sentiment lexicon organized by synset. A synset groups words expressing a particular sense. The Italian resource used in the classifier is organized by words, so the process has to move polarity information from sense entries into a form that can be looked up for a token. The authors use MultiWordNet to connect the entries across languages. They then use Morph-it! to give inflected forms the polarity scores of their base entries. SentiWordNet

The version mapping comes first. The offsets identifying entries in SentiWordNet are converted from version 3.0 to 1.6 because MultiWordNet uses WordNet 1.6. The authors use an automatically generated mapping for the conversion. The polarity information is then transferred to Italian lemmata. A lemma is the base form used to group the inflected forms of a word. In the final expansion, the links between forms and lemmata in Morph-it! let the authors extend each lemma’s scores to the corresponding inflections. This makes lookup possible for more of the forms readers encounter in a tweet.

The resulting lexicon supplies three features. The highest positive score among the tweet’s words represents the strength of its strongest favorable cue. The highest negative score similarly describes its strongest unfavorable cue. These features summarize the extrema of the lexicon scores, which allows each kind of polarity to be prominent in the same tweet. The remaining feature concerns variation within the message. The procedure tags tokens with OBJ, POS or NEG according to the highest polarity score in the lexicon and counts switches between positive and negative. OBJ means objective, POS positive and NEG negative. Thus the representation retains information about changes in polarity that would disappear if the classifier received just the strongest scores.

A lexicon lookup supplies polarity associated with a word in advance of seeing its use in the tweet. The distributional features take a different route through the data. They learn from occurrences in the tweet corpus and then use the resulting word representations both to encode a message and to evaluate individual word uses. That shared basis is important. The two feature groups use the same evidence about word co-occurrence, but convert it into different descriptions of the labeled example.

How Random Indexing records ordinary contexts

The semantic space is trained on 40M tweets randomly drawn from TWITA. The authors keep words occurring more than ten times, yielding a vocabulary of 105,543 terms. They set the context window to 2. Their description and worked example use neighboring vocabulary words on either side of the target. The window is dynamic in the sense that words outside the vocabulary are skipped when assembling the context. The retained neighbors can therefore extend beyond the corresponding positions in the original string when intervening words are excluded.

The authors construct the space with Random Indexing. The idea is easiest to understand by imagining a co-occurrence description with a separate coordinate for every possible context word. A target’s description would accumulate evidence in the coordinates of the words that appear near it. Such a description can become very wide as the vocabulary grows. Random Indexing instead assigns every vocabulary word a short, reusable random vector and accumulates those vectors directly. Its mathematical rationale is that a suitable random projection can preserve enough of the geometry of the original representation to make comparisons meaningful in fewer dimensions.

The paper writes the projection as a matrix product.

A · R = B

Here A is the original matrix of shape n × m. The value n is the number of points represented by rows, and m is the number of coordinates in their original representation. The random projection matrix R has shape m × k, where k is the number of coordinates in the projected representation. B is the resulting matrix of shape n × k. The dot denotes matrix multiplication, × in a shape separates its dimensions, and = identifies the product with the projected matrix.

k ≪ m

The relation ≪ states that k, the projected dimension, is much smaller than m, the original dimension. The rows still correspond to the original points. Their descriptions now require a shorter list of coordinates, which is the attraction of the projection for a vocabulary-based representation.

dᵣ ≈ c × d

In this statement d is the distance between a pair of points before projection, and dᵣ is the distance between the corresponding projected points. The symbol c denotes a scale factor, × indicates multiplication, and ≈ marks the approximate relation between the distances. The authors cite the Johnson–Lindenstrauss lemma as the mathematical basis for preserving distances under random projection. This equation describes the geometry that motivates the approach. The irony detector uses the constructed space to compare the directions of vectors.

The Random Indexing procedure distinguishes two vectors associated with each word. The first is its assigned context vector, also called a random index here. It is drawn once and reused wherever the word contributes to another word’s context. The coordinates are ternary, taking values from −1, 0 and 1, and most are zero. In the experiment the assigned vectors have dimension 200, with 10 non-zero entries. The locations and signs of the non-zero entries provide a compact signature for a word that appears in a context.

The second is the word’s semantic vector. It begins to acquire structure as the corpus is scanned. Whenever a particular target occurs, the procedure finds the eligible words surrounding it and adds their assigned random indices to the target’s running total. After the corpus has been processed, the sum represents the target’s observed surroundings across its occurrences. A context word encountered repeatedly can contribute repeatedly. The target’s own assigned random index is the signature it contributes when it is a neighbor of some other word. Its accumulated semantic vector describes the company it has kept. The two play different roles even though both live in the same coordinate system.

svᵢ = ∑ⱼ∈Nᵢ cⱼ

Here svᵢ is the accumulated semantic vector for vocabulary word wᵢ, with i identifying the target. Nᵢ denotes the collection of neighbor occurrences gathered across the corpus around occurrences of that target. The index j gives the vocabulary identity of a neighbor, and cⱼ is that word’s assigned random index. A vocabulary index can recur in the collection. The sign ∈ means that the sum ranges over the neighbors in Nᵢ. The summation sign ∑ indicates coordinate-by-coordinate addition, and = defines the resulting vector.

The authors illustrate the accumulation with an Italian tweet about the good in a school. When scuola is the target, the retained neighbors in the example are siete and buono to its left and fatelo and capire to its right. Each contributes its random index to the running sum for scuola. The surrounding function words omitted in that example show what skipping vocabulary exclusions means in practice. A word can contribute even if an excluded token intervenes between it and the target. The same accumulation takes place at other eligible occurrences of scuola and for other target words.

The illustrative vectors are small enough to read coordinate by coordinate. The actual space uses the larger dimension reported for the experiment. In either case, a random index plays the same role each time its word appears. That consistency gives the sums their interpretive value. If distinct targets frequently occur around the same vocabulary words, some of the same random vectors contribute to both of their semantic vectors. The resulting proximity in the space represents a resemblance in usage. It is this sense of contextual resemblance that makes the vectors useful as word embeddings.

A vector for the tweet as a whole

The first distributional feature group represents an entire tweet in the semantic space. Given the words in a tweet, the authors add their accumulated semantic vectors. They call this operation superposition. Each accessible word representation can contribute some part of what the corpus associates with that word. The sum gives the classifier a coordinate description of the message that is shaped by the uses of its words across TWITA.

t = ∑ᵢ∈T svᵢ

Here t is the tweet vector, T is the collection of vocabulary-word occurrences in the tweet that have semantic vectors, and i gives the vocabulary identity of a word occurrence. svᵢ is the semantic vector accumulated for that word during construction of the space. The sign ∈ restricts the sum to those occurrences in T, ∑ denotes coordinate-by-coordinate addition, and = defines the tweet representation.

A word contributes its corpus-level description through this sum. The vectors being added are the accumulated semantic vectors. The assigned random indices served to construct those vectors in the preceding stage. Since addition is insensitive to order, the tweet vector does not preserve the original sequence once the participating terms have been selected. Two messages with the same participating terms and different arrangements would have the same sum. The keyword bigrams and trigrams continue to represent order when those features are included. The whole-tweet vector provides a different view based on the kinds of contexts associated with the words overall.

The point of having this group alongside keywords is that a classifier can work with word use beyond exact matches. Contextually related words can make related contributions to a sum even when their token identities differ. The classifier has access to the coordinates of the tweet vector and can learn whether patterns in those coordinates are predictive. This part of the procedure asks what kinds of word-use evidence are present across the message. The second distributional part looks at how a particular word fits at its specific position.

Comparing a word with its immediate surroundings

For the word-context feature, the authors build a temporary representation of the neighbors around each eligible word occurrence. They use the same random indices that were used to accumulate the word’s ordinary corpus contexts. A target and its local context can then be compared in the same coordinate system. One side of the comparison comes from the target’s observed surroundings throughout the unlabeled corpus. The other comes from its neighbors in the tweet being classified.

c(wᵢ) = ∑ⱼ∈Lᵢ cⱼ

Here wᵢ is the target word at the occurrence being examined. c(wᵢ) is its temporary local-context vector. Lᵢ is the collection of eligible neighbor occurrences around that use of wᵢ. The index j gives the vocabulary identity of each neighbor, and cⱼ is its assigned random index. The sign ∈ selects the neighbors in Lᵢ, ∑ adds their vectors coordinate by coordinate, and = defines the temporary sum. The notation for c(wᵢ) denotes the whole local context, whereas each cⱼ contributes a single neighbor’s assigned signature.

The two sums have compatible inputs. If the neighbors of a word in the new tweet often appeared around it in the corpus, their random indices have already contributed to the direction of the word’s accumulated semantic vector. They also occur in the local sum. Such overlap gives the vectors a reason to point in similar directions. If the local neighbors are unfamiliar around that word, it is less likely that their signatures will align with the accumulated vector. Other context words can still influence the alignment, so the result is a comparison of aggregate directions.

The authors use cosine similarity to measure that alignment. Cosine similarity compares vector directions, allowing a temporary sum built from a few neighbors to be compared with an accumulated vector built from many occurrences. They express the feature as divergence from the familiar context by subtracting the similarity from 1.

acᵢ = 1 − cosSim(c(wᵢ), svᵢ)

Here acᵢ is the divergence score for the current occurrence of wᵢ. cosSim is cosine similarity, and its two arguments, separated by the comma, are the temporary context vector c(wᵢ) and the accumulated semantic vector svᵢ for that word. The minus sign subtracts the similarity from 1, so weaker directional agreement yields a larger divergence score. The equality sign defines the score passed to the aggregation step.

The distinction between a word type and a word occurrence is central to the design. The accumulated vector for badante, for instance, describes its learned surroundings across the corpus. Its local context vector depends on the neighbors present on that particular occasion. If the word occurs in another tweet with different neighbors, the procedure can obtain a different divergence score while consulting the same accumulated vector. This is how the feature can register an unconventional use of an ordinary word. The example about Monti motivates that interpretation, and the paper gives the procedure for scoring it in general.

The classifier needs a representation of fixed length, though tweets supply different numbers of eligible word positions. The authors summarize the divergence scores by their average, maximum and minimum. The average describes how unusual the contexts are across the eligible occurrences. The maximum captures the most unusual occurrence according to the measure. The minimum captures the one that fits its conventional surroundings most closely. This gives the classifier distinct ways to use context mismatch. A conspicuous word can affect the maximum even when its neighbors elsewhere in the tweet fit familiar patterns, while a generally unusual stretch of wording can also raise the average.

These summaries describe the magnitude and spread of the mismatch without passing the identity or position of the contributing words to the classifier through this group. A tweet receives the same maximum if a similar degree of divergence occurs at a different position. In the submitted systems, the keyword features give the classifier access to actual wording alongside these summaries. The combination thus puts word identity, some local order and a separate judgement about contextual fit into the same prediction procedure.

Fitting the supervised classifier

Training the semantic space and fitting the classifier use different evidence. The unlabeled tweets determine which words occur in the vocabulary, which neighbors accumulate in their vectors and how the resulting space is arranged. The organizers’ labeled tweets determine the weights used to distinguish irony from non-irony. The sentiment lexicon joins these as another source of feature values. Its polarity information enters before the classifier learns whether particular polarity patterns are helpful in this task.

For LIBLINEAR, the authors report tuning the cost parameter C. It controls the tradeoff in the SVM objective between penalizing training violations of the margin and regularizing the feature weights. They perform 5-fold cross validation on the labeled training set to choose it and set C=1. In cross validation, training examples serve as held-out validation data in different folds, so the cost choice is made from the training set. The official test results come from the organizers’ separate test set.

Both submitted configurations retain the conventional keyword, microblogging and polarity features, along with the average, maximum and minimum divergence scores. UNIBA1 also gives the SVM the whole-tweet vector. UNIBA2 omits that input. The design of these submissions therefore gives a specific comparison: what happens when the classifier receives the summed tweet representation on top of a feature set that already has both surface cues and the corpus-derived measure of context mismatch?

Experiments and results

What the task scores measure

IronITA provides 3,977 training tweets and 872 testing tweets for the evaluation described in the paper. The supervised part of UNIBA is fitted using the training labels. The 5-fold cross validation is reported for setting the LIBLINEAR cost. The official test comparison evaluates predictions for irony and non-irony on the organizers’ test tweets. The authors enter the constrained run and report results for the irony detection subtask.

The official comparison gives precision, recall and F1 separately for ironic and non-ironic tweets. For a class, precision asks how often predictions of that class are correct. Recall asks how frequently the system finds the tweets belonging to the class. F1 combines those quantities using their harmonic mean. The official ordering uses the average of the class F1-scores, so performance in detecting ironic tweets and in recognizing non-ironic tweets both influence the ranking. A score for one class can help explain results that look similar in the overall average.

The paper reports a random baseline and a most-frequent-class baseline, called baseline-mfc. The latter assigns the non-ironic label throughout. Its non-ironic recall on the official test is 1.000, and its non-ironic F1-score is 0.668. Its F1-score for irony is 0.000, leaving an average F1-score of 0.334. The random baseline has a much closer balance between its class scores, with F1 of 0.503 for non-ironic tweets and 0.506 for ironic tweets. Its average is 0.505. The baselines show how the average reflects class coverage. Recognizing every instance of the more frequent class can yield a substantial F1 for that class while leaving the overall average low.

The official entries differ in how they trade off precision and recall. That matters when reading the narrow gaps in average F1. For example, an entry can detect more of the ironic tweets at the cost of marking more non-ironic tweets as ironic. Another may be more selective about predicting irony and miss more actual ironic examples. The paper’s class breakdowns make it possible to see some of those differences without guessing from the overall rank.

Where the official runs placed

Official IronITA test runs and baselines by average F1

Both UNIBA runs have the same reported score and sit behind the leading team's entries.

Official IronITA test runs and baselines by average F1team1 leading run: 0.731team1 leading run0.731team1 other run: 0.713team1 other run0.713UNIBA1 (this paper): 0.710UNIBA1 (this paper)0.710UNIBA2: 0.710UNIBA20.710team3: 0.704team30.704team6: 0.614team60.614random: 0.505random0.505team7: 0.420team70.420baseline-mfc: 0.334baseline-mfc0.334
The numbers
System or settingaverage F1
team1 leading run0.731
team1 other run0.713
UNIBA1 (this paper)0.710
UNIBA20.710
team30.704
team60.614
random0.505
team70.420
baseline-mfc0.334

UNIBA1 is 3rd and UNIBA2 is 4th in the official run ranking. The two entries above them belong to the same team, so the paper gives UNIBA second place at the team level. The best entry records an average F1 of 0.731 on the test set, and the next entry records 0.713. Both UNIBA submissions record 0.710. The official table places the runs on separate lines and shows the same numbers for them throughout its class-by-class breakdown.

For both UNIBA submissions, the reported precision for ironic tweets is 0.683 and recall is 0.784. Those values accompany an ironic-class F1 of 0.730. For non-ironic tweets, the reported precision is 0.748, recall is 0.638, and F1 is 0.689. The balance differs by class. The classifier recovers a greater share of the tweets labeled ironic than of the tweets labeled non-ironic, while predictions of non-irony have the higher precision. The average score combines those outcomes into the value used for the official comparison.

The leading run reports ironic precision of 0.696 and ironic recall of 0.823, with an ironic-class F1 of 0.754. It also reports non-ironic F1 of 0.707. The entry from team3 illustrates a different class balance. Its non-ironic F1 of 0.708 exceeds the corresponding UNIBA value, while its ironic F1 of 0.700 is lower. The resulting average F1 is 0.704. The official average establishes the ordering under the task metric. The class scores show why that ordering alone gives an incomplete picture of how the entries handle ironic and non-ironic tweets.

The test scores give a clear answer to the comparison embedded in the UNIBA submissions. The added tweet vector in UNIBA1 produces the same reported average and class measures as UNIBA2. The subsequent feature table prints the two averages as 0.7095 and again shows agreement in the class scores for those configurations. The reported agreement applies at both precisions used by the authors. The rank labels identify positions in the official table, while the measured outcomes reported for these submissions provide equal evidence at the level of the scores.

The official run comparison isolates the presence of the tweet vector within a broad feature set. It leaves open the usefulness of the context-divergence scores because they appear on both sides. It also leaves open whether the tweet vector could be effective on its own or in a smaller combination. The authors address those questions with further task results that compare settings built from different groups of features.

How the additional feature settings performed

The additional results report the F1 for each class and their average for a progression of word-based settings, settings with added features, and two standalone distributional settings. The authors also include the official UNIBA configurations in this comparison, calling them run1 and run2. In the table, DSM refers to the summed tweet vector. The row marked no DSM still uses context divergence. The row marked only context uses just the summaries of that divergence. The terms distinguish which representation enters the classifier, even though both representations depend on the same learned space.

IronITA feature settings by average F1 in the additional task results

Short word sequences give the best average, tied by the setting that adds microblogging cues.

IronITA feature settings by average F1 in the additional task resultsAll submitted features: 0.7095All submitted features0.7095Submitted features without tweet vector: 0.7095Submitted features without tweet vector0.7095Unigrams: 0.6853Unigrams0.6853Unigrams and bigrams: 0.7067Unigrams and bigrams0.7067Unigrams, bigrams and trigrams (this paper): 0.7168Unigrams, bigrams and trigrams (thispaper)0.7168Word sequences and microblogging cues: 0.7168Word sequences and microblogging cues0.7168Word sequences and polarity: 0.7117Word sequences and polarity0.7117Word sequences and context divergence: 0.7131Word sequences and context divergence0.7131Tweet vector alone: 0.6406Tweet vector alone0.6406Context divergence alone: 0.5290Context divergence alone0.5290
The numbers
System or settingaverage F1
All submitted features0.7095
Submitted features without tweet vector0.7095
Unigrams0.6853
Unigrams and bigrams0.7067
Unigrams, bigrams and trigrams (this paper)0.7168
Word sequences and microblogging cues0.7168
Word sequences and polarity0.7117
Word sequences and context divergence0.7131
Tweet vector alone0.6406
Context divergence alone0.5290

The strongest score in the additional results is 0.7168, reached by the full keyword setting with unigrams, bigrams and trigrams and also by the setting adding microblogging cues to those features. The keyword setting reports 0.6992 F1 for non-ironic tweets and 0.7343 for ironic tweets. With the microblogging cues, the corresponding values are 0.7000 and 0.7337. Those outcomes give the same average at the reported precision. The class figures show the small change in emphasis that the average conceals.

The complete keyword setting also provides a common baseline for the polarity and divergence additions. The keyword-plus-polarity configuration records an average of 0.7117. The keyword-plus-divergence configuration records 0.7131. Both scores exceed the 0.7095 reported for each submitted configuration alongside them. Both also sit below the 0.7168 already obtained with all the keyword features on their own. A comparison with the submitted systems and a comparison with the common keyword baseline thus answer different questions. The narrower combinations can outperform the submissions even when the added feature group fails to outperform its own keyword starting point.

The standalone settings establish a further distinction. The summed tweet vector is sufficient to produce an average F1 of 0.6406, with F1 of 0.6166 for non-ironic tweets and 0.6830 for ironic tweets. The divergence summaries alone give an average F1 of 0.5290, with class scores of 0.4993 for non-ironic tweets and 0.5587 for ironic tweets. The authors compare that average with the official baselines and observe that it exceeds both. The keyword settings still provide substantially stronger task results. The additional comparison therefore supports a claim about information present in the distributional representations, while the submitted comparison concerns how that information combines with the other inputs.

What the ablations show

Short word sequences make the largest demonstrated contribution

The added keyword sequences form the clearest progression in the feature comparison. The unigram setting gives the classifier token identities and records average F1 of 0.6853. Keeping adjacent pairs raises the reported average to 0.7067. Keeping adjacent triples as well raises it to 0.7168. The class results improve at both steps. On ironic tweets, F1 goes from 0.6969 to 0.7219 and then to 0.7343. On non-ironic tweets it goes from 0.6738 to 0.6916 and then to 0.6992. The class-level pattern supports the same conclusion as the average: in this progression, the additional sequence features help on both sides of the task.

The comparison demonstrates a benefit from preserving some order within a tweet. Unigrams record evidence that specific words have appeared. Adjacent sequences preserve evidence that particular words appear together in a particular order. The classifier can learn from a recurring combination as a unit, alongside the separate weights for its words. That is a different use of local context from the one based on divergence. Bigrams and trigrams make a sequence available with its identity intact. Divergence gives occurrences a common numerical description of how well they fit their local surroundings. The ablation says that the explicit sequences were particularly useful in this task. The scores do not identify which expressions account for the gain.

This is also the strongest reference point for evaluating the other groups of features. Comparing keyword plus divergence against unigrams would combine the effects of word sequences and divergence in the same comparison. The paper supplies a setting that already has unigrams, bigrams and trigrams, so the contribution of adding divergence to that base is visible directly. Similarly, the result of adding polarity can be judged with short word sequences already present. Once the full keyword setting is used as the reference, neither addition raises the reported average.

What the writing and polarity cues contribute

Adding microblogging indicators to the keyword setting changes the class scores while keeping the reported average at 0.7168. The non-ironic class score rises from 0.6992 to 0.7000, and the ironic class score moves from 0.7343 to 0.7337. This gives the authors no improvement in the metric that orders official runs. It also shows why the statement that the indicators gave the same result needs a metric attached to it. The averages agree, while the class results register slightly different behavior. The paper does not report a microblogging-only setting in this comparison.

The polarity addition can be read against the same keyword reference. The keyword-plus-polarity setting records 0.6906 for non-ironic F1 and 0.7329 for ironic F1. Both are below the corresponding values with the complete keyword group alone, and its average is 0.7117. The result concerns the lexicon features as implemented here: tweet-level maxima for positive and negative scores and the count of polarity switches. It gives a direct comparison for adding that group to the keyword setting. Other ways of detecting contrast, or relationships between the words carrying the contrasting sentiment, are outside this experiment.

The results also leave a distinction between a cue being present in a representation and a cue yielding incremental benefit. Token sequences can already preserve sentiment-bearing words, punctuation or other material that overlaps with the dedicated feature groups. The paper does not measure the amount of such overlap. It does establish that the keyword setting is strong before the dedicated cues are added. This matters for interpretation because the contribution being measured is the extra effect of the cues given the words and sequences already available to the classifier.

What the distributional features contribute

The official submissions give the most direct comparison for adding the whole-tweet semantic vector. Both use divergence, and only UNIBA1 includes the summed word vectors. The average and the class scores agree as reported. In a separate setting, that same kind of tweet vector achieves 0.6406 average F1 on its own. It therefore supports classification even without the identity-based keyword features, microblogging indicators, polarity features or divergence summaries. The results answer complementary questions. One asks how well the vector works on its own. The other asks whether it improves a classifier already supplied with extensive information about the tweet.

The context-only setting tests the narrower hypothesis about unusual word use. With just the three divergence summaries, the classifier reaches average F1 of 0.5290. The result is above the official averages of 0.505 for random and 0.334 for always predicting the most frequent class. The scores show useful signal in a representation that records how unusual the words’ surroundings look, with the identity of those words compressed away by the summaries. The divergence-only ironic F1 of 0.5587 is above the random baseline’s 0.506 for that class. Its non-ironic F1 of 0.4993 is below the random baseline’s 0.503 for non-ironic tweets. The baseline comparison is therefore an improvement in the average, with the class-level advantage concentrated on irony in that comparison.

Adding divergence to the full keyword group gives a complementary test of the same features. The combined setting records average F1 of 0.7131, with 0.6937 for non-ironic tweets and 0.7325 for ironic tweets. The corresponding keyword-only figures are 0.7168, 0.6992 and 0.7343. The divergence summaries thus show standalone signal and fall short of improving the complete keyword setting. Together, those outcomes narrow the paper’s conclusion. Context mismatch has a measurable relationship to the labels in this evaluation, while the chosen integration of the scores delivers weaker results than the keyword reference.

The paper describes the distributional information as introducing some noise in combination. The additional results give that interpretation a concrete scope. Stronger scores occur when keyword features are used alone or paired with just one auxiliary group, compared with the broad submitted configurations. The submission pair itself yields equal reported scores when the tweet vector is added. These comparisons establish the behavior of the tested combinations. They leave the mechanism open. Feature overlap, the usefulness of particular coordinates and the behavior of the linear decision rule are separate questions that the score table does not resolve.

The authors consequently propose exploring a combination of different kernels for the word-based and distributional information. A kernel supplies a way to express similarity between examples for the classifier. Using different kernels would allow the two sources of information to have distinct similarity rules within a combined approach. The proposal follows from the observed dependence on the feature combination. It is future work in this paper. The reported experiments concern the linear feature combinations and establish how those particular settings compare on IronITA.

Limitations

Limits stated by the authors

The declared task scope is binary irony detection in Italian tweets. IronITA also offers a subtask about sarcasm within irony, and the authors restrict their participation to the presence-or-absence decision. The reported class measures apply to ironic and non-ironic tweets. They provide evidence about identifying the broader class and leave the finer categorization open. In the same way, the constrained-run results concern the organizers’ labeled data and the stated use of the background tweet sample and polarity resource.

The authors identify the combination of feature groups as a limit of their system. The official submissions give the same average F1, while the strongest additional average comes from the full keyword group, with an equal score when microblogging cues are added. They conclude that a more effective integration of distributional and other information is needed. Their proposal to investigate separate kernels records the direction they see for further work. The paper reports no evaluation of that proposal, so the evidence for the current study ends with the tested feature combinations.

The paper’s claim for the context score is correspondingly modest when read alongside those results. Its construction gives a way to measure unfamiliarity of the surroundings of a word. Its standalone evaluation shows that the resulting features can support irony classification above the baselines on the average used by the task. The strongest observed settings depend primarily on word sequences. The authors’ interpretation of the results centers on improving the way the signals are combined, given the performance of the individual groups and their combinations.

What follows from the setup

A reader can distinguish the empirical prediction result from the proposed linguistic explanation. The Monti tweet makes it plausible that an unusual occupational term in a political context can help a reader recognize irony. The evaluation checks whether the whole tweet receives the right class label. The paper gives no annotation of the exact word responsible for irony in each test item and reports no test against such annotations. As a consequence, a high divergence score is evidence about unfamiliar neighbors in the learned space. The task scores establish how useful the aggregate features are for classification, rather than how accurately they locate the intended ironic expression.

This gap matters because unfamiliarity has several possible interpretations even within the scheme described in the paper. A word may appear in a rare combination because the writer is making an unfamiliar literal observation. A familiar expression may be ironic in the situation where it is used even if its immediate neighbors are expected. The corpus statistic can distinguish patterns of local fit as defined by the space. The classifier learns to associate those patterns with the labels it is given. The reported experiment gives no separate estimate of performance for tweets whose irony depends on a single surprising word, a contrast between clauses or information that readers bring from outside the message.

The size of the neighborhood also defines what the divergence feature can observe. The reported setting uses a window of 2, with intervening words outside the vocabulary skipped. It summarizes the context scores using their average, maximum and minimum. A longer-distance relation may enter the keyword and sentiment evidence indirectly through other parts of the representation, while the divergence computation at a target is based on the local neighbors used to build its temporary vector. The summaries themselves preserve no position for a surprising occurrence. These choices make it possible to present any tweet as a fixed set of scores, with a loss of detail about where and how the mismatch arose.

Vocabulary coverage constrains the geometry. The space is built from 105,543 terms that meet the authors’ frequency rule in the sampled TWITA data. A word outside that vocabulary has no learned vector in the described space, and excluded words are skipped when forming the context window. This matters for the interpretation of rare linguistic material. Some forms of unexpected wording can be represented as unusual arrangements of familiar words. Others may involve a term for which the semantic space offers no ordinary-context reference. The paper specifies the vocabulary condition and dynamic window. It gives no detailed handling rule for every resulting edge case, such as the cosine comparison when an eligible neighborhood supplies no usable non-zero vector.

The sentiment resource has its own resolution limit. The authors explain that SentiWordNet provides synset-level information and that the translated resource used for the classifier is word-based. Inflections inherit the scores of their lemmata. The feature values are therefore prior polarity cues derived from the lexical entries, with the switch count offering some information about their order in the message. The paper makes no separate evaluation of how frequently these values reflect the sense intended in an ironic tweet. A result for this polarity group applies to the resource and summaries actually used by the system.

The evaluation also limits how far small score differences can be interpreted. The official outcomes are point scores on the organizers’ test tweets. The paper supplies no uncertainty estimates or test of the differences between the highest-scoring keyword variants. It reports a training-set cross-validation procedure for the cost parameter, and the additional comparison is presented as task results for different feature combinations. There is no separate account of an independent split for selecting a configuration from that comparison and then evaluating it again. The reported figures support a descriptive comparison for this task. They leave open how reliably the ordering would recur with another sample of Italian tweets.

Finally, equal precision, recall and F1 values are statements about aggregates. The official results do not give predictions for individual tweets in the paper. The matched scores of UNIBA1 and UNIBA2 establish that adding the vector yielded the same measured performance at the reported precision. They leave open whether individual decisions changed and offset one another. The same distinction applies to the equal average of the keyword and keyword-plus-microblogging configurations, where the printed class scores already show a difference. The strongest claims available are about the reported measurements and the tested system variants.

What came after

The IronITA task overview is the available citing work. It documents the evaluation campaign for irony detection in Italian tweets, which is the setting in which the UNIBA submission was evaluated. The relationship runs both ways. Basile and Semeraro cite the overview to identify and describe the benchmark, and the overview cites their system paper. Both belong to the same campaign. The connection therefore records how a particular approach fits within a shared evaluation and how the task documentation connects back to the system that took part in it. IronITA task overview

The overview’s role is benchmark documentation. The citation links the task-level account to the UNIBA study, whose distinctive contribution is a concrete way to compare a word with its usual surroundings and test the resulting features alongside keywords. The available record establishes that connection to the evaluation campaign. It leaves adoption of the Random Indexing divergence score, or a follow-up test of the proposed kernel combination, undocumented. The contribution that can be traced here is the study’s place in the shared task, where its competitive submitted scores can be read together with the more qualified findings of its feature comparisons.

Cite

Cite as Pierpaolo Basile and Giovanni Semeraro. 2018. UNIBA - Integrating Distributional Semantics Features in a Supervised Approach for Detecting Irony in Italian Tweets. Proceedings of the Sixth Evaluation Campaign of Natural Language Processing and Speech Tools for Italian. Final Workshop (EVALITA 2018).

The paper itself, not this page. BibTeX from the library's record of the work.

@inproceedings{basile2018uniba,
  title = {{UNIBA - Integrating Distributional Semantics Features in a Supervised Approach for Detecting Irony in Italian Tweets}},
  author = {Pierpaolo Basile and Giovanni Semeraro},
  booktitle = {Proceedings of the Sixth Evaluation Campaign of Natural Language Processing and Speech Tools for Italian. Final Workshop (EVALITA 2018)},
  year = {2018},
  url = {https://aclanthology.org/2018.evalita-1.25/}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/basile-2018-uniba-integrating-distributional-semantics-features/