SwinLS: Adapting Swin Transformer to Landslide Detection

Dong Zhao, Qi Zang, Zining Wang, Dou Quan, Shuang WangCDCEO @ IJCAI 2022

Abstract

Landslide detection is a critical task in disaster response, yet traditional convolutional neural networks often struggle with long-range spatial dependencies and extreme class imbalance. This paper introduces SwinLS, a model that adapts the Swin Transformer architecture for high-precision landslide detection in multispectral satellite imagery. By optimizing spectral band selection and employing a novel two-stage balanced training strategy, SwinLS achieved a 73.99% F1 score, securing 2nd place in the Landslide4Sense competition.

Introduction

Landslides are devastating natural disasters where rapid detection via remote sensing is vital for search and rescue operations. While Convolutional Neural Networks (CNNs) like ResUNet have been the standard for this task, they face significant hurdles: capturing long-range spatial correlations, managing noise in multispectral data, and overcoming extreme class imbalance where landslides represent a tiny fraction of the total land area.

Model Architecture and Training Strategy

The proposed SwinLS model utilizes a Swin-B Transformer as an encoder paired with a convolutional decoder, connected by skip connections to preserve spatial detail. The architecture is designed to address the specific challenges of remote sensing imagery through a specialized training pipeline.

The SwinLS model structure featuring a Swin Transformer encoder and a multi-scale fusion decoder with a two-stage training process.

Two-Stage Balanced Training

To mitigate bias toward the majority "non-landslide" class, the authors implemented a two-stage approach:

  1. Stage 1: The encoder and decoder are trained simultaneously using a combination of Weighted Cross-Entropy (WCE), Lovasz loss (to optimize for Intersection over Union), and an auxiliary image-level classification loss to ensure discriminative high-level features.
  2. Stage 2: The encoder is frozen, and the decoder is fine-tuned with standard cross-entropy to weaken the classifier's bias toward the majority class.

The "Attention Dissipation" Phenomenon

A key finding of this research is that more spectral data does not necessarily improve performance for Vision Transformers. While CNNs typically benefit from additional spectral bands (like NIR or SWIR), the Swin Transformer performed best using only RGB data.

Visual comparison of attention maps across different spectral combinations, illustrating how additional bands can lead to "noisy" feature maps.

As shown in the figure above, adding extra bands caused the self-attention mechanism to spread too thin—a phenomenon the authors call "attention dissipation." Sticking to RGB allowed the model to maintain a sharp focus on the structural features of landslides. Furthermore, the authors found that geometric augmentations (Rotate and Shift) were highly effective, while photometric (color) augmentations actually decreased performance, suggesting that the natural color palette of mountainous terrain is a vital feature for the model.

Results and Performance

SwinLS was evaluated on the Landslide4Sense dataset, which consists of 128x128 pixel patches from Sentinel-2 satellite imagery. The model achieved an F1 score of 73.99% on the test leaderboard, significantly outperforming classic models like ResUNet (59.2% F1) and DeepLabv3 (58.0% F1) when using identical RGB inputs. Ablation studies confirmed that the "Rotate and Shift" augmentation and the balanced training strategy provided F1 score boosts of 4.2% and 4.1%, respectively.

Conclusion and Future Work

SwinLS demonstrates the power of Transformers in remote sensing when properly adapted to the domain's unique constraints. While RGB proved most effective here, future work could involve designing specialized attention mechanisms capable of handling high-dimensional spectral data without dissipating focus. Additionally, further testing is needed to determine how well the model generalizes across different satellite sensors and geographic regions.

Summary updated

BibTeX
@inproceedings{zhao2022swinls,
  author = {Dong Zhao and Qi Zang and Zining Wang and Dou Quan and Shuang Wang},
  title = {{SwinLS: Adapting Swin Transformer to Landslide Detection}},
  booktitle = {CDCEO @ IJCAI},
  year = {2022},
  url = {https://openreview.net/forum?id=w8XfBeWDT3},
}
Figure