Perspectives in Research and Society · Vol. 2 No. 11 (2026)
Published November 26, 2026

How Sensitive Are Sentiment Classifier Rankings to the Target Label Mix? Evidence from NusaX

Barbara Brennan, Donald Fisher, Gabriel Wilson

Abstract

Average sentiment error gives no indication of which label contributes most to a difference between classifiers. We held the predictions from 20 lexical classifiers fixed on 398 parallel NusaX test items in ten Indonesian local languages and recomputed expected error under alternative target class mixtures. The same classifier had the lower point estimate in each language across the four moderate mixtures studied. In five languages the fitted class errors allowed a ranking change elsewhere in the mixture space. The equally weighted ten-language averages crossed near 69% positive texts when the two other classes were equally common, with substantial sampling uncertainty. The fitted break-even share describes a change in the evaluation mixture with both classifiers held fixed.

The ranking question

A sentiment application may be built for a review stream that is mostly positive and later used on a feed that contains more neutral updates. Even with the same classifier, a reported error rate can change if errors are more frequent on one class than another. Choosing between classifiers adds a further issue. One model might recognize neutral text more often, while a second might classify positive texts more accurately. A held-out benchmark that combines these classes into a single score implicitly values those advantages in proportion to its label counts. Another expected mixture can therefore change the estimated difference. In a remote language or domain, test coverage of the intended mixture may be difficult to establish before the model is used.

Feng (2025) presents low-resource sentiment transfer in the setting of multilingual BERT adaptation to dialects and minority languages. The relevance here is the interpretation of performance once a model is under consideration for a target language. We ask whether a ranking of two simple lexical baselines is sensitive to the mixture of negative, neutral, and positive test items, with their predictions unchanged. In contrast to changes in training, this question can be addressed using documented pairs of prediction errors and a simple standardized estimate. Both classifiers here are fitted in each language separately, so the result assesses evaluation sensitivity with fixed estimators. An adaptation experiment could repeat the same calculation for transferred models once their target predictions were available.

Work on sentiment classification has long considered choices in text representation. Pang et al. (2002) compare machine-learning approaches for sentiment in reviews, while Wang and Manning (2012) document strong results from simple lexical baselines and bigram features. Character input can preserve information across related surface forms, as illustrated in a different modeling setup by Zhang et al. (2015). Our two baselines differ only in their feature representation and share the same class prediction rule. We expect some languages to show a consistent advantage for one representation under all considered mixtures. The contrasting prediction is that one classifier's class-specific advantage changes sign across the three labels, allowing the mixture of labels to determine the overall ranking. The important empirical conditions are the signs and sizes of the three differences, not a claim of superior performance for one representation in general.

Data and matched items

We use the ten local-language partitions of NusaX, assembled by Winata et al. (2023) from translations of Indonesian sentiment examples. Their source materials include the SmSA sentiment data associated with the Indonesian benchmark documented by Wilie et al. (2020). The local-language files let us keep the same source items and assigned sentiment labels across several languages. Using a parallel dataset does not make the translations equivalent in difficulty. Research by Artetxe et al. (2020) and Volansky et al. (2015) explains how translation can leave language-specific artifacts that influence modeling and interpretation. Larger cross-language studies using translated benchmarks, such as Conneau et al. (2018) and Ponti et al. (2020), illustrate how shared semantic items support matched comparisons while still demanding caution about indigenous usage.

The source repository is pinned at commit 75b0be5d982348332509f296e10d9bf9cb66d60f. Its dataset documentation gives a Creative Commons Attribution ShareAlike license, and the official dataset card identifies version 4.0. We fetched the train, validation and test files for each local language on 23 November 2026 and recorded a hash for each file. The file schema contains a source item identifier, translated text, and a sentiment label. Within each split the identifiers are unique and both identifiers and labels align across all ten languages. The train, validation and test identifiers are disjoint. Each training set has 500 records, covering 192 negative, 119 neutral and 189 positive items. The 100 validation records per language were neither used as extra training data nor used to tune the two predefined models.

