Elamur Research

A Dataset and BERT-based Models for Targeted Sentiment Analysis on Turkish Texts

Paper · 2022 · Mustafa Melih Mutlu and Arzucan Özgür

Summary

When a service goes down, someone can welcome the interruption and still describe an experience that reflects poorly on the service. One tweet in Mutlu and Özgür’s study expresses relief at getting a break from WhatsApp notifications after an outage. The annotators judge the message as positive overall and assign WhatsApp a negative label. If the question is what the writer says about WhatsApp, the second judgment is the relevant one. The paper studies how to train a classifier to make that distinction in Turkish, a task known as targeted sentiment analysis.

The authors build a collection of 3952 tweets by searching for 6 selected companies and brands. Native Turkish speakers assess each retained tweet from both perspectives, choosing positive, negative or neutral for the whole message and again for the designated target. The two answers differ in 21% of the collection. Keeping both judgments lets the authors train a conventional sentiment classifier and a targeted classifier on the same material. It also lets them identify the tweets on which getting the overall sentiment right would give the wrong answer about the target.

The experiments use BERTurk, a pretrained Turkish version of BERT. One variant keeps the ordinary sentence-classification design and learns from the target labels. The other targeted variants also put a special marker before and after the selected name. They differ in where they obtain the information used for classification. One uses BERT’s ordinary sentence position, one uses the position of the opening marker, and one combines features from the name and its boundaries. On the full test set, that combined representation leads at 0.669 macro F1, which gives equal weight to the scores for the three sentiment classes. The conventional classifier trained on the same tweets with overall labels scores 0.591 against the target judgments.

Among tweets with different overall and target labels, the opening-marker variant leads at 0.459 macro F1. The corresponding score for the conventional classifier trained on the new collection is 0.256. Every target-trained variant exceeds both baselines on this evaluation, and all systems score lower here than on the full test. The results show that supervision and explicit marking help with sentiment about a designated mention, while the best place to read the encoder depends on which tweets are being evaluated. Each tweet supplies a judgment for a single selected target, leaving the broader task of finding and evaluating every target in a message open.

Deep dive: A Dataset and BERT-based Models for Targeted Sentiment Analysis on Turkish Texts

A Turkish Twitter dataset and BERT experiments show how marking a brand or company helps distinguish sentiment about it from a tweet’s overall tone. · about 34 minutes to read

The problem and its context

What the sentiment is about

A sentence-level sentiment judgment compresses a passage into a broad evaluation. That can serve someone interested in the general tenor of a set of messages. A reader investigating opinions about a particular product needs the judgment to identify its subject. The paper illustrates the difference with a customer who approves of a brand’s phones and dislikes its laptops. The praise and criticism are both part of the passage. Where a broad judgment compresses them into a single category, a targeted judgment pairs the favorable assessment with the phones and the unfavorable assessment with the laptops.

The difficulty begins with the assignment of evidence. A word or phrase can convey approval clearly while leaving a classifier with the further question of what is being approved. In the product example, the surrounding clauses help assign each opinion to its product. The task calls for preserving those associations all the way to the output. If a classifier recognizes praise and criticism but attaches them to the opposite products, it has found the polarity cues and failed at the targeted judgment.

An opposing view of two products is one way sentiment can vary within a message. The WhatsApp tweet shows a different relationship. The writer welcomes an effect of the outage, a respite from notifications. The event that produced that respite still says something unfavorable about the service. There is a coherent reading under which the writer’s immediate reaction is favorable and the reference to WhatsApp receives an unfavorable assessment. The difference comes from the scope of the judgment, even though both readings concern the same event.

Some messages make the assignment easy. A short expression of approval with the designated brand as its subject may give substantially the same evidence for a whole-message label and a target label. This is part of what makes the targeted task difficult to evaluate. A broad sentiment classifier can correctly label such examples from a general reading of the message. The correct answer is compatible with the targeted task, but the prediction gives little evidence about the classifier’s ability to find the relevant opinion when the surrounding tone pulls in a different direction.

The authors motivate sentiment analysis by the volume of opinion people express online and the interest that researchers, companies and governments have in it. The distinction between general tone and a judgment about an entity matters when people use these messages to answer a specific question. A search can retrieve posts that mention a company. The fact of a mention tells the reader which posts to inspect. The sentiment task begins when the reader needs to know whether a post says something favorable, unfavorable or neutral about that company.

A resource labeled for conventional sentiment analysis can contain the right subject matter and still offer the wrong supervision for that purpose. If its positive labels refer to how a message comes across as a whole, those labels give the learning procedure no explicit way to distinguish approval of a brand from approval of something that happened because of it. When the two judgments happen to match, the distinction stays hidden in the training data. When they diverge, the conventional label points to a different answer. The authors address that mismatch through a linguistic annotation scheme that records both judgments for the same text.

How earlier work connected a target to its context

