---
title: "Sentiment Analysis For Bengali Using Transformer Based Models"
description: "Bengali news comments, drama reviews, and book reviews test how well fine-tuned multilingual transformers classify positive, negative, and…"
canonical: "https://research.elamur.ai/free/en/papers/bhowmick-2021-sentiment-analysis-bengali-transformer-based/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/bhowmick-2021-sentiment-analysis-bengali-transformer-based/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2021](https://md.research.elamur.ai/free/en/papers/2021/) / Sentiment Analysis For Bengali Using Transformer Based Models

# Sentiment Analysis For Bengali Using Transformer Based Models

Paper · 2021 · Anirban Bhowmick and Abhik Jana

**Authors:** Anirban Bhowmick and [Abhik Jana](https://md.research.elamur.ai/free/en/authors/abhik-jana/) · **Year:** 2021 · **Venue:** Proceedings of the 18th International Conference on Natural Language Processing (ICON) · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

Proceedings of the 18th International Conference on Natural Language Processing (ICON) · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2021.icon-main.58/)
- [PDF](https://aclanthology.org/2021.icon-main.58.pdf)

## Summary

People leave opinions in many forms. A drama viewer may praise a performance, a reader may criticize a book, and a person responding to a news story may combine a complaint with an appeal for cooperation. [Sentiment analysis](https://md.research.elamur.ai/free/en/topics/sentiment-emotion/) turns such a passage into a prediction about the attitude it expresses. Bhowmick and Jana study this task for Bengali, a language for which they describe a shortage of both training corpora and labeled evaluation data. They ask how well a [transformer](https://md.research.elamur.ai/free/en/concepts/transformer/) already trained on multilingual text can learn to assign Bengali sentiment labels from examples. They also ask whether adapting the transformer directly is competitive with the earlier practice of placing an additional neural layer above it.

The authors start with an earlier Bengali sentiment system that pairs multilingual BERT with a recurrent or convolutional layer. They reproduce that design, extend it to more datasets, and repeat the comparison with XLM-RoBERTa, which they call XLM-R. They then take the same pretrained checkpoints through direct [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/), updating them for sentiment classification with labeled Bengali examples. The experiments cover comments on Prothom Alo news stories, reviews of Bengali dramas from YouTube, and Bengali book reviews. The news-comments dataset is evaluated both with a neutral category and with its neutral comments removed. The drama and book reviews have positive and negative labels.

Directly fine-tuned XLM-R leads the validation comparison on both versions of Prothom Alo, with accuracy of 0.68 for the three-class task and 0.81 for the two-class task. Its validation accuracy reaches 0.95 on YouTube-B, where its separately reported test accuracy is 0.97. Book-B gives a different ordering. Fine-tuned multilingual BERT and XLM-R both reach 0.91 on validation, a result also matched by the BERT system with a convolutional layer. On the Book-B test split, fine-tuned BERT scores 0.91 and XLM-R scores 0.87. The paper reports the test results for the directly fine-tuned systems, while its comparisons with the added-layer systems use validation accuracy.

The experiments establish a benchmark for adapting multilingual transformers to several kinds of Bengali opinion text. They also show why the choice of dataset and label set matters. Prothom Alo yields lower accuracy than the review collections, particularly when neutral is a possible answer. The selected predictions reveal some of the distinctions that disappear into an aggregate score. A complaint about reporting receives different labels across settings, and an aphorism labeled positive receives a neutral prediction. The authors identify ambiguous wording, mixed polarity cues, and statements open to interpretation as areas for further study.

## Deep dive: Sentiment Analysis For Bengali Using Transformer Based Models

Bengali news comments, drama reviews, and book reviews test how well fine-tuned multilingual transformers classify positive, negative, and neutral sentiment. · about 32 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### What a sentiment label asks a reader to decide

The paper treats sentiment as a [text classification](https://md.research.elamur.ai/free/en/concepts/text-classification/) problem. The unit of prediction is a given comment or review. Each item receives one label from the set available in its dataset. Positive and negative identify opposing directions of opinion. Neutral is available in the full news-comments dataset. This definition gives the task a clear experimental endpoint. A system reads the Bengali input, chooses a label, and is credited when its choice agrees with the label recorded for that item.

That agreement can be harder to achieve than the small set of answers suggests. A review can name its subject and evaluate it directly, as in the paper’s example of a reader criticizing the wording in a book. A news comment can express its attitude through what the writer thinks people should do. The paper includes a comment advocating fellowship in sport and rejecting rivalry. A reader can take the comment as an endorsement of cooperation, even though a part of it is devoted to an undesirable behavior. The classifier has to assign the polarity of the whole comment from those cues.

The decision also depends on what counts as the subject of an opinion. The paper’s examples include comments about a news outlet’s reporting as well as comments about a drama and a book. The items share a label vocabulary, but their expressions of approval and criticism concern different things. Criticism of reporting can be written as an assessment of its quality. Praise of a drama can sit beside an account of the viewer’s own experience. A book complaint can concentrate on the language inside the book. The task uses the same form of prediction across these domains, with the meaning of the cue coming from the passage.

The authors place the work in the context of growing amounts of online opinion. Readers can learn about books, films, videos, and products from other people’s accounts. The introduction also mentions recommendation, cyberbullying detection, and hate-speech detection as areas where analysis of expressed attitudes can be relevant. Those applications motivate interest in the task. The experiment itself concerns the polarity labels supplied with the Bengali comments and reviews. What it measures is agreement with those labels.

#### Why Bengali posed an experimental problem

In the authors’ account, sentiment research had explored [English](https://md.research.elamur.ai/free/en/topics/english/) much more extensively. For Bengali, they point to a shortage of corpora suitable for training and a shortage of gold-standard datasets for evaluation. A corpus is a collection of texts. A gold-standard dataset supplies reference answers determined through [annotation](https://md.research.elamur.ai/free/en/concepts/annotation/), such as the judgments by Bengali domain experts used for Prothom Alo. The two resources serve different needs. Text supplies material from which a system can learn. Reference labels define the classification task and give researchers an outcome against which to check predictions.

The distinction matters because an abundance of online writing can coexist with scarcity of agreed sentiment labels. A public news thread contains comments, but a polarity experiment also needs decisions about which of those comments are positive, negative, or neutral. A training example must connect the text to such a judgment. An evaluation example performs a different job by showing whether the trained system reaches the recorded judgment on held-out material. Both uses rely on the labels being meaningful for the language and genre of the input.

The authors approach this as a problem for [low-resource languages](https://md.research.elamur.ai/free/en/topics/low-resource-languages/). Their practical question is whether some of the work of learning from text can happen in advance, using a multilingual corpus, before labeled Bengali examples are introduced. The pretrained checkpoint supplies a starting point for interpreting the text. The labeled examples supply the particular decision the authors want it to make. In the news case, that includes learning what separates neutral comments from the other categories whenever neutral is part of the task.

The study combines collections that were created by different groups for different research projects. This helps extend the experiment beyond a single news portal. It also means that the wording, class balance, and label policy come from each collection’s original design. The authors use the datasets to ask a repeated question under different conditions. Given the texts and labels for this collection, how well can the same types of multilingual checkpoints be adapted to its task?

#### The approaches the authors build on

The introduction situates Bengali alongside work on sentiment in Hindi, Telugu, Assamese, Manipuri, Indonesian, and other languages described as having fewer research resources. It also mentions work on social media that mixes English with Bengali or Hindi. Code-mixed sentiment classification concerns passages that draw on more than one language. Its presence in the literature shows the range of language settings the authors consider relevant. Their own comparison is defined by the particular Bengali news comments and reviews in the selected datasets.

The paper describes a Hindi tweet study that uses a recurrent neural approach and compares it with convolutional, other machine-learning, and lexicon-based approaches. The Hindi study uses Hindi Senti-WordNet to generate a sentiment lexicon. A lexicon is a word-level resource. In a sentiment dictionary, a word can carry prior information about whether it tends to express approval or criticism. A classifier using those cues still faces the problem seen in the Bengali examples. The polarity associated with a word may contribute to the judgment, while the passage supplies what the word is doing in that instance. The authors also cite work by Akhtar and colleagues on a [hybrid deep-learning approach to sentiment analysis](https://md.research.elamur.ai/free/en/papers/akhtar-2016-hybrid-deep-learning-architecture-sentiment/).

A separate precedent concerns [cross-lingual sentiment classification](https://md.research.elamur.ai/free/en/topics/multilingual-nlp/). The paper describes work by Balamurali and colleagues in which the classifier is trained in one language and predicts polarity in another, with results reported for Hindi and Marathi. In the Bengali experiments by Bhowmick and Jana, the multilingual part occurs in the earlier training of the transformer. The sentiment adaptation itself uses Bengali examples. These are different ways to make use of resources that span languages. In one case the sentiment decision is transferred across languages. In the other, a multilingual representation is adapted using labels for the target language.

The closest predecessor is the study by Islam and colleagues. It introduced the Prothom Alo data in both its positive–negative form and its version with neutral comments. Its classification architectures place one of several neural layers above multilingual BERT. This predecessor provides both an evaluation collection and an approach to rerun. The earlier design gives Bhowmick and Jana concrete variants to compare under their expanded experiment. They can carry over the BERT arrangement to the other collections and can also change the pretrained checkpoint while retaining the form of the added layer.

The other collections contribute complementary settings. Sazzed’s work supplies the Bengali drama reviews used as YouTube-B. Hossain and colleagues supply the Book-B collection through their work on Bengali book-review polarity using multinomial naive Bayes. In the experiments here, those collections expand the range of texts on which the authors evaluate the transformer systems. The numerical baseline comparison follows the architectures from Islam and colleagues. The studies that originally supplied the review datasets provide the data and its existing sentiment labels.

#### What changes in the new comparison

The paper organizes its research question around a design choice. A researcher can keep a task-specific neural stage of the kind used in the earlier Bengali system, with the transformer supplying contextual representations to that stage. A researcher can also take the pretrained checkpoint and adapt it directly for the available sentiment labels. Both routes start with representations learned from multilingual text. They differ in how the Bengali classification task is built around that starting point.

This distinction is especially practical under the resource constraints the authors describe. An added layer gives the system another mechanism for learning patterns from a sequence. Direct adaptation asks the transformer’s existing machinery to do more of the work. The authors’ motivation is to see whether the simpler design can attain competitive results with small labeled collections and avoid designing a more elaborate architecture for each task. Testing that question across news comments and reviews gives the claim a wider basis than an experiment limited to the collection used by the earlier system.

### The method, step by step

#### Start from checkpoints trained on multilingual text

The two starting points are `bert-base-multilingual-cased` and `xlm-roberta-large`, both obtained through Hugging Face. A checkpoint contains the parameter values learned during an earlier training stage. Here, the authors begin with values learned from large multilingual corpora. They use these checkpoints in both the added-layer experiments and the direct fine-tuning experiments. The same checkpoint name therefore identifies the starting point for several distinct Bengali classifiers.

Multilingual BERT uses a bidirectional transformer encoder. An encoder produces representations of the input text for subsequent computation. In this case, those representations are contextual: the representation of a word can depend on other words in the passage. Bidirectionality means that words on either side can contribute to the representation. A sentiment example shows the value of considering the whole context. The part of a statement that names rivalry can be interpreted in light of the writer’s rejection of it and the accompanying preference for friendly relations.

Self-attention is the mechanism the paper highlights for forming such representations. It allows positions within a passage to contribute information to the representation being formed at a given position. The authors connect this mechanism to the problem of long-range dependencies, where the meaning of an expression depends on material elsewhere in the sequence. The paper gives `bert-base` as having 12 transformer layers and 110M total parameters. It also describes `bert-large`, with 24 layers and 340M parameters, to distinguish the variants. The BERT checkpoint used in the Bengali experiments belongs to the base family.

XLM-RoBERTa is also pretrained on multilingual text. The paper says that XLM-R was trained across roughly 100 languages and suggests that a larger pretraining corpus may help account for its performance in language-processing tasks. The authors choose the large checkpoint for their study. The comparison is thus between particular multilingual checkpoints with particular pretraining histories. The names BERT and XLM-R in the result tables stand for those choices. They do not denote an average over the families of available checkpoints.

#### Define the prediction task from the dataset

Before adapting a checkpoint, the researchers have to fix the output choices. Positive and negative are available throughout. For the full Prothom Alo setup, the classifier also has to learn neutral as a separate answer. The binary Prothom Alo setup comes from removing the neutral items. Its classifier is trained and evaluated on the resulting positive and negative collection. A neutral comment from the full collection is consequently outside the prediction task defined by that binary version.

YouTube-B and Book-B each start out with positive and negative labels. Their binary tasks therefore follow the label structure of their source collections. The datasets are used separately in adaptation. A named result on YouTube-B comes from adapting the checkpoint for YouTube-B. A named result on Book-B comes from adaptation for Book-B. The two Prothom Alo settings also have their own results. This procedure gives each task a classifier trained to produce the answers defined for it.

The authors use the sentiment judgments that come with the collections. For Prothom Alo, they describe the earlier work as scraping and cleaning comments and having Bengali domain experts label them. The drama reviews were annotated manually. The book reviews were gathered from web sources and come with the two polarity labels. These procedures establish the origin of the training and evaluation targets. The method in this paper begins with the existing labeled collections.

A correct prediction is defined by agreement with the reference label. It can be helpful to keep the training and prediction roles of that label distinct. During supervised adaptation, the recorded label tells the system what output to learn for the input. During evaluation, the label is the answer against which the chosen output is checked. This arrangement allows the researchers to compare classifiers from different checkpoints and architectural variants on the same task.

#### Recreate the earlier route, then replace its checkpoint

The first route follows Islam and colleagues. Multilingual BERT supplies a representation of the input, and the classifier includes a further neural layer above it. The authors consider three alternatives for that layer. A long short-term memory layer, or LSTM, is recurrent. It processes the sequence through a state that can retain information useful at later positions. A gated recurrent unit, or GRU, is also recurrent. Its gates govern how information enters or persists in the state. A convolutional neural network, or CNN, is designed to recognize patterns in local groups of positions. Each variant uses a separate added layer of the specified type.

The contrast among these options concerns the way the representation is processed before the sentiment decision. In a recurrent layer, the state gives the layer a place to carry information from one part of the sequence to another. The convolutional layer emphasizes patterns that can be recognized from local combinations of features. At this point in the system, all three work on information that has already passed through the transformer. A good result with a CNN therefore reflects the combined classifier, including the contextual representations it received.

The researchers draw on the earlier code and hyper-parameters when they reproduce the BERT variants. They first run those variants on Prothom Alo, the dataset used by the earlier study, and then apply the same architectural alternatives to the drama and book reviews. They also make a corresponding set of variants with XLM-R in the transformer position. In that set, a result for XLM-R with a GRU can be compared with a result for BERT with a GRU on the same dataset and split. The paper reports a learning rate of 5e − 04 for the added-layer XLM-R experiments.

This route serves two purposes. It gives the directly fine-tuned classifiers a baseline that has been run on the selected collections. It also gives the authors a way to test a change of checkpoint within a common architectural description. BERT and XLM-R supply the contextual representations in their respective experiments, and the named added layer provides the same kind of subsequent computation. The comparison measures how the resulting configurations behave with each task.

#### Adapt the pretrained transformer directly

In the second route, the authors begin with the pretrained BERT or XLM-R checkpoint and fine-tune it for the sentiment task. The transformer is adapted using the labeled Bengali examples. The sentiment prediction follows from this directly adapted system, with the LSTM, CNN, and GRU additions omitted. The intended simplification is at the level of the sentiment architecture. The starting checkpoint already contains the representations learned during multilingual pretraining.

Direct fine-tuning for Bengali sentiment classification The steps in order.

In the directly fine-tuned experiments, the batch size is 16 and the learning rate is 2e − 05. A batch is the group of training examples used together when the system computes an update. The learning rate controls the scale of parameter changes during optimization. Starting from an existing checkpoint gives these changes a different role from the updates in training from scratch. They adapt an existing representation to a particular classification decision.

The objective is categorical cross-entropy. The categories are the available sentiment labels, and the target for an example is its recorded label. The loss penalizes the classifier when it assigns little probability to that category. During training, reducing the loss encourages the classifier to give more probability to the recorded answer. This objective guides the parameter updates. Accuracy, reported separately in the experiments, measures how frequently the final chosen category agrees with the target. A classifier can change its confidence in a prediction without changing which category it chooses, so loss and accuracy reflect different aspects of its behavior.

The authors use [Adam](https://md.research.elamur.ai/free/en/papers/kingma-2014-adam-method-stochastic-optimization/) for all experiments. Adam is the optimizer, the procedure that uses information from the loss to determine parameter updates. The paper names the loss and optimizer and gives the key settings in prose. It presents the classification architecture in a figure, with further hyper-parameters assigned to supplementary material. The main account gives these operations by name and description, so the method can be followed at the level of its experimental design.

The paper identifies its public release as `BengaliSentimentWithTransformers` and says that the code and datasets are available. This accompanies two different kinds of comparison. The added-layer route asks how the earlier architecture behaves with different checkpoints and collections. The direct route asks how far adaptation of the pretrained checkpoint can go with the simpler sentiment architecture. Each route produces a classifier for the labels of the dataset it is trained on, which the authors then score by split.

### Experiments and results

#### The data and the reference judgments

Prothom Alo is the news-comments collection introduced by Islam and colleagues. The source comments concern 10 popular news topics on the Bengali news portal. After collecting and cleaning comments from the threads, the original dataset builders obtained 17,852 items. Bengali domain experts assigned the labels. The full collection contains 4769 positive, 8351 negative, and 4732 neutral comments. The two-class variant has 13,120 entries and retains the counts for positive and negative while excluding the neutral comments.

The two versions put related but distinct decisions to the classifier. In the full collection, a writer can express some other communicative purpose without the item being assigned positive or negative polarity. The classifier has to consider neutral alongside those categories. In the reduced collection, every item comes from one of the two polarity classes. Removing neutral examples also changes the group of texts over which accuracy is measured. The class distribution in both versions favors negative over positive, so the overall accuracy gives more influence to correct classification of negative comments in proportion to their representation on the evaluated split.

YouTube-B comes from manually annotated reviews of Bengali dramas. The dataset contains 8500 positive reviews and 3307 negative ones. Its class distribution favors positive, the opposite direction of the imbalance in the Prothom Alo collection. It also offers a different kind of opinion text. The paper’s drama example praises the drama and relates it to the writer’s own experience, a form of evaluation that can combine a judgment with a personal observation.

Book-B has 2000 Bengali book reviews. The sources include blogs, Facebook, and e-commerce sites. The class counts are 982 positive and 1018 negative. These counts are much closer to each other than the positive and negative counts in YouTube-B or Prothom Alo. The Book-B result therefore adds an evaluation on a smaller and more evenly balanced collection, alongside the much larger sets of news comments and drama reviews. The examples selected in the paper also give a glimpse of the domain: a reader may express criticism through a description of the words used in the book.

These figures are the published counts for the collections as a whole. The paper’s result tables identify validation and test scores by name. The counts describe the data available for the task, while the reported accuracy belongs to a particular evaluation split. Keeping those quantities distinct matters when reading results from collections of different sizes and proportions. The whole-collection class counts alone cannot give the balance of any particular evaluation split.

#### How to read validation and test accuracy

Accuracy is the share of evaluated items for which the classifier selects the reference category. The paper reports it on a decimal scale in its tables. The split determines which set of predictions contributes to the measure. For instance, a validation accuracy of 0.95 and a test accuracy of 0.97 describe scores on separate sets of items. Both belong to the same task when they appear in the same row, but they answer the evaluation question on different material.

Islam and colleagues reported validation accuracy for the earlier architecture. Bhowmick and Jana therefore report validation accuracy when they reproduce it, when they substitute XLM-R in the added-layer systems, and when they compare with direct fine-tuning. The main test results are a separate comparison between the directly fine-tuned BERT and XLM-R systems. This division governs the claims that the experiment can support. A validation score for an added-layer system can be compared with a validation score from direct fine-tuning. The paper’s test column establishes the ranking between the directly fine-tuned systems on that split.

Within a common task and split, accuracy puts all classifiers on a common scale. Across tasks, the same metric can reflect different kinds of success. A binary review classifier chooses between two labels. A classifier for the full Prothom Alo task can also select neutral. The distributions of labels and the kinds of text differ at the same time. Comparisons across the collections show the range of performance in the authors’ experiments, while the comparisons within each collection give the more direct evidence about architecture and checkpoint choice.

#### Prothom Alo with neutral comments included

On the three-class validation task, the three BERT configurations with added layers are close to one another. BERT with LSTM reaches 0.58, BERT with CNN reaches 0.59, and BERT with GRU reaches 0.57. The XLM-R variants are more spread out. The LSTM configuration achieves 0.65, and the GRU configuration achieves 0.63. The CNN configuration gives 0.37. In this setting, the effect of choosing XLM-R depends strongly on the layer receiving its representation.

Directly fine-tuned multilingual BERT reaches 0.63 on validation, ahead of each BERT configuration with an added layer. Directly fine-tuned XLM-R reaches 0.68, the highest validation score among the approaches run on this task. It exceeds the results for all its own added-layer variants, including the XLM-R and LSTM configuration. The complete comparison shows both the best result from direct fine-tuning and the consequences of different pairings under the earlier design.

Prothom Alo three-class validation accuracy by architecture Directly fine-tuned XLM-R leads, while the added-layer results depend on the checkpoint and layer pairing.

**The numbers**

| System or setting | accuracy |
| --- | --- |
| BERT with LSTM | 0.58 |
| BERT with CNN | 0.59 |
| BERT with GRU | 0.57 |
| XLM-R with LSTM | 0.65 |
| XLM-R with CNN | 0.37 |
| XLM-R with GRU | 0.63 |
| Fine-tuned multilingual BERT (this paper) | 0.63 |
| Fine-tuned XLM-R | 0.68 |

On the test split, fine-tuned BERT records 0.49 and fine-tuned XLM-R records 0.53. Both test scores fall below their respective validation results, and XLM-R keeps its lead between the two directly adapted checkpoints. This is the lowest-scoring of the tasks for both directly fine-tuned systems. The evaluation supports both of those observations. The reason for the lower scores remains a question about the material and label structure of the task.

#### Prothom Alo with positive and negative labels

In the binary news-comments task, BERT with LSTM gives validation accuracy of 0.63. BERT with CNN and BERT with GRU each give 0.74. The corresponding XLM-R results are 0.64 with LSTM, 0.77 with CNN, and 0.79 with GRU. The switch to XLM-R improves each matched layer variant on this version of Prothom Alo. The best added layer for XLM-R also changes across the two versions. GRU leads on the binary version, and LSTM leads when neutral is included.

The directly fine-tuned classifiers reach 0.77 for BERT and 0.81 for XLM-R on validation. For BERT, direct adaptation improves on all three of its own added-layer variants and ties XLM-R with CNN. For XLM-R, direct adaptation gives the best validation result in the full binary comparison. It also keeps the advantage for XLM-R seen in direct fine-tuning on the three-class version.

The binary test results are 0.69 for fine-tuned BERT and 0.73 for fine-tuned XLM-R. Both checkpoints score higher here than on the test split with neutral included. The BERT and XLM-R rankings agree across the validation and test splits in both news settings. The absolute scores also show that the two tasks remain distinct. Even with comments drawn from the same original collection, accuracy depends on whether the task includes the neutral comments and requires a neutral prediction.

#### Bengali drama reviews on YouTube

For YouTube-B, the reproduced BERT system achieves 0.85 with LSTM, 0.92 with CNN, and 0.91 with GRU on validation. The XLM-R replacements achieve 0.85, 0.90, and 0.90, respectively, with those same layer types. The best added-layer result belongs to BERT with CNN. The paper singles out that configuration as a strong baseline on the review data. The effect of substituting XLM-R here is different from the pattern in the binary news task. The LSTM score stays level, and the other two move lower.

Direct fine-tuning puts BERT at 0.94 validation accuracy and XLM-R at 0.95. Both directly adapted systems exceed the strongest added-layer baseline on this split. This is the task behind the abstract’s headline of 95% accuracy for a binary sentiment classification setting. It applies to validation on the drama reviews. The news comments and book reviews have their own results, which are reported separately.

YouTube-B validation accuracy for selected Bengali drama review classifiers Both directly fine-tuned checkpoints surpass the strongest result with an added layer.

**The numbers**

| System or setting | accuracy |
| --- | --- |
| Multilingual BERT with CNN | 0.92 |
| XLM-R with CNN | 0.90 |
| Fine-tuned multilingual BERT (this paper) | 0.94 |
| Fine-tuned XLM-R | 0.95 |

On YouTube-B test, fine-tuned BERT reaches 0.95 and fine-tuned XLM-R reaches 0.97. These are the highest test accuracies in the directly fine-tuned comparison. The test scores are also above the validation scores for their corresponding checkpoints on this dataset. The result is evidence that the directly adapted systems perform strongly on both of the reported drama-review splits. For the added-layer comparisons, the evidence remains the validation results.

#### Bengali book reviews

Book-B produces a particularly broad range among the added-layer variants. On validation, the BERT system gives 0.49 with LSTM, 0.91 with CNN, and 0.86 with GRU. With XLM-R, the corresponding results are 0.60, 0.88, and 0.84. The LSTM variant gains from the checkpoint replacement, while the two stronger BERT configurations score lower after substitution. BERT with CNN is the strongest added-layer result for this collection, as it is on YouTube-B.

The two directly fine-tuned systems both score 0.91 on Book-B validation. They match BERT with CNN. Fine-tuned XLM-R leads its own added-layer variants, while fine-tuned BERT shares the overall best reported validation score. This result supports direct fine-tuning as a competitive approach to Book-B with a simpler sentiment architecture. The validation comparison gives the earlier convolutional design an equal claim on the top score.

Book-B test accuracy for directly fine-tuned checkpoints Multilingual BERT leads XLM-R on the book-review test split after their validation tie.

**The numbers**

| System or setting | accuracy |
| --- | --- |
| Fine-tuned multilingual BERT (this paper) | 0.91 |
| Fine-tuned XLM-R | 0.87 |

The Book-B test result reverses the ordering seen on the other reported test tasks. BERT’s 0.91 gives it the lead over XLM-R’s 0.87. The two checkpoints had tied on validation. Book-B thus matters to the paper’s comparative result even though it is the smallest collection. It supplies a case where choosing the checkpoint that led the validation comparisons on the news and drama tasks would give a lower test score than choosing BERT.

The authors characterize the direct fine-tuning results as advances over the closest baselines. That characterization has its clearest numerical basis on the validation comparisons for Prothom Alo and YouTube-B. Book-B supports a narrower claim through a tie with the strongest validation baseline and a strong test score for BERT. Taken by task, the results show that direct fine-tuning works well across the study’s range of data, and the test ranking favors a different checkpoint for the book reviews.

### What the ablations show

The paper examines design choices through architecture comparisons and selected predictions, leaving a fully matched component-by-component ablation open. The closest controlled comparisons keep the dataset and a named added layer fixed while changing the pretrained checkpoint. A second set compares the added-layer architectures with direct fine-tuning. The examples then show the decisions behind some individual successes and failures. These forms of evidence operate at different levels. The scores locate changes in agreement with reference labels, and the examples let a reader inspect particular judgments.

#### Changing the checkpoint with the added layer held fixed

The checkpoint comparison is most revealing where the result goes in different directions depending on the attached layer. For three-class Prothom Alo, substituting XLM-R raises the LSTM validation score from 0.58 to 0.65 and the GRU score from 0.57 to 0.63. With CNN, the result goes from 0.59 to 0.37. All of these comparisons concern the same news task with neutral available. In that setting, the outcome of the substitution is specific to the complete architecture. The authors’ prose describes improvements on Prothom Alo reaching 7%. The individual entries show where those improvements occur and also show the uncompetitive CNN pairing on the three-class version.

For binary Prothom Alo, all of the matched replacements move in XLM-R’s favor. That is especially informative for the CNN comparison, whose direction changes between the two versions of the news task. Both use the same source collection and each has a separate training and evaluation problem. The CNN result moves from a decrease with XLM-R on the full collection to an increase with XLM-R on the reduced collection. The experiment identifies this dependence on task setup. The contributions of the neutral category and of excluding a group of comments are intertwined in that change.

The review datasets supply additional checks on the substitution. On YouTube-B, the BERT and XLM-R LSTM variants share a validation score, and the CNN and GRU variants favor BERT. On Book-B, XLM-R improves the LSTM result while BERT remains ahead with CNN and GRU. These results help explain why the authors proceed to direct fine-tuning. Swapping in XLM-R within the earlier architecture gives gains in some conditions and losses in others. XLM-R’s performance in the stronger directly fine-tuned classifiers is therefore a result about that training route as well as the checkpoint.

#### Comparing direct fine-tuning with the added layers

For each checkpoint, direct fine-tuning can be compared with its own LSTM, CNN, and GRU variants on validation. This is more informative than comparing a selected BERT baseline with an XLM-R result alone, since the within-checkpoint comparison retains the same pretrained starting point. In both Prothom Alo tasks and on YouTube-B, directly fine-tuned BERT surpasses the strongest BERT added-layer variant. On Book-B it ties the strongest one. Directly fine-tuned XLM-R exceeds the strongest XLM-R added-layer result in all of the reported validation tasks.

This is evidence for the overall direct fine-tuning procedure. The experimental comparison moves from the earlier architecture and its training recipe to the authors’ fine-tuning recipe, with a different stated learning rate from the added-layer XLM-R experiments. A comparison under matched training settings would be needed to attribute the improvements to the omitted layers themselves. The observed result is useful at the level at which the experiment was run. The direct route attains the top or joint-top validation accuracy available in the study, with fewer kinds of task-specific neural layers.

The strength of the older CNN configuration also gives the comparison context. It is already competitive on YouTube-B and Book-B. On Book-B, the new route and BERT with CNN meet at the same validation score. On three-class Prothom Alo, the difference between the best added-layer result and the best directly fine-tuned result is visible against a background of very uneven added-layer scores. The conclusion about direct fine-tuning rests on comparison with the strongest available variants within each task, alongside the broader pattern across configurations.

#### What the individual predictions reveal

The sample predictions make the meaning of an error concrete. The paper presents a Bengali comment criticizing the quality of a Prothom Alo department’s reporting. It appears more than once in the examples, with negative as its reference label. One BERT entry predicts negative and another predicts positive. The shown XLM-R entry predicts negative. The same short criticism therefore receives different predictions in the settings represented by the examples. The passage looks evaluative even before its sentiment is decided, and the error is in the direction assigned to the evaluation.

A different news comment says, in effect, that everyone faces the same circumstances and should understand how people behave. Its reference label is neutral, and the shown BERT prediction is positive. The sentence does more than report circumstances. It also asks readers to adopt a way of looking at them. Reading that appeal as a favorable attitude is one possible source of confusion. The example shows the nature of the labeling disagreement, while the system’s reason for choosing positive remains unknown.

The paper also includes positively labeled appeals to cooperation. A sports comment endorses fellowship and rejects rivalry, and the shown BERT prediction agrees with the positive label. Another comment asks for friendly relationships and opposes a form of competition, and the shown XLM-R prediction agrees with its positive label. These examples complicate a simple reading of the authors’ observation about words of opposing polarities. Mixed cues can occur in correctly classified passages too. A classifier’s decision depends on how it treats the relationship among the cues in a particular sentence.

An aphorism about waking somebody who is asleep, as opposed to somebody who is already watchful, is labeled positive and predicted neutral by XLM-R. The sentiment of the sentence is bound up with an interpretation of the aphorism. In Book-B, a complaint about a book’s objectionable wording receives a positive XLM-R prediction despite its negative target. These are different kinds of difficulty to a reader. One calls for an interpretation beyond a direct expression of praise or criticism, and the other appears to express criticism quite plainly. Together they show why the authors’ list of ambiguity, mixed cues, and philosophical wording is a starting point for analysis. The examples support a closer look at such cases, while their frequency and causes would require a systematic study of errors.

### Limitations

#### Limits the authors identify

The authors explicitly point to errors that persist after fine-tuning. They group the difficulties they observed around ambiguous words, words of opposing polarity within the same passage, and language whose sentiment depends on a reader’s interpretation. The examples give those categories substance. A comment can contain vocabulary associated with conflict as part of rejecting conflict. A reflective observation can have a positive reference label even though its sentiment is less explicit than in a review that praises a drama. The authors present analysis and mitigation of such errors as their immediate future work.

Their broader research plan is to investigate sentiment in additional low-resource languages, including Tamil, Oriya, and Gujrati, and to consider variants of transformer-based classifiers. The Bengali experiments provide the empirical evidence in the paper. The results motivate the proposed extension by showing that multilingual pretraining followed by supervised adaptation can be effective on the selected Bengali datasets. Whether the same procedure, checkpoints, or architecture rankings carry over to other languages remains an empirical question.

The authors also motivate fine-tuning partly through practical considerations. Starting from pretrained parameters can make use of a smaller task-specific training collection, and they describe adaptation as less time-consuming than training from scratch. Their results concern the accuracy attained by the systems they ran. The reported experiments do not give timing comparisons or a series of results across different amounts of labeled training data. The practical claims serve as reasons for trying the design. Quantifying time or data savings would require measurements tailored to those questions.

#### Limits visible in the experimental design

The paper interprets XLM-R’s larger pretraining corpus as a possible reason for its performance. The two checkpoints differ in ways that travel together in this comparison, including their architecture families and the choice of a base multilingual BERT checkpoint and a large XLM-R checkpoint. Switching between them changes the whole starting point for adaptation. As a result, the observed advantage of direct XLM-R fine-tuning on Prothom Alo and YouTube-B is evidence about those checkpoints in those experiments. Isolating a cause would require comparisons that vary pretraining data, checkpoint scale, or another characteristic one at a time.

There is a related limit to the comparison between direct fine-tuning and the added-layer designs. The study reports each approach with its own experimental recipe. Its stated learning rate for the added-layer XLM-R runs differs from the stated rate for direct fine-tuning. This setup is well suited to asking whether the directly fine-tuned approach can compete with a reproduced and extended baseline. To measure the effect of adding a CNN, GRU, or LSTM on its own, the experimental protocol would need to hold the rest of the training procedure fixed and explicitly account for which parameters are updated. The paper gives clearer evidence for choosing among complete configurations than for assigning the performance change to an individual component.

The two versions of Prothom Alo also change more than the answer set. The three-class task contains the neutral comments, and the two-class task leaves them out. Excluding those items changes the population over which accuracy is measured. It may also leave a collection with more explicit sentiment, but that possibility is unmeasured. Comparing the two versions shows that the classifiers score higher on the positive–negative version. Determining how much of that pattern comes from the extra label, the nature of the removed items, or differences between evaluation samples would require a more targeted comparison.

The datasets broaden the evaluation to three genres drawn from distinct sources. Each directly fine-tuned classifier is trained for its own collection. The experiment therefore tests the repeated applicability of an adaptation procedure. It leaves cross-domain transfer unresolved. Training on drama reviews and testing on book reviews, for instance, would ask whether the sentiment decision transfers into a new domain without using the new domain’s labels for adaptation. The published results answer the question of how well the procedure works when each evaluation task has its own labeled data.

#### Limits of accuracy and the reported splits

Accuracy summarizes label agreement across a split. It gives the same credit to each item, which makes the observed frequencies of the labels important. YouTube-B has many more positive than negative reviews in the collection as a whole. Prothom Alo has more negative than positive comments. Book-B is much more evenly balanced. Those counts describe the settings in which the overall scores were obtained. They leave open how the errors were distributed between the labels within each evaluated split.

Per-class scores would answer questions that matter to the interpretation of the Bengali results. In the full news task, for example, the neutral-to-positive mistake could be an isolated example or part of a frequent confusion. Aggregate accuracy and selected predictions allow either possibility. Similarly, a high YouTube-B accuracy is compatible with differing levels of performance on positive and negative reviews. A full set of counts for predicted and true labels would show whether the errors concentrate in a particular direction.

The paper’s added-layer results are on validation, and its test scores cover the directly fine-tuned systems. This supplies a common split for comparing methods on validation and a separate test comparison for the direct route. It leaves the test ranking against the added-layer baselines undetermined. The distinction matters particularly for Book-B, where the directly fine-tuned systems tie each other and BERT with CNN on validation. A BERT lead over XLM-R on test is compatible with several outcomes for a BERT-CNN test result, which the paper does not report.

The validation and test scores also differ noticeably for Prothom Alo. Both directly fine-tuned checkpoints score lower on test than on validation in the news tasks. On YouTube-B the test scores are higher than the validation scores, and on Book-B the direction depends on the checkpoint. These observations establish that the choice of split matters for the reported accuracy. Explaining the patterns would require details about the composition of each split, the role of validation during training, and what happens across repeated runs. The paper presents point scores, leaving uncertainty and run-to-run variation unquantified in the main results.

#### Limits of the error examples

A reference label gives the experiment a reproducible basis for judging the displayed prediction. It also frames what an error means. The positive label on the aphorism might reflect an interpretation shared by annotators, and the neutral prediction is an error by the criterion used in the paper. The text of the example alone gives little basis for judging how strongly annotators agreed or how a different labeling policy would treat it. The paper’s motivation for closer error study is especially pertinent in these cases, where the judgment involves reading the stance behind a statement.

The qualitative evidence consists of selected successes and failures. The authors’ suggested error categories are plausible readings of some of those examples, but the selection leaves their prevalence open. A systematic analysis could count different types of mistake, compare them across datasets and checkpoints, and use independent annotation to examine whether human readers agree about the cause. The current evidence supports particular observations, such as an instance of neutral being predicted as positive. Claims about which failure modes dominate the complete held-out data would need a broader accounting.

Finally, an accuracy benchmark on labeled Bengali comments and reviews measures the tasks as those collections define them. The paper’s motivation includes larger applications that involve detecting harmful language or informing recommendations. The judgments needed in those settings may concern a target, an action, or a recommendation outcome in addition to polarity. Evidence for such uses would require evaluation on their own outputs. What the study supplies is a comparison of supervised polarity classification on the news and review material it examined.

### What came after

There is no documented follow-up study to trace here. The paper’s conclusion identifies two prospective directions. The nearer one is an investigation of misclassified Bengali texts, including which errors recur and what can reduce them. That agenda follows directly from the difference between the aggregate scores and the examples. The benchmark provides a basis for comparing overall accuracy, and the examples identify decisions whose difficulty would merit closer annotation and analysis.

The wider direction is to try related transformer approaches for sentiment analysis in additional low-resource languages. The authors propose Tamil, Oriya, and Gujrati as settings for that investigation. Their Bengali work supplies a concrete comparison for such an extension: adapt a multilingual checkpoint to labeled examples, evaluate within each dataset, and examine how a simple directly fine-tuned system fares against a design with an added layer. The Bengali study ends with these directions open. Its empirical contribution is the set of comparisons across news comments, drama reviews, and book reviews, including the cases where the strongest choice changes with the evaluation task.

## Cite

Cite as Anirban Bhowmick and Abhik Jana. 2021. Sentiment Analysis For Bengali Using Transformer Based Models. Proceedings of the 18th International Conference on Natural Language Processing (ICON).

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

```bibtex
@inproceedings{bhowmick2021sentiment,
  title = {{Sentiment Analysis For Bengali Using Transformer Based Models}},
  author = {Anirban Bhowmick and Abhik Jana},
  booktitle = {Proceedings of the 18th International Conference on Natural Language Processing (ICON)},
  year = {2021},
  url = {https://aclanthology.org/2021.icon-main.58/}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
