Generalizable AI Model for Indoor Temperature Forecasting Across Sub-Saharan Africa
Zainab Akhtar, Eunice Jengo, Björn Haßler · 2025
Read Generalizable AI Model for Indoor Temperature Forecasting Across Sub-Saharan Africa by Zainab Akhtar, Eunice Jengo, Björn Haßler (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2508-20260.txt.
Introduction
Zainab Akhtar, Eunice Jengo, and Björn Haßler forecast indoor heat in African buildings with a model trained in one country and trusted in others. Schools and homes across Sub-Saharan Africa often rely on natural ventilation. Knowing tomorrow's indoor temperature helps protect comfort and health. Their light model extends an earlier estimator built on Tanzanian school data.
It needs only minimal, easy inputs. Tested on Nigerian schools, its average error sat near one and a half degrees. On Gambian homes the error dropped to about two-thirds of a degree. Cross-country strength like that is rare for such a lean model. Domain knowledge baked into the design does the heavy lifting. The authors present it as proof that careful AI can serve thermal comfort where resources are thin.
Catalog record
| CREATOR | Zainab Akhtar, Eunice Jengo, Björn Haßler |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 11 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2508-20260
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Generalizable AI Model for Indoor Temperature Forecasting Across Sub-Saharan Africa Zainab Akhtar, Eunice Jengo, Björn Haßler Abstract This study presents a lightweight, domain-informed AI model for predicting indoor temperatures in naturally ventilated schools and homes in Sub-Saharan Africa. The model extends the Temp-AI-Estimator framework, trained on Tanzanian school data, and evaluated on Nigerian schools and Gambian homes. It achieves robust cross-country performance using only minimal accessible inputs, with mean absolute errors of 1.45°C for Nigerian schools and 0.65°C for Gambian homes. These findings highlight AI’s potential for thermal comfort management in resource-constrained environments. 1 Introduction Thermal comfort is essential for health, cognition, learning and well-being, yet most schools and homes in Sub-Saharan Africa (SSA) depend on natural ventilation without climate control, exposing occupants to extreme indoor heat that undermines concentration and academic performance [12, 13]. Despite its importance, thermal comfort remains poorly monitored in these settings, limiting data-driven infrastructure planning. While indoor temperature provides a practical proxy for comfort, existing AI prediction models assume sensor-rich environments with stable electricity and dense data, conditions rarely present in SSA [17, 5]. This creates a critical gap for low-resource contexts with limited infrastructure, heterogeneous buildings, and sparse data. A lightweight model relying only on outdoor weather and simple building characteristics is needed to predict thermal discomfort. We develop a scalable AI model by adapting the Temp-AI-Estimator framework [3] for SSA contexts. Key contributions include: 1) a generalizable approach for low-resource buildings, and 2) cross-country validation spanning Tanzania, Nigeria, and The Gambia. By centering thermal comfort in educational and domestic settings, this work advances environmental data science while supporting educational equity, climate adaptation, and evidence-based policymaking in vulnerable regions. 2 Related Work Indoor temperature prediction has been extensively studied using machine learning approaches, though most work focuses on high-income regions. Decision-tree methods (Random Forest, XGBoost, LightGBM) achieve mean errors below 1°C with outdoor climate variables and building descriptors [8, 1], but struggle to generalize across climatic contexts. Deep learning techniques like hybrid ANN-LSTM models [7] and error-corrected LSTMs [16] excel at modeling temporal dynamics but require dense, high-frequency data rarely available in low-resource settings. While ensemble strategies have improved cross-building generalization [17], applications in SSA contexts remain scarce. Recent research emphasizes generalizability and resource efficiency. Sophisticated models like MITP-Net [15] and CONST-LSTM [14] integrate spatio-temporal consistency but depend on comprehensive sensor data and high computation, limiting rural deployment. Emerging causal modeling approaches show promise, with Mun and Park [10] demonstrating that double machine learning outperforms traditional methods by identifying causal relationships. This study bridges this gap by developing a generalizable forecasting model for low-resource, naturally ventilated buildings using harmonized datasets from Tanzania, The Gambia, and Nigeria, a unique cross-country integration. 3 Data Indoor Temperature Data Three datasets from various geographic locations, covering different years, seasons, and building types were selected for representativeness. 1) Tanzania: Data from 41 primary schools 1 1 1 Sensor data from 45 Tanzanian schools were collected but after preprocessing, continuous data from 41 schools remained [9]. All school locations are visualized on this Web Application located across three provinces (Mara, Pwani, and Dodoma). The data spans approximately four months (17 July – 4 December 2023), covering both dry and rainy seasons. 2) The Gambia: Data from two experimental rural houses located at Medical Research Councils Unit The Gambia’s, field station at Wali Kunda were collected over a five-week period, from 5 October – 29 September 2017 [4]. These houses differed primarily in roof color, one with a white reflective roof, and another with a traditional darker roof. 3) Nigeria: One public primary school, Central School Umuduru , in Imo State was selected from a broader set of six schools [11]. For the selected school, indoor temperature data was collected during the rainy season, for approximately 1 month (5 – 28 May 2018). Outdoor Weather Data To complement indoor data, external weather variables were integrated from two reliable global weather datasets: 1) Open-Meteo: Hourly weather data provided through a globally accessible API, offering accurate and timely environmental information for each study location [18], and 2) ERA5 Reanalysis: Comprehensive hourly weather data, providing long-term consistent meteorological data, critical for accurately capturing external environmental influences on indoor conditions [6]. Variables and Feature Set Appendix A illustrates the comprehensive set of features employed for the predictive AI model, grouped into four distinct categories. The Target Variable is indoor temperature, directly measured within buildings where the Temporal Features were derived from timestamps. Contextual Features include classroom area, occupancy, roof color, and ceiling board presence. Roof color was categorized as light (white), medium (silver with slight rust), and dark (red/brown with significant rust). External Weather Features consist of three variables obtained from Open-Meteo (air temperature, relative humidity, and dew point), two from ERA5 (surface pressure and total precipitation), alongside sun azimuth and sun altitude calculated using the ’pvlib’ Python library [2]. This feature set was carefully curated based on existing literature, domain expertise, and by analyzing feature importance via SHAP plots, to ensure robust, meaningful, and interpretable predictions of indoor temperature. 4 Methodology The methodology adapts and extends the Temp-AI-Estimator framework [3], training on the longer Tanzanian dataset ( \sim 4 months) and evaluating on shorter Nigeria and The Gambia datasets ( \sim 1 month). Minute-level data is aggregated to hourly intervals and structured using 12-hour sliding windows for 24-hour temperature forecasts. The adapted architecture integrates an LSTM backbone for temporal dependencies, external-correction and physical-modulation branches for building-specific adjustments, and a domain discriminator with adversarial training to promote cross-country generalization. Training employed supervised regression loss, adversarial domain loss, and Adam optimization over 15 epochs, with model performance evaluated using Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), Huber loss, and Mean Squared Error (MSE metrics) on held-out test sets. Full implementation details are provided in Appendix A . 5 Results An ablation study was conducted to assess the contribution of each component of the Temp-AI-Estimator (AI-Temp) model. We compared the full model against five simplified variants, each removing one key component: adversarial domain alignment (Adv), calibration (Cal), physical modulation ( F_{phy} ), external correction ( F_{ext} ), and finally, leaving only the LSTM backbone. Evaluation was performed on test sets from both Nigeria and The Gambia. As shown in Table 1 , the full AI-Temp model achieved the best performance on the Nigeria test set, with the lowest MAE (1.45°C), RMSE (1.75°C), scaled MSE (0.23), and Huber loss (0.226). Interestingly, in The Gambia, the best results across all metrics were observed when adversarial training was removed. This suggests that while domain adversarial training (via the GRL and discriminator) improves generalization from Tanzania to Nigeria by learning domain-invariant features, it may harm performance on structurally different data, such as Gambian houses, which lack windows and differ significantly from Tanzanian schools. In such cases, adversarial alignment may suppress critical physical cues needed for accurate prediction. Table 1: Ablation study results comparing model variants across Nigeria and Gambia test sets Nigeria Gambia Model MAE RMSE MSE Huber MAE RMSE MSE Huber AI-Temp (Full) 1.45 1.75 0.47 0.23 0.72 0.93 0.13 0.067 AI-Temp (- Adv) 1.70 2.05 0.65 0.31 0.65 0.84 0.11 0.054 AI-Temp (- Cal) 4.51 4.97 3.80 1.30 2.13 2.69 1.12 0.46 AI-Temp (- F_{phy} ) 1.58