Skip to content

Junaid-Ahmed-Rupok/DeepEnMap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

42 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌍 DeepEnMap

Multi-Modal Deep Learning for Ordinal Energy Poverty Risk Mapping

Python TensorFlow License: MIT Status

Fusing satellite imagery and demographic data to map energy poverty risk β€” with an ordinal-aware learning objective.


πŸ“– Overview

DeepEnMap is a multi-modal deep learning framework that predicts energy poverty risk by combining satellite imagery with demographic data.

Most risk-mapping approaches treat class prediction as a purely nominal classification problem β€” every wrong answer counted as equally wrong. DeepEnMap instead recognizes that risk levels are ordinal: mistaking a moderate-risk region for a slightly-higher-risk one is a minor error, while mistaking a severe-risk region for a low-risk one is a serious error with real consequences for resource allocation.

To address this, the framework uses a custom ordinal-aware loss function that penalizes distant misclassifications more heavily than nearby ones, paired with a companion ordinal-error evaluation metric to track how well this is working β€” going beyond what plain accuracy can tell you.

Model Architecture

Figure 1 β€” DeepEnMap architecture: satellite imagery is processed through a CNN branch while demographic data flows through a dense branch; both feature sets are fused and passed to the final classifier.


πŸ“¦ Dataset

This project uses the EuroSAT RGB dataset (via kagglehub, dataset ID apollo2506/eurosat-dataset) β€” Sentinel-2 satellite imagery patches covering 10 land-use/land-cover classes across Europe.

Since EuroSAT does not natively include energy poverty labels, ordinal risk levels used in this project are derived synthetically to demonstrate the modeling framework, and demographic features are paired with imagery for the multi-modal fusion setup. The dataset is not included in this repository β€” running the code will automatically download it via kagglehub.

import kagglehub
dataset_path = kagglehub.dataset_download("apollo2506/eurosat-dataset")

πŸ“‘ Table of Contents


✨ Key Contributions

🎯 Ordinal-Aware Loss Penalizes probability mass placed on ordinally distant wrong classes more heavily than on nearby ones β€” a strict, backward-compatible generalization of standard cross-entropy.
πŸ“ Ordinal-Error Metric Captures how far predictions deviate from ground truth (in risk-level steps), not just whether they are right or wrong.
πŸ”— Multi-Modal Fusion A convolutional branch over satellite patches fused with a dense demographic encoder, jointly trained end-to-end.
πŸ” Grad-CAM Explainability Saliency maps aligned with the ordinal-aware training objective, for interpretable risk predictions.

βš™οΈ Pipeline

Stage Name Function
1 Data Preprocessing Normalizes satellite patches, standardizes demographic features, one-hot encodes labels, 80/20 train-validation split
2 Spatial Feature Extraction (CNN) 3-block convolutional network extracting a 256-dimensional feature vector from satellite imagery
3 Multi-Modal Fusion & Classification Concatenates image and demographic features, predicts class probabilities across 7 ordinal risk levels
4 End-to-End Training Adam optimizer with early stopping

πŸ—‚οΈ Data Visualization

Class Distribution Sample Grid

Left: distribution of samples across the 7 ordinal risk classes. Right: representative satellite patches per class.


πŸ“Š Results

Models were trained across multiple random seeds with early stopping. Results reported as mean Β± standard deviation.

Loss Function Accuracy Ordinal Error ↓ F1 (macro)
Standard Cross-Entropy 0.9157 Β± 0.0099 0.1229 Β± 0.0151 0.9096 Β± 0.0105
Ordinal-Aware Loss (ours) 0.9166 Β± 0.0092 0.1201 Β± 0.0130 0.9102 Β± 0.0104

The proposed loss matches standard cross-entropy on accuracy while reducing ordinal error β€” meaning that when the model is wrong, it tends to be wrong by a smaller margin.

Training History Confusion Matrix

Training/validation curves (left) and confusion matrix (right) β€” most confusions fall on adjacent risk classes, consistent with the ordinal structure the loss is designed to exploit.

Ordinal Error Distribution Misclassified Examples


πŸ§ͺ Ablation Studies

Modality Ablation

Modality Accuracy Ordinal Error ↓ F1 (macro) Parameters
Demographic only 0.5827 Β± 0.0061 0.4829 Β± 0.0083 0.4780 Β± 0.0096 9,351
Image only 0.8593 Β± 0.0033 0.3280 Β± 0.0146 0.8503 Β± 0.0029 2,193,351
Multi-modal (fused) 0.9166 Β± 0.0092 0.1201 Β± 0.0130 0.9102 Β± 0.0104 2,202,695

Fusing both modalities substantially outperforms either alone β€” demographic data adds meaningful signal despite contributing less than 0.5% of total parameters.

Sensitivity Analysis

Lambda Sensitivity

Statistical significance across penalty-strength settings was assessed using paired t-tests with Holm–Bonferroni correction against the baseline. The strongest setting achieved statistically significant improvements in both accuracy and ordinal error.


⚑ Computational Cost

