Abstract
Machine learning is gaining popularity in a broad range of areas working with geographic data, such as ecology or atmospheric sciences. Here, data often exhibit spatial effects, which can be difficult to learn for neural networks. In this study, we propose SXL, a method for embedding information on the autoregressive nature of spatial data directly into the learning process using auxiliary tasks. We utilize the local Moran's I, a popular measure of local spatial autocorrelation, to "nudge" the model to learn the direction and magnitude of local spatial effects, complementing the learning of the primary task. We further introduce a novel expansion of Moran's I to multiple resolutions, thus capturing spatial interactions over longer and shorter distances simultaneously. The novel multi-resolution Moran's I can be constructed easily and as a multi-dimensional tensor offers seamless integration into existing machine learning frameworks. Throughout a range of experiments using real-world data, we highlight how our method consistently improves the training of neural networks in unsupervised and supervised learning tasks. In generative spatial modeling experiments, we propose a novel loss for auxiliary task GANs utilizing task uncertainty weights. Our proposed method outperforms domain-specific spatial interpolation benchmarks, highlighting its potential for downstream applications. This study bridges expertise from geographic information science and machine learning, showing how this integration of disciplines can help to address domain-specific challenges.
Introduction
Standard neural networks often struggle with geographic data because they assume data points are independent and identically distributed (iid). In reality, geographic data—such as air pollution levels, crop yields, or terrain elevation—exhibit strong spatial autocorrelation: values at one location are typically related to values nearby. This phenomenon, often referred to as Tobler's First Law of Geography, is frequently ignored by standard deep learning architectures, which can lead to over-smoothing or failure to capture non-stationary effects.
This paper introduces SXL (Spatially eXplicit Learning), a method that bridges the gap between deep learning and Geographic Information Science (GIS) by embedding spatial theory directly into the neural network training process. By teaching models to understand spatial dependencies through auxiliary learning tasks, SXL improves performance in both generative modeling and spatial interpolation.
Methodology
The core of SXL is the use of Auxiliary Task Learning. Instead of training a model solely on a primary task (e.g., generating a map), the model is simultaneously tasked with predicting a spatial embedding of that data. This acts as a powerful regularizer, forcing the model to learn the underlying spatial process alongside the data itself.
Local Moran’s I and Multi-resolution Expansion
The authors utilize Local Moran’s I, a classic GIS metric that measures local spatial autocorrelation, identifying clusters (high similarity) and outliers (low similarity). A key innovation of this work is the expansion of Moran’s I to multiple scales, termed Multi-resolution Moran’s I (MRES-MAT). By coarsening input data through average pooling before calculating the metric, the model learns to capture spatial interactions across both short and long distances simultaneously.
Uncertainty-Weighted Loss
To balance the primary task loss with the auxiliary spatial loss, the authors propose a novel extension for Generative Adversarial Networks (GANs) using task uncertainty weights. This allows the model to automatically tune the importance of each task during training, ensuring that the spatial "nudge" effectively regularizes the learning process without overwhelming the main objective. This approach is particularly useful in preventing "mode collapse," a common failure in GANs where the generator produces limited, repetitive outputs.
Key Results
The SXL framework was evaluated across diverse datasets, including seabed relief (PetrelGrid), topographic data (DEM), and global forest change (Tree Canopy).
- Generative Modeling: SXL improved synthetic sample quality across various GAN architectures (Vanilla, DCGAN, EDGAN). In terms of Maximum Mean Discrepancy (MMD), SXL models outperformed standard versions by 3-10%, effectively maintaining the structural diversity found in real geographic data.
- Spatial Interpolation: In upscaling tasks (e.g., using NEOS Hillshades), SXL-enhanced CNNs outperformed traditional benchmarks like Kriging and Bicubic interpolation. The SXL model achieved a 5% improvement in Root Mean Squared Error (RMSE) over standard CNNs, demonstrating superior reconstruction of fine spatial details.
Conclusion
SXL demonstrates that integrating domain-specific geographic metrics into machine learning frameworks can significantly improve model performance and robustness. By explicitly accounting for spatial autocorrelation, SXL provides a more principled way to handle geospatial data in deep learning. While currently focused on regularly gridded data, future research could expand this logic to continuous spatial processes and irregular vector data, further bridging the gap between GIS and AI.
Summary updated