# A Comparative Evaluation of Transformers and Deep Learning Models for Arabic Meter Classification
## 1 Introduction
These models process input data in parallel using self-attention mechanisms, enabling them to capture long-term dependencies and contextual relationships within text. As a result, transformers have become foundational in many advanced NLP applications, including text classification. Recent advancements in NLP--particularly the emergence of transformer-based models such as Bidirectional Encoder Representations from Transformers (BERT) and its Arabic counterparts--have significantly enhanced Arabic text processing. Comparative analyses have showed improved accuracy in text classification across various domains with the adoption of updated BERT models [23; 24]. In this study, we used a public dataset for Arabic meter classification, MetRec [25], and evaluated it using several transformers and DL models. We employed the BERT base Arabic model (AraBERT), Arabic Efficiently Learning an Encoder that Classifies Token Replacements Accurately (AraELECTRA), Multi-dialect Arabic BERT (MARBERT), Modern Arabic BERT (ARBERT), Computational Approaches to Modeling Arabic BERT (CAMeLBERT), and Arabic-BERT for meter classification. In addition to transformer-based models, we used DL architectures such as Bidirectional Long Short-Term Memory (BiLSTM) and Bidirectional Gated Recurrent Units (BiGRU). These networks are capable of capturing long-range dependencies in sequential data, allowing the classification model to learn both spatial and contextual features--an essential requirement for handling the intricacies of Arabic poetry. We also assessed feature importance and model behavior using the Local Interpretable Model-agnostic Explanations (LIME) interpretability technique. The findings provide meaningful insights into the effectiveness of different architectures for Arabic poetry classification, supporting the development of more advanced NLP solutions for the Arabic language. The major contributions of this study are as follows:  
* We compare and evaluate the performance of various pretrained transformer models--including Arabic-BERT, AraBERT, MARBERT, AraELECTRA, CAMeLBERT, and ARBERT--alongside BiLSTM and BiGRU DL models. * We evaluate half-verse poems and tune the DL models using different hidden layer configurations, and adjust batch sizes for the transformer models. * We apply multiple encoding strategies, including pretrained tokenizers (WordPiece and SentencePiece) for transformer models and character-level encoding for DL models. * We investigate model behavior and feature significance using LIME to gain insights into the model's decision-making processes. * We contribute to the expanding of Arabic NLP by assessing interpretability and applicability of different modeling strategies for poetry classification. The remainder of this paper is structured as follows: Section 2 presents a comprehensive literature review of transformer models and DL methodologies. Section 3 outlines the proposed techniques and model architecture. Section 4 describes the experimental results, followed by an in-depth discussion in Section 5, which also highlights potential avenues for further research. Finally, Section 6 concludes this study.