Context-Aware Genomic Self-Attention Encoder with Decision Layer for High-Precision DNA Sequence Classification
Refga Abdallah Eltieb ElebeedLecturer, Department of Computer Science, College of Computer Engineering and Sciences, Prince Sattam bin Abdulaziz University, Al-Kharj, Saudi Arabia. r.elebeed@psau.edu.sa0009-0008-8204-9196
Loay F. HusseinAssistant Professor, Department of Computer Science, College of Computer and Information Sciences, Jouf University, Sakaka, Saudi Arabia. lfahmed@ju.edu.sa0000-0002-8920-8961
Keywords: DNA Sequence Classification, Genomic Representation, Self-Attention, Transformer, K-mer Tokenization, Deep Learning, Genomic Analysis.
Abstract
Context-aware DNA sequence classification is crucial for detecting genomic patterns and performing downstream biological analysis. However, traditional methods of DNA sequence processing might find it hard to simultaneously capture local patterns and long-range dependencies within DNA sequences. To solve this problem, this study suggests the Context-Aware Genomic Self-Attention Encoder (GSAE) for contextual DNA sequence classification. The suggested model pre-processes DNA sequences by means of cleaning, overlapping k-mer tokenization, vocabulary indexing, and padding to a fixed length with dense embeddings. The obtained embeddings are then passed through a self-attention-based GSAE, which includes Query-Key-Value projection, calculation of contextual similarities, calculation of attention weights, aggregation of context, residual learning, layer normalization, and feed-forward pass. The resulting representation of the DNA sequence is used for classification via a fully connected Softmax layer. Training is conducted using categorical cross-entropy loss and the Adam optimizer. GSAE achieved 98.94% accuracy, 98.97% precision, 99.82% recall, 98.91% F1-Score, and 99.91% ROC-AUC under the experimental setup considered. Training showed progressive convergence, with training and validation accuracies converging to 99.84% and 99.79%, respectively, in epoch 100. Losses in training and validation converged to 0.014 and 0.018, respectively, thus showing little performance difference under the chosen data split. The results have shown that GSAE has been able to learn the context of the DNA sequences and make effective predictions. However, the present evaluation has not made any biological correlation to the attention-highlighted sequences nor homology awareness of the data. Hence, further work needs to be done in order to evaluate the GSAE framework using independent datasets, sequence identity-aware data split, biological validation with motifs, and large-scale genomic datasets.