A METHOD FOR DETECTING SARCASM IN RUSSIAN-LANGUAGE TEXTS BASED ON NLI ADAPTATIONS USING TRANSFORMERS

Authors

  • Ilya S. Mukhin ITMO university
  • Elena Y. Аvksentieva ITMO university

DOI:

https://doi.org/10.17308/sait/1995-5499/2026/2/190-201

Keywords:

sarcasm detection, NLI-adaptation, BERT, deep learning, signs of sarcasm, Russian language, logical connections in text, natural language processing, sentiment analysis, ussian-language text

Abstract

The article discusses the problem of sarcasm detection in Russian-language texts based on the logical and semantic transfer of knowledge from related tasks of Natural Language Inference (NLI) and commonsense reasoning. A two-step transfer approach is proposed. The first is the intermediate adaptation of the transformer encoder on the Russian SuperGLUE datasets containing data for solving problems on contradiction, derivability and likelihood (RCB, TERRa, PARus), as well as on their combinations, up to the application of all three sets (ALL). Next, an adapted encoder is used to recognize sarcasm in the target corpus. Further research is conducted in two modes. Diagnostic zero–shot (without training on sarcastic expressions), which compares the architectures of mBERT, RuBERT and RuRoBERTa and various adaptation configurations, which allows us to evaluate the transfer of logical and semantic representations and justify the choice of the main model. And the basic mode, the NLI–based approach, involves further training on the sarcasm corpus. The experiments were performed on a balanced dataset of 15,146 utterances (7573 with the label «sarcasm»/7573 with the label «not sarcasm»). In zero-shot mode, the best quality is demonstrated by combined configurations, primarily PARus+RCB and ALL, confirming the benefits of mixing contradiction and plausibility signals. After learning from sarcastic expressions, RuRoBERTa significantly surpasses the basic TF-IDF + Logistic Regression algorithms and reaches ≈0.99+ in Accuracy and Macro-F1. At the same time, the maximum values were obtained with NLI adaptation to ALL, while PARus+RCB remains a less resource-intensive configuration, also demonstrating high performance. The results confirm the practical value of NLI adaptation as an initialization stage for sarcasm detection and set the basis for further analysis of assessment stability in the broader task of sentiment analysis.

Author Biographies

  • Ilya S. Mukhin, ITMO university

    PhD student, Faculty of software engineering and computer engineering

  • Elena Y. Аvksentieva, ITMO university

    PhD in Pedagogy, Docent, Associate Professor on faculty of software engineering and computer engineering

References

1. Survey on sentiment analysis: evolution of research methods and topics / J. Cui [et al.] // Artificial intelligence review. – 2023. – Vol. 56. – P. 8469–8510. https://doi.org/10.1007/s10462- 022-10386-z

2. Ligthart A. Systematic reviews in sentiment analysis: a tertiary study / A. Ligthart, C. Catal, B. Tekinerdogan // Artificial intelligence review. – 2021. – Vol. 54. – P. 4997–5053. https:// doi.org/10.1007/s10462-021-09973-3

3. Balakrishnan J. Conversational commerce: entering the next stage of AI-powered digital assistants / J. Balakrishnan, Y. K. Dwivedi // Annals of Operations Research. – 2021. – Vol. 333. – P. 653–687. https://link.springer.com/ article/10.1007/s10479-021-04049-5

4. Wójtowicz E. R. Innovation-Driven E-Commerce Growth in the EU: An Empirical Study of the Propensity for Online Purchases and Sustainable Consumption / E. R. Wójtowicz, G. D. Sharma // Sustainability. – 2024. – Vol. 16. – P. 1563– 1588. http://dx.doi.org/10.3390/su16041563

5. Костерин М. А. Применение глубоких нейронных сетей для автоматического определения иронии в русскоязычных текстах / М. А. Костерин, И. В. Парамонов // Моделирование и анализ информационных систем. – 2024. – Т. 31. – C. 90–101. https://doi. org/10.18255/1818-1015-2024-1-90-101

