On the selection and effectiveness of pseudo-absences for species distribution modeling with deep learning

Robin Zbinden, Nina Van Tiel, Benjamin Kellenberger, Lloyd Hughes, Devis Tuia

Abstract

Species Distribution Models (SDMs) are critical tools for conservation, yet they are often limited by the nature of ecological data, which typically records where a species is present but not where it is absent. This "presence-only" data necessitates the use of pseudo-absences—synthetic negative samples—to train machine learning models. This paper presents a novel weighted loss function designed for multi-species neural networks that balances different pseudo-absence selection strategies and addresses the inherent class imbalance between common and rare species. Our results demonstrate that this approach improves predictive accuracy and provides a scalable alternative to traditional ecological modeling techniques.

Introduction

Understanding the geographic distribution of species is fundamental to addressing the impacts of climate change and habitat loss. Modern SDMs increasingly rely on "community science" platforms like iNaturalist or eBird. While these platforms provide vast amounts of data, they suffer from a significant limitation: they provide presence-only (PO) data. We know where a species was observed, but we lack confirmed "absence" data where it was not.

To train discriminative models, researchers generate pseudo-absences. Two primary strategies exist: random background sampling (picking points across a map) and target-group background sampling (using locations where other species were found). The latter is particularly effective at mitigating sampling bias—the tendency for observers to frequent accessible areas like parks or roadsides. However, integrating these methods into deep learning frameworks remains challenging due to the massive imbalance between sightings and pseudo-absences, as well as the varying effectiveness of different background types across geographic regions.

Methodology

The Weighted Loss Function

The core contribution of this work is the introduction of a full weighted loss function ($L_{full-weighted}$) for multi-species neural networks. This function incorporates three distinct weighting mechanisms to refine the learning process:

  1. Species Weights ($w_s$): Ecological data is characterized by a "long-tail" distribution where a few species are ubiquitous and most are rare. By weighting the inverse of species frequency, the model ensures that rare species contribute significantly to the gradient, preventing the network from ignoring them to minimize global error.
  2. Presence Weight ($\lambda_1$): This parameter allows the model to prioritize the accuracy of real sightings over synthetic pseudo-absences, acknowledging that confirmed presence data is inherently more reliable than assumed negatives.
  3. Pseudo-absence Weight ($\lambda_2$): This acts as a "mixing knob" to balance the ratio between random background points and target-group background points. This allows the model to leverage the bias-correction of target-group points while maintaining the broad geographic coverage of random points.

Experimental Design

The model was evaluated using the benchmark dataset from Elith et al. (2020), covering 226 species across six global regions: the Australian Wet Tropics (AWT), Canada (CAN), New South Wales (NSW), New Zealand (NZ), South America (SA), and Switzerland (SWI). To ensure the model's ability to generalize, the authors employed spatial block cross-validation, dividing the study areas into geographic blocks rather than random points. This prevents the model from simply memorizing local sampling biases and forces it to learn underlying environmental relationships.

Results and Discussion

Performance Gains

The proposed weighted loss function demonstrated a clear improvement over existing state-of-the-art neural network losses. The average Area Under the Curve (AUC) across all regions rose from 0.748 to 0.755. Notably, the multi-species neural network performed competitively with traditional "gold standard" models such as Maxent (0.760) and Boosted Regression Trees (0.757). Unlike these traditional models, which require training a separate instance for every species, the neural network approach handles hundreds of species simultaneously, offering significant computational advantages for large-scale biodiversity monitoring.

Regional Sensitivity and Bias Correction

The study revealed that the optimal mix of pseudo-absences ($\lambda_2$) is highly region-dependent. In regions with high sampling bias, such as Canada, the inclusion of target-group pseudo-absences was critical for performance. In contrast, regions with more uniform sampling, like New Zealand, benefited less from heavy target-group weighting. The authors found that a general mix of approximately 80% target-group and 20% random background points typically yielded the most robust results across diverse environments.

Conclusion

This research demonstrates that multi-species neural networks are a viable and scalable alternative for species distribution modeling when equipped with an intelligent loss function. By explicitly addressing species rarity and sampling bias through weighted pseudo-absences, the model provides more accurate ecological insights. Future work will explore the use of raw spatial data, such as satellite imagery and climate rasters, within more complex architectures like Transformers or Convolutional Neural Networks to further enhance the spatial awareness of these models.

Summary updated

BibTeX
@inproceedings{zbinden2025selection,
  author = {Robin Zbinden and Nina Van Tiel and Benjamin Kellenberger and Lloyd Hughes and Devis Tuia},
  title = {{On the selection and effectiveness of pseudo-absences for species distribution modeling with deep learning}},
  booktitle = {Ecological Informatics},
  year = {2025},
  url = {https://openreview.net/forum?id=3sXB2cPa0n},
}
Figure