The early approaches described in the paper used rules and hand-designed features to represent relationships between the target and the words around it. These techniques placed an explicit burden on the designer to decide which properties of a sentence would help assign sentiment. The problem they were trying to solve remains recognizable in the present experiments. A system may have plenty of context in its input while still needing a way to associate the relevant part of that context with the selected name.

The paper then describes the move to recurrent networks, which build representations by passing information through a sequence or a structured arrangement of words. The authors cite work reporting improved results over earlier approaches, including a recursive network for target-dependent sentiment on Twitter. In this line of research, the representation used for a judgment can be learned from examples. The organization of the network still matters because it determines how information about the target and its surroundings comes together. One example in the paper’s account is the adaptive recursive network for target-dependent Twitter sentiment.

Other recurrent designs gave the text on either side of a target separate treatment. The paper describes an approach by Tang and colleagues that encodes the left and right contexts with separate networks and then brings those representations together. The position of the target therefore determines how the sentence is organized for the classifier. A phrase expressing an opinion can occur before the target or after it, and both parts of the input have a route into the final judgment. This is the design explored in Effective LSTMs for Target-Dependent Sentiment Classification.

The authors also discuss recurrent approaches that use attention to represent the connection between the target and individual words. In this setting, attention gives the classifier a way to draw on different parts of the context according to their relevance to the target. Suppose a message contains praise for one item and criticism of another. The design question is how to give the features for the chosen item greater influence on its judgment. The paper identifies this as a motivation for work such as the attention-based LSTM for aspect-level sentiment.

The historical account then turns to the Transformer, whose encoder and decoder use self-attention. In self-attention, a representation at one position draws information from other positions in the input. BERT uses the encoder side of this architectural development and represents words or pieces of words in light of their context on both sides. For a classification task, that creates a practical choice. A final representation at a position reserved for the sentence can draw information from the rest of the input, and a final representation placed beside a particular name can also become sensitive to what surrounds it. The authors trace this development to Attention Is All You Need and Transformer and attention.

By the time of this study, BERT had already been used for sentiment analysis. The earlier applications the authors cite include an approach that constructs an additional sentence for aspect-based classification and another that applies BERT to end-to-end aspect analysis. These papers appear in the account as examples of adapting a general encoder to sentiment tasks that require a more specific output than the overall polarity of the input. Mutlu and Özgür ask a narrower design question about where to identify a supplied target and where to obtain features for classifying its sentiment. The cited examples include BERT for aspect-based sentiment with an auxiliary sentence and BERT for end-to-end aspect-based sentiment analysis.

Why the Turkish data matter

The authors describe sentiment research as having concentrated on English and point to earlier work in which approaches that did well in English did not necessarily achieve comparable performance in Turkish. Their immediate concern is the availability of labeled material. Collecting a large body of relevant writing and deciding how to label it are separate tasks. The second requires judgments about what a message expresses and, for targeted sentiment, what the expression concerns. The effort involved in making those judgments is a reason that usable data can remain scarce even when there is a great deal of text online. This is the paper’s setting within work on low-resource languages.

The authors describe an existing Turkish Twitter dataset, BounTi, built around a set of universities. Its tweets were annotated with attention to opinions about those institutions, and the researchers used it to adapt BERT for Turkish sentiment classification. This supplies a precedent for retrieving messages by entity and then making a judgment about the entity. It also gives the present paper a Turkish classifier to evaluate when the messages instead concern companies and brands.

The new collection addresses a particular experimental need. It keeps the tweet fixed and varies what the label asks about. If the authors trained a sentence classifier on one corpus and a targeted classifier on an unrelated corpus, differences in performance could reflect the kinds of messages available to each. Giving both labels to each retained tweet permits a closer comparison. The same material can supply examples of sentence sentiment and target sentiment, and the same target judgments can be used to evaluate predictions from classifiers trained for either purpose.

The paired labels also determine what kind of analysis becomes possible after training. A collection containing only target judgments could measure overall success at predicting those judgments. With both fields available, the authors can ask whether the results change on tweets where the two legitimate readings yield different labels. That comparison motivates the architecture experiments as well as the data collection. The authors need an encoder that can use a clue about which name to consider and an evaluation in which using that clue can matter to the answer.

The method, step by step

From a document to a sentiment judgment

The paper starts with a general definition that allows a document to contain several entities. Some of those entities are targets, meaning they are selected for a sentiment judgment. The desired output associates each target with the sentiment that the text expresses about it. A customer’s two evaluations of phones and laptops would therefore require separate entries, one for each target. The experiments use a more restricted case. Each tweet has a designated target, and the classifier is evaluated on its prediction for that target.

The first expression introduces the document as a collection of words.

D = {w₁, …, wₖ}, k ∈ ℤ⁺

D names the document. A w denotes a word, w₁ identifies the first listed word, and wₖ identifies the last. The subscript ₖ uses k, the number of words in the document. The braces group the entries, … stands for the intervening entries, and = assigns the collection to D. Commas separate entries and introduce the condition on the word count. In that condition, ∈ means “belongs to,” and ℤ⁺ denotes the positive integers, with ⁺ restricting the integers to positive values.

