TL;DR
Researchers have developed a new weighted loss function for multi-species neural networks that effectively balances "presence-only" data with synthetic "pseudo-absences." By using spatial block cross-validation to fine-tune the ratio between random and targeted background samples, their approach significantly improves species distribution modeling (SDM) accuracy across diverse global regions, particularly for rare species.
What Problem Does This Paper Address?
Species Distribution Models (SDMs) are critical for conservation, helping us understand where species live based on environmental conditions. However, most available data is "presence-only" (PO)—think of an enthusiast uploading a bird photo to iNaturalist. We know where the bird is, but we rarely have confirmed records of where it isn't.
To train machine learning models, we need negative samples. The standard solution is to use "pseudo-absences" (PAs): locations where we assume a species is absent. This introduces two major challenges:
- Class Imbalance: There are often far more pseudo-absences than actual presence records, especially for rare species.
- Sampling Bias: Citizen science data is biased toward accessible areas (like roadsides). If we pick pseudo-absences randomly, the model might just learn to distinguish "near roads" from "far from roads" rather than actual habitat suitability.
While these issues are well-studied for single-species models, the authors identify a significant gap in how to handle them within modern, multi-species deep learning architectures.
Methods
The authors propose a full weighted loss function for training multi-species Multi-Layer Perceptrons (MLPs). Their approach extends the work of Cole et al. (2023) by introducing three key weighting parameters:
- Species Weights ($w_s$): This addresses the "long-tail" distribution of species records (see Figure 2). By weighting by the inverse frequency of a species, they ensure that rare species contribute as much to the learning process as common ones.
- Presence Weight ($\lambda_1$): This allows the model to prioritize correctly classifying confirmed presences over uncertain pseudo-absences.
- Pseudo-absence Weight ($\lambda_2$): This is the "knob" that balances two types of PAs: random background points (sampled uniformly) and target-group background points (locations where other species were found).
To find the optimal values for these weights without having true absence data for training, the authors advocate for spatial block cross-validation (Figure 3). This involves splitting the study area into geographic blocks, ensuring the model is tested on its ability to generalize to new areas rather than just memorizing local biases.
Datasets
The study utilizes a well-established benchmark dataset from Elith et al. (2020). It includes:
- Training Data: Opportunistically sampled presence-only data for 226 species across six regions: Australian Wet Tropics (AWT), Canada (CAN), New South Wales (NSW), New Zealand (NZ), South America (SA), and Switzerland (SWI).
- Evaluation Data: Independent, high-quality presence-absence (PA) data, which serves as the "ground truth" for testing model performance.
- Predictors: 10 to 13 environmental covariates per region, covering climatic and soil variables.
Key Insights and Ideas
- Target-Group PAs are a Double-Edged Sword: Using locations where other species were found helps cancel out sampling bias (because those locations were also sampled). However, for specialized species, these points might be too similar to actual habitat, confusing the model.
- Regional Variability: The "best" mix of pseudo-absences ($\lambda_2$) isn't universal. Regions with high sampling bias (like Canada) benefit more from target-group points, while less biased regions (like New Zealand) favor more random points.
- Rare Species Benefit Most: The inclusion of species weights ($w_s$) showed a dramatic improvement in AUC (Area Under the Curve) for species with fewer than 25 presence records (see Figure 4).
Key Results
- Superior Performance: The proposed weighted loss function outperformed previous multi-species loss functions (like SSDL and SLDS) across almost all regions.
- Efficiency: The multi-species MLP achieved results comparable to state-of-the-art single-species models like Maxent and Boosting Regression Trees (BRT). Crucially, the authors' method requires only one model per region instead of 226 individual models, offering a massive gain in scalability.
- Robustness: Fine-tuning $\lambda_2$ via block cross-validation consistently led to the best average performance (Mean AUC of ~0.755 across regions), proving that the strategy works even when true absence data is missing during training.
Limitations and Future Work
- Tabular Data Constraints: The authors note that neural networks often struggle to beat tree-based models on purely tabular data. They suggest that the real power of this loss function will be realized when integrated with Convolutional Neural Networks (CNNs) or Transformers that can process satellite imagery and environmental rasters directly.
- Per-Species Tuning: Currently, the $\lambda_2$ weight is tuned per region. The authors observed that different species within the same region might prefer different PA ratios, suggesting that per-species hyperparameter tuning could further boost accuracy.
- Prevalence Estimation: The model still struggles to determine absolute species prevalence (how common a species is overall) from presence-only data alone, a fundamental limitation of the data type that requires a posteriori scaling if prevalence information is available.
Summary updated