Elamur Research

Lexicon information in neural sentiment analysis: a multi-task learning approach

Paper · 2019 · Jeremy Barnes, Samia Touileb, Lilja Øvrelid et al.

Summary

A word can carry an opinion even before it appears in a sentence. Calling a film delightful usually signals approval, but the meaning of the whole sentence still depends on what is being described and how the words fit together. The authors ask whether a neural classifier can make better use of such clues by learning from a sentiment lexicon, a list of words with labels such as positive and negative. Their approach to sentiment analysis uses the list to teach the classifier about individual words while it learns a separate job from annotated review sentences.

The method is an instance of multitask learning. A shared part of the network turns word embeddings, numerical representations of words, into representations that serve both tasks. One branch uses those representations to tell positive lexicon entries from negative ones. The other reads the words of a sentence in context and predicts a sentence label. The sentence branch receives learned vectors for its words, which gives it a way to use the training signal even for words outside the lexicon. The authors use an existing English list and create a Norwegian one by translating it and checking the translations by hand. They release the experimental code and make both the curated Norwegian list and an expanded version covering inflected forms available.

The experiments test related but distinct abilities. The English Stanford Sentiment Treebank asks how positive or negative a movie-review sentence is, with a neutral label available. The Norwegian NoReC eval dataset asks whether a sentence conveys an evaluation, including when a statement of fact does so indirectly. On the English test set, joint training raises mean macro F1 from 37.8 to 42.4 compared with training the sentence classifier alone. On the Norwegian test set, it raises the same measure from 51.2 to 52.8. Macro F1 gives each class equal influence, so the size of a class does not determine its weight in the final score.

The gains come from changes in which labels the classifier chooses. On the English test set, the jointly trained classifier improves mainly on neutral and strongly positive or negative sentences, while doing worse on the intermediate positive and negative classes. On the Norwegian test set, it sends fewer sentences that contain no evaluation to the ordinary evaluative class. A separate comparison shows that the ability to reproduce word labels from the lexicon can diverge from the ability to classify sentences. Training the word task on its own produces higher lexicon accuracy in both languages, yet joint training gives the strongest sentence results in the comparison.

Deep dive: Lexicon information in neural sentiment analysis: a multi-task learning approach

This study tests whether learning word polarity from a sentiment lexicon helps classify review sentences in English and Norwegian. · about 31 minutes to read

The problem and its context

What a word list can tell a sentence classifier

A sentiment lexicon records the orientation associated with a word before a reader sees the sentence in which it occurs. A reviewer who describes a performance as wonderful has used a word with a recognizable positive orientation. The word can provide evidence even if the rest of the sentence takes some work to understand. It also has a practical advantage as a source of knowledge. Someone can inspect the entry, decide whether the assigned label is sensible, and revise it if the intended use calls for a different judgment.

A sentence annotation answers a different question. The annotator sees how words are used together and judges the resulting expression. Negation can alter a word's contribution, an intensifier can change its strength, and the identity of the thing being described can affect the reading. A reviewer can also imply a judgment by reporting a feature of a product or situation. An inventory of positive and negative words gives some information about these sentences. The act of composing those clues into an interpretation is still part of the classification problem.

The authors describe neural sentiment systems as capable of learning many of these distinctions from annotated text and word embeddings. A learner can encounter approving language, negated praise, and intensified criticism in examples and adjust its predictions accordingly. How well it does depends in part on what appears in the training data. The authors point to rare words as one case where an explicit resource may help. A word can be uncommon in the sentences used for training and still have a well-established orientation in a lexicon.

That observation leaves open a question about where to put the extra information. A classifier can look up each word and receive a feature indicating whether the list calls it positive or negative. A system can also learn to make predictions about word polarity and let that experience influence the way it represents words. In the latter arrangement, the lexicon provides examples during training. The usefulness of those examples depends on how the word and sentence tasks share what they learn.

How earlier approaches represented sentiment

The paper traces some early sentiment classifiers to methods that scored the orientation of adjectives and aggregated those scores across a document. Such an approach needs a source for the scores. A researcher can start with a dictionary, extend a small set of labeled words through a resource such as WordNet, or use associations with favorable and unfavorable seed words. In the association-based approach described by the authors, pointwise mutual information measures whether a candidate occurs with a seed more often than their separate frequencies would suggest. The choice of seeds and the text used to estimate associations shape the resulting entries.

Lexicons also differ in what their entries describe. The paper discusses the MPQA subjectivity resource, which can mark words and expressions as positive, negative, both, or neutral. SentiWordNet assigns orientation scores to WordNet synsets, which group words by sense. A sense-based entry can keep different readings of a word separate, whereas a word-level list associates its label with the form as a whole. The English resource used in the main experiments provides positive and negative lists containing a mixture of word classes and inflected forms. SentiWordNet