The next expression identifies the entities within the document.

E = {e₁, …, eₗ}, l ∈ ℤ⁺

E names the entity collection and each e denotes an entity. The subscripts on e₁ and eₗ indicate the first and last entries displayed, and l is the entity count. The braces group the entities, the ellipsis … represents the entries between the displayed ends, and = defines E. The commas divide the listed entries and separate the definition from its condition. The membership sign ∈ places l in ℤ⁺, the set of integers restricted by ⁺ to positive values.

The paper then defines the targets by selecting from those entities.

T = {t₁, …, tₘ}, tᵢ ∈ E, m, i ∈ ℤ⁺

T is the collection of targets, and t denotes a target. The displayed first and last entries are t₁ and tₘ, where m gives the number of targets. The ellipsis … represents the intervening targets, the braces enclose the collection, and = gives the definition. The index i identifies a particular target tᵢ. The condition tᵢ ∈ E uses ∈ to say that the target belongs to the entity collection E. The final membership condition puts m and i in ℤ⁺, the positive integers. The commas separate entries or conditions.

The output for a target takes the form of a pair.

(sᵢ, tᵢ)

The parentheses group the two entries, and the comma separates them. sᵢ is the sentiment toward tᵢ, the target at index i. The shared index associates one sentiment with the corresponding target. In the annotation scheme used for the tweets, the possible values of sᵢ are positive, negative and neutral.

These expressions distinguish the word sequence, the entities mentioned in it and the entities that call for a judgment. There can be several names in the input even when the experiment asks about only one. The target may also take up several positions in the word sequence. Marking the span where it appears gives the encoder an explicit signal about the intended judgment while leaving surrounding words available as evidence. The classification step then produces a category associated with that supplied target.

From tweet collection to targeted classification

The steps in order.

From tweet collection to targeted classificationStep 1: Retrieve tweets around selected companies and brands1. Retrieve tweets around selected companies and brandsStep 2: Assign overall and target sentiment labels2. Assign overall and target sentiment labelsStep 3: Review disputed labels and prepare retained tweets3. Review disputed labels and prepare retained tweetsStep 4: Use plain text or bracket the target4. Use plain text or bracket the targetStep 5: Encode the full input with BERTurk5. Encode the full input with BERTurkStep 6: Select or pool contextual token representations6. Select or pool contextual token representationsStep 7: Score the sentiment classes with softmax7. Score the sentiment classes with softmax

How a tweet gets two labels

The authors collect tweets through Twitter’s official API by making a separate search for each of 6 selected companies and brands. The resulting dataset consists of 3952 Turkish tweets whose timestamps run from January 2020 to June 2020. The search gives each collection effort a subject. During annotation that subject is the entity for which the target judgment is made, even if the post mentions other entities or spends much of its wording describing a situation involving the writer.

Each retained example records an overall sentiment label and a sentiment label for the target. The label vocabulary is identical in both cases. Positive, negative and neutral describe the overall message under the first interpretation and the writer’s presentation of the selected entity under the second. Sharing the label vocabulary makes the answers directly comparable. A pair of positive labels means that the two judgments landed in the same category. A positive and a negative label means that changing the scope changed the recorded polarity.

The paper illustrates agreement between the labels with a tweet favoring the taste of Coca-Cola. The judgment about taste concerns the selected brand and also supplies the favorable tone of the short message. In the WhatsApp example, the judgments part company. The outage is the basis for the annotation about the service, and the writer’s relief is the basis for the overall assessment. These examples show why the collection records two answers even when the second field sometimes repeats the first. Agreement is a possible outcome of asking the two questions, and the disagreement examples make their different purposes visible.

A native Turkish speaker who is one of the authors and a native Turkish-speaking volunteer annotate the tweets independently. They review the cases in which their judgments conflict. Items are retained when the annotators arrive at agreement, with unresolved conflicts excluded. The paper reports inter-annotator agreement of 0.855 using Cohen’s κ. This statistic measures consistency between categorical judgments while accounting for the agreement that can be expected by chance. The reported coefficient describes agreement in the annotation process. The review and exclusion procedure governs which judgments become the labels used in the experiments.

The paper reports that negative tweets predominate for each selected target. Across the collection it gives class proportions of 19% positive, 58% negative and 23% neutral. The authors suggest that a bad experience may give customers more reason to post about it. The label frequencies describe the sampled messages. The proposed explanation concerns the behavior that might have produced those frequencies and is presented as a possibility.

The split allocates 65% of the data to training, 20% to testing and 15% to validation. The authors divide the collection randomly and keep the label distributions in the resulting portions similar to that of the entire dataset. The training portion provides annotated examples for adapting the classifier. The testing portion provides the messages used in the full test comparison, and the validation portion is held separately in the split. Having both labels in the collection makes it possible to change which judgment supplies the supervision without changing the source of the training text.