Modality Parameters FLOPs / Inference
Demographic only 9,351 18,538
Image only 2,193,351 87,692,394
Multi-modal (fused) 2,202,695 87,710,890

The demographic branch adds under 0.1% computational overhead relative to the image branch β€” multi-modal fusion is essentially "free" in inference cost while delivering the largest performance gains.


πŸ” Explainability

Grad-CAM saliency maps are computed with respect to the proposed loss, so the highlighted regions reflect the ordinal-aware training objective rather than a distance-agnostic one.

Grad-CAM Heatmaps Grad-CAM Samples

Spatial Risk Predictions

Country Prediction Map


πŸ“ Repository Structure

DeepEnMap/
β”œβ”€β”€ Images/                          # All figures used in this README
β”‚   β”œβ”€β”€ 01_class_distribution.png
β”‚   β”œβ”€β”€ 02_sample_grid.png
β”‚   β”œβ”€β”€ 03_model_architecture.png
β”‚   β”œβ”€β”€ 04_training_history.png
β”‚   β”œβ”€β”€ 05_confusion_matrix.png
β”‚   β”œβ”€β”€ 06_misclassified_examples.png
β”‚   β”œβ”€β”€ 07_gradcam_heatmaps.png
β”‚   β”œβ”€β”€ 08_country_prediction_map.png
β”‚   └── gradcam_samples.png
β”œβ”€β”€ codes/
β”‚   β”œβ”€β”€ DeepEnMap_Experiments.ipynb        # Full experiment notebook
β”‚   β”œβ”€β”€ DeepEnMap_Experiments.ipynb - Colab.pdf
β”‚   └── deepenmap_experiments.py           # Script version
β”œβ”€β”€ Experiment_1/                    # Baseline vs. proposed loss comparison
β”œβ”€β”€ Experiment_2/                    # Sensitivity sweep + significance tests
β”œβ”€β”€ Experiment_3/                    # Modality ablation
β”œβ”€β”€ Experiment_4/                    # Ordinal error distribution analysis
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ LICENSE
β”œβ”€β”€ CITATION.cff
β”œβ”€β”€ .gitignore
└── README.md

πŸ› οΈ Requirements

  • Python 3.x
  • TensorFlow 2.15
  • Keras

All experiments were run on a single NVIDIA T4 GPU (16 GB VRAM) via Google Colaboratory.

Install dependencies with:

pip install -r requirements.txt

Note: The notebook assumes a Google Colab environment; the google.colab import can be removed for local runs.


πŸ“œ Citation

If you use this work, please cite:

@article{deepenmap2026,
  title={DeepEnMap: A Multi-Modal Deep Learning Framework for Energy Poverty Risk Mapping},
  author={Ahmed, Sarder Junaid},
  year={2026}
}

A machine-readable citation is also available via CITATION.cff.


πŸ‘¨β€πŸ’» About the Developer

Sarder Junaid Ahmed

Data Scientist & Machine Learning Engineer

Transforming complex data into strategic decisions through rigorous statistical modeling and production-ready machine learning systems.

GitHub LinkedIn Portfolio Email

Specializations: Statistical ML Β· Causal Inference Β· Trustworthy AI Β· Fairness-Aware ML Β· RAG Systems

Selected Research:

  • πŸ“„ Ahmed, S.J. et al. (2026). Machine Learning for Crime Classification: A Fairness-Aware Approach to Class Imbalance. Journal of Machine Learning and Applications, 2(1), 9–17. DOI: 10.61577/jmla.2026.100002
  • πŸ“„ Ahmed, S.J. et al. (2026). CF-EGAT: A Causal Fairness-Aware Equity Graph Attention Network for Country-Level Environmental Livability Classification. SPECTRA 2026. πŸ† 1st Best Paper Award
  • πŸ“„ Ahmed, S.J. (2025). Multi-Dimensional Statistical Similarity for Governance Classification: Beyond Arbitrary Thresholds. APMEE 2025. πŸ† Best Research Paper Award

Other Deployed Projects:

  • πŸ”¬ ReproHub β€” Automated research reproducibility platform with composite scoring across 11 statistical tests
  • πŸ“Š StatsPro β€” AI-powered statistical analysis platform with automated CSV-to-report workflows
  • πŸ€– Smart RAG Chatbot β€” Document Q&A chatbot with cited retrieval, powered by Groq + FAISS + LangChain

Honors: πŸ† 1st Best Paper β€” SPECTRA 2026 Β Β·Β  πŸ† Best Research Paper β€” APMEE 2025 Β Β·Β  πŸŽ–οΈ Esteemed Alumni Award β€” YLRL RUET 2024 Β Β·Β  ⭐ Perfect GPA 5.00/5.00 β€” SSC & HSC Β Β·Β  πŸŽ“ National Merit Scholarship β€” 2009 & 2013


πŸ“„ License

MIT β€” see LICENSE.

```

About

Multi-modal deep learning framework for ordinal energy poverty risk mapping using satellite imagery and demographic data, with a custom ordinal-aware loss function.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors