This study examines the performance trade-offs between traditional machine learning methods and large language models (LLMs) in classification tasks across two representative datasets. We evaluate five traditional ML algorithms (Logistic Regression, SVM, Random Forest, XGBoost, and Gradient Boosting) against three LLMs (Llama 3.1 8B, Mistral 7B, and Gemma 3 4B) in both zero-shot and LoRA fine-tuned configurations. Our evaluation focuses on the Activity Recognition using Embedded Mobile Sensors (AReM) dataset for structured sensor data classification and the Twenty Newsgroups dataset for text classification. Traditional ML methods maintain substantial advantages in both accuracy and computational efficiency. On structured data (AReM), traditional ML outperforms the best fine-tuned LLM by 41.4% points (78.6% vs 37.2%), while on text data (Twenty Newsgroups), traditional ML maintains a 15.6% point advantage (94.4% vs 78.8%). Computational efficiency analysis reveals inference times of 0.08–0.18 ms for traditional ML compared to 285–537 ms for LLMs. These findings suggest that task-specific characteristics and computational constraints are critical factors in model selection decisions.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Traditional Machine Learning vs Large Language Models: An Empirical Study on Classification Tasks

  • Abdallah Emam,
  • Ahmed Yahia,
  • Hussien Ahmed,
  • Noha Gamal Eldin

摘要

This study examines the performance trade-offs between traditional machine learning methods and large language models (LLMs) in classification tasks across two representative datasets. We evaluate five traditional ML algorithms (Logistic Regression, SVM, Random Forest, XGBoost, and Gradient Boosting) against three LLMs (Llama 3.1 8B, Mistral 7B, and Gemma 3 4B) in both zero-shot and LoRA fine-tuned configurations. Our evaluation focuses on the Activity Recognition using Embedded Mobile Sensors (AReM) dataset for structured sensor data classification and the Twenty Newsgroups dataset for text classification. Traditional ML methods maintain substantial advantages in both accuracy and computational efficiency. On structured data (AReM), traditional ML outperforms the best fine-tuned LLM by 41.4% points (78.6% vs 37.2%), while on text data (Twenty Newsgroups), traditional ML maintains a 15.6% point advantage (94.4% vs 78.8%). Computational efficiency analysis reveals inference times of 0.08–0.18 ms for traditional ML compared to 285–537 ms for LLMs. These findings suggest that task-specific characteristics and computational constraints are critical factors in model selection decisions.