Hamza Alami
Current Organizations / Institutes
The organizations/institutes from the scholar's latest article
Previous Organizations / Institutes
The organizations / institutes from the scholar's other articles in the past ten years
Hamza Alami has a total of 18 co-authors. Here are the top co-authors by number of shared publications:
Said El Alaoui Ouatik
4 shared publicationsNoureddine En-Nahnahi
3 shared publications- Abdessamad Benlahbib
Faculty of Sciences Dhar EL Mehraz LISAC Laboratory USMBA Fez Morocco
2 shared publications - Achraf Boumhidi
Faculty of Sciences Dhar EL Mehraz LISAC Laboratory USMBA Fez Morocco
2 shared publications Khalid Alaoui Zidani
2 shared publications- Said Ouatik El Alaoui
Ibn Tofail University
2 shared publications
Latest Publications
- Open Access
- 22 October 2025
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Access
- Vol. 13, 186675-186692
FREQSEL: A Frequency-Based Method for Client Selection in Federated Learning
Federated learning (FL) is a machine learning approach that allows multiple devices to collaborate in constructing a shared prediction model while keeping their sensitive data decentralized, avoiding the need for transmission to a central server. In each training iteration, only a subset of clients is involved. While this approach offers significant advantages, one of the primary challenges arises from the Non-Independent and Identically Distributed(N-IID) nature of the data across the participating clients. This can lead to bias when aggregating the parameters of diverse local models, ultimately reducing the global model’s accuracy. In this paper, we propose FREQSEL, an innovative federated learning algorithm for client selection designed to mitigate the accuracy drop caused by N-IID data across client devices. In FREQSEL, the server begins the communication process by prompting the clients, who then report the size of their data samples. Subsequently, the server calculates the class frequencies for each client, as well as those for the entire population, without accessing the clients’ datasets. These frequency distributions serve as the basis for client selection. Finally, the server distributes the global model to the chosen clients. By considering the imbalanced data distribution among clients, FREQSEL enhances model performance in heterogeneous data environments. Although sharing frequency vectors may raise privacy concerns, our method only exchanges aggregated statistical information, not raw or individual-level data, which significantly mitigates the risk of exposing sensitive information. We evaluate the effectiveness of our approach through simulations using publicly available datasets, and the results demonstrate that FREQSEL outperforms existing methods in terms of convergence speed and test accuracy.
- 22 October 2025
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Access
- Vol. 13, 186675-186692
Open AccessFREQSEL: A Frequency-Based Method for Client Selection in Federated Learning
Federated learning (FL) is a machine learning approach that allows multiple devices to collaborate in constructing a shared prediction model while keeping their sensitive data decentralized, avoiding the need for transmission to a central server. In each training iteration, only a subset of clients is involved. While this approach offers significant advantages, one of the primary challenges arises from the Non-Independent and Identically Distributed(N-IID) nature of the data across the participating clients. This can lead to bias when aggregating the parameters of diverse local models, ultimately reducing the global model’s accuracy. In this paper, we propose FREQSEL, an innovative federated learning algorithm for client selection designed to mitigate the accuracy drop caused by N-IID data across client devices. In FREQSEL, the server begins the communication process by prompting the clients, who then report the size of their data samples. Subsequently, the server calculates the class frequencies for each client, as well as those for the entire population, without accessing the clients’ datasets. These frequency distributions serve as the basis for client selection. Finally, the server distributes the global model to the chosen clients. By considering the imbalanced data distribution among clients, FREQSEL enhances model performance in heterogeneous data environments. Although sharing frequency vectors may raise privacy concerns, our method only exchanges aggregated statistical information, not raw or individual-level data, which significantly mitigates the risk of exposing sensitive information. We evaluate the effectiveness of our approach through simulations using publicly available datasets, and the results demonstrate that FREQSEL outperforms existing methods in terms of convergence speed and test accuracy.
- Open Access
- 3 April 2025
- Published by Engineering, Technology & Applied Science Research in Engineering, Technology & Applied Science Research
- Vol. 15 (2) , 21854-21860
Exploring Different Annotation Schemes for Single and Consecutive Named Entity Recognition in the Arabic Biomedical Domain using Transformer Models and Contextual Semantic Embeddings
Named Entity Recognition (NER) is an important task for Natural Language Processing (NLP) in the Arabic biomedical field. However, most works on NER in the Arabic biomedical domain suffer from some limitations, such as the inability to capture the context and semantics within texts. Moreover, only a few research studies have efficiently handled biomedical consecutive entities in the Arabic language. To overcome these limitations, this study proposes an efficient method to build contextual models for biomedical NER tasks that capture context and semantics in Arabic text using transformer models and semantic embeddings. The extracted embeddings are combined with machine learning methods, including SVM, Decision Tree (DT), and AdaBoost, to identify both single and consecutive named entities accurately. Furthermore, the effect of seven annotation schemes, namely IO, IOB, IE, IOE, BI, BIES, and IOBES, was studied to determine the most suitable for Arabic biomedical NER. The experimental results showed that the BERT and AraBERT models when fine-tuned for the Arabic biomedical NER outperform well-known machine learning methods in terms of accuracy and F1 score. The findings across various annotation schemes highlight the effectiveness of the IO scheme for simple (single) entities, while IOBES and BIES annotation schemes are better suited for recognizing multi-token entities.
- 3 April 2025
- Published by Engineering, Technology & Applied Science Research in Engineering, Technology & Applied Science Research
- Vol. 15 (2) , 21854-21860
Open AccessExploring Different Annotation Schemes for Single and Consecutive Named Entity Recognition in the Arabic Biomedical Domain using Transformer Models and Contextual Semantic Embeddings
Named Entity Recognition (NER) is an important task for Natural Language Processing (NLP) in the Arabic biomedical field. However, most works on NER in the Arabic biomedical domain suffer from some limitations, such as the inability to capture the context and semantics within texts. Moreover, only a few research studies have efficiently handled biomedical consecutive entities in the Arabic language. To overcome these limitations, this study proposes an efficient method to build contextual models for biomedical NER tasks that capture context and semantics in Arabic text using transformer models and semantic embeddings. The extracted embeddings are combined with machine learning methods, including SVM, Decision Tree (DT), and AdaBoost, to identify both single and consecutive named entities accurately. Furthermore, the effect of seven annotation schemes, namely IO, IOB, IE, IOE, BI, BIES, and IOBES, was studied to determine the most suitable for Arabic biomedical NER. The experimental results showed that the BERT and AraBERT models when fine-tuned for the Arabic biomedical NER outperform well-known machine learning methods in terms of accuracy and F1 score. The findings across various annotation schemes highlight the effectiveness of the IO scheme for simple (single) entities, while IOBES and BIES annotation schemes are better suited for recognizing multi-token entities.
- Open Access
- 20 January 2025
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Access
- Vol. 13, 21956-21965
MLPR: YOLOv3 for Real-Time License Plate Recognition in Moroccan Video Streams
Automated License Plate Detection and Recognition (ALPR) is a technology that identifies and reads license plates in transportation and surveillance systems. However, ALPR is a challenging task due to several factors, including differences in vehicle license plates between countries, a lack of public datasets, environmental factors that can decrease the performance of recognition models, and challenging lighting conditions for vehicle license plates. In this work, we present an ALPR system for real-time applications specifically designed to detect and recognize Moroccan license plates. Our contribution is threefold. First, we employ the YOLOv3 algorithm to extract valuable features from input scenes and detect vehicles. Second, we track vehicles and assign a unique id to each detected vehicle. Finally, we detect and recognize the plates of tracked vehicles based on computer vision techniques and a voting system. The latter is a post-processing step that selects the most consistent content as the final prediction. Furthermore, we collected and annotated a set of videos that contain vehicles with Moroccan license plates in various conditions. The collected data is used to assess the performance of our system. The obtained results demonstrate that our system achieves an accuracy of 99.19% and 95.62% for detection and recognition, respectively.
- 20 January 2025
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Access
- Vol. 13, 21956-21965
Open AccessMLPR: YOLOv3 for Real-Time License Plate Recognition in Moroccan Video Streams
Automated License Plate Detection and Recognition (ALPR) is a technology that identifies and reads license plates in transportation and surveillance systems. However, ALPR is a challenging task due to several factors, including differences in vehicle license plates between countries, a lack of public datasets, environmental factors that can decrease the performance of recognition models, and challenging lighting conditions for vehicle license plates. In this work, we present an ALPR system for real-time applications specifically designed to detect and recognize Moroccan license plates. Our contribution is threefold. First, we employ the YOLOv3 algorithm to extract valuable features from input scenes and detect vehicles. Second, we track vehicles and assign a unique id to each detected vehicle. Finally, we detect and recognize the plates of tracked vehicles based on computer vision techniques and a voting system. The latter is a post-processing step that selects the most consistent content as the final prediction. Furthermore, we collected and annotated a set of videos that contain vehicles with Moroccan license plates in various conditions. The collected data is used to assess the performance of our system. The obtained results demonstrate that our system achieves an accuracy of 99.19% and 95.62% for detection and recognition, respectively.
- Open Access
- 7 January 2025
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Open Journal of the Computer Society
- Vol. 6, 248-260
Comparative Analysis of Traditional and Modern NLP Techniques on the CoLA Dataset: From POS Tagging to Large Language Models
The task of classifying linguistic acceptability, exemplified by the CoLA (Corpus of Linguistic Acceptability) dataset, poses unique challenges for natural language processing (NLP) models. These challenges include distinguishing between subtle grammatical errors, understanding complex syntactic structures, and detecting semantic inconsistencies, all of which make the task difficult even for human annotators. In this paper, we compare a range of techniques, from traditional methods such as Part-of-Speech (POS) tagging and feature extraction methods like CountVectorizer with Term Frequency-Inverse Document Frequency (TF-IDF) and N-grams, to modern embeddings such as FastText and Embeddings from Language Models (ELMo), as well as deep learning architectures like transformers and Large Language Models (LLMs). Our experiments show a clear improvement in performance as models evolve from traditional to more advanced approaches. Notably, state-of-the-art (SOTA) results were obtained by fine-tuning GPT-4o with extensive hyperparameter tuning, including experimenting with various epochs and batch sizes. This comparative analysis provides valuable insights into the relative strengths of each technique for identifying morphological, syntactic, and semantic violations, highlighting the effectiveness of LLMs in these tasks.
- 7 January 2025
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Open Journal of the Computer Society
- Vol. 6, 248-260
Open AccessComparative Analysis of Traditional and Modern NLP Techniques on the CoLA Dataset: From POS Tagging to Large Language Models
The task of classifying linguistic acceptability, exemplified by the CoLA (Corpus of Linguistic Acceptability) dataset, poses unique challenges for natural language processing (NLP) models. These challenges include distinguishing between subtle grammatical errors, understanding complex syntactic structures, and detecting semantic inconsistencies, all of which make the task difficult even for human annotators. In this paper, we compare a range of techniques, from traditional methods such as Part-of-Speech (POS) tagging and feature extraction methods like CountVectorizer with Term Frequency-Inverse Document Frequency (TF-IDF) and N-grams, to modern embeddings such as FastText and Embeddings from Language Models (ELMo), as well as deep learning architectures like transformers and Large Language Models (LLMs). Our experiments show a clear improvement in performance as models evolve from traditional to more advanced approaches. Notably, state-of-the-art (SOTA) results were obtained by fine-tuning GPT-4o with extensive hyperparameter tuning, including experimenting with various epochs and batch sizes. This comparative analysis provides valuable insights into the relative strengths of each technique for identifying morphological, syntactic, and semantic violations, highlighting the effectiveness of LLMs in these tasks.
- Open Access
- 1 January 2023
- Published by Association for Computational Linguistics (ACL)
- p. 121-124
NLP-LISAC at SemEval-2023 Task 9: Multilingual Tweet Intimacy Analysis via a Transformer-based Approach and Data Augmentation
Abdessamad Benlahbib, Hamza Alami, Achraf Boumhidi, Omar Benslimane. Proceedings of the The 17th International Workshop on Semantic Evaluation (SemEval-2023). 2023.
- 1 January 2023
- Published by Association for Computational Linguistics (ACL)
- p. 121-124
Open AccessNLP-LISAC at SemEval-2023 Task 9: Multilingual Tweet Intimacy Analysis via a Transformer-based Approach and Data Augmentation
Abdessamad Benlahbib, Hamza Alami, Achraf Boumhidi, Omar Benslimane. Proceedings of the The 17th International Workshop on Semantic Evaluation (SemEval-2023). 2023.
- Open Access
- 1 February 2021
- Published by Springer Nature in Journal of King Saud University Computer and Information Sciences
- Vol. 33 (2) , 218-224
An arabic question classification method based on new taxonomy and continuous distributed representation of words
- 1 February 2021
- Published by Springer Nature in Journal of King Saud University Computer and Information Sciences
- Vol. 33 (2) , 218-224
Open AccessAn arabic question classification method based on new taxonomy and continuous distributed representation of words
- 1 April 2020
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 1-5
Exploring Contextual word representation for Arabic question classification
Identifying the category of a question is an essential task in Question Answering Systems. Contextual continuous word representation proved to be effective in various natural language processing tasks. However, these models have not been considered in the field of Arabic question classification. In this paper, we investigate the use of a contextual word representation named Embeddings from Language Models (ELMo) on Arabic question classification. We study the behaviour of this representation by building numerous neural network architectures trained to classify questions. The dataset contains 3173 questions annotated with two taxonomies including Arabic taxonomy and an updated Li & Roth taxonomy. By comparing to enriched word2vec with subword information technique, which is a context-free representation, we show that ELMo representation achieves better performance at the cost of reduced sized word vector. The best classifier achieves up to 94% in terms of accuracy, macro F 1 score, and weighted F 1 score.
- 1 April 2020
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 1-5
Exploring Contextual word representation for Arabic question classification
Identifying the category of a question is an essential task in Question Answering Systems. Contextual continuous word representation proved to be effective in various natural language processing tasks. However, these models have not been considered in the field of Arabic question classification. In this paper, we investigate the use of a contextual word representation named Embeddings from Language Models (ELMo) on Arabic question classification. We study the behaviour of this representation by building numerous neural network architectures trained to classify questions. The dataset contains 3173 questions annotated with two taxonomies including Arabic taxonomy and an updated Li & Roth taxonomy. By comparing to enriched word2vec with subword information technique, which is a context-free representation, we show that ELMo representation achieves better performance at the cost of reduced sized word vector. The best classifier achieves up to 94% in terms of accuracy, macro F 1 score, and weighted F 1 score.
- 6 February 2020
- Published by Springer Nature in Advances in Intelligent Systems and Computing
- p. 233-242
Exploring Convolutional Neural Networks and Recurrent Neural Networks for Arabic Question Classification
- 6 February 2020
- Published by Springer Nature in Advances in Intelligent Systems and Computing
- p. 233-242
Exploring Convolutional Neural Networks and Recurrent Neural Networks for Arabic Question Classification
- 3 January 2020
- Published by Springer Nature
- p. 230-237
Towards a Passages Extraction Method for Arabic Question Answering Systems
- 3 January 2020
- Published by Springer Nature
- p. 230-237
Towards a Passages Extraction Method for Arabic Question Answering Systems