Abstract
Species Distribution Models (SDMs) are critical tools for conservation, yet they often struggle with rigid input requirements, missing data, and limited interpretability. This paper introduces MaskSDM, a deep learning framework that utilizes masked training and Transformer architectures to create a single, versatile model capable of handling any subset of environmental predictors. MaskSDM demonstrates high performance (AUC ~0.98), matches the accuracy of specialized "oracle" models, and provides spatially explicit explainability through efficient Shapley value estimation.
Introduction
Predicting species occurrence based on environmental variables is a cornerstone of ecological research. However, traditional SDMs are often constrained by the data they were trained on, requiring the same set of variables for every prediction. MaskSDM breaks this paradigm by employing a masked training strategy, allowing researchers to use whatever data is available at inference time without retraining.
Addressing the Limitations of Traditional SDMs
Current modeling approaches face three primary hurdles:
- Rigidity: Models typically require a fixed set of inputs, making it difficult to test hypotheses involving different variable subsets.
- Missing Data: Environmental datasets are frequently incomplete due to factors like cloud cover or localized data gaps. Standard imputation methods often introduce bias.
- Interpretability: Deep learning models are often "black boxes," making it hard for ecologists to understand the environmental drivers behind a prediction.
Methodology: The MaskSDM Framework
MaskSDM leverages a Transformer encoder architecture to capture complex, non-linear interactions between diverse data types.
Technical Innovations
- Tokenization: Heterogeneous inputs, such as tabular climate data and satellite imagery features, are converted into high-dimensional "tokens," creating a unified representation for the model.
- Masked Training: By randomly hiding input variables during training, the model learns to make accurate predictions even when information is incomplete.
- Stratified Monte Carlo Shapley Values: MaskSDM’s ability to handle missing inputs allows for a more efficient and accurate calculation of Shapley values, providing local and global insights into feature importance.
Data and Evaluation
The framework was evaluated using the sPlotOpen dataset, containing over 12,000 plant species across 95,000 global plots. Predictors included 61 variables covering climate (WorldClim), soil (SoilGrids), topography, and human footprint, alongside satellite features from Sentinel-2. The model's generalizability was further validated on the European GeoPlant dataset.
Key Results and Insights
- High Performance: MaskSDM achieved a mean test AUC of approximately 0.98 when all predictors were available.
- Oracle-Level Accuracy: The model performed nearly as well as "Oracle" models—individual models trained specifically for a single subset of variables.
- Robustness to Missing Data: MaskSDM significantly outperformed traditional mean or median imputation methods, which can introduce non-neutral biases.
- Spatially Explicit Explainability: Instead of global importance scores, MaskSDM produces maps of Shapley values, showing how environmental drivers (e.g., temperature vs. soil pH) vary across different geographic regions.
Conclusion and Future Directions
MaskSDM represents a significant step toward a "foundation model" for ecology. While it shows immense promise, challenges remain in avoiding overfitting for data-poor species and distinguishing between correlation and true biological causation. Future work will focus on incorporating time-series data and multi-modal inputs like textual species descriptions to further enhance the model's predictive power and ecological relevance.
Summary updated