Texts are case-folded, normalized to Unicode NFC, and have URLs and at-mentions replaced by spaces. Runs of white space are then collapsed. A test identifier would be excluded everywhere if its text were empty or matched a training text after these transformations in any of the ten languages. No identifier met either criterion. We excluded every occurrence of exact duplicate test text within a language and removed the corresponding identifiers from every translation, resulting in two removed source items. The 398 held-out source items consist of 151 negative, 96 neutral and 151 positive labels. The final evaluation uses thirty summaries of within-class test errors per baseline, one for each language and class. It involves 3,980 language-by-item prediction pairs. The underlying unit for uncertainty is the shared source item, so this number does not express 3,980 independent test observations. No source text or identifier appears in the exported numerical results.

Two lexical fits and fixed-mixture calculations

We fit one count-based multinomial naive Bayes classifier with word features and another with character features in each language. The word representation counts runs of Unicode alphabetic characters and adjacent word bigrams. The character representation counts overlapping strings of lengths three through five in the whole normalized text, with a space added at each end. Each vocabulary is learned only from that model's training texts, and absent features at test time make no likelihood contribution. The class prediction takes the largest sum of the empirical log class prior and the count-weighted log conditional probabilities. Every feature receives one pseudocount per class, with normalizing denominators formed over the training vocabulary. Ties are resolved in the fixed label order negative, neutral, positive. This simple estimator makes the two pipelines inspectable even where the vocabulary or class rates differ by language.

McCallum and Nigam (1998) distinguish naive Bayes formulations for documents, and Lewis (1998) reviews the independence assumptions behind their use in retrieval. The overlapping character features here are dependent by design. We use the estimates to obtain a deterministic ranking of class prediction scores for each text, without interpreting these scores as calibrated posterior probabilities. Rennie et al. (2003) show how deviations from the basic text model can motivate alternative estimators. We use the unmodified count-based method so class comparisons depend only on the feature family and the fixed prior. All ten language-specific pairs were fitted before applying the mixture scenarios, and none is retrained or recalibrated when the target evaluation weights change.

For a given class, the error difference is the fraction misclassified by the character model minus the fraction misclassified by the word model, using the same texts in both fractions. Overall error under a target mixture is the weighted average of the three conditional errors. We compute the character-minus-word difference for the retained test distribution, equal class shares, and each of the three settings in which one class has weight 60% and the two others have 20% each. Lower error favors a classifier. A negative difference therefore favors character features. These are illustrative prevalence scenarios rather than forecasts for use in the ten language communities. We hold unit mistakes equally costly. This differs from introducing a higher cost for a missed negative example. Fawcett (2006) and Hand (2009) discuss aspects of how operating or scoring choices affect comparisons, and Sokolova and Lapalme (2009) review the behavior of commonly used metrics. A separate analysis could introduce task-specific costs or per-class F1, whose interpretation would require different estimands.

The mixture calculation has the conditional invariance used to reason about label shift. It assumes that class-conditional error rates of the fixed predictors in the application population would equal those observed here. Saerens et al. (2002), Lipton et al. (2018), and Alexandari et al. (2020) study ways to estimate or adapt to changed class priors for trained classifiers. Forman (2005) considers the related problem of measuring prevalence when classifiers have errors. This study uses stated mixtures and leaves all class predictions untouched. It does not estimate the actual priors in an unobserved target dataset. Moreno-Torres et al. (2012) distinguish shifts in prevalence from other forms of distribution change. Covariate-shift approaches such as Sugiyama et al. (2006) would require additional input-level evidence, while class imbalance in training presents other decisions discussed by He and Garcia (2009). The present calculation is a sensitivity analysis for one part of the evaluation problem, conditional on the observed errors.

Research diagram for the paired NusaX evaluation and an average error difference curve across hypothesized positive class shares.

Figure 1. Both models score the same source IDs within each language before the target classes are reweighted. Panel B fixes negative and neutral share equal to each other and lets positive prevalence vary. The line is the ten-language mean difference. The band contains pointwise item-bootstrap intervals. The indicated crossing describes the fitted curve.

Error differences under the specified mixtures

Table 1 gives the fitted scenario comparisons. In the retained benchmark mixture, character-based error averages 31.46% and word-based error averages 32.44%. The difference is −0.98 percentage points, with a 95% interval from −2.51 to 0.58. Neutral-heavy evaluation gives substantially higher error for both models and the largest average advantage for character features among the moderate scenarios. Positive-heavy evaluation gives lower error for both and their smallest average difference. Both patterns follow from the higher neutral error and the lower positive error in the class-specific estimates. Each locale's scenario ranking remains the same across all of the specified moderate weights, even when the magnitude of the gap changes. Character features have the lower point estimate in eight languages under every one of these settings. The two languages with the reverse sign are Balinese and Ngaju.

