Saved in:
Bibliographic Details
Main Authors: de Andrade, Claudio M. V., Cunha, Washington, Reis, Davi, Pagano, Adriana Silvina, Rocha, Leonardo, Gonçalves, Marcos André
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2408.09629
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911993712082944
author de Andrade, Claudio M. V.
Cunha, Washington
Reis, Davi
Pagano, Adriana Silvina
Rocha, Leonardo
Gonçalves, Marcos André
author_facet de Andrade, Claudio M. V.
Cunha, Washington
Reis, Davi
Pagano, Adriana Silvina
Rocha, Leonardo
Gonçalves, Marcos André
contents Transformer models have achieved state-of-the-art results, with Large Language Models (LLMs), an evolution of first-generation transformers (1stTR), being considered the cutting edge in several NLP tasks. However, the literature has yet to conclusively demonstrate that LLMs consistently outperform 1stTRs across all NLP tasks. This study compares three 1stTRs (BERT, RoBERTa, and BART) with two open LLMs (Llama 2 and Bloom) across 11 sentiment analysis datasets. The results indicate that open LLMs may moderately outperform or match 1stTRs in 8 out of 11 datasets but only when fine-tuned. Given this substantial cost for only moderate gains, the practical applicability of these models in cost-sensitive scenarios is questionable. In this context, a confidence-based strategy that seamlessly integrates 1stTRs with open LLMs based on prediction certainty is proposed. High-confidence documents are classified by the more cost-effective 1stTRs, while uncertain cases are handled by LLMs in zero-shot or few-shot modes, at a much lower cost than fine-tuned versions. Experiments in sentiment analysis demonstrate that our solution not only outperforms 1stTRs, zero-shot, and few-shot LLMs but also competes closely with fine-tuned LLMs at a fraction of the cost.
format Preprint
id arxiv_https___arxiv_org_abs_2408_09629
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle A Strategy to Combine 1stGen Transformers and Open LLMs for Automatic Text Classification
de Andrade, Claudio M. V.
Cunha, Washington
Reis, Davi
Pagano, Adriana Silvina
Rocha, Leonardo
Gonçalves, Marcos André
Computation and Language
Transformer models have achieved state-of-the-art results, with Large Language Models (LLMs), an evolution of first-generation transformers (1stTR), being considered the cutting edge in several NLP tasks. However, the literature has yet to conclusively demonstrate that LLMs consistently outperform 1stTRs across all NLP tasks. This study compares three 1stTRs (BERT, RoBERTa, and BART) with two open LLMs (Llama 2 and Bloom) across 11 sentiment analysis datasets. The results indicate that open LLMs may moderately outperform or match 1stTRs in 8 out of 11 datasets but only when fine-tuned. Given this substantial cost for only moderate gains, the practical applicability of these models in cost-sensitive scenarios is questionable. In this context, a confidence-based strategy that seamlessly integrates 1stTRs with open LLMs based on prediction certainty is proposed. High-confidence documents are classified by the more cost-effective 1stTRs, while uncertain cases are handled by LLMs in zero-shot or few-shot modes, at a much lower cost than fine-tuned versions. Experiments in sentiment analysis demonstrate that our solution not only outperforms 1stTRs, zero-shot, and few-shot LLMs but also competes closely with fine-tuned LLMs at a fraction of the cost.
title A Strategy to Combine 1stGen Transformers and Open LLMs for Automatic Text Classification
topic Computation and Language
url https://arxiv.org/abs/2408.09629