Aggregation made the dependence on context visible. A score attached to an adjective can make a sensible contribution in a straightforward use, then give the wrong impression when the adjective is negated or when a sentence describes something merely possible. In the work by Taboada and colleagues discussed in the paper, the sentiment classifier combines dictionaries for several word classes with rules for phenomena such as negation and intensification. The rules specify ways in which the context can change the contribution of an entry. This gave a researcher a direct way to express linguistic knowledge about how sentiment arises from a phrase or sentence. Lexicon-Based Methods for Sentiment Analysis

The paper also discusses earlier attempts to build Norwegian lexicons. One line of work starts with manually chosen seed words and follows synonym and antonym relations in Norwegian thesauri. Those links make a graph over words, and an algorithm propagates polarity from the seeds through the graph. The same work compares the automatically constructed resources with translations of an existing list, including a manually corrected translation. Another attempt estimates polarity from word associations in newspaper and discussion-forum text. The authors describe access to the resulting resources as uneven. For a method that needs several independent lists, the availability of lexical resources is part of the feasibility of the experiment.

What earlier neural approaches shared with the classifier

A word embedding gives a neural network a vector for each word it reads. From that vector and the sentence label, the network can learn which distinctions matter to the task. The paper describes this as a common arrangement in neural natural language processing. External information involves a further design choice because a word embedding and a dictionary's polarity entry arrive in different forms. The embedding is a vector already suitable for input to the network. The polarity entry is a prior judgment that has to be represented somewhere in the computation.

Some earlier studies represented these judgments as input features. In one example reviewed by the authors, Shin and colleagues collect scores from six English lexicons and construct a vector of polarity values for each word. They test several ways to combine that vector with the word embedding in a convolutional network, including joining the inputs and treating them as separate channels. This kind of setup gives the classifier direct access to the entry for each word that has one. It also depends on an inventory of lexicons wide enough to provide the expected inputs.

Other studies used lexicons to guide attention, a way for a network to vary the influence of parts of an input when forming a representation. Some of the examples in the paper use dictionaries for negation cues or intensifiers in addition to lists of sentiment words. One treats an aspect of an item as the target of sentiment, so the applicable evaluation can depend on what aspect the system has been asked to judge. Together these studies show several ways to turn an external list into a signal for a neural classifier. They provide the background for the paper's decision to use a single polarity list for each language and to put that signal in a separate prediction task.

Why put word supervision in shared lower layers

Multitask learning gives a network prediction jobs that can draw on the same internal representations. When the jobs need overlapping information, learning either of them can encourage the shared layers to keep distinctions that are useful to the other. This also acts as a possible form of regularization. A representation shaped by more than one source of supervision has less freedom to specialize in patterns that happen to predict the labels of one training set. Whether that helps depends on the tasks and the way their parameters are shared, a question the paper connects to earlier studies of task relationships. Identifying beneficial task relations for multi-task learning

In a straightforward shared architecture, the tasks use all the same layers up to their final prediction layers. The authors instead draw on the idea that supervision for a task involving smaller linguistic units can be applied lower in the network. Word polarity is an accessible example. An isolated word can go through a short sequence of transformations and receive a positive or negative prediction. A sentence requires a further operation that allows the surrounding words to influence how each word is represented. The network can share its early transformation while giving the sentence task its own sequence-processing layers. Deep multi-task learning with low level tasks supervised at lower layers

This arrangement depends on a plausible relationship between the tasks. A network that learns which word vectors are associated with praise or criticism has learned a distinction that could matter to a review sentence. The relationship has different forms for different sentence labels. In a task about the direction and strength of sentiment, word polarity can provide evidence about the label itself. In a task about whether there is any evaluation, either favorable or unfavorable wording can be evidence for the same class. There is also room for a factual statement whose evaluative force comes from what it tells the reader in a particular review.

The method, step by step

From labeled words to a shared representation

The architecture begins with the same operation for a lexicon entry and for a word in a review sentence. The network takes the word's embedding and passes it through a shared, fully connected layer. A fully connected layer lets each component of its output depend on all the components of its input. The result is a vector with coordinates that training can shape for the tasks at hand. For a lexicon example, the input is a single word with a polarity label. For a sentence example, each word goes through the same shared transformation before the sentence branch considers the sequence.

The two training targets sit at different depths. The word branch uses a feed-forward network, in which information moves from input towards a prediction without a recurrent connection over a sentence. It uses rectified linear units, or ReLUs, which keep positive activations and set negative ones to zero. A final softmax turns the branch's scores into a distribution over the word labels. For an entry in the positive list, the training target is positive, and the negative list supplies the corresponding negative targets.

