Adaptable and Reliable Text Classification using Large Language Models

Zhiqiang Wang,Yiran Pang,Yanbin Lin,Xingquan Zhu
2024-10-22
Abstract:Text classification is fundamental in Natural Language Processing (NLP), and the advent of Large Language Models (LLMs) has revolutionized the field. This paper introduces an adaptable and reliable text classification paradigm, which leverages LLMs as the core component to address text classification tasks. Our system simplifies the traditional text classification workflows, reducing the need for extensive preprocessing and domain-specific expertise to deliver adaptable and reliable text classification results. We evaluated the performance of several LLMs, machine learning algorithms, and neural network-based architectures on four diverse datasets. Results demonstrate that certain LLMs surpass traditional methods in sentiment analysis, spam SMS detection, and multi-label classification. Furthermore, it is shown that the system's performance can be further enhanced through few-shot or fine-tuning strategies, making the fine-tuned model the top performer across all datasets. Source code and datasets are available in this GitHub repository: <a class="link-external link-https" href="https://github.com/yeyimilk/llm-zero-shot-classifiers" rel="external noopener nofollow">this https URL</a>.
Computation and Language
What problem does this paper attempt to address?
The problem that this paper attempts to solve is the challenges faced by traditional text classification methods in the face of dynamic and diverse real - world environments. Specifically, traditional machine learning (ML) methods such as logistic regression and Naive Bayes have limitations in dealing with unseen data or emerging categories, and require large - scale labeled datasets, which may be difficult to obtain or impractical in practical applications. To address these issues, this paper proposes an adaptive and reliable text classification paradigm based on large - scale language models (LLMs). This method takes advantage of the powerful capabilities of LLMs, simplifies the traditional text classification workflow, and reduces the need for complex pre - processing and domain - specific expertise, thereby improving the adaptability and reliability of text classification. In addition, the system further enhances performance through few - shot learning or fine - tuning strategies, making the fine - tuned model perform well on all datasets. ### Main Problem Summary: 1. **Limitations of Traditional Methods**: Traditional machine learning methods rely on a large amount of labeled data and are difficult to adapt to unseen data or emerging categories. 2. **Reliability in Dynamic Environments**: Ensure high reliability and robustness of the model in diverse and unpredictable environments. 3. **Reducing the Technical Threshold**: Reduce the need for domain experts and complex pre - processing, enabling non - expert users to easily use high - performance classification systems. 4. **Improving Adaptability and Performance**: Enhance the performance of the model in different tasks by introducing few - shot learning and fine - tuning strategies. ### Core Contributions of the Paper: - Propose a text classification system based on LLMs, simplify the traditional classification process, and lower the technical threshold. - Introduce a new evaluation metric - Uncertainty/Error (U/E) rate, which complements the traditional accuracy and F1 - score, providing a more comprehensive evaluation of model performance. - Through experimental verification, LLMs outperform traditional methods in multiple text classification tasks after few - shot learning or fine - tuning. These improvements make LLMs more efficient, flexible, and reliable in text classification tasks, especially suitable for rapidly deployable and scalable application scenarios.