BnSentMix: A Diverse Bengali-English Code-Mixed Dataset for Sentiment Analysis
Paper · 2025 · Sadia Alam, Md Farhan Ishmam, Navid Hasin Alvee et al.
Summary
An online review can praise a product and complain about its delivery in the same breath. For a Bengali-English writer, the two judgments may also draw on different languages, with Bengali words spelled in the same alphabet as the English ones. Sometimes the switch happens inside a word. A system that assigns an opinion to the whole message must interpret those forms and work out how the judgments fit together. BnSentMix gives researchers a shared way to test this kind of sentiment analysis. It contains 20,000 examples from YouTube and Facebook comments and from e-commerce reviews. Its labels distinguish positive, negative, neutral, and mixed messages. Mixed means that different parts of the message express approval and disapproval.
To find candidates for the dataset, the authors started with over 3 million pieces of online writing. They cleaned the text and built a filter that classifies individual words, then decides whether enough of them indicate Bengali for the text to qualify. They trained the word classifier using a separate collection. Multilingual BERT, or mBERT, achieved the best reported detection results, with accuracy of 94.56% and F1 of 0.9403. Accuracy counts correct decisions, while F1 combines measures of how frequently the classifier’s positive decisions are correct and how much of the target material it finds. The detection scores concern the collection filter. Predicting an opinion requires a separate set of judgments and a separate experiment.
The project recruited 64 paid readers for linguistic annotation, the process of assigning the reference labels. Different readers judged each item independently, and an additional reader resolved each disagreement. The authors report Cohen’s kappa of 0.86 from a repeat-labeling exercise on 250 examples. Kappa takes into account how frequently judges could agree simply because they tend to use the same common labels. BnSentMix provides 14,000 examples for training, 3,000 for validation, and 3,000 for testing. The authors release the dataset and code under CC BY 4.0 and report removing private and personally identifying information.
The sentiment baselines range from conventional classifiers to recurrent networks and pretrained transformers. The English BERT entry leads the test F1 comparison at 0.688, reported in the paper’s overview as 68.8%. Its test accuracy is 0.695, also reported as 69.5%. The detailed results give the highest test accuracy to XLM-RoBERTa and BanglaBERT, tied at 0.698. The two rankings make it important to specify the metric when describing the strongest system.
BnSentMix gives researchers working on low-resource languages a public benchmark that includes informal spelling, different kinds of online writing, and an explicit category for conflicting opinions. The benchmark represents a selected form of that writing. Cleaning removes emojis and other non-ASCII material, and only 9.2% of the collection carries the mixed label. The experiments establish reference scores for the resulting collection. The effects of cleaning, source selection, and particular kinds of switching on those scores remain open.
Deep dive: BnSentMix: A Diverse Bengali-English Code-Mixed Dataset for Sentiment Analysis
BnSentMix pairs Bengali-English comments and reviews with human sentiment labels and tests how well classifiers recognize the opinions they express. · about 33 minutes to read
The problem and its context
When a language switch fits inside a word
The paper uses code-mixing for the practice of drawing on different languages within the same conversation or sentence. It focuses on writing in which the change can occur within a sentence and, sometimes, within a single written word. In the first case, a reader has to follow a sentence across words from different languages. In the second, the division between languages can fall inside the boundaries a reader would ordinarily use to break the text into words.
One example from the paper is Movietar. The English part names a movie. The paper identifies tar as the Bengali part and describes the meaning it contributes as possessive. A split at spaces keeps both parts together. A vocabulary lookup that finds movie can identify some of the material, but interpreting the complete form involves morphology, the way components of a word contribute to what it means and how it functions. The paper uses this form in a negative example. Its point is about the structure of the word. The possessive ending itself supplies no negative judgment.
Bengali written with Latin letters is referred to in the paper as romanized or transliterated Bengali. That spelling practice makes script a poor shortcut for language identity in this collection. A stretch of Latin letters can be English, romanized Bengali, or a form that draws on both. Informal spelling compounds the difficulty because the same linguistic material may appear in forms that a tool does not recognize as related. There is also room for Latin-script writing from a third language to look superficially similar. A corpus builder has to decide which writing belongs in the collection before there can be a clean comparison of sentiment predictions.
The authors point to a further difficulty in their illustrated examples. Some material supplied by a fuller rendering is implicit in the original message. A reader can understand a relationship or recover an omitted element even when there is no distinct source word for it. That is a different problem from discovering where a switch occurs. Recognizing the origin and written boundaries of the words gives a system a start. Recovering the intended meaning requires attending to how the words work together and what the writer leaves to the reader.
What the sentiment label describes
The paper treats sentiment analysis as a text classification task. An item of writing receives a label describing the opinion that it conveys. The same kind of analysis can serve questions about customer feedback, public opinion, or what people are saying on social media. The practical settings matter to the research question because a review and a social comment need not present an opinion in the same way. A review has a product as its immediate subject. A comment may depend on the post or discussion to which it responds. By drawing on both, the authors seek a wider range of writing occasions for the same classification task.
A category for mixed sentiment changes what counts as a correct interpretation. Suppose a reader finds approval in one part of a review and criticism in another. Giving that review a neutral label would obscure the evidence for both judgments. Giving it a positive or negative label on the basis of whichever judgment seems stronger would convey the chosen side and lose the other. The mixed category captures the presence of the two attitudes. It leaves questions such as what exactly was praised, what drew criticism, and how strongly the writer felt outside the output of the task.
Language mixing and mixed sentiment describe different properties. Any of the sentiment categories can apply to a text with language switching. The detector first asks whether the language of a candidate fits the collection, while the sentiment task asks what evaluation the writing expresses. A language switch offers no direct reason to assign the mixed sentiment label. Conversely, an example of conflicting opinions offers no direct evidence for a language switch. BnSentMix puts both properties in the same research setting and assigns them to different decision procedures.
The gap the authors identify
The related-work discussion situates BnSentMix within extensive research on sentiment for individual languages. It includes work on customer reviews and annotated opinions and notes studies using German, Russian, Norwegian, and several languages of India. Bengali sentiment analysis also already had research of its own. The paper cites a Bengali book-review resource and work on improving performance in a Bangla sentiment task. It also notes the growth of sentiment research in multilingual NLP as pretrained systems covering multiple languages became available.
The gap was narrower. Bengali can have a large community of speakers and still have few annotated resources for a particular form of writing. Here the authors wanted a shared sentiment task for colloquial Bengali-English text, with enough labeled material for training and held-out comparisons. Their closest Bengali predecessor is the corpus by Mandal and colleagues. The paper’s comparison lists 5k samples, 3 sentiment labels, and 1 data source for that corpus, along with 5 baselines. It lists the resource as unavailable to the public. The related-work discussion also mentions sentiment research on mixed Bengali in a multilingual setting. Those precedents established an area of study, while leaving room for a larger, publicly accessible benchmark focused on this language pair.
The comparison extends to other languages paired with English. The paper lists 3.9k Hindi-English examples and 15.7k Tamil-English examples, both from studies with 1 source each. It describes manual filtering for the Hindi collection and use of langdetect for the Tamil and Malayalam collections. The Persian comparison used keyword search. These examples show that corpus creation already involved explicit choices about how to find suitable material. The choice for Bengali-English had to account for the ease with which short, nonstandard words written in Latin script could be mistaken for words of another language.
Earlier ways of working with mixed writing
The paper surveys several reasons to process code-mixed language. Alongside sentiment, prior work dealt with language identification, part-of-speech tagging, translation, and emotion classification. Hate-speech detection and speech synthesis also appear in its account. Across these tasks, researchers had explored creating extra training examples through data augmentation and learning word embeddings suited to mixed text. These strands address different obstacles. Augmentation changes the training examples available to a system. A different word representation changes the information the system can use about the examples it receives.
For romanized Bengali, another route described in the paper is back-transliteration. The immediate task there is to recover Bengali script from a representation written in Latin letters. Doing that before a downstream task can change how Bengali words reach the next stage of processing. BnSentMix keeps the romanized material for its sentiment experiments, after cleaning. The problem of finding appropriate writing therefore has to be addressed without first treating conversion to Bengali script as a requirement for admission.
The authors report that the general-purpose langdetect tool and a Bengali phonetic parser had trouble with the spelling patterns they encountered. Their account also identifies word-internal mixing, wholly romanized Bengali, and intrusion of a third language as problems for candidate selection. Hand screening is possible for a small collection, and a keyword can efficiently find text containing that keyword. The paper’s task begins with a much larger pool and asks whether the range of written forms can be screened automatically. It uses a learned word classifier in response to that collection problem, then entrusts the opinion labels to human readers.
The method, step by step
From online sources to a candidate pool
The construction starts with existing writing. The authors retrieve YouTube comments through the YouTube API. For Facebook they use Facepager to collect comments associated with public pages, posts, and groups. For e-commerce reviews they use Selenium to automate browsing. YouTube and Facebook supply reactions in social settings, and the e-commerce sites supply writing associated with products. The authors choose these settings for their engagement and the variety of language they expect to find there.
The source pool exceeds 3 million samples. A record gathered at this stage is a candidate for processing, regardless of whether it contains mixed language or an opinion. The source category alone supplies neither property. A perfectly ordinary product review may be outside the target language setting, and a comment of the desired linguistic form can be neutral. Collection is deliberately broad enough to make screening worthwhile. The decision to target Bengali-English comes into play in the stages that follow.
How the authors build and evaluate BnSentMix
The steps in order.
The paper illustrates the composition of the sources in a figure. Its sourcing account identifies where the material came from and how the authors obtained it. The numbers available for the full input pool and the final benchmark belong to different stages. The size of the final dataset incorporates cleaning, language screening, and the selection of items for annotation. Those endpoints alone cannot tell a reader how many examples passed each intermediate step, or which change in the pipeline accounts for any particular omission.
Cleaning the material
The authors exclude records containing external URLs. They also describe discarding very short records, with the length boundary expressed differently in the cleaning account and the filtering algorithm. These decisions operate on entire candidates. Other rules change the text in place. A candidate can remain eligible even though some of its original characters and spacing have been removed.
In the cleaning algorithm, the text is first converted to lower-case. The allowed punctuation marks are the question mark, comma, exclamation mark, and period. The procedure removes other special characters and compresses repeated punctuation. Non-ASCII characters are removed, as are excess spaces. The final capitalization instruction applies to the first letter after a period. The prose describes capitalization in terms of English words at the beginning of sentences. That wording expresses the intended style of the output, while the algorithm specifies operations that can be applied without first recognizing which words are English.
The resulting text preserves some kinds of informality. Someone reading a processed example can still encounter unconventional spelling and grammatical irregularities, because the authors leave those as written. Someone reading the original could also have seen an emoji or several repeated exclamation marks, distinctions the cleaning procedure removes or compresses. Bengali script falls outside the retained character set. In practice, the procedure defines a task on cleaned, predominantly Latin-script material while keeping the irregularities that the authors chose to treat as part of ordinary written use.
The distinction between retaining and removing variation matters even before sentiment is considered. A spelling the reader takes in stride can affect a word classifier. Conversely, removing a mark before splitting the text changes what the classifier will see at the boundary of a word. The paper describes these operations as a sequence and preserves examples of informal writing after that sequence. It does not show the same benchmark rebuilt with a different cleaning policy.
Making training material for the language filter
The authors prepare a separate lexical dataset for the detector. Its 100k words come from three sources. Dakshina contributes material relevant to South Asian languages written in Latin script. An English word-frequency dataset on Kaggle supplies English material, and work by Mandal and Singh on language identification supplies another source. The authors describe the resulting collection as balanced across Bengali words, English words, and forms that mix Bengali and English. Those descriptions refer to kinds of linguistic material in the detection collection. The sentiment labels are assigned later to complete examples.
The candidate detectors are mBERT, XLM-RoBERTa, and BanglishBERT. The paper describes the first two as multilingual and the third as Bengali-English. Each starts from a pretrained system and undergoes fine-tuning. In this setting, fine-tuning means adapting an existing set of learned parameters to make the decisions needed for the word data. The paper compares the resulting detectors before using mBERT in the displayed screening algorithm. This gives the choice of detector its own evaluation, upstream of the work of labeling opinions.
There are two levels of prediction in the description. The training collection consists of words, including some whose internal form is mixed. The intended selection concerns a longer example that can contain a sequence of words from both languages. These levels need not coincide. Individually unmixed Bengali and English words can form a mixed sentence. An internally mixed word, in contrast, supplies evidence of a language combination within its own boundaries. The paper’s aggregation rule gives every surviving word one prediction. It does not attempt to assign a separate language label to every part inside a word.
From predicted classes to an admission decision
The screening algorithm takes a list of sentences. It splits each sentence into words, an initial form of tokenization that determines which chunks go through the word loop. It preprocesses each word and skips any chunk that becomes empty. For the remaining words it uses the pretrained mBERT tokenizer to prepare input for the fine-tuned classifier. This second tokenization step puts a word into the representation expected by the classifier. Its internal pieces are distinct from the words whose total is used in the filter.
The classifier produces output scores for a word. The paper’s argmax operation selects the class with the highest score. The loop increments the word total for every processed word and increments a separate tally whenever that prediction is class 1. The displayed algorithm calls the latter the Bengali count. Its counters accumulate across the sentences passed into the call. If the total word count is below 4, the call returns 0 before it calculates any share.
b_percent = b_count / w_count
b_percent is the share of surviving words predicted to belong to the designated class. b_count is the number of predictions of class 1, and w_count is the total number of nonempty words examined. The equals sign assigns the ratio on the right to the quantity on the left. The slash denotes division. Despite the variable name, the calculation uses a fraction directly.
b_percent ≥ 0.3
b_percent is the same fraction, ≥ means greater than or equal to, and 0.3 is the acceptance threshold. For a candidate that passes the minimum-word check, satisfying this inequality makes the procedure return 1. Falling below the threshold makes it return 0. The returned values represent the decision on the inspected text. The word-level predictions with the same numeric labels are the evidence that went into that decision.
This description specifies how to aggregate hard decisions. A word with class 1 contributes the same amount to the count whether its winning score was just above another class score or much higher. The ratio captures frequency within the candidate, so the same number of designated words can have different consequences in shorter and longer candidates. Passing the test means that the classifier assigned the designated class frequently enough under this counting rule. The ratio is a property of the predictions on the processed text.
The authors also say that they exclude sentences containing material outside Bengali and English, giving Hindi as an example. The pseudocode shows a binary class decision for each word and a minimum share of class 1. It gives no separate operation to establish that English is present or to flag a third language. The paper also leaves the exact mapping from the lexical dataset’s described categories to the binary outputs unspecified. As a result, the word count and threshold can be read precisely from the algorithm, while the full implementation of language eligibility is less fully specified.
Turning readings into reference labels
After screening, the authors need a reference opinion judgment for each retained item that will enter the benchmark. Positive and negative labels capture the respective directions of evaluation. Neutral is the category for writing without a positive or negative judgment under the scheme. Mixed is assigned when different parts express favorable and unfavorable sentiment. All of these are labels for an item as a whole. A reader may find the supporting evidence in a particular clause or phrase, but the task asks for the resulting category instead of an annotation of the individual passages.
Each item goes to different annotators for independent decisions. Agreement yields a shared label. In the event of conflict, a further annotator resolves the case. The process addresses two needs. Independence makes the initial judgments informative about how different readers interpret the same writing. Adjudication provides one usable reference label where those initial interpretations differ. The paper describes the additional annotator as breaking the tie. It does not give a decision tree that resolves every potential disagreement over irony, implied evaluations, or context.
The authors recruit 64 annotators. The stated educational minimum is equivalent to Grade 12, and the readers are familiar with digital communication and social media. They receive hourly pay, which the authors describe as above the regional minimum wage. The ethics account says that each annotator was assigned around 630 samples, without a time limit. It also describes a break schedule and the availability of refreshments. These details explain the conditions under which the judgments were made, along with the authors’ concern that tiredness and a reader’s own feelings can affect labeling.
A repeat-labeling exercise uses 250 samples to assess consistency. The paper reports the measurement as follows.
κ = 0.86
κ denotes Cohen’s kappa, the agreement statistic used in the paper. The equals sign identifies the reported value, 0.86, for that exercise. Kappa considers how often the labels match beyond the agreement expected from how frequently the judges use the available categories. This matters when one label is used often since two judges can match on common categories in part because of those frequencies. The reported statistic summarizes agreement on the assessed material. The paper does not spell out how judgments from the larger pool of annotators were paired or pooled to obtain it.
Setting up the sentiment comparison
The labeled examples are divided in the reported proportion [70 : 15 : 15]. These are the training, validation, and test shares, in that order. The training split has 14,000 examples. The validation and test splits have 3,000 examples each. Training is the stage in which the classifiers learn from labeled examples. Validation supplies separate evidence for development decisions, and the test split serves as the common held-out comparison. The paper publishes results for validation as well as test, so claims about which entry leads can be attached to a particular split.
The conventional baselines are Logistic Regression, Random Forest, and SVM. Logistic Regression is used as a classifier that relates input features to a label prediction. A random forest combines decisions from multiple trees. An SVM, or support vector machine, learns a boundary between classes with an emphasis on separating the classes by a margin. These descriptions explain their roles as different kinds of baselines. The paper gives limited detail about the specific text features supplied to them, so the comparison concerns the implementations used in the study.
The recurrent entries are an RNN and an LSTM. A recurrent neural network processes a sequence while carrying information from earlier positions in an internal state. Long Short-Term Memory is a recurrent architecture that controls what information the state retains or discards. The comparison asks how these implementations fare on the same sentiment task. It does not require the reader to assume that the written word is the only possible unit of representation, or that each example must depend on information carried across the same span of text.
The remaining entries use pretrained transformers. In these systems, attention allows a token’s representation to draw on information from other positions. The multilingual entries are mBERT and XLM-RoBERTa. The paper groups BanglaBERT and BanglishBERT as Bangla systems and describes their pretraining in Bengali and Bengali-English, respectively. It places BERT and DistilBERT in the English group. DistilBERT serves as a lighter BERT variant. All the pretrained sentiment entries are fine-tuned on BnSentMix. For the names that also appear in the detector experiment, the sentiment scores concern adaptation to a different target.
The implementation account names Huggingface for the pretrained implementations and Adam for optimization. It reports a training batch size of 32, meaning that this many examples are processed together in a batch under the stated configuration. The stated learning rate is 1E−5 for Logistic Regression, RNN, and LSTM, and 1.5E−6 for the BERT family. The learning rate affects the size of updates during training. The hardware was an NVIDIA Tesla P100 with 16GB of memory. A training epoch, a pass through the training material, took from 8 to 13 minutes in the reported setup. The authors say that most settings followed defaults. These details describe the shared experimental framework, while leaving some settings of individual baselines open.
Experiments and results
Reading the dataset statistics
The paper’s statistics table lists a unique sentence count of 20,000 and a unique word count of 37,734. The latter is a count of distinct recorded forms under the paper’s counting procedure. An English spelling and a romanized Bengali spelling can both contribute forms to that count. So can different spellings of material a reader would interpret in the same way. The count describes the vocabulary encountered in the collection. By itself it provides no estimate of the number of underlying dictionary entries, the degree of overlap between the language vocabularies, or the coverage of those forms by a particular classifier.
The mean example length is 11.65 words, and the maximum is 368 words. The mean character length is 62.77, with a minimum of 14 and a maximum of 1985 characters. These measures give a sense of the typical scale of the input and the possible range. A mean and a maximum leave the shape of the distribution open. They cannot establish how common the longer inputs are, whether length affects the relative performance of the baselines, or whether the longest records mainly come from reviews or comments.
The label-distribution figure summarizes the final annotated data. The authors single out mixed sentiment in their limitations discussion, where they give its share as 9.2%. This is the prevalence in the collection as a whole. The published baseline results are aggregate values over each evaluation split. To use the label share when interpreting a given score, a reader also needs to know how the metric aggregates across labels and how well the classifier performs on each label. The percentage identifies the category for which those details are especially consequential.
What the reported metrics measure
Accuracy is the share of evaluation examples for which the predicted label matches the reference. Each example contributes a correct or incorrect decision. If a reader wants to know how the classifier treats a particular category, precision and recall ask complementary questions. Precision for that category concerns the predictions bearing its label and asks how many are correct. Recall starts with the reference examples of the category and asks how many the classifier retrieves. For mixed sentiment, precision concerns whether a candidate presented as mixed really has that reference label. Recall concerns whether the examples labeled mixed are being recognized at all.
F1 combines precision and recall by taking their harmonic mean. For a single category, a low value for either component pulls the combined result down. There is an additional decision when a paper reduces the performance of several categories to a single reported F1. An average can give categories equal influence, reflect their frequency, or be based on pooled decisions. These approaches answer different questions about the classifier. The paper names F1 as an evaluation measure and gives precision and recall in its sentiment table. It leaves the averaging convention insufficiently specified for a reader to reconstruct the aggregate from category-level behavior.
The detector and the sentiment baselines both use accuracy and F1, but their results describe different decisions. The first experiment scores detection on the detection evaluation. The second scores agreement with sentiment labels on BnSentMix. A detection result can support the choice of one word classifier inside the collection pipeline. A sentiment result can support a choice among opinion classifiers trained on the benchmark. Neither number can serve as the other experiment’s score.
Which detector performed best
mBERT leads the reported detection accuracy comparison. The other entries trade places across the two detection metrics. BanglishBERT has the higher accuracy of those two, whereas XLM-RoBERTa has the higher F1. The chart uses the paper’s percentage scale for accuracy.
Accuracy on the Bengali-English code-mix detection evaluation
The multilingual BERT detector attains the highest reported accuracy.
The numbers
| System or setting | accuracy % |
|---|---|
| XLM-RoBERTa | 89.60 |
| BanglishBERT | 90.56 |
| mBERT (this paper) | 94.56 |
The corresponding detection F1 values are 0.9403 for mBERT, 0.8985 for XLM-RoBERTa, and 0.8961 for BanglishBERT. The agreement between mBERT’s rank on the two metrics makes it the strongest reported choice for this component. The paper attributes the result to the usefulness of mBERT’s multilingual pretraining for the details of Bengali-English writing. The comparison establishes the relative scores of the detector configurations. It gives no breakdown showing which kinds of romanized spellings or internally mixed words mBERT recognized more successfully.
The paper calls this a Bengali-English code-mix detection comparison and describes the separate word collection used for training. It does not specify the evaluation partition in enough detail to attach these numbers to a named held-out split with a stated sample count. In particular, the strong score cannot be used to calculate the proportion of correct admissions among every accepted social comment or review. That would require evidence about the end-to-end admission decision in the collected pool, where word errors accumulate and the actual mix of candidate types may differ from that in the detection evaluation.
The sentiment rankings depend on the metric
On the BnSentMix test split, BERT leads reported F1 with 0.688. mBERT reaches 0.684. The strongest accuracy results go to XLM-RoBERTa and BanglaBERT at 0.698 each. BERT’s test accuracy is 0.695. The paper’s prose highlights BERT as the strongest for both metrics, and its overview reports the BERT values as 69.5% accuracy and 68.8% F1. The detailed table supports the F1 ranking and gives a different ordering for test accuracy. The two charts preserve the values as listed in that table.
Test F1 on BnSentMix across selected sentiment baselines
English BERT leads on reported test F1, with multilingual BERT closest.
The numbers
| System or setting | F1 |
|---|---|
| RNN | 0.375 |
| Random Forest | 0.641 |
| SVM | 0.648 |
| LSTM | 0.663 |
| DistilBERT | 0.668 |
| XLM-RoBERTa | 0.669 |
| BanglaBERT | 0.669 |
| BanglishBERT | 0.669 |
| mBERT | 0.684 |
| BERT (this paper) | 0.688 |
Test accuracy on BnSentMix across selected sentiment baselines
XLM-RoBERTa and BanglaBERT share the highest listed test accuracy.
The numbers
| System or setting | accuracy |
|---|---|
| RNN | 0.401 |
| SVM | 0.660 |
| LSTM | 0.670 |
| DistilBERT | 0.672 |
| BanglishBERT | 0.686 |
| mBERT | 0.694 |
| BERT | 0.695 |
| BanglaBERT (this paper) | 0.698 |
| XLM-RoBERTa | 0.698 |
The accuracy ties and the F1 ordering are compatible with different distributions of errors. XLM-RoBERTa and BanglaBERT each have test precision of 0.642 and recall of 0.698 in the aggregate table. The corresponding BERT figures are precision of 0.683 and recall of 0.694. Those are the paper’s reported measures, including the distinction between BERT’s recall and its accuracy. A reader can describe BERT as having a higher reported precision than those accuracy leaders. The aggregate table supplies too little information to identify which false predictions account for the difference or to attribute the ordering to performance on mixed sentiment specifically.
The validation columns tell a related story. BERT has validation accuracy of 0.727. mBERT and XLM-RoBERTa each have validation accuracy of 0.726. On validation F1, mBERT reaches 0.719, while BERT and XLM-RoBERTa each reach 0.717. The highest listed validation accuracy and the highest listed test accuracy thus belong to different entries. The same is true of the validation and test F1 leaders. Reporting the split alongside each metric keeps a result used during development distinct from the results on the final held-out examples.
The comparison also puts the English BERT result in context. The fact that it leads on test F1 shows that a classifier initialized from English pretraining can be competitive on this particular form of Bengali-English, after training on the labeled mixed material. The result gives no direct measure of what its pretraining alone supplies, or how often it relies on English words in the input. The authors raise the possibility that the English content of mixed writing helps explain the ranking. The scores establish that this explanation is worth distinguishing from other possible causes, such as differences in the way the systems represent the romanized material.
The conventional baselines give different answers on different splits
Among the conventional entries, the SVM has validation accuracy of 0.694 and validation F1 of 0.685. Logistic Regression reaches 0.668 validation accuracy and 0.662 validation F1. Random Forest has validation accuracy of 0.672 and validation F1 of 0.666. The SVM therefore leads that group on both reported validation measures. On test, it retains the best F1 in the group at 0.648. Logistic Regression has the group’s highest test accuracy at 0.667, with a test F1 of 0.639. Random Forest records test accuracy of 0.648 and F1 of 0.641.
The authors describe the SVM as competitive with larger systems such as BanglishBERT. The comparison supports including it as a reference point, particularly given its validation scores. For instance, SVM and BanglishBERT share the validation accuracy of 0.694. The SVM’s reported F1 is lower than BanglishBERT’s on validation, and BanglishBERT scores higher on both measures on test. The scope of the comparison is therefore important. A conventional approach can make sensible predictions in this setting, while the table still shows benefits for several of the pretrained entries.
The paper gives a common hardware description and a range for how long an epoch took. It does not pair each conventional baseline with a measured resource budget, or compare the costs of making predictions after training. The relevance to a resource-constrained setting is the presence of conventional comparators with usable reported scores. Selecting a system for a particular memory or latency constraint would require a comparison on those measures as well.
The recurrent comparison
The RNN reaches validation accuracy of 0.406 and validation F1 of 0.350. The LSTM reaches 0.678 validation accuracy and 0.674 validation F1. The ordering carries over to the test results. The LSTM’s test accuracy is 0.670 and its test F1 is 0.663, while the RNN records 0.401 and 0.375, respectively. Among these two implementations, the LSTM makes substantially more correct sentiment decisions, and its aggregate F1 is closer to those of several pretrained entries.
The test results allow some practical comparisons across families. The LSTM exceeds each conventional entry on reported test F1. DistilBERT exceeds the LSTM on that metric and has test accuracy of 0.672. For an engineer, the LSTM is a stronger recurrent reference than the basic RNN studied here. For a researcher, the range within this pair is a reason to take the implementation and training of a baseline seriously when using it to represent a whole architectural family.
The paper associates the RNN’s weaker performance with long dependencies and with vanishing or exploding gradients. A gradient is the training signal that indicates how to change the parameters to reduce loss. In recurrent processing, that signal can become too weak or too large as it passes through many successive steps. The authors offer this as a possible account of the comparison. The results as presented establish the performance order, while a diagnosis of the training mechanism would require evidence about gradient behavior or results broken down by the kinds of dependencies each implementation had to handle.
What the ablations show
The paper reports no formal ablation study, and instead offers comparisons among detectors and sentiment baselines together with an analysis of training loss.
What changes when the detector or classifier changes
The detector comparison is useful for choosing among the implemented options. The three entries serve the same general collection purpose, and mBERT leads their reported detection metrics. Comparing pretrained systems changes multiple properties at once. The systems arrive with different prior training and different ways of representing words. A result at that level identifies a better-performing package under the experimental setup. It leaves open whether the advantage would follow from the same amount of prior training in different languages, from better handling of unusual word forms, or from some other feature of the implementation.
The sentiment experiment has the same interpretive structure. The recurrent comparison places the LSTM ahead of the RNN. The transformer comparison places English BERT at the top on test F1, with other systems leading on test accuracy. The authors suggest that multilingual pretraining contains relatively little Bengali and that English pretraining helps with the English material in the comments. They also argue that prior training on Bengali forms need not help as much as expected when those forms appear in romanized mixed writing. Under the reported comparison, the pretraining corpora, word representations, and architectures can vary together. The ranking cannot identify which of those differences explains the scores.
An analysis grouped by actual language use would speak more directly to those explanations. For example, an advantage concentrated in examples rich in English material would carry a different implication from an advantage concentrated in examples with word-internal switching. The paper’s examples show that these linguistic distinctions are plausible sources of difficulty. The aggregate sentiment scores do not group errors by them. The architectures are therefore compared as complete approaches to the benchmark, and the authors’ accounts of their relative strengths remain hypotheses about those approaches.
What changes when the pipeline changes
The threshold in the filter is specified and supplies a reproducible condition once the word predictions are known. The reported comparison varies the detector, while the aggregation rule is presented as part of the selected pipeline. The paper does not compare the effects of different thresholds on which candidates reach annotation. Lowering a minimum share can admit more cases at the margin, including cases with limited Bengali evidence. Raising it requires denser evidence and can exclude writing with a brief switch. A comparison of word detectors on their own task has no direct measurement of that selection effect.
The data decisions have similar boundaries. The authors draw from multiple sources to obtain a greater variety of expression. Their experiments use the resulting combined collection. They do not compare it with a single-source collection of matched size. Similarly, they retain a mixed sentiment label and keep spelling and grammatical irregularities, but do not evaluate versions with a different label scheme or with corrected text. Readers can understand the reasons for these decisions and inspect the resulting benchmark. The paper supplies no measured contribution for any one decision in isolation.
That distinction also applies across stages of processing. A rule can be effective at detecting familiar forms of Bengali and English and still change the distribution of hard examples that remain. A sentiment system might then score well in part because the filter selected material it can readily encode. The reverse possibility is that the filter succeeds at retaining writing that is recognizably mixed and especially difficult to classify. The paper’s detector and sentiment evaluations show outcomes at their respective stages. They leave the relation between these outcomes unidentified.
What the training curves add
The authors trace training loss over 15 epochs. Loss is the quantity training attempts to reduce on the training examples. The paper reports that the curves generally settle before the final epoch and notes that the LSTM still shows some indication that it could benefit from further training. It describes the BERT-family entries other than DistilBERT as tending to settle earlier. These observations are about how quickly the fitted systems approach a stable region under the reported training setup.
The authors suggest that 5-8 epochs are appropriate for many of their settings to help avoid overfitting. A curve on training data can reveal that improvements in fit are slowing, or that a system is still learning under its assigned schedule. Overfitting concerns the relation between that fit and performance on unseen examples. A declining training loss can accompany a worsening validation result. The paper’s loss comparison therefore supports an account of optimization speed. The evidence needed to tie its proposed epoch range to generalization would be the corresponding validation behavior over training, with the selection criterion made explicit.
Limitations
Limits identified by the authors
The authors identify the scarcity of mixed sentiment as a limitation. At 9.2% of the dataset, it offers fewer occasions for a classifier to learn this distinction than the more frequent categories provide. Its share also matters when interpreting an aggregate of performance over examples. The classifier could behave very differently on mixed items and still record a score close to another classifier whose errors are distributed differently. The authors call for analysis by sentiment label to determine how the imbalance affects the results.
They also acknowledge the influence of the annotator’s own feelings on judgment. Independent labels and adjudication reduce reliance on one person’s response to a difficult passage. Workload arrangements address the authors’ concern about the effects of fatigue. Neither the agreement result nor the presence of adjudication measures the amount of shared bias among annotators. Readers can agree because the writing is clear, or because they bring similar assumptions to references, idioms, and what counts as a strong enough evaluation. The reported kappa concerns consistency under the annotation process used.
Scope of the writing represented
The selection and cleaning procedures define what the benchmark can support. Removing non-ASCII characters restricts the forms of Bengali that reach the classifier. Emoji removal and punctuation compression also change signals a reader can use to interpret tone. Since the pipeline applies these transformations before human annotation, the reference judgment is for the processed sample. The study does not compare that judgment with one made on the full original version. How often the transformations preserve the perceived sentiment is consequently unresolved.
Excluding very short items and messages with external URLs also affects which communicative situations enter the collection. A brief evaluative reply might convey its meaning in context, while a message with a link might direct readers to what is being criticized. The benchmark focuses on the records that survive the procedure. It offers no separate estimate of how the baselines would perform on those omitted cases or when surrounding posts, threads, and reaction signals are available.
Combining social-media comments with product reviews broadens the kinds of input. It leaves representativeness an open question. The test table contains results on the benchmark split, with no platform held out for a transfer experiment and no breakdown of the scores by source. A classifier might draw on patterns that recur across sources, or its overall score might combine strong performance in one setting with weak performance in another. The collection procedure and pooled results cannot distinguish those possibilities.
Details that affect reconstruction
The length boundary appears in several forms. The cleaning prose says that examples of four words or fewer are discarded. The displayed detection procedure rejects candidates below 4 processed words. The statistics table gives 4 as the minimum word count in BnSentMix. The paper leaves open which length definition or stage accounts for these descriptions. A reconstruction that takes the cleaning prose literally and uses the same count throughout could exclude examples consistent with the final statistics. The capitalization issue is smaller but similar. The prose and pseudocode describe sentence beginnings and capitalization in different operational terms.
The language filter offers a clear lower threshold for predicted Bengali evidence. As displayed, it lacks a corresponding requirement for positive evidence of English and a dedicated branch for excluding a third language. The authors’ account says both wholly romanized Bengali and third-language contamination are concerns. It also states that words outside the language pair are excluded. The gap between that goal and the displayed operations leaves the practical exclusion checks uncertain. The strong detector scores do not resolve that uncertainty because a result on the detector’s evaluation does not record how the threshold behaves on every kind of candidate text.
Other details matter for comparing implementations. The detector’s split and label mapping are incompletely described, and the conventional sentiment baselines’ text features are left open. The use of defaults gives a broad implementation description. Reconstructing specific training runs also depends on which defaults apply to each method and how checkpoints are selected. The paper releases code and data under CC BY 4.0. It reports that private or personally identifying information was removed, without detailing an audit of that process in the paper.
Limits of the reported performance
The sentiment table contains a common set of scores but no per-label precision, recall, or F1. There is also no confusion matrix specifying which labels are mistaken for one another. Aggregate performance cannot tell a reader whether a system tends to read conflicted statements as neutral, pick whichever sentiment occurs first, or recognize both evaluations and still choose a different label. Those would be consequential differences for the use of the benchmark, even among systems with similar overall scores.
The unclear averaging convention limits comparison beyond these experiments. A later evaluation that reports F1 needs the same aggregation rule if its score is to answer the same question. The paper also gives point estimates without a repeated-run analysis or uncertainty estimates for the sentiment rankings. BERT leads the recorded test F1 values, and the two accuracy leaders share the highest listed value. The stability of those positions across fresh training runs, new splits, or different source mixtures remains undetermined.
The authors conclude by identifying hate speech, offensiveness, and abusive content as possible directions for research on mixed writing. The results here concern opinion labels. A criticism can be negative without qualifying for any of the other tasks, and a label for abusive content would need a definition and reference judgments of its own. What transfers directly from this study is a concrete account of the collection and interpretation challenges. Success on the additional tasks would require separate evidence.
What came after
Romanized writing and the broader survey literature
The citation record includes BanglaTLit, dated 2024. The BnSentMix paper itself cites it as earlier work, so it belongs chronologically with the antecedents of the 2025 paper. BanglaTLit benchmarks back-transliteration of Bengali written in Latin script. That task treats the recovery of Bengali script as the desired output. BnSentMix treats romanized Bengali as part of the sentiment classifier’s input. The relationship is a shared concern with how to handle writing that departs from the script expected for Bengali, with success defined differently in the two studies. BanglaTLit
A 2026 survey takes language switching across modalities as its subject. In that wider setting, BnSentMix supplies a concrete example of a benchmark built around naturally sourced written switching and human opinion judgments. Its place in the citation record shows that it enters a discussion with a broader scope than Bengali-English written sentiment. The survey’s bibliographic description establishes that scope and the citation. The precise assessment it gives of BnSentMix’s filter, labels, or rankings is unspecified. Beyond Monolingual Assumptions
The move from written text to speech
One 2026 citing work concerns spoken language that mixes Bengali with English and Hindi with English. It puts disfluencies, interruptions in the flow of speech, within the scope of its data. The shared issue is how to build a resource for informal language mixing. The object of study changes from cleaned comments and reviews to speech with disfluencies. BnSentMix supplies a written-data point of comparison for the Bengali-English part of that setting. The citation record leaves open whether the speech work used any part of the corpus or its collection procedure. Bengali-English and Hindi-English Code Mixed Speech Data with Disfluencies
Another 2026 work describes a pipeline for under-resourced speech with language mixing and disfluencies, extending from prompts to acoustic baselines. Its title identifies both a resource-building process and reference systems for an audio task. BnSentMix addresses a similar need for a construction procedure and a baseline comparison, using written examples and sentiment labels. This is a relationship between research problems at the level documented by the citation. Use of the mBERT filter, its share threshold, or the BnSentMix annotation scheme in the speech pipeline is unspecified. From LLM Prompts to Acoustic Baselines
Human judgments for a different classification task
BanHADEX, dated 2026, addresses explainable hate-speech detection in Bangla through human-annotated explanations. The subject connects to one of the directions the BnSentMix authors identify in their conclusion. It also uses human judgment for a different purpose. A sentiment label records the kind of evaluation expressed in a sample. An explanation for a hate-speech decision concerns the grounds for a different classification. The citation documents contact between these lines of work. Direct reuse of BnSentMix examples, labels, or screening methods is unspecified. BanHADEX
Cite
Cite as Sadia Alam, Md Farhan Ishmam, Navid Hasin Alvee, Md Shahnewaz Siddique, Md Azam Hossain and Abu Raihan Mostofa Kamal. 2025. BnSentMix: A Diverse Bengali-English Code-Mixed Dataset for Sentiment Analysis. Proceedings of the First Workshop on Language Models for Low-Resource Languages.
@inproceedings{alam2025bnsentmix,
title = {{BnSentMix: A Diverse Bengali-English Code-Mixed Dataset for Sentiment Analysis}},
author = {Sadia Alam, Md Farhan Ishmam, Navid Hasin Alvee, Md Shahnewaz Siddique, Md Azam Hossain and Abu Raihan Mostofa Kamal},
booktitle = {Proceedings of the First Workshop on Language Models for Low-Resource Languages},
year = {2025},
url = {https://aclanthology.org/2025.loreslm-1.4/}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/alam-2025-bnsentmix-diverse-bengali-english-code/