The sentence branch takes the projected vectors in sentence order. It uses a bidirectional long short-term memory network, abbreviated BiLSTM. A long short-term memory network reads a sequence while carrying a state from position to position. Running it in both directions makes a word's resulting representation sensitive to what precedes it and what follows it. At each position the outputs of those two directions are joined. These joined vectors give the sentence branch a way to respond differently to a word depending on the words around it.

The next operation, max pooling, reduces that sequence to a fixed-size vector. For each coordinate it keeps the highest activation found at any position. Different coordinates can therefore retain evidence from different words or regions of the sentence. Because pooling happens after the bidirectional pass, the values being compared already reflect surrounding words. A final softmax supplies a distribution over the sentence labels for the dataset. The English and Norwegian sentence tasks each have their own applicable set of labels.

How word polarity and sentence classification share a network

The steps in order.

How word polarity and sentence classification share a networkStep 1: Read embeddings for lexicon words or sentence tokens1. Read embeddings for lexicon words or sentence tokensStep 2: Project each embedding through shared layers2. Project each embedding through shared layersStep 3: Predict positive or negative polarity for lexicon entries3. Predict positive or negative polarity for lexicon entriesStep 4: Read projected sentence tokens in both directions4. Read projected sentence tokens in both directionsStep 5: Join directional outputs at each sentence position5. Join directional outputs at each sentence positionStep 6: Pool the largest activation in each coordinate6. Pool the largest activation in each coordinateStep 7: Predict the sentence label7. Predict the sentence label

The branching matters for words outside the lexicon. Each lexicon example helps adjust a transformation that is used across words, and that transformation takes vectors as input. A sentence word with an available embedding can pass through it even if the word was never assigned a target by the lexicon. A shared transformation can in principle respond to similarities between that word's vector and vectors it encountered in the auxiliary task. This is the mechanism behind the authors' claim about generalization beyond lookup. Its reach depends on what the embeddings represent and what the shared layers learn.

Building the lexicons used for supervision

The English experiments start with the Hu and Liu lexicon, which has 4,783 negative words and 2,006 positive words. Its origin is a study of customer reviews across a range of products. Hu and Liu used part-of-speech tagging to identify adjectives in review text and selected 30 adjectives as labeled seeds. The seeds supplied examples of the two orientations. Following synonyms and antonyms in WordNet allowed them to add entries, carrying the seed polarity across synonym links and reversing it across antonym links. Repeating the process expanded the resource beyond the seeds and produced entries from several word classes.

The lexicon's origins help explain what is being transferred. WordNet contributes relations among words, and the early review corpus supplies a setting in which to identify candidate vocabulary. The output of that work is a polarity list. The sentence classifier in the present paper uses the list's labels as supervision, so the original review sentences and the routes taken through WordNet are separate from the inputs to the current experiment. Likewise, a label on a word supplies a word-level target even if the review data used for sentence classification never contain that word.

For Norwegian, the authors start by automatically translating the positive and negative lists into Norwegian. They then inspect the translations and correct them where needed. An English entry with several senses can lead to several Norwegian entries when different words express the relevant meanings. The paper gives outstandingly as an example, with Norwegian forms including fortreffelig and utsøkt. The exercise involves a judgment about which meanings are worth transferring as much as a judgment about the fluency of each translation.

The curation also removes material. The authors keep translations that fit in a single word, so an expression that needs a Norwegian phrase can fall outside the resource. They omit entries when they judge the offered polarity unsuitable or cannot find a satisfactory equivalent. The paper mentions frost among the exclusions from the negative list and dawn among those from the positive list. Entries that end up with both polarities are removed. Since the word branch learns a binary prediction for an individual entry, the curated lists give it unambiguous targets in that format.

The resulting Norwegian resource has 3,917 negative entries and 1,601 positive entries. It includes adjectives, verbs, nouns, and forms that can function as both adjectives and participles. The authors report these categories with overlap because a written form can have different grammatical roles. For instance, among entries counted as nouns, 60 in the positive list and 123 in the negative list also occur as adjectives. The counts describe properties of the lexicon, while the target given to the auxiliary classifier is polarity.

The translated list contains a mix of inflections. To make a version with wider coverage, the authors use SCARRIE, a Norwegian full-form lexicon, to recover inflected variants. The expanded inventory contains 14,839 negative and 6,103 positive forms. It also contains 4,939 negative and 2,004 positive lemmas, the canonical entries under which inflections can be grouped. The distinction between lemma and word form matters because a corpus contains the actual inflected words, and an exact lookup succeeds only when the applicable forms are represented.

The experiments reported in detail use the translated, manually reviewed list before expansion. The authors say that preliminary experiments with the expanded version gave similar results. Both versions of the Norwegian lexicon are available, and the authors also make the experimental code available. For monitoring the word task, the procedure sets aside 20 percent of each lexicon as development material. The paper gives the size of that portion as 1,357 words for English and 1,122 for Norwegian. These held-out entries provide a way to assess polarity prediction separately from sentence classification.

