Benchmarking ML, DL, and Transformer Models for Document Classification
摘要
This study benchmarks the performance of machine learning (ML), deep learning (DL), and transformer models for binary classification of text and images from documents, focusing on curriculum vitae (CVs) and research papers. The primary contributions are the development of two pipelines: one for text extraction and another for training 24 classifiers across 4 datasets, along with a performance comparison of classifiers for both textual and visual data. Our findings reveal that traditional ML models often outperform DL models for text classification due to faster inference times while maintaining adequate accuracy. Conversely, pre-trained models excel in image classification, outperforming non-pre-trained models. While text classifiers demonstrate robust generalization to unseen data, image classifiers face challenges. We also propose strategies based on computational resources and data types for classifying CVs and research papers. Our analysis shows that ML models on CPUs deliver rapid inference, whereas DL and Transformer models on GPUs can be up to 645 \(\times \) slower for text tasks and 562 \(\times \) slower for image tasks. Despite this, DL and Transformer models achieve up to 43% higher F1-scores in complex scenarios, particularly for image classification. This work explores the trade-offs between model complexity and performance, guiding model selection for specific use cases.