This work has been accepted for publication as "TFT-Flood for Nationwide Flood Prediction in Turkey: A Three-Branch Hybrid Deep Learning Architecture" at the IEEE Signal Processing and Communications Applications Conference (SIU 2026).
Project Summary
This project is an AI system that performs daily flood risk prediction for districts across Turkey. The research model, TFT-Flood, is a three-branch hybrid deep learning architecture inspired by the Temporal Fusion Transformer, operating over 8-day time windows. It is evaluated on a dataset of 6,372 sequences covering 973 districts under a strict leak-free 1-day forecast protocol, where the prediction day is masked.
The 8-seed ensemble achieves 0.909 AUC (F1 0.84, Precision 0.88, Recall 0.81), outperforming all six benchmark baselines. The live system runs automatically every day, fetching current meteorological and hydrological data, performing district-level risk analysis, and generating an interactive choropleth map.
Technologies Used
| Category | Technologies |
|---|---|
| Model Architecture | Temporal Fusion Transformer (TFT), Bi-LSTM, GRN/VSN — ~234K parameters |
| AI / ML | Keras 3 (PyTorch backend), AdamW + cosine LR |
| Data Processing | Pandas, NumPy, Scikit-learn |
| Visualization | Folium (Leaflet.js), Matplotlib |
| Data Sources | TUCBS open data (DSI + AFAD flood events, 2000–2020), ERA5 + NASA POWER, DSI discharge archive, Open-Meteo API |
| Hardware | RTX 3050 Ti (4 GB VRAM) — single-sequence inference < 5 ms |
Key Features
- Leak-Free Protocol: The prediction day is masked; cumulative engineered features are recomputed using the visible window only.
- District-Level Forecasting: Produces 1-day-ahead (24h) flood probability for all 973 districts of Turkey.
- Hard Negative Matched-Pair Sampling: For each flood, a negative sequence shares the same district, climatological week, and monthly counts (Pearson r > 0.99) — so only temporal dynamics can distinguish positives from negatives.
- Spatial Augmentation (k-NN): Each district is enriched with its 1-hop K-nearest neighbours (k=8, ≤50 km); only train nodes are averaged to avoid spatial leakage.
- Hybrid Data Structure: Uses both dynamic (weather) and static (terrain) data.
System Architecture
TFT-Flood analyzes an 8-day time window for each district through three parallel branches:
- Branch A — Static Enrichment: Processes static features through four GRN blocks to generate context vectors.
- Branch B — Temporal Processing: A Variable Selection Network (VSN) + Bi-LSTM encodes the temporal dynamics.
- Branch C — Risk Quantification: Concatenates the last timestep with static context and feeds a GRN-MLP head to yield a flood probability and a 4-class risk score.
Input Features: 7 dynamic (total precipitation, rain, max/min temperature, wind speed, soil moisture, DSI discharge) + 8 derived dynamic (3/5-day cumulative rain, rain change rate, temp×rain, soil×rain, rain intensity, temperature range, discharge×rain) = 15 dynamic; plus 8 static (altitude, slope, distance to nearest lake, water surface ratio, CORINE land cover).
Baseline Comparison
Comparison against six baselines on v8_full (6,372 sequences, 973 districts) under the leak-free 1-day forecast protocol. TFT-Flood (8-seed ensemble) attains the highest AUC and F1:
| Model | AUC | F1 | Precision | Recall |
|---|---|---|---|---|
| Logistic Regression | 0.787 | 0.750 | 0.721 | 0.782 |
| Random Forest | 0.905 | 0.842 | 0.913 | 0.782 |
| XGBoost | 0.897 | 0.842 | 0.907 | 0.786 |
| Pure Bi-LSTM | 0.891 | 0.833 | 0.874 | 0.795 |
| ST-GNN | 0.896 | 0.834 | 0.901 | 0.776 |
| Informer-lite | 0.900 | 0.834 | 0.901 | 0.776 |
| TFT-Flood (ensemble) | 0.909 | 0.844 | 0.884 | 0.807 |
Results
- AUC (8-seed ensemble): 0.909 | per-seed mean 0.897 ± 0.004
- F1 / Precision / Recall: 0.84 / 0.88 / 0.81
- Dataset: 6,372 sequences, 973 districts (5,950 TUCBS + 422 NASA POWER backfill)
- Chronological split: AUC 0.606 — still beats every baseline under temporal distribution shift.
This project demonstrates the power of artificial intelligence in disaster management and early warning systems.