Connecting word and sentence examples during training

The two tasks have separate sources of labeled examples. The word branch receives entries from its training lexicon along with their polarity. The sentence branch receives token sequences and human annotations for whole sentences. A lexicon entry can train the auxiliary branch without being paired with a sentence. A sentence can train the main branch without any labels assigned to its individual words. The shared parameters are what connect the two sets of examples.

For the English system, the starting vectors are 300 dimensional pretrained embeddings from GoogleNews. For the Norwegian system, the authors use 100 dimensional skip-gram fastText embeddings trained on NoWaC, a Norwegian web corpus. Skip-gram training uses the words around a word to learn its vector. Both sets of embeddings come from the NLPL vector repository. They give the classifier an initial numerical representation of vocabulary before either kind of sentiment supervision is applied. NoWaC

After the embedding layer the authors apply dropout with a setting of 0.3. Dropout is a training-time regularizer that temporarily suppresses activations, so the network learns under varying patterns of available input. It is a separate feature of the architecture from the effect the authors attribute to joint supervision. The auxiliary task places a constraint on what the shared representation needs to predict. Dropout changes how consistently particular activations are available while the network learns.

The multitask setup alternates by epoch. An epoch is a training pass through the examples for a task. The network takes a pass through the sentence examples and a pass through the lexicon examples in turn. During a pass through one task, its predictions supply the feedback used to update its branch and the shared parameters it uses. On the next task, the shared layers start from where the earlier updates left them. The authors tried changing tasks after each batch and sampling batches uniformly from the tasks in preliminary experiments. They report that these alternatives brought no improvement.

The authors specify 10 epochs with Adam, the optimization procedure used to adjust the network's parameters. Early stopping is governed by performance on the sentence development set. The quality of the sentence predictions therefore governs when training should stop, while the separate lexicon development results show how well the word task is doing. The paper reports results from five runs with different random seeds and reuses those seeds across its comparisons. A random seed governs choices such as the initialization of parameters. Repeating runs under the same set of seeds lets readers see variation that a single training run would conceal.

Where the numeric polarity rules enter

The main branch and the word branch are specified through their layer operations. The paper also states explicit numeric rules for turning polarity into features and for preparing alternative lexicons. The direct lexicon baseline assigns a label to each word encountered in a sentence. Its rule can be written as follows.

ℓ(w) = +1 if w ∈ L₊, −1 if w ∈ L₋, and 0 otherwise

Here w is the word at a sentence position, ℓ(w) is the label assigned there, and = specifies its value. L₊ and L₋ denote the positive and negative word lists. The symbol ∈ means that the word belongs to the indicated list. The values +1 and −1 mark positive and negative matches, and 0 marks words absent from the polarity lists. In this baseline, a zero concerns lexicon membership. A word that gets a zero in this representation can still contribute to how a human reads the sentence.

Some of the English lexicons used later in the comparison have ratings from −5 to 5. The paper converts those ratings into the labels expected by the binary auxiliary task.

p(r) = positive if r > 0, negative if r < 0, and discard if r = 0

Here r is the rating recorded for an entry, and p(r) is what the procedure does with the entry. The signs > and < compare the rating with 0, and = in the last condition identifies a zero rating. A rating above zero gives a positive example, a rating below zero gives a negative example, and an entry with a zero rating is dropped. This preserves the direction of a graded rating while removing intensity as a training target. The same word branch can then be used with an originally binary list or one prepared from scalar ratings.

Experiments and results

What the sentence datasets ask the classifier to predict

For English, the authors use the Stanford Sentiment Treebank, or SST. The paper describes it as containing 11,855 sentences from movie reviews and reports pre-defined splits of 8,455 training sentences, 1,101 development sentences, and 2,210 test sentences. Crowdsourced linguistic annotation assigns sentiment at a fine-grained level. The possible labels are strong negative, negative, neutral, positive, and strong positive. The evaluation therefore tests both the direction of an opinion and, within the applicable direction, its strength. Stanford Sentiment Treebank

Sentence strength in SST is a target that the word task does not directly provide. Any positive entry in the training lexicon has the target positive, whatever degree of praise that word might suggest. Evidence for fine-grained sentence distinctions can come from the vectors, from what the network learns as it reads words together, and from the sentence annotations themselves. The architecture leaves room for a strongly positive and a mildly positive sentence to receive different labels even when both contain words with the same binary lexical polarity.

The Norwegian data come from NoReC eval, a subset of a corpus of full reviews published by Norwegian news sources. Its subject matter includes restaurants, literature, and music. The paper describes NoReC eval as containing 7961 sentences from 298 documents. Its training split has 230 documents, 5,915 sentences, and 104,350 tokens. Its development split has 33 documents, 1,151 sentences, and 20,755 tokens. Its test split has 35 documents, 895 sentences, and 16,292 tokens. The authors use the split established in the annotation study. NoReC

