ConvLSTM-based urban growth prediction achieving 0.000218 MSE and 67% improvement over U-Net
Quick Start • Results • Documentation • Citation
Note (November 2026). This is an earlier, exploratory project. Its comparisons rank models by MSE, which my later channel-count audit shows is misleading for sparse urban growth: when most pixels never change, MSE favours a model that predicts no change at all. Under the Figure of Merit, with input channels matched across horizons, a plain CNN leads the ConvLSTM at every horizon tested. For the current benchmark, code and trained weights, see Multi-Horizon-Urban-Growth-Prediction and the GeoAI 2026 paper.
|
|
Dual-Channel ConvLSTM Architecture: Built-up surface density + road network infrastructure → Multi-decadal urban growth forecasts
Model Configuration:
├── 2-layer ConvLSTM
├── 64 hidden channels per layer
├── Dual-channel input (built-up + roads)
├── 470,593 trainable parameters
└── 128×128 tile resolution| Metric | Value | Interpretation |
|---|---|---|
| Validation MSE | 0.000218 | Mean squared error |
| MAE | 0.0165 | ~1.65% absolute error |
| RMSE | 0.0303 | ~3% typical deviation |
| Train/Val Gap | 2.3% | Minimal overfitting |
| Model | MSE | Improvement vs Ours |
|---|---|---|
| ConvLSTM (Ours) | 0.00022 | Baseline |
| U-Net | 0.00066 | 67% worse |
| Standalone CNN | 0.00074 | 239% worse |
| Linear Extrapolation | 0.0021 | 863% worse |
Fine-Grained Analysis: Per-tile comparison showing model accuracy across different urban development stages
# 1. Clone repository
git clone https://github.com/rohanbalixz/NeuralTimeCapsule.git
cd NeuralTimeCapsule
# 2. Create virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# 3. Install dependencies
pip install -r requirements.txt
# 4. Open main notebook
jupyter notebook notebooks/urban_growth_prediction.ipynbfrom src.models.convlstm import create_model
from src.utils.inference import load_trained_model, autoregressive_forecast
import torch
# Load pretrained weights
model = create_model(input_channels=2, hidden_channels=64, num_layers=2)
model = load_trained_model(model, 'models/best_urban_growth_model.pth')
# Generate 5-step forecast
initial_sequence = torch.randn(1, 3, 2, 128, 128) # (batch, time, channels, H, W)
forecasts = autoregressive_forecast(model, initial_sequence, num_steps=5)
print(f"Generated {len(forecasts)} future predictions!")from src.models.convlstm import create_model
from src.utils.training import Trainer
# Initialize model
model = create_model()
# Create trainer
trainer = Trainer(
model=model,
device='cpu',
learning_rate=1e-3,
checkpoint_dir='checkpoints'
)
# Train for 50 epochs
trainer.train(train_loader, val_loader, num_epochs=50)
# Training time: ~6 hours on laptop CPU
|
|
| Configuration | MSE | MAE | Error vs Dual-Channel |
|---|---|---|---|
| Dual-channel (Built-up + Roads) | 0.00022 | 0.0165 | Baseline |
| Single-channel (Built-up only) | 0.0028 | 0.0421 | +1173% worse |
| Single-channel (Roads only) | 0.0156 | 0.0987 | +6991% worse |
Key Finding: Road infrastructure data provides 93% error reduction when combined with built-up density.
| Model Depth | MSE | Parameters | Training Time |
|---|---|---|---|
| 1-layer ConvLSTM | 0.0035 | 235K | 3 hours |
| 2-layer ConvLSTM | 0.00022 | 470K | 6 hours |
| 3-layer ConvLSTM | 0.00025 | 705K | 12 hours |
Key Finding: 2 layers provide optimal performance/efficiency trade-off.
|
Provider: European Commission Joint Research Centre Values: Built-up surface density [0-100%] |
Coverage:
|
|
Provider: OpenStreetMap contributors Road Types: Highways, primary, secondary roads |
Statistics:
|
Training Pipeline:
├── Input: 1975, 1990 built-up + roads
├── Target: 2000 built-up surface
├── Tile size: 128×128 pixels (32km × 32km)
├── Overlap: 50% (stride 64 pixels)
└── Total: 2,313 tiles
├── Train: 1,850 tiles (80%)
└── Val: 463 tiles (20%)
|
Step-by-step setup |
Model specifications |
Development workflow |
NeuralTimeCapsule/
│
├── notebooks/
│ └── urban_growth_prediction.ipynb # Main training pipeline
│
├── models/
│ └── best_urban_growth_model.pth # Pretrained weights (470K params)
│
├── src/ # Production source code
│ ├── models/convlstm.py # Architecture implementation
│ ├── data/preprocessing.py # GHSL + OSM pipeline
│ └── utils/
│ ├── training.py # Training loop
│ ├── inference.py # Forecasting utilities
│ └── metrics.py # Performance tracking
│
├── paper/ # LaTeX paper + figures
│ ├── main.tex # IEEE format (530 lines)
│ └── figures/ # 6 publication images (300 DPI)
│
├── docs/ # Comprehensive documentation
│ ├── INSTALLATION.md
│ ├── MODEL_CARD.md
│ ├── CONTRIBUTING.md
│ └── SUBMISSION_READY.md
│
├── tests/ # Unit tests
│ └── test_model.py
│
├── scripts/ # Utility scripts
│ ├── preprocess_data.sh
│ └── verify_structure.py
│
├── results/ # Outputs
│ └── metrics/model_performance.json
│
└── Root files
├── README.md # This file
├── requirements.txt # Python dependencies
├── LICENSE # MIT License
└── CITATION.bib # Academic citation
| Limitation | Impact | Mitigation Strategy |
|---|---|---|
| Sparse temporal sampling | Only 3 training epochs (1975, 1990, 2000) | Add 2014-2023 GHSL data (6 epochs total) |
| Autoregressive error propagation | Errors compound in multi-step forecasts | Implement uncertainty quantification |
| Missing socioeconomic data | Cannot model policy interventions | Multi-modal fusion with census data |
| No 2010+ validation | Cannot validate future predictions | Await GHSL 2014-2023 release |
- 6-epoch training with 2014-2023 GHSL data
- Climate data integration (temperature, precipitation)
- Demographics fusion (population, income)
- Attention mechanisms for interpretability
- Uncertainty quantification (ensemble methods, MC dropout)
- Transfer learning experiments for international regions
We welcome contributions! Please see our Contributing Guide for details.
|
Found a bug? Let us know! |
Have an idea? Share it! |
Code improvements welcome! |
# 1. Fork the repository
# 2. Create your feature branch
git checkout -b feature/amazing-feature
# 3. Make changes and commit
git commit -m "Add amazing feature"
# 4. Push to your fork
git push origin feature/amazing-feature
# 5. Open a Pull RequestIf you use this work in your research, please cite:
@inproceedings{bali2025neuraltimecapsule,
title={Neural Time Capsule: Forecasting Urban Development Through Multi-Decadal
Spatio-Temporal ConvLSTM with Built-Up and Road Network Inputs},
author={Bali, Rohan},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
year={2025},
url={https://github.com/rohanbalixz/NeuralTimeCapsule}
}Download citation: CITATION.bib
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License - Free for academic and commercial use
✓ Modify, distribute, and use privately
✓ Include copyright notice
✗ No warranty or liability
|
GHSL Team (JRC) |
OSM Contributors |
Meta AI |
- Corbane et al. (2021) - "The Grey-Green Divide: Multi-temporal Analysis of Greenness Across 10,000 Urban Centres"
- Shi et al. (2015) - "Convolutional LSTM Network: A Machine Learning Approach for Precipitation Nowcasting"
- Ronneberger et al. (2015) - "U-Net: Convolutional Networks for Biomedical Image Segmentation"
- Questions? Open a Discussion
- Issues? Report a Bug
- Private inquiry? Email the maintainer
If you find this project helpful, please consider giving it a star!
Source: Joint Research Centre (JRC), European Commission
Temporal Coverage: 1975, 1990, 2000 (3 epochs)
Spatial Resolution: 30 arcseconds (~1 km native, reprojected to 250m)
Projection: WGS84 (EPSG:4326) → Albers Equal Area (EPSG:5070)
Download: https://ghsl.jrc.ec.europa.eu/download.php
Preprocessing:
- Geographic subset: Continental US bounds (-125°W to -66°W, 24°N to 49.5°N)
- Reprojection: Bilinear resampling to EPSG:5070 at 250m resolution
- Output dimensions: 12,717 × 23,996 pixels per epoch
- Normalization: Min-max scaling to [0, 1] range
Source: Geofabrik US Extract
Format: Protocolbuffer Binary Format (.osm.pbf)
Processing: Morphological road density extraction via binary dilation
Usage: Infrastructure accessibility proxy for urban growth modeling
data/
├── ghsl/
│ ├── GHS_BUILT_S_E1975_GLOBE_R2023A_4326_3ss_V1_0.tif
│ ├── GHS_BUILT_S_E1990_GLOBE_R2023A_4326_3ss_V1_0.tif
│ ├── GHS_BUILT_S_E2000_GLOBE_R2023A_4326_3ss_V1_0.tif
│ └── *.tif.ovr # Pyramid overviews
└── us-251031.osm.pbf
Tile Generation:
- Tile size: 128 × 128 pixels (32 km × 32 km at 250m resolution)
- Stride: 256 pixels (64 km, 50% overlap)
- Threshold: Minimum 1% built-up density
- Total tiles: 2,313 (1,850 training, 463 validation)
- Python: 3.12+ (tested on 3.12.2)
- Memory: 16 GB RAM minimum (32 GB recommended)
- Storage: ~10 GB for GHSL data + 2 GB for OSM data
- GPU: Optional (CPU-optimized, MPS-compatible for Apple Silicon)
# Core ML/Scientific Stack
torch>=2.3.1
numpy>=1.26.4
scikit-learn>=1.4.0
# Geospatial Processing
rasterio>=1.3.9
geopandas>=0.14.3
shapely>=2.0.3
pyproj>=3.6.1
# Visualization
matplotlib>=3.8.0
seaborn>=0.13.0
# Utilities
tqdm>=4.66.0
scipy>=1.12.0# Clone repository
git clone https://github.com/yourusername/NeuralTimeCapsule.git
cd NeuralTimeCapsule
# Create conda environment (recommended)
conda create -n neuraltimecapsule python=3.12
conda activate neuraltimecapsule
# Install PyTorch (CPU or GPU version)
# CPU version:
pip install torch torchvision torchaudio
# Install geospatial dependencies
pip install rasterio geopandas pyproj shapely
# Install remaining dependencies
pip install numpy scikit-learn matplotlib seaborn tqdm scipy
# Launch Jupyter
jupyter notebook urban_growth_prediction.ipynb# Launch notebook
jupyter notebook urban_growth_prediction.ipynb
# Run all cells sequentially (Cell → Run All)
# Total execution time: ~2-4 hours (including training)1. Setup & Configuration (Cells 1-6)
- Environment detection and path configuration
- Import dependencies
- Define CONUS bounds and projection parameters
2. Data Loading & Preprocessing (Cells 7-28)
- Load GHSL GeoTIFF files for 1975, 1990, 2000
- Reproject to EPSG:5070 Albers Equal Area
- Extract road density from OSM data
- Create temporal stack and validate data quality
3. Tile Generation (Cells 29-32)
- Extract 128×128 pixel tiles with 256-pixel stride
- Filter tiles by built-up density threshold (>1%)
- Split into train/validation sets (80/20)
- Visualize sample tiles and temporal evolution
4. Model Architecture (Cells 35-40)
- Define ConvLSTMCell with hidden state management
- Build UrbanGrowthModel with 2-layer ConvLSTM
- Implement autoregressive prediction for future timesteps
- Summary: 470,593 trainable parameters
5. Training Pipeline (Cells 38-42)
- Initialize model with Xavier weight initialization
- Configure Adam optimizer (lr=0.0005, weight_decay=1e-5)
- ReduceLROnPlateau scheduler (patience=5, factor=0.5)
- Gradient clipping (max_norm=1.0)
- Training: 50 epochs, batch_size=8
6. Model Evaluation (Cells 43-51)
- Generate predictions for 2000 (validation)
- Forecast future states: 2010, 2020, 2033
- Visualize prediction quality and error maps
- Compare against ground truth with detailed metrics
7. Advanced Analysis (Cells 52-74)
- Attention mechanisms and interpretability
- Ensemble methods and uncertainty quantification
- Regional analysis and full CONUS inference
- Export results and model checkpoints
- Model Checkpoint:
best_urban_growth_model.pth(1.8 MB) - Training Curves: Loss progression and learning rate schedule
- Predictions: 2000 validation + 2010/2020/2033 forecasts
- Visualizations: Temporal evolution, error heatmaps, growth statistics
| Task | CPU | GPU/MPS |
|---|---|---|
| Data Loading & Preprocessing | 5-10 min | 5-10 min |
| Tile Generation | 2-5 min | 2-5 min |
| Model Training (50 epochs) | 4-6 hours | 1-2 hours |
| Inference & Visualization | 5-10 min | 2-5 min |
| Total | 5-8 hours | 1.5-3 hours |
UrbanGrowthModel (470,593 parameters)
│
├── ConvLSTM Layer 1
│ ├── Input: 2 channels (built-up + roads)
│ ├── Hidden: 64 channels
│ ├── Kernel: 3×3, padding=1
│ └── Parameters: 185,472
│
├── ConvLSTM Layer 2
│ ├── Input: 64 channels
│ ├── Hidden: 64 channels
│ ├── Kernel: 3×3, padding=1
│ └── Parameters: 221,952
│
└── Prediction Head
├── Conv2d(64 → 32, kernel=3, padding=1) + ReLU
├── Conv2d(32 → 16, kernel=3, padding=1) + ReLU
├── Conv2d(16 → 1, kernel=1)
└── Sigmoid activation
└── Parameters: 63,169
-
Input Shape:
(batch, 2 timesteps, 2 channels, 128, 128)- Channel 0: Built-up surface density [0, 1]
- Channel 1: Road infrastructure density [0, 1]
- Timesteps: 1975, 1990 (for predicting 2000)
-
Output Shape:
(batch, 1 timestep, 1 channel, 128, 128)- Single channel: Predicted built-up density [0, 1]
- Future steps: Autoregressive loop for multi-step forecasting
Optimizer: Adam
- Learning rate: 0.0005 (initial)
- Weight decay: 1e-5 (L2 regularization)
- Betas: (0.9, 0.999)
Scheduler: ReduceLROnPlateau
- Mode: min (monitor validation loss)
- Factor: 0.5
- Patience: 5 epochs
- Min LR: 1e-7
Loss Function: MSE (Mean Squared Error)
Gradient Clipping: max_norm=1.0
Weight Initialization: Xavier Uniform (Conv2d layers)
Batch Size: 4
Epochs: 10
Device: CPU (MPS-compatible for Apple Silicon)- Temporal Modeling: ConvLSTM captures spatio-temporal dependencies
- Autoregressive Prediction: Iterative forecasting for long-term horizons
- Gradient Stability: Xavier init + gradient clipping + low learning rate
- Regularization: Weight decay prevents overfitting on limited temporal data
| Metric | Value |
|---|---|
| Final Training Loss | 0.000223 |
| Final Validation Loss | 0.000218 |
| Best Validation Loss | 0.000218 |
| MAE (Test Predictions) | 0.0165 |
| RMSE (Test Predictions) | 0.0303 |
| Training Epochs | 50 |
| Best Epoch | 50/50 |
| Model Parameters | 470,593 |
| Checkpoint Size | 1.8 MB |
Loss Evolution (50 epochs):
Epoch 1: Train=0.0189 Val=0.0034
Epoch 5: Train=0.0033 Val=0.0034
Epoch 20: Train=0.0033 Val=0.0034
Epoch 22: Train=0.0018 Val=0.0010 ← Significant improvement
Epoch 30: Train=0.0003 Val=0.0003
Epoch 40: Train=0.0003 Val=0.0003
Epoch 50: Train=0.0002 Val=0.0002 ← Best model
2000 Validation (Ground Truth Available):
- MAE: 0.0165, RMSE: 0.0303 on validation tiles
- Visual inspection shows strong spatial correlation
- Model captures urban growth patterns from 1975→1990→2000
- Predictions maintain realistic density distributions
Future Forecasts (2010, 2020, 2033):
- Autoregressive predictions extend temporal sequence
- Growth trends follow historical patterns
- Uncertainty increases with forecast horizon
Generated outputs include:
- Temporal Evolution: 1975 → 1990 → 2000 progression
- Prediction Comparison: 2×2 grid (Input 1975/1990, Truth 2000, Predicted 2000)
- Future Forecasts: 2010, 2020, 2033 predictions with growth heatmaps
- Training Curves: Loss and learning rate over epochs
- Error Analysis: Spatial error distributions and statistical metrics
NeuralTimeCapsule/
├── urban_growth_prediction.ipynb # Main production notebook (74 cells)
├── best_urban_growth_model.pth # Trained model checkpoint (1.8 MB)
├── README.md # Project documentation
├── data/ # Data directory (not in repository)
│ ├── ghsl/ # GHSL GeoTIFF files (~7 GB extracted)
│ │ ├── GHS_BUILT_S_E1975_GLOBE_R2023A_4326_3ss_V1_0.tif
│ │ ├── GHS_BUILT_S_E1990_GLOBE_R2023A_4326_3ss_V1_0.tif
│ │ ├── GHS_BUILT_S_E2000_GLOBE_R2023A_4326_3ss_V1_0.tif
│ │ └── *.tif.ovr # Pyramid overviews
│ └── us-251031.osm.pbf # OSM US extract (~2 GB)
└── .gitignore # Excludes data/ and checkpoints
- urban_growth_prediction.ipynb: Complete end-to-end pipeline from data loading to forecasting
- best_urban_growth_model.pth: PyTorch checkpoint with trained weights and optimizer state
- data/ghsl/: Global Human Settlement Layer built-up surface GeoTIFFs
- data/us-251031.osm.pbf: OpenStreetMap road network for CONUS region
- Temporal Sparsity: Only 3 observation epochs (1975, 1990, 2000) limit temporal learning
- Forecast Horizon: Predictions beyond 20 years introduce increasing uncertainty
- Geographic Scope: Model trained exclusively on CONUS patterns
- Resolution Trade-off: 250m pixel size balances coverage vs. fine-scale detail
- Autoregressive Error Propagation: Multi-step predictions accumulate errors over time
- Infrastructure Proxy: Road density derived from morphology, not vector geometry
- External Factors: Climate, policy, and economic drivers not explicitly modeled
- Validation Gap: 2010+ ground truth unavailable for forecast validation
- Python 3.13 Compatibility: NumPy recursion issues require Python 3.12 or earlier
- Memory Requirements: Full CONUS arrays (~580 MB/epoch) require 16+ GB RAM
- CPU Training: Optimized for CPU; GPU provides ~4× speedup but not required
- Execution Order: Notebook cells must run sequentially (dependency chains present)
1. Extended Temporal Coverage
- Integrate 2014, 2018, 2023 GHSL epochs (if available)
- Incorporate Landsat/Sentinel time series for continuous temporal sampling
- Validate forecasts against independent satellite observations
2. Enhanced Feature Engineering
- Topography: SRTM elevation and slope for growth constraint modeling
- Climate: Temperature, precipitation trends from PRISM/MERRA-2
- Socioeconomic: Population density, GDP, zoning from census data
- True Infrastructure: Vector road networks from TIGER/OSM with network analysis
3. Advanced Model Architectures
- Attention Mechanisms: Spatial/temporal attention for interpretability
- Transformer Models: Vision Transformers (ViT) for long-range dependencies
- Physics-Informed: Incorporate urban growth equation constraints
- Ensemble Methods: Multi-model uncertainty quantification
4. Scalability & Deployment
- Full CONUS Inference: Sliding window prediction over entire domain
- Web Application: Interactive visualization and real-time forecasting
- Cloud Deployment: AWS/GCP infrastructure for large-scale processing
- Model Compression: Quantization and pruning for edge deployment
5. Validation & Benchmarking
- Compare against cellular automata and agent-based models
- Cross-validation with international urban growth datasets
- Ablation studies on feature importance and architecture choices
If you use this work in your research, please cite:
@software{neuraltimecapsule2025,
title={NeuralTimeCapsule: Urban Growth Prediction with ConvLSTM},
author={Research Team},
year={2025},
version={1.0},
url={https://github.com/yourusername/NeuralTimeCapsule},
note={Deep learning framework for continental-scale urban expansion forecasting}
}-
GHSL R2023A: Pesaresi, Martino; Politis, Panagiotis (2023): GHS-BUILT-S R2023A - GHS built-up surface grid, derived from Sentinel2 composite and Landsat, multitemporal (1975-2030). European Commission, Joint Research Centre (JRC). DOI: 10.2905/9F06F36F-4B11-47EC-ABB0-4F8B7B1D72EA
-
OpenStreetMap: © OpenStreetMap contributors. Data available under the Open Database License: https://www.openstreetmap.org/copyright
-
Geofabrik: OSM data extracts provided by Geofabrik GmbH: https://www.geofabrik.de/
- PyTorch for deep learning infrastructure
- Rasterio for geospatial raster processing
- GeoPandas for vector data handling
- Matplotlib/Seaborn for scientific visualization
This project is licensed under the MIT License - see the LICENSE file for details.
Note: Data sources (GHSL, OSM) have separate licenses:
- GHSL: CC BY 4.0
- OSM: ODbL 1.0
For questions, collaborations, or bug reports:
- Issues: https://github.com/rohanbalixz/NeuralTimeCapsule/issues
- Email: rohanbaliwork@gmail.com
- Research Group: University of Massachusetts Dartmouth
Project Status: Active Development
Last Updated: November 2025
Version: 1.0.0
Python: 3.12+
Platform: macOS, Linux, Windows