6. Sentiment Analysis of Consumer Feedback and Its Impact on Business Strategies by Machine Learning / P. Akter [et al.] // The American Journal of Applied Sciences. – 2025. – Vol. 7. – P. 6–16. https://doi.org/10.37547/tajas/Volume07Issue01-02

7. Eke C. I. Context-Based Feature Technique for Sarcasm Identification in Benchmark Datasets Using Deep Learning and BERT Model / C. I. Eke, A.A. Norman, L. Shuib // IEEE Access. – 2021. – Vol. 9. – P. 48501–48518. http:// dx.doi.org/10.1109/ACCESS.2021.3068323

8. Automatic Irony and Sarcasm Detection in Russian Sentences: Baseline Method / M. Kosterin, I. Paramonov, N. Lagutina // In Proceedings of the 33rd Conference of Open Innovations Association. – Zilina, Slovakia, 2023. – P. 148–154. http://dx.doi.org/10.23919/ FRUCT58615.2023.10142992

9. Context-Aware Sarcasm Detection Using BERT / A. Baruah [et al.] // In Proceedings of the Second Workshop on Figurative Language Processing. – Seattle, USA, 2020. – P. 83–87. http:// dx.doi.org/10.18653/v1/2020.figlang-1.12

10. Javed T. BERT Model Adoption for Sarcasm Detection on Twitter Data / T. Javed, M. A. Nourman, R. Zahid // VFAST Transactions on Software Engineering. – 2024. – Vol. 12. – P. 177–198. https://doi.org/10.21015/ vtse.v12i3.1908

11. Pandey R. BERT-LSTM model for sarcasm detection in code-mixed social media / R. Pandey, J. P. Singh // ournal of Intelligent Information Systems. – 2022. – Vol. 60. – P. 235–254. http:// dx.doi.org/10.1007/s10844-022-00755-z

12. Гурин А. А. Автоматическое определение сарказма в текстах на русском языке / А. А. Гурин, Т. А. Жуков // Цифровая экономика. – 2023. – Т. 1. – С. 44–53. http://dx.doi. org/10.34706/DE-2023-01-06

13. Transformers on Sarcasm Detection with Context / A. Kumar, V. Anand // In Proceedings of the Second Workshop on Figurative Language Processing. – Seattle, USA, 2020. – P. 88–92. https://doi.org/10.18653/v1/2020.figlang-1.13

14. Meng J. Sarcasm detection based on BERT and attention mechanism / J. Meng [et al.] // Sarcasm detection based on BERT and attention mechanism. – 2023. – Vol. 83. – P. 29159–29178. https://doi.org/10.1007/s11042-023-16797-6

15. Savini E. Intermediate-Task Transfer Learning with BERT for Sarcasm Detection / E. Savini, C. Caragea // Mathematics. – 2022. – Vol. 10. – P. 1–14. https://doi.org/10.3390/ math10050844?urlappend=%3Futm_ source%3Dresearchgate

16. Cekinel R. F. Text-Based Causal Inference on Irony and Sarcasm Detection / R. F. Cekinel, P. Karagoz // Big Data Analytics and Knowledge Discovery. – 2022. – Vol. 13428. – P. 31–45. https://doi.org/10.1007/978-3-031-12670-3_3

Published

2026-06-30

Issue

Section

Computer Linguistics and Natural Language Processing

How to Cite

Mukhin, I. S., & Аvksentieva E. Y. (2026). A METHOD FOR DETECTING SARCASM IN RUSSIAN-LANGUAGE TEXTS BASED ON NLI ADAPTATIONS USING TRANSFORMERS. Proceedings of Voronezh State University. Series: Systems Analysis and Information Technologies, 2, 190-201. https://doi.org/10.17308/sait/1995-5499/2026/2/190-201