NoReC eval distinguishes ordinary evaluative sentences, fact-implied non-personal evaluations, and sentences with no evaluation. The paper illustrates the ordinary evaluative class with a review sentence that calls a film powerful and great. The adjectives themselves convey the favorable judgment. For the fact-implied class, the authors describe a car review that tells readers the four-wheel drive can be engaged and disengaged as needed. It describes a capability in factual terms, and the context makes that capability evaluative. The label identifies a statement used to convey an evaluation without appealing to the writer's personal experience. Annotating evaluative sentences for sentiment analysis

The Norwegian labels specify whether and how a sentence evaluates. They leave open the polarity of that evaluation. A sentence can contain several expressions with mixed orientation, which is part of the rationale for finding evaluative sentences first and letting finer annotation address the individual expressions. For the present experiment, that choice means that positive and negative word targets both have to transfer to a sentence task where approval and disapproval can count as instances of the same category. Sentence and Expression Level Annotation of Opinions in User-Generated Discourse

Baselines that use the lexicon in different ways

The single-task system, STL, provides the most direct comparison with the multitask system, MTL. STL uses the same sentence architecture and trains it from sentence labels. MTL gives the shared layers additional supervision from the word-polarity task. Both can use word embeddings and contextualize the resulting vectors through a BiLSTM. Comparing them measures the effect of introducing the auxiliary training procedure into this architecture, with the same sentence task and the same language-specific inputs.

The lexicon embedding system, Lex-Emb, asks whether the supervision can be applied in a separate stage. It first trains the feed-forward word classifier on the lexicon and uses that stage to update the original word embeddings. It then joins those learned sentiment embeddings to the original embeddings before handing the combined representation to the sentence BiLSTM. The remaining parts of the sentence system follow STL. The original vectors thus still provide general word information while the extra vectors bring features acquired through prior polarity training. MTL instead lets both tasks shape the shared representation as training alternates.

The authors also train linear support vector machines, or SVMs. In a linear SVM, features have weights, and the resulting weighted scores support a classification decision. For the Lexicon baseline, the features come from the sequence of positive, negative, and unmatched word labels. Its view of a sentence is entirely in terms of lexicon matches. That makes it a test of how much sentence discrimination the match patterns can support on their own.

The bag-of-words baseline, BoW, gives the linear SVM a representation based on individual words in the sentence. That representation supplies word identity while discarding word order. BoW + Lexicon adds features for the total occurrences of positive and of negative lexicon words. Those features can capture a broad pattern across sentences even when different sentences use different words with the same orientation. The SVM parameter that the paper calls c is selected for each baseline on the development split. The test data then supply the reported scores.

The metric and the comparisons on the test sets

The primary metric is macro F1. Within a class, precision describes how many items predicted as that class belong there, and recall describes how many items that belong there receive the label. F1 summarizes the balance between precision and recall. Macro averaging gives the resulting class scores equal weight. As a result, an improvement affecting a relatively uncommon class can matter even if it changes few of the decisions counted by overall accuracy.

The authors choose this metric because they suspect lexical supervision may be useful to minority classes. They note that SST studies frequently report accuracy, the overall proportion of correctly labeled test items. As an illustration of the difference between the measures, the paper gives 40.1 macro F1 and its corresponding 46.7 accuracy for SST in their setup. That is an example of how the measures relate for a set of predictions. It does not establish a conversion that can be applied to the entries in the results charts.

Sentence classifiers on the SST test set by macro F1

Joint training leads the comparison, with direct lexicon counts strengthening the bag-of-words baseline.

Sentence classifiers on the SST test set by macro F1Lexicon: 14.7Lexicon14.7Bag of words: 37.4Bag of words37.4Bag of words with lexicon counts: 38.9Bag of words with lexicon counts38.9Lexicon embeddings: 34.7Lexicon embeddings34.7Single-task training: 37.8Single-task training37.8Multi-task training (this paper): 42.4Multi-task training (this paper)42.4
The numbers
System or settingmacro F1
Lexicon14.7
Bag of words37.4
Bag of words with lexicon counts38.9
Lexicon embeddings34.7
Single-task training37.8
Multi-task training (this paper)42.4

On SST, BoW is close to STL. It scores 37.4 macro F1 on the test set, against the single-task mean of 37.8, a difference the paper reports as 0.4 percentage points. With the polarity counts added, BoW + Lexicon reaches 38.9. It beats BoW by 1.5 percentage points and exceeds the single-task BiLSTM by 1.1 percentage points, both differences reported by the authors. That result gives the neural comparisons a meaningful reference point. Information about the number of positive and negative words can help even a classifier that represents the rest of the sentence as unordered word features.

