Back to Insights
Model note Explainability

Grad-CAM for interpretable flood detection

A working note on using activation maps to inspect attention U-Net decisions on SAR imagery, especially where false positives carry operational cost.

Reading time: 5 min Grad-CAM SAR Attention U-Net

Why explainability shows up late—and shouldn't

Segmentation accuracy alone is insufficient when the output informs emergency routing, insurance triage, or resource allocation. An attention U-Net can produce plausible masks while attending to the wrong structures: bright rooftops, dock reflections, or bare soil after rainfall.

Grad-CAM offers a lightweight sanity check by visualizing which parts of the input image pushed the model toward its prediction.

Where Grad-CAM fits in the pipeline

In a typical flood detection workflow using Sentinel-1 SAR:

  • Preprocess SAR tiles (calibration, speckle filtering, normalization).
  • Run inference with an attention U-Net trained on flood / non-flood labels.
  • Overlay Grad-CAM heatmaps on the input and predicted mask.
  • Review cases where high activation does not align with hydrologically plausible areas.

The review step is manual but fast. It turns a single IoU number into a small set of interpretable failure patterns.

Patterns worth watching

Specular returnsWater-adjacent metal surfaces can mimic low backscatter signatures.
Urban shadowsTall structures create dark regions that resemble open water in SAR.
Temporal mismatchPairing the wrong acquisition date can make dry land look like change.

From visualization to iteration

Grad-CAM is not a replacement for rigorous geographic evaluation, but it accelerates iteration. When heatmaps consistently highlight the wrong features, the fix may be better preprocessing, additional training regions, or architecture changes—not more epochs on the same split.

Operational habit

Keep a small review set of tiles where mistakes are costly. Run Grad-CAM on that set after every major training change.

Summary

Interpretability tools like Grad-CAM make deep segmentation models easier to audit in disaster contexts. The point is not prettier plots—it is faster detection of the cases where the model's reasoning diverges from physical reality.