NeighborMAE: Exploiting Spatial Dependencies between Neighboring Earth Observation Images in Masked Autoencoders Pretraining

Liang Zeng, Valerio Marsocci, Wufan Zhao, Andrea Nascetti, Maarten Vergauwen

TL;DR

Self-supervised Masked Image Modeling (MIM) for satellite imagery typically treats image tiles as isolated snapshots, ignoring the continuous nature of the Earth's surface. NeighborMAE solves this by jointly reconstructing masked regions across neighboring Earth Observation (EO) images, forcing the model to learn natural spatial continuity. This simple yet effective framework yields state-of-the-art representations for downstream tasks like land-use classification and semantic segmentation with minimal computational overhead.

What Problem Does This Paper Address?

When training vision models on satellite and aerial imagery, self-supervised learning—specifically Masked Image Modeling (MIM)—has become incredibly popular. MIM models learn by looking at an image with most of its pieces hidden (masked) and trying to reconstruct the missing parts.

However, existing MIM frameworks treat Earth Observation data as a collection of isolated image tiles. In reality, the Earth's surface is continuous and highly structured; an image of a city or a forest doesn't abruptly end at the border of a satellite tile. By ignoring the rich spatial dependencies between adjacent scenes, current models limit their representations to local extents rather than capturing broader geographic context and terrain continuity.

Methods

The authors introduce NeighborMAE, a principled adaptation of the Masked Autoencoder (MAE) architecture designed to exploit spatial dependencies between adjacent images.

Figure 2. The overview of NeighborMAE. We sample pairs of neighboring images from datasets based on geographic coordinates. Their relative positions are embedded in a shared coordinate system, and the mask ratio is chosen based on IoU. Neighboring images are jointly reconstructed by MAE, which learns the in-between spatial dependencies by self-attention. The reconstruction loss is weighted by the visibility from the masked input of neighboring images to avoid learning shortcuts.

The core workflow consists of several novel components:

  1. Neighboring Images Sampling: Image pairs are sampled from the dataset based on the Intersection-over-Union (IoU) of their geospatial footprints.
  2. Relative Positional Embedding: To help the Vision Transformer (ViT) understand the spatial layout, the georeferenced bounding boxes of the image pairs are normalized into a shared coordinate system [0, 1].
  3. Dynamic Mask Ratio: Because overlapping images provide extra contextual clues, the reconstruction task can become too easy. NeighborMAE dynamically increases the mask ratio when the sampled images have high overlap to keep the pretext task challenging.
  4. Weighted Loss by Input Visibility: Jointly reconstructing overlapping images introduces a potential "shortcut"—the model could simply copy-and-paste pixels from the visible part of one image to the masked part of its neighbor. To prevent this, the authors categorize pixels into self-visible, cross-visible, and not visible, and dynamically down-weight the loss for cross-visible pixels that show little to no change.

Datasets

The model was pretrained and evaluated on several prominent remote sensing benchmarks:

  • Pretraining:
  • fMoW-RGB: Functional Map of the World (363,572 images from 83,412 multi-temporal sequences).
  • Satellogic-RGB: A newly released dataset from EarthView consisting of over 6 million automatically cropped patches, presenting a challenge due to incomplete objects and fewer revisits.
  • Downstream Evaluation: Image classification on fMoW-RGB, UC Merced, RESISC-45, FireRisk, and ForestNet; semantic segmentation on Five-Billion-Pixels (FBP) and PASTIS-HD.

Key Insights and Ideas

  • Neighbors $\neq$ Larger Images: Learning from neighboring views isn't just like training on a larger static image. Because neighboring satellite passes often occur at different times or from different angles, they introduce natural variations in lighting, geometry, and atmospheric conditions. This forces the model to learn representations that are both spatially continuous and robust to real-world noise.
  • The Space-Time Synergy: As shown in the ablation studies, combining spatial neighbors with multi-temporal data (Multi-Temporal Neighbors) provides a synergistic effect, significantly outperforming models trained on larger image sizes or temporal sequences alone.
Figure 3. Examples of different ways to extend the view of a base input (a) using a similar number of additional patches. Neighbors introduce diverse spatial variations for learning.
  • Shortcut Prevention is Crucial: Without the visibility-weighted loss function, performance drops significantly. This proves that if a self-supervised model can cheat by copy-pasting overlapping pixels, it will do so instead of learning meaningful semantic features.

Key Results

NeighborMAE consistently outperforms vanilla MAE and specialized Earth Observation baselines across multiple downstream tasks:

  • Classification & Segmentation Boosts: Pretraining on fMoW-RGB improved linear probing accuracy on fMoW classification by +2.0% and boosted semantic segmentation performance by +2.7% mIoU on the Five-Billion-Pixels dataset compared to vanilla MAE.
  • Competitive with Foundation Models: NeighborMAE achieves performance on par with or better than DOFA, a state-of-the-art foundation model trained on massive multi-modal, multi-spectral datasets, despite NeighborMAE only using RGB imagery.
  • High Computational Efficiency: Unlike multi-scale MIM methods (such as SatMAE++) which rely on computationally expensive upsampling, NeighborMAE introduces negligible overhead. It requires only slightly more memory and batch time than vanilla MAE while being nearly 3x faster and using 3x less memory than SatMAE++.

Limitations and Future Work

  • RGB Limitation: To isolate the impact of spatial dependencies, this study focused strictly on RGB imagery. The authors note that extending NeighborMAE to multi-spectral and multi-modal (e.g., SAR) data is an important next step.
  • Scalability Bottleneck: Jointly processing tokens from multiple images scales quadratically ($O(n^2)$) due to the nature of self-attention. Scaling the framework to handle larger mosaics of more than two images will require token-reduction strategies or next-generation architectures to mitigate computational overhead.

Summary updated

BibTeX
@inproceedings{zeng2026neighbormae,
  author = {Liang Zeng and Valerio Marsocci and Wufan Zhao and Andrea Nascetti and Maarten Vergauwen},
  title = {{NeighborMAE: Exploiting Spatial Dependencies between Neighboring Earth Observation Images in Masked Autoencoders Pretraining}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=YGPXGGUjYi},
}
Figure