Lex-Emb reaches a mean SST test macro F1 of 34.7. It is the weakest of the neural systems on this dataset. The SVM using only lexicon labels scores 14.7 and is lower overall. MTL reaches 42.4 and leads the next-best system, BoW + Lexicon, by the paper's reported 3.5 percentage points. The test macro F1 standard deviations across the neural runs are 1.1 for Lex-Emb, 3.1 for STL, and 3.2 for MTL. The ordering of the means and the spread across runs describe different aspects of the results.

Sentence classifiers on the NoReC eval test set by macro F1

Joint training has the highest mean, followed by the sentence classifier trained on its own.

Sentence classifiers on the NoReC eval test set by macro F1Lexicon: 37.2Lexicon37.2Bag of words: 45.0Bag of words45.0Bag of words with lexicon counts: 45.8Bag of words with lexicon counts45.8Lexicon embeddings: 48.9Lexicon embeddings48.9Single-task training: 51.2Single-task training51.2Multi-task training (this paper): 52.8Multi-task training (this paper)52.8
The numbers
System or settingmacro F1
Lexicon37.2
Bag of words45.0
Bag of words with lexicon counts45.8
Lexicon embeddings48.9
Single-task training51.2
Multi-task training (this paper)52.8

On NoReC eval, the BoW test result is 45.0 macro F1, and adding the two lexicon counts raises it to 45.8. The paper gives the change as 0.8 percentage points and suggests that direct counts are less informative for these labels than for those of SST. Counting sentiment words can help identify obvious evaluations. A factual statement whose usefulness or desirability is implied may share much of its vocabulary with one bearing no evaluation. The authors use this difficulty to explain why the Norwegian BoW baseline trails the sentence network more clearly.

Lex-Emb scores 48.9 mean macro F1 on the Norwegian test set, placing it above the non-neural baselines and below STL. STL reaches 51.2, and MTL reaches 52.8. The reported lead over the next-best system on this dataset is 1.6 percentage points. For the Norwegian test results, the standard deviations over the neural runs are 0.1 for Lex-Emb, 2.6 for STL, and 2.9 for MTL. The roles of the baselines differ across the datasets. In English, the strongest baseline brings together unigrams and direct lexical counts. In Norwegian, it is the same contextual sentence architecture trained from sentence data alone.

What the ablations show

Joint supervision and separately trained polarity features

The comparison of MTL with STL removes the lexicon prediction task while keeping the sentence architecture. This is the central controlled comparison. The sentence classifier by itself can learn from the review labels and from its starting word embeddings. Reintroducing the auxiliary task raises the mean macro F1 on both sentence test sets. The result locates the gain in a change to training within this architecture. The gain includes whatever effect the word labels and the alternating updates have together on the shared layers.

Lex-Emb offers another comparison by keeping a source of learned polarity information and changing how that information arrives at the sentence branch. In the sequential setup, the word objective produces an embedding to accompany the original word vector. In the joint setup, the two objectives contribute to a common transformation. Joint training gives higher sentence scores on both test sets. The comparison also changes how the sentence input is constructed, so its result applies to the full joint and sequential arrangements used here.

The auxiliary scores make the relationship between the tasks clearer. On the English Hu and Liu lexicon, Lex-Emb reaches 87.1 mean word-polarity accuracy with a standard deviation of 0.2, while MTL reaches 86.7 with a standard deviation of 0.2. The difference is 0.4 percentage points as reported by the authors. On the translated Norwegian lexicon, Lex-Emb reaches 87.5 with a standard deviation of 0.2 and MTL reaches 72.4 with a standard deviation of 3.9. The paper reports a difference of 15.1 percentage points. These are word-level results for the reserved lexicon evaluation, separate from the review sentence test scores.

A polarity classifier that is trained on the lexicon alone can specialize in recovering its labels. In the joint arrangement the representation is also being adjusted to solve the sentence task, and stopping depends on the sentence development set. The authors interpret the larger separation on Norwegian word accuracy as a possible consequence of task similarity. A binary polarity target is relatively close to the English sentence question about sentiment. For Norwegian, the main question is what kind of evaluation, if any, the sentence conveys, so the word distinction has a less direct relation to the main target. The observed rankings show that better isolated word prediction is an unreliable proxy for better sentence classification in these experiments. Task similarity is the authors' explanation for why the relationship differs in size.

What changes when the English lexicon changes

The authors repeat the joint SST experiment with alternative English lists. The source of the auxiliary labels changes while the sentence dataset and the general training arrangement stay in place. SO-CAL was manually compiled using words from several review domains. SO-CAL Google derives from a small group of seed words, association measures, and search-engine queries. NRC Emotion was compiled through crowdsourcing and includes polarity annotations as well as emotion information. The Hu and Liu lexicon is the source used in the main English experiment.