The public release contains tweet identifiers and labels. The authors restrict distribution to those fields in accordance with Twitter’s terms. The identifiers specify the posts from which the judgments were obtained, while the paired labels preserve the difference between the two annotation tasks.

Preparing the input and marking the target

The paper describes the source material as including informal grammar, slang, acronyms and characters used in Twitter conventions. Before classification, the authors delete web addresses and account mentions. They remove the hash sign from a hashtag and retain its wording. There are two reasons for treating hashtags this way. A hashtag can express an opinion that matters to the sentiment judgment, and it can contain the name that the authors selected as the target. Keeping its textual part preserves both kinds of information when they occur.

This preparation is distinct from the decision to add a target marker. All input variants work with prepared tweets. In the ordinary input format, the authors make no further modification to indicate the target. A name can still be visible in the tweet and contribute to the prediction. Its presence as text is different from an instruction that the judgment should concern that name. That distinction is important for interpreting T-BERT, the variant that learns from target labels while using the ordinary input format.

In the marked format, the authors place [TAR] immediately before the target and repeat [TAR] immediately after it. The entire name remains available between those markers. A name containing more than one word is bracketed as one span, as the Coca-Cola example illustrates. The opening and closing boundaries use the same symbol. Their order in the sequence establishes which occurs first and which follows the name. This supplies both the identity of the mention, through its text, and its role, through the added boundaries.

The authors register [TAR] as a special token and resize the vocabulary so that the tokenizer recognizes it. The resulting input contains a token whose presence is deliberate and whose output position is available to the classification step. The paper compares its handling with that of [SEP], another special token recognized by BERT. Converting the prepared text and its markers into the units processed by the encoder is the role of tokenization.

The immediate inspiration is a paper on relation extraction. As Mutlu and Özgür describe it, Baldini Soares and colleagues compared ways of signaling the positions of entities to BERT and choosing the corresponding features for a relation decision. The strongest combination in that earlier work used entity markers at the input and obtained its output features from the starting markers. In the Turkish tweets, the decision concerns sentiment about a supplied entity. The transfer consists in using the same general strategy of marking an entity span and asking whether its boundary makes a useful place to read context. The relation extraction study is Matching the Blanks, an earlier application in information extraction.

Where the decision gets its features

When BERTurk encodes a tweet, the final hidden layer supplies a vector at each token position. A vector is a list of feature values that the classification layer can use. Those values depend on the token and the context in which it occurs. For instance, the vector at a target boundary can incorporate information from words elsewhere in the tweet. Choosing that position for classification selects the output through which the context reaches the sentiment decision.

The ordinary readout uses the final vector at [CLS]. This special token is at the beginning of the input and provides BERT’s usual position for sequence classification. In a plain tweet, it serves as the source of features for the judgment learned from training. In a marked tweet, the same position is used, but the representation has been formed in the presence of the target boundaries. A classifier can therefore make use of a marked span through [CLS] even when it takes no vector directly from the span.

The opening-marker readout uses the final vector at the first [TAR]. It provides one vector, as [CLS] does, at a position immediately before the target. During encoding, the position can receive information from the marked name and from the rest of the tweet. The design gives the classification layer a representation centered on a known target position. Whether that position gathers features that better predict sentiment is the question the experiment addresses.

The pooled readout starts with all the final vectors from the target span, including both [TAR] positions. It takes the maximum value for each feature across those vectors. The operation yields one vector in which the maximum for one feature can come from the opening marker and the maximum for another can come from a token inside the name. The paper uses max pooling to turn a span with a variable number of positions into a single representation suitable for classification.

The distinction between the scope of encoding and the scope of pooling matters here. BERTurk processes the tweet with its context intact. Pooling selects values only from the final vectors at and within the marked boundaries. A clause later in the message can still inform the resulting vector through its effect on those contextual representations. The pooling decision concerns the source of the final features, while the encoder has access to the surrounding message that gives the target its meaning.

The three readouts end in softmax classification. Softmax converts the scores for the available sentiment categories into values that can be interpreted as a distribution over them. In every setting the categories are positive, negative and neutral. Their meaning depends on the judgment used for supervision. The in-domain sentence baseline learns the polarity of the whole tweet. A target-trained variant learns the polarity assigned to the designated entity.

Which comparison each variant makes possible

The ordinary sentence baseline built on the new dataset uses the prepared tweet without [TAR], takes its features from [CLS] and learns from the overall labels. T-BERT uses the same input and output design and learns from the target labels. The contrast shows what changing the supervision can achieve when the architecture still ordinarily treats the tweet as a sequence to classify. The existing BounTi baseline also uses [CLS] and supplies a comparison with a classifier previously adapted on another Turkish Twitter collection.

T-BERT marked uses target labels and preserves the [CLS] readout while adding the boundaries to the input. Its comparison with T-BERT puts the architectural change on the input side. In both cases there is a sentence position for the final decision, but one encoder sees which words were designated by the markers. The difference between the observed scores can be studied without simultaneously moving the output to a target position.

