LSTM Autoencoder Model for Detecting Data Quality Anomalies in KHIS HIV Data
| dc.contributor.author | Nyabuto, Geofrey Mwamba | |
| dc.date.accessioned | 2026-11-26T12:04:20Z | |
| dc.date.issued | 2026-11-26 | |
| dc.description | A Master's Thesis submitted in partial fulfillment of the requirements for the Award of the Master of Science in Artificial Intelligence of the Open University of Kenya. Supervisor: Dr. Tirus Maina. | |
| dc.description.abstract | The Kenya Health Information System (KHIS) is central to routine health programme monitoring and decision-making in Kenya. However, conventional data-quality checks mainly rely on completeness reports, fixed validation rules and manual review, which may miss complex temporal anomalies. This study developed and empirically validated an unsupervised Long Short-Term Memory Autoencoder (LSTM-AE) for detecting data-quality anomalies in routine KHIS HIV data. The study addressed four objectives: documenting data-quality requirements and anomaly patterns, designing the LSTM-AE, developing the model artefact and validating its effectiveness. A design science research approach, supported by experimental machine learning and human-in-the-loop validation, was used. The dataset comprised 22,556 deduplicated KHIS records covering 60 reporting months, 102 health facilities and ten sub-counties in Bungoma County, for HIV testing, Current on ART and viral-load suppression indicators. Exploratory temporal analysis identified spikes, sudden drops, plateaus, gradual drift, trend or level shifts and seasonal or contextual deviations. These findings informed facility-specific normalisation, temporal memory, nonlinear learning, indicator-specific calibration and expert review. A compact sequence-to-sequence LSTM autoencoder was then designed using six consecutive monthly observations per facility-indicator sequence and ten engineered temporal features. The architecture had a 16-unit LSTM encoder, four-dimensional latent representation and 16-unit LSTM decoder. Reconstruction error was used as the anomaly score, with indicator-specific 95th-percentile validation thresholds. The model was applied to 2,524 unseen temporal-test sequences and generated 267 alerts from 51 facilities, an alert rate of 10.6%. In controlled experiments, the LSTM-AE achieved 92.0% precision, 76.2% recall, 83.3% F1-score and 84.8% accuracy. By comparison, the statistical-threshold baseline achieved 100.0% precision, 4.5% recall, 8.6% F1-score and 52.2% accuracy, while Isolation Forest achieved 84.4% precision, 33.3% recall, 47.8% F1-score and 63.6% accuracy. All 267 alerts were independently reviewed by six domain experts together with 20 non-anomalous controls. Of the alerts, 164 (61.4%) were confirmed as data-quality gaps, 86 (32.2%) were rejected and 17 (6.4%) remained unresolved. On the determinate labelled set, accuracy was 68.1%, precision 65.6%, recall 100.0%, specificity 18.9%, F1-score 79.2%, balanced accuracy 59.4% and MCC 0.352. Inter-rater agreement was very strong (Fleiss' κ=0.926). The study concludes that the LSTM-AE is useful for screening and prioritising unusual KHIS reporting patterns but should not automatically correct data. The study recommends that county HIV programme teams pilot it within routine DQA, verify alerts against source documents and programme events, while the Ministry of Health develops standard procedures for review and future studies assess adaptive thresholds using independent datasets. | |
| dc.identifier.uri | https://erepository.ouk.ac.ke/handle/123456789/1686 | |
| dc.language.iso | en | |
| dc.publisher | Open University of Kenya | |
| dc.subject | LSTM Autoencoder | |
| dc.subject | Anomaly Detection | |
| dc.subject | Data Quality | |
| dc.subject | KHIS | |
| dc.subject | HIV Data | |
| dc.subject | Kenya Health Information System | |
| dc.subject | Machine Learning | |
| dc.subject | Bungoma County | |
| dc.title | LSTM Autoencoder Model for Detecting Data Quality Anomalies in KHIS HIV Data | |
| dc.type | Thesis |