For NRC Emotion the existing binary polarity annotations fit the task. For the two SO-CAL resources, the authors convert scalar ratings to binary targets and exclude neutral entries. These preparation decisions make performance across resources easier to compare under a common word objective. They also mean that this experiment compares how the prepared word lists work as polarity supervision. It does not test the additional distinctions those resources could supply in other arrangements.

English auxiliary lexicons and SST test macro F1

The larger word lists give similar results, while the smallest list performs close to single-task training.

English auxiliary lexicons and SST test macro F1Single-task training: 37.8Single-task training37.8Multi-task with SO-CAL Google: 37.9Multi-task with SO-CAL Google37.9Multi-task with SO-CAL: 41.3Multi-task with SO-CAL41.3Multi-task with NRC Emotion: 41.5Multi-task with NRC Emotion41.5Multi-task with Hu and Liu (this paper): 42.4Multi-task with Hu and Liu (this paper)42.4
The numbers
System or settingmacro F1
Single-task training37.8
Multi-task with SO-CAL Google37.9
Multi-task with SO-CAL41.3
Multi-task with NRC Emotion41.5
Multi-task with Hu and Liu (this paper)42.4

The comparison gives 1,691 auxiliary tokens for SO-CAL Google and a mean SST test macro F1 of 37.9 with a standard deviation of 0.3. SO-CAL has 4,539 auxiliary tokens and reaches 41.3 with a standard deviation of 3.1. NRC Emotion has 4,460 and reaches 41.5 with a standard deviation of 3.1. The Hu and Liu setting has 5,432 and reaches 42.4 with a standard deviation of 3.2. These are the token counts reported for the auxiliary settings in this comparison. The separate English lexicon description gives the positive and negative inventories of the underlying Hu and Liu resource.

The authors observe that all the lexicons with more than 4,000 words yield similar SST results. They take this as evidence that the setup can use supervision from several sources and suggest that size may matter more than the precise content of a list. Size changes alongside other properties in this comparison. For instance, the SO-CAL resources have different construction procedures as well as different entry counts. The strongest evidence here is that the English result survives the use of other substantial lists. A comparison using different samples from the same lexicon would address the more specific question of how much the number of entries contributes.

Which sentence labels gain and which lose

To look beyond the overall score, the authors compare confusion matrices for STL and MTL. A confusion matrix groups predictions by the correct label and the predicted label. Hits for a class sit in the cell where those labels match, and other cells identify particular types of error. The authors collect predictions across all five runs, then show how the counts in each cell change with multitask training. A positive change means that a particular combination of correct and predicted labels occurs more frequently with MTL. If that combination is an error, an increase is unfavorable.

On SST, the gain is concentrated in neutral, strong positive, and strong negative. The intermediate positive and negative classes fare relatively worse. The classifier also uses these intermediate predictions less often overall. The outcome is somewhat counterintuitive for a method trained with binary lists of positive and negative words. Those training targets might suggest a broad gain on sentences with either polarity. The actual changes show that the new representation influences how the classifier distinguishes degrees of sentiment and uses the neutral category, with costs as well as benefits across the labels.

The examples in the paper make these shifts concrete. One movie-review fragment combines a couple of light compliments with the judgment that the film is forgettable. The human label is neutral. The single-task classifier calls the fragment negative, and the multitask classifier predicts neutral. In another example, a reviewer describes the film affectionately while conceding some unsettling moments. The correct label is positive. Adding the word task changes the prediction from negative to positive. These are instances where the final sentence decision gets closer to the annotation even though the wording contains cues that could pull in different directions.

Other examples show why the shift towards neutral cannot be read as a gain in every case. A reviewer praises a film by describing it as art honoring art. The single-task classifier identifies the positive label, while the jointly trained one calls it neutral. In a sentence about Undercover Brother, a reviewer faults the film for failing to go far enough. The single-task prediction is correctly negative, and the multitask prediction again moves to neutral. These decisions show what can happen when a system becomes more willing to assign a neutral label. The examples record the changes in output, while the representations inside the network could support several explanations of how each decision arose.

On NoReC eval the confusion changes are smaller in absolute terms. The authors highlight a reduction in sentences with no evaluation that are incorrectly predicted as evaluative. They also report that the joint classifier uses the majority label less frequently and makes more predictions for the fact-implied and non-evaluative classes. That is a different kind of shift from moving between mild and strong sentiment. It concerns where the network locates the boundary between explicit evaluation and other uses of review language.

The authors read the shifts towards minority classes as consistent with a regularizing effect. A shared layer that has to support word polarity as well as sentence classification may become less tied to patterns that favor the most frequent sentence labels. The confusion analysis gives an observable counterpart to that interpretation by showing which decisions move. Since it follows the predictions of complete trained systems, it describes the result of the changed training procedure more directly than the specific internal mechanism behind each change.

Limitations

Boundaries the authors identify