Table 1. Equally weighted ten-language mean error for alternative target label mixtures.

Target mixture Character error (%) Word error (%) Character minus word (pp) Paired 95% interval (pp)
Retained test counts 31.46 32.44 −0.98 [−2.51, 0.58]
Balanced 37.03 38.34 −1.30 [−3.03, 0.41]
Negative-heavy 33.13 34.47 −1.34 [−3.19, 0.50]
Neutral-heavy 53.18 55.42 −2.24 [−4.78, 0.18]
Positive-heavy 24.79 25.12 −0.33 [−1.65, 1.04]

Table 1 note. Both classifiers use the same 398 parallel test IDs in each language. Resampling uses 6,000 draws within gold sentiment classes. At each replicate, the same sampled source IDs are used for both models and all languages. Estimates describe fixed fits and the stated target mixtures.

The largest potential difference across mixtures for a fixed language is obtained by inspecting its class-specific differences. A weighted average cannot fall outside the smallest and largest class difference, and those two endpoints can be attained by placing all weight on the corresponding classes. Five languages have estimated class contrasts of opposite signs. This makes a ranking reversal possible somewhere in the full mixture space on the fitted errors, even though none changes sign among the four moderate scenarios. It is a statement about the shape of the estimated surface. A pure-class endpoint is a mathematical boundary and need not resemble a plausible deployment population. In Madurese, for example, the character model has an 11.26-point advantage on negative examples and equal positive error. Increasing the positive share alone can shrink its estimated advantage to a tie. In Ngaju, the word model has lower estimated error on both polar classes and matches the character model on neutral texts. Their ordering is likewise stable on the fitted surface.

At the language-average level the negative-class error difference is −1.39 points, the neutral difference is −3.65, and the positive difference is +1.13. The illustrative curve in Figure 1 crosses zero at a fitted positive share of 69.11% when the other two shares are equal. The pointwise bootstrap intervals cover zero on the positive-heavy side of the curve. They also cover zero for each moderate evaluation setting in Table 1. We therefore have a measured example of a contrasting error pattern and a fitted break-even point, with insufficient precision to describe that threshold as a population switch. The procedure adapts the bootstrap of Efron (1979) to preserve both classifier pairing and translation pairing. It does not redraw the training datasets or generalize across a new sample of languages.

Scope for deployment comparisons

The difference between the average breakdown and the language-specific cases matters when selecting a comparison to report. The ten-language curve weights language differences equally, so its fitted break-even share is a property of that convention and the assumption of equal negative and neutral shares. A report for one language could use its own three errors and different shares. The resulting curve might have a different crossing or remain on one side of zero throughout. Likewise, the parallel construction pairs the estimates across languages without providing a frequency distribution for future language use. A corpus-level result weighted by expected text volumes would answer a different question and would require that distribution to be specified separately.

Real evaluations can experience shifts in topics, translation quality, annotation practices, and the prevalence of sentiments at the same time. Domain transfer methods from Daumé III (2007), Blitzer et al. (2007), and Glorot et al. (2011) address ways to account for some of these changes. Ben-David et al. (2010) supply theory for the relationship between domains. A model intended for a new language or collection could undergo a change in class-conditional errors even if its class weights stayed fixed. Methods and conclusions would then need an external evaluation of actual target texts. The separation made here is useful because it pinpoints how much of a comparison can move under prevalence assumptions alone, while leaving prediction changes for a model and data design that can actually test them.

The translation dependency further limits the interpretation to the defined NusaX experiment. Translated positive items might be easier than the range of positives found in an independently collected target stream. More generally, documenting the coverage of low-resource languages and genres matters for interpretation, as argued by Joshi et al. (2020). Ribeiro et al. (2020) examine targeted behavioral tests that make failures visible alongside overall benchmarks. An analogous follow-on comparison would add independently collected texts by class and preserve the class-specific differences in the report. For the released benchmark studied here, the moderate scenarios yield stable fitted rankings and noticeably different gaps. This distinction is a practical outcome in its own right. When the prediction data support only a narrow range of target mixtures, the achievable strength of any classifier recommendation should reflect the uncertainty in the conditional error estimates.

Conclusion

