Enhancing text classification using hybrid embeddings and advanced machine learning techniques
摘要
The research introduces a dual-purpose text classification system, designed to achieve both high predictive performance and real-world interpretability, which unites TF-IDF sparse traditional features with dense FastText and OpenAI GPT-2 semantic embeddings. The approach aims to utilize lexical features together with contextual semantic information to achieve better accuracy and robustness. The proposed architecture differs from handcrafted or transformer-based feature models because it merges various embedding channels which then pass through XGBoost, Random Forest and Logistic Regression classifiers. The system undergoes evaluation using SpamBase (spam vs. ham classification), Sentiment140 (sentiment polarity detection) and AG News (topic categorization) datasets. The model produces 98.9% accuracy with 0.99 F1-score for SpamBase dataset, 93.7% accuracy with 0.93 F1-score for Sentiment140 dataset and 94.6% accuracy with 0.94 F1-score for AG News dataset. It demonstrates effective performance across different domains. The ablation research reveals that TF-IDF and GPT-2 integration leads to a 4.6% enhancement of precision and recall and FastText embeddings help maintain system stability when dealing with noisy or informal text. The framework demonstrates resistance to adversarial phrasing as well as slang and content sparsity which are essential features for real-world applications. The proposed system achieves better performance than single-representation baselines through embedding-level fusion and classifier diversity while maintaining both interpretability and modularity. The research demonstrates the importance of uniting traditional NLP features with contemporary methods in an adaptable system which functions across different datasets for industrial text mining applications and hence, ensures generalizability.