The authors limit the auxiliary task to positive and negative labels on single words. A graded sense of intensity or information about particular emotions could give the shared layers a different signal. Their proposed extension is regression, where the target is a numerical value such as a strength rating. That would let the word objective preserve distinctions that are discarded in the binary conversion. Its usefulness would still have to be judged on the sentence decisions it is intended to improve.

They also identify room to use sub-word structure and multiword expressions. A word such as unimpressive has internal structure relevant to its orientation. An expression such as saying that something is outside one's tastes can convey an evaluation across several words. The auxiliary objective used here is defined over standalone entries and supplies no separate supervision for those internal pieces or for entire phrases. The sentence branch reads sequences, but access to surrounding words in the sentence task is different from having a curated phrase-level auxiliary resource.

Targeted and aspect-level sentiment are further directions the authors name. A whole-sentence label describes the sentence as an item in the dataset. An aspect-level prediction asks which evaluation applies to a specified feature of an item, such as a feature of a car under review. Several features can be evaluated differently within the same sentence. The reported experiments provide evidence for whole-sentence predictions on their respective targets. The suggested applications to aspects and to other kinds of external knowledge are questions for future experiments.

Boundaries that follow from the comparisons

Language and sentence task vary together. The English benchmark asks for fine-grained sentiment in movie reviews. The Norwegian data ask for forms of evaluation across a range of review domains. The starting embeddings and the source lexicons also differ. The authors' task-similarity explanation for the difference in auxiliary accuracy is plausible because the labels themselves make the relationship visible. The experimental design leaves language, data source, lexical coverage, embeddings, and task definition entangled. A comparison with matching sentence targets in both languages would bear more directly on the contribution of task similarity.

The word-level evidence also has a specific scope. Holding out lexicon entries measures whether the word classifier can predict their assigned labels from the representations it receives. At the sentence level, the architecture can process represented words beyond the list. The reported sentence results are aggregated over all test sentences, without a separate score for sentences relying on out-of-lexicon sentiment words, for rare words, or for words seen only at test time. The mechanism supports generalization beyond lookup, while the evaluation leaves the size of that particular contribution open.

The experiment with alternative English lexicons has a similar boundary. Size, vocabulary, domain of origin, and annotation procedure are properties of the whole resource being changed. Similar scores for the larger resources show that the method can make use of several lists in this English setting. They give only indirect evidence about the importance of size by itself. In Norwegian, the authors describe the direct translation and the inflection-expanded list as producing similar preliminary results without presenting detailed scores for that comparison. The release makes the distinction between the resources concrete, but the reported evaluation gives limited evidence about the effect of full-form coverage.

The neural results represent variation across training runs through means and standard deviations. The paper reuses seeds, which improves the comparability of runs. The reported spread gives readers some sense of sensitivity to training, especially alongside the smaller lead on NoReC eval. The results are presented as descriptive comparisons of scores. The paper gives no significance test and no per-seed differences from which to judge how consistent the lead is under paired runs.

Finally, the comparison with STL manipulates the full auxiliary training procedure. With MTL, the shared layers receive more supervised updates on different examples, and those examples carry meaningful word-polarity labels. Without an auxiliary task of comparable size and schedule carrying unrelated labels, the evaluation cannot isolate the amount of improvement attributable specifically to semantic polarity supervision. The stronger results with several relevant English lexicons and the distinct word and sentence rankings characterize what happens in the tested setups. A finer causal account of the regularizing effect would require controls for the content and frequency of the auxiliary updates.

What came after

SKEP: Sentiment Knowledge Enhanced Pre-training for Sentiment Analysis (2020) cites the study and places sentiment knowledge in a pretraining approach. This moves the question of where sentiment supervision enters to an earlier stage of training. In Barnes and colleagues’ experiments, the word-polarity objective alternates with a particular sentence-classification objective, and both shape a shared representation while the sentence classifier learns. SKEP’s stated focus is on using sentiment knowledge while learning the representations that will be available for sentiment analysis. The connection is the use of sentiment knowledge to shape what a neural classifier can draw on internally, with the two studies framing that role at different stages of learning.

Cite

Cite as Jeremy Barnes, Samia Touileb, Lilja Øvrelid and Erik Velldal. 2019. Lexicon information in neural sentiment analysis: a multi-task learning approach. Proceedings of the 22nd Nordic Conference on Computational Linguistics.

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

@inproceedings{barnes2019lexicon,
  title = {{Lexicon information in neural sentiment analysis: a multi-task learning approach}},
  author = {Jeremy Barnes, Samia Touileb, Lilja Øvrelid and Erik Velldal},
  booktitle = {Proceedings of the 22nd Nordic Conference on Computational Linguistics},
  year = {2019},
  url = {https://aclanthology.org/W19-6119/}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/barnes-2019-lexicon-information-neural-sentiment-analysis/