The two NusaX sentiment baselines produce a consistent ordering across the specified moderate label mixtures in every language. The same errors also imply feasible ranking changes under more extreme mixtures for five languages. The distinction becomes visible once the error difference is reported by class and applied to stated weights. Any model comparison for multilingual sentiment transfer can use this measurement as a transparent sensitivity check before interpreting a single overall score as the ranking for an unknown deployment stream.

References

  1. Alexandari, A.; Kundaje, A.; Shrikumar, A. (2020). Maximum Likelihood with Bias-Corrected Calibration is Hard-To-Beat at Label Shift Adaptation. Proceedings of Machine Learning Research, 119, 222–232. https://proceedings.mlr.press/v119/alexandari20a.html
  2. Feng, S. (2025). Cross-Linguistic Transfer for Low-Resource Sentiment Analysis: Adapting Multilingual BERT to Dialects and Minority Languages. 2025 8th International Conference on Computer Information Science and Application Technology (CISAT), 969–975. https://doi.org/10.1109/cisat66811.2025.11181782
  3. Artetxe, M.; Labaka, G.; Agirre, E. (2020). Translation Artifacts in Cross-lingual Transfer Learning. Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), 7674–7684. https://doi.org/10.18653/v1/2020.emnlp-main.618
  4. Ben-David, S.; Blitzer, J.; Crammer, K.; Kulesza, A.; Pereira, F.; Vaughan, J. W. (2010). A theory of learning from different domains. Machine Learning, 79(1-2), 151–175. https://doi.org/10.1007/s10994-009-5152-4
  5. Blitzer, J.; Dredze, M.; Pereira, F. (2007). Biographies, Bollywood, Boom-boxes and Blenders: Domain Adaptation for Sentiment Classification. Proceedings of the 45th Annual Meeting of the Association of Computational Linguistics, 440–447. https://aclanthology.org/P07-1056/
  6. Conneau, A.; Rinott, R.; Lample, G.; Williams, A.; Bowman, S.; Schwenk, H.; Stoyanov, V. (2018). XNLI: Evaluating Cross-lingual Sentence Representations. Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, 2475–2485. https://doi.org/10.18653/v1/d18-1269
  7. Efron, B. (1979). Bootstrap Methods: Another Look at the Jackknife. The Annals of Statistics, 7(1), 1–26. https://doi.org/10.1214/aos/1176344552
  8. Fawcett, T. (2006). An introduction to ROC analysis. Pattern Recognition Letters, 27(8), 861–874. https://doi.org/10.1016/j.patrec.2005.10.010
  9. Forman, G. (2005). Counting Positives Accurately Despite Inaccurate Classification. Lecture Notes in Computer Science, 564–575. https://doi.org/10.1007/11564096_55
  10. Glorot, X.; Bordes, A.; Bengio, Y. (2011). Domain Adaptation for Large-Scale Sentiment Classification: A Deep Learning Approach. Proceedings of Machine Learning Research, 15, 315–323. https://proceedings.mlr.press/v15/glorot11a.html
  11. He, H.; Garcia, E. A. (2009). Learning from Imbalanced Data. IEEE Transactions on Knowledge and Data Engineering, 21(9), 1263–1284. https://doi.org/10.1109/tkde.2008.239
  12. Hand, D. J. (2009). Measuring classifier performance: a coherent alternative to the area under the ROC curve. Machine Learning, 77(1), 103–123. https://doi.org/10.1007/s10994-009-5119-5
  13. Daumé III, H. (2007). Frustratingly Easy Domain Adaptation. Proceedings of the 45th Annual Meeting of the Association of Computational Linguistics, 256–263. https://aclanthology.org/P07-1033/
  14. Joshi, P.; Santy, S.; Budhiraja, A.; Bali, K.; Choudhury, M. (2020). The State and Fate of Linguistic Diversity and Inclusion in the NLP World. Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, 6282–6293. https://doi.org/10.18653/v1/2020.acl-main.560
  15. Lewis, D. D. (1998). Naive (Bayes) at Forty: The Independence Assumption in Information Retrieval. Lecture Notes in Computer Science, 4–15. https://doi.org/10.1007/bfb0026666
  16. Lipton, Z. C.; Wang, Y. X.; Smola, A. J. (2018). Detecting and Correcting for Label Shift with Black Box Predictors. Proceedings of Machine Learning Research, 80, 3122–3130. https://proceedings.mlr.press/v80/lipton18a.html
  17. McCallum, A.; Nigam, K. (1998). A Comparison of Event Models for Naive Bayes Text Classification. AAAI Workshop on Learning for Text Categorization. https://cdn.aaai.org/Workshops/1998/WS-98-05/WS98-05-007.pdf
  18. Moreno-Torres, J. G.; Raeder, T.; Alaiz-Rodríguez, R.; Chawla, N. V.; Herrera, F. (2012). A unifying view on dataset shift in classification. Pattern Recognition, 45(1), 521–530. https://doi.org/10.1016/j.patcog.2011.06.019
  19. Pang, B.; Lee, L.; Vaithyanathan, S. (2002). Thumbs up? Sentiment Classification using Machine Learning Techniques. Proceedings of the 2002 Conference on Empirical Methods in Natural Language Processing (EMNLP 2002), 79–86. https://doi.org/10.3115/1118693.1118704
  20. Ponti, E. M.; Glavaš, G.; Majewska, O.; Liu, Q.; Vulić, I.; Korhonen, A. (2020). XCOPA: A Multilingual Dataset for Causal Commonsense Reasoning. Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), 2362–2376. https://doi.org/10.18653/v1/2020.emnlp-main.185
  21. Rennie, J. D. M.; Shih, L.; Teevan, J.; Karger, D. R. (2003). Tackling the Poor Assumptions of Naive Bayes Text Classifiers. Proceedings of the 20th International Conference on Machine Learning, 616–623. https://people.csail.mit.edu/jrennie/papers/icml03-nb.pdf
  22. Ribeiro, M. T.; Wu, T.; Guestrin, C.; Singh, S. (2020). Beyond Accuracy: Behavioral Testing of NLP Models with CheckList. Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, 4902–4912. https://doi.org/10.18653/v1/2020.acl-main.442
  23. Saerens, M.; Latinne, P.; Decaestecker, C. (2002). Adjusting the Outputs of a Classifier to New a Priori Probabilities: A Simple Procedure. Neural Computation, 14, 21–41. https://doi.org/10.1162/089976602753284446
  24. Sokolova, M.; Lapalme, G. (2009). A systematic analysis of performance measures for classification tasks. Information Processing & Management, 45(4), 427–437. https://doi.org/10.1016/j.ipm.2009.03.002
  25. Sugiyama, M.; Blankertz, B.; Krauledat, M.; Dornhege, G.; Müller, K. R. (2006). Importance-Weighted Cross-Validation for Covariate Shift. Lecture Notes in Computer Science, 354–363. https://doi.org/10.1007/11861898_36
  26. Volansky, V.; Ordan, N.; Wintner, S. (2015). On the features of translationese. Digital Scholarship in the Humanities, 30(1), 98–118. https://doi.org/10.1093/llc/fqt031
  27. Wang, S. I.; Manning, C. D. (2012). Baselines and Bigrams: Simple, Good Sentiment and Topic Classification. Proceedings of the 50th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), 90–94. https://aclanthology.org/P12-2018/
  28. Wilie, B.; Vincentio, K.; Winata, G. I.; Cahyawijaya, S.; Li, X.; Lim, Z. Y.; Soleman, S.; Mahendra, R.; Fung, P.; Bahar, S.; Purwarianti, A. (2020). IndoNLU: Benchmark and Resources for Evaluating Indonesian Natural Language Understanding. Proceedings of the 1st Conference of the Asia-Pacific Chapter of the Association for Computational Linguistics and the 10th International Joint Conference on Natural Language Processing, 843–857. https://doi.org/10.18653/v1/2020.aacl-main.85
  29. Winata, G. I.; Aji, A. F.; Cahyawijaya, S.; Mahendra, R.; Koto, F.; Romadhony, A.; Kurniawan, K.; Moeljadi, D.; Prasojo, R. E.; Fung, P.; et al. (2023). NusaX: Multilingual Parallel Sentiment Dataset for 10 Indonesian Local Languages. Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics, 815–834. https://doi.org/10.18653/v1/2023.eacl-main.57
  30. Zhang, X.; Zhao, J.; LeCun, Y. (2015). Character-level Convolutional Networks for Text Classification. Advances in Neural Information Processing Systems, 28, 649–657. https://papers.nips.cc/paper/5782-character-level-convolutional-networks-for-text-classification