The two remaining targeted variants use the same marked input and target labels. T-BERT marked -TS reads the opening [TAR] position, and T-BERT marked -MP uses the maximum-pooled span. The marked [CLS] configuration supplies a reference for judging both changes. Because it already receives the span cue, the contrast concerns the output representation to which the classifier has direct access. Comparing the two direct readouts with each other asks how much the particular use of the marked positions matters.

The authors select BERTurk as the base encoder for their training. Its existing Turkish representations are adapted using the sentiment examples, a procedure known as fine-tuning. They assign class weights inversely to the class frequencies to reduce the influence of the uneven training distribution. A training example from a rarer class thus receives greater weight than one from a more common class. This changes how the examples influence learning. The later choice of macro F1 changes how performance is summarized at evaluation.

For training, the authors report a batch size of 24 examples and use AdamW, the optimizer that updates the parameters. They set weight decay to 0.1, report the learning rate as 1e − 5, and use 300 warm-up steps. The learning rate governs the scale of the updates, weight decay acts on parameter growth, and warm-up concerns the initial part of the learning schedule. These settings are given as part of the training procedure. The experiments compare the source of supervision, the presence of target markers and the choice of readout.

Experiments and results

What the evaluation asks of each classifier

The common task at evaluation is to match the human judgment for the designated target. The target-trained classifiers have been adapted for that task. The sentence baseline trained on the new collection has been adapted to predict overall sentiment, and the target labels are used when scoring its predictions here. This gives the baseline a clear role. It indicates how far the usual sentence approach can go toward answering a targeted question on the same material.

BounTi supplies a second point of comparison. The paper treats it as a conventional classifier in these experiments because it uses the ordinary [CLS] readout. Its training annotations were made with sentiment towards pre-defined universities in mind. Its scores on the new tweets therefore combine the effects of applying a classifier to a new subject domain and using its existing input and output design. The comparison using the new dataset for both classifiers gives a closer view of the role of changing the training labels.

The reported metric is macro F1. For each class, precision describes how often predictions of that class are correct, and recall describes how much of the annotated class the classifier finds. F1 balances those quantities. Macro averaging assigns the resulting score for each class equal weight. This matters in a collection where negative labels are common. It gives recovery of positive and neutral examples a defined place in the overall score, even though those labels occur less often. Since the number is a class-averaged score, it should be read as macro F1 rather than as the fraction of all tweets classified correctly.

The paper gives a comparison over the entire test portion and another restricted to examples whose sentence and target labels differ. The first measures the systems across the normal mix of cases represented in the test split. The second selects examples by a property known from annotation. Its inclusion criterion guarantees that predicting the overall label would miss the target label. The two results describe different evaluation conditions, each with target sentiment as the outcome being scored.

The full test set favors pooling

The full test comparison includes tweets whose main opinion concerns the designated entity and tweets in which the larger situation has a different polarity. All variants are scored against the target label. A correct prediction in either kind of example contributes to the reported metric. This is the broadest comparison in the paper because the test set retains the mix of agreeing and disagreeing judgments that occurs in the sampled material.

Target sentiment macro F1 on the full Turkish tweet test set

The pooled target span leads the comparison, with target supervision also helping on unmarked input.

Target sentiment macro F1 on the full Turkish tweet test setIn-domain sentence baseline: 0.591In-domain sentence baseline0.591T-BERT: 0.610T-BERT0.610T-BERT marked -TS: 0.653T-BERT marked -TS0.653T-BERT marked -MP (this paper): 0.669T-BERT marked -MP (this paper)0.669
The numbers
System or settingmacro F1
In-domain sentence baseline0.591
T-BERT0.610
T-BERT marked -TS0.653
T-BERT marked -MP (this paper)0.669

The top score is 0.669 macro F1 for T-BERT marked -MP. The other marked results are 0.659 for T-BERT marked, which reads [CLS], and 0.653 for T-BERT marked -TS, which reads the opening boundary. The differences in their positions are worth keeping explicit. Although all three receive the target cue, the component of the output used for the prediction can alter the observed ranking. On this test, the architecture that pools all the marked positions leads, and the marked sentence position comes next.

At 0.610 macro F1, T-BERT gives the lowest full-test result among the targeted variants. Its score exceeds that of either baseline. The in-domain sentence classifier scores 0.591 macro F1, and BounTi scores 0.498. The T-BERT comparison shows that training against a target judgment helps even with the ordinary input and output, while the score of the in-domain baseline gives a more demanding reference than the existing classifier from the other collection.

The two baselines also help specify the scope of the result. The lower score for BounTi is consistent with several differences between its training situation and the new evaluation. The same-collection baseline gives the stronger control because it learns from the same source of tweets and follows the same ordinary classification design as T-BERT. The comparison of those two same-collection settings provides evidence about changing the judgment learned during training. The BounTi result shows how an existing classifier performs in the authors’ new setup.

