Sentinel-Mumbai PINN v1: 20M-Parameter Physics-Informed Neural Network
Model Summary
Sentinel-Mumbai PINN v1 is a high-capacity Physics-Informed Neural Network (PINN) engineered for hyper-local urban flood depth forecasting and storm surge dynamics across Mumbai / Salsette Island.
Trained across multi-decadal telemetry (rainfall, cumulative precipitation, tidal surge oscillations, elevation, urban impermeability, and drainage networks), the model embeds physical boundary laws directly into its optimization objective, preventing unphysical mass disappearance during coastal hydraulic lock events.
- Architecture: 6-Layer Bidirectional LSTM + Multi-Head Self-Attention + Non-Linear Residual Decoder
- Trainable Parameters: 20,387,457 active weights
- Framework: PyTorch (
torch.nn)
- Lookback Horizon: 24 Hours sequential memory window (temporal resolution: hourly)
Neural Architecture & Mathematical Formulation
1. Network Topology
Input Sequence: [Batch, 24 Hours, 9 Features]
│
▼
6-Layer Bidirectional LSTM (512 units/dir = 1024 hidden dims, dropout=0.3)
│
▼
Self-Attention Mechanism:
Attention Weights = Softmax(Linear(1024, 1))
Context Vector = Sum(Attention Weights * LSTM Sequences)
│
▼
Non-Linear Decoder:
Linear(1024 -> 256) -> ReLU -> Dropout(0.3)
Linear(256 -> 64) -> ReLU
Linear(64 -> 1) -> Pred: Continuous Flood Depth (m)
2. Physics-Informed Loss Function
The model optimizes a composite objective balancing empirical data fidelity against hydraulic conservation of mass:
$$\mathcal{L}{\text{total}} = \alpha \cdot \mathcal{L}{\text{data}} + \beta \cdot \mathcal{L}_{\text{physics}}$$
Data-Driven Loss (Log-Cosh)
To provide robust gradient descent that is resilient against extreme monsoon outliers without suffering from quadratic explosion:
$$\mathcal{L}{\text{data}} = \frac{1}{N} \sum{i=1}^N \ln\left(\cosh(\hat{y}_i - y_i)\right)$$
Hydraulic Lock Mass Conservation Constraint
During high-tide sea surges ($>4.5\text{m}$, or normalized tide $>0.85$) coinciding with cloudburst precipitation ($>0.01$), gravity-fed urban storm drains cannot discharge into the Arabian Sea ("Hydraulic Lock"). Water is physically constrained to accumulate or stagnate:
$$\mathcal{L}{\text{physics}} = \frac{1}{N} \sum{i=1}^N \text{ReLU}(0.1 - \hat{y}i) \cdot \mathbb{I}{(\text{tide} > 0.85)} \cdot \mathbb{I}_{(\text{rain} > 0.01)}$$
If the network attempts to predict near-zero flood depth during a locked storm event, a severe penalty is injected, enforcing conservation of mass.
9 Input Telemetry Features
| Index |
Feature Key |
Unit |
Description |
| 0 |
precip_mm_hr |
mm/hr |
Instantaneous hourly rainfall |
| 1 |
cumulative_rain_24h |
mm |
Accumulated precipitation over trailing 24 hours |
| 2 |
tidal_height_m |
meters |
Coastal Arabian Sea tidal gauge level |
| 3 |
avg_elevation_m |
meters |
Ward-level mean topographic elevation |
| 4 |
impermeability_index |
[0.0 - 1.0] |
Urban concrete/asphalt soil sealing fraction |
| 5 |
drainage_capacity_m3_s |
$\text{m}^3/\text{s}$ |
Municipal storm-water drainage throughput capacity |
| 6 |
distance_to_coast_m |
meters |
Euclidean proximity to coastline / creeks |
| 7 |
temperature_c |
°C |
Ambient surface temperature |
| 8 |
soil_moisture |
fraction |
Pre-storm Antecedent Soil Moisture Condition (AMC) |
Quickstart & Standalone Inference
Installation
pip install torch numpy huggingface_hub
Running Inference via Python
from huggingface_hub import hf_hub_download
import torch
import sys
# 1. Download model architecture & weights
weights_path = hf_hub_download(repo_id="abdullahashraf122/sentinel-mumbai-pinn-v1", filename="sentinel_mumbai_v1.pt")
arch_path = hf_hub_download(repo_id="abdullahashraf122/sentinel-mumbai-pinn-v1", filename="bi_lstm_mumbai_v1.py")
import importlib.util
spec = importlib.util.spec_from_file_location("bi_lstm_mumbai_v1", arch_path)
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
# 2. Instantiate and load
model = module.SentinelMumbaiPINN(input_dim=9, hidden_dim=512, num_layers=6, output_dim=1)
state_dict = torch.load(weights_path, map_location="cpu")
model.load_state_dict(state_dict)
model.eval()
# 3. Predict on a 24-hour sequence [batch_size, 24, 9]
dummy_telemetry = torch.rand(1, 24, 9)
with torch.no_grad():
predicted_depth = model(dummy_telemetry)
print(f"Predicted Flood Depth: {predicted_depth.item():.4f} meters")
Training Hardware & Convergence
- Training Platform: Intel Alder Lake P-Core Matrix + Gradient Accumulation (effective batch size: 256)
- Optimization Target: Target MAE $\le 0.0004$
- Validation Baseline: Monitored against Project Salsette 216,284 municipal cells.
License
Released under the MIT License.