arXiv:2610.40001cs.LGOct 2026

Manuscript Offprint

arXiv:2610.40001

Enhancing Atrial Fibrillation Detection Through Hyperparameter Optimization

Sara Gjorgjieva, Ilinka Ivanoska, Marjan Gusev

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

This study explores the role of hyperparameter optimization (HPO) in enhancing the detection of Atrial Fibrillation (AF) using both machine learning and deep learning models. We evaluated a range of standard classifiers - Decision Tree, Random Forest, and XGBoost classifiers, alongside deep learning architectures including Recurrent Neural Networks, Deep Neural Networks, and Siamese Neural Networks. To fine-tune these models, we applied four HPO methods: Genetic Algorithm, Hyperband, Optuna, and SMAC3. The experiments were conducted using inter-patient and intra-patient data splits to assess model generalization and robustness in the presence of class imbalance, which is reflective of real-world AF occurrence. Our results, based on PhysioNet electrocardiogram datasets, showed that the Hyperband-optimized XGBoost model outperformed all others, achieving a peak F1 score of 96.95%. These findings highlight the critical role of suitable HPO strategies in enhancing the accuracy and robustness of AF classification outcomes in clinical settings.

Keywords Atrial Fibrillation · AF · ECG · Genetic Algorithm · Hyperband · Optuna · SMAC3 · deep learning · machine learning

1 Introduction

Machine learning (ML) has revolutionized various domains by offering innovative solutions to real-world challenges, improving the quality of life, and extending life expectancy. Its versatility stems from the fact that ML models are highly adaptable and can be applied across diverse fields, regardless of the subject matter. However, selecting the most suitable model for a problem can be challenging, requiring substantial time, resources, and expertise.

Once a model is selected, the next critical step is optimizing its performance. This involves fine-tuning the model parameters to ensure it delivers the best results for the given task. Model effectiveness is typically evaluated based on its ability to generalize and perform with high accuracy to unseen data, striking a balance between underfitting and overfitting. Achieving this balance depends on two key factors: the model features and the hyperparameters that dictate the model's learning behavior [1, 2]. Although related, hyperparameters and parameters differ significantly in their roles. Parameters, such as weights and coefficients, are determined by the model during training and represent how predictor variables influence the target variable. On the other hand, hyperparameters are external configuration variables set before training and control the model's structure, learning rate, and other operational aspects. While default hyperparameter values exist, they often need to be tailored to the specific dataset and model through experimentation, known as hyperparameter tuning or hyperparameter optimization (HPO). HPO involves systematically testing different hyperparameter combinations to identify the one that achieves the best performance. Unlike parameters adjusted during training, hyperparameters are predefined and remain fixed throughout training. Choosing the correct hyperparameter values directly impacts model performance, making hyperparameter tuning a critical step in the ML pipeline [3, 4]. Data scientists usually enhance a model's predictive capabilities by fine-tuning hyperparameters and evaluating the performance of new data. This study focuses on the importance of HPO in improving the detection of atrial fibrillation (AF), and careful experimentation is planned to achieve the best results. We evaluate the effect of various HPO techniques: Hyperband [5, 6], Optuna [7, 8], Genetic Algorithm (GA) [9, 10], and Sequential Model-Based Algorithm Configuration (SMAC3) [11–13], highlighting their unique advantages.

The main research question is to evaluate selected HPO methods for AF detection models, focusing on robustness and the generalizability of optimized hyperparameters across different patient distributions and benchmark datasets. Unlike previous studies, our work explicitly incorporates inter- and intra-patient evaluations to assess robustness more thoroughly, where intra-patient refers to training and testing within the same dataset, and inter-patient refers to training on one dataset and testing on another.

Section 1 outlines the significance of AF detection and the role of HPO in enhancing model performance. Section 2 reviews prior work on AF detection using ML. Section 3 describes the datasets, models, and HPO techniques applied in this study. Section 4 presents the experimental setup, implementation tools, execution time, and model performance results. Section 5 compares our findings with prior research and evaluates the strengths and limitations of the HPO methods used. Finally, Section 6 summarizes the key insights and suggests directions for future work.

References (25)