A comparative analysis of encoder only and decoder only models in intent classification and sentiment analysis: navigating the trade-offs in model size and performance. - Benayas, Alberto; Sicilia, Miguel Angel; Mora-Cantallops, Marçal (Language Resources & Evaluation, 2025)
Intent classification and sentiment analysis stand as pivotal tasks in natural language understanding (NLU), with applications ranging from virtual assistants to customer service. The advent of transformer-based models has significantly enhanced the performance of various NLP tasks, with encoder-only architectures gaining prominence for their effectiveness. More recently, there has been a surge in the development of larger and more powerful decoder-only models, traditionally employed for text generation tasks. This paper aims to answer the question of whether the colossal scale of newer decoder-only language models is essential for real-world applications. The investigation involves a performance comparison between these decoder-only models and the well-established encoder-only models specifically in the domains of intent classification and sentiment analysis. The results of our study indicate that, for tasks involving natural language understanding, encoder-only models generally outperform decoder-only models, all while demanding a fraction of the computational resources. This sheds light on the practicality and efficiency of encoder-only architectures in comparison to their decoder-only counterparts in real-world applications, providing valuable insights for the advancement of natural language processing technologies.