The full-test ranking supports two distinct findings about the targeted designs. The comparison between unmarked T-BERT and T-BERT marked shows that providing the target boundaries helps with [CLS] held as the readout. The comparison among the marked variants shows that pooling has the highest observed score once those boundaries are present. The opening-marker result is close to the marked [CLS] result, as the authors observe. The table gives their measured ordering on this test, which becomes important when the evaluation changes.

The opening marker leads when the labels disagree

The authors examine the cases where sentence sentiment and target sentiment require different answers. These account for 21% of the dataset. The tweet about the WhatsApp outage illustrates the inclusion rule. A classification that captures the favorable framing of the respite can agree with the sentence annotation. To score correctly in this evaluation, the classifier has to arrive at the judgment about the service. The subset is defined by this difference between judgments, regardless of the linguistic reason for it.

Target sentiment macro F1 on Turkish tweets with different sentence and target labels

The opening marker leads on the disagreement subset, and the target-trained variants retain their advantage over sentence classification.

Target sentiment macro F1 on Turkish tweets with different sentence and target labelsIn-domain sentence baseline: 0.256In-domain sentence baseline0.256T-BERT: 0.401T-BERT0.401T-BERT marked -MP: 0.444T-BERT marked -MP0.444T-BERT marked -TS (this paper): 0.459T-BERT marked -TS (this paper)0.459
The numbers
System or settingmacro F1
In-domain sentence baseline0.256
T-BERT0.401
T-BERT marked -MP0.444
T-BERT marked -TS (this paper)0.459

T-BERT marked -TS scores 0.459 macro F1, the highest value for the disagreement subset. The span-pooling variant gives 0.444 macro F1. T-BERT marked, which sends the decision through the usual sentence position but receives the boundary markers, gives 0.428. Within the marked group, both direct readouts from target-related positions score above [CLS] on this evaluation. The ordering places particular weight on the location of the representation used by the classifier, since these variants all receive the marked name.

T-BERT, with target supervision and unmarked input, gives 0.401 macro F1 on the subset. That score exceeds those of the in-domain sentence baseline, at 0.256, and BounTi, at 0.233. The relative advantage appears even before the target is explicitly bracketed. The pairs of scores for the two evaluation conditions also show that every tested approach has a lower reported result on the disagreement cases. The targeted variants offer a sizable improvement over the baselines there while still finding these tweets difficult.

A conventional classifier can score well on some agreeing examples because the correct answer to its own training question is also the correct answer to the target question. The subset removes that source of success. It does not force every prediction from a sentence classifier to be wrong. A classifier trained on overall sentiment can make a prediction different from the human overall label, and that prediction may match the target. The relevant empirical question is how well it does against the target judgments under this selection, which is what the reported baseline scores measure.

The two evaluations yield different answers about which readout leads. On the full test set the strongest result comes from combining features across the target and its boundaries. When the reference judgments diverge, the strongest result comes from the opening boundary alone. This change can matter for interpreting an aggregate evaluation. The full-test score reflects performance over the dataset as a whole, including clear opinions about the named entity. The disagreement score reflects performance where a correct reading of sentence polarity is insufficient to supply the target label.

What the ablations show

The paper compares variants that alter the training labels, the presence of target boundaries and the representations passed to classification. These contrasts provide the evidence for the proposed design. The disagreement evaluation is a separate kind of analysis. It changes the examples on which the systems are scored, so it shows how the complete classifiers behave under a more specific test of targeted sentiment.

Changing the judgment used during training

The comparison between the in-domain sentence baseline and T-BERT keeps the usual unmarked input and the [CLS] readout. It changes which annotations supply the training answers. T-BERT improves on the baseline in both evaluations. The result establishes that the ordinary classification architecture can already make better target predictions when its examples teach it to give the target judgment. This is especially informative on the disagreement subset, where agreement between the two reference labels cannot account for successful target predictions.

An unmarked classifier can still encounter the company name and surrounding evidence in its input. The collection was built around specified targets, so an unmarked tweet can offer clues about what entity is relevant. The experiment does not show which clues are responsible for T-BERT’s advantage. Its result is compatible with learning to associate opinions with names and with learning regularities of the particular collection that help predict the target annotations. What the comparison directly identifies is a gain associated with the source of training supervision in the unmarked design.

Both versions have a learning procedure intended to address class imbalance. Changing which labels supply the supervision can also change which training examples receive emphasis. The comparison thus tests the practical switch from sentence to target training as carried out by the paper. It gives less leverage on what a classifier with those scores has learned about references to entities in an individual tweet. The scores cover the outcome of classification, and the task definition gives that outcome its meaning.

Adding target markers while keeping the readout

T-BERT and T-BERT marked train on the same kind of judgments and both use [CLS] for classification. The latter sees the designated name between special tokens. It scores higher in both evaluations. This is the paper’s closest comparison for whether explicitly marking the target helps. The benefit can arise while the decision still uses BERT’s usual sentence position. Directly reading a marker is therefore unnecessary for an improvement in this particular comparison.

An encoder using self-attention can let the added tokens affect the representation at [CLS] through the contextualization process. The observed gain is consistent with the added boundaries making information about the intended name more accessible there. The authors interpret the marked variants as better able to use target-related context. Their measurement is performance against target labels. It gives an indirect indication of what the boundaries contribute, without identifying which contextual words drove particular decisions.

The marked input introduces a special vocabulary entry as well as a change to the sequence. The matched comparison tests that complete modification. It does not separately determine how much is due to the first boundary, the second boundary or recognition of the entire bracketed span as a relevant unit. Both direct-readout variants also outperform unmarked T-BERT, but those comparisons change the input and output at once. The marked [CLS] setting helps disentangle those choices by showing what the boundary cue does when the readout stays in its conventional place.

Choosing the output after the target has been marked

Comparing the three marked variants keeps the target cue available to the encoder and changes which output features the final classifier uses. The full-test results favor pooling. The opening marker, considered separately, falls slightly below marked [CLS] in the reported order. This puts a qualification on the paper’s broader interpretation that using target-position outputs helps. The full-test scores demonstrate an advantage for the pooled output among these choices, with no corresponding lead for the opening marker on that evaluation.

The disagreement subset gives stronger evidence in favor of the target-position readouts as a group. Both outperform marked [CLS] there, and the opening boundary leads pooling. At that point all the compared variants have the same kind of information about where the name is. Their difference is how the classifier receives the result of encoding that information in context. Reading the opening boundary performs best when the correct target judgment differs from the overall annotation.

The two readouts assemble evidence differently. Pooling can retain large values from different positions in the span. Reading the opening marker uses a single contextual vector and gives the encoder one specified place to represent the information the classification layer will use. These properties explain what the classifier can receive in each case. The aggregate scores leave open whether particular name lengths, sentiment categories or ways of expressing disagreement account for the observed change in rank. The paper shows which design performed better under each evaluation condition.

Testing the cases that distinguish the tasks

The paper reports that overall and target sentiment match in 79% of the collection. A full-test score includes many examples where the two annotations endorse the same prediction. In such tweets, a classifier can legitimately get the target answer right using evidence that would also be sufficient for the sentence answer. The issue for interpretation is that success in those cases cannot reveal whether the classifier would preserve the distinction when the two questions lead to separate judgments.

The subset analysis makes the answer sensitive to that distinction by construction. It gives the reader a basis for asking whether target-trained classifiers retain their advantage when a gold sentence label always differs from the target label. They do. At the same time, even the target-trained classifiers score lower under this condition. The authors interpret the decline as a sign that targeted designs may still be influenced by sentence sentiment. The fact that markers help here is consistent with their intended role, since the target name indicates which part of the overall situation calls for judgment.

This analysis selects a different group of tweets. It cannot estimate the effect of a change in sentiment scope while holding all other properties of individual test sentences fixed. The distribution of classes can differ across selections, and the ways in which opinions are expressed can also differ. A tweet describing a welcome consequence of a failure may pose difficulties beyond a simple competition between two sentiment words. The subset result measures performance on the selected cases as a group, while the architecture comparisons supply separate evidence about how the classifiers use supervision, boundaries and output positions.

Limitations

Limits the authors identify

The authors restrict their annotation and target marking to one designated entity per tweet. Other entities may appear in the text and may matter for interpreting the chosen one. When a message compares products, for example, part of its judgment about one product may be expressed through its relationship to another. The experimental setup allows the classifier to encode the surrounding text, including other names. It supplies a reference judgment for only the designated target. A prediction about another mentioned entity therefore has no corresponding annotation in this task.

This is a narrower task than the paper’s formal definition, which allows multiple sentiment–target pairs for a document. The experiments establish performance on selecting the polarity of the supplied target. A system that must recognize which entities deserve a judgment and then classify each of them would face extra decisions. Evaluating that broader task requires knowing which targets should appear in the output and which sentiment belongs to each. The authors explicitly identify multiple targets with different attitudes as an issue for future work.

The prevalence of agreement between the sentence and target labels is a second limit raised in the discussion. It gives conventional classifiers many opportunities to make a prediction that scores correctly against the target label. It also makes the high-level performance of target-trained classifiers compatible with some continued reliance on overall tone. The authors respond by evaluating the disagreement group and propose expanding the dataset with more examples of this kind. The smaller scores in that evaluation motivate their concern about the influence of sentence sentiment even after target information is added.

The authors judge the classifiers insufficiently reliable for use without human monitoring and advise checking predictions before applying them. Their experiments compare aggregate performance under the study’s conditions. The remaining errors are consequential to the type of question being asked. A mistaken positive label in the outage example would turn the writer’s enthusiasm about a side effect into apparent approval of the service. Human review is the authors’ stated boundary on how to use the system’s output.

The paper also sets out limits on data release and potential conflicts of interest. The authors state that the annotators have no affiliation with the companies named as targets. This addresses the possibility that a relationship with a company might influence how its tweets were labeled. The shared data consist of identifiers and the annotations because the authors follow Twitter’s terms for the public posts used in the study. The written text of a tweet is therefore a separate part of the material from the released judgment fields.

Limits of the evidence for transfer

The tweets were retrieved for pre-defined companies and brands over a particular period. They give the paper an empirical basis for evaluating Turkish sentiment classification within that collection. The random division and similar label distributions support a comparison on held-out messages from that setting. The paper supplies no separate test whose defining condition is that a company is absent from the training data, or that the test messages come from a later period. With the reported split, the extent of generalization to unfamiliar target names or later writing remains open.

Similarly, BounTi’s lower score does not isolate a single cause of reduced performance across collections. BounTi concerns tweets about universities and serves here as an existing classifier with an ordinary sentence readout. Its training domain, annotation setup and application to the new tweets differ from those of the in-domain baseline. The measured score indicates how the existing classifier does on the new target judgments. A direct comparison of classifiers trained for the same objective under controlled changes of domain would address a different question.

The examples also come from tweets retrieved through a targeted search. That selection gives the study access to texts in which it can seek a judgment about a known entity. It does not represent an evaluation on arbitrary Turkish text where the classifier must first discover which names, if any, are relevant. The architecture’s benefit from receiving an explicit span is evidence about classification with that information supplied. Its performance when a preceding system has to predict that span would depend in part on the quality and kinds of errors of the preceding system, which this experiment does not measure.

Limits of the labels and aggregate scores

The authors revisit divergent annotations and remove cases where disagreement persists. This produces a retained collection with an agreed reference judgment for each label. It also means that the experimental scores reflect judgments on examples the annotators could resolve under their scheme. The performance of the classifiers on items that leave informed readers divided is outside that measurement. Agreement of 0.855 provides evidence about consistency in the annotation process, but the paper does not report separate agreement figures that would show which classes or which of the two judgments gave annotators the most trouble.

A positive, negative or neutral label gives a concise record of polarity at the chosen scope. The annotation represents each scope with a single category. A tweet that both praises and criticizes a designated entity can pose a different challenge from a tweet whose positive and negative wording concerns separate subjects. The paired annotations distinguish overall and targeted polarity. They do not record all the individual evaluations a writer can make about the same entity or show which phrase the annotators used to settle a mixed judgment.

Macro F1 gives the sentiment classes equal weight in the final aggregate. It does not reveal on its own how frequently the classifier confuses each pair of classes, or how its performance is distributed across the named targets. The paper’s reported ordering can therefore coexist with different patterns of errors. A configuration could do better under macro F1 because it recovers more of one sentiment class or because it spreads improvement across several. The published comparisons give grounds for comparing the reported aggregate outcomes, while the detailed distribution of those gains remains undetermined.

The score differences among the marked configurations also have a precision limit in interpretation. The paper reports individual scores for the conditions and describes some of them as close. It does not give variation across repeated training runs or intervals around the estimates. The highest reported score identifies the leader for that evaluation. Stability across training repetitions, changes to the split or a different sample of tweets would require additional evidence. This matters particularly when close observed results are used to draw a general preference among readouts.

Finally, the disagreement group is recognized using the two human labels. At prediction time, those judgments are ordinarily the information the classifier is intended to recover. The paper shows how the opening marker performs when evaluation is restricted to the group identified in advance by annotation. That result does not establish a way to select the opening marker for just those incoming tweets where the label scopes will diverge. It shows the relative performance of the tested choices under a diagnostic condition and leaves unresolved how much of the change in rank would persist under other ways of sampling difficult cases.

What came after

The later work identified here studies a different kind of Turkish annotation. Mutlu and Özgür label polarity about a selected entity alongside the overall polarity of the message. The later dataset concerns euphemisms in Turkish. Its citation connects the two studies at the level of work on Turkish language data. Whether the citation informed the later annotation procedure, or whether the research used the tweet labels or boundary markers, remains unknown. The documented connection is that the sentiment study is cited by Turkish Delights: A Dataset of Turkish Euphemisms.

Cite

Cite as Mustafa Melih Mutlu and Arzucan Özgür. 2022. A Dataset and BERT-based Models for Targeted Sentiment Analysis on Turkish Texts. Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics: Student Research Workshop.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2022.acl-srw.39

@inproceedings{mutlu2022dataset,
  title = {{A Dataset and BERT-based Models for Targeted Sentiment Analysis on Turkish Texts}},
  author = {Mustafa Melih Mutlu and Arzucan Özgür},
  booktitle = {Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics: Student Research Workshop},
  year = {2022},
  doi = {10.18653/v1/2022.acl-srw.39},
  url = {https://doi.org/10.18653/v1/2022.acl-srw.39}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/mutlu-2022-dataset-